@atproto/api 0.3.5 → 0.3.6
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/package.json +1 -1
- package/src/client/index.ts +143 -0
- package/src/client/lexicons.ts +463 -7
- package/src/client/types/app/bsky/actor/defs.ts +19 -0
- package/src/client/types/app/bsky/embed/record.ts +2 -0
- package/src/client/types/app/bsky/feed/defs.ts +90 -2
- package/src/client/types/app/bsky/feed/describeFeedGenerator.ts +70 -0
- package/src/client/types/app/bsky/feed/generator.ts +31 -0
- package/src/client/types/app/bsky/feed/getActorFeeds.ts +39 -0
- package/src/client/types/app/bsky/feed/getFeed.ts +46 -0
- package/src/client/types/app/bsky/feed/getFeedGenerator.ts +38 -0
- package/src/client/types/app/bsky/feed/getFeedGenerators.ts +36 -0
- package/src/client/types/app/bsky/feed/getFeedSkeleton.ts +46 -0
package/package.json
CHANGED
package/src/client/index.ts
CHANGED
|
@@ -84,7 +84,14 @@ import * as AppBskyEmbedImages from './types/app/bsky/embed/images'
|
|
|
84
84
|
import * as AppBskyEmbedRecord from './types/app/bsky/embed/record'
|
|
85
85
|
import * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia'
|
|
86
86
|
import * as AppBskyFeedDefs from './types/app/bsky/feed/defs'
|
|
87
|
+
import * as AppBskyFeedDescribeFeedGenerator from './types/app/bsky/feed/describeFeedGenerator'
|
|
88
|
+
import * as AppBskyFeedGenerator from './types/app/bsky/feed/generator'
|
|
89
|
+
import * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds'
|
|
87
90
|
import * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed'
|
|
91
|
+
import * as AppBskyFeedGetFeed from './types/app/bsky/feed/getFeed'
|
|
92
|
+
import * as AppBskyFeedGetFeedGenerator from './types/app/bsky/feed/getFeedGenerator'
|
|
93
|
+
import * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGenerators'
|
|
94
|
+
import * as AppBskyFeedGetFeedSkeleton from './types/app/bsky/feed/getFeedSkeleton'
|
|
88
95
|
import * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes'
|
|
89
96
|
import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread'
|
|
90
97
|
import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts'
|
|
@@ -192,7 +199,14 @@ export * as AppBskyEmbedImages from './types/app/bsky/embed/images'
|
|
|
192
199
|
export * as AppBskyEmbedRecord from './types/app/bsky/embed/record'
|
|
193
200
|
export * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia'
|
|
194
201
|
export * as AppBskyFeedDefs from './types/app/bsky/feed/defs'
|
|
202
|
+
export * as AppBskyFeedDescribeFeedGenerator from './types/app/bsky/feed/describeFeedGenerator'
|
|
203
|
+
export * as AppBskyFeedGenerator from './types/app/bsky/feed/generator'
|
|
204
|
+
export * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds'
|
|
195
205
|
export * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed'
|
|
206
|
+
export * as AppBskyFeedGetFeed from './types/app/bsky/feed/getFeed'
|
|
207
|
+
export * as AppBskyFeedGetFeedGenerator from './types/app/bsky/feed/getFeedGenerator'
|
|
208
|
+
export * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGenerators'
|
|
209
|
+
export * as AppBskyFeedGetFeedSkeleton from './types/app/bsky/feed/getFeedSkeleton'
|
|
196
210
|
export * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes'
|
|
197
211
|
export * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread'
|
|
198
212
|
export * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts'
|
|
@@ -1165,17 +1179,41 @@ export class EmbedNS {
|
|
|
1165
1179
|
|
|
1166
1180
|
export class FeedNS {
|
|
1167
1181
|
_service: AtpServiceClient
|
|
1182
|
+
generator: GeneratorRecord
|
|
1168
1183
|
like: LikeRecord
|
|
1169
1184
|
post: PostRecord
|
|
1170
1185
|
repost: RepostRecord
|
|
1171
1186
|
|
|
1172
1187
|
constructor(service: AtpServiceClient) {
|
|
1173
1188
|
this._service = service
|
|
1189
|
+
this.generator = new GeneratorRecord(service)
|
|
1174
1190
|
this.like = new LikeRecord(service)
|
|
1175
1191
|
this.post = new PostRecord(service)
|
|
1176
1192
|
this.repost = new RepostRecord(service)
|
|
1177
1193
|
}
|
|
1178
1194
|
|
|
1195
|
+
describeFeedGenerator(
|
|
1196
|
+
params?: AppBskyFeedDescribeFeedGenerator.QueryParams,
|
|
1197
|
+
opts?: AppBskyFeedDescribeFeedGenerator.CallOptions,
|
|
1198
|
+
): Promise<AppBskyFeedDescribeFeedGenerator.Response> {
|
|
1199
|
+
return this._service.xrpc
|
|
1200
|
+
.call('app.bsky.feed.describeFeedGenerator', params, undefined, opts)
|
|
1201
|
+
.catch((e) => {
|
|
1202
|
+
throw AppBskyFeedDescribeFeedGenerator.toKnownErr(e)
|
|
1203
|
+
})
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
getActorFeeds(
|
|
1207
|
+
params?: AppBskyFeedGetActorFeeds.QueryParams,
|
|
1208
|
+
opts?: AppBskyFeedGetActorFeeds.CallOptions,
|
|
1209
|
+
): Promise<AppBskyFeedGetActorFeeds.Response> {
|
|
1210
|
+
return this._service.xrpc
|
|
1211
|
+
.call('app.bsky.feed.getActorFeeds', params, undefined, opts)
|
|
1212
|
+
.catch((e) => {
|
|
1213
|
+
throw AppBskyFeedGetActorFeeds.toKnownErr(e)
|
|
1214
|
+
})
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1179
1217
|
getAuthorFeed(
|
|
1180
1218
|
params?: AppBskyFeedGetAuthorFeed.QueryParams,
|
|
1181
1219
|
opts?: AppBskyFeedGetAuthorFeed.CallOptions,
|
|
@@ -1187,6 +1225,50 @@ export class FeedNS {
|
|
|
1187
1225
|
})
|
|
1188
1226
|
}
|
|
1189
1227
|
|
|
1228
|
+
getFeed(
|
|
1229
|
+
params?: AppBskyFeedGetFeed.QueryParams,
|
|
1230
|
+
opts?: AppBskyFeedGetFeed.CallOptions,
|
|
1231
|
+
): Promise<AppBskyFeedGetFeed.Response> {
|
|
1232
|
+
return this._service.xrpc
|
|
1233
|
+
.call('app.bsky.feed.getFeed', params, undefined, opts)
|
|
1234
|
+
.catch((e) => {
|
|
1235
|
+
throw AppBskyFeedGetFeed.toKnownErr(e)
|
|
1236
|
+
})
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
getFeedGenerator(
|
|
1240
|
+
params?: AppBskyFeedGetFeedGenerator.QueryParams,
|
|
1241
|
+
opts?: AppBskyFeedGetFeedGenerator.CallOptions,
|
|
1242
|
+
): Promise<AppBskyFeedGetFeedGenerator.Response> {
|
|
1243
|
+
return this._service.xrpc
|
|
1244
|
+
.call('app.bsky.feed.getFeedGenerator', params, undefined, opts)
|
|
1245
|
+
.catch((e) => {
|
|
1246
|
+
throw AppBskyFeedGetFeedGenerator.toKnownErr(e)
|
|
1247
|
+
})
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
getFeedGenerators(
|
|
1251
|
+
params?: AppBskyFeedGetFeedGenerators.QueryParams,
|
|
1252
|
+
opts?: AppBskyFeedGetFeedGenerators.CallOptions,
|
|
1253
|
+
): Promise<AppBskyFeedGetFeedGenerators.Response> {
|
|
1254
|
+
return this._service.xrpc
|
|
1255
|
+
.call('app.bsky.feed.getFeedGenerators', params, undefined, opts)
|
|
1256
|
+
.catch((e) => {
|
|
1257
|
+
throw AppBskyFeedGetFeedGenerators.toKnownErr(e)
|
|
1258
|
+
})
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
getFeedSkeleton(
|
|
1262
|
+
params?: AppBskyFeedGetFeedSkeleton.QueryParams,
|
|
1263
|
+
opts?: AppBskyFeedGetFeedSkeleton.CallOptions,
|
|
1264
|
+
): Promise<AppBskyFeedGetFeedSkeleton.Response> {
|
|
1265
|
+
return this._service.xrpc
|
|
1266
|
+
.call('app.bsky.feed.getFeedSkeleton', params, undefined, opts)
|
|
1267
|
+
.catch((e) => {
|
|
1268
|
+
throw AppBskyFeedGetFeedSkeleton.toKnownErr(e)
|
|
1269
|
+
})
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1190
1272
|
getLikes(
|
|
1191
1273
|
params?: AppBskyFeedGetLikes.QueryParams,
|
|
1192
1274
|
opts?: AppBskyFeedGetLikes.CallOptions,
|
|
@@ -1243,6 +1325,67 @@ export class FeedNS {
|
|
|
1243
1325
|
}
|
|
1244
1326
|
}
|
|
1245
1327
|
|
|
1328
|
+
export class GeneratorRecord {
|
|
1329
|
+
_service: AtpServiceClient
|
|
1330
|
+
|
|
1331
|
+
constructor(service: AtpServiceClient) {
|
|
1332
|
+
this._service = service
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
async list(
|
|
1336
|
+
params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
|
|
1337
|
+
): Promise<{
|
|
1338
|
+
cursor?: string
|
|
1339
|
+
records: { uri: string; value: AppBskyFeedGenerator.Record }[]
|
|
1340
|
+
}> {
|
|
1341
|
+
const res = await this._service.xrpc.call('com.atproto.repo.listRecords', {
|
|
1342
|
+
collection: 'app.bsky.feed.generator',
|
|
1343
|
+
...params,
|
|
1344
|
+
})
|
|
1345
|
+
return res.data
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
async get(
|
|
1349
|
+
params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
|
|
1350
|
+
): Promise<{ uri: string; cid: string; value: AppBskyFeedGenerator.Record }> {
|
|
1351
|
+
const res = await this._service.xrpc.call('com.atproto.repo.getRecord', {
|
|
1352
|
+
collection: 'app.bsky.feed.generator',
|
|
1353
|
+
...params,
|
|
1354
|
+
})
|
|
1355
|
+
return res.data
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
async create(
|
|
1359
|
+
params: Omit<
|
|
1360
|
+
ComAtprotoRepoCreateRecord.InputSchema,
|
|
1361
|
+
'collection' | 'record'
|
|
1362
|
+
>,
|
|
1363
|
+
record: AppBskyFeedGenerator.Record,
|
|
1364
|
+
headers?: Record<string, string>,
|
|
1365
|
+
): Promise<{ uri: string; cid: string }> {
|
|
1366
|
+
record.$type = 'app.bsky.feed.generator'
|
|
1367
|
+
const res = await this._service.xrpc.call(
|
|
1368
|
+
'com.atproto.repo.createRecord',
|
|
1369
|
+
undefined,
|
|
1370
|
+
{ collection: 'app.bsky.feed.generator', ...params, record },
|
|
1371
|
+
{ encoding: 'application/json', headers },
|
|
1372
|
+
)
|
|
1373
|
+
return res.data
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
async delete(
|
|
1377
|
+
params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
|
|
1378
|
+
headers?: Record<string, string>,
|
|
1379
|
+
): Promise<void> {
|
|
1380
|
+
await this._service.xrpc.call(
|
|
1381
|
+
'com.atproto.repo.deleteRecord',
|
|
1382
|
+
undefined,
|
|
1383
|
+
{ collection: 'app.bsky.feed.generator', ...params },
|
|
1384
|
+
{ headers },
|
|
1385
|
+
)
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1246
1389
|
export class LikeRecord {
|
|
1247
1390
|
_service: AtpServiceClient
|
|
1248
1391
|
|
package/src/client/lexicons.ts
CHANGED
|
@@ -1619,7 +1619,6 @@ export const schemaDict = {
|
|
|
1619
1619
|
},
|
|
1620
1620
|
rkey: {
|
|
1621
1621
|
type: 'string',
|
|
1622
|
-
maxLength: 15,
|
|
1623
1622
|
},
|
|
1624
1623
|
value: {
|
|
1625
1624
|
type: 'unknown',
|
|
@@ -1685,7 +1684,6 @@ export const schemaDict = {
|
|
|
1685
1684
|
rkey: {
|
|
1686
1685
|
type: 'string',
|
|
1687
1686
|
description: 'The key of the record.',
|
|
1688
|
-
maxLength: 15,
|
|
1689
1687
|
},
|
|
1690
1688
|
validate: {
|
|
1691
1689
|
type: 'boolean',
|
|
@@ -2007,7 +2005,6 @@ export const schemaDict = {
|
|
|
2007
2005
|
rkey: {
|
|
2008
2006
|
type: 'string',
|
|
2009
2007
|
description: 'The key of the record.',
|
|
2010
|
-
maxLength: 15,
|
|
2011
2008
|
},
|
|
2012
2009
|
validate: {
|
|
2013
2010
|
type: 'boolean',
|
|
@@ -3572,6 +3569,7 @@ export const schemaDict = {
|
|
|
3572
3569
|
refs: [
|
|
3573
3570
|
'lex:app.bsky.actor.defs#adultContentPref',
|
|
3574
3571
|
'lex:app.bsky.actor.defs#contentLabelPref',
|
|
3572
|
+
'lex:app.bsky.actor.defs#savedFeedsPref',
|
|
3575
3573
|
],
|
|
3576
3574
|
},
|
|
3577
3575
|
},
|
|
@@ -3598,6 +3596,26 @@ export const schemaDict = {
|
|
|
3598
3596
|
},
|
|
3599
3597
|
},
|
|
3600
3598
|
},
|
|
3599
|
+
savedFeedsPref: {
|
|
3600
|
+
type: 'object',
|
|
3601
|
+
required: ['pinned', 'saved'],
|
|
3602
|
+
properties: {
|
|
3603
|
+
pinned: {
|
|
3604
|
+
type: 'array',
|
|
3605
|
+
items: {
|
|
3606
|
+
type: 'string',
|
|
3607
|
+
format: 'at-uri',
|
|
3608
|
+
},
|
|
3609
|
+
},
|
|
3610
|
+
saved: {
|
|
3611
|
+
type: 'array',
|
|
3612
|
+
items: {
|
|
3613
|
+
type: 'string',
|
|
3614
|
+
format: 'at-uri',
|
|
3615
|
+
},
|
|
3616
|
+
},
|
|
3617
|
+
},
|
|
3618
|
+
},
|
|
3601
3619
|
},
|
|
3602
3620
|
},
|
|
3603
3621
|
AppBskyActorGetPreferences: {
|
|
@@ -4038,6 +4056,7 @@ export const schemaDict = {
|
|
|
4038
4056
|
'lex:app.bsky.embed.record#viewRecord',
|
|
4039
4057
|
'lex:app.bsky.embed.record#viewNotFound',
|
|
4040
4058
|
'lex:app.bsky.embed.record#viewBlocked',
|
|
4059
|
+
'lex:app.bsky.feed.defs#generatorView',
|
|
4041
4060
|
],
|
|
4042
4061
|
},
|
|
4043
4062
|
},
|
|
@@ -4241,12 +4260,20 @@ export const schemaDict = {
|
|
|
4241
4260
|
required: ['root', 'parent'],
|
|
4242
4261
|
properties: {
|
|
4243
4262
|
root: {
|
|
4244
|
-
type: '
|
|
4245
|
-
|
|
4263
|
+
type: 'union',
|
|
4264
|
+
refs: [
|
|
4265
|
+
'lex:app.bsky.feed.defs#postView',
|
|
4266
|
+
'lex:app.bsky.feed.defs#notFoundPost',
|
|
4267
|
+
'lex:app.bsky.feed.defs#blockedPost',
|
|
4268
|
+
],
|
|
4246
4269
|
},
|
|
4247
4270
|
parent: {
|
|
4248
|
-
type: '
|
|
4249
|
-
|
|
4271
|
+
type: 'union',
|
|
4272
|
+
refs: [
|
|
4273
|
+
'lex:app.bsky.feed.defs#postView',
|
|
4274
|
+
'lex:app.bsky.feed.defs#notFoundPost',
|
|
4275
|
+
'lex:app.bsky.feed.defs#blockedPost',
|
|
4276
|
+
],
|
|
4250
4277
|
},
|
|
4251
4278
|
},
|
|
4252
4279
|
},
|
|
@@ -4321,6 +4348,242 @@ export const schemaDict = {
|
|
|
4321
4348
|
},
|
|
4322
4349
|
},
|
|
4323
4350
|
},
|
|
4351
|
+
generatorView: {
|
|
4352
|
+
type: 'object',
|
|
4353
|
+
required: ['uri', 'cid', 'creator', 'displayName', 'indexedAt'],
|
|
4354
|
+
properties: {
|
|
4355
|
+
uri: {
|
|
4356
|
+
type: 'string',
|
|
4357
|
+
format: 'at-uri',
|
|
4358
|
+
},
|
|
4359
|
+
cid: {
|
|
4360
|
+
type: 'string',
|
|
4361
|
+
format: 'cid',
|
|
4362
|
+
},
|
|
4363
|
+
did: {
|
|
4364
|
+
type: 'string',
|
|
4365
|
+
format: 'did',
|
|
4366
|
+
},
|
|
4367
|
+
creator: {
|
|
4368
|
+
type: 'ref',
|
|
4369
|
+
ref: 'lex:app.bsky.actor.defs#profileView',
|
|
4370
|
+
},
|
|
4371
|
+
displayName: {
|
|
4372
|
+
type: 'string',
|
|
4373
|
+
},
|
|
4374
|
+
description: {
|
|
4375
|
+
type: 'string',
|
|
4376
|
+
maxGraphemes: 300,
|
|
4377
|
+
maxLength: 3000,
|
|
4378
|
+
},
|
|
4379
|
+
descriptionFacets: {
|
|
4380
|
+
type: 'array',
|
|
4381
|
+
items: {
|
|
4382
|
+
type: 'ref',
|
|
4383
|
+
ref: 'lex:app.bsky.richtext.facet',
|
|
4384
|
+
},
|
|
4385
|
+
},
|
|
4386
|
+
avatar: {
|
|
4387
|
+
type: 'string',
|
|
4388
|
+
},
|
|
4389
|
+
likeCount: {
|
|
4390
|
+
type: 'integer',
|
|
4391
|
+
minimum: 0,
|
|
4392
|
+
},
|
|
4393
|
+
viewer: {
|
|
4394
|
+
type: 'ref',
|
|
4395
|
+
ref: 'lex:app.bsky.feed.defs#generatorViewerState',
|
|
4396
|
+
},
|
|
4397
|
+
indexedAt: {
|
|
4398
|
+
type: 'string',
|
|
4399
|
+
format: 'datetime',
|
|
4400
|
+
},
|
|
4401
|
+
},
|
|
4402
|
+
},
|
|
4403
|
+
generatorViewerState: {
|
|
4404
|
+
type: 'object',
|
|
4405
|
+
properties: {
|
|
4406
|
+
like: {
|
|
4407
|
+
type: 'string',
|
|
4408
|
+
format: 'at-uri',
|
|
4409
|
+
},
|
|
4410
|
+
},
|
|
4411
|
+
},
|
|
4412
|
+
skeletonFeedPost: {
|
|
4413
|
+
type: 'object',
|
|
4414
|
+
required: ['post'],
|
|
4415
|
+
properties: {
|
|
4416
|
+
post: {
|
|
4417
|
+
type: 'string',
|
|
4418
|
+
format: 'at-uri',
|
|
4419
|
+
},
|
|
4420
|
+
reason: {
|
|
4421
|
+
type: 'union',
|
|
4422
|
+
refs: ['lex:app.bsky.feed.defs#skeletonReasonRepost'],
|
|
4423
|
+
},
|
|
4424
|
+
},
|
|
4425
|
+
},
|
|
4426
|
+
skeletonReasonRepost: {
|
|
4427
|
+
type: 'object',
|
|
4428
|
+
required: ['repost'],
|
|
4429
|
+
properties: {
|
|
4430
|
+
repost: {
|
|
4431
|
+
type: 'string',
|
|
4432
|
+
ref: 'at-uri',
|
|
4433
|
+
},
|
|
4434
|
+
},
|
|
4435
|
+
},
|
|
4436
|
+
},
|
|
4437
|
+
},
|
|
4438
|
+
AppBskyFeedDescribeFeedGenerator: {
|
|
4439
|
+
lexicon: 1,
|
|
4440
|
+
id: 'app.bsky.feed.describeFeedGenerator',
|
|
4441
|
+
defs: {
|
|
4442
|
+
main: {
|
|
4443
|
+
type: 'query',
|
|
4444
|
+
description:
|
|
4445
|
+
'Returns information about a given feed generator including TOS & offered feed URIs',
|
|
4446
|
+
output: {
|
|
4447
|
+
encoding: 'application/json',
|
|
4448
|
+
schema: {
|
|
4449
|
+
type: 'object',
|
|
4450
|
+
required: ['did', 'feeds'],
|
|
4451
|
+
properties: {
|
|
4452
|
+
did: {
|
|
4453
|
+
type: 'string',
|
|
4454
|
+
format: 'did',
|
|
4455
|
+
},
|
|
4456
|
+
feeds: {
|
|
4457
|
+
type: 'array',
|
|
4458
|
+
items: {
|
|
4459
|
+
type: 'ref',
|
|
4460
|
+
ref: 'lex:app.bsky.feed.describeFeedGenerator#feed',
|
|
4461
|
+
},
|
|
4462
|
+
},
|
|
4463
|
+
links: {
|
|
4464
|
+
type: 'ref',
|
|
4465
|
+
ref: 'lex:app.bsky.feed.describeFeedGenerator#links',
|
|
4466
|
+
},
|
|
4467
|
+
},
|
|
4468
|
+
},
|
|
4469
|
+
},
|
|
4470
|
+
},
|
|
4471
|
+
feed: {
|
|
4472
|
+
type: 'object',
|
|
4473
|
+
required: ['uri'],
|
|
4474
|
+
properties: {
|
|
4475
|
+
uri: {
|
|
4476
|
+
type: 'string',
|
|
4477
|
+
format: 'at-uri',
|
|
4478
|
+
},
|
|
4479
|
+
},
|
|
4480
|
+
},
|
|
4481
|
+
links: {
|
|
4482
|
+
type: 'object',
|
|
4483
|
+
properties: {
|
|
4484
|
+
privacyPolicy: {
|
|
4485
|
+
type: 'string',
|
|
4486
|
+
},
|
|
4487
|
+
termsOfService: {
|
|
4488
|
+
type: 'string',
|
|
4489
|
+
},
|
|
4490
|
+
},
|
|
4491
|
+
},
|
|
4492
|
+
},
|
|
4493
|
+
},
|
|
4494
|
+
AppBskyFeedGenerator: {
|
|
4495
|
+
lexicon: 1,
|
|
4496
|
+
id: 'app.bsky.feed.generator',
|
|
4497
|
+
defs: {
|
|
4498
|
+
main: {
|
|
4499
|
+
type: 'record',
|
|
4500
|
+
description: 'A declaration of the existence of a feed generator',
|
|
4501
|
+
key: 'any',
|
|
4502
|
+
record: {
|
|
4503
|
+
type: 'object',
|
|
4504
|
+
required: ['did', 'displayName', 'createdAt'],
|
|
4505
|
+
properties: {
|
|
4506
|
+
did: {
|
|
4507
|
+
type: 'string',
|
|
4508
|
+
format: 'did',
|
|
4509
|
+
},
|
|
4510
|
+
displayName: {
|
|
4511
|
+
type: 'string',
|
|
4512
|
+
maxGraphemes: 24,
|
|
4513
|
+
maxLength: 240,
|
|
4514
|
+
},
|
|
4515
|
+
description: {
|
|
4516
|
+
type: 'string',
|
|
4517
|
+
maxGraphemes: 300,
|
|
4518
|
+
maxLength: 3000,
|
|
4519
|
+
},
|
|
4520
|
+
descriptionFacets: {
|
|
4521
|
+
type: 'array',
|
|
4522
|
+
items: {
|
|
4523
|
+
type: 'ref',
|
|
4524
|
+
ref: 'lex:app.bsky.richtext.facet',
|
|
4525
|
+
},
|
|
4526
|
+
},
|
|
4527
|
+
avatar: {
|
|
4528
|
+
type: 'blob',
|
|
4529
|
+
accept: ['image/png', 'image/jpeg'],
|
|
4530
|
+
maxSize: 1000000,
|
|
4531
|
+
},
|
|
4532
|
+
createdAt: {
|
|
4533
|
+
type: 'string',
|
|
4534
|
+
format: 'datetime',
|
|
4535
|
+
},
|
|
4536
|
+
},
|
|
4537
|
+
},
|
|
4538
|
+
},
|
|
4539
|
+
},
|
|
4540
|
+
},
|
|
4541
|
+
AppBskyFeedGetActorFeeds: {
|
|
4542
|
+
lexicon: 1,
|
|
4543
|
+
id: 'app.bsky.feed.getActorFeeds',
|
|
4544
|
+
defs: {
|
|
4545
|
+
main: {
|
|
4546
|
+
type: 'query',
|
|
4547
|
+
description: 'Retrieve a list of feeds created by a given actor',
|
|
4548
|
+
parameters: {
|
|
4549
|
+
type: 'params',
|
|
4550
|
+
required: ['actor'],
|
|
4551
|
+
properties: {
|
|
4552
|
+
actor: {
|
|
4553
|
+
type: 'string',
|
|
4554
|
+
format: 'at-identifier',
|
|
4555
|
+
},
|
|
4556
|
+
limit: {
|
|
4557
|
+
type: 'integer',
|
|
4558
|
+
minimum: 1,
|
|
4559
|
+
maximum: 100,
|
|
4560
|
+
default: 50,
|
|
4561
|
+
},
|
|
4562
|
+
cursor: {
|
|
4563
|
+
type: 'string',
|
|
4564
|
+
},
|
|
4565
|
+
},
|
|
4566
|
+
},
|
|
4567
|
+
output: {
|
|
4568
|
+
encoding: 'application/json',
|
|
4569
|
+
schema: {
|
|
4570
|
+
type: 'object',
|
|
4571
|
+
required: ['feeds'],
|
|
4572
|
+
properties: {
|
|
4573
|
+
cursor: {
|
|
4574
|
+
type: 'string',
|
|
4575
|
+
},
|
|
4576
|
+
feeds: {
|
|
4577
|
+
type: 'array',
|
|
4578
|
+
items: {
|
|
4579
|
+
type: 'ref',
|
|
4580
|
+
ref: 'lex:app.bsky.feed.defs#generatorView',
|
|
4581
|
+
},
|
|
4582
|
+
},
|
|
4583
|
+
},
|
|
4584
|
+
},
|
|
4585
|
+
},
|
|
4586
|
+
},
|
|
4324
4587
|
},
|
|
4325
4588
|
},
|
|
4326
4589
|
AppBskyFeedGetAuthorFeed: {
|
|
@@ -4379,6 +4642,192 @@ export const schemaDict = {
|
|
|
4379
4642
|
},
|
|
4380
4643
|
},
|
|
4381
4644
|
},
|
|
4645
|
+
AppBskyFeedGetFeed: {
|
|
4646
|
+
lexicon: 1,
|
|
4647
|
+
id: 'app.bsky.feed.getFeed',
|
|
4648
|
+
defs: {
|
|
4649
|
+
main: {
|
|
4650
|
+
type: 'query',
|
|
4651
|
+
description:
|
|
4652
|
+
"Compose and hydrate a feed from a user's selected feed generator",
|
|
4653
|
+
parameters: {
|
|
4654
|
+
type: 'params',
|
|
4655
|
+
required: ['feed'],
|
|
4656
|
+
properties: {
|
|
4657
|
+
feed: {
|
|
4658
|
+
type: 'string',
|
|
4659
|
+
format: 'at-uri',
|
|
4660
|
+
},
|
|
4661
|
+
limit: {
|
|
4662
|
+
type: 'integer',
|
|
4663
|
+
minimum: 1,
|
|
4664
|
+
maximum: 100,
|
|
4665
|
+
default: 50,
|
|
4666
|
+
},
|
|
4667
|
+
cursor: {
|
|
4668
|
+
type: 'string',
|
|
4669
|
+
},
|
|
4670
|
+
},
|
|
4671
|
+
},
|
|
4672
|
+
output: {
|
|
4673
|
+
encoding: 'application/json',
|
|
4674
|
+
schema: {
|
|
4675
|
+
type: 'object',
|
|
4676
|
+
required: ['feed'],
|
|
4677
|
+
properties: {
|
|
4678
|
+
cursor: {
|
|
4679
|
+
type: 'string',
|
|
4680
|
+
},
|
|
4681
|
+
feed: {
|
|
4682
|
+
type: 'array',
|
|
4683
|
+
items: {
|
|
4684
|
+
type: 'ref',
|
|
4685
|
+
ref: 'lex:app.bsky.feed.defs#feedViewPost',
|
|
4686
|
+
},
|
|
4687
|
+
},
|
|
4688
|
+
},
|
|
4689
|
+
},
|
|
4690
|
+
},
|
|
4691
|
+
errors: [
|
|
4692
|
+
{
|
|
4693
|
+
name: 'UnknownFeed',
|
|
4694
|
+
},
|
|
4695
|
+
],
|
|
4696
|
+
},
|
|
4697
|
+
},
|
|
4698
|
+
},
|
|
4699
|
+
AppBskyFeedGetFeedGenerator: {
|
|
4700
|
+
lexicon: 1,
|
|
4701
|
+
id: 'app.bsky.feed.getFeedGenerator',
|
|
4702
|
+
defs: {
|
|
4703
|
+
main: {
|
|
4704
|
+
type: 'query',
|
|
4705
|
+
description:
|
|
4706
|
+
'Get information about a specific feed offered by a feed generator, such as its online status',
|
|
4707
|
+
parameters: {
|
|
4708
|
+
type: 'params',
|
|
4709
|
+
required: ['feed'],
|
|
4710
|
+
properties: {
|
|
4711
|
+
feed: {
|
|
4712
|
+
type: 'string',
|
|
4713
|
+
format: 'at-uri',
|
|
4714
|
+
},
|
|
4715
|
+
},
|
|
4716
|
+
},
|
|
4717
|
+
output: {
|
|
4718
|
+
encoding: 'application/json',
|
|
4719
|
+
schema: {
|
|
4720
|
+
type: 'object',
|
|
4721
|
+
required: ['view', 'isOnline', 'isValid'],
|
|
4722
|
+
properties: {
|
|
4723
|
+
view: {
|
|
4724
|
+
type: 'ref',
|
|
4725
|
+
ref: 'lex:app.bsky.feed.defs#generatorView',
|
|
4726
|
+
},
|
|
4727
|
+
isOnline: {
|
|
4728
|
+
type: 'boolean',
|
|
4729
|
+
},
|
|
4730
|
+
isValid: {
|
|
4731
|
+
type: 'boolean',
|
|
4732
|
+
},
|
|
4733
|
+
},
|
|
4734
|
+
},
|
|
4735
|
+
},
|
|
4736
|
+
},
|
|
4737
|
+
},
|
|
4738
|
+
},
|
|
4739
|
+
AppBskyFeedGetFeedGenerators: {
|
|
4740
|
+
lexicon: 1,
|
|
4741
|
+
id: 'app.bsky.feed.getFeedGenerators',
|
|
4742
|
+
defs: {
|
|
4743
|
+
main: {
|
|
4744
|
+
type: 'query',
|
|
4745
|
+
description: 'Get information about a list of feed generators',
|
|
4746
|
+
parameters: {
|
|
4747
|
+
type: 'params',
|
|
4748
|
+
required: ['feeds'],
|
|
4749
|
+
properties: {
|
|
4750
|
+
feeds: {
|
|
4751
|
+
type: 'array',
|
|
4752
|
+
items: {
|
|
4753
|
+
type: 'string',
|
|
4754
|
+
format: 'at-uri',
|
|
4755
|
+
},
|
|
4756
|
+
},
|
|
4757
|
+
},
|
|
4758
|
+
},
|
|
4759
|
+
output: {
|
|
4760
|
+
encoding: 'application/json',
|
|
4761
|
+
schema: {
|
|
4762
|
+
type: 'object',
|
|
4763
|
+
required: ['feeds'],
|
|
4764
|
+
properties: {
|
|
4765
|
+
feeds: {
|
|
4766
|
+
type: 'array',
|
|
4767
|
+
items: {
|
|
4768
|
+
type: 'ref',
|
|
4769
|
+
ref: 'lex:app.bsky.feed.defs#generatorView',
|
|
4770
|
+
},
|
|
4771
|
+
},
|
|
4772
|
+
},
|
|
4773
|
+
},
|
|
4774
|
+
},
|
|
4775
|
+
},
|
|
4776
|
+
},
|
|
4777
|
+
},
|
|
4778
|
+
AppBskyFeedGetFeedSkeleton: {
|
|
4779
|
+
lexicon: 1,
|
|
4780
|
+
id: 'app.bsky.feed.getFeedSkeleton',
|
|
4781
|
+
defs: {
|
|
4782
|
+
main: {
|
|
4783
|
+
type: 'query',
|
|
4784
|
+
description: 'A skeleton of a feed provided by a feed generator',
|
|
4785
|
+
parameters: {
|
|
4786
|
+
type: 'params',
|
|
4787
|
+
required: ['feed'],
|
|
4788
|
+
properties: {
|
|
4789
|
+
feed: {
|
|
4790
|
+
type: 'string',
|
|
4791
|
+
format: 'at-uri',
|
|
4792
|
+
},
|
|
4793
|
+
limit: {
|
|
4794
|
+
type: 'integer',
|
|
4795
|
+
minimum: 1,
|
|
4796
|
+
maximum: 100,
|
|
4797
|
+
default: 50,
|
|
4798
|
+
},
|
|
4799
|
+
cursor: {
|
|
4800
|
+
type: 'string',
|
|
4801
|
+
},
|
|
4802
|
+
},
|
|
4803
|
+
},
|
|
4804
|
+
output: {
|
|
4805
|
+
encoding: 'application/json',
|
|
4806
|
+
schema: {
|
|
4807
|
+
type: 'object',
|
|
4808
|
+
required: ['feed'],
|
|
4809
|
+
properties: {
|
|
4810
|
+
cursor: {
|
|
4811
|
+
type: 'string',
|
|
4812
|
+
},
|
|
4813
|
+
feed: {
|
|
4814
|
+
type: 'array',
|
|
4815
|
+
items: {
|
|
4816
|
+
type: 'ref',
|
|
4817
|
+
ref: 'lex:app.bsky.feed.defs#skeletonFeedPost',
|
|
4818
|
+
},
|
|
4819
|
+
},
|
|
4820
|
+
},
|
|
4821
|
+
},
|
|
4822
|
+
},
|
|
4823
|
+
errors: [
|
|
4824
|
+
{
|
|
4825
|
+
name: 'UnknownFeed',
|
|
4826
|
+
},
|
|
4827
|
+
],
|
|
4828
|
+
},
|
|
4829
|
+
},
|
|
4830
|
+
},
|
|
4382
4831
|
AppBskyFeedGetLikes: {
|
|
4383
4832
|
lexicon: 1,
|
|
4384
4833
|
id: 'app.bsky.feed.getLikes',
|
|
@@ -5811,7 +6260,14 @@ export const ids = {
|
|
|
5811
6260
|
AppBskyEmbedRecord: 'app.bsky.embed.record',
|
|
5812
6261
|
AppBskyEmbedRecordWithMedia: 'app.bsky.embed.recordWithMedia',
|
|
5813
6262
|
AppBskyFeedDefs: 'app.bsky.feed.defs',
|
|
6263
|
+
AppBskyFeedDescribeFeedGenerator: 'app.bsky.feed.describeFeedGenerator',
|
|
6264
|
+
AppBskyFeedGenerator: 'app.bsky.feed.generator',
|
|
6265
|
+
AppBskyFeedGetActorFeeds: 'app.bsky.feed.getActorFeeds',
|
|
5814
6266
|
AppBskyFeedGetAuthorFeed: 'app.bsky.feed.getAuthorFeed',
|
|
6267
|
+
AppBskyFeedGetFeed: 'app.bsky.feed.getFeed',
|
|
6268
|
+
AppBskyFeedGetFeedGenerator: 'app.bsky.feed.getFeedGenerator',
|
|
6269
|
+
AppBskyFeedGetFeedGenerators: 'app.bsky.feed.getFeedGenerators',
|
|
6270
|
+
AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton',
|
|
5815
6271
|
AppBskyFeedGetLikes: 'app.bsky.feed.getLikes',
|
|
5816
6272
|
AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread',
|
|
5817
6273
|
AppBskyFeedGetPosts: 'app.bsky.feed.getPosts',
|
|
@@ -107,6 +107,7 @@ export function validateViewerState(v: unknown): ValidationResult {
|
|
|
107
107
|
export type Preferences = (
|
|
108
108
|
| AdultContentPref
|
|
109
109
|
| ContentLabelPref
|
|
110
|
+
| SavedFeedsPref
|
|
110
111
|
| { $type: string; [k: string]: unknown }
|
|
111
112
|
)[]
|
|
112
113
|
|
|
@@ -144,3 +145,21 @@ export function isContentLabelPref(v: unknown): v is ContentLabelPref {
|
|
|
144
145
|
export function validateContentLabelPref(v: unknown): ValidationResult {
|
|
145
146
|
return lexicons.validate('app.bsky.actor.defs#contentLabelPref', v)
|
|
146
147
|
}
|
|
148
|
+
|
|
149
|
+
export interface SavedFeedsPref {
|
|
150
|
+
pinned: string[]
|
|
151
|
+
saved: string[]
|
|
152
|
+
[k: string]: unknown
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function isSavedFeedsPref(v: unknown): v is SavedFeedsPref {
|
|
156
|
+
return (
|
|
157
|
+
isObj(v) &&
|
|
158
|
+
hasProp(v, '$type') &&
|
|
159
|
+
v.$type === 'app.bsky.actor.defs#savedFeedsPref'
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function validateSavedFeedsPref(v: unknown): ValidationResult {
|
|
164
|
+
return lexicons.validate('app.bsky.actor.defs#savedFeedsPref', v)
|
|
165
|
+
}
|
|
@@ -6,6 +6,7 @@ import { isObj, hasProp } from '../../../../util'
|
|
|
6
6
|
import { lexicons } from '../../../../lexicons'
|
|
7
7
|
import { CID } from 'multiformats/cid'
|
|
8
8
|
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
9
|
+
import * as AppBskyFeedDefs from '../feed/defs'
|
|
9
10
|
import * as AppBskyActorDefs from '../actor/defs'
|
|
10
11
|
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
|
|
11
12
|
import * as AppBskyEmbedImages from './images'
|
|
@@ -35,6 +36,7 @@ export interface View {
|
|
|
35
36
|
| ViewRecord
|
|
36
37
|
| ViewNotFound
|
|
37
38
|
| ViewBlocked
|
|
39
|
+
| AppBskyFeedDefs.GeneratorView
|
|
38
40
|
| { $type: string; [k: string]: unknown }
|
|
39
41
|
[k: string]: unknown
|
|
40
42
|
}
|
|
@@ -11,6 +11,7 @@ import * as AppBskyEmbedExternal from '../embed/external'
|
|
|
11
11
|
import * as AppBskyEmbedRecord from '../embed/record'
|
|
12
12
|
import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia'
|
|
13
13
|
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
|
|
14
|
+
import * as AppBskyRichtextFacet from '../richtext/facet'
|
|
14
15
|
|
|
15
16
|
export interface PostView {
|
|
16
17
|
uri: string
|
|
@@ -80,8 +81,16 @@ export function validateFeedViewPost(v: unknown): ValidationResult {
|
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
export interface ReplyRef {
|
|
83
|
-
root:
|
|
84
|
-
|
|
84
|
+
root:
|
|
85
|
+
| PostView
|
|
86
|
+
| NotFoundPost
|
|
87
|
+
| BlockedPost
|
|
88
|
+
| { $type: string; [k: string]: unknown }
|
|
89
|
+
parent:
|
|
90
|
+
| PostView
|
|
91
|
+
| NotFoundPost
|
|
92
|
+
| BlockedPost
|
|
93
|
+
| { $type: string; [k: string]: unknown }
|
|
85
94
|
[k: string]: unknown
|
|
86
95
|
}
|
|
87
96
|
|
|
@@ -176,3 +185,82 @@ export function isBlockedPost(v: unknown): v is BlockedPost {
|
|
|
176
185
|
export function validateBlockedPost(v: unknown): ValidationResult {
|
|
177
186
|
return lexicons.validate('app.bsky.feed.defs#blockedPost', v)
|
|
178
187
|
}
|
|
188
|
+
|
|
189
|
+
export interface GeneratorView {
|
|
190
|
+
uri: string
|
|
191
|
+
cid: string
|
|
192
|
+
did?: string
|
|
193
|
+
creator: AppBskyActorDefs.ProfileView
|
|
194
|
+
displayName: string
|
|
195
|
+
description?: string
|
|
196
|
+
descriptionFacets?: AppBskyRichtextFacet.Main[]
|
|
197
|
+
avatar?: string
|
|
198
|
+
likeCount?: number
|
|
199
|
+
viewer?: GeneratorViewerState
|
|
200
|
+
indexedAt: string
|
|
201
|
+
[k: string]: unknown
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export function isGeneratorView(v: unknown): v is GeneratorView {
|
|
205
|
+
return (
|
|
206
|
+
isObj(v) &&
|
|
207
|
+
hasProp(v, '$type') &&
|
|
208
|
+
v.$type === 'app.bsky.feed.defs#generatorView'
|
|
209
|
+
)
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export function validateGeneratorView(v: unknown): ValidationResult {
|
|
213
|
+
return lexicons.validate('app.bsky.feed.defs#generatorView', v)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface GeneratorViewerState {
|
|
217
|
+
like?: string
|
|
218
|
+
[k: string]: unknown
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function isGeneratorViewerState(v: unknown): v is GeneratorViewerState {
|
|
222
|
+
return (
|
|
223
|
+
isObj(v) &&
|
|
224
|
+
hasProp(v, '$type') &&
|
|
225
|
+
v.$type === 'app.bsky.feed.defs#generatorViewerState'
|
|
226
|
+
)
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function validateGeneratorViewerState(v: unknown): ValidationResult {
|
|
230
|
+
return lexicons.validate('app.bsky.feed.defs#generatorViewerState', v)
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface SkeletonFeedPost {
|
|
234
|
+
post: string
|
|
235
|
+
reason?: SkeletonReasonRepost | { $type: string; [k: string]: unknown }
|
|
236
|
+
[k: string]: unknown
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function isSkeletonFeedPost(v: unknown): v is SkeletonFeedPost {
|
|
240
|
+
return (
|
|
241
|
+
isObj(v) &&
|
|
242
|
+
hasProp(v, '$type') &&
|
|
243
|
+
v.$type === 'app.bsky.feed.defs#skeletonFeedPost'
|
|
244
|
+
)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export function validateSkeletonFeedPost(v: unknown): ValidationResult {
|
|
248
|
+
return lexicons.validate('app.bsky.feed.defs#skeletonFeedPost', v)
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export interface SkeletonReasonRepost {
|
|
252
|
+
repost: string
|
|
253
|
+
[k: string]: unknown
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export function isSkeletonReasonRepost(v: unknown): v is SkeletonReasonRepost {
|
|
257
|
+
return (
|
|
258
|
+
isObj(v) &&
|
|
259
|
+
hasProp(v, '$type') &&
|
|
260
|
+
v.$type === 'app.bsky.feed.defs#skeletonReasonRepost'
|
|
261
|
+
)
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export function validateSkeletonReasonRepost(v: unknown): ValidationResult {
|
|
265
|
+
return lexicons.validate('app.bsky.feed.defs#skeletonReasonRepost', v)
|
|
266
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
|
|
10
|
+
export interface QueryParams {}
|
|
11
|
+
|
|
12
|
+
export type InputSchema = undefined
|
|
13
|
+
|
|
14
|
+
export interface OutputSchema {
|
|
15
|
+
did: string
|
|
16
|
+
feeds: Feed[]
|
|
17
|
+
links?: Links
|
|
18
|
+
[k: string]: unknown
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface CallOptions {
|
|
22
|
+
headers?: Headers
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Response {
|
|
26
|
+
success: boolean
|
|
27
|
+
headers: Headers
|
|
28
|
+
data: OutputSchema
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function toKnownErr(e: any) {
|
|
32
|
+
if (e instanceof XRPCError) {
|
|
33
|
+
}
|
|
34
|
+
return e
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface Feed {
|
|
38
|
+
uri: string
|
|
39
|
+
[k: string]: unknown
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function isFeed(v: unknown): v is Feed {
|
|
43
|
+
return (
|
|
44
|
+
isObj(v) &&
|
|
45
|
+
hasProp(v, '$type') &&
|
|
46
|
+
v.$type === 'app.bsky.feed.describeFeedGenerator#feed'
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function validateFeed(v: unknown): ValidationResult {
|
|
51
|
+
return lexicons.validate('app.bsky.feed.describeFeedGenerator#feed', v)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface Links {
|
|
55
|
+
privacyPolicy?: string
|
|
56
|
+
termsOfService?: string
|
|
57
|
+
[k: string]: unknown
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function isLinks(v: unknown): v is Links {
|
|
61
|
+
return (
|
|
62
|
+
isObj(v) &&
|
|
63
|
+
hasProp(v, '$type') &&
|
|
64
|
+
v.$type === 'app.bsky.feed.describeFeedGenerator#links'
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function validateLinks(v: unknown): ValidationResult {
|
|
69
|
+
return lexicons.validate('app.bsky.feed.describeFeedGenerator#links', v)
|
|
70
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { isObj, hasProp } from '../../../../util'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
import * as AppBskyRichtextFacet from '../richtext/facet'
|
|
9
|
+
|
|
10
|
+
export interface Record {
|
|
11
|
+
did: string
|
|
12
|
+
displayName: string
|
|
13
|
+
description?: string
|
|
14
|
+
descriptionFacets?: AppBskyRichtextFacet.Main[]
|
|
15
|
+
avatar?: BlobRef
|
|
16
|
+
createdAt: string
|
|
17
|
+
[k: string]: unknown
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function isRecord(v: unknown): v is Record {
|
|
21
|
+
return (
|
|
22
|
+
isObj(v) &&
|
|
23
|
+
hasProp(v, '$type') &&
|
|
24
|
+
(v.$type === 'app.bsky.feed.generator#main' ||
|
|
25
|
+
v.$type === 'app.bsky.feed.generator')
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
30
|
+
return lexicons.validate('app.bsky.feed.generator#main', v)
|
|
31
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as AppBskyFeedDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
actor: string
|
|
13
|
+
limit?: number
|
|
14
|
+
cursor?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
|
|
19
|
+
export interface OutputSchema {
|
|
20
|
+
cursor?: string
|
|
21
|
+
feeds: AppBskyFeedDefs.GeneratorView[]
|
|
22
|
+
[k: string]: unknown
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CallOptions {
|
|
26
|
+
headers?: Headers
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface Response {
|
|
30
|
+
success: boolean
|
|
31
|
+
headers: Headers
|
|
32
|
+
data: OutputSchema
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function toKnownErr(e: any) {
|
|
36
|
+
if (e instanceof XRPCError) {
|
|
37
|
+
}
|
|
38
|
+
return e
|
|
39
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as AppBskyFeedDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
feed: string
|
|
13
|
+
limit?: number
|
|
14
|
+
cursor?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
|
|
19
|
+
export interface OutputSchema {
|
|
20
|
+
cursor?: string
|
|
21
|
+
feed: AppBskyFeedDefs.FeedViewPost[]
|
|
22
|
+
[k: string]: unknown
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CallOptions {
|
|
26
|
+
headers?: Headers
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface Response {
|
|
30
|
+
success: boolean
|
|
31
|
+
headers: Headers
|
|
32
|
+
data: OutputSchema
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export class UnknownFeedError extends XRPCError {
|
|
36
|
+
constructor(src: XRPCError) {
|
|
37
|
+
super(src.status, src.error, src.message)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function toKnownErr(e: any) {
|
|
42
|
+
if (e instanceof XRPCError) {
|
|
43
|
+
if (e.error === 'UnknownFeed') return new UnknownFeedError(e)
|
|
44
|
+
}
|
|
45
|
+
return e
|
|
46
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as AppBskyFeedDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
feed: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type InputSchema = undefined
|
|
16
|
+
|
|
17
|
+
export interface OutputSchema {
|
|
18
|
+
view: AppBskyFeedDefs.GeneratorView
|
|
19
|
+
isOnline: boolean
|
|
20
|
+
isValid: boolean
|
|
21
|
+
[k: string]: unknown
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface CallOptions {
|
|
25
|
+
headers?: Headers
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface Response {
|
|
29
|
+
success: boolean
|
|
30
|
+
headers: Headers
|
|
31
|
+
data: OutputSchema
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function toKnownErr(e: any) {
|
|
35
|
+
if (e instanceof XRPCError) {
|
|
36
|
+
}
|
|
37
|
+
return e
|
|
38
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as AppBskyFeedDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
feeds: string[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type InputSchema = undefined
|
|
16
|
+
|
|
17
|
+
export interface OutputSchema {
|
|
18
|
+
feeds: AppBskyFeedDefs.GeneratorView[]
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CallOptions {
|
|
23
|
+
headers?: Headers
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Response {
|
|
27
|
+
success: boolean
|
|
28
|
+
headers: Headers
|
|
29
|
+
data: OutputSchema
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function toKnownErr(e: any) {
|
|
33
|
+
if (e instanceof XRPCError) {
|
|
34
|
+
}
|
|
35
|
+
return e
|
|
36
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as AppBskyFeedDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
feed: string
|
|
13
|
+
limit?: number
|
|
14
|
+
cursor?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
|
|
19
|
+
export interface OutputSchema {
|
|
20
|
+
cursor?: string
|
|
21
|
+
feed: AppBskyFeedDefs.SkeletonFeedPost[]
|
|
22
|
+
[k: string]: unknown
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CallOptions {
|
|
26
|
+
headers?: Headers
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface Response {
|
|
30
|
+
success: boolean
|
|
31
|
+
headers: Headers
|
|
32
|
+
data: OutputSchema
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export class UnknownFeedError extends XRPCError {
|
|
36
|
+
constructor(src: XRPCError) {
|
|
37
|
+
super(src.status, src.error, src.message)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function toKnownErr(e: any) {
|
|
42
|
+
if (e instanceof XRPCError) {
|
|
43
|
+
if (e.error === 'UnknownFeed') return new UnknownFeedError(e)
|
|
44
|
+
}
|
|
45
|
+
return e
|
|
46
|
+
}
|