add lexicon codegen: vendored lexicons, lex cli and generation scripts

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-08-03 12:06:59 +03:00
parent a2129885c6
commit a3243820c9
311 changed files with 23342 additions and 14 deletions
@@ -0,0 +1,29 @@
{
"id": "app.bsky.notification.declaration",
"defs": {
"main": {
"key": "literal:self",
"type": "record",
"record": {
"type": "object",
"required": [
"allowSubscriptions"
],
"properties": {
"allowSubscriptions": {
"type": "string",
"description": "A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'.",
"knownValues": [
"followers",
"mutuals",
"none"
]
}
}
},
"description": "A declaration of the user's choices related to notifications that can be produced by them."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+175
View File
@@ -0,0 +1,175 @@
{
"id": "app.bsky.notification.defs",
"defs": {
"preference": {
"type": "object",
"required": [
"list",
"push"
],
"properties": {
"list": {
"type": "boolean"
},
"push": {
"type": "boolean"
}
}
},
"preferences": {
"type": "object",
"required": [
"chat",
"follow",
"like",
"likeViaRepost",
"mention",
"quote",
"reply",
"repost",
"repostViaRepost",
"starterpackJoined",
"subscribedPost",
"unverified",
"verified"
],
"properties": {
"chat": {
"ref": "#chatPreference",
"type": "ref",
"description": "Deprecated: use chat.bsky.notification preferences instead. This will only return a default value."
},
"like": {
"ref": "#filterablePreference",
"type": "ref"
},
"quote": {
"ref": "#filterablePreference",
"type": "ref"
},
"reply": {
"ref": "#filterablePreference",
"type": "ref"
},
"follow": {
"ref": "#filterablePreference",
"type": "ref"
},
"repost": {
"ref": "#filterablePreference",
"type": "ref"
},
"mention": {
"ref": "#filterablePreference",
"type": "ref"
},
"verified": {
"ref": "#preference",
"type": "ref"
},
"unverified": {
"ref": "#preference",
"type": "ref"
},
"likeViaRepost": {
"ref": "#filterablePreference",
"type": "ref"
},
"subscribedPost": {
"ref": "#preference",
"type": "ref"
},
"repostViaRepost": {
"ref": "#filterablePreference",
"type": "ref"
},
"starterpackJoined": {
"ref": "#preference",
"type": "ref"
}
}
},
"recordDeleted": {
"type": "object",
"properties": {}
},
"chatPreference": {
"type": "object",
"required": [
"include",
"push"
],
"properties": {
"push": {
"type": "boolean"
},
"include": {
"type": "string",
"knownValues": [
"all",
"accepted"
]
}
},
"description": "Deprecated: use chat.bsky.notification preferences instead. This will only return a default value."
},
"activitySubscription": {
"type": "object",
"required": [
"post",
"reply"
],
"properties": {
"post": {
"type": "boolean"
},
"reply": {
"type": "boolean"
}
}
},
"filterablePreference": {
"type": "object",
"required": [
"include",
"list",
"push"
],
"properties": {
"list": {
"type": "boolean"
},
"push": {
"type": "boolean"
},
"include": {
"type": "string",
"knownValues": [
"all",
"follows"
]
}
}
},
"subjectActivitySubscription": {
"type": "object",
"required": [
"subject",
"activitySubscription"
],
"properties": {
"subject": {
"type": "string",
"format": "did"
},
"activitySubscription": {
"ref": "#activitySubscription",
"type": "ref"
}
},
"description": "Object used to store activity subscription data in stash."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,30 @@
{
"id": "app.bsky.notification.getPreferences",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"preferences"
],
"properties": {
"preferences": {
"ref": "app.bsky.notification.defs#preferences",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {}
},
"description": "Get notification-related preferences for an account. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,37 @@
{
"id": "app.bsky.notification.getUnreadCount",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"count"
],
"properties": {
"count": {
"type": "integer"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"seenAt": {
"type": "string",
"format": "datetime"
},
"priority": {
"type": "boolean"
}
}
},
"description": "Count the number of unread notifications for the requesting account. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,46 @@
{
"id": "app.bsky.notification.listActivitySubscriptions",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"subscriptions"
],
"properties": {
"cursor": {
"type": "string"
},
"subscriptions": {
"type": "array",
"items": {
"ref": "app.bsky.actor.defs#profileView",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"limit": {
"type": "integer",
"default": 50,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
}
}
},
"description": "Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,134 @@
{
"id": "app.bsky.notification.listNotifications",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"notifications"
],
"properties": {
"cursor": {
"type": "string"
},
"seenAt": {
"type": "string",
"format": "datetime"
},
"priority": {
"type": "boolean"
},
"notifications": {
"type": "array",
"items": {
"ref": "#notification",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"limit": {
"type": "integer",
"default": 50,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"seenAt": {
"type": "string",
"format": "datetime"
},
"reasons": {
"type": "array",
"items": {
"type": "string",
"description": "A reason that matches the reason property of #notification."
},
"description": "Notification reasons to include in response."
},
"priority": {
"type": "boolean"
}
}
},
"description": "Enumerate notifications for the requesting account. Requires auth."
},
"notification": {
"type": "object",
"required": [
"uri",
"cid",
"author",
"reason",
"record",
"isRead",
"indexedAt"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"uri": {
"type": "string",
"format": "at-uri"
},
"author": {
"ref": "app.bsky.actor.defs#profileView",
"type": "ref"
},
"isRead": {
"type": "boolean"
},
"labels": {
"type": "array",
"items": {
"ref": "com.atproto.label.defs#label",
"type": "ref"
}
},
"reason": {
"type": "string",
"description": "The reason why this notification was delivered - e.g. your post was liked, or you received a new follower.",
"knownValues": [
"like",
"repost",
"follow",
"mention",
"reply",
"quote",
"starterpack-joined",
"verified",
"unverified",
"like-via-repost",
"repost-via-repost",
"subscribed-post",
"contact-match"
]
},
"record": {
"type": "unknown"
},
"indexedAt": {
"type": "string",
"format": "datetime"
},
"reasonSubject": {
"type": "string",
"format": "at-uri"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,50 @@
{
"id": "app.bsky.notification.putActivitySubscription",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"subject",
"activitySubscription"
],
"properties": {
"subject": {
"type": "string",
"format": "did"
},
"activitySubscription": {
"ref": "app.bsky.notification.defs#activitySubscription",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"type": "object",
"required": [
"subject"
],
"properties": {
"subject": {
"type": "string",
"format": "did"
},
"activitySubscription": {
"ref": "app.bsky.notification.defs#activitySubscription",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,25 @@
{
"id": "app.bsky.notification.putPreferences",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"priority"
],
"properties": {
"priority": {
"type": "boolean"
}
}
},
"encoding": "application/json"
},
"description": "Set notification-related preferences for an account. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,87 @@
{
"id": "app.bsky.notification.putPreferencesV2",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"properties": {
"chat": {
"ref": "app.bsky.notification.defs#chatPreference",
"type": "ref",
"description": "Deprecated: use chat.bsky.notification preferences instead. Setting this won't stick and the default values will be returned."
},
"like": {
"ref": "app.bsky.notification.defs#filterablePreference",
"type": "ref"
},
"quote": {
"ref": "app.bsky.notification.defs#filterablePreference",
"type": "ref"
},
"reply": {
"ref": "app.bsky.notification.defs#filterablePreference",
"type": "ref"
},
"follow": {
"ref": "app.bsky.notification.defs#filterablePreference",
"type": "ref"
},
"repost": {
"ref": "app.bsky.notification.defs#filterablePreference",
"type": "ref"
},
"mention": {
"ref": "app.bsky.notification.defs#filterablePreference",
"type": "ref"
},
"verified": {
"ref": "app.bsky.notification.defs#preference",
"type": "ref"
},
"unverified": {
"ref": "app.bsky.notification.defs#preference",
"type": "ref"
},
"likeViaRepost": {
"ref": "app.bsky.notification.defs#filterablePreference",
"type": "ref"
},
"subscribedPost": {
"ref": "app.bsky.notification.defs#preference",
"type": "ref"
},
"repostViaRepost": {
"ref": "app.bsky.notification.defs#filterablePreference",
"type": "ref"
},
"starterpackJoined": {
"ref": "app.bsky.notification.defs#preference",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"type": "object",
"required": [
"preferences"
],
"properties": {
"preferences": {
"ref": "app.bsky.notification.defs#preferences",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Set notification-related preferences for an account. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,47 @@
{
"id": "app.bsky.notification.registerPush",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"serviceDid",
"token",
"platform",
"appId"
],
"properties": {
"appId": {
"type": "string"
},
"token": {
"type": "string"
},
"platform": {
"type": "string",
"knownValues": [
"ios",
"android",
"web"
]
},
"serviceDid": {
"type": "string",
"format": "did"
},
"ageRestricted": {
"type": "boolean",
"description": "Set to true when the actor is age restricted"
}
}
},
"encoding": "application/json"
},
"description": "Register to receive push notifications, via a specified service, for the requesting account. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,43 @@
{
"id": "app.bsky.notification.unregisterPush",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"serviceDid",
"token",
"platform",
"appId"
],
"properties": {
"appId": {
"type": "string"
},
"token": {
"type": "string"
},
"platform": {
"type": "string",
"knownValues": [
"ios",
"android",
"web"
]
},
"serviceDid": {
"type": "string",
"format": "did"
}
}
},
"encoding": "application/json"
},
"description": "The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,26 @@
{
"id": "app.bsky.notification.updateSeen",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"seenAt"
],
"properties": {
"seenAt": {
"type": "string",
"format": "datetime"
}
}
},
"encoding": "application/json"
},
"description": "Notify server that the requesting account has seen notifications. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}