Skip to content

Commit

Permalink
Split lexicons into more specific namespaces (bluesky-social#306)
Browse files Browse the repository at this point in the history
* Segment lexicons into more specific namespaces and tighten up some naming conventions

* Update API to use new lexicons

* Update pds and dev-env to use new lexicons
  • Loading branch information
pfrazee authored Nov 4, 2022
1 parent 7ee8213 commit e611271
Show file tree
Hide file tree
Showing 202 changed files with 2,907 additions and 2,666 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getProfile",
"id": "app.bsky.actor.getProfile",
"type": "query",
"parameters": {
"user": {"type": "string", "required": true}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getUsersSearch",
"id": "app.bsky.actor.search",
"type": "query",
"description": "Find users matching search criteria",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getUsersTypeahead",
"id": "app.bsky.actor.searchTypeahead",
"type": "query",
"description": "Find user suggestions for a search term",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.profile",
"id": "app.bsky.actor.profile",
"type": "record",
"key": "literal:self",
"record": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.updateProfile",
"id": "app.bsky.actor.updateProfile",
"type": "procedure",
"description": "Notify server that the user has seen notifications",
"input": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getAuthorFeed",
"id": "app.bsky.feed.getAuthorFeed",
"type": "query",
"description": "A view of a user's feed",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getLikedBy",
"id": "app.bsky.feed.getLikedBy",
"type": "query",
"parameters": {
"uri": {"type": "string", "required": true},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getPostThread",
"id": "app.bsky.feed.getPostThread",
"type": "query",
"parameters": {
"uri": {"type": "string", "required": true},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getRepostedBy",
"id": "app.bsky.feed.getRepostedBy",
"type": "query",
"parameters": {
"uri": {"type": "string", "required": true},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getTimeline",
"id": "app.bsky.feed.getTimeline",
"type": "query",
"description": "A view of the user's home timeline",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.like",
"id": "app.bsky.feed.like",
"type": "record",
"key": "tid",
"record": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.mediaEmbed",
"id": "app.bsky.feed.mediaEmbed",
"type": "record",
"description": "A list of media embedded in a post or document.",
"key": "tid",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.post",
"id": "app.bsky.feed.post",
"type": "record",
"key": "tid",
"record": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.repost",
"id": "app.bsky.feed.repost",
"type": "record",
"key": "tid",
"record": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.follow",
"id": "app.bsky.graph.follow",
"type": "record",
"description": "A social follow",
"key": "tid",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getUserFollowers",
"id": "app.bsky.graph.getFollowers",
"type": "query",
"description": "Who is following a user?",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getUserFollows",
"id": "app.bsky.graph.getFollows",
"type": "query",
"description": "Who is a user following?",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.invite",
"id": "app.bsky.graph.invite",
"type": "record",
"key": "tid",
"record": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.inviteAccept",
"id": "app.bsky.graph.inviteAccept",
"type": "record",
"key": "tid",
"record": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getNotificationCount",
"id": "app.bsky.notification.getCount",
"type": "query",
"parameters": { },
"output": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.getNotifications",
"id": "app.bsky.notification.list",
"type": "query",
"parameters": {
"limit": {"type": "number", "maximum": 100},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.postNotificationsSeen",
"id": "app.bsky.notification.updateSeen",
"type": "procedure",
"description": "Notify server that the user has seen notifications",
"input": {
Expand Down
6 changes: 6 additions & 0 deletions lexicons/app/bsky/system/actorScene.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.system.actorScene",
"type": "token",
"description": "Actor type: Scene. Defined for app.bsky.system.declaration's actorType."
}
6 changes: 6 additions & 0 deletions lexicons/app/bsky/system/actorUser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.system.actorUser",
"type": "token",
"description": "Actor type: User. Defined for app.bsky.system.declaration's actorType."
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "app.bsky.declaration",
"id": "app.bsky.system.declaration",
"description": "Context for an account that is considered intrinsic to it and alters the fundamental understanding of an account of changed. A declaration should be treated as immutable.",
"type": "record",
"key": "literal:self",
Expand All @@ -19,11 +19,11 @@
"defs": {
"actorKnown": {
"type": "string",
"enum": ["app.bsky.actorUser", "app.bsky.actorScene"]
"enum": ["app.bsky.system.actorUser", "app.bsky.system.actorScene"]
},
"actorUnknown": {
"type": "string",
"not": {"enum": ["app.bsky.actorUser", "app.bsky.actorScene"]}
"not": {"enum": ["app.bsky.system.actorUser", "app.bsky.system.actorScene"]}
}
}
}
6 changes: 0 additions & 6 deletions lexicons/bsky.app/actorScene.json

This file was deleted.

6 changes: 0 additions & 6 deletions lexicons/bsky.app/actorUser.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.createAccount",
"id": "com.atproto.account.create",
"type": "procedure",
"description": "Create an account.",
"input": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.createInviteCode",
"id": "com.atproto.account.createInviteCode",
"type": "procedure",
"description": "Create an invite code.",
"input": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.deleteAccount",
"id": "com.atproto.account.delete",
"type": "procedure",
"description": "Delete an account.",
"input": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.getAccount",
"id": "com.atproto.account.get",
"type": "query",
"description": "Get information about an account.",
"parameters": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.requestAccountPasswordReset",
"id": "com.atproto.account.requestPasswordReset",
"type": "procedure",
"description": "Initiate a user account password reset via email",
"input": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.resetAccountPassword",
"id": "com.atproto.account.resetPassword",
"type": "procedure",
"description": "Reset a user account password using a token",
"input": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.resolveHandle",
"id": "com.atproto.handle.resolve",
"type": "query",
"description": "Provides the DID of a repo.",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.repoBatchWrite",
"id": "com.atproto.repo.batchWrite",
"type": "procedure",
"description": "Apply a batch transaction of creates, puts, and deletes.",
"input": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.repoCreateRecord",
"id": "com.atproto.repo.createRecord",
"type": "procedure",
"description": "Create a new record.",
"input": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.repoDeleteRecord",
"id": "com.atproto.repo.deleteRecord",
"type": "procedure",
"description": "Delete a record.",
"input": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.repoDescribe",
"id": "com.atproto.repo.describe",
"type": "query",
"description": "Get information about the repo, including the list of collections.",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.repoGetRecord",
"id": "com.atproto.repo.getRecord",
"type": "query",
"description": "Fetch a record.",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.repoListRecords",
"id": "com.atproto.repo.listRecords",
"type": "query",
"description": "List a range of records in a collection.",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.repoPutRecord",
"id": "com.atproto.repo.putRecord",
"type": "procedure",
"description": "Write a record.",
"input": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.getAccountsConfig",
"id": "com.atproto.server.getAccountsConfig",
"type": "query",
"description": "Get a document describing the service's accounts configuration.",
"parameters": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.createSession",
"id": "com.atproto.session.create",
"type": "procedure",
"description": "Create an authentication session.",
"input": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.deleteSession",
"id": "com.atproto.session.delete",
"type": "procedure",
"description": "Delete the current session.",
"output": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.getSession",
"id": "com.atproto.session.get",
"type": "query",
"description": "Get information about the current session.",
"parameters": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.refreshSession",
"id": "com.atproto.session.refresh",
"type": "procedure",
"description": "Refresh an authentication session.",
"output": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.syncGetRepo",
"id": "com.atproto.sync.getRepo",
"type": "query",
"description": "Gets the repo state.",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "com.atproto.syncGetRoot",
"id": "com.atproto.sync.getRoot",
"type": "query",
"description": "Gets the current root CID of a repo.",
"parameters": {
Expand Down
Loading

0 comments on commit e611271

Please sign in to comment.