Skip to content

Commit

Permalink
lexicons: update descriptions in com.atproto.*
Browse files Browse the repository at this point in the history
  • Loading branch information
bnewbold committed Jan 30, 2024
1 parent c048962 commit 7c1ea3d
Show file tree
Hide file tree
Showing 34 changed files with 205 additions and 92 deletions.
2 changes: 1 addition & 1 deletion lexicons/com/atproto/identity/resolveHandle.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Provides the DID of a repo.",
"description": "Resolves a handle (domain name) to a DID.",
"parameters": {
"type": "params",
"required": ["handle"],
Expand Down
8 changes: 6 additions & 2 deletions lexicons/com/atproto/identity/updateHandle.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
"defs": {
"main": {
"type": "procedure",
"description": "Updates the handle of the account.",
"description": "Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["handle"],
"properties": {
"handle": { "type": "string", "format": "handle" }
"handle": {
"type": "string",
"format": "handle",
"description": "The new handle."
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lexicons/com/atproto/label/queryLabels.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Find labels relevant to the provided URI patterns.",
"description": "Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.",
"parameters": {
"type": "params",
"required": ["uriPatterns"],
Expand Down
4 changes: 2 additions & 2 deletions lexicons/com/atproto/label/subscribeLabels.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"defs": {
"main": {
"type": "subscription",
"description": "Subscribe to label updates.",
"description": "Subscribe to stream of labels (and negations). Public endpoint implemented by mod services. Uses same sequencing scheme as repo event stream.",
"parameters": {
"type": "params",
"properties": {
"cursor": {
"type": "integer",
"description": "The last known event to backfill from."
"description": "The last known event seq number to backfill from."
}
}
},
Expand Down
8 changes: 6 additions & 2 deletions lexicons/com/atproto/moderation/createReport.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "procedure",
"description": "Report a repo or a record.",
"description": "Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.",
"input": {
"encoding": "application/json",
"schema": {
Expand All @@ -13,9 +13,13 @@
"properties": {
"reasonType": {
"type": "ref",
"description": "Indicates the broad category of violation the report is for.",
"ref": "com.atproto.moderation.defs#reasonType"
},
"reason": { "type": "string" },
"reason": {
"type": "string",
"description": "Additional context about the content and violation."
},
"subject": {
"type": "union",
"refs": [
Expand Down
20 changes: 13 additions & 7 deletions lexicons/com/atproto/repo/applyWrites.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "procedure",
"description": "Apply a batch transaction of creates, updates, and deletes.",
"description": "Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.",
"input": {
"encoding": "application/json",
"schema": {
Expand All @@ -14,12 +14,12 @@
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo."
"description": "The handle or DID of the repo (aka, current account)."
},
"validate": {
"type": "boolean",
"default": true,
"description": "Flag for validating the records."
"description": "Can be set to 'false' to skip Lexicon schema validation of record data, for all operations."
},
"writes": {
"type": "array",
Expand All @@ -31,16 +31,22 @@
},
"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"
}
}
}
},
"errors": [{ "name": "InvalidSwap" }]
"errors": [
{
"name": "InvalidSwap",
"description": "Indicates that the 'swapCommit' parameter did not match current commit."
}
]
},
"create": {
"type": "object",
"description": "Create a new record.",
"description": "Operation which creates a new record.",
"required": ["collection", "value"],
"properties": {
"collection": { "type": "string", "format": "nsid" },
Expand All @@ -50,7 +56,7 @@
},
"update": {
"type": "object",
"description": "Update an existing record.",
"description": "Operation which updates an existing record.",
"required": ["collection", "rkey", "value"],
"properties": {
"collection": { "type": "string", "format": "nsid" },
Expand All @@ -60,7 +66,7 @@
},
"delete": {
"type": "object",
"description": "Delete an existing record.",
"description": "Operation which deletes an existing record.",
"required": ["collection", "rkey"],
"properties": {
"collection": { "type": "string", "format": "nsid" },
Expand Down
17 changes: 11 additions & 6 deletions lexicons/com/atproto/repo/createRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "procedure",
"description": "Create a new record.",
"description": "Create a single new repository record. Requires auth, implemented by PDS.",
"input": {
"encoding": "application/json",
"schema": {
Expand All @@ -14,7 +14,7 @@
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo."
"description": "The handle or DID of the repo (aka, current account)."
},
"collection": {
"type": "string",
Expand All @@ -23,17 +23,17 @@
},
"rkey": {
"type": "string",
"description": "The key of the record.",
"description": "The Record Key.",
"maxLength": 15
},
"validate": {
"type": "boolean",
"default": true,
"description": "Flag for validating the record."
"description": "Can be set to 'false' to skip Lexicon schema validation of record data."
},
"record": {
"type": "unknown",
"description": "The record to create."
"description": "The record itself. Must contain a $type field."
},
"swapCommit": {
"type": "string",
Expand All @@ -54,7 +54,12 @@
}
}
},
"errors": [{ "name": "InvalidSwap" }]
"errors": [
{
"name": "InvalidSwap",
"description": "Indicates that 'swapCommit' didn't match current repo commit."
}
]
}
}
}
6 changes: 3 additions & 3 deletions lexicons/com/atproto/repo/deleteRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "procedure",
"description": "Delete a record, or ensure it doesn't exist.",
"description": "Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.",
"input": {
"encoding": "application/json",
"schema": {
Expand All @@ -14,7 +14,7 @@
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo."
"description": "The handle or DID of the repo (aka, current account)."
},
"collection": {
"type": "string",
Expand All @@ -23,7 +23,7 @@
},
"rkey": {
"type": "string",
"description": "The key of the record."
"description": "The Record Key."
},
"swapRecord": {
"type": "string",
Expand Down
13 changes: 10 additions & 3 deletions lexicons/com/atproto/repo/describeRepo.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 the repo, including the list of collections.",
"description": "Get information about an account and repository, including the list of collections. Does not require auth.",
"parameters": {
"type": "params",
"required": ["repo"],
Expand All @@ -30,12 +30,19 @@
"properties": {
"handle": { "type": "string", "format": "handle" },
"did": { "type": "string", "format": "did" },
"didDoc": { "type": "unknown" },
"didDoc": {
"type": "unknown",
"description": "The complete DID document for this account."
},
"collections": {
"type": "array",
"description": "List of all the collections (NSIDs) for which this repo contains at least one record.",
"items": { "type": "string", "format": "nsid" }
},
"handleIsCorrect": { "type": "boolean" }
"handleIsCorrect": {
"type": "boolean",
"description": "Indicates if handle is currently valid (resolves bi-directionally)"
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lexicons/com/atproto/repo/getRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Get a record.",
"description": "Get a single record from a repository. Does not require auth.",
"parameters": {
"type": "params",
"required": ["repo", "collection", "rkey"],
Expand All @@ -19,7 +19,7 @@
"format": "nsid",
"description": "The NSID of the record collection."
},
"rkey": { "type": "string", "description": "The key of the record." },
"rkey": { "type": "string", "description": "The Record Key." },
"cid": {
"type": "string",
"format": "cid",
Expand Down
2 changes: 1 addition & 1 deletion lexicons/com/atproto/repo/listRecords.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "List a range of records in a collection.",
"description": "List a range of records in a repository, matching a specific collection. Does not require auth.",
"parameters": {
"type": "params",
"required": ["repo", "collection"],
Expand Down
10 changes: 5 additions & 5 deletions lexicons/com/atproto/repo/putRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "procedure",
"description": "Write a record, creating or updating it as needed.",
"description": "Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.",
"input": {
"encoding": "application/json",
"schema": {
Expand All @@ -15,7 +15,7 @@
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo."
"description": "The handle or DID of the repo (aka, current account)."
},
"collection": {
"type": "string",
Expand All @@ -24,13 +24,13 @@
},
"rkey": {
"type": "string",
"description": "The key of the record.",
"description": "The Record Key.",
"maxLength": 15
},
"validate": {
"type": "boolean",
"default": true,
"description": "Flag for validating the record."
"description": "Can be set to 'false' to skip Lexicon schema validation of record data."
},
"record": {
"type": "unknown",
Expand All @@ -39,7 +39,7 @@
"swapRecord": {
"type": "string",
"format": "cid",
"description": "Compare and swap with the previous record by CID."
"description": "Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation"
},
"swapCommit": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion lexicons/com/atproto/repo/uploadBlob.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "procedure",
"description": "Upload a new blob to be added to repo in a later request.",
"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": "*/*"
},
Expand Down
Loading

0 comments on commit 7c1ea3d

Please sign in to comment.