Skip to content

Commit

Permalink
update bundled lexicons
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Oct 15, 2024
1 parent 5c37b55 commit 137e908
Show file tree
Hide file tree
Showing 14 changed files with 539 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lexrpc/lexicons/com/atproto/repo/getRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"value": { "type": "unknown" }
}
}
}
},
"errors": [{ "name": "RecordNotFound" }]
}
}
}
43 changes: 43 additions & 0 deletions lexrpc/lexicons/tools/ozone/moderation/getRecords.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"lexicon": 1,
"id": "tools.ozone.moderation.getRecords",
"defs": {
"main": {
"type": "query",
"description": "Get details about some records.",
"parameters": {
"type": "params",
"required": ["uris"],
"properties": {
"uris": {
"type": "array",
"maxLength": 100,
"items": {
"type": "string",
"format": "at-uri"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["records"],
"properties": {
"records": {
"type": "array",
"items": {
"type": "union",
"refs": [
"tools.ozone.moderation.defs#recordViewDetail",
"tools.ozone.moderation.defs#recordViewNotFound"
]
}
}
}
}
}
}
}
}
43 changes: 43 additions & 0 deletions lexrpc/lexicons/tools/ozone/moderation/getRepos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"lexicon": 1,
"id": "tools.ozone.moderation.getRepos",
"defs": {
"main": {
"type": "query",
"description": "Get details about some repositories.",
"parameters": {
"type": "params",
"required": ["dids"],
"properties": {
"dids": {
"type": "array",
"maxLength": 100,
"items": {
"type": "string",
"format": "did"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["repos"],
"properties": {
"repos": {
"type": "array",
"items": {
"type": "union",
"refs": [
"tools.ozone.moderation.defs#repoViewDetail",
"tools.ozone.moderation.defs#repoViewNotFound"
]
}
}
}
}
}
}
}
}
32 changes: 32 additions & 0 deletions lexrpc/lexicons/tools/ozone/set/addValues.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"lexicon": 1,
"id": "tools.ozone.set.addValues",
"defs": {
"main": {
"type": "procedure",
"description": "Add values to a specific set. Attempting to add values to a set that does not exist will result in an error.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["name", "values"],
"properties": {
"name": {
"type": "string",
"description": "Name of the set to add values to"
},
"values": {
"type": "array",
"minLength": 1,
"maxLength": 1000,
"items": {
"type": "string"
},
"description": "Array of string values to add to the set"
}
}
}
}
}
}
}
49 changes: 49 additions & 0 deletions lexrpc/lexicons/tools/ozone/set/defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"lexicon": 1,
"id": "tools.ozone.set.defs",
"defs": {
"set": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"minLength": 3,
"maxLength": 128
},
"description": {
"type": "string",
"maxGraphemes": 1024,
"maxLength": 10240
}
}
},
"setView": {
"type": "object",
"required": ["name", "setSize", "createdAt", "updatedAt"],
"properties": {
"name": {
"type": "string",
"minLength": 3,
"maxLength": 128
},
"description": {
"type": "string",
"maxGraphemes": 1024,
"maxLength": 10240
},
"setSize": {
"type": "integer"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"updatedAt": {
"type": "string",
"format": "datetime"
}
}
}
}
}
36 changes: 36 additions & 0 deletions lexrpc/lexicons/tools/ozone/set/deleteSet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"lexicon": 1,
"id": "tools.ozone.set.deleteSet",
"defs": {
"main": {
"type": "procedure",
"description": "Delete an entire set. Attempting to delete a set that does not exist will result in an error.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Name of the set to delete"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"properties": {}
}
},
"errors": [
{
"name": "SetNotFound",
"description": "set with the given name does not exist"
}
]
}
}
}
37 changes: 37 additions & 0 deletions lexrpc/lexicons/tools/ozone/set/deleteValues.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"lexicon": 1,
"id": "tools.ozone.set.deleteValues",
"defs": {
"main": {
"type": "procedure",
"description": "Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["name", "values"],
"properties": {
"name": {
"type": "string",
"description": "Name of the set to delete values from"
},
"values": {
"type": "array",
"minLength": 1,
"items": {
"type": "string"
},
"description": "Array of string values to delete from the set"
}
}
}
},
"errors": [
{
"name": "SetNotFound",
"description": "set with the given name does not exist"
}
]
}
}
}
56 changes: 56 additions & 0 deletions lexrpc/lexicons/tools/ozone/set/getValues.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"lexicon": 1,
"id": "tools.ozone.set.getValues",
"defs": {
"main": {
"type": "query",
"description": "Get a specific set and its values",
"parameters": {
"type": "params",
"required": ["name"],
"properties": {
"name": {
"type": "string"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"default": 100
},
"cursor": {
"type": "string"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["set", "values"],
"properties": {
"set": {
"type": "ref",
"ref": "tools.ozone.set.defs#setView"
},
"values": {
"type": "array",
"items": {
"type": "string"
}
},
"cursor": {
"type": "string"
}
}
}
},
"errors": [
{
"name": "SetNotFound",
"description": "set with the given name does not exist"
}
]
}
}
}
57 changes: 57 additions & 0 deletions lexrpc/lexicons/tools/ozone/set/querySets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"lexicon": 1,
"id": "tools.ozone.set.querySets",
"defs": {
"main": {
"type": "query",
"description": "Query available sets",
"parameters": {
"type": "params",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"cursor": {
"type": "string"
},
"namePrefix": {
"type": "string"
},
"sortBy": {
"type": "string",
"enum": ["name", "createdAt", "updatedAt"],
"default": "name"
},
"sortDirection": {
"type": "string",
"default": "asc",
"enum": ["asc", "desc"],
"description": "Defaults to ascending order of name field."
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["sets"],
"properties": {
"sets": {
"type": "array",
"items": {
"type": "ref",
"ref": "tools.ozone.set.defs#setView"
}
},
"cursor": {
"type": "string"
}
}
}
}
}
}
}
24 changes: 24 additions & 0 deletions lexrpc/lexicons/tools/ozone/set/upsertSet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"lexicon": 1,
"id": "tools.ozone.set.upsertSet",
"defs": {
"main": {
"type": "procedure",
"description": "Create or update set metadata",
"input": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "tools.ozone.set.defs#set"
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "tools.ozone.set.defs#setView"
}
}
}
}
}
Loading

0 comments on commit 137e908

Please sign in to comment.