add @bsky.app/sdk + @atproto/lex, vendor lexicons, codegen via lex cli

This commit is contained in:
Samuel Newman
2026-07-15 16:06:20 +03:00
parent 17c1ee4869
commit 15e232749a
306 changed files with 22544 additions and 2 deletions
@@ -0,0 +1,22 @@
{
"lexicon": 1,
"id": "app.bsky.notification.declaration",
"defs": {
"main": {
"type": "record",
"description": "A declaration of the user's choices related to notifications that can be produced by them.",
"key": "literal:self",
"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"]
}
}
}
}
}
}
+152
View File
@@ -0,0 +1,152 @@
{
"lexicon": 1,
"id": "app.bsky.notification.defs",
"defs": {
"recordDeleted": {
"type": "object",
"properties": {}
},
"chatPreference": {
"type": "object",
"description": "Deprecated: use chat.bsky.notification preferences instead. This will only return a default value.",
"required": ["include", "push"],
"properties": {
"include": {
"type": "string",
"knownValues": ["all", "accepted"]
},
"push": {
"type": "boolean"
}
}
},
"filterablePreference": {
"type": "object",
"required": ["include", "list", "push"],
"properties": {
"include": {
"type": "string",
"knownValues": ["all", "follows"]
},
"list": {
"type": "boolean"
},
"push": {
"type": "boolean"
}
}
},
"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": {
"type": "ref",
"ref": "#chatPreference",
"description": "Deprecated: use chat.bsky.notification preferences instead. This will only return a default value."
},
"follow": {
"type": "ref",
"ref": "#filterablePreference"
},
"like": {
"type": "ref",
"ref": "#filterablePreference"
},
"likeViaRepost": {
"type": "ref",
"ref": "#filterablePreference"
},
"mention": {
"type": "ref",
"ref": "#filterablePreference"
},
"quote": {
"type": "ref",
"ref": "#filterablePreference"
},
"reply": {
"type": "ref",
"ref": "#filterablePreference"
},
"repost": {
"type": "ref",
"ref": "#filterablePreference"
},
"repostViaRepost": {
"type": "ref",
"ref": "#filterablePreference"
},
"starterpackJoined": {
"type": "ref",
"ref": "#preference"
},
"subscribedPost": {
"type": "ref",
"ref": "#preference"
},
"unverified": {
"type": "ref",
"ref": "#preference"
},
"verified": {
"type": "ref",
"ref": "#preference"
}
}
},
"activitySubscription": {
"type": "object",
"required": ["post", "reply"],
"properties": {
"post": {
"type": "boolean"
},
"reply": {
"type": "boolean"
}
}
},
"subjectActivitySubscription": {
"description": "Object used to store activity subscription data in stash.",
"type": "object",
"required": ["subject", "activitySubscription"],
"properties": {
"subject": {
"type": "string",
"format": "did"
},
"activitySubscription": {
"type": "ref",
"ref": "#activitySubscription"
}
}
}
}
}
@@ -0,0 +1,27 @@
{
"lexicon": 1,
"id": "app.bsky.notification.getPreferences",
"defs": {
"main": {
"type": "query",
"description": "Get notification-related preferences for an account. Requires auth.",
"parameters": {
"type": "params",
"properties": {}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["preferences"],
"properties": {
"preferences": {
"type": "ref",
"ref": "app.bsky.notification.defs#preferences"
}
}
}
}
}
}
}
@@ -0,0 +1,34 @@
{
"lexicon": 1,
"id": "app.bsky.notification.getUnreadCount",
"defs": {
"main": {
"type": "query",
"description": "Count the number of unread notifications for the requesting account. Requires auth.",
"parameters": {
"type": "params",
"properties": {
"priority": {
"type": "boolean"
},
"seenAt": {
"type": "string",
"format": "datetime"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["count"],
"properties": {
"count": {
"type": "integer"
}
}
}
}
}
}
}
@@ -0,0 +1,43 @@
{
"lexicon": 1,
"id": "app.bsky.notification.listActivitySubscriptions",
"defs": {
"main": {
"type": "query",
"description": "Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth.",
"parameters": {
"type": "params",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"cursor": {
"type": "string"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["subscriptions"],
"properties": {
"cursor": {
"type": "string"
},
"subscriptions": {
"type": "array",
"items": {
"type": "ref",
"ref": "app.bsky.actor.defs#profileView"
}
}
}
}
}
}
}
}
@@ -0,0 +1,131 @@
{
"lexicon": 1,
"id": "app.bsky.notification.listNotifications",
"defs": {
"main": {
"type": "query",
"description": "Enumerate notifications for the requesting account. Requires auth.",
"parameters": {
"type": "params",
"properties": {
"reasons": {
"description": "Notification reasons to include in response.",
"type": "array",
"items": {
"type": "string",
"description": "A reason that matches the reason property of #notification."
}
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"priority": {
"type": "boolean"
},
"cursor": {
"type": "string"
},
"seenAt": {
"type": "string",
"format": "datetime"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["notifications"],
"properties": {
"cursor": {
"type": "string"
},
"notifications": {
"type": "array",
"items": {
"type": "ref",
"ref": "#notification"
}
},
"priority": {
"type": "boolean"
},
"seenAt": {
"type": "string",
"format": "datetime"
}
}
}
}
},
"notification": {
"type": "object",
"required": [
"uri",
"cid",
"author",
"reason",
"record",
"isRead",
"indexedAt"
],
"properties": {
"uri": {
"type": "string",
"format": "at-uri"
},
"cid": {
"type": "string",
"format": "cid"
},
"author": {
"type": "ref",
"ref": "app.bsky.actor.defs#profileView"
},
"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"
]
},
"reasonSubject": {
"type": "string",
"format": "at-uri"
},
"record": {
"type": "unknown"
},
"isRead": {
"type": "boolean"
},
"indexedAt": {
"type": "string",
"format": "datetime"
},
"labels": {
"type": "array",
"items": {
"type": "ref",
"ref": "com.atproto.label.defs#label"
}
}
}
}
}
}
@@ -0,0 +1,44 @@
{
"lexicon": 1,
"id": "app.bsky.notification.putActivitySubscription",
"defs": {
"main": {
"type": "procedure",
"description": "Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["subject", "activitySubscription"],
"properties": {
"subject": {
"type": "string",
"format": "did"
},
"activitySubscription": {
"type": "ref",
"ref": "app.bsky.notification.defs#activitySubscription"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["subject"],
"properties": {
"subject": {
"type": "string",
"format": "did"
},
"activitySubscription": {
"type": "ref",
"ref": "app.bsky.notification.defs#activitySubscription"
}
}
}
}
}
}
}
@@ -0,0 +1,22 @@
{
"lexicon": 1,
"id": "app.bsky.notification.putPreferences",
"defs": {
"main": {
"type": "procedure",
"description": "Set notification-related preferences for an account. Requires auth.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["priority"],
"properties": {
"priority": {
"type": "boolean"
}
}
}
}
}
}
}
@@ -0,0 +1,84 @@
{
"lexicon": 1,
"id": "app.bsky.notification.putPreferencesV2",
"defs": {
"main": {
"type": "procedure",
"description": "Set notification-related preferences for an account. Requires auth.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"properties": {
"chat": {
"type": "ref",
"ref": "app.bsky.notification.defs#chatPreference",
"description": "Deprecated: use chat.bsky.notification preferences instead. Setting this won't stick and the default values will be returned."
},
"follow": {
"type": "ref",
"ref": "app.bsky.notification.defs#filterablePreference"
},
"like": {
"type": "ref",
"ref": "app.bsky.notification.defs#filterablePreference"
},
"likeViaRepost": {
"type": "ref",
"ref": "app.bsky.notification.defs#filterablePreference"
},
"mention": {
"type": "ref",
"ref": "app.bsky.notification.defs#filterablePreference"
},
"quote": {
"type": "ref",
"ref": "app.bsky.notification.defs#filterablePreference"
},
"reply": {
"type": "ref",
"ref": "app.bsky.notification.defs#filterablePreference"
},
"repost": {
"type": "ref",
"ref": "app.bsky.notification.defs#filterablePreference"
},
"repostViaRepost": {
"type": "ref",
"ref": "app.bsky.notification.defs#filterablePreference"
},
"starterpackJoined": {
"type": "ref",
"ref": "app.bsky.notification.defs#preference"
},
"subscribedPost": {
"type": "ref",
"ref": "app.bsky.notification.defs#preference"
},
"unverified": {
"type": "ref",
"ref": "app.bsky.notification.defs#preference"
},
"verified": {
"type": "ref",
"ref": "app.bsky.notification.defs#preference"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["preferences"],
"properties": {
"preferences": {
"type": "ref",
"ref": "app.bsky.notification.defs#preferences"
}
}
}
}
}
}
}
@@ -0,0 +1,37 @@
{
"lexicon": 1,
"id": "app.bsky.notification.registerPush",
"defs": {
"main": {
"type": "procedure",
"description": "Register to receive push notifications, via a specified service, for the requesting account. Requires auth.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["serviceDid", "token", "platform", "appId"],
"properties": {
"serviceDid": {
"type": "string",
"format": "did"
},
"token": {
"type": "string"
},
"platform": {
"type": "string",
"knownValues": ["ios", "android", "web"]
},
"appId": {
"type": "string"
},
"ageRestricted": {
"type": "boolean",
"description": "Set to true when the actor is age restricted"
}
}
}
}
}
}
}
@@ -0,0 +1,33 @@
{
"lexicon": 1,
"id": "app.bsky.notification.unregisterPush",
"defs": {
"main": {
"type": "procedure",
"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.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["serviceDid", "token", "platform", "appId"],
"properties": {
"serviceDid": {
"type": "string",
"format": "did"
},
"token": {
"type": "string"
},
"platform": {
"type": "string",
"knownValues": ["ios", "android", "web"]
},
"appId": {
"type": "string"
}
}
}
}
}
}
}
@@ -0,0 +1,23 @@
{
"lexicon": 1,
"id": "app.bsky.notification.updateSeen",
"defs": {
"main": {
"type": "procedure",
"description": "Notify server that the requesting account has seen notifications. Requires auth.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["seenAt"],
"properties": {
"seenAt": {
"type": "string",
"format": "datetime"
}
}
}
}
}
}
}