@atproto/bsky 0.0.161 → 0.0.163
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/lexicon/index.d.ts +6 -2
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +12 -4
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +390 -82
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +199 -42
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +9 -0
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js +9 -0
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/declaration.d.ts +13 -0
- package/dist/lexicon/types/app/bsky/notification/declaration.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/notification/declaration.js +16 -0
- package/dist/lexicon/types/app/bsky/notification/declaration.js.map +1 -0
- package/dist/lexicon/types/app/bsky/notification/defs.d.ts +15 -0
- package/dist/lexicon/types/app/bsky/notification/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/defs.js +18 -0
- package/dist/lexicon/types/app/bsky/notification/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/listActivitySubscriptions.d.ts +38 -0
- package/dist/lexicon/types/app/bsky/notification/listActivitySubscriptions.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/notification/listActivitySubscriptions.js +7 -0
- package/dist/lexicon/types/app/bsky/notification/listActivitySubscriptions.js.map +1 -0
- package/dist/lexicon/types/app/bsky/notification/putActivitySubscription.d.ts +42 -0
- package/dist/lexicon/types/app/bsky/notification/putActivitySubscription.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/notification/putActivitySubscription.js +7 -0
- package/dist/lexicon/types/app/bsky/notification/putActivitySubscription.js.map +1 -0
- package/package.json +6 -6
- package/src/lexicon/index.ts +35 -9
- package/src/lexicon/lexicons.ts +207 -43
- package/src/lexicon/types/app/bsky/actor/defs.ts +23 -0
- package/src/lexicon/types/app/bsky/notification/declaration.ts +32 -0
- package/src/lexicon/types/app/bsky/notification/defs.ts +37 -0
- package/src/lexicon/types/app/bsky/notification/listActivitySubscriptions.ts +56 -0
- package/src/lexicon/types/app/bsky/notification/putActivitySubscription.ts +59 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -4732,6 +4732,10 @@ export const schemaDict = {
|
|
|
4732
4732
|
type: 'ref',
|
|
4733
4733
|
ref: 'lex:app.bsky.actor.defs#profileAssociatedChat',
|
|
4734
4734
|
},
|
|
4735
|
+
activitySubscription: {
|
|
4736
|
+
type: 'ref',
|
|
4737
|
+
ref: 'lex:app.bsky.actor.defs#profileAssociatedActivitySubscription',
|
|
4738
|
+
},
|
|
4735
4739
|
},
|
|
4736
4740
|
},
|
|
4737
4741
|
profileAssociatedChat: {
|
|
@@ -4744,6 +4748,16 @@ export const schemaDict = {
|
|
|
4744
4748
|
},
|
|
4745
4749
|
},
|
|
4746
4750
|
},
|
|
4751
|
+
profileAssociatedActivitySubscription: {
|
|
4752
|
+
type: 'object',
|
|
4753
|
+
required: ['allowSubscriptions'],
|
|
4754
|
+
properties: {
|
|
4755
|
+
allowSubscriptions: {
|
|
4756
|
+
type: 'string',
|
|
4757
|
+
knownValues: ['followers', 'mutuals', 'none'],
|
|
4758
|
+
},
|
|
4759
|
+
},
|
|
4760
|
+
},
|
|
4747
4761
|
viewerState: {
|
|
4748
4762
|
type: 'object',
|
|
4749
4763
|
description:
|
|
@@ -4779,6 +4793,10 @@ export const schemaDict = {
|
|
|
4779
4793
|
type: 'ref',
|
|
4780
4794
|
ref: 'lex:app.bsky.actor.defs#knownFollowers',
|
|
4781
4795
|
},
|
|
4796
|
+
activitySubscription: {
|
|
4797
|
+
type: 'ref',
|
|
4798
|
+
ref: 'lex:app.bsky.notification.defs#activitySubscription',
|
|
4799
|
+
},
|
|
4782
4800
|
},
|
|
4783
4801
|
},
|
|
4784
4802
|
knownFollowers: {
|
|
@@ -7239,48 +7257,6 @@ export const schemaDict = {
|
|
|
7239
7257
|
},
|
|
7240
7258
|
},
|
|
7241
7259
|
},
|
|
7242
|
-
AppBskyFeedGetPosts: {
|
|
7243
|
-
lexicon: 1,
|
|
7244
|
-
id: 'app.bsky.feed.getPosts',
|
|
7245
|
-
defs: {
|
|
7246
|
-
main: {
|
|
7247
|
-
type: 'query',
|
|
7248
|
-
description:
|
|
7249
|
-
"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
|
|
7250
|
-
parameters: {
|
|
7251
|
-
type: 'params',
|
|
7252
|
-
required: ['uris'],
|
|
7253
|
-
properties: {
|
|
7254
|
-
uris: {
|
|
7255
|
-
type: 'array',
|
|
7256
|
-
description: 'List of post AT-URIs to return hydrated views for.',
|
|
7257
|
-
items: {
|
|
7258
|
-
type: 'string',
|
|
7259
|
-
format: 'at-uri',
|
|
7260
|
-
},
|
|
7261
|
-
maxLength: 25,
|
|
7262
|
-
},
|
|
7263
|
-
},
|
|
7264
|
-
},
|
|
7265
|
-
output: {
|
|
7266
|
-
encoding: 'application/json',
|
|
7267
|
-
schema: {
|
|
7268
|
-
type: 'object',
|
|
7269
|
-
required: ['posts'],
|
|
7270
|
-
properties: {
|
|
7271
|
-
posts: {
|
|
7272
|
-
type: 'array',
|
|
7273
|
-
items: {
|
|
7274
|
-
type: 'ref',
|
|
7275
|
-
ref: 'lex:app.bsky.feed.defs#postView',
|
|
7276
|
-
},
|
|
7277
|
-
},
|
|
7278
|
-
},
|
|
7279
|
-
},
|
|
7280
|
-
},
|
|
7281
|
-
},
|
|
7282
|
-
},
|
|
7283
|
-
},
|
|
7284
7260
|
AppBskyFeedGetPostThread: {
|
|
7285
7261
|
lexicon: 1,
|
|
7286
7262
|
id: 'app.bsky.feed.getPostThread',
|
|
@@ -7345,6 +7321,48 @@ export const schemaDict = {
|
|
|
7345
7321
|
},
|
|
7346
7322
|
},
|
|
7347
7323
|
},
|
|
7324
|
+
AppBskyFeedGetPosts: {
|
|
7325
|
+
lexicon: 1,
|
|
7326
|
+
id: 'app.bsky.feed.getPosts',
|
|
7327
|
+
defs: {
|
|
7328
|
+
main: {
|
|
7329
|
+
type: 'query',
|
|
7330
|
+
description:
|
|
7331
|
+
"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",
|
|
7332
|
+
parameters: {
|
|
7333
|
+
type: 'params',
|
|
7334
|
+
required: ['uris'],
|
|
7335
|
+
properties: {
|
|
7336
|
+
uris: {
|
|
7337
|
+
type: 'array',
|
|
7338
|
+
description: 'List of post AT-URIs to return hydrated views for.',
|
|
7339
|
+
items: {
|
|
7340
|
+
type: 'string',
|
|
7341
|
+
format: 'at-uri',
|
|
7342
|
+
},
|
|
7343
|
+
maxLength: 25,
|
|
7344
|
+
},
|
|
7345
|
+
},
|
|
7346
|
+
},
|
|
7347
|
+
output: {
|
|
7348
|
+
encoding: 'application/json',
|
|
7349
|
+
schema: {
|
|
7350
|
+
type: 'object',
|
|
7351
|
+
required: ['posts'],
|
|
7352
|
+
properties: {
|
|
7353
|
+
posts: {
|
|
7354
|
+
type: 'array',
|
|
7355
|
+
items: {
|
|
7356
|
+
type: 'ref',
|
|
7357
|
+
ref: 'lex:app.bsky.feed.defs#postView',
|
|
7358
|
+
},
|
|
7359
|
+
},
|
|
7360
|
+
},
|
|
7361
|
+
},
|
|
7362
|
+
},
|
|
7363
|
+
},
|
|
7364
|
+
},
|
|
7365
|
+
},
|
|
7348
7366
|
AppBskyFeedGetQuotes: {
|
|
7349
7367
|
lexicon: 1,
|
|
7350
7368
|
id: 'app.bsky.feed.getQuotes',
|
|
@@ -9724,6 +9742,30 @@ export const schemaDict = {
|
|
|
9724
9742
|
},
|
|
9725
9743
|
},
|
|
9726
9744
|
},
|
|
9745
|
+
AppBskyNotificationDeclaration: {
|
|
9746
|
+
lexicon: 1,
|
|
9747
|
+
id: 'app.bsky.notification.declaration',
|
|
9748
|
+
defs: {
|
|
9749
|
+
main: {
|
|
9750
|
+
type: 'record',
|
|
9751
|
+
description:
|
|
9752
|
+
"A declaration of the user's choices related to notifications that can be produced by them.",
|
|
9753
|
+
key: 'literal:self',
|
|
9754
|
+
record: {
|
|
9755
|
+
type: 'object',
|
|
9756
|
+
required: ['allowSubscriptions'],
|
|
9757
|
+
properties: {
|
|
9758
|
+
allowSubscriptions: {
|
|
9759
|
+
type: 'string',
|
|
9760
|
+
description:
|
|
9761
|
+
"A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'.",
|
|
9762
|
+
knownValues: ['followers', 'mutuals', 'none'],
|
|
9763
|
+
},
|
|
9764
|
+
},
|
|
9765
|
+
},
|
|
9766
|
+
},
|
|
9767
|
+
},
|
|
9768
|
+
},
|
|
9727
9769
|
AppBskyNotificationDefs: {
|
|
9728
9770
|
lexicon: 1,
|
|
9729
9771
|
id: 'app.bsky.notification.defs',
|
|
@@ -9845,6 +9887,34 @@ export const schemaDict = {
|
|
|
9845
9887
|
},
|
|
9846
9888
|
},
|
|
9847
9889
|
},
|
|
9890
|
+
activitySubscription: {
|
|
9891
|
+
type: 'object',
|
|
9892
|
+
required: ['post', 'reply'],
|
|
9893
|
+
properties: {
|
|
9894
|
+
post: {
|
|
9895
|
+
type: 'boolean',
|
|
9896
|
+
},
|
|
9897
|
+
reply: {
|
|
9898
|
+
type: 'boolean',
|
|
9899
|
+
},
|
|
9900
|
+
},
|
|
9901
|
+
},
|
|
9902
|
+
subjectActivitySubscription: {
|
|
9903
|
+
description:
|
|
9904
|
+
'Object used to store activity subscription data in stash.',
|
|
9905
|
+
type: 'object',
|
|
9906
|
+
required: ['subject', 'activitySubscription'],
|
|
9907
|
+
properties: {
|
|
9908
|
+
subject: {
|
|
9909
|
+
type: 'string',
|
|
9910
|
+
format: 'did',
|
|
9911
|
+
},
|
|
9912
|
+
activitySubscription: {
|
|
9913
|
+
type: 'ref',
|
|
9914
|
+
ref: 'lex:app.bsky.notification.defs#activitySubscription',
|
|
9915
|
+
},
|
|
9916
|
+
},
|
|
9917
|
+
},
|
|
9848
9918
|
},
|
|
9849
9919
|
},
|
|
9850
9920
|
AppBskyNotificationGetPreferences: {
|
|
@@ -9910,6 +9980,50 @@ export const schemaDict = {
|
|
|
9910
9980
|
},
|
|
9911
9981
|
},
|
|
9912
9982
|
},
|
|
9983
|
+
AppBskyNotificationListActivitySubscriptions: {
|
|
9984
|
+
lexicon: 1,
|
|
9985
|
+
id: 'app.bsky.notification.listActivitySubscriptions',
|
|
9986
|
+
defs: {
|
|
9987
|
+
main: {
|
|
9988
|
+
type: 'query',
|
|
9989
|
+
description:
|
|
9990
|
+
'Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth.',
|
|
9991
|
+
parameters: {
|
|
9992
|
+
type: 'params',
|
|
9993
|
+
properties: {
|
|
9994
|
+
limit: {
|
|
9995
|
+
type: 'integer',
|
|
9996
|
+
minimum: 1,
|
|
9997
|
+
maximum: 100,
|
|
9998
|
+
default: 50,
|
|
9999
|
+
},
|
|
10000
|
+
cursor: {
|
|
10001
|
+
type: 'string',
|
|
10002
|
+
},
|
|
10003
|
+
},
|
|
10004
|
+
},
|
|
10005
|
+
output: {
|
|
10006
|
+
encoding: 'application/json',
|
|
10007
|
+
schema: {
|
|
10008
|
+
type: 'object',
|
|
10009
|
+
required: ['subscriptions'],
|
|
10010
|
+
properties: {
|
|
10011
|
+
cursor: {
|
|
10012
|
+
type: 'string',
|
|
10013
|
+
},
|
|
10014
|
+
subscriptions: {
|
|
10015
|
+
type: 'array',
|
|
10016
|
+
items: {
|
|
10017
|
+
type: 'ref',
|
|
10018
|
+
ref: 'lex:app.bsky.actor.defs#profileView',
|
|
10019
|
+
},
|
|
10020
|
+
},
|
|
10021
|
+
},
|
|
10022
|
+
},
|
|
10023
|
+
},
|
|
10024
|
+
},
|
|
10025
|
+
},
|
|
10026
|
+
},
|
|
9913
10027
|
AppBskyNotificationListNotifications: {
|
|
9914
10028
|
lexicon: 1,
|
|
9915
10029
|
id: 'app.bsky.notification.listNotifications',
|
|
@@ -10042,6 +10156,51 @@ export const schemaDict = {
|
|
|
10042
10156
|
},
|
|
10043
10157
|
},
|
|
10044
10158
|
},
|
|
10159
|
+
AppBskyNotificationPutActivitySubscription: {
|
|
10160
|
+
lexicon: 1,
|
|
10161
|
+
id: 'app.bsky.notification.putActivitySubscription',
|
|
10162
|
+
defs: {
|
|
10163
|
+
main: {
|
|
10164
|
+
type: 'procedure',
|
|
10165
|
+
description:
|
|
10166
|
+
'Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth.',
|
|
10167
|
+
input: {
|
|
10168
|
+
encoding: 'application/json',
|
|
10169
|
+
schema: {
|
|
10170
|
+
type: 'object',
|
|
10171
|
+
required: ['subject', 'activitySubscription'],
|
|
10172
|
+
properties: {
|
|
10173
|
+
subject: {
|
|
10174
|
+
type: 'string',
|
|
10175
|
+
format: 'did',
|
|
10176
|
+
},
|
|
10177
|
+
activitySubscription: {
|
|
10178
|
+
type: 'ref',
|
|
10179
|
+
ref: 'lex:app.bsky.notification.defs#activitySubscription',
|
|
10180
|
+
},
|
|
10181
|
+
},
|
|
10182
|
+
},
|
|
10183
|
+
},
|
|
10184
|
+
output: {
|
|
10185
|
+
encoding: 'application/json',
|
|
10186
|
+
schema: {
|
|
10187
|
+
type: 'object',
|
|
10188
|
+
required: ['subject'],
|
|
10189
|
+
properties: {
|
|
10190
|
+
subject: {
|
|
10191
|
+
type: 'string',
|
|
10192
|
+
format: 'did',
|
|
10193
|
+
},
|
|
10194
|
+
activitySubscription: {
|
|
10195
|
+
type: 'ref',
|
|
10196
|
+
ref: 'lex:app.bsky.notification.defs#activitySubscription',
|
|
10197
|
+
},
|
|
10198
|
+
},
|
|
10199
|
+
},
|
|
10200
|
+
},
|
|
10201
|
+
},
|
|
10202
|
+
},
|
|
10203
|
+
},
|
|
10045
10204
|
AppBskyNotificationPutPreferences: {
|
|
10046
10205
|
lexicon: 1,
|
|
10047
10206
|
id: 'app.bsky.notification.putPreferences',
|
|
@@ -13117,8 +13276,8 @@ export const ids = {
|
|
|
13117
13276
|
AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
|
|
13118
13277
|
AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
|
|
13119
13278
|
AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed',
|
|
13120
|
-
AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
|
|
13121
13279
|
AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
|
|
13280
|
+
AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
|
|
13122
13281
|
AppBskyFeedGetQuotes: 'app.bsky.feed.getQuotes',
|
|
13123
13282
|
AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy',
|
|
13124
13283
|
AppBskyFeedGetSuggestedFeeds: 'app.bsky.feed.getSuggestedFeeds',
|
|
@@ -13163,11 +13322,16 @@ export const ids = {
|
|
|
13163
13322
|
AppBskyLabelerDefs: 'app.bsky.labeler.defs',
|
|
13164
13323
|
AppBskyLabelerGetServices: 'app.bsky.labeler.getServices',
|
|
13165
13324
|
AppBskyLabelerService: 'app.bsky.labeler.service',
|
|
13325
|
+
AppBskyNotificationDeclaration: 'app.bsky.notification.declaration',
|
|
13166
13326
|
AppBskyNotificationDefs: 'app.bsky.notification.defs',
|
|
13167
13327
|
AppBskyNotificationGetPreferences: 'app.bsky.notification.getPreferences',
|
|
13168
13328
|
AppBskyNotificationGetUnreadCount: 'app.bsky.notification.getUnreadCount',
|
|
13329
|
+
AppBskyNotificationListActivitySubscriptions:
|
|
13330
|
+
'app.bsky.notification.listActivitySubscriptions',
|
|
13169
13331
|
AppBskyNotificationListNotifications:
|
|
13170
13332
|
'app.bsky.notification.listNotifications',
|
|
13333
|
+
AppBskyNotificationPutActivitySubscription:
|
|
13334
|
+
'app.bsky.notification.putActivitySubscription',
|
|
13171
13335
|
AppBskyNotificationPutPreferences: 'app.bsky.notification.putPreferences',
|
|
13172
13336
|
AppBskyNotificationPutPreferencesV2: 'app.bsky.notification.putPreferencesV2',
|
|
13173
13337
|
AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush',
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
|
|
13
13
|
import type * as AppBskyGraphDefs from '../graph/defs.js'
|
|
14
14
|
import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
|
|
15
|
+
import type * as AppBskyNotificationDefs from '../notification/defs.js'
|
|
15
16
|
import type * as AppBskyFeedThreadgate from '../feed/threadgate.js'
|
|
16
17
|
import type * as AppBskyFeedPostgate from '../feed/postgate.js'
|
|
17
18
|
import type * as AppBskyEmbedExternal from '../embed/external.js'
|
|
@@ -109,6 +110,7 @@ export interface ProfileAssociated {
|
|
|
109
110
|
starterPacks?: number
|
|
110
111
|
labeler?: boolean
|
|
111
112
|
chat?: ProfileAssociatedChat
|
|
113
|
+
activitySubscription?: ProfileAssociatedActivitySubscription
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
const hashProfileAssociated = 'profileAssociated'
|
|
@@ -136,6 +138,26 @@ export function validateProfileAssociatedChat<V>(v: V) {
|
|
|
136
138
|
return validate<ProfileAssociatedChat & V>(v, id, hashProfileAssociatedChat)
|
|
137
139
|
}
|
|
138
140
|
|
|
141
|
+
export interface ProfileAssociatedActivitySubscription {
|
|
142
|
+
$type?: 'app.bsky.actor.defs#profileAssociatedActivitySubscription'
|
|
143
|
+
allowSubscriptions: 'followers' | 'mutuals' | 'none' | (string & {})
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const hashProfileAssociatedActivitySubscription =
|
|
147
|
+
'profileAssociatedActivitySubscription'
|
|
148
|
+
|
|
149
|
+
export function isProfileAssociatedActivitySubscription<V>(v: V) {
|
|
150
|
+
return is$typed(v, id, hashProfileAssociatedActivitySubscription)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function validateProfileAssociatedActivitySubscription<V>(v: V) {
|
|
154
|
+
return validate<ProfileAssociatedActivitySubscription & V>(
|
|
155
|
+
v,
|
|
156
|
+
id,
|
|
157
|
+
hashProfileAssociatedActivitySubscription,
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
|
|
139
161
|
/** Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. */
|
|
140
162
|
export interface ViewerState {
|
|
141
163
|
$type?: 'app.bsky.actor.defs#viewerState'
|
|
@@ -147,6 +169,7 @@ export interface ViewerState {
|
|
|
147
169
|
following?: string
|
|
148
170
|
followedBy?: string
|
|
149
171
|
knownFollowers?: KnownFollowers
|
|
172
|
+
activitySubscription?: AppBskyNotificationDefs.ActivitySubscription
|
|
150
173
|
}
|
|
151
174
|
|
|
152
175
|
const hashViewerState = 'viewerState'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { CID } from 'multiformats/cid'
|
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
7
|
+
import {
|
|
8
|
+
type $Typed,
|
|
9
|
+
is$typed as _is$typed,
|
|
10
|
+
type OmitKey,
|
|
11
|
+
} from '../../../../util'
|
|
12
|
+
|
|
13
|
+
const is$typed = _is$typed,
|
|
14
|
+
validate = _validate
|
|
15
|
+
const id = 'app.bsky.notification.declaration'
|
|
16
|
+
|
|
17
|
+
export interface Record {
|
|
18
|
+
$type: 'app.bsky.notification.declaration'
|
|
19
|
+
/** A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'. */
|
|
20
|
+
allowSubscriptions: 'followers' | 'mutuals' | 'none' | (string & {})
|
|
21
|
+
[k: string]: unknown
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const hashRecord = 'main'
|
|
25
|
+
|
|
26
|
+
export function isRecord<V>(v: V) {
|
|
27
|
+
return is$typed(v, id, hashRecord)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function validateRecord<V>(v: V) {
|
|
31
|
+
return validate<Record & V>(v, id, hashRecord, true)
|
|
32
|
+
}
|
|
@@ -103,3 +103,40 @@ export function isPreferences<V>(v: V) {
|
|
|
103
103
|
export function validatePreferences<V>(v: V) {
|
|
104
104
|
return validate<Preferences & V>(v, id, hashPreferences)
|
|
105
105
|
}
|
|
106
|
+
|
|
107
|
+
export interface ActivitySubscription {
|
|
108
|
+
$type?: 'app.bsky.notification.defs#activitySubscription'
|
|
109
|
+
post: boolean
|
|
110
|
+
reply: boolean
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const hashActivitySubscription = 'activitySubscription'
|
|
114
|
+
|
|
115
|
+
export function isActivitySubscription<V>(v: V) {
|
|
116
|
+
return is$typed(v, id, hashActivitySubscription)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function validateActivitySubscription<V>(v: V) {
|
|
120
|
+
return validate<ActivitySubscription & V>(v, id, hashActivitySubscription)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** Object used to store activity subscription data in stash. */
|
|
124
|
+
export interface SubjectActivitySubscription {
|
|
125
|
+
$type?: 'app.bsky.notification.defs#subjectActivitySubscription'
|
|
126
|
+
subject: string
|
|
127
|
+
activitySubscription: ActivitySubscription
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const hashSubjectActivitySubscription = 'subjectActivitySubscription'
|
|
131
|
+
|
|
132
|
+
export function isSubjectActivitySubscription<V>(v: V) {
|
|
133
|
+
return is$typed(v, id, hashSubjectActivitySubscription)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function validateSubjectActivitySubscription<V>(v: V) {
|
|
137
|
+
return validate<SubjectActivitySubscription & V>(
|
|
138
|
+
v,
|
|
139
|
+
id,
|
|
140
|
+
hashSubjectActivitySubscription,
|
|
141
|
+
)
|
|
142
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { CID } from 'multiformats/cid'
|
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
8
|
+
import {
|
|
9
|
+
type $Typed,
|
|
10
|
+
is$typed as _is$typed,
|
|
11
|
+
type OmitKey,
|
|
12
|
+
} from '../../../../util'
|
|
13
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
14
|
+
import type * as AppBskyActorDefs from '../actor/defs.js'
|
|
15
|
+
|
|
16
|
+
const is$typed = _is$typed,
|
|
17
|
+
validate = _validate
|
|
18
|
+
const id = 'app.bsky.notification.listActivitySubscriptions'
|
|
19
|
+
|
|
20
|
+
export interface QueryParams {
|
|
21
|
+
limit: number
|
|
22
|
+
cursor?: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type InputSchema = undefined
|
|
26
|
+
|
|
27
|
+
export interface OutputSchema {
|
|
28
|
+
cursor?: string
|
|
29
|
+
subscriptions: AppBskyActorDefs.ProfileView[]
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type HandlerInput = undefined
|
|
33
|
+
|
|
34
|
+
export interface HandlerSuccess {
|
|
35
|
+
encoding: 'application/json'
|
|
36
|
+
body: OutputSchema
|
|
37
|
+
headers?: { [key: string]: string }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface HandlerError {
|
|
41
|
+
status: number
|
|
42
|
+
message?: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
46
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
47
|
+
auth: HA
|
|
48
|
+
params: QueryParams
|
|
49
|
+
input: HandlerInput
|
|
50
|
+
req: express.Request
|
|
51
|
+
res: express.Response
|
|
52
|
+
resetRouteRateLimits: () => Promise<void>
|
|
53
|
+
}
|
|
54
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
55
|
+
ctx: HandlerReqCtx<HA>,
|
|
56
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { CID } from 'multiformats/cid'
|
|
7
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
8
|
+
import {
|
|
9
|
+
type $Typed,
|
|
10
|
+
is$typed as _is$typed,
|
|
11
|
+
type OmitKey,
|
|
12
|
+
} from '../../../../util'
|
|
13
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
14
|
+
import type * as AppBskyNotificationDefs from './defs.js'
|
|
15
|
+
|
|
16
|
+
const is$typed = _is$typed,
|
|
17
|
+
validate = _validate
|
|
18
|
+
const id = 'app.bsky.notification.putActivitySubscription'
|
|
19
|
+
|
|
20
|
+
export interface QueryParams {}
|
|
21
|
+
|
|
22
|
+
export interface InputSchema {
|
|
23
|
+
subject: string
|
|
24
|
+
activitySubscription: AppBskyNotificationDefs.ActivitySubscription
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface OutputSchema {
|
|
28
|
+
subject: string
|
|
29
|
+
activitySubscription?: AppBskyNotificationDefs.ActivitySubscription
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface HandlerInput {
|
|
33
|
+
encoding: 'application/json'
|
|
34
|
+
body: InputSchema
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface HandlerSuccess {
|
|
38
|
+
encoding: 'application/json'
|
|
39
|
+
body: OutputSchema
|
|
40
|
+
headers?: { [key: string]: string }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface HandlerError {
|
|
44
|
+
status: number
|
|
45
|
+
message?: string
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
49
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
50
|
+
auth: HA
|
|
51
|
+
params: QueryParams
|
|
52
|
+
input: HandlerInput
|
|
53
|
+
req: express.Request
|
|
54
|
+
res: express.Response
|
|
55
|
+
resetRouteRateLimits: () => Promise<void>
|
|
56
|
+
}
|
|
57
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
58
|
+
ctx: HandlerReqCtx<HA>,
|
|
59
|
+
) => Promise<HandlerOutput> | HandlerOutput
|