From b7cf05476a9b9d89315dfcd0fa3a585d0ac01cc6 Mon Sep 17 00:00:00 2001 From: bryan newbold Date: Sun, 31 Mar 2024 00:52:37 -0700 Subject: [PATCH] lex: use 'tid' and 'record-key' formats in lexicons --- lexicons/com/atproto/repo/applyWrites.json | 6 +++--- lexicons/com/atproto/repo/createRecord.json | 1 + lexicons/com/atproto/repo/deleteRecord.json | 1 + lexicons/com/atproto/repo/getRecord.json | 6 +++++- lexicons/com/atproto/repo/putRecord.json | 1 + lexicons/com/atproto/sync/getLatestCommit.json | 2 +- lexicons/com/atproto/sync/getRecord.json | 6 +++++- lexicons/com/atproto/sync/getRepo.json | 1 + lexicons/com/atproto/sync/listBlobs.json | 1 + lexicons/com/atproto/sync/listRepos.json | 2 +- lexicons/com/atproto/sync/subscribeRepos.json | 2 ++ 11 files changed, 22 insertions(+), 7 deletions(-) diff --git a/lexicons/com/atproto/repo/applyWrites.json b/lexicons/com/atproto/repo/applyWrites.json index 427fc84c4a5..6ed2427e104 100644 --- a/lexicons/com/atproto/repo/applyWrites.json +++ b/lexicons/com/atproto/repo/applyWrites.json @@ -50,7 +50,7 @@ "required": ["collection", "value"], "properties": { "collection": { "type": "string", "format": "nsid" }, - "rkey": { "type": "string", "maxLength": 15 }, + "rkey": { "type": "string", "maxLength": 15, "format": "record-key" }, "value": { "type": "unknown" } } }, @@ -60,7 +60,7 @@ "required": ["collection", "rkey", "value"], "properties": { "collection": { "type": "string", "format": "nsid" }, - "rkey": { "type": "string" }, + "rkey": { "type": "string", "format": "record-key" }, "value": { "type": "unknown" } } }, @@ -70,7 +70,7 @@ "required": ["collection", "rkey"], "properties": { "collection": { "type": "string", "format": "nsid" }, - "rkey": { "type": "string" } + "rkey": { "type": "string", "format": "record-key" } } } } diff --git a/lexicons/com/atproto/repo/createRecord.json b/lexicons/com/atproto/repo/createRecord.json index 185f5250850..27982d78d28 100644 --- a/lexicons/com/atproto/repo/createRecord.json +++ b/lexicons/com/atproto/repo/createRecord.json @@ -23,6 +23,7 @@ }, "rkey": { "type": "string", + "format": "record-key", "description": "The Record Key.", "maxLength": 15 }, diff --git a/lexicons/com/atproto/repo/deleteRecord.json b/lexicons/com/atproto/repo/deleteRecord.json index 65b9f8f9536..cd18f72b23a 100644 --- a/lexicons/com/atproto/repo/deleteRecord.json +++ b/lexicons/com/atproto/repo/deleteRecord.json @@ -23,6 +23,7 @@ }, "rkey": { "type": "string", + "format": "record-key", "description": "The Record Key." }, "swapRecord": { diff --git a/lexicons/com/atproto/repo/getRecord.json b/lexicons/com/atproto/repo/getRecord.json index 5d8bb173470..4d3ae427da6 100644 --- a/lexicons/com/atproto/repo/getRecord.json +++ b/lexicons/com/atproto/repo/getRecord.json @@ -19,7 +19,11 @@ "format": "nsid", "description": "The NSID of the record collection." }, - "rkey": { "type": "string", "description": "The Record Key." }, + "rkey": { + "type": "string", + "description": "The Record Key.", + "format": "record-key" + }, "cid": { "type": "string", "format": "cid", diff --git a/lexicons/com/atproto/repo/putRecord.json b/lexicons/com/atproto/repo/putRecord.json index 51f11c0f13f..5c411bfcc75 100644 --- a/lexicons/com/atproto/repo/putRecord.json +++ b/lexicons/com/atproto/repo/putRecord.json @@ -24,6 +24,7 @@ }, "rkey": { "type": "string", + "format": "record-key", "description": "The Record Key.", "maxLength": 15 }, diff --git a/lexicons/com/atproto/sync/getLatestCommit.json b/lexicons/com/atproto/sync/getLatestCommit.json index ac7faf57570..b9d2ed70e0d 100644 --- a/lexicons/com/atproto/sync/getLatestCommit.json +++ b/lexicons/com/atproto/sync/getLatestCommit.json @@ -23,7 +23,7 @@ "required": ["cid", "rev"], "properties": { "cid": { "type": "string", "format": "cid" }, - "rev": { "type": "string" } + "rev": { "type": "string", "format": "tid" } } } }, diff --git a/lexicons/com/atproto/sync/getRecord.json b/lexicons/com/atproto/sync/getRecord.json index c2bbbaa7868..c032eede3b0 100644 --- a/lexicons/com/atproto/sync/getRecord.json +++ b/lexicons/com/atproto/sync/getRecord.json @@ -15,7 +15,11 @@ "description": "The DID of the repo." }, "collection": { "type": "string", "format": "nsid" }, - "rkey": { "type": "string", "description": "Record Key" }, + "rkey": { + "type": "string", + "description": "Record Key", + "format": "record-key" + }, "commit": { "type": "string", "format": "cid", diff --git a/lexicons/com/atproto/sync/getRepo.json b/lexicons/com/atproto/sync/getRepo.json index 7fa710abfb5..8296ed55cda 100644 --- a/lexicons/com/atproto/sync/getRepo.json +++ b/lexicons/com/atproto/sync/getRepo.json @@ -16,6 +16,7 @@ }, "since": { "type": "string", + "format": "tid", "description": "The revision ('rev') of the repo to create a diff from." } } diff --git a/lexicons/com/atproto/sync/listBlobs.json b/lexicons/com/atproto/sync/listBlobs.json index b4c954d999a..39e46534fac 100644 --- a/lexicons/com/atproto/sync/listBlobs.json +++ b/lexicons/com/atproto/sync/listBlobs.json @@ -16,6 +16,7 @@ }, "since": { "type": "string", + "format": "tid", "description": "Optional revision of the repo to list blobs since." }, "limit": { diff --git a/lexicons/com/atproto/sync/listRepos.json b/lexicons/com/atproto/sync/listRepos.json index 07ae35e2c5e..f9a6c0de4a7 100644 --- a/lexicons/com/atproto/sync/listRepos.json +++ b/lexicons/com/atproto/sync/listRepos.json @@ -42,7 +42,7 @@ "format": "cid", "description": "Current repo commit CID" }, - "rev": { "type": "string" } + "rev": { "type": "string", "format": "tid" } } } } diff --git a/lexicons/com/atproto/sync/subscribeRepos.json b/lexicons/com/atproto/sync/subscribeRepos.json index 31d68b91c07..ae7c03110ad 100644 --- a/lexicons/com/atproto/sync/subscribeRepos.json +++ b/lexicons/com/atproto/sync/subscribeRepos.json @@ -77,10 +77,12 @@ }, "rev": { "type": "string", + "format": "tid", "description": "The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event." }, "since": { "type": "string", + "format": "tid", "description": "The rev of the last emitted commit from this repo (if any)." }, "blocks": {