From ca83fcbde6b7c8c4ab6dd5e04d30d96fedf2689f Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Fri, 21 Mar 2025 19:53:08 -0700 Subject: [PATCH 1/3] lexicon, make anilist an nsid key --- lexicons/me/woach/content/anilist.json | 1 + 1 file changed, 1 insertion(+) diff --git a/lexicons/me/woach/content/anilist.json b/lexicons/me/woach/content/anilist.json index f1f9be1..06b6ab9 100644 --- a/lexicons/me/woach/content/anilist.json +++ b/lexicons/me/woach/content/anilist.json @@ -5,6 +5,7 @@ "main": { "type": "object", "required": ["id"], + "key": "nsid", "properties": { "id": { "type": "integer" } } From 69f0fd921ad3fcc95eedb6c6e8ccb007091e2127 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Fri, 21 Mar 2025 19:53:45 -0700 Subject: [PATCH 2/3] lexicon, session: use strongRef instead of union --- lexicons/me/woach/feed/session.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lexicons/me/woach/feed/session.json b/lexicons/me/woach/feed/session.json index 40ddeb8..a7979c7 100644 --- a/lexicons/me/woach/feed/session.json +++ b/lexicons/me/woach/feed/session.json @@ -10,12 +10,7 @@ "type": "object", "required": ["content", "createdAt"], "properties": { - "content": { - "type": "union", - "refs": [ - "me.woach.content.anilist" - ] - }, + "content": { "type": "ref", "ref": "com.atproto.repo.strongRef" }, "label": { "type": "string", "maxGraphemes": 64, From 90fa6148a5e48ee6b95ddfe74eb3818dfef71528 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Fri, 21 Mar 2025 19:54:05 -0700 Subject: [PATCH 3/3] lexicon, add atproto media storage --- lexicons/me/woach/content/media.json | 50 ++++++++++++++++++++++++++++ lexicons/me/woach/content/title.json | 26 +++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 lexicons/me/woach/content/media.json create mode 100644 lexicons/me/woach/content/title.json diff --git a/lexicons/me/woach/content/media.json b/lexicons/me/woach/content/media.json new file mode 100644 index 0000000..0ea082a --- /dev/null +++ b/lexicons/me/woach/content/media.json @@ -0,0 +1,50 @@ +{ + "lexicon": 1, + "id": "me.woach.content.media", + "defs": { + "main": { + "type": "object", + "key": "nsid", + "required": [ "titles", "durationData", "lastUpdated" ], + "properties": { + "titles": { + "type": "array", + "minLength": 1, + "items": { + "type": "ref", + "ref": "me.woach.content.title" + } + }, + "durationData": { + "type": "union", + "refs": [ + "me.woach.content.media#television", + "me.woach.content.media#book" + ] + }, + "posterImage": { + "type": "blob", + "accept": ["image/png", "image/jpeg"], + "maxSize": 1000000 + }, + "lastUpdated": { + "type": "string", + "format": "datetime", + "description": "Client-declared timestamp for when this activity was last updated" + } + } + }, + "television": { + "type": "object", + "properties": { + "episodes": { "type": "integer", "minimum": 0} + } + }, + "book": { + "type": "object", + "properties": { + "chapters": { "type": "integer", "minimum": 0} + } + } + } +} diff --git a/lexicons/me/woach/content/title.json b/lexicons/me/woach/content/title.json new file mode 100644 index 0000000..0394b9f --- /dev/null +++ b/lexicons/me/woach/content/title.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "me.woach.content.title", + "defs": { + "main": { + "type": "object", + "properties": { + "language": { + "type": "string", + "knownValues": [ + "me.woach.content.title#romanization", + "me.woach.content.title#english", + "me.woach.content.title#native" + ] + }, + "value": { "type": "string", "minLength": 1 } + } + }, + "romanization": { "type": "token", + "description": "Romanization of the native title" }, + "english": { "type": "token", + "description": "English translation or title" }, + "native": { "type": "token", + "description": "Native title" } + } +}