a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm
101
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: pull latest Bluesky lexicons

Mary 13f8dd9b 7f910ad6

+295 -2
+5
.changeset/five-seas-repeat.md
··· 1 + --- 2 + '@atcute/bluesky': patch 3 + --- 4 + 5 + pull latest Bluesky lexicons
+1 -1
lexdocs/bluesky/README.md
··· 1 - https://github.com/bluesky-social/atproto/tree/97ef116571909c95713017bcd7b621c8afbc90ef/lexicons/ 1 + https://github.com/bluesky-social/atproto/tree/6cd12020657bfb5f87e97cd16e4abb379b64f60b/lexicons/
+19 -1
lexdocs/bluesky/app/bsky/actor/defs.json
··· 129 129 "feedgens": { "type": "integer" }, 130 130 "starterPacks": { "type": "integer" }, 131 131 "labeler": { "type": "boolean" }, 132 - "chat": { "type": "ref", "ref": "#profileAssociatedChat" } 132 + "chat": { "type": "ref", "ref": "#profileAssociatedChat" }, 133 + "activitySubscription": { 134 + "type": "ref", 135 + "ref": "#profileAssociatedActivitySubscription" 136 + } 133 137 } 134 138 }, 135 139 "profileAssociatedChat": { ··· 142 146 } 143 147 } 144 148 }, 149 + "profileAssociatedActivitySubscription": { 150 + "type": "object", 151 + "required": ["allowSubscriptions"], 152 + "properties": { 153 + "allowSubscriptions": { 154 + "type": "string", 155 + "knownValues": ["followers", "mutuals", "none"] 156 + } 157 + } 158 + }, 145 159 "viewerState": { 146 160 "type": "object", 147 161 "description": "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.", ··· 162 176 "knownFollowers": { 163 177 "type": "ref", 164 178 "ref": "#knownFollowers" 179 + }, 180 + "activitySubscription": { 181 + "type": "ref", 182 + "ref": "app.bsky.notification.defs#activitySubscription" 165 183 } 166 184 } 167 185 },
+22
lexdocs/bluesky/app/bsky/notification/declaration.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "app.bsky.notification.declaration", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "description": "A declaration of the user's choices related to notifications that can be produced by them.", 8 + "key": "literal:self", 9 + "record": { 10 + "type": "object", 11 + "required": ["allowSubscriptions"], 12 + "properties": { 13 + "allowSubscriptions": { 14 + "type": "string", 15 + "description": "A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'.", 16 + "knownValues": ["followers", "mutuals", "none"] 17 + } 18 + } 19 + } 20 + } 21 + } 22 + }
+20
lexdocs/bluesky/app/bsky/notification/defs.json
··· 63 63 "unverified": { "type": "ref", "ref": "#preference" }, 64 64 "verified": { "type": "ref", "ref": "#preference" } 65 65 } 66 + }, 67 + "activitySubscription": { 68 + "type": "object", 69 + "required": ["post", "reply"], 70 + "properties": { 71 + "post": { "type": "boolean" }, 72 + "reply": { "type": "boolean" } 73 + } 74 + }, 75 + "subjectActivitySubscription": { 76 + "description": "Object used to store activity subscription data in stash.", 77 + "type": "object", 78 + "required": ["subject", "activitySubscription"], 79 + "properties": { 80 + "subject": { "type": "string", "format": "did" }, 81 + "activitySubscription": { 82 + "type": "ref", 83 + "ref": "#activitySubscription" 84 + } 85 + } 66 86 } 67 87 } 68 88 }
+39
lexdocs/bluesky/app/bsky/notification/listActivitySubscriptions.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "app.bsky.notification.listActivitySubscriptions", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth.", 8 + "parameters": { 9 + "type": "params", 10 + "properties": { 11 + "limit": { 12 + "type": "integer", 13 + "minimum": 1, 14 + "maximum": 100, 15 + "default": 50 16 + }, 17 + "cursor": { "type": "string" } 18 + } 19 + }, 20 + "output": { 21 + "encoding": "application/json", 22 + "schema": { 23 + "type": "object", 24 + "required": ["subscriptions"], 25 + "properties": { 26 + "cursor": { "type": "string" }, 27 + "subscriptions": { 28 + "type": "array", 29 + "items": { 30 + "type": "ref", 31 + "ref": "app.bsky.actor.defs#profileView" 32 + } 33 + } 34 + } 35 + } 36 + } 37 + } 38 + } 39 + }
+38
lexdocs/bluesky/app/bsky/notification/putActivitySubscription.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "app.bsky.notification.putActivitySubscription", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth.", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["subject", "activitySubscription"], 13 + "properties": { 14 + "subject": { "type": "string", "format": "did" }, 15 + "activitySubscription": { 16 + "type": "ref", 17 + "ref": "app.bsky.notification.defs#activitySubscription" 18 + } 19 + } 20 + } 21 + }, 22 + "output": { 23 + "encoding": "application/json", 24 + "schema": { 25 + "type": "object", 26 + "required": ["subject"], 27 + "properties": { 28 + "subject": { "type": "string", "format": "did" }, 29 + "activitySubscription": { 30 + "type": "ref", 31 + "ref": "app.bsky.notification.defs#activitySubscription" 32 + } 33 + } 34 + } 35 + } 36 + } 37 + } 38 + }
+3
packages/definitions/bluesky/lib/lexicons/index.ts
··· 71 71 export * as AppBskyLabelerDefs from './types/app/bsky/labeler/defs.js'; 72 72 export * as AppBskyLabelerGetServices from './types/app/bsky/labeler/getServices.js'; 73 73 export * as AppBskyLabelerService from './types/app/bsky/labeler/service.js'; 74 + export * as AppBskyNotificationDeclaration from './types/app/bsky/notification/declaration.js'; 74 75 export * as AppBskyNotificationDefs from './types/app/bsky/notification/defs.js'; 75 76 export * as AppBskyNotificationGetPreferences from './types/app/bsky/notification/getPreferences.js'; 76 77 export * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notification/getUnreadCount.js'; 78 + export * as AppBskyNotificationListActivitySubscriptions from './types/app/bsky/notification/listActivitySubscriptions.js'; 77 79 export * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications.js'; 80 + export * as AppBskyNotificationPutActivitySubscription from './types/app/bsky/notification/putActivitySubscription.js'; 78 81 export * as AppBskyNotificationPutPreferences from './types/app/bsky/notification/putPreferences.js'; 79 82 export * as AppBskyNotificationPutPreferencesV2 from './types/app/bsky/notification/putPreferencesV2.js'; 80 83 export * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush.js';
+20
packages/definitions/bluesky/lib/lexicons/types/app/bsky/actor/defs.ts
··· 4 4 import * as AppBskyFeedPostgate from '../feed/postgate.js'; 5 5 import * as AppBskyFeedThreadgate from '../feed/threadgate.js'; 6 6 import * as AppBskyGraphDefs from '../graph/defs.js'; 7 + import * as AppBskyNotificationDefs from '../notification/defs.js'; 7 8 import * as ComAtprotoLabelDefs from '@atcute/atproto/types/label/defs'; 8 9 import * as ComAtprotoRepoStrongRef from '@atcute/atproto/types/repo/strongRef'; 9 10 ··· 172 173 }); 173 174 const _profileAssociatedSchema = /*#__PURE__*/ v.object({ 174 175 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.actor.defs#profileAssociated')), 176 + get activitySubscription() { 177 + return /*#__PURE__*/ v.optional(profileAssociatedActivitySubscriptionSchema); 178 + }, 175 179 get chat() { 176 180 return /*#__PURE__*/ v.optional(profileAssociatedChatSchema); 177 181 }, ··· 179 183 labeler: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), 180 184 lists: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 181 185 starterPacks: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 186 + }); 187 + const _profileAssociatedActivitySubscriptionSchema = /*#__PURE__*/ v.object({ 188 + $type: /*#__PURE__*/ v.optional( 189 + /*#__PURE__*/ v.literal('app.bsky.actor.defs#profileAssociatedActivitySubscription'), 190 + ), 191 + allowSubscriptions: /*#__PURE__*/ v.string<'followers' | 'mutuals' | 'none' | (string & {})>(), 182 192 }); 183 193 const _profileAssociatedChatSchema = /*#__PURE__*/ v.object({ 184 194 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.actor.defs#profileAssociatedChat')), ··· 349 359 }); 350 360 const _viewerStateSchema = /*#__PURE__*/ v.object({ 351 361 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.actor.defs#viewerState')), 362 + get activitySubscription() { 363 + return /*#__PURE__*/ v.optional(AppBskyNotificationDefs.activitySubscriptionSchema); 364 + }, 352 365 blockedBy: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), 353 366 blocking: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 354 367 get blockingByList() { ··· 383 396 type postInteractionSettingsPref$schematype = typeof _postInteractionSettingsPrefSchema; 384 397 type preferences$schematype = typeof _preferencesSchema; 385 398 type profileAssociated$schematype = typeof _profileAssociatedSchema; 399 + type profileAssociatedActivitySubscription$schematype = typeof _profileAssociatedActivitySubscriptionSchema; 386 400 type profileAssociatedChat$schematype = typeof _profileAssociatedChatSchema; 387 401 type profileView$schematype = typeof _profileViewSchema; 388 402 type profileViewBasic$schematype = typeof _profileViewBasicSchema; ··· 415 429 export interface postInteractionSettingsPrefSchema extends postInteractionSettingsPref$schematype {} 416 430 export interface preferencesSchema extends preferences$schematype {} 417 431 export interface profileAssociatedSchema extends profileAssociated$schematype {} 432 + export interface profileAssociatedActivitySubscriptionSchema 433 + extends profileAssociatedActivitySubscription$schematype {} 418 434 export interface profileAssociatedChatSchema extends profileAssociatedChat$schematype {} 419 435 export interface profileViewSchema extends profileView$schematype {} 420 436 export interface profileViewBasicSchema extends profileViewBasic$schematype {} ··· 448 464 _postInteractionSettingsPrefSchema as postInteractionSettingsPrefSchema; 449 465 export const preferencesSchema = _preferencesSchema as preferencesSchema; 450 466 export const profileAssociatedSchema = _profileAssociatedSchema as profileAssociatedSchema; 467 + export const profileAssociatedActivitySubscriptionSchema = 468 + _profileAssociatedActivitySubscriptionSchema as profileAssociatedActivitySubscriptionSchema; 451 469 export const profileAssociatedChatSchema = _profileAssociatedChatSchema as profileAssociatedChatSchema; 452 470 export const profileViewSchema = _profileViewSchema as profileViewSchema; 453 471 export const profileViewBasicSchema = _profileViewBasicSchema as profileViewBasicSchema; ··· 480 498 export interface PostInteractionSettingsPref extends v.InferInput<typeof postInteractionSettingsPrefSchema> {} 481 499 export interface Preferences extends v.InferInput<typeof preferencesSchema> {} 482 500 export interface ProfileAssociated extends v.InferInput<typeof profileAssociatedSchema> {} 501 + export interface ProfileAssociatedActivitySubscription 502 + extends v.InferInput<typeof profileAssociatedActivitySubscriptionSchema> {} 483 503 export interface ProfileAssociatedChat extends v.InferInput<typeof profileAssociatedChatSchema> {} 484 504 export interface ProfileView extends v.InferInput<typeof profileViewSchema> {} 485 505 export interface ProfileViewBasic extends v.InferInput<typeof profileViewBasicSchema> {}
+25
packages/definitions/bluesky/lib/lexicons/types/app/bsky/notification/declaration.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + import type {} from '@atcute/lexicons/ambient'; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.literal('self'), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal('app.bsky.notification.declaration'), 9 + allowSubscriptions: /*#__PURE__*/ v.string<'followers' | 'mutuals' | 'none' | (string & {})>(), 10 + }), 11 + ); 12 + 13 + type main$schematype = typeof _mainSchema; 14 + 15 + export interface mainSchema extends main$schematype {} 16 + 17 + export const mainSchema = _mainSchema as mainSchema; 18 + 19 + export interface Main extends v.InferInput<typeof mainSchema> {} 20 + 21 + declare module '@atcute/lexicons/ambient' { 22 + interface Records { 23 + 'app.bsky.notification.declaration': mainSchema; 24 + } 25 + }
+23
packages/definitions/bluesky/lib/lexicons/types/app/bsky/notification/defs.ts
··· 1 1 import type {} from '@atcute/lexicons'; 2 2 import * as v from '@atcute/lexicons/validations'; 3 3 4 + const _activitySubscriptionSchema = /*#__PURE__*/ v.object({ 5 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.notification.defs#activitySubscription')), 6 + post: /*#__PURE__*/ v.boolean(), 7 + reply: /*#__PURE__*/ v.boolean(), 8 + }); 4 9 const _chatPreferenceSchema = /*#__PURE__*/ v.object({ 5 10 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.notification.defs#chatPreference')), 6 11 include: /*#__PURE__*/ v.string<'accepted' | 'all' | (string & {})>(), ··· 62 67 const _recordDeletedSchema = /*#__PURE__*/ v.object({ 63 68 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.notification.defs#recordDeleted')), 64 69 }); 70 + const _subjectActivitySubscriptionSchema = /*#__PURE__*/ v.object({ 71 + $type: /*#__PURE__*/ v.optional( 72 + /*#__PURE__*/ v.literal('app.bsky.notification.defs#subjectActivitySubscription'), 73 + ), 74 + get activitySubscription() { 75 + return activitySubscriptionSchema; 76 + }, 77 + subject: /*#__PURE__*/ v.didString(), 78 + }); 65 79 80 + type activitySubscription$schematype = typeof _activitySubscriptionSchema; 66 81 type chatPreference$schematype = typeof _chatPreferenceSchema; 67 82 type filterablePreference$schematype = typeof _filterablePreferenceSchema; 68 83 type preference$schematype = typeof _preferenceSchema; 69 84 type preferences$schematype = typeof _preferencesSchema; 70 85 type recordDeleted$schematype = typeof _recordDeletedSchema; 86 + type subjectActivitySubscription$schematype = typeof _subjectActivitySubscriptionSchema; 71 87 88 + export interface activitySubscriptionSchema extends activitySubscription$schematype {} 72 89 export interface chatPreferenceSchema extends chatPreference$schematype {} 73 90 export interface filterablePreferenceSchema extends filterablePreference$schematype {} 74 91 export interface preferenceSchema extends preference$schematype {} 75 92 export interface preferencesSchema extends preferences$schematype {} 76 93 export interface recordDeletedSchema extends recordDeleted$schematype {} 94 + export interface subjectActivitySubscriptionSchema extends subjectActivitySubscription$schematype {} 77 95 96 + export const activitySubscriptionSchema = _activitySubscriptionSchema as activitySubscriptionSchema; 78 97 export const chatPreferenceSchema = _chatPreferenceSchema as chatPreferenceSchema; 79 98 export const filterablePreferenceSchema = _filterablePreferenceSchema as filterablePreferenceSchema; 80 99 export const preferenceSchema = _preferenceSchema as preferenceSchema; 81 100 export const preferencesSchema = _preferencesSchema as preferencesSchema; 82 101 export const recordDeletedSchema = _recordDeletedSchema as recordDeletedSchema; 102 + export const subjectActivitySubscriptionSchema = 103 + _subjectActivitySubscriptionSchema as subjectActivitySubscriptionSchema; 83 104 105 + export interface ActivitySubscription extends v.InferInput<typeof activitySubscriptionSchema> {} 84 106 export interface ChatPreference extends v.InferInput<typeof chatPreferenceSchema> {} 85 107 export interface FilterablePreference extends v.InferInput<typeof filterablePreferenceSchema> {} 86 108 export interface Preference extends v.InferInput<typeof preferenceSchema> {} 87 109 export interface Preferences extends v.InferInput<typeof preferencesSchema> {} 88 110 export interface RecordDeleted extends v.InferInput<typeof recordDeletedSchema> {} 111 + export interface SubjectActivitySubscription extends v.InferInput<typeof subjectActivitySubscriptionSchema> {}
+38
packages/definitions/bluesky/lib/lexicons/types/app/bsky/notification/listActivitySubscriptions.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + import type {} from '@atcute/lexicons/ambient'; 4 + import * as AppBskyActorDefs from '../actor/defs.js'; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query('app.bsky.notification.listActivitySubscriptions', { 7 + params: /*#__PURE__*/ v.object({ 8 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 9 + limit: /*#__PURE__*/ v.optional( 10 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(1, 100)]), 11 + 50, 12 + ), 13 + }), 14 + output: { 15 + type: 'lex', 16 + schema: /*#__PURE__*/ v.object({ 17 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 18 + get subscriptions() { 19 + return /*#__PURE__*/ v.array(AppBskyActorDefs.profileViewSchema); 20 + }, 21 + }), 22 + }, 23 + }); 24 + 25 + type main$schematype = typeof _mainSchema; 26 + 27 + export interface mainSchema extends main$schematype {} 28 + 29 + export const mainSchema = _mainSchema as mainSchema; 30 + 31 + export interface $params extends v.InferInput<mainSchema['params']> {} 32 + export interface $output extends v.InferXRPCBodyInput<mainSchema['output']> {} 33 + 34 + declare module '@atcute/lexicons/ambient' { 35 + interface XRPCQueries { 36 + 'app.bsky.notification.listActivitySubscriptions': mainSchema; 37 + } 38 + }
+42
packages/definitions/bluesky/lib/lexicons/types/app/bsky/notification/putActivitySubscription.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + import type {} from '@atcute/lexicons/ambient'; 4 + import * as AppBskyNotificationDefs from './defs.js'; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.procedure('app.bsky.notification.putActivitySubscription', { 7 + params: null, 8 + input: { 9 + type: 'lex', 10 + schema: /*#__PURE__*/ v.object({ 11 + get activitySubscription() { 12 + return AppBskyNotificationDefs.activitySubscriptionSchema; 13 + }, 14 + subject: /*#__PURE__*/ v.didString(), 15 + }), 16 + }, 17 + output: { 18 + type: 'lex', 19 + schema: /*#__PURE__*/ v.object({ 20 + get activitySubscription() { 21 + return /*#__PURE__*/ v.optional(AppBskyNotificationDefs.activitySubscriptionSchema); 22 + }, 23 + subject: /*#__PURE__*/ v.didString(), 24 + }), 25 + }, 26 + }); 27 + 28 + type main$schematype = typeof _mainSchema; 29 + 30 + export interface mainSchema extends main$schematype {} 31 + 32 + export const mainSchema = _mainSchema as mainSchema; 33 + 34 + export interface $params {} 35 + export interface $input extends v.InferXRPCBodyInput<mainSchema['input']> {} 36 + export interface $output extends v.InferXRPCBodyInput<mainSchema['output']> {} 37 + 38 + declare module '@atcute/lexicons/ambient' { 39 + interface XRPCProcedures { 40 + 'app.bsky.notification.putActivitySubscription': mainSchema; 41 + } 42 + }