kopia lustrzana https://github.com/snarfed/bridgy-fed
61 wiersze
1.7 KiB
JSON
61 wiersze
1.7 KiB
JSON
{
|
|
"lexicon": 1,
|
|
"id": "com.atproto.repo.batchWrite",
|
|
"defs": {
|
|
"main": {
|
|
"type": "procedure",
|
|
"description": "Apply a batch transaction of creates, puts, and deletes.",
|
|
"input": {
|
|
"encoding": "application/json",
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["did", "writes"],
|
|
"properties": {
|
|
"did": {
|
|
"type": "string",
|
|
"description": "The DID of the repo."
|
|
},
|
|
"validate": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Validate the records?"
|
|
},
|
|
"writes": {
|
|
"type": "array",
|
|
"items": {"type": "union", "refs": ["#create", "#update", "#delete"], "closed": true}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"create": {
|
|
"type": "object",
|
|
"required": ["action", "collection", "value"],
|
|
"properties": {
|
|
"action": {"type": "string", "const": "create"},
|
|
"collection": {"type": "string"},
|
|
"rkey": {"type": "string"},
|
|
"value": {"type": "unknown"}
|
|
}
|
|
},
|
|
"update": {
|
|
"type": "object",
|
|
"required": ["action", "collection", "rkey", "value"],
|
|
"properties": {
|
|
"action": {"type": "string", "const": "update"},
|
|
"collection": {"type": "string"},
|
|
"rkey": {"type": "string"},
|
|
"value": {"type": "unknown"}
|
|
}
|
|
},
|
|
"delete": {
|
|
"type": "object",
|
|
"required": ["action", "collection", "rkey"],
|
|
"properties": {
|
|
"action": {"type": "string", "const": "delete"},
|
|
"collection": {"type": "string"},
|
|
"rkey": {"type": "string"}
|
|
}
|
|
}
|
|
}
|
|
} |