532681d5c0
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
91 lines
2.5 KiB
JSON
91 lines
2.5 KiB
JSON
{
|
|
"id": "com.atproto.repo.createRecord",
|
|
"defs": {
|
|
"main": {
|
|
"type": "procedure",
|
|
"input": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"repo",
|
|
"collection",
|
|
"record"
|
|
],
|
|
"properties": {
|
|
"repo": {
|
|
"type": "string",
|
|
"format": "at-identifier",
|
|
"description": "The handle or DID of the repo (aka, current account)."
|
|
},
|
|
"rkey": {
|
|
"type": "string",
|
|
"format": "record-key",
|
|
"maxLength": 512,
|
|
"description": "The Record Key."
|
|
},
|
|
"record": {
|
|
"type": "unknown",
|
|
"description": "The record itself. Must contain a $type field."
|
|
},
|
|
"validate": {
|
|
"type": "boolean",
|
|
"description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."
|
|
},
|
|
"collection": {
|
|
"type": "string",
|
|
"format": "nsid",
|
|
"description": "The NSID of the record collection."
|
|
},
|
|
"swapCommit": {
|
|
"type": "string",
|
|
"format": "cid",
|
|
"description": "Compare and swap with the previous commit by CID."
|
|
}
|
|
}
|
|
},
|
|
"encoding": "application/json"
|
|
},
|
|
"errors": [
|
|
{
|
|
"name": "InvalidSwap",
|
|
"description": "Indicates that 'swapCommit' didn't match current repo commit."
|
|
}
|
|
],
|
|
"output": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"uri",
|
|
"cid"
|
|
],
|
|
"properties": {
|
|
"cid": {
|
|
"type": "string",
|
|
"format": "cid"
|
|
},
|
|
"uri": {
|
|
"type": "string",
|
|
"format": "at-uri"
|
|
},
|
|
"commit": {
|
|
"ref": "com.atproto.repo.defs#commitMeta",
|
|
"type": "ref"
|
|
},
|
|
"validationStatus": {
|
|
"type": "string",
|
|
"knownValues": [
|
|
"valid",
|
|
"unknown"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"encoding": "application/json"
|
|
},
|
|
"description": "Create a single new repository record. Requires auth, implemented by PDS."
|
|
}
|
|
},
|
|
"$type": "com.atproto.lexicon.schema",
|
|
"lexicon": 1
|
|
}
|