Skip to content

Commit

Permalink
Merge pull request #2231 from bluesky-social/appview-v2-merge
Browse files Browse the repository at this point in the history
Appview v2 sync with main
  • Loading branch information
devinivy authored Feb 27, 2024
2 parents f855938 + 5a60f5d commit 4608ad2
Show file tree
Hide file tree
Showing 823 changed files with 14,084 additions and 4,505 deletions.
5 changes: 5 additions & 0 deletions .changeset/cuddly-adults-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@atproto/syntax': minor
---

allow colon character in record-key syntax
5 changes: 5 additions & 0 deletions .changeset/lovely-dogs-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@atproto/api': patch
---

Fix mute word upsert logic by ensuring we're comparing sanitized word values
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Dual MIT/Apache-2.0 License

Copyright (c) 2022-2023 Bluesky PBC, and Contributors
Copyright (c) 2022-2024 Bluesky PBC, and Contributors

Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ make help

## About AT Protocol

The Authenticated Transfer Protocol ("ATP" or "atproto") is a decentralized social media protocol, developed by [Bluesky PBC](https://blueskyweb.xyz). Learn more at:
The Authenticated Transfer Protocol ("ATP" or "atproto") is a decentralized social media protocol, developed by [Bluesky PBC](https://bsky.social). Learn more at:

- [Overview and Guides](https://atproto.com/guides/overview) 👈 Best starting point
- [Github Discussions](https://github.com/bluesky-social/atproto/discussions) 👈 Great place to ask questions
- [Protocol Specifications](https://atproto.com/specs/atp)
- [Blogpost on self-authenticating data structures](https://blueskyweb.xyz/blog/3-6-2022-a-self-authenticating-social-protocol)
- [Blogpost on self-authenticating data structures](https://bsky.social/about/blog/3-6-2022-a-self-authenticating-social-protocol)

The Bluesky Social application encompasses a set of schemas and APIs built in the overall AT Protocol framework. The namespace for these "Lexicons" is `app.bsky.*`.

Expand Down
8 changes: 8 additions & 0 deletions interop-test-files/syntax/aturi_syntax_valid.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@ at://did:plc:asdf123/com.atproto.feed.post/a
at://did:plc:asdf123/com.atproto.feed.post/asdf-123
at://did:abc:123
at://did:abc:123/io.nsid.someFunc/record-key

at://did:abc:123/io.nsid.someFunc/self.
at://did:abc:123/io.nsid.someFunc/lang:
at://did:abc:123/io.nsid.someFunc/:
at://did:abc:123/io.nsid.someFunc/-
at://did:abc:123/io.nsid.someFunc/_
at://did:abc:123/io.nsid.someFunc/~
at://did:abc:123/io.nsid.someFunc/...
5 changes: 3 additions & 2 deletions interop-test-files/syntax/recordkey_syntax_invalid.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# specs
literal:self
alpha/beta
.
..
Expand All @@ -10,5 +9,7 @@ any+space
number[3]
number(3)
"quote"
pre:fix
dHJ1ZQ==

# too long: 'o'.repeat(513)
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
13 changes: 13 additions & 0 deletions interop-test-files/syntax/recordkey_syntax_valid.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ self
example.com
~1.2-3_
dHJ1ZQ
_
literal:self
pre:fix

# more corner-cases
:
-
_
~
...
self.
lang:
:lang

# very long: 'o'.repeat(512)
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
74 changes: 72 additions & 2 deletions lexicons/app/bsky/actor/defs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.actor.defs",
"description": "A reference to an actor in the network.",
"defs": {
"profileViewBasic": {
"type": "object",
Expand Down Expand Up @@ -78,6 +77,7 @@
},
"viewerState": {
"type": "object",
"description": "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",
"properties": {
"muted": { "type": "boolean" },
"mutedByList": {
Expand All @@ -104,7 +104,10 @@
"#savedFeedsPref",
"#personalDetailsPref",
"#feedViewPref",
"#threadViewPref"
"#threadViewPref",
"#interestsPref",
"#mutedWordsPref",
"#hiddenPostsPref"
]
}
},
Expand Down Expand Up @@ -143,6 +146,9 @@
"type": "string",
"format": "at-uri"
}
},
"timelineIndex": {
"type": "integer"
}
}
},
Expand Down Expand Up @@ -199,6 +205,70 @@
"description": "Show followed users at the top of all replies."
}
}
},
"interestsPref": {
"type": "object",
"required": ["tags"],
"properties": {
"tags": {
"type": "array",
"maxLength": 100,
"items": { "type": "string", "maxLength": 640, "maxGraphemes": 64 },
"description": "A list of tags which describe the account owner's interests gathered during onboarding."
}
}
},
"mutedWordTarget": {
"type": "string",
"knownValues": ["content", "tag"],
"maxLength": 640,
"maxGraphemes": 64
},
"mutedWord": {
"type": "object",
"description": "A word that the account owner has muted.",
"required": ["value", "targets"],
"properties": {
"value": {
"type": "string",
"description": "The muted word itself.",
"maxLength": 10000,
"maxGraphemes": 1000
},
"targets": {
"type": "array",
"description": "The intended targets of the muted word.",
"items": {
"type": "ref",
"ref": "app.bsky.actor.defs#mutedWordTarget"
}
}
}
},
"mutedWordsPref": {
"type": "object",
"required": ["items"],
"properties": {
"items": {
"type": "array",
"items": {
"type": "ref",
"ref": "app.bsky.actor.defs#mutedWord"
},
"description": "A list of words the account owner has muted."
}
}
},
"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."
}
}
}
}
}
2 changes: 1 addition & 1 deletion lexicons/app/bsky/actor/getPreferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Get private preferences attached to the account.",
"description": "Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.",
"parameters": {
"type": "params",
"properties": {}
Expand Down
8 changes: 6 additions & 2 deletions lexicons/app/bsky/actor/getProfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
"defs": {
"main": {
"type": "query",
"description": "Get detailed profile view of an actor.",
"description": "Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.",
"parameters": {
"type": "params",
"required": ["actor"],
"properties": {
"actor": { "type": "string", "format": "at-identifier" }
"actor": {
"type": "string",
"format": "at-identifier",
"description": "Handle or DID of account to fetch profile of."
}
}
},
"output": {
Expand Down
2 changes: 1 addition & 1 deletion lexicons/app/bsky/actor/getSuggestions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Get a list of suggested actors, used for discovery.",
"description": "Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.",
"parameters": {
"type": "params",
"properties": {
Expand Down
6 changes: 5 additions & 1 deletion lexicons/app/bsky/actor/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "record",
"description": "A declaration of a profile.",
"description": "A declaration of a Bluesky account profile.",
"key": "literal:self",
"record": {
"type": "object",
Expand All @@ -16,21 +16,25 @@
},
"description": {
"type": "string",
"description": "Free-form profile description text.",
"maxGraphemes": 256,
"maxLength": 2560
},
"avatar": {
"type": "blob",
"description": "Small image to be displayed next to posts from account. AKA, 'profile picture'",
"accept": ["image/png", "image/jpeg"],
"maxSize": 1000000
},
"banner": {
"type": "blob",
"description": "Larger horizontal image to display behind profile view.",
"accept": ["image/png", "image/jpeg"],
"maxSize": 1000000
},
"labels": {
"type": "union",
"description": "Self-label values, specific to the Bluesky application, on the overall account.",
"refs": ["com.atproto.label.defs#selfLabels"]
}
}
Expand Down
2 changes: 1 addition & 1 deletion lexicons/app/bsky/actor/searchActors.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Find actors (profiles) matching search criteria.",
"description": "Find actors (profiles) matching search criteria. Does not require auth.",
"parameters": {
"type": "params",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion lexicons/app/bsky/actor/searchActorsTypeahead.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Find actor suggestions for a prefix search term.",
"description": "Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.",
"parameters": {
"type": "params",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion lexicons/app/bsky/embed/external.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"lexicon": 1,
"id": "app.bsky.embed.external",
"description": "A representation of some externally linked content, embedded in another form of content.",
"defs": {
"main": {
"type": "object",
"description": "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).",
"required": ["external"],
"properties": {
"external": {
Expand Down
22 changes: 17 additions & 5 deletions lexicons/app/bsky/embed/images.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"lexicon": 1,
"id": "app.bsky.embed.images",
"description": "A set of images embedded in some other form of content.",
"description": "A set of images embedded in a Bluesky record (eg, a post).",
"defs": {
"main": {
"type": "object",
Expand All @@ -23,7 +23,10 @@
"accept": ["image/*"],
"maxSize": 1000000
},
"alt": { "type": "string" },
"alt": {
"type": "string",
"description": "Alt text description of the image, for accessibility."
},
"aspectRatio": { "type": "ref", "ref": "#aspectRatio" }
}
},
Expand Down Expand Up @@ -51,9 +54,18 @@
"type": "object",
"required": ["thumb", "fullsize", "alt"],
"properties": {
"thumb": { "type": "string" },
"fullsize": { "type": "string" },
"alt": { "type": "string" },
"thumb": {
"type": "string",
"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",
"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."
},
"alt": {
"type": "string",
"description": "Alt text description of the image, for accessibility."
},
"aspectRatio": { "type": "ref", "ref": "#aspectRatio" }
}
}
Expand Down
7 changes: 5 additions & 2 deletions lexicons/app/bsky/embed/record.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"lexicon": 1,
"id": "app.bsky.embed.record",
"description": "A representation of a record embedded in another form of content.",
"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",
Expand Down Expand Up @@ -36,7 +36,10 @@
"type": "ref",
"ref": "app.bsky.actor.defs#profileViewBasic"
},
"value": { "type": "unknown" },
"value": {
"type": "unknown",
"description": "The record data itself."
},
"labels": {
"type": "array",
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
Expand Down
2 changes: 1 addition & 1 deletion lexicons/app/bsky/embed/recordWithMedia.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"lexicon": 1,
"id": "app.bsky.embed.recordWithMedia",
"description": "A representation of a record embedded in another form of content, alongside other compatible embeds.",
"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",
Expand Down
1 change: 1 addition & 0 deletions lexicons/app/bsky/feed/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
"viewerState": {
"type": "object",
"description": "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",
"properties": {
"repost": { "type": "string", "format": "at-uri" },
"like": { "type": "string", "format": "at-uri" },
Expand Down
2 changes: 1 addition & 1 deletion lexicons/app/bsky/feed/describeFeedGenerator.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Get information about a feed generator, including policies and offered feed URIs.",
"description": "Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).",
"output": {
"encoding": "application/json",
"schema": {
Expand Down
3 changes: 2 additions & 1 deletion lexicons/app/bsky/feed/generator.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "record",
"description": "A declaration of the existence of a feed generator.",
"description": "Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.",
"key": "any",
"record": {
"type": "object",
Expand Down Expand Up @@ -32,6 +32,7 @@
},
"labels": {
"type": "union",
"description": "Self-label values",
"refs": ["com.atproto.label.defs#selfLabels"]
},
"createdAt": { "type": "string", "format": "datetime" }
Expand Down
Loading

0 comments on commit 4608ad2

Please sign in to comment.