+206
packages/lexicon/src/index.ts
+206
packages/lexicon/src/index.ts
···
7
7
import { schemas } from './lexicons.js'
8
8
import * as AppBskyActorDefs from './types/app/bsky/actor/defs.js'
9
9
import * as AppBskyActorProfile from './types/app/bsky/actor/profile.js'
10
+
import * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js'
11
+
import * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js'
12
+
import * as AppBskyEmbedImages from './types/app/bsky/embed/images.js'
13
+
import * as AppBskyEmbedRecord from './types/app/bsky/embed/record.js'
14
+
import * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia.js'
15
+
import * as AppBskyEmbedVideo from './types/app/bsky/embed/video.js'
16
+
import * as AppBskyFeedDefs from './types/app/bsky/feed/defs.js'
17
+
import * as AppBskyFeedPostgate from './types/app/bsky/feed/postgate.js'
18
+
import * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate.js'
19
+
import * as AppBskyGraphDefs from './types/app/bsky/graph/defs.js'
20
+
import * as AppBskyLabelerDefs from './types/app/bsky/labeler/defs.js'
21
+
import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.js'
10
22
import * as ComAtprotoLabelDefs from './types/com/atproto/label/defs.js'
11
23
import * as ComAtprotoRepoApplyWrites from './types/com/atproto/repo/applyWrites.js'
12
24
import * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord.js'
···
47
59
export * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob.js'
48
60
export * as AppBskyActorDefs from './types/app/bsky/actor/defs.js'
49
61
export * as AppBskyActorProfile from './types/app/bsky/actor/profile.js'
62
+
export * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js'
63
+
export * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js'
64
+
export * as AppBskyEmbedImages from './types/app/bsky/embed/images.js'
65
+
export * as AppBskyEmbedRecord from './types/app/bsky/embed/record.js'
66
+
export * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia.js'
67
+
export * as AppBskyEmbedVideo from './types/app/bsky/embed/video.js'
68
+
export * as AppBskyFeedDefs from './types/app/bsky/feed/defs.js'
69
+
export * as AppBskyFeedPostgate from './types/app/bsky/feed/postgate.js'
70
+
export * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate.js'
71
+
export * as AppBskyGraphDefs from './types/app/bsky/graph/defs.js'
72
+
export * as AppBskyLabelerDefs from './types/app/bsky/labeler/defs.js'
73
+
export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.js'
74
+
75
+
export const APP_BSKY_FEED = {
76
+
DefsRequestLess: 'app.bsky.feed.defs#requestLess',
77
+
DefsRequestMore: 'app.bsky.feed.defs#requestMore',
78
+
DefsInteractionLike: 'app.bsky.feed.defs#interactionLike',
79
+
DefsInteractionSeen: 'app.bsky.feed.defs#interactionSeen',
80
+
DefsClickthroughItem: 'app.bsky.feed.defs#clickthroughItem',
81
+
DefsContentModeVideo: 'app.bsky.feed.defs#contentModeVideo',
82
+
DefsInteractionQuote: 'app.bsky.feed.defs#interactionQuote',
83
+
DefsInteractionReply: 'app.bsky.feed.defs#interactionReply',
84
+
DefsInteractionShare: 'app.bsky.feed.defs#interactionShare',
85
+
DefsClickthroughEmbed: 'app.bsky.feed.defs#clickthroughEmbed',
86
+
DefsInteractionRepost: 'app.bsky.feed.defs#interactionRepost',
87
+
DefsClickthroughAuthor: 'app.bsky.feed.defs#clickthroughAuthor',
88
+
DefsClickthroughReposter: 'app.bsky.feed.defs#clickthroughReposter',
89
+
DefsContentModeUnspecified: 'app.bsky.feed.defs#contentModeUnspecified',
90
+
}
91
+
export const APP_BSKY_GRAPH = {
92
+
DefsModlist: 'app.bsky.graph.defs#modlist',
93
+
DefsCuratelist: 'app.bsky.graph.defs#curatelist',
94
+
DefsReferencelist: 'app.bsky.graph.defs#referencelist',
95
+
}
50
96
51
97
export class AtpBaseClient extends XrpcClient {
52
98
xyz: XyzNS
···
329
375
export class AppBskyNS {
330
376
_client: XrpcClient
331
377
actor: AppBskyActorNS
378
+
embed: AppBskyEmbedNS
379
+
feed: AppBskyFeedNS
380
+
richtext: AppBskyRichtextNS
332
381
333
382
constructor(client: XrpcClient) {
334
383
this._client = client
335
384
this.actor = new AppBskyActorNS(client)
385
+
this.embed = new AppBskyEmbedNS(client)
386
+
this.feed = new AppBskyFeedNS(client)
387
+
this.richtext = new AppBskyRichtextNS(client)
336
388
}
337
389
}
338
390
···
411
463
)
412
464
}
413
465
}
466
+
467
+
export class AppBskyEmbedNS {
468
+
_client: XrpcClient
469
+
470
+
constructor(client: XrpcClient) {
471
+
this._client = client
472
+
}
473
+
}
474
+
475
+
export class AppBskyFeedNS {
476
+
_client: XrpcClient
477
+
postgate: PostgateRecord
478
+
threadgate: ThreadgateRecord
479
+
480
+
constructor(client: XrpcClient) {
481
+
this._client = client
482
+
this.postgate = new PostgateRecord(client)
483
+
this.threadgate = new ThreadgateRecord(client)
484
+
}
485
+
}
486
+
487
+
export class PostgateRecord {
488
+
_client: XrpcClient
489
+
490
+
constructor(client: XrpcClient) {
491
+
this._client = client
492
+
}
493
+
494
+
async list(
495
+
params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
496
+
): Promise<{
497
+
cursor?: string
498
+
records: { uri: string; value: AppBskyFeedPostgate.Record }[]
499
+
}> {
500
+
const res = await this._client.call('com.atproto.repo.listRecords', {
501
+
collection: 'app.bsky.feed.postgate',
502
+
...params,
503
+
})
504
+
return res.data
505
+
}
506
+
507
+
async get(
508
+
params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
509
+
): Promise<{ uri: string; cid: string; value: AppBskyFeedPostgate.Record }> {
510
+
const res = await this._client.call('com.atproto.repo.getRecord', {
511
+
collection: 'app.bsky.feed.postgate',
512
+
...params,
513
+
})
514
+
return res.data
515
+
}
516
+
517
+
async create(
518
+
params: OmitKey<
519
+
ComAtprotoRepoCreateRecord.InputSchema,
520
+
'collection' | 'record'
521
+
>,
522
+
record: Un$Typed<AppBskyFeedPostgate.Record>,
523
+
headers?: Record<string, string>,
524
+
): Promise<{ uri: string; cid: string }> {
525
+
const collection = 'app.bsky.feed.postgate'
526
+
const res = await this._client.call(
527
+
'com.atproto.repo.createRecord',
528
+
undefined,
529
+
{ collection, ...params, record: { ...record, $type: collection } },
530
+
{ encoding: 'application/json', headers },
531
+
)
532
+
return res.data
533
+
}
534
+
535
+
async delete(
536
+
params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
537
+
headers?: Record<string, string>,
538
+
): Promise<void> {
539
+
await this._client.call(
540
+
'com.atproto.repo.deleteRecord',
541
+
undefined,
542
+
{ collection: 'app.bsky.feed.postgate', ...params },
543
+
{ headers },
544
+
)
545
+
}
546
+
}
547
+
548
+
export class ThreadgateRecord {
549
+
_client: XrpcClient
550
+
551
+
constructor(client: XrpcClient) {
552
+
this._client = client
553
+
}
554
+
555
+
async list(
556
+
params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
557
+
): Promise<{
558
+
cursor?: string
559
+
records: { uri: string; value: AppBskyFeedThreadgate.Record }[]
560
+
}> {
561
+
const res = await this._client.call('com.atproto.repo.listRecords', {
562
+
collection: 'app.bsky.feed.threadgate',
563
+
...params,
564
+
})
565
+
return res.data
566
+
}
567
+
568
+
async get(
569
+
params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
570
+
): Promise<{
571
+
uri: string
572
+
cid: string
573
+
value: AppBskyFeedThreadgate.Record
574
+
}> {
575
+
const res = await this._client.call('com.atproto.repo.getRecord', {
576
+
collection: 'app.bsky.feed.threadgate',
577
+
...params,
578
+
})
579
+
return res.data
580
+
}
581
+
582
+
async create(
583
+
params: OmitKey<
584
+
ComAtprotoRepoCreateRecord.InputSchema,
585
+
'collection' | 'record'
586
+
>,
587
+
record: Un$Typed<AppBskyFeedThreadgate.Record>,
588
+
headers?: Record<string, string>,
589
+
): Promise<{ uri: string; cid: string }> {
590
+
const collection = 'app.bsky.feed.threadgate'
591
+
const res = await this._client.call(
592
+
'com.atproto.repo.createRecord',
593
+
undefined,
594
+
{ collection, ...params, record: { ...record, $type: collection } },
595
+
{ encoding: 'application/json', headers },
596
+
)
597
+
return res.data
598
+
}
599
+
600
+
async delete(
601
+
params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
602
+
headers?: Record<string, string>,
603
+
): Promise<void> {
604
+
await this._client.call(
605
+
'com.atproto.repo.deleteRecord',
606
+
undefined,
607
+
{ collection: 'app.bsky.feed.threadgate', ...params },
608
+
{ headers },
609
+
)
610
+
}
611
+
}
612
+
613
+
export class AppBskyRichtextNS {
614
+
_client: XrpcClient
615
+
616
+
constructor(client: XrpcClient) {
617
+
this._client = client
618
+
}
619
+
}
+2500
-346
packages/lexicon/src/lexicons.ts
+2500
-346
packages/lexicon/src/lexicons.ts
···
193
193
defs: {
194
194
label: {
195
195
type: 'object',
196
-
description:
197
-
'Metadata tag on an atproto resource (eg, repo or record).',
198
196
required: ['src', 'uri', 'val', 'cts'],
199
197
properties: {
200
-
ver: {
201
-
type: 'integer',
202
-
description: 'The AT Protocol version of the label object.',
198
+
cid: {
199
+
type: 'string',
200
+
format: 'cid',
201
+
description:
202
+
"Optionally, CID specifying the specific version of 'uri' resource this label applies to.",
203
+
},
204
+
cts: {
205
+
type: 'string',
206
+
format: 'datetime',
207
+
description: 'Timestamp when this label was created.',
208
+
},
209
+
exp: {
210
+
type: 'string',
211
+
format: 'datetime',
212
+
description:
213
+
'Timestamp at which this label expires (no longer applies).',
214
+
},
215
+
neg: {
216
+
type: 'boolean',
217
+
description:
218
+
'If true, this is a negation label, overwriting a previous label.',
219
+
},
220
+
sig: {
221
+
type: 'bytes',
222
+
description: 'Signature of dag-cbor encoded label.',
203
223
},
204
224
src: {
205
225
type: 'string',
···
212
232
description:
213
233
'AT URI of the record, repository (account), or other resource that this label applies to.',
214
234
},
215
-
cid: {
216
-
type: 'string',
217
-
format: 'cid',
218
-
description:
219
-
"Optionally, CID specifying the specific version of 'uri' resource this label applies to.",
220
-
},
221
235
val: {
222
236
type: 'string',
223
237
maxLength: 128,
224
238
description:
225
239
'The short string name of the value or type of this label.',
226
240
},
227
-
neg: {
228
-
type: 'boolean',
229
-
description:
230
-
'If true, this is a negation label, overwriting a previous label.',
241
+
ver: {
242
+
type: 'integer',
243
+
description: 'The AT Protocol version of the label object.',
231
244
},
232
-
cts: {
233
-
type: 'string',
234
-
format: 'datetime',
235
-
description: 'Timestamp when this label was created.',
236
-
},
237
-
exp: {
245
+
},
246
+
description:
247
+
'Metadata tag on an atproto resource (eg, repo or record).',
248
+
},
249
+
selfLabel: {
250
+
type: 'object',
251
+
required: ['val'],
252
+
properties: {
253
+
val: {
238
254
type: 'string',
239
-
format: 'datetime',
255
+
maxLength: 128,
240
256
description:
241
-
'Timestamp at which this label expires (no longer applies).',
242
-
},
243
-
sig: {
244
-
type: 'bytes',
245
-
description: 'Signature of dag-cbor encoded label.',
257
+
'The short string name of the value or type of this label.',
246
258
},
247
259
},
260
+
description:
261
+
'Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.',
262
+
},
263
+
labelValue: {
264
+
type: 'string',
265
+
knownValues: [
266
+
'!hide',
267
+
'!no-promote',
268
+
'!warn',
269
+
'!no-unauthenticated',
270
+
'dmca-violation',
271
+
'doxxing',
272
+
'porn',
273
+
'sexual',
274
+
'nudity',
275
+
'nsfl',
276
+
'gore',
277
+
],
248
278
},
249
279
selfLabels: {
250
280
type: 'object',
251
-
description:
252
-
'Metadata tags on an atproto record, published by the author within the record.',
253
281
required: ['values'],
254
282
properties: {
255
283
values: {
256
284
type: 'array',
257
285
items: {
286
+
ref: 'lex:com.atproto.label.defs#selfLabel',
258
287
type: 'ref',
259
-
ref: 'lex:com.atproto.label.defs#selfLabel',
260
288
},
261
289
maxLength: 10,
262
290
},
263
291
},
264
-
},
265
-
selfLabel: {
266
-
type: 'object',
267
292
description:
268
-
'Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.',
269
-
required: ['val'],
270
-
properties: {
271
-
val: {
272
-
type: 'string',
273
-
maxLength: 128,
274
-
description:
275
-
'The short string name of the value or type of this label.',
276
-
},
277
-
},
293
+
'Metadata tags on an atproto record, published by the author within the record.',
278
294
},
279
295
labelValueDefinition: {
280
296
type: 'object',
281
-
description:
282
-
'Declares a label value and its expected interpretations and behaviors.',
283
297
required: ['identifier', 'severity', 'blurs', 'locales'],
284
298
properties: {
285
-
identifier: {
299
+
blurs: {
286
300
type: 'string',
287
301
description:
288
-
"The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
289
-
maxLength: 100,
290
-
maxGraphemes: 100,
302
+
"What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.",
303
+
knownValues: ['content', 'media', 'none'],
304
+
},
305
+
locales: {
306
+
type: 'array',
307
+
items: {
308
+
ref: 'lex:com.atproto.label.defs#labelValueDefinitionStrings',
309
+
type: 'ref',
310
+
},
291
311
},
292
312
severity: {
293
313
type: 'string',
···
295
315
"How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
296
316
knownValues: ['inform', 'alert', 'none'],
297
317
},
298
-
blurs: {
318
+
adultOnly: {
319
+
type: 'boolean',
320
+
description:
321
+
'Does the user need to have adult content enabled in order to configure this label?',
322
+
},
323
+
identifier: {
299
324
type: 'string',
325
+
maxLength: 100,
300
326
description:
301
-
"What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.",
302
-
knownValues: ['content', 'media', 'none'],
327
+
"The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
328
+
maxGraphemes: 100,
303
329
},
304
330
defaultSetting: {
305
331
type: 'string',
332
+
default: 'warn',
306
333
description: 'The default setting for this label.',
307
334
knownValues: ['ignore', 'warn', 'hide'],
308
-
default: 'warn',
309
-
},
310
-
adultOnly: {
311
-
type: 'boolean',
312
-
description:
313
-
'Does the user need to have adult content enabled in order to configure this label?',
314
-
},
315
-
locales: {
316
-
type: 'array',
317
-
items: {
318
-
type: 'ref',
319
-
ref: 'lex:com.atproto.label.defs#labelValueDefinitionStrings',
320
-
},
321
335
},
322
336
},
337
+
description:
338
+
'Declares a label value and its expected interpretations and behaviors.',
323
339
},
324
340
labelValueDefinitionStrings: {
325
341
type: 'object',
326
-
description:
327
-
'Strings which describe the label in the UI, localized into a specific language.',
328
342
required: ['lang', 'name', 'description'],
329
343
properties: {
330
344
lang: {
331
345
type: 'string',
346
+
format: 'language',
332
347
description:
333
348
'The code of the language these strings are written in.',
334
-
format: 'language',
335
349
},
336
350
name: {
337
351
type: 'string',
352
+
maxLength: 640,
338
353
description: 'A short human-readable name for the label.',
339
354
maxGraphemes: 64,
340
-
maxLength: 640,
341
355
},
342
356
description: {
343
357
type: 'string',
358
+
maxLength: 100000,
344
359
description:
345
360
'A longer description of what the label means and why it might be applied.',
346
361
maxGraphemes: 10000,
347
-
maxLength: 100000,
348
362
},
349
363
},
350
-
},
351
-
labelValue: {
352
-
type: 'string',
353
-
knownValues: [
354
-
'!hide',
355
-
'!no-promote',
356
-
'!warn',
357
-
'!no-unauthenticated',
358
-
'dmca-violation',
359
-
'doxxing',
360
-
'porn',
361
-
'sexual',
362
-
'nudity',
363
-
'nsfl',
364
-
'gore',
365
-
],
364
+
description:
365
+
'Strings which describe the label in the UI, localized into a specific language.',
366
366
},
367
367
},
368
368
},
···
372
372
defs: {
373
373
main: {
374
374
type: 'procedure',
375
-
description:
376
-
'Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.',
377
375
input: {
378
-
encoding: 'application/json',
379
376
schema: {
380
377
type: 'object',
381
378
required: ['repo', 'writes'],
···
386
383
description:
387
384
'The handle or DID of the repo (aka, current account).',
388
385
},
389
-
validate: {
390
-
type: 'boolean',
391
-
description:
392
-
"Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons.",
393
-
},
394
386
writes: {
395
387
type: 'array',
396
388
items: {
397
-
type: 'union',
398
389
refs: [
399
390
'lex:com.atproto.repo.applyWrites#create',
400
391
'lex:com.atproto.repo.applyWrites#update',
401
392
'lex:com.atproto.repo.applyWrites#delete',
402
393
],
394
+
type: 'union',
403
395
closed: true,
404
396
},
405
397
},
398
+
validate: {
399
+
type: 'boolean',
400
+
description:
401
+
"Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons.",
402
+
},
406
403
swapCommit: {
407
404
type: 'string',
405
+
format: 'cid',
408
406
description:
409
407
'If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.',
410
-
format: 'cid',
411
408
},
412
409
},
413
410
},
411
+
encoding: 'application/json',
414
412
},
413
+
errors: [
414
+
{
415
+
name: 'InvalidSwap',
416
+
description:
417
+
"Indicates that the 'swapCommit' parameter did not match current commit.",
418
+
},
419
+
],
415
420
output: {
416
-
encoding: 'application/json',
417
421
schema: {
418
422
type: 'object',
419
423
required: [],
420
424
properties: {
421
425
commit: {
426
+
ref: 'lex:com.atproto.repo.defs#commitMeta',
422
427
type: 'ref',
423
-
ref: 'lex:com.atproto.repo.defs#commitMeta',
424
428
},
425
429
results: {
426
430
type: 'array',
427
431
items: {
428
-
type: 'union',
429
432
refs: [
430
433
'lex:com.atproto.repo.applyWrites#createResult',
431
434
'lex:com.atproto.repo.applyWrites#updateResult',
432
435
'lex:com.atproto.repo.applyWrites#deleteResult',
433
436
],
437
+
type: 'union',
434
438
closed: true,
435
439
},
436
440
},
437
441
},
438
442
},
443
+
encoding: 'application/json',
439
444
},
440
-
errors: [
441
-
{
442
-
name: 'InvalidSwap',
443
-
description:
444
-
"Indicates that the 'swapCommit' parameter did not match current commit.",
445
-
},
446
-
],
445
+
description:
446
+
'Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.',
447
447
},
448
448
create: {
449
449
type: 'object',
450
-
description: 'Operation which creates a new record.',
451
450
required: ['collection', 'value'],
452
451
properties: {
453
-
collection: {
454
-
type: 'string',
455
-
format: 'nsid',
456
-
},
457
452
rkey: {
458
453
type: 'string',
454
+
format: 'record-key',
459
455
maxLength: 512,
460
-
format: 'record-key',
461
456
description:
462
457
'NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility.',
463
458
},
464
459
value: {
465
460
type: 'unknown',
461
+
},
462
+
collection: {
463
+
type: 'string',
464
+
format: 'nsid',
466
465
},
467
466
},
467
+
description: 'Operation which creates a new record.',
468
468
},
469
-
update: {
469
+
delete: {
470
470
type: 'object',
471
-
description: 'Operation which updates an existing record.',
472
-
required: ['collection', 'rkey', 'value'],
471
+
required: ['collection', 'rkey'],
473
472
properties: {
473
+
rkey: {
474
+
type: 'string',
475
+
format: 'record-key',
476
+
},
474
477
collection: {
475
478
type: 'string',
476
479
format: 'nsid',
477
480
},
481
+
},
482
+
description: 'Operation which deletes an existing record.',
483
+
},
484
+
update: {
485
+
type: 'object',
486
+
required: ['collection', 'rkey', 'value'],
487
+
properties: {
478
488
rkey: {
479
489
type: 'string',
480
490
format: 'record-key',
···
482
492
value: {
483
493
type: 'unknown',
484
494
},
485
-
},
486
-
},
487
-
delete: {
488
-
type: 'object',
489
-
description: 'Operation which deletes an existing record.',
490
-
required: ['collection', 'rkey'],
491
-
properties: {
492
495
collection: {
493
496
type: 'string',
494
497
format: 'nsid',
495
-
},
496
-
rkey: {
497
-
type: 'string',
498
-
format: 'record-key',
499
498
},
500
499
},
500
+
description: 'Operation which updates an existing record.',
501
501
},
502
502
createResult: {
503
503
type: 'object',
504
504
required: ['uri', 'cid'],
505
505
properties: {
506
-
uri: {
507
-
type: 'string',
508
-
format: 'at-uri',
509
-
},
510
506
cid: {
511
507
type: 'string',
512
508
format: 'cid',
513
509
},
510
+
uri: {
511
+
type: 'string',
512
+
format: 'at-uri',
513
+
},
514
514
validationStatus: {
515
515
type: 'string',
516
516
knownValues: ['valid', 'unknown'],
517
517
},
518
518
},
519
519
},
520
+
deleteResult: {
521
+
type: 'object',
522
+
required: [],
523
+
properties: {},
524
+
},
520
525
updateResult: {
521
526
type: 'object',
522
527
required: ['uri', 'cid'],
523
528
properties: {
524
-
uri: {
525
-
type: 'string',
526
-
format: 'at-uri',
527
-
},
528
529
cid: {
529
530
type: 'string',
530
531
format: 'cid',
532
+
},
533
+
uri: {
534
+
type: 'string',
535
+
format: 'at-uri',
531
536
},
532
537
validationStatus: {
533
538
type: 'string',
···
535
540
},
536
541
},
537
542
},
538
-
deleteResult: {
539
-
type: 'object',
540
-
required: [],
541
-
properties: {},
542
-
},
543
543
},
544
544
},
545
545
ComAtprotoRepoCreateRecord: {
···
548
548
defs: {
549
549
main: {
550
550
type: 'procedure',
551
-
description:
552
-
'Create a single new repository record. Requires auth, implemented by PDS.',
553
551
input: {
554
-
encoding: 'application/json',
555
552
schema: {
556
553
type: 'object',
557
554
required: ['repo', 'collection', 'record'],
···
562
559
description:
563
560
'The handle or DID of the repo (aka, current account).',
564
561
},
565
-
collection: {
566
-
type: 'string',
567
-
format: 'nsid',
568
-
description: 'The NSID of the record collection.',
569
-
},
570
562
rkey: {
571
563
type: 'string',
572
564
format: 'record-key',
565
+
maxLength: 512,
573
566
description: 'The Record Key.',
574
-
maxLength: 512,
567
+
},
568
+
record: {
569
+
type: 'unknown',
570
+
description: 'The record itself. Must contain a $type field.',
575
571
},
576
572
validate: {
577
573
type: 'boolean',
578
574
description:
579
575
"Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons.",
580
576
},
581
-
record: {
582
-
type: 'unknown',
583
-
description: 'The record itself. Must contain a $type field.',
577
+
collection: {
578
+
type: 'string',
579
+
format: 'nsid',
580
+
description: 'The NSID of the record collection.',
584
581
},
585
582
swapCommit: {
586
583
type: 'string',
···
590
587
},
591
588
},
592
589
},
590
+
encoding: 'application/json',
593
591
},
592
+
errors: [
593
+
{
594
+
name: 'InvalidSwap',
595
+
description:
596
+
"Indicates that 'swapCommit' didn't match current repo commit.",
597
+
},
598
+
],
594
599
output: {
595
-
encoding: 'application/json',
596
600
schema: {
597
601
type: 'object',
598
602
required: ['uri', 'cid'],
599
603
properties: {
604
+
cid: {
605
+
type: 'string',
606
+
format: 'cid',
607
+
},
600
608
uri: {
601
609
type: 'string',
602
610
format: 'at-uri',
603
611
},
604
-
cid: {
605
-
type: 'string',
606
-
format: 'cid',
607
-
},
608
612
commit: {
613
+
ref: 'lex:com.atproto.repo.defs#commitMeta',
609
614
type: 'ref',
610
-
ref: 'lex:com.atproto.repo.defs#commitMeta',
611
615
},
612
616
validationStatus: {
613
617
type: 'string',
···
615
619
},
616
620
},
617
621
},
622
+
encoding: 'application/json',
618
623
},
619
-
errors: [
620
-
{
621
-
name: 'InvalidSwap',
622
-
description:
623
-
"Indicates that 'swapCommit' didn't match current repo commit.",
624
-
},
625
-
],
624
+
description:
625
+
'Create a single new repository record. Requires auth, implemented by PDS.',
626
626
},
627
627
},
628
628
},
···
652
652
defs: {
653
653
main: {
654
654
type: 'procedure',
655
-
description:
656
-
"Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.",
657
655
input: {
658
-
encoding: 'application/json',
659
656
schema: {
660
657
type: 'object',
661
658
required: ['repo', 'collection', 'rkey'],
···
666
663
description:
667
664
'The handle or DID of the repo (aka, current account).',
668
665
},
669
-
collection: {
670
-
type: 'string',
671
-
format: 'nsid',
672
-
description: 'The NSID of the record collection.',
673
-
},
674
666
rkey: {
675
667
type: 'string',
676
668
format: 'record-key',
677
669
description: 'The Record Key.',
678
670
},
679
-
swapRecord: {
671
+
collection: {
680
672
type: 'string',
681
-
format: 'cid',
682
-
description:
683
-
'Compare and swap with the previous record by CID.',
673
+
format: 'nsid',
674
+
description: 'The NSID of the record collection.',
684
675
},
685
676
swapCommit: {
686
677
type: 'string',
···
688
679
description:
689
680
'Compare and swap with the previous commit by CID.',
690
681
},
682
+
swapRecord: {
683
+
type: 'string',
684
+
format: 'cid',
685
+
description:
686
+
'Compare and swap with the previous record by CID.',
687
+
},
691
688
},
692
689
},
690
+
encoding: 'application/json',
693
691
},
692
+
errors: [
693
+
{
694
+
name: 'InvalidSwap',
695
+
},
696
+
],
694
697
output: {
695
-
encoding: 'application/json',
696
698
schema: {
697
699
type: 'object',
698
700
properties: {
699
701
commit: {
700
-
type: 'ref',
701
702
ref: 'lex:com.atproto.repo.defs#commitMeta',
703
+
type: 'ref',
702
704
},
703
705
},
704
706
},
707
+
encoding: 'application/json',
705
708
},
706
-
errors: [
707
-
{
708
-
name: 'InvalidSwap',
709
-
},
710
-
],
709
+
description:
710
+
"Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.",
711
711
},
712
712
},
713
713
},
···
717
717
defs: {
718
718
main: {
719
719
type: 'query',
720
-
description:
721
-
'Get information about an account and repository, including the list of collections. Does not require auth.',
722
-
parameters: {
723
-
type: 'params',
724
-
required: ['repo'],
725
-
properties: {
726
-
repo: {
727
-
type: 'string',
728
-
format: 'at-identifier',
729
-
description: 'The handle or DID of the repo.',
730
-
},
731
-
},
732
-
},
733
720
output: {
734
-
encoding: 'application/json',
735
721
schema: {
736
722
type: 'object',
737
723
required: [
···
742
728
'handleIsCorrect',
743
729
],
744
730
properties: {
745
-
handle: {
746
-
type: 'string',
747
-
format: 'handle',
748
-
},
749
731
did: {
750
732
type: 'string',
751
733
format: 'did',
···
754
736
type: 'unknown',
755
737
description: 'The complete DID document for this account.',
756
738
},
739
+
handle: {
740
+
type: 'string',
741
+
format: 'handle',
742
+
},
757
743
collections: {
758
744
type: 'array',
759
-
description:
760
-
'List of all the collections (NSIDs) for which this repo contains at least one record.',
761
745
items: {
762
746
type: 'string',
763
747
format: 'nsid',
764
748
},
749
+
description:
750
+
'List of all the collections (NSIDs) for which this repo contains at least one record.',
765
751
},
766
752
handleIsCorrect: {
767
753
type: 'boolean',
···
770
756
},
771
757
},
772
758
},
759
+
encoding: 'application/json',
773
760
},
761
+
parameters: {
762
+
type: 'params',
763
+
required: ['repo'],
764
+
properties: {
765
+
repo: {
766
+
type: 'string',
767
+
format: 'at-identifier',
768
+
description: 'The handle or DID of the repo.',
769
+
},
770
+
},
771
+
},
772
+
description:
773
+
'Get information about an account and repository, including the list of collections. Does not require auth.',
774
774
},
775
775
},
776
776
},
···
780
780
defs: {
781
781
main: {
782
782
type: 'query',
783
-
description:
784
-
'Get a single record from a repository. Does not require auth.',
785
-
parameters: {
786
-
type: 'params',
787
-
required: ['repo', 'collection', 'rkey'],
788
-
properties: {
789
-
repo: {
790
-
type: 'string',
791
-
format: 'at-identifier',
792
-
description: 'The handle or DID of the repo.',
793
-
},
794
-
collection: {
795
-
type: 'string',
796
-
format: 'nsid',
797
-
description: 'The NSID of the record collection.',
798
-
},
799
-
rkey: {
800
-
type: 'string',
801
-
description: 'The Record Key.',
802
-
format: 'record-key',
803
-
},
804
-
cid: {
805
-
type: 'string',
806
-
format: 'cid',
807
-
description:
808
-
'The CID of the version of the record. If not specified, then return the most recent version.',
809
-
},
783
+
errors: [
784
+
{
785
+
name: 'RecordNotFound',
810
786
},
811
-
},
787
+
],
812
788
output: {
813
-
encoding: 'application/json',
814
789
schema: {
815
790
type: 'object',
816
791
required: ['uri', 'value'],
817
792
properties: {
818
-
uri: {
819
-
type: 'string',
820
-
format: 'at-uri',
821
-
},
822
793
cid: {
823
794
type: 'string',
824
795
format: 'cid',
825
796
},
797
+
uri: {
798
+
type: 'string',
799
+
format: 'at-uri',
800
+
},
826
801
value: {
827
802
type: 'unknown',
828
803
},
829
804
},
830
805
},
806
+
encoding: 'application/json',
831
807
},
832
-
errors: [
833
-
{
834
-
name: 'RecordNotFound',
808
+
parameters: {
809
+
type: 'params',
810
+
required: ['repo', 'collection', 'rkey'],
811
+
properties: {
812
+
cid: {
813
+
type: 'string',
814
+
format: 'cid',
815
+
description:
816
+
'The CID of the version of the record. If not specified, then return the most recent version.',
817
+
},
818
+
repo: {
819
+
type: 'string',
820
+
format: 'at-identifier',
821
+
description: 'The handle or DID of the repo.',
822
+
},
823
+
rkey: {
824
+
type: 'string',
825
+
format: 'record-key',
826
+
description: 'The Record Key.',
827
+
},
828
+
collection: {
829
+
type: 'string',
830
+
format: 'nsid',
831
+
description: 'The NSID of the record collection.',
832
+
},
835
833
},
836
-
],
834
+
},
835
+
description:
836
+
'Get a single record from a repository. Does not require auth.',
837
837
},
838
838
},
839
839
},
···
843
843
defs: {
844
844
main: {
845
845
type: 'procedure',
846
-
description:
847
-
'Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.',
848
846
input: {
849
847
encoding: 'application/vnd.ipld.car',
850
848
},
849
+
description:
850
+
'Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.',
851
851
},
852
852
},
853
853
},
···
857
857
defs: {
858
858
main: {
859
859
type: 'query',
860
-
description:
861
-
'Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.',
862
-
parameters: {
863
-
type: 'params',
864
-
properties: {
865
-
limit: {
866
-
type: 'integer',
867
-
minimum: 1,
868
-
maximum: 1000,
869
-
default: 500,
870
-
},
871
-
cursor: {
872
-
type: 'string',
873
-
},
874
-
},
875
-
},
876
860
output: {
877
-
encoding: 'application/json',
878
861
schema: {
879
862
type: 'object',
880
863
required: ['blobs'],
881
864
properties: {
882
-
cursor: {
883
-
type: 'string',
884
-
},
885
865
blobs: {
886
866
type: 'array',
887
867
items: {
888
-
type: 'ref',
889
868
ref: 'lex:com.atproto.repo.listMissingBlobs#recordBlob',
869
+
type: 'ref',
890
870
},
891
871
},
872
+
cursor: {
873
+
type: 'string',
874
+
},
892
875
},
893
876
},
877
+
encoding: 'application/json',
894
878
},
879
+
parameters: {
880
+
type: 'params',
881
+
properties: {
882
+
limit: {
883
+
type: 'integer',
884
+
default: 500,
885
+
maximum: 1000,
886
+
minimum: 1,
887
+
},
888
+
cursor: {
889
+
type: 'string',
890
+
},
891
+
},
892
+
},
893
+
description:
894
+
'Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.',
895
895
},
896
896
recordBlob: {
897
897
type: 'object',
···
915
915
defs: {
916
916
main: {
917
917
type: 'query',
918
-
description:
919
-
'List a range of records in a repository, matching a specific collection. Does not require auth.',
918
+
output: {
919
+
schema: {
920
+
type: 'object',
921
+
required: ['records'],
922
+
properties: {
923
+
cursor: {
924
+
type: 'string',
925
+
},
926
+
records: {
927
+
type: 'array',
928
+
items: {
929
+
ref: 'lex:com.atproto.repo.listRecords#record',
930
+
type: 'ref',
931
+
},
932
+
},
933
+
},
934
+
},
935
+
encoding: 'application/json',
936
+
},
920
937
parameters: {
921
938
type: 'params',
922
939
required: ['repo', 'collection'],
···
925
942
type: 'string',
926
943
format: 'at-identifier',
927
944
description: 'The handle or DID of the repo.',
928
-
},
929
-
collection: {
930
-
type: 'string',
931
-
format: 'nsid',
932
-
description: 'The NSID of the record type.',
933
945
},
934
946
limit: {
935
947
type: 'integer',
936
-
minimum: 1,
937
-
maximum: 100,
938
948
default: 50,
949
+
maximum: 100,
950
+
minimum: 1,
939
951
description: 'The number of records to return.',
940
952
},
941
953
cursor: {
942
954
type: 'string',
943
955
},
944
-
rkeyStart: {
945
-
type: 'string',
946
-
description:
947
-
'DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)',
948
-
},
949
-
rkeyEnd: {
950
-
type: 'string',
951
-
description:
952
-
'DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)',
953
-
},
954
956
reverse: {
955
957
type: 'boolean',
956
958
description: 'Flag to reverse the order of the returned records.',
957
959
},
958
-
},
959
-
},
960
-
output: {
961
-
encoding: 'application/json',
962
-
schema: {
963
-
type: 'object',
964
-
required: ['records'],
965
-
properties: {
966
-
cursor: {
967
-
type: 'string',
968
-
},
969
-
records: {
970
-
type: 'array',
971
-
items: {
972
-
type: 'ref',
973
-
ref: 'lex:com.atproto.repo.listRecords#record',
974
-
},
975
-
},
960
+
collection: {
961
+
type: 'string',
962
+
format: 'nsid',
963
+
description: 'The NSID of the record type.',
976
964
},
977
965
},
978
966
},
967
+
description:
968
+
'List a range of records in a repository, matching a specific collection. Does not require auth.',
979
969
},
980
970
record: {
981
971
type: 'object',
982
972
required: ['uri', 'cid', 'value'],
983
973
properties: {
984
-
uri: {
985
-
type: 'string',
986
-
format: 'at-uri',
987
-
},
988
974
cid: {
989
975
type: 'string',
990
976
format: 'cid',
977
+
},
978
+
uri: {
979
+
type: 'string',
980
+
format: 'at-uri',
991
981
},
992
982
value: {
993
983
type: 'unknown',
···
1002
992
defs: {
1003
993
main: {
1004
994
type: 'procedure',
1005
-
description:
1006
-
'Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.',
1007
995
input: {
1008
-
encoding: 'application/json',
1009
996
schema: {
1010
997
type: 'object',
1011
-
required: ['repo', 'collection', 'rkey', 'record'],
1012
998
nullable: ['swapRecord'],
999
+
required: ['repo', 'collection', 'rkey', 'record'],
1013
1000
properties: {
1014
1001
repo: {
1015
1002
type: 'string',
···
1017
1004
description:
1018
1005
'The handle or DID of the repo (aka, current account).',
1019
1006
},
1020
-
collection: {
1021
-
type: 'string',
1022
-
format: 'nsid',
1023
-
description: 'The NSID of the record collection.',
1024
-
},
1025
1007
rkey: {
1026
1008
type: 'string',
1027
1009
format: 'record-key',
1028
-
description: 'The Record Key.',
1029
1010
maxLength: 512,
1011
+
description: 'The Record Key.',
1012
+
},
1013
+
record: {
1014
+
type: 'unknown',
1015
+
description: 'The record to write.',
1030
1016
},
1031
1017
validate: {
1032
1018
type: 'boolean',
1033
1019
description:
1034
1020
"Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons.",
1035
1021
},
1036
-
record: {
1037
-
type: 'unknown',
1038
-
description: 'The record to write.',
1022
+
collection: {
1023
+
type: 'string',
1024
+
format: 'nsid',
1025
+
description: 'The NSID of the record collection.',
1039
1026
},
1040
-
swapRecord: {
1027
+
swapCommit: {
1041
1028
type: 'string',
1042
1029
format: 'cid',
1043
1030
description:
1044
-
'Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation',
1031
+
'Compare and swap with the previous commit by CID.',
1045
1032
},
1046
-
swapCommit: {
1033
+
swapRecord: {
1047
1034
type: 'string',
1048
1035
format: 'cid',
1049
1036
description:
1050
-
'Compare and swap with the previous commit by CID.',
1037
+
'Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation',
1051
1038
},
1052
1039
},
1053
1040
},
1041
+
encoding: 'application/json',
1054
1042
},
1043
+
errors: [
1044
+
{
1045
+
name: 'InvalidSwap',
1046
+
},
1047
+
],
1055
1048
output: {
1056
-
encoding: 'application/json',
1057
1049
schema: {
1058
1050
type: 'object',
1059
1051
required: ['uri', 'cid'],
1060
1052
properties: {
1053
+
cid: {
1054
+
type: 'string',
1055
+
format: 'cid',
1056
+
},
1061
1057
uri: {
1062
1058
type: 'string',
1063
1059
format: 'at-uri',
1064
1060
},
1065
-
cid: {
1066
-
type: 'string',
1067
-
format: 'cid',
1068
-
},
1069
1061
commit: {
1070
-
type: 'ref',
1071
1062
ref: 'lex:com.atproto.repo.defs#commitMeta',
1063
+
type: 'ref',
1072
1064
},
1073
1065
validationStatus: {
1074
1066
type: 'string',
···
1076
1068
},
1077
1069
},
1078
1070
},
1071
+
encoding: 'application/json',
1079
1072
},
1080
-
errors: [
1081
-
{
1082
-
name: 'InvalidSwap',
1083
-
},
1084
-
],
1073
+
description:
1074
+
'Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.',
1085
1075
},
1086
1076
},
1087
1077
},
···
1094
1084
type: 'object',
1095
1085
required: ['uri', 'cid'],
1096
1086
properties: {
1097
-
uri: {
1098
-
type: 'string',
1099
-
format: 'at-uri',
1100
-
},
1101
1087
cid: {
1102
1088
type: 'string',
1103
1089
format: 'cid',
1090
+
},
1091
+
uri: {
1092
+
type: 'string',
1093
+
format: 'at-uri',
1104
1094
},
1105
1095
},
1106
1096
},
···
1112
1102
defs: {
1113
1103
main: {
1114
1104
type: 'procedure',
1115
-
description:
1116
-
'Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.',
1117
1105
input: {
1118
1106
encoding: '*/*',
1119
1107
},
1120
1108
output: {
1121
-
encoding: 'application/json',
1122
1109
schema: {
1123
1110
type: 'object',
1124
1111
required: ['blob'],
···
1128
1115
},
1129
1116
},
1130
1117
},
1118
+
encoding: 'application/json',
1131
1119
},
1120
+
description:
1121
+
'Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.',
1132
1122
},
1133
1123
},
1134
1124
},
···
1136
1126
lexicon: 1,
1137
1127
id: 'app.bsky.actor.defs',
1138
1128
defs: {
1129
+
nux: {
1130
+
type: 'object',
1131
+
required: ['id', 'completed'],
1132
+
properties: {
1133
+
id: {
1134
+
type: 'string',
1135
+
maxLength: 100,
1136
+
},
1137
+
data: {
1138
+
type: 'string',
1139
+
maxLength: 3000,
1140
+
description:
1141
+
'Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.',
1142
+
maxGraphemes: 300,
1143
+
},
1144
+
completed: {
1145
+
type: 'boolean',
1146
+
default: false,
1147
+
},
1148
+
expiresAt: {
1149
+
type: 'string',
1150
+
format: 'datetime',
1151
+
description:
1152
+
'The date and time at which the NUX will expire and should be considered completed.',
1153
+
},
1154
+
},
1155
+
description: 'A new user experiences (NUX) storage object',
1156
+
},
1157
+
mutedWord: {
1158
+
type: 'object',
1159
+
required: ['value', 'targets'],
1160
+
properties: {
1161
+
id: {
1162
+
type: 'string',
1163
+
},
1164
+
value: {
1165
+
type: 'string',
1166
+
maxLength: 10000,
1167
+
description: 'The muted word itself.',
1168
+
maxGraphemes: 1000,
1169
+
},
1170
+
targets: {
1171
+
type: 'array',
1172
+
items: {
1173
+
ref: 'lex:app.bsky.actor.defs#mutedWordTarget',
1174
+
type: 'ref',
1175
+
},
1176
+
description: 'The intended targets of the muted word.',
1177
+
},
1178
+
expiresAt: {
1179
+
type: 'string',
1180
+
format: 'datetime',
1181
+
description:
1182
+
'The date and time at which the muted word will expire and no longer be applied.',
1183
+
},
1184
+
actorTarget: {
1185
+
type: 'string',
1186
+
default: 'all',
1187
+
description:
1188
+
'Groups of users to apply the muted word to. If undefined, applies to all users.',
1189
+
knownValues: ['all', 'exclude-following'],
1190
+
},
1191
+
},
1192
+
description: 'A word that the account owner has muted.',
1193
+
},
1194
+
savedFeed: {
1195
+
type: 'object',
1196
+
required: ['id', 'type', 'value', 'pinned'],
1197
+
properties: {
1198
+
id: {
1199
+
type: 'string',
1200
+
},
1201
+
type: {
1202
+
type: 'string',
1203
+
knownValues: ['feed', 'list', 'timeline'],
1204
+
},
1205
+
value: {
1206
+
type: 'string',
1207
+
},
1208
+
pinned: {
1209
+
type: 'boolean',
1210
+
},
1211
+
},
1212
+
},
1213
+
preferences: {
1214
+
type: 'array',
1215
+
items: {
1216
+
refs: [
1217
+
'lex:app.bsky.actor.defs#adultContentPref',
1218
+
'lex:app.bsky.actor.defs#contentLabelPref',
1219
+
'lex:app.bsky.actor.defs#savedFeedsPref',
1220
+
'lex:app.bsky.actor.defs#savedFeedsPrefV2',
1221
+
'lex:app.bsky.actor.defs#personalDetailsPref',
1222
+
'lex:app.bsky.actor.defs#feedViewPref',
1223
+
'lex:app.bsky.actor.defs#threadViewPref',
1224
+
'lex:app.bsky.actor.defs#interestsPref',
1225
+
'lex:app.bsky.actor.defs#mutedWordsPref',
1226
+
'lex:app.bsky.actor.defs#hiddenPostsPref',
1227
+
'lex:app.bsky.actor.defs#bskyAppStatePref',
1228
+
'lex:app.bsky.actor.defs#labelersPref',
1229
+
'lex:app.bsky.actor.defs#postInteractionSettingsPref',
1230
+
],
1231
+
type: 'union',
1232
+
},
1233
+
},
1139
1234
profileView: {
1140
1235
type: 'object',
1141
1236
required: ['did', 'handle'],
···
1144
1239
type: 'string',
1145
1240
format: 'did',
1146
1241
},
1242
+
avatar: {
1243
+
type: 'string',
1244
+
format: 'uri',
1245
+
},
1147
1246
handle: {
1148
1247
type: 'string',
1149
1248
format: 'handle',
1150
1249
},
1250
+
labels: {
1251
+
type: 'array',
1252
+
items: {
1253
+
ref: 'lex:com.atproto.label.defs#label',
1254
+
type: 'ref',
1255
+
},
1256
+
},
1257
+
viewer: {
1258
+
ref: 'lex:app.bsky.actor.defs#viewerState',
1259
+
type: 'ref',
1260
+
},
1261
+
createdAt: {
1262
+
type: 'string',
1263
+
format: 'datetime',
1264
+
},
1265
+
indexedAt: {
1266
+
type: 'string',
1267
+
format: 'datetime',
1268
+
},
1269
+
associated: {
1270
+
ref: 'lex:app.bsky.actor.defs#profileAssociated',
1271
+
type: 'ref',
1272
+
},
1273
+
description: {
1274
+
type: 'string',
1275
+
maxLength: 2560,
1276
+
maxGraphemes: 256,
1277
+
},
1151
1278
displayName: {
1152
1279
type: 'string',
1280
+
maxLength: 640,
1153
1281
maxGraphemes: 64,
1154
-
maxLength: 640,
1282
+
},
1283
+
},
1284
+
},
1285
+
viewerState: {
1286
+
type: 'object',
1287
+
properties: {
1288
+
muted: {
1289
+
type: 'boolean',
1290
+
},
1291
+
blocking: {
1292
+
type: 'string',
1293
+
format: 'at-uri',
1294
+
},
1295
+
blockedBy: {
1296
+
type: 'boolean',
1297
+
},
1298
+
following: {
1299
+
type: 'string',
1300
+
format: 'at-uri',
1301
+
},
1302
+
followedBy: {
1303
+
type: 'string',
1304
+
format: 'at-uri',
1305
+
},
1306
+
mutedByList: {
1307
+
ref: 'lex:app.bsky.graph.defs#listViewBasic',
1308
+
type: 'ref',
1309
+
},
1310
+
blockingByList: {
1311
+
ref: 'lex:app.bsky.graph.defs#listViewBasic',
1312
+
type: 'ref',
1313
+
},
1314
+
knownFollowers: {
1315
+
ref: 'lex:app.bsky.actor.defs#knownFollowers',
1316
+
type: 'ref',
1317
+
},
1318
+
},
1319
+
description:
1320
+
"Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",
1321
+
},
1322
+
feedViewPref: {
1323
+
type: 'object',
1324
+
required: ['feed'],
1325
+
properties: {
1326
+
feed: {
1327
+
type: 'string',
1328
+
description:
1329
+
'The URI of the feed, or an identifier which describes the feed.',
1330
+
},
1331
+
hideReplies: {
1332
+
type: 'boolean',
1333
+
description: 'Hide replies in the feed.',
1334
+
},
1335
+
hideReposts: {
1336
+
type: 'boolean',
1337
+
description: 'Hide reposts in the feed.',
1338
+
},
1339
+
hideQuotePosts: {
1340
+
type: 'boolean',
1341
+
description: 'Hide quote posts in the feed.',
1342
+
},
1343
+
hideRepliesByLikeCount: {
1344
+
type: 'integer',
1345
+
description:
1346
+
'Hide replies in the feed if they do not have this number of likes.',
1347
+
},
1348
+
hideRepliesByUnfollowed: {
1349
+
type: 'boolean',
1350
+
default: true,
1351
+
description:
1352
+
'Hide replies in the feed if they are not by followed users.',
1353
+
},
1354
+
},
1355
+
},
1356
+
labelersPref: {
1357
+
type: 'object',
1358
+
required: ['labelers'],
1359
+
properties: {
1360
+
labelers: {
1361
+
type: 'array',
1362
+
items: {
1363
+
ref: 'lex:app.bsky.actor.defs#labelerPrefItem',
1364
+
type: 'ref',
1365
+
},
1366
+
},
1367
+
},
1368
+
},
1369
+
interestsPref: {
1370
+
type: 'object',
1371
+
required: ['tags'],
1372
+
properties: {
1373
+
tags: {
1374
+
type: 'array',
1375
+
items: {
1376
+
type: 'string',
1377
+
maxLength: 640,
1378
+
maxGraphemes: 64,
1379
+
},
1380
+
maxLength: 100,
1381
+
description:
1382
+
"A list of tags which describe the account owner's interests gathered during onboarding.",
1383
+
},
1384
+
},
1385
+
},
1386
+
knownFollowers: {
1387
+
type: 'object',
1388
+
required: ['count', 'followers'],
1389
+
properties: {
1390
+
count: {
1391
+
type: 'integer',
1392
+
},
1393
+
followers: {
1394
+
type: 'array',
1395
+
items: {
1396
+
ref: 'lex:app.bsky.actor.defs#profileViewBasic',
1397
+
type: 'ref',
1398
+
},
1399
+
maxLength: 5,
1400
+
minLength: 0,
1401
+
},
1402
+
},
1403
+
description: "The subject's followers whom you also follow",
1404
+
},
1405
+
mutedWordsPref: {
1406
+
type: 'object',
1407
+
required: ['items'],
1408
+
properties: {
1409
+
items: {
1410
+
type: 'array',
1411
+
items: {
1412
+
ref: 'lex:app.bsky.actor.defs#mutedWord',
1413
+
type: 'ref',
1414
+
},
1415
+
description: 'A list of words the account owner has muted.',
1416
+
},
1417
+
},
1418
+
},
1419
+
savedFeedsPref: {
1420
+
type: 'object',
1421
+
required: ['pinned', 'saved'],
1422
+
properties: {
1423
+
saved: {
1424
+
type: 'array',
1425
+
items: {
1426
+
type: 'string',
1427
+
format: 'at-uri',
1428
+
},
1429
+
},
1430
+
pinned: {
1431
+
type: 'array',
1432
+
items: {
1433
+
type: 'string',
1434
+
format: 'at-uri',
1435
+
},
1436
+
},
1437
+
timelineIndex: {
1438
+
type: 'integer',
1439
+
},
1440
+
},
1441
+
},
1442
+
threadViewPref: {
1443
+
type: 'object',
1444
+
properties: {
1445
+
sort: {
1446
+
type: 'string',
1447
+
description: 'Sorting mode for threads.',
1448
+
knownValues: [
1449
+
'oldest',
1450
+
'newest',
1451
+
'most-likes',
1452
+
'random',
1453
+
'hotness',
1454
+
],
1455
+
},
1456
+
prioritizeFollowedUsers: {
1457
+
type: 'boolean',
1458
+
description: 'Show followed users at the top of all replies.',
1459
+
},
1460
+
},
1461
+
},
1462
+
hiddenPostsPref: {
1463
+
type: 'object',
1464
+
required: ['items'],
1465
+
properties: {
1466
+
items: {
1467
+
type: 'array',
1468
+
items: {
1469
+
type: 'string',
1470
+
format: 'at-uri',
1471
+
},
1472
+
description:
1473
+
'A list of URIs of posts the account owner has hidden.',
1474
+
},
1475
+
},
1476
+
},
1477
+
labelerPrefItem: {
1478
+
type: 'object',
1479
+
required: ['did'],
1480
+
properties: {
1481
+
did: {
1482
+
type: 'string',
1483
+
format: 'did',
1484
+
},
1485
+
},
1486
+
},
1487
+
mutedWordTarget: {
1488
+
type: 'string',
1489
+
maxLength: 640,
1490
+
knownValues: ['content', 'tag'],
1491
+
maxGraphemes: 64,
1492
+
},
1493
+
adultContentPref: {
1494
+
type: 'object',
1495
+
required: ['enabled'],
1496
+
properties: {
1497
+
enabled: {
1498
+
type: 'boolean',
1499
+
default: false,
1500
+
},
1501
+
},
1502
+
},
1503
+
bskyAppStatePref: {
1504
+
type: 'object',
1505
+
properties: {
1506
+
nuxs: {
1507
+
type: 'array',
1508
+
items: {
1509
+
ref: 'lex:app.bsky.actor.defs#nux',
1510
+
type: 'ref',
1511
+
},
1512
+
maxLength: 100,
1513
+
description: 'Storage for NUXs the user has encountered.',
1514
+
},
1515
+
queuedNudges: {
1516
+
type: 'array',
1517
+
items: {
1518
+
type: 'string',
1519
+
maxLength: 100,
1520
+
},
1521
+
maxLength: 1000,
1522
+
description:
1523
+
'An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.',
1524
+
},
1525
+
activeProgressGuide: {
1526
+
ref: 'lex:app.bsky.actor.defs#bskyAppProgressGuide',
1527
+
type: 'ref',
1528
+
},
1529
+
},
1530
+
description:
1531
+
"A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.",
1532
+
},
1533
+
contentLabelPref: {
1534
+
type: 'object',
1535
+
required: ['label', 'visibility'],
1536
+
properties: {
1537
+
label: {
1538
+
type: 'string',
1539
+
},
1540
+
labelerDid: {
1541
+
type: 'string',
1542
+
format: 'did',
1543
+
description:
1544
+
'Which labeler does this preference apply to? If undefined, applies globally.',
1545
+
},
1546
+
visibility: {
1547
+
type: 'string',
1548
+
knownValues: ['ignore', 'show', 'warn', 'hide'],
1155
1549
},
1156
-
description: {
1550
+
},
1551
+
},
1552
+
profileViewBasic: {
1553
+
type: 'object',
1554
+
required: ['did', 'handle'],
1555
+
properties: {
1556
+
did: {
1157
1557
type: 'string',
1158
-
maxGraphemes: 256,
1159
-
maxLength: 2560,
1558
+
format: 'did',
1160
1559
},
1161
1560
avatar: {
1162
1561
type: 'string',
1163
1562
format: 'uri',
1164
1563
},
1165
-
indexedAt: {
1564
+
handle: {
1565
+
type: 'string',
1566
+
format: 'handle',
1567
+
},
1568
+
labels: {
1569
+
type: 'array',
1570
+
items: {
1571
+
ref: 'lex:com.atproto.label.defs#label',
1572
+
type: 'ref',
1573
+
},
1574
+
},
1575
+
viewer: {
1576
+
ref: 'lex:app.bsky.actor.defs#viewerState',
1577
+
type: 'ref',
1578
+
},
1579
+
createdAt: {
1166
1580
type: 'string',
1167
1581
format: 'datetime',
1168
1582
},
1169
-
createdAt: {
1583
+
associated: {
1584
+
ref: 'lex:app.bsky.actor.defs#profileAssociated',
1585
+
type: 'ref',
1586
+
},
1587
+
displayName: {
1588
+
type: 'string',
1589
+
maxLength: 640,
1590
+
maxGraphemes: 64,
1591
+
},
1592
+
},
1593
+
},
1594
+
savedFeedsPrefV2: {
1595
+
type: 'object',
1596
+
required: ['items'],
1597
+
properties: {
1598
+
items: {
1599
+
type: 'array',
1600
+
items: {
1601
+
ref: 'lex:app.bsky.actor.defs#savedFeed',
1602
+
type: 'ref',
1603
+
},
1604
+
},
1605
+
},
1606
+
},
1607
+
profileAssociated: {
1608
+
type: 'object',
1609
+
properties: {
1610
+
chat: {
1611
+
ref: 'lex:app.bsky.actor.defs#profileAssociatedChat',
1612
+
type: 'ref',
1613
+
},
1614
+
lists: {
1615
+
type: 'integer',
1616
+
},
1617
+
labeler: {
1618
+
type: 'boolean',
1619
+
},
1620
+
feedgens: {
1621
+
type: 'integer',
1622
+
},
1623
+
starterPacks: {
1624
+
type: 'integer',
1625
+
},
1626
+
},
1627
+
},
1628
+
personalDetailsPref: {
1629
+
type: 'object',
1630
+
properties: {
1631
+
birthDate: {
1170
1632
type: 'string',
1171
1633
format: 'datetime',
1634
+
description: 'The birth date of account owner.',
1635
+
},
1636
+
},
1637
+
},
1638
+
profileViewDetailed: {
1639
+
type: 'object',
1640
+
required: ['did', 'handle'],
1641
+
properties: {
1642
+
did: {
1643
+
type: 'string',
1644
+
format: 'did',
1645
+
},
1646
+
avatar: {
1647
+
type: 'string',
1648
+
format: 'uri',
1649
+
},
1650
+
banner: {
1651
+
type: 'string',
1652
+
format: 'uri',
1653
+
},
1654
+
handle: {
1655
+
type: 'string',
1656
+
format: 'handle',
1172
1657
},
1173
1658
labels: {
1174
1659
type: 'array',
1175
1660
items: {
1661
+
ref: 'lex:com.atproto.label.defs#label',
1176
1662
type: 'ref',
1177
-
ref: 'lex:com.atproto.label.defs#label',
1663
+
},
1664
+
},
1665
+
viewer: {
1666
+
ref: 'lex:app.bsky.actor.defs#viewerState',
1667
+
type: 'ref',
1668
+
},
1669
+
createdAt: {
1670
+
type: 'string',
1671
+
format: 'datetime',
1672
+
},
1673
+
indexedAt: {
1674
+
type: 'string',
1675
+
format: 'datetime',
1676
+
},
1677
+
associated: {
1678
+
ref: 'lex:app.bsky.actor.defs#profileAssociated',
1679
+
type: 'ref',
1680
+
},
1681
+
pinnedPost: {
1682
+
ref: 'lex:com.atproto.repo.strongRef',
1683
+
type: 'ref',
1684
+
},
1685
+
postsCount: {
1686
+
type: 'integer',
1687
+
},
1688
+
description: {
1689
+
type: 'string',
1690
+
maxLength: 2560,
1691
+
maxGraphemes: 256,
1692
+
},
1693
+
displayName: {
1694
+
type: 'string',
1695
+
maxLength: 640,
1696
+
maxGraphemes: 64,
1697
+
},
1698
+
followsCount: {
1699
+
type: 'integer',
1700
+
},
1701
+
followersCount: {
1702
+
type: 'integer',
1703
+
},
1704
+
joinedViaStarterPack: {
1705
+
ref: 'lex:app.bsky.graph.defs#starterPackViewBasic',
1706
+
type: 'ref',
1707
+
},
1708
+
},
1709
+
},
1710
+
bskyAppProgressGuide: {
1711
+
type: 'object',
1712
+
required: ['guide'],
1713
+
properties: {
1714
+
guide: {
1715
+
type: 'string',
1716
+
maxLength: 100,
1717
+
},
1718
+
},
1719
+
description:
1720
+
'If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.',
1721
+
},
1722
+
profileAssociatedChat: {
1723
+
type: 'object',
1724
+
required: ['allowIncoming'],
1725
+
properties: {
1726
+
allowIncoming: {
1727
+
type: 'string',
1728
+
knownValues: ['all', 'none', 'following'],
1729
+
},
1730
+
},
1731
+
},
1732
+
postInteractionSettingsPref: {
1733
+
type: 'object',
1734
+
required: [],
1735
+
properties: {
1736
+
threadgateAllowRules: {
1737
+
type: 'array',
1738
+
items: {
1739
+
refs: [
1740
+
'lex:app.bsky.feed.threadgate#mentionRule',
1741
+
'lex:app.bsky.feed.threadgate#followerRule',
1742
+
'lex:app.bsky.feed.threadgate#followingRule',
1743
+
'lex:app.bsky.feed.threadgate#listRule',
1744
+
],
1745
+
type: 'union',
1746
+
},
1747
+
maxLength: 5,
1748
+
description:
1749
+
'Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.',
1750
+
},
1751
+
postgateEmbeddingRules: {
1752
+
type: 'array',
1753
+
items: {
1754
+
refs: ['lex:app.bsky.feed.postgate#disableRule'],
1755
+
type: 'union',
1178
1756
},
1757
+
maxLength: 5,
1758
+
description:
1759
+
'Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.',
1179
1760
},
1180
1761
},
1762
+
description:
1763
+
'Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.',
1181
1764
},
1182
1765
},
1183
1766
},
···
1240
1823
},
1241
1824
},
1242
1825
},
1826
+
AppBskyEmbedDefs: {
1827
+
lexicon: 1,
1828
+
id: 'app.bsky.embed.defs',
1829
+
defs: {
1830
+
aspectRatio: {
1831
+
type: 'object',
1832
+
required: ['width', 'height'],
1833
+
properties: {
1834
+
width: {
1835
+
type: 'integer',
1836
+
minimum: 1,
1837
+
},
1838
+
height: {
1839
+
type: 'integer',
1840
+
minimum: 1,
1841
+
},
1842
+
},
1843
+
description:
1844
+
'width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.',
1845
+
},
1846
+
},
1847
+
},
1848
+
AppBskyEmbedExternal: {
1849
+
lexicon: 1,
1850
+
id: 'app.bsky.embed.external',
1851
+
defs: {
1852
+
main: {
1853
+
type: 'object',
1854
+
required: ['external'],
1855
+
properties: {
1856
+
external: {
1857
+
ref: 'lex:app.bsky.embed.external#external',
1858
+
type: 'ref',
1859
+
},
1860
+
},
1861
+
description:
1862
+
"A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).",
1863
+
},
1864
+
view: {
1865
+
type: 'object',
1866
+
required: ['external'],
1867
+
properties: {
1868
+
external: {
1869
+
ref: 'lex:app.bsky.embed.external#viewExternal',
1870
+
type: 'ref',
1871
+
},
1872
+
},
1873
+
},
1874
+
external: {
1875
+
type: 'object',
1876
+
required: ['uri', 'title', 'description'],
1877
+
properties: {
1878
+
uri: {
1879
+
type: 'string',
1880
+
format: 'uri',
1881
+
},
1882
+
thumb: {
1883
+
type: 'blob',
1884
+
accept: ['image/*'],
1885
+
maxSize: 1000000,
1886
+
},
1887
+
title: {
1888
+
type: 'string',
1889
+
},
1890
+
description: {
1891
+
type: 'string',
1892
+
},
1893
+
},
1894
+
},
1895
+
viewExternal: {
1896
+
type: 'object',
1897
+
required: ['uri', 'title', 'description'],
1898
+
properties: {
1899
+
uri: {
1900
+
type: 'string',
1901
+
format: 'uri',
1902
+
},
1903
+
thumb: {
1904
+
type: 'string',
1905
+
format: 'uri',
1906
+
},
1907
+
title: {
1908
+
type: 'string',
1909
+
},
1910
+
description: {
1911
+
type: 'string',
1912
+
},
1913
+
},
1914
+
},
1915
+
},
1916
+
},
1917
+
AppBskyEmbedImages: {
1918
+
lexicon: 1,
1919
+
id: 'app.bsky.embed.images',
1920
+
description: 'A set of images embedded in a Bluesky record (eg, a post).',
1921
+
defs: {
1922
+
main: {
1923
+
type: 'object',
1924
+
required: ['images'],
1925
+
properties: {
1926
+
images: {
1927
+
type: 'array',
1928
+
items: {
1929
+
ref: 'lex:app.bsky.embed.images#image',
1930
+
type: 'ref',
1931
+
},
1932
+
maxLength: 4,
1933
+
},
1934
+
},
1935
+
},
1936
+
view: {
1937
+
type: 'object',
1938
+
required: ['images'],
1939
+
properties: {
1940
+
images: {
1941
+
type: 'array',
1942
+
items: {
1943
+
ref: 'lex:app.bsky.embed.images#viewImage',
1944
+
type: 'ref',
1945
+
},
1946
+
maxLength: 4,
1947
+
},
1948
+
},
1949
+
},
1950
+
image: {
1951
+
type: 'object',
1952
+
required: ['image', 'alt'],
1953
+
properties: {
1954
+
alt: {
1955
+
type: 'string',
1956
+
description:
1957
+
'Alt text description of the image, for accessibility.',
1958
+
},
1959
+
image: {
1960
+
type: 'blob',
1961
+
accept: ['image/*'],
1962
+
maxSize: 1000000,
1963
+
},
1964
+
aspectRatio: {
1965
+
ref: 'lex:app.bsky.embed.defs#aspectRatio',
1966
+
type: 'ref',
1967
+
},
1968
+
},
1969
+
},
1970
+
viewImage: {
1971
+
type: 'object',
1972
+
required: ['thumb', 'fullsize', 'alt'],
1973
+
properties: {
1974
+
alt: {
1975
+
type: 'string',
1976
+
description:
1977
+
'Alt text description of the image, for accessibility.',
1978
+
},
1979
+
thumb: {
1980
+
type: 'string',
1981
+
format: 'uri',
1982
+
description:
1983
+
'Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.',
1984
+
},
1985
+
fullsize: {
1986
+
type: 'string',
1987
+
format: 'uri',
1988
+
description:
1989
+
'Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.',
1990
+
},
1991
+
aspectRatio: {
1992
+
ref: 'lex:app.bsky.embed.defs#aspectRatio',
1993
+
type: 'ref',
1994
+
},
1995
+
},
1996
+
},
1997
+
},
1998
+
},
1999
+
AppBskyEmbedRecord: {
2000
+
lexicon: 1,
2001
+
id: 'app.bsky.embed.record',
2002
+
description:
2003
+
'A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.',
2004
+
defs: {
2005
+
main: {
2006
+
type: 'object',
2007
+
required: ['record'],
2008
+
properties: {
2009
+
record: {
2010
+
ref: 'lex:com.atproto.repo.strongRef',
2011
+
type: 'ref',
2012
+
},
2013
+
},
2014
+
},
2015
+
view: {
2016
+
type: 'object',
2017
+
required: ['record'],
2018
+
properties: {
2019
+
record: {
2020
+
refs: [
2021
+
'lex:app.bsky.embed.record#viewRecord',
2022
+
'lex:app.bsky.embed.record#viewNotFound',
2023
+
'lex:app.bsky.embed.record#viewBlocked',
2024
+
'lex:app.bsky.embed.record#viewDetached',
2025
+
'lex:app.bsky.feed.defs#generatorView',
2026
+
'lex:app.bsky.graph.defs#listView',
2027
+
'lex:app.bsky.labeler.defs#labelerView',
2028
+
'lex:app.bsky.graph.defs#starterPackViewBasic',
2029
+
],
2030
+
type: 'union',
2031
+
},
2032
+
},
2033
+
},
2034
+
viewRecord: {
2035
+
type: 'object',
2036
+
required: ['uri', 'cid', 'author', 'value', 'indexedAt'],
2037
+
properties: {
2038
+
cid: {
2039
+
type: 'string',
2040
+
format: 'cid',
2041
+
},
2042
+
uri: {
2043
+
type: 'string',
2044
+
format: 'at-uri',
2045
+
},
2046
+
value: {
2047
+
type: 'unknown',
2048
+
description: 'The record data itself.',
2049
+
},
2050
+
author: {
2051
+
ref: 'lex:app.bsky.actor.defs#profileViewBasic',
2052
+
type: 'ref',
2053
+
},
2054
+
embeds: {
2055
+
type: 'array',
2056
+
items: {
2057
+
refs: [
2058
+
'lex:app.bsky.embed.images#view',
2059
+
'lex:app.bsky.embed.video#view',
2060
+
'lex:app.bsky.embed.external#view',
2061
+
'lex:app.bsky.embed.record#view',
2062
+
'lex:app.bsky.embed.recordWithMedia#view',
2063
+
],
2064
+
type: 'union',
2065
+
},
2066
+
},
2067
+
labels: {
2068
+
type: 'array',
2069
+
items: {
2070
+
ref: 'lex:com.atproto.label.defs#label',
2071
+
type: 'ref',
2072
+
},
2073
+
},
2074
+
indexedAt: {
2075
+
type: 'string',
2076
+
format: 'datetime',
2077
+
},
2078
+
likeCount: {
2079
+
type: 'integer',
2080
+
},
2081
+
quoteCount: {
2082
+
type: 'integer',
2083
+
},
2084
+
replyCount: {
2085
+
type: 'integer',
2086
+
},
2087
+
repostCount: {
2088
+
type: 'integer',
2089
+
},
2090
+
},
2091
+
},
2092
+
viewBlocked: {
2093
+
type: 'object',
2094
+
required: ['uri', 'blocked', 'author'],
2095
+
properties: {
2096
+
uri: {
2097
+
type: 'string',
2098
+
format: 'at-uri',
2099
+
},
2100
+
author: {
2101
+
ref: 'lex:app.bsky.feed.defs#blockedAuthor',
2102
+
type: 'ref',
2103
+
},
2104
+
blocked: {
2105
+
type: 'boolean',
2106
+
const: true,
2107
+
},
2108
+
},
2109
+
},
2110
+
viewDetached: {
2111
+
type: 'object',
2112
+
required: ['uri', 'detached'],
2113
+
properties: {
2114
+
uri: {
2115
+
type: 'string',
2116
+
format: 'at-uri',
2117
+
},
2118
+
detached: {
2119
+
type: 'boolean',
2120
+
const: true,
2121
+
},
2122
+
},
2123
+
},
2124
+
viewNotFound: {
2125
+
type: 'object',
2126
+
required: ['uri', 'notFound'],
2127
+
properties: {
2128
+
uri: {
2129
+
type: 'string',
2130
+
format: 'at-uri',
2131
+
},
2132
+
notFound: {
2133
+
type: 'boolean',
2134
+
const: true,
2135
+
},
2136
+
},
2137
+
},
2138
+
},
2139
+
},
2140
+
AppBskyEmbedRecordWithMedia: {
2141
+
lexicon: 1,
2142
+
id: 'app.bsky.embed.recordWithMedia',
2143
+
description:
2144
+
'A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.',
2145
+
defs: {
2146
+
main: {
2147
+
type: 'object',
2148
+
required: ['record', 'media'],
2149
+
properties: {
2150
+
media: {
2151
+
refs: [
2152
+
'lex:app.bsky.embed.images',
2153
+
'lex:app.bsky.embed.video',
2154
+
'lex:app.bsky.embed.external',
2155
+
],
2156
+
type: 'union',
2157
+
},
2158
+
record: {
2159
+
ref: 'lex:app.bsky.embed.record',
2160
+
type: 'ref',
2161
+
},
2162
+
},
2163
+
},
2164
+
view: {
2165
+
type: 'object',
2166
+
required: ['record', 'media'],
2167
+
properties: {
2168
+
media: {
2169
+
refs: [
2170
+
'lex:app.bsky.embed.images#view',
2171
+
'lex:app.bsky.embed.video#view',
2172
+
'lex:app.bsky.embed.external#view',
2173
+
],
2174
+
type: 'union',
2175
+
},
2176
+
record: {
2177
+
ref: 'lex:app.bsky.embed.record#view',
2178
+
type: 'ref',
2179
+
},
2180
+
},
2181
+
},
2182
+
},
2183
+
},
2184
+
AppBskyEmbedVideo: {
2185
+
lexicon: 1,
2186
+
id: 'app.bsky.embed.video',
2187
+
description: 'A video embedded in a Bluesky record (eg, a post).',
2188
+
defs: {
2189
+
main: {
2190
+
type: 'object',
2191
+
required: ['video'],
2192
+
properties: {
2193
+
alt: {
2194
+
type: 'string',
2195
+
maxLength: 10000,
2196
+
description:
2197
+
'Alt text description of the video, for accessibility.',
2198
+
maxGraphemes: 1000,
2199
+
},
2200
+
video: {
2201
+
type: 'blob',
2202
+
accept: ['video/mp4'],
2203
+
maxSize: 50000000,
2204
+
},
2205
+
captions: {
2206
+
type: 'array',
2207
+
items: {
2208
+
ref: 'lex:app.bsky.embed.video#caption',
2209
+
type: 'ref',
2210
+
},
2211
+
maxLength: 20,
2212
+
},
2213
+
aspectRatio: {
2214
+
ref: 'lex:app.bsky.embed.defs#aspectRatio',
2215
+
type: 'ref',
2216
+
},
2217
+
},
2218
+
},
2219
+
view: {
2220
+
type: 'object',
2221
+
required: ['cid', 'playlist'],
2222
+
properties: {
2223
+
alt: {
2224
+
type: 'string',
2225
+
maxLength: 10000,
2226
+
maxGraphemes: 1000,
2227
+
},
2228
+
cid: {
2229
+
type: 'string',
2230
+
format: 'cid',
2231
+
},
2232
+
playlist: {
2233
+
type: 'string',
2234
+
format: 'uri',
2235
+
},
2236
+
thumbnail: {
2237
+
type: 'string',
2238
+
format: 'uri',
2239
+
},
2240
+
aspectRatio: {
2241
+
ref: 'lex:app.bsky.embed.defs#aspectRatio',
2242
+
type: 'ref',
2243
+
},
2244
+
},
2245
+
},
2246
+
caption: {
2247
+
type: 'object',
2248
+
required: ['lang', 'file'],
2249
+
properties: {
2250
+
file: {
2251
+
type: 'blob',
2252
+
accept: ['text/vtt'],
2253
+
maxSize: 20000,
2254
+
},
2255
+
lang: {
2256
+
type: 'string',
2257
+
format: 'language',
2258
+
},
2259
+
},
2260
+
},
2261
+
},
2262
+
},
2263
+
AppBskyFeedDefs: {
2264
+
lexicon: 1,
2265
+
id: 'app.bsky.feed.defs',
2266
+
defs: {
2267
+
postView: {
2268
+
type: 'object',
2269
+
required: ['uri', 'cid', 'author', 'record', 'indexedAt'],
2270
+
properties: {
2271
+
cid: {
2272
+
type: 'string',
2273
+
format: 'cid',
2274
+
},
2275
+
uri: {
2276
+
type: 'string',
2277
+
format: 'at-uri',
2278
+
},
2279
+
embed: {
2280
+
refs: [
2281
+
'lex:app.bsky.embed.images#view',
2282
+
'lex:app.bsky.embed.video#view',
2283
+
'lex:app.bsky.embed.external#view',
2284
+
'lex:app.bsky.embed.record#view',
2285
+
'lex:app.bsky.embed.recordWithMedia#view',
2286
+
],
2287
+
type: 'union',
2288
+
},
2289
+
author: {
2290
+
ref: 'lex:app.bsky.actor.defs#profileViewBasic',
2291
+
type: 'ref',
2292
+
},
2293
+
labels: {
2294
+
type: 'array',
2295
+
items: {
2296
+
ref: 'lex:com.atproto.label.defs#label',
2297
+
type: 'ref',
2298
+
},
2299
+
},
2300
+
record: {
2301
+
type: 'unknown',
2302
+
},
2303
+
viewer: {
2304
+
ref: 'lex:app.bsky.feed.defs#viewerState',
2305
+
type: 'ref',
2306
+
},
2307
+
indexedAt: {
2308
+
type: 'string',
2309
+
format: 'datetime',
2310
+
},
2311
+
likeCount: {
2312
+
type: 'integer',
2313
+
},
2314
+
quoteCount: {
2315
+
type: 'integer',
2316
+
},
2317
+
replyCount: {
2318
+
type: 'integer',
2319
+
},
2320
+
threadgate: {
2321
+
ref: 'lex:app.bsky.feed.defs#threadgateView',
2322
+
type: 'ref',
2323
+
},
2324
+
repostCount: {
2325
+
type: 'integer',
2326
+
},
2327
+
},
2328
+
},
2329
+
replyRef: {
2330
+
type: 'object',
2331
+
required: ['root', 'parent'],
2332
+
properties: {
2333
+
root: {
2334
+
refs: [
2335
+
'lex:app.bsky.feed.defs#postView',
2336
+
'lex:app.bsky.feed.defs#notFoundPost',
2337
+
'lex:app.bsky.feed.defs#blockedPost',
2338
+
],
2339
+
type: 'union',
2340
+
},
2341
+
parent: {
2342
+
refs: [
2343
+
'lex:app.bsky.feed.defs#postView',
2344
+
'lex:app.bsky.feed.defs#notFoundPost',
2345
+
'lex:app.bsky.feed.defs#blockedPost',
2346
+
],
2347
+
type: 'union',
2348
+
},
2349
+
grandparentAuthor: {
2350
+
ref: 'lex:app.bsky.actor.defs#profileViewBasic',
2351
+
type: 'ref',
2352
+
description:
2353
+
'When parent is a reply to another post, this is the author of that post.',
2354
+
},
2355
+
},
2356
+
},
2357
+
reasonPin: {
2358
+
type: 'object',
2359
+
properties: {},
2360
+
},
2361
+
blockedPost: {
2362
+
type: 'object',
2363
+
required: ['uri', 'blocked', 'author'],
2364
+
properties: {
2365
+
uri: {
2366
+
type: 'string',
2367
+
format: 'at-uri',
2368
+
},
2369
+
author: {
2370
+
ref: 'lex:app.bsky.feed.defs#blockedAuthor',
2371
+
type: 'ref',
2372
+
},
2373
+
blocked: {
2374
+
type: 'boolean',
2375
+
const: true,
2376
+
},
2377
+
},
2378
+
},
2379
+
interaction: {
2380
+
type: 'object',
2381
+
properties: {
2382
+
item: {
2383
+
type: 'string',
2384
+
format: 'at-uri',
2385
+
},
2386
+
event: {
2387
+
type: 'string',
2388
+
knownValues: [
2389
+
'app.bsky.feed.defs#requestLess',
2390
+
'app.bsky.feed.defs#requestMore',
2391
+
'app.bsky.feed.defs#clickthroughItem',
2392
+
'app.bsky.feed.defs#clickthroughAuthor',
2393
+
'app.bsky.feed.defs#clickthroughReposter',
2394
+
'app.bsky.feed.defs#clickthroughEmbed',
2395
+
'app.bsky.feed.defs#interactionSeen',
2396
+
'app.bsky.feed.defs#interactionLike',
2397
+
'app.bsky.feed.defs#interactionRepost',
2398
+
'app.bsky.feed.defs#interactionReply',
2399
+
'app.bsky.feed.defs#interactionQuote',
2400
+
'app.bsky.feed.defs#interactionShare',
2401
+
],
2402
+
},
2403
+
feedContext: {
2404
+
type: 'string',
2405
+
maxLength: 2000,
2406
+
description:
2407
+
'Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.',
2408
+
},
2409
+
},
2410
+
},
2411
+
requestLess: {
2412
+
type: 'token',
2413
+
description:
2414
+
'Request that less content like the given feed item be shown in the feed',
2415
+
},
2416
+
requestMore: {
2417
+
type: 'token',
2418
+
description:
2419
+
'Request that more content like the given feed item be shown in the feed',
2420
+
},
2421
+
viewerState: {
2422
+
type: 'object',
2423
+
properties: {
2424
+
like: {
2425
+
type: 'string',
2426
+
format: 'at-uri',
2427
+
},
2428
+
pinned: {
2429
+
type: 'boolean',
2430
+
},
2431
+
repost: {
2432
+
type: 'string',
2433
+
format: 'at-uri',
2434
+
},
2435
+
threadMuted: {
2436
+
type: 'boolean',
2437
+
},
2438
+
replyDisabled: {
2439
+
type: 'boolean',
2440
+
},
2441
+
embeddingDisabled: {
2442
+
type: 'boolean',
2443
+
},
2444
+
},
2445
+
description:
2446
+
"Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",
2447
+
},
2448
+
feedViewPost: {
2449
+
type: 'object',
2450
+
required: ['post'],
2451
+
properties: {
2452
+
post: {
2453
+
ref: 'lex:app.bsky.feed.defs#postView',
2454
+
type: 'ref',
2455
+
},
2456
+
reply: {
2457
+
ref: 'lex:app.bsky.feed.defs#replyRef',
2458
+
type: 'ref',
2459
+
},
2460
+
reason: {
2461
+
refs: [
2462
+
'lex:app.bsky.feed.defs#reasonRepost',
2463
+
'lex:app.bsky.feed.defs#reasonPin',
2464
+
],
2465
+
type: 'union',
2466
+
},
2467
+
feedContext: {
2468
+
type: 'string',
2469
+
maxLength: 2000,
2470
+
description:
2471
+
'Context provided by feed generator that may be passed back alongside interactions.',
2472
+
},
2473
+
},
2474
+
},
2475
+
notFoundPost: {
2476
+
type: 'object',
2477
+
required: ['uri', 'notFound'],
2478
+
properties: {
2479
+
uri: {
2480
+
type: 'string',
2481
+
format: 'at-uri',
2482
+
},
2483
+
notFound: {
2484
+
type: 'boolean',
2485
+
const: true,
2486
+
},
2487
+
},
2488
+
},
2489
+
reasonRepost: {
2490
+
type: 'object',
2491
+
required: ['by', 'indexedAt'],
2492
+
properties: {
2493
+
by: {
2494
+
ref: 'lex:app.bsky.actor.defs#profileViewBasic',
2495
+
type: 'ref',
2496
+
},
2497
+
indexedAt: {
2498
+
type: 'string',
2499
+
format: 'datetime',
2500
+
},
2501
+
},
2502
+
},
2503
+
blockedAuthor: {
2504
+
type: 'object',
2505
+
required: ['did'],
2506
+
properties: {
2507
+
did: {
2508
+
type: 'string',
2509
+
format: 'did',
2510
+
},
2511
+
viewer: {
2512
+
ref: 'lex:app.bsky.actor.defs#viewerState',
2513
+
type: 'ref',
2514
+
},
2515
+
},
2516
+
},
2517
+
generatorView: {
2518
+
type: 'object',
2519
+
required: ['uri', 'cid', 'did', 'creator', 'displayName', 'indexedAt'],
2520
+
properties: {
2521
+
cid: {
2522
+
type: 'string',
2523
+
format: 'cid',
2524
+
},
2525
+
did: {
2526
+
type: 'string',
2527
+
format: 'did',
2528
+
},
2529
+
uri: {
2530
+
type: 'string',
2531
+
format: 'at-uri',
2532
+
},
2533
+
avatar: {
2534
+
type: 'string',
2535
+
format: 'uri',
2536
+
},
2537
+
labels: {
2538
+
type: 'array',
2539
+
items: {
2540
+
ref: 'lex:com.atproto.label.defs#label',
2541
+
type: 'ref',
2542
+
},
2543
+
},
2544
+
viewer: {
2545
+
ref: 'lex:app.bsky.feed.defs#generatorViewerState',
2546
+
type: 'ref',
2547
+
},
2548
+
creator: {
2549
+
ref: 'lex:app.bsky.actor.defs#profileView',
2550
+
type: 'ref',
2551
+
},
2552
+
indexedAt: {
2553
+
type: 'string',
2554
+
format: 'datetime',
2555
+
},
2556
+
likeCount: {
2557
+
type: 'integer',
2558
+
minimum: 0,
2559
+
},
2560
+
contentMode: {
2561
+
type: 'string',
2562
+
knownValues: [
2563
+
'app.bsky.feed.defs#contentModeUnspecified',
2564
+
'app.bsky.feed.defs#contentModeVideo',
2565
+
],
2566
+
},
2567
+
description: {
2568
+
type: 'string',
2569
+
maxLength: 3000,
2570
+
maxGraphemes: 300,
2571
+
},
2572
+
displayName: {
2573
+
type: 'string',
2574
+
},
2575
+
descriptionFacets: {
2576
+
type: 'array',
2577
+
items: {
2578
+
ref: 'lex:app.bsky.richtext.facet',
2579
+
type: 'ref',
2580
+
},
2581
+
},
2582
+
acceptsInteractions: {
2583
+
type: 'boolean',
2584
+
},
2585
+
},
2586
+
},
2587
+
threadContext: {
2588
+
type: 'object',
2589
+
properties: {
2590
+
rootAuthorLike: {
2591
+
type: 'string',
2592
+
format: 'at-uri',
2593
+
},
2594
+
},
2595
+
description:
2596
+
'Metadata about this post within the context of the thread it is in.',
2597
+
},
2598
+
threadViewPost: {
2599
+
type: 'object',
2600
+
required: ['post'],
2601
+
properties: {
2602
+
post: {
2603
+
ref: 'lex:app.bsky.feed.defs#postView',
2604
+
type: 'ref',
2605
+
},
2606
+
parent: {
2607
+
refs: [
2608
+
'lex:app.bsky.feed.defs#threadViewPost',
2609
+
'lex:app.bsky.feed.defs#notFoundPost',
2610
+
'lex:app.bsky.feed.defs#blockedPost',
2611
+
],
2612
+
type: 'union',
2613
+
},
2614
+
replies: {
2615
+
type: 'array',
2616
+
items: {
2617
+
refs: [
2618
+
'lex:app.bsky.feed.defs#threadViewPost',
2619
+
'lex:app.bsky.feed.defs#notFoundPost',
2620
+
'lex:app.bsky.feed.defs#blockedPost',
2621
+
],
2622
+
type: 'union',
2623
+
},
2624
+
},
2625
+
threadContext: {
2626
+
ref: 'lex:app.bsky.feed.defs#threadContext',
2627
+
type: 'ref',
2628
+
},
2629
+
},
2630
+
},
2631
+
threadgateView: {
2632
+
type: 'object',
2633
+
properties: {
2634
+
cid: {
2635
+
type: 'string',
2636
+
format: 'cid',
2637
+
},
2638
+
uri: {
2639
+
type: 'string',
2640
+
format: 'at-uri',
2641
+
},
2642
+
lists: {
2643
+
type: 'array',
2644
+
items: {
2645
+
ref: 'lex:app.bsky.graph.defs#listViewBasic',
2646
+
type: 'ref',
2647
+
},
2648
+
},
2649
+
record: {
2650
+
type: 'unknown',
2651
+
},
2652
+
},
2653
+
},
2654
+
interactionLike: {
2655
+
type: 'token',
2656
+
description: 'User liked the feed item',
2657
+
},
2658
+
interactionSeen: {
2659
+
type: 'token',
2660
+
description: 'Feed item was seen by user',
2661
+
},
2662
+
clickthroughItem: {
2663
+
type: 'token',
2664
+
description: 'User clicked through to the feed item',
2665
+
},
2666
+
contentModeVideo: {
2667
+
type: 'token',
2668
+
description:
2669
+
'Declares the feed generator returns posts containing app.bsky.embed.video embeds.',
2670
+
},
2671
+
interactionQuote: {
2672
+
type: 'token',
2673
+
description: 'User quoted the feed item',
2674
+
},
2675
+
interactionReply: {
2676
+
type: 'token',
2677
+
description: 'User replied to the feed item',
2678
+
},
2679
+
interactionShare: {
2680
+
type: 'token',
2681
+
description: 'User shared the feed item',
2682
+
},
2683
+
skeletonFeedPost: {
2684
+
type: 'object',
2685
+
required: ['post'],
2686
+
properties: {
2687
+
post: {
2688
+
type: 'string',
2689
+
format: 'at-uri',
2690
+
},
2691
+
reason: {
2692
+
refs: [
2693
+
'lex:app.bsky.feed.defs#skeletonReasonRepost',
2694
+
'lex:app.bsky.feed.defs#skeletonReasonPin',
2695
+
],
2696
+
type: 'union',
2697
+
},
2698
+
feedContext: {
2699
+
type: 'string',
2700
+
maxLength: 2000,
2701
+
description:
2702
+
'Context that will be passed through to client and may be passed to feed generator back alongside interactions.',
2703
+
},
2704
+
},
2705
+
},
2706
+
clickthroughEmbed: {
2707
+
type: 'token',
2708
+
description:
2709
+
'User clicked through to the embedded content of the feed item',
2710
+
},
2711
+
interactionRepost: {
2712
+
type: 'token',
2713
+
description: 'User reposted the feed item',
2714
+
},
2715
+
skeletonReasonPin: {
2716
+
type: 'object',
2717
+
properties: {},
2718
+
},
2719
+
clickthroughAuthor: {
2720
+
type: 'token',
2721
+
description: 'User clicked through to the author of the feed item',
2722
+
},
2723
+
clickthroughReposter: {
2724
+
type: 'token',
2725
+
description: 'User clicked through to the reposter of the feed item',
2726
+
},
2727
+
generatorViewerState: {
2728
+
type: 'object',
2729
+
properties: {
2730
+
like: {
2731
+
type: 'string',
2732
+
format: 'at-uri',
2733
+
},
2734
+
},
2735
+
},
2736
+
skeletonReasonRepost: {
2737
+
type: 'object',
2738
+
required: ['repost'],
2739
+
properties: {
2740
+
repost: {
2741
+
type: 'string',
2742
+
format: 'at-uri',
2743
+
},
2744
+
},
2745
+
},
2746
+
contentModeUnspecified: {
2747
+
type: 'token',
2748
+
description: 'Declares the feed generator returns any types of posts.',
2749
+
},
2750
+
},
2751
+
},
2752
+
AppBskyFeedPostgate: {
2753
+
lexicon: 1,
2754
+
id: 'app.bsky.feed.postgate',
2755
+
defs: {
2756
+
main: {
2757
+
key: 'tid',
2758
+
type: 'record',
2759
+
record: {
2760
+
type: 'object',
2761
+
required: ['post', 'createdAt'],
2762
+
properties: {
2763
+
post: {
2764
+
type: 'string',
2765
+
format: 'at-uri',
2766
+
description: 'Reference (AT-URI) to the post record.',
2767
+
},
2768
+
createdAt: {
2769
+
type: 'string',
2770
+
format: 'datetime',
2771
+
},
2772
+
embeddingRules: {
2773
+
type: 'array',
2774
+
items: {
2775
+
refs: ['lex:app.bsky.feed.postgate#disableRule'],
2776
+
type: 'union',
2777
+
},
2778
+
maxLength: 5,
2779
+
description:
2780
+
'List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.',
2781
+
},
2782
+
detachedEmbeddingUris: {
2783
+
type: 'array',
2784
+
items: {
2785
+
type: 'string',
2786
+
format: 'at-uri',
2787
+
},
2788
+
maxLength: 50,
2789
+
description:
2790
+
'List of AT-URIs embedding this post that the author has detached from.',
2791
+
},
2792
+
},
2793
+
},
2794
+
description:
2795
+
'Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository.',
2796
+
},
2797
+
disableRule: {
2798
+
type: 'object',
2799
+
properties: {},
2800
+
description: 'Disables embedding of this post.',
2801
+
},
2802
+
},
2803
+
},
2804
+
AppBskyFeedThreadgate: {
2805
+
lexicon: 1,
2806
+
id: 'app.bsky.feed.threadgate',
2807
+
defs: {
2808
+
main: {
2809
+
key: 'tid',
2810
+
type: 'record',
2811
+
record: {
2812
+
type: 'object',
2813
+
required: ['post', 'createdAt'],
2814
+
properties: {
2815
+
post: {
2816
+
type: 'string',
2817
+
format: 'at-uri',
2818
+
description: 'Reference (AT-URI) to the post record.',
2819
+
},
2820
+
allow: {
2821
+
type: 'array',
2822
+
items: {
2823
+
refs: [
2824
+
'lex:app.bsky.feed.threadgate#mentionRule',
2825
+
'lex:app.bsky.feed.threadgate#followerRule',
2826
+
'lex:app.bsky.feed.threadgate#followingRule',
2827
+
'lex:app.bsky.feed.threadgate#listRule',
2828
+
],
2829
+
type: 'union',
2830
+
},
2831
+
maxLength: 5,
2832
+
description:
2833
+
'List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.',
2834
+
},
2835
+
createdAt: {
2836
+
type: 'string',
2837
+
format: 'datetime',
2838
+
},
2839
+
hiddenReplies: {
2840
+
type: 'array',
2841
+
items: {
2842
+
type: 'string',
2843
+
format: 'at-uri',
2844
+
},
2845
+
maxLength: 50,
2846
+
description: 'List of hidden reply URIs.',
2847
+
},
2848
+
},
2849
+
},
2850
+
description:
2851
+
"Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.",
2852
+
},
2853
+
listRule: {
2854
+
type: 'object',
2855
+
required: ['list'],
2856
+
properties: {
2857
+
list: {
2858
+
type: 'string',
2859
+
format: 'at-uri',
2860
+
},
2861
+
},
2862
+
description: 'Allow replies from actors on a list.',
2863
+
},
2864
+
mentionRule: {
2865
+
type: 'object',
2866
+
properties: {},
2867
+
description: 'Allow replies from actors mentioned in your post.',
2868
+
},
2869
+
followerRule: {
2870
+
type: 'object',
2871
+
properties: {},
2872
+
description: 'Allow replies from actors who follow you.',
2873
+
},
2874
+
followingRule: {
2875
+
type: 'object',
2876
+
properties: {},
2877
+
description: 'Allow replies from actors you follow.',
2878
+
},
2879
+
},
2880
+
},
2881
+
AppBskyGraphDefs: {
2882
+
lexicon: 1,
2883
+
id: 'app.bsky.graph.defs',
2884
+
defs: {
2885
+
modlist: {
2886
+
type: 'token',
2887
+
description:
2888
+
'A list of actors to apply an aggregate moderation action (mute/block) on.',
2889
+
},
2890
+
listView: {
2891
+
type: 'object',
2892
+
required: ['uri', 'cid', 'creator', 'name', 'purpose', 'indexedAt'],
2893
+
properties: {
2894
+
cid: {
2895
+
type: 'string',
2896
+
format: 'cid',
2897
+
},
2898
+
uri: {
2899
+
type: 'string',
2900
+
format: 'at-uri',
2901
+
},
2902
+
name: {
2903
+
type: 'string',
2904
+
maxLength: 64,
2905
+
minLength: 1,
2906
+
},
2907
+
avatar: {
2908
+
type: 'string',
2909
+
format: 'uri',
2910
+
},
2911
+
labels: {
2912
+
type: 'array',
2913
+
items: {
2914
+
ref: 'lex:com.atproto.label.defs#label',
2915
+
type: 'ref',
2916
+
},
2917
+
},
2918
+
viewer: {
2919
+
ref: 'lex:app.bsky.graph.defs#listViewerState',
2920
+
type: 'ref',
2921
+
},
2922
+
creator: {
2923
+
ref: 'lex:app.bsky.actor.defs#profileView',
2924
+
type: 'ref',
2925
+
},
2926
+
purpose: {
2927
+
ref: 'lex:app.bsky.graph.defs#listPurpose',
2928
+
type: 'ref',
2929
+
},
2930
+
indexedAt: {
2931
+
type: 'string',
2932
+
format: 'datetime',
2933
+
},
2934
+
description: {
2935
+
type: 'string',
2936
+
maxLength: 3000,
2937
+
maxGraphemes: 300,
2938
+
},
2939
+
listItemCount: {
2940
+
type: 'integer',
2941
+
minimum: 0,
2942
+
},
2943
+
descriptionFacets: {
2944
+
type: 'array',
2945
+
items: {
2946
+
ref: 'lex:app.bsky.richtext.facet',
2947
+
type: 'ref',
2948
+
},
2949
+
},
2950
+
},
2951
+
},
2952
+
curatelist: {
2953
+
type: 'token',
2954
+
description:
2955
+
'A list of actors used for curation purposes such as list feeds or interaction gating.',
2956
+
},
2957
+
listPurpose: {
2958
+
type: 'string',
2959
+
knownValues: [
2960
+
'app.bsky.graph.defs#modlist',
2961
+
'app.bsky.graph.defs#curatelist',
2962
+
'app.bsky.graph.defs#referencelist',
2963
+
],
2964
+
},
2965
+
listItemView: {
2966
+
type: 'object',
2967
+
required: ['uri', 'subject'],
2968
+
properties: {
2969
+
uri: {
2970
+
type: 'string',
2971
+
format: 'at-uri',
2972
+
},
2973
+
subject: {
2974
+
ref: 'lex:app.bsky.actor.defs#profileView',
2975
+
type: 'ref',
2976
+
},
2977
+
},
2978
+
},
2979
+
relationship: {
2980
+
type: 'object',
2981
+
required: ['did'],
2982
+
properties: {
2983
+
did: {
2984
+
type: 'string',
2985
+
format: 'did',
2986
+
},
2987
+
following: {
2988
+
type: 'string',
2989
+
format: 'at-uri',
2990
+
description:
2991
+
'if the actor follows this DID, this is the AT-URI of the follow record',
2992
+
},
2993
+
followedBy: {
2994
+
type: 'string',
2995
+
format: 'at-uri',
2996
+
description:
2997
+
'if the actor is followed by this DID, contains the AT-URI of the follow record',
2998
+
},
2999
+
},
3000
+
description:
3001
+
'lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)',
3002
+
},
3003
+
listViewBasic: {
3004
+
type: 'object',
3005
+
required: ['uri', 'cid', 'name', 'purpose'],
3006
+
properties: {
3007
+
cid: {
3008
+
type: 'string',
3009
+
format: 'cid',
3010
+
},
3011
+
uri: {
3012
+
type: 'string',
3013
+
format: 'at-uri',
3014
+
},
3015
+
name: {
3016
+
type: 'string',
3017
+
maxLength: 64,
3018
+
minLength: 1,
3019
+
},
3020
+
avatar: {
3021
+
type: 'string',
3022
+
format: 'uri',
3023
+
},
3024
+
labels: {
3025
+
type: 'array',
3026
+
items: {
3027
+
ref: 'lex:com.atproto.label.defs#label',
3028
+
type: 'ref',
3029
+
},
3030
+
},
3031
+
viewer: {
3032
+
ref: 'lex:app.bsky.graph.defs#listViewerState',
3033
+
type: 'ref',
3034
+
},
3035
+
purpose: {
3036
+
ref: 'lex:app.bsky.graph.defs#listPurpose',
3037
+
type: 'ref',
3038
+
},
3039
+
indexedAt: {
3040
+
type: 'string',
3041
+
format: 'datetime',
3042
+
},
3043
+
listItemCount: {
3044
+
type: 'integer',
3045
+
minimum: 0,
3046
+
},
3047
+
},
3048
+
},
3049
+
notFoundActor: {
3050
+
type: 'object',
3051
+
required: ['actor', 'notFound'],
3052
+
properties: {
3053
+
actor: {
3054
+
type: 'string',
3055
+
format: 'at-identifier',
3056
+
},
3057
+
notFound: {
3058
+
type: 'boolean',
3059
+
const: true,
3060
+
},
3061
+
},
3062
+
description: 'indicates that a handle or DID could not be resolved',
3063
+
},
3064
+
referencelist: {
3065
+
type: 'token',
3066
+
description:
3067
+
'A list of actors used for only for reference purposes such as within a starter pack.',
3068
+
},
3069
+
listViewerState: {
3070
+
type: 'object',
3071
+
properties: {
3072
+
muted: {
3073
+
type: 'boolean',
3074
+
},
3075
+
blocked: {
3076
+
type: 'string',
3077
+
format: 'at-uri',
3078
+
},
3079
+
},
3080
+
},
3081
+
starterPackView: {
3082
+
type: 'object',
3083
+
required: ['uri', 'cid', 'record', 'creator', 'indexedAt'],
3084
+
properties: {
3085
+
cid: {
3086
+
type: 'string',
3087
+
format: 'cid',
3088
+
},
3089
+
uri: {
3090
+
type: 'string',
3091
+
format: 'at-uri',
3092
+
},
3093
+
list: {
3094
+
ref: 'lex:app.bsky.graph.defs#listViewBasic',
3095
+
type: 'ref',
3096
+
},
3097
+
feeds: {
3098
+
type: 'array',
3099
+
items: {
3100
+
ref: 'lex:app.bsky.feed.defs#generatorView',
3101
+
type: 'ref',
3102
+
},
3103
+
maxLength: 3,
3104
+
},
3105
+
labels: {
3106
+
type: 'array',
3107
+
items: {
3108
+
ref: 'lex:com.atproto.label.defs#label',
3109
+
type: 'ref',
3110
+
},
3111
+
},
3112
+
record: {
3113
+
type: 'unknown',
3114
+
},
3115
+
creator: {
3116
+
ref: 'lex:app.bsky.actor.defs#profileViewBasic',
3117
+
type: 'ref',
3118
+
},
3119
+
indexedAt: {
3120
+
type: 'string',
3121
+
format: 'datetime',
3122
+
},
3123
+
joinedWeekCount: {
3124
+
type: 'integer',
3125
+
minimum: 0,
3126
+
},
3127
+
listItemsSample: {
3128
+
type: 'array',
3129
+
items: {
3130
+
ref: 'lex:app.bsky.graph.defs#listItemView',
3131
+
type: 'ref',
3132
+
},
3133
+
maxLength: 12,
3134
+
},
3135
+
joinedAllTimeCount: {
3136
+
type: 'integer',
3137
+
minimum: 0,
3138
+
},
3139
+
},
3140
+
},
3141
+
starterPackViewBasic: {
3142
+
type: 'object',
3143
+
required: ['uri', 'cid', 'record', 'creator', 'indexedAt'],
3144
+
properties: {
3145
+
cid: {
3146
+
type: 'string',
3147
+
format: 'cid',
3148
+
},
3149
+
uri: {
3150
+
type: 'string',
3151
+
format: 'at-uri',
3152
+
},
3153
+
labels: {
3154
+
type: 'array',
3155
+
items: {
3156
+
ref: 'lex:com.atproto.label.defs#label',
3157
+
type: 'ref',
3158
+
},
3159
+
},
3160
+
record: {
3161
+
type: 'unknown',
3162
+
},
3163
+
creator: {
3164
+
ref: 'lex:app.bsky.actor.defs#profileViewBasic',
3165
+
type: 'ref',
3166
+
},
3167
+
indexedAt: {
3168
+
type: 'string',
3169
+
format: 'datetime',
3170
+
},
3171
+
listItemCount: {
3172
+
type: 'integer',
3173
+
minimum: 0,
3174
+
},
3175
+
joinedWeekCount: {
3176
+
type: 'integer',
3177
+
minimum: 0,
3178
+
},
3179
+
joinedAllTimeCount: {
3180
+
type: 'integer',
3181
+
minimum: 0,
3182
+
},
3183
+
},
3184
+
},
3185
+
},
3186
+
},
3187
+
AppBskyLabelerDefs: {
3188
+
lexicon: 1,
3189
+
id: 'app.bsky.labeler.defs',
3190
+
defs: {
3191
+
labelerView: {
3192
+
type: 'object',
3193
+
required: ['uri', 'cid', 'creator', 'indexedAt'],
3194
+
properties: {
3195
+
cid: {
3196
+
type: 'string',
3197
+
format: 'cid',
3198
+
},
3199
+
uri: {
3200
+
type: 'string',
3201
+
format: 'at-uri',
3202
+
},
3203
+
labels: {
3204
+
type: 'array',
3205
+
items: {
3206
+
ref: 'lex:com.atproto.label.defs#label',
3207
+
type: 'ref',
3208
+
},
3209
+
},
3210
+
viewer: {
3211
+
ref: 'lex:app.bsky.labeler.defs#labelerViewerState',
3212
+
type: 'ref',
3213
+
},
3214
+
creator: {
3215
+
ref: 'lex:app.bsky.actor.defs#profileView',
3216
+
type: 'ref',
3217
+
},
3218
+
indexedAt: {
3219
+
type: 'string',
3220
+
format: 'datetime',
3221
+
},
3222
+
likeCount: {
3223
+
type: 'integer',
3224
+
minimum: 0,
3225
+
},
3226
+
},
3227
+
},
3228
+
labelerPolicies: {
3229
+
type: 'object',
3230
+
required: ['labelValues'],
3231
+
properties: {
3232
+
labelValues: {
3233
+
type: 'array',
3234
+
items: {
3235
+
ref: 'lex:com.atproto.label.defs#labelValue',
3236
+
type: 'ref',
3237
+
},
3238
+
description:
3239
+
'The label values which this labeler publishes. May include global or custom labels.',
3240
+
},
3241
+
labelValueDefinitions: {
3242
+
type: 'array',
3243
+
items: {
3244
+
ref: 'lex:com.atproto.label.defs#labelValueDefinition',
3245
+
type: 'ref',
3246
+
},
3247
+
description:
3248
+
'Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.',
3249
+
},
3250
+
},
3251
+
},
3252
+
labelerViewerState: {
3253
+
type: 'object',
3254
+
properties: {
3255
+
like: {
3256
+
type: 'string',
3257
+
format: 'at-uri',
3258
+
},
3259
+
},
3260
+
},
3261
+
labelerViewDetailed: {
3262
+
type: 'object',
3263
+
required: ['uri', 'cid', 'creator', 'policies', 'indexedAt'],
3264
+
properties: {
3265
+
cid: {
3266
+
type: 'string',
3267
+
format: 'cid',
3268
+
},
3269
+
uri: {
3270
+
type: 'string',
3271
+
format: 'at-uri',
3272
+
},
3273
+
labels: {
3274
+
type: 'array',
3275
+
items: {
3276
+
ref: 'lex:com.atproto.label.defs#label',
3277
+
type: 'ref',
3278
+
},
3279
+
},
3280
+
viewer: {
3281
+
ref: 'lex:app.bsky.labeler.defs#labelerViewerState',
3282
+
type: 'ref',
3283
+
},
3284
+
creator: {
3285
+
ref: 'lex:app.bsky.actor.defs#profileView',
3286
+
type: 'ref',
3287
+
},
3288
+
policies: {
3289
+
ref: 'lex:app.bsky.labeler.defs#labelerPolicies',
3290
+
type: 'ref',
3291
+
},
3292
+
indexedAt: {
3293
+
type: 'string',
3294
+
format: 'datetime',
3295
+
},
3296
+
likeCount: {
3297
+
type: 'integer',
3298
+
minimum: 0,
3299
+
},
3300
+
},
3301
+
},
3302
+
},
3303
+
},
3304
+
AppBskyRichtextFacet: {
3305
+
lexicon: 1,
3306
+
id: 'app.bsky.richtext.facet',
3307
+
defs: {
3308
+
tag: {
3309
+
type: 'object',
3310
+
required: ['tag'],
3311
+
properties: {
3312
+
tag: {
3313
+
type: 'string',
3314
+
maxLength: 640,
3315
+
maxGraphemes: 64,
3316
+
},
3317
+
},
3318
+
description:
3319
+
"Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').",
3320
+
},
3321
+
link: {
3322
+
type: 'object',
3323
+
required: ['uri'],
3324
+
properties: {
3325
+
uri: {
3326
+
type: 'string',
3327
+
format: 'uri',
3328
+
},
3329
+
},
3330
+
description:
3331
+
'Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.',
3332
+
},
3333
+
main: {
3334
+
type: 'object',
3335
+
required: ['index', 'features'],
3336
+
properties: {
3337
+
index: {
3338
+
ref: 'lex:app.bsky.richtext.facet#byteSlice',
3339
+
type: 'ref',
3340
+
},
3341
+
features: {
3342
+
type: 'array',
3343
+
items: {
3344
+
refs: [
3345
+
'lex:app.bsky.richtext.facet#mention',
3346
+
'lex:app.bsky.richtext.facet#link',
3347
+
'lex:app.bsky.richtext.facet#tag',
3348
+
],
3349
+
type: 'union',
3350
+
},
3351
+
},
3352
+
},
3353
+
description: 'Annotation of a sub-string within rich text.',
3354
+
},
3355
+
mention: {
3356
+
type: 'object',
3357
+
required: ['did'],
3358
+
properties: {
3359
+
did: {
3360
+
type: 'string',
3361
+
format: 'did',
3362
+
},
3363
+
},
3364
+
description:
3365
+
"Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.",
3366
+
},
3367
+
byteSlice: {
3368
+
type: 'object',
3369
+
required: ['byteStart', 'byteEnd'],
3370
+
properties: {
3371
+
byteEnd: {
3372
+
type: 'integer',
3373
+
minimum: 0,
3374
+
},
3375
+
byteStart: {
3376
+
type: 'integer',
3377
+
minimum: 0,
3378
+
},
3379
+
},
3380
+
description:
3381
+
'Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.',
3382
+
},
3383
+
},
3384
+
},
1243
3385
} as const satisfies Record<string, LexiconDoc>
1244
3386
1245
3387
export const schemas = Object.values(schemaDict) satisfies LexiconDoc[]
···
1294
3436
ComAtprotoRepoUploadBlob: 'com.atproto.repo.uploadBlob',
1295
3437
AppBskyActorDefs: 'app.bsky.actor.defs',
1296
3438
AppBskyActorProfile: 'app.bsky.actor.profile',
3439
+
AppBskyEmbedDefs: 'app.bsky.embed.defs',
3440
+
AppBskyEmbedExternal: 'app.bsky.embed.external',
3441
+
AppBskyEmbedImages: 'app.bsky.embed.images',
3442
+
AppBskyEmbedRecord: 'app.bsky.embed.record',
3443
+
AppBskyEmbedRecordWithMedia: 'app.bsky.embed.recordWithMedia',
3444
+
AppBskyEmbedVideo: 'app.bsky.embed.video',
3445
+
AppBskyFeedDefs: 'app.bsky.feed.defs',
3446
+
AppBskyFeedPostgate: 'app.bsky.feed.postgate',
3447
+
AppBskyFeedThreadgate: 'app.bsky.feed.threadgate',
3448
+
AppBskyGraphDefs: 'app.bsky.graph.defs',
3449
+
AppBskyLabelerDefs: 'app.bsky.labeler.defs',
3450
+
AppBskyRichtextFacet: 'app.bsky.richtext.facet',
1297
3451
} as const
+496
-5
packages/lexicon/src/types/app/bsky/actor/defs.ts
+496
-5
packages/lexicon/src/types/app/bsky/actor/defs.ts
···
7
7
import { validate as _validate } from '../../../../lexicons'
8
8
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
9
import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
10
+
import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
11
+
import type * as AppBskyFeedPostgate from '../feed/postgate.js'
12
+
import type * as AppBskyFeedThreadgate from '../feed/threadgate.js'
13
+
import type * as AppBskyGraphDefs from '../graph/defs.js'
10
14
11
15
const is$typed = _is$typed,
12
16
validate = _validate
13
17
const id = 'app.bsky.actor.defs'
14
18
19
+
/** A new user experiences (NUX) storage object */
20
+
export interface Nux {
21
+
$type?: 'app.bsky.actor.defs#nux'
22
+
id: string
23
+
/** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. */
24
+
data?: string
25
+
completed: boolean
26
+
/** The date and time at which the NUX will expire and should be considered completed. */
27
+
expiresAt?: string
28
+
}
29
+
30
+
const hashNux = 'nux'
31
+
32
+
export function isNux<V>(v: V) {
33
+
return is$typed(v, id, hashNux)
34
+
}
35
+
36
+
export function validateNux<V>(v: V) {
37
+
return validate<Nux & V>(v, id, hashNux)
38
+
}
39
+
40
+
/** A word that the account owner has muted. */
41
+
export interface MutedWord {
42
+
$type?: 'app.bsky.actor.defs#mutedWord'
43
+
id?: string
44
+
/** The muted word itself. */
45
+
value: string
46
+
/** The intended targets of the muted word. */
47
+
targets: MutedWordTarget[]
48
+
/** The date and time at which the muted word will expire and no longer be applied. */
49
+
expiresAt?: string
50
+
/** Groups of users to apply the muted word to. If undefined, applies to all users. */
51
+
actorTarget: 'all' | 'exclude-following' | (string & {})
52
+
}
53
+
54
+
const hashMutedWord = 'mutedWord'
55
+
56
+
export function isMutedWord<V>(v: V) {
57
+
return is$typed(v, id, hashMutedWord)
58
+
}
59
+
60
+
export function validateMutedWord<V>(v: V) {
61
+
return validate<MutedWord & V>(v, id, hashMutedWord)
62
+
}
63
+
64
+
export interface SavedFeed {
65
+
$type?: 'app.bsky.actor.defs#savedFeed'
66
+
id: string
67
+
type: 'feed' | 'list' | 'timeline' | (string & {})
68
+
value: string
69
+
pinned: boolean
70
+
}
71
+
72
+
const hashSavedFeed = 'savedFeed'
73
+
74
+
export function isSavedFeed<V>(v: V) {
75
+
return is$typed(v, id, hashSavedFeed)
76
+
}
77
+
78
+
export function validateSavedFeed<V>(v: V) {
79
+
return validate<SavedFeed & V>(v, id, hashSavedFeed)
80
+
}
81
+
82
+
export type Preferences = (
83
+
| $Typed<AdultContentPref>
84
+
| $Typed<ContentLabelPref>
85
+
| $Typed<SavedFeedsPref>
86
+
| $Typed<SavedFeedsPrefV2>
87
+
| $Typed<PersonalDetailsPref>
88
+
| $Typed<FeedViewPref>
89
+
| $Typed<ThreadViewPref>
90
+
| $Typed<InterestsPref>
91
+
| $Typed<MutedWordsPref>
92
+
| $Typed<HiddenPostsPref>
93
+
| $Typed<BskyAppStatePref>
94
+
| $Typed<LabelersPref>
95
+
| $Typed<PostInteractionSettingsPref>
96
+
| { $type: string }
97
+
)[]
98
+
15
99
export interface ProfileView {
16
100
$type?: 'app.bsky.actor.defs#profileView'
17
101
did: string
18
-
handle: string
19
-
displayName?: string
20
-
description?: string
21
102
avatar?: string
22
-
indexedAt?: string
103
+
handle: string
104
+
labels?: ComAtprotoLabelDefs.Label[]
105
+
viewer?: ViewerState
23
106
createdAt?: string
24
-
labels?: ComAtprotoLabelDefs.Label[]
107
+
indexedAt?: string
108
+
associated?: ProfileAssociated
109
+
description?: string
110
+
displayName?: string
25
111
}
26
112
27
113
const hashProfileView = 'profileView'
···
33
119
export function validateProfileView<V>(v: V) {
34
120
return validate<ProfileView & V>(v, id, hashProfileView)
35
121
}
122
+
123
+
/** Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. */
124
+
export interface ViewerState {
125
+
$type?: 'app.bsky.actor.defs#viewerState'
126
+
muted?: boolean
127
+
blocking?: string
128
+
blockedBy?: boolean
129
+
following?: string
130
+
followedBy?: string
131
+
mutedByList?: AppBskyGraphDefs.ListViewBasic
132
+
blockingByList?: AppBskyGraphDefs.ListViewBasic
133
+
knownFollowers?: KnownFollowers
134
+
}
135
+
136
+
const hashViewerState = 'viewerState'
137
+
138
+
export function isViewerState<V>(v: V) {
139
+
return is$typed(v, id, hashViewerState)
140
+
}
141
+
142
+
export function validateViewerState<V>(v: V) {
143
+
return validate<ViewerState & V>(v, id, hashViewerState)
144
+
}
145
+
146
+
export interface FeedViewPref {
147
+
$type?: 'app.bsky.actor.defs#feedViewPref'
148
+
/** The URI of the feed, or an identifier which describes the feed. */
149
+
feed: string
150
+
/** Hide replies in the feed. */
151
+
hideReplies?: boolean
152
+
/** Hide reposts in the feed. */
153
+
hideReposts?: boolean
154
+
/** Hide quote posts in the feed. */
155
+
hideQuotePosts?: boolean
156
+
/** Hide replies in the feed if they do not have this number of likes. */
157
+
hideRepliesByLikeCount?: number
158
+
/** Hide replies in the feed if they are not by followed users. */
159
+
hideRepliesByUnfollowed: boolean
160
+
}
161
+
162
+
const hashFeedViewPref = 'feedViewPref'
163
+
164
+
export function isFeedViewPref<V>(v: V) {
165
+
return is$typed(v, id, hashFeedViewPref)
166
+
}
167
+
168
+
export function validateFeedViewPref<V>(v: V) {
169
+
return validate<FeedViewPref & V>(v, id, hashFeedViewPref)
170
+
}
171
+
172
+
export interface LabelersPref {
173
+
$type?: 'app.bsky.actor.defs#labelersPref'
174
+
labelers: LabelerPrefItem[]
175
+
}
176
+
177
+
const hashLabelersPref = 'labelersPref'
178
+
179
+
export function isLabelersPref<V>(v: V) {
180
+
return is$typed(v, id, hashLabelersPref)
181
+
}
182
+
183
+
export function validateLabelersPref<V>(v: V) {
184
+
return validate<LabelersPref & V>(v, id, hashLabelersPref)
185
+
}
186
+
187
+
export interface InterestsPref {
188
+
$type?: 'app.bsky.actor.defs#interestsPref'
189
+
/** A list of tags which describe the account owner's interests gathered during onboarding. */
190
+
tags: string[]
191
+
}
192
+
193
+
const hashInterestsPref = 'interestsPref'
194
+
195
+
export function isInterestsPref<V>(v: V) {
196
+
return is$typed(v, id, hashInterestsPref)
197
+
}
198
+
199
+
export function validateInterestsPref<V>(v: V) {
200
+
return validate<InterestsPref & V>(v, id, hashInterestsPref)
201
+
}
202
+
203
+
/** The subject's followers whom you also follow */
204
+
export interface KnownFollowers {
205
+
$type?: 'app.bsky.actor.defs#knownFollowers'
206
+
count: number
207
+
followers: ProfileViewBasic[]
208
+
}
209
+
210
+
const hashKnownFollowers = 'knownFollowers'
211
+
212
+
export function isKnownFollowers<V>(v: V) {
213
+
return is$typed(v, id, hashKnownFollowers)
214
+
}
215
+
216
+
export function validateKnownFollowers<V>(v: V) {
217
+
return validate<KnownFollowers & V>(v, id, hashKnownFollowers)
218
+
}
219
+
220
+
export interface MutedWordsPref {
221
+
$type?: 'app.bsky.actor.defs#mutedWordsPref'
222
+
/** A list of words the account owner has muted. */
223
+
items: MutedWord[]
224
+
}
225
+
226
+
const hashMutedWordsPref = 'mutedWordsPref'
227
+
228
+
export function isMutedWordsPref<V>(v: V) {
229
+
return is$typed(v, id, hashMutedWordsPref)
230
+
}
231
+
232
+
export function validateMutedWordsPref<V>(v: V) {
233
+
return validate<MutedWordsPref & V>(v, id, hashMutedWordsPref)
234
+
}
235
+
236
+
export interface SavedFeedsPref {
237
+
$type?: 'app.bsky.actor.defs#savedFeedsPref'
238
+
saved: string[]
239
+
pinned: string[]
240
+
timelineIndex?: number
241
+
}
242
+
243
+
const hashSavedFeedsPref = 'savedFeedsPref'
244
+
245
+
export function isSavedFeedsPref<V>(v: V) {
246
+
return is$typed(v, id, hashSavedFeedsPref)
247
+
}
248
+
249
+
export function validateSavedFeedsPref<V>(v: V) {
250
+
return validate<SavedFeedsPref & V>(v, id, hashSavedFeedsPref)
251
+
}
252
+
253
+
export interface ThreadViewPref {
254
+
$type?: 'app.bsky.actor.defs#threadViewPref'
255
+
/** Sorting mode for threads. */
256
+
sort?:
257
+
| 'oldest'
258
+
| 'newest'
259
+
| 'most-likes'
260
+
| 'random'
261
+
| 'hotness'
262
+
| (string & {})
263
+
/** Show followed users at the top of all replies. */
264
+
prioritizeFollowedUsers?: boolean
265
+
}
266
+
267
+
const hashThreadViewPref = 'threadViewPref'
268
+
269
+
export function isThreadViewPref<V>(v: V) {
270
+
return is$typed(v, id, hashThreadViewPref)
271
+
}
272
+
273
+
export function validateThreadViewPref<V>(v: V) {
274
+
return validate<ThreadViewPref & V>(v, id, hashThreadViewPref)
275
+
}
276
+
277
+
export interface HiddenPostsPref {
278
+
$type?: 'app.bsky.actor.defs#hiddenPostsPref'
279
+
/** A list of URIs of posts the account owner has hidden. */
280
+
items: string[]
281
+
}
282
+
283
+
const hashHiddenPostsPref = 'hiddenPostsPref'
284
+
285
+
export function isHiddenPostsPref<V>(v: V) {
286
+
return is$typed(v, id, hashHiddenPostsPref)
287
+
}
288
+
289
+
export function validateHiddenPostsPref<V>(v: V) {
290
+
return validate<HiddenPostsPref & V>(v, id, hashHiddenPostsPref)
291
+
}
292
+
293
+
export interface LabelerPrefItem {
294
+
$type?: 'app.bsky.actor.defs#labelerPrefItem'
295
+
did: string
296
+
}
297
+
298
+
const hashLabelerPrefItem = 'labelerPrefItem'
299
+
300
+
export function isLabelerPrefItem<V>(v: V) {
301
+
return is$typed(v, id, hashLabelerPrefItem)
302
+
}
303
+
304
+
export function validateLabelerPrefItem<V>(v: V) {
305
+
return validate<LabelerPrefItem & V>(v, id, hashLabelerPrefItem)
306
+
}
307
+
308
+
export type MutedWordTarget = 'content' | 'tag' | (string & {})
309
+
310
+
export interface AdultContentPref {
311
+
$type?: 'app.bsky.actor.defs#adultContentPref'
312
+
enabled: boolean
313
+
}
314
+
315
+
const hashAdultContentPref = 'adultContentPref'
316
+
317
+
export function isAdultContentPref<V>(v: V) {
318
+
return is$typed(v, id, hashAdultContentPref)
319
+
}
320
+
321
+
export function validateAdultContentPref<V>(v: V) {
322
+
return validate<AdultContentPref & V>(v, id, hashAdultContentPref)
323
+
}
324
+
325
+
/** A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. */
326
+
export interface BskyAppStatePref {
327
+
$type?: 'app.bsky.actor.defs#bskyAppStatePref'
328
+
/** Storage for NUXs the user has encountered. */
329
+
nuxs?: Nux[]
330
+
/** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. */
331
+
queuedNudges?: string[]
332
+
activeProgressGuide?: BskyAppProgressGuide
333
+
}
334
+
335
+
const hashBskyAppStatePref = 'bskyAppStatePref'
336
+
337
+
export function isBskyAppStatePref<V>(v: V) {
338
+
return is$typed(v, id, hashBskyAppStatePref)
339
+
}
340
+
341
+
export function validateBskyAppStatePref<V>(v: V) {
342
+
return validate<BskyAppStatePref & V>(v, id, hashBskyAppStatePref)
343
+
}
344
+
345
+
export interface ContentLabelPref {
346
+
$type?: 'app.bsky.actor.defs#contentLabelPref'
347
+
label: string
348
+
/** Which labeler does this preference apply to? If undefined, applies globally. */
349
+
labelerDid?: string
350
+
visibility: 'ignore' | 'show' | 'warn' | 'hide' | (string & {})
351
+
}
352
+
353
+
const hashContentLabelPref = 'contentLabelPref'
354
+
355
+
export function isContentLabelPref<V>(v: V) {
356
+
return is$typed(v, id, hashContentLabelPref)
357
+
}
358
+
359
+
export function validateContentLabelPref<V>(v: V) {
360
+
return validate<ContentLabelPref & V>(v, id, hashContentLabelPref)
361
+
}
362
+
363
+
export interface ProfileViewBasic {
364
+
$type?: 'app.bsky.actor.defs#profileViewBasic'
365
+
did: string
366
+
avatar?: string
367
+
handle: string
368
+
labels?: ComAtprotoLabelDefs.Label[]
369
+
viewer?: ViewerState
370
+
createdAt?: string
371
+
associated?: ProfileAssociated
372
+
displayName?: string
373
+
}
374
+
375
+
const hashProfileViewBasic = 'profileViewBasic'
376
+
377
+
export function isProfileViewBasic<V>(v: V) {
378
+
return is$typed(v, id, hashProfileViewBasic)
379
+
}
380
+
381
+
export function validateProfileViewBasic<V>(v: V) {
382
+
return validate<ProfileViewBasic & V>(v, id, hashProfileViewBasic)
383
+
}
384
+
385
+
export interface SavedFeedsPrefV2 {
386
+
$type?: 'app.bsky.actor.defs#savedFeedsPrefV2'
387
+
items: SavedFeed[]
388
+
}
389
+
390
+
const hashSavedFeedsPrefV2 = 'savedFeedsPrefV2'
391
+
392
+
export function isSavedFeedsPrefV2<V>(v: V) {
393
+
return is$typed(v, id, hashSavedFeedsPrefV2)
394
+
}
395
+
396
+
export function validateSavedFeedsPrefV2<V>(v: V) {
397
+
return validate<SavedFeedsPrefV2 & V>(v, id, hashSavedFeedsPrefV2)
398
+
}
399
+
400
+
export interface ProfileAssociated {
401
+
$type?: 'app.bsky.actor.defs#profileAssociated'
402
+
chat?: ProfileAssociatedChat
403
+
lists?: number
404
+
labeler?: boolean
405
+
feedgens?: number
406
+
starterPacks?: number
407
+
}
408
+
409
+
const hashProfileAssociated = 'profileAssociated'
410
+
411
+
export function isProfileAssociated<V>(v: V) {
412
+
return is$typed(v, id, hashProfileAssociated)
413
+
}
414
+
415
+
export function validateProfileAssociated<V>(v: V) {
416
+
return validate<ProfileAssociated & V>(v, id, hashProfileAssociated)
417
+
}
418
+
419
+
export interface PersonalDetailsPref {
420
+
$type?: 'app.bsky.actor.defs#personalDetailsPref'
421
+
/** The birth date of account owner. */
422
+
birthDate?: string
423
+
}
424
+
425
+
const hashPersonalDetailsPref = 'personalDetailsPref'
426
+
427
+
export function isPersonalDetailsPref<V>(v: V) {
428
+
return is$typed(v, id, hashPersonalDetailsPref)
429
+
}
430
+
431
+
export function validatePersonalDetailsPref<V>(v: V) {
432
+
return validate<PersonalDetailsPref & V>(v, id, hashPersonalDetailsPref)
433
+
}
434
+
435
+
export interface ProfileViewDetailed {
436
+
$type?: 'app.bsky.actor.defs#profileViewDetailed'
437
+
did: string
438
+
avatar?: string
439
+
banner?: string
440
+
handle: string
441
+
labels?: ComAtprotoLabelDefs.Label[]
442
+
viewer?: ViewerState
443
+
createdAt?: string
444
+
indexedAt?: string
445
+
associated?: ProfileAssociated
446
+
pinnedPost?: ComAtprotoRepoStrongRef.Main
447
+
postsCount?: number
448
+
description?: string
449
+
displayName?: string
450
+
followsCount?: number
451
+
followersCount?: number
452
+
joinedViaStarterPack?: AppBskyGraphDefs.StarterPackViewBasic
453
+
}
454
+
455
+
const hashProfileViewDetailed = 'profileViewDetailed'
456
+
457
+
export function isProfileViewDetailed<V>(v: V) {
458
+
return is$typed(v, id, hashProfileViewDetailed)
459
+
}
460
+
461
+
export function validateProfileViewDetailed<V>(v: V) {
462
+
return validate<ProfileViewDetailed & V>(v, id, hashProfileViewDetailed)
463
+
}
464
+
465
+
/** If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. */
466
+
export interface BskyAppProgressGuide {
467
+
$type?: 'app.bsky.actor.defs#bskyAppProgressGuide'
468
+
guide: string
469
+
}
470
+
471
+
const hashBskyAppProgressGuide = 'bskyAppProgressGuide'
472
+
473
+
export function isBskyAppProgressGuide<V>(v: V) {
474
+
return is$typed(v, id, hashBskyAppProgressGuide)
475
+
}
476
+
477
+
export function validateBskyAppProgressGuide<V>(v: V) {
478
+
return validate<BskyAppProgressGuide & V>(v, id, hashBskyAppProgressGuide)
479
+
}
480
+
481
+
export interface ProfileAssociatedChat {
482
+
$type?: 'app.bsky.actor.defs#profileAssociatedChat'
483
+
allowIncoming: 'all' | 'none' | 'following' | (string & {})
484
+
}
485
+
486
+
const hashProfileAssociatedChat = 'profileAssociatedChat'
487
+
488
+
export function isProfileAssociatedChat<V>(v: V) {
489
+
return is$typed(v, id, hashProfileAssociatedChat)
490
+
}
491
+
492
+
export function validateProfileAssociatedChat<V>(v: V) {
493
+
return validate<ProfileAssociatedChat & V>(v, id, hashProfileAssociatedChat)
494
+
}
495
+
496
+
/** Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. */
497
+
export interface PostInteractionSettingsPref {
498
+
$type?: 'app.bsky.actor.defs#postInteractionSettingsPref'
499
+
/** Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. */
500
+
threadgateAllowRules?: (
501
+
| $Typed<AppBskyFeedThreadgate.MentionRule>
502
+
| $Typed<AppBskyFeedThreadgate.FollowerRule>
503
+
| $Typed<AppBskyFeedThreadgate.FollowingRule>
504
+
| $Typed<AppBskyFeedThreadgate.ListRule>
505
+
| { $type: string }
506
+
)[]
507
+
/** Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. */
508
+
postgateEmbeddingRules?: (
509
+
| $Typed<AppBskyFeedPostgate.DisableRule>
510
+
| { $type: string }
511
+
)[]
512
+
}
513
+
514
+
const hashPostInteractionSettingsPref = 'postInteractionSettingsPref'
515
+
516
+
export function isPostInteractionSettingsPref<V>(v: V) {
517
+
return is$typed(v, id, hashPostInteractionSettingsPref)
518
+
}
519
+
520
+
export function validatePostInteractionSettingsPref<V>(v: V) {
521
+
return validate<PostInteractionSettingsPref & V>(
522
+
v,
523
+
id,
524
+
hashPostInteractionSettingsPref,
525
+
)
526
+
}
+29
packages/lexicon/src/types/app/bsky/embed/defs.ts
+29
packages/lexicon/src/types/app/bsky/embed/defs.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
10
+
const is$typed = _is$typed,
11
+
validate = _validate
12
+
const id = 'app.bsky.embed.defs'
13
+
14
+
/** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. */
15
+
export interface AspectRatio {
16
+
$type?: 'app.bsky.embed.defs#aspectRatio'
17
+
width: number
18
+
height: number
19
+
}
20
+
21
+
const hashAspectRatio = 'aspectRatio'
22
+
23
+
export function isAspectRatio<V>(v: V) {
24
+
return is$typed(v, id, hashAspectRatio)
25
+
}
26
+
27
+
export function validateAspectRatio<V>(v: V) {
28
+
return validate<AspectRatio & V>(v, id, hashAspectRatio)
29
+
}
+79
packages/lexicon/src/types/app/bsky/embed/external.ts
+79
packages/lexicon/src/types/app/bsky/embed/external.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
10
+
const is$typed = _is$typed,
11
+
validate = _validate
12
+
const id = 'app.bsky.embed.external'
13
+
14
+
/** A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). */
15
+
export interface Main {
16
+
$type?: 'app.bsky.embed.external'
17
+
external: External
18
+
}
19
+
20
+
const hashMain = 'main'
21
+
22
+
export function isMain<V>(v: V) {
23
+
return is$typed(v, id, hashMain)
24
+
}
25
+
26
+
export function validateMain<V>(v: V) {
27
+
return validate<Main & V>(v, id, hashMain)
28
+
}
29
+
30
+
export interface View {
31
+
$type?: 'app.bsky.embed.external#view'
32
+
external: ViewExternal
33
+
}
34
+
35
+
const hashView = 'view'
36
+
37
+
export function isView<V>(v: V) {
38
+
return is$typed(v, id, hashView)
39
+
}
40
+
41
+
export function validateView<V>(v: V) {
42
+
return validate<View & V>(v, id, hashView)
43
+
}
44
+
45
+
export interface External {
46
+
$type?: 'app.bsky.embed.external#external'
47
+
uri: string
48
+
thumb?: BlobRef
49
+
title: string
50
+
description: string
51
+
}
52
+
53
+
const hashExternal = 'external'
54
+
55
+
export function isExternal<V>(v: V) {
56
+
return is$typed(v, id, hashExternal)
57
+
}
58
+
59
+
export function validateExternal<V>(v: V) {
60
+
return validate<External & V>(v, id, hashExternal)
61
+
}
62
+
63
+
export interface ViewExternal {
64
+
$type?: 'app.bsky.embed.external#viewExternal'
65
+
uri: string
66
+
thumb?: string
67
+
title: string
68
+
description: string
69
+
}
70
+
71
+
const hashViewExternal = 'viewExternal'
72
+
73
+
export function isViewExternal<V>(v: V) {
74
+
return is$typed(v, id, hashViewExternal)
75
+
}
76
+
77
+
export function validateViewExternal<V>(v: V) {
78
+
return validate<ViewExternal & V>(v, id, hashViewExternal)
79
+
}
+82
packages/lexicon/src/types/app/bsky/embed/images.ts
+82
packages/lexicon/src/types/app/bsky/embed/images.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
import type * as AppBskyEmbedDefs from './defs.js'
10
+
11
+
const is$typed = _is$typed,
12
+
validate = _validate
13
+
const id = 'app.bsky.embed.images'
14
+
15
+
export interface Main {
16
+
$type?: 'app.bsky.embed.images'
17
+
images: Image[]
18
+
}
19
+
20
+
const hashMain = 'main'
21
+
22
+
export function isMain<V>(v: V) {
23
+
return is$typed(v, id, hashMain)
24
+
}
25
+
26
+
export function validateMain<V>(v: V) {
27
+
return validate<Main & V>(v, id, hashMain)
28
+
}
29
+
30
+
export interface View {
31
+
$type?: 'app.bsky.embed.images#view'
32
+
images: ViewImage[]
33
+
}
34
+
35
+
const hashView = 'view'
36
+
37
+
export function isView<V>(v: V) {
38
+
return is$typed(v, id, hashView)
39
+
}
40
+
41
+
export function validateView<V>(v: V) {
42
+
return validate<View & V>(v, id, hashView)
43
+
}
44
+
45
+
export interface Image {
46
+
$type?: 'app.bsky.embed.images#image'
47
+
/** Alt text description of the image, for accessibility. */
48
+
alt: string
49
+
image: BlobRef
50
+
aspectRatio?: AppBskyEmbedDefs.AspectRatio
51
+
}
52
+
53
+
const hashImage = 'image'
54
+
55
+
export function isImage<V>(v: V) {
56
+
return is$typed(v, id, hashImage)
57
+
}
58
+
59
+
export function validateImage<V>(v: V) {
60
+
return validate<Image & V>(v, id, hashImage)
61
+
}
62
+
63
+
export interface ViewImage {
64
+
$type?: 'app.bsky.embed.images#viewImage'
65
+
/** Alt text description of the image, for accessibility. */
66
+
alt: string
67
+
/** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. */
68
+
thumb: string
69
+
/** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. */
70
+
fullsize: string
71
+
aspectRatio?: AppBskyEmbedDefs.AspectRatio
72
+
}
73
+
74
+
const hashViewImage = 'viewImage'
75
+
76
+
export function isViewImage<V>(v: V) {
77
+
return is$typed(v, id, hashViewImage)
78
+
}
79
+
80
+
export function validateViewImage<V>(v: V) {
81
+
return validate<ViewImage & V>(v, id, hashViewImage)
82
+
}
+143
packages/lexicon/src/types/app/bsky/embed/record.ts
+143
packages/lexicon/src/types/app/bsky/embed/record.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
10
+
import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
11
+
import type * as AppBskyActorDefs from '../actor/defs.js'
12
+
import type * as AppBskyFeedDefs from '../feed/defs.js'
13
+
import type * as AppBskyGraphDefs from '../graph/defs.js'
14
+
import type * as AppBskyLabelerDefs from '../labeler/defs.js'
15
+
import type * as AppBskyEmbedExternal from './external.js'
16
+
import type * as AppBskyEmbedImages from './images.js'
17
+
import type * as AppBskyEmbedRecordWithMedia from './recordWithMedia.js'
18
+
import type * as AppBskyEmbedVideo from './video.js'
19
+
20
+
const is$typed = _is$typed,
21
+
validate = _validate
22
+
const id = 'app.bsky.embed.record'
23
+
24
+
export interface Main {
25
+
$type?: 'app.bsky.embed.record'
26
+
record: ComAtprotoRepoStrongRef.Main
27
+
}
28
+
29
+
const hashMain = 'main'
30
+
31
+
export function isMain<V>(v: V) {
32
+
return is$typed(v, id, hashMain)
33
+
}
34
+
35
+
export function validateMain<V>(v: V) {
36
+
return validate<Main & V>(v, id, hashMain)
37
+
}
38
+
39
+
export interface View {
40
+
$type?: 'app.bsky.embed.record#view'
41
+
record:
42
+
| $Typed<ViewRecord>
43
+
| $Typed<ViewNotFound>
44
+
| $Typed<ViewBlocked>
45
+
| $Typed<ViewDetached>
46
+
| $Typed<AppBskyFeedDefs.GeneratorView>
47
+
| $Typed<AppBskyGraphDefs.ListView>
48
+
| $Typed<AppBskyLabelerDefs.LabelerView>
49
+
| $Typed<AppBskyGraphDefs.StarterPackViewBasic>
50
+
| { $type: string }
51
+
}
52
+
53
+
const hashView = 'view'
54
+
55
+
export function isView<V>(v: V) {
56
+
return is$typed(v, id, hashView)
57
+
}
58
+
59
+
export function validateView<V>(v: V) {
60
+
return validate<View & V>(v, id, hashView)
61
+
}
62
+
63
+
export interface ViewRecord {
64
+
$type?: 'app.bsky.embed.record#viewRecord'
65
+
cid: string
66
+
uri: string
67
+
/** The record data itself. */
68
+
value: { [_ in string]: unknown }
69
+
author: AppBskyActorDefs.ProfileViewBasic
70
+
embeds?: (
71
+
| $Typed<AppBskyEmbedImages.View>
72
+
| $Typed<AppBskyEmbedVideo.View>
73
+
| $Typed<AppBskyEmbedExternal.View>
74
+
| $Typed<View>
75
+
| $Typed<AppBskyEmbedRecordWithMedia.View>
76
+
| { $type: string }
77
+
)[]
78
+
labels?: ComAtprotoLabelDefs.Label[]
79
+
indexedAt: string
80
+
likeCount?: number
81
+
quoteCount?: number
82
+
replyCount?: number
83
+
repostCount?: number
84
+
}
85
+
86
+
const hashViewRecord = 'viewRecord'
87
+
88
+
export function isViewRecord<V>(v: V) {
89
+
return is$typed(v, id, hashViewRecord)
90
+
}
91
+
92
+
export function validateViewRecord<V>(v: V) {
93
+
return validate<ViewRecord & V>(v, id, hashViewRecord)
94
+
}
95
+
96
+
export interface ViewBlocked {
97
+
$type?: 'app.bsky.embed.record#viewBlocked'
98
+
uri: string
99
+
author: AppBskyFeedDefs.BlockedAuthor
100
+
blocked: true
101
+
}
102
+
103
+
const hashViewBlocked = 'viewBlocked'
104
+
105
+
export function isViewBlocked<V>(v: V) {
106
+
return is$typed(v, id, hashViewBlocked)
107
+
}
108
+
109
+
export function validateViewBlocked<V>(v: V) {
110
+
return validate<ViewBlocked & V>(v, id, hashViewBlocked)
111
+
}
112
+
113
+
export interface ViewDetached {
114
+
$type?: 'app.bsky.embed.record#viewDetached'
115
+
uri: string
116
+
detached: true
117
+
}
118
+
119
+
const hashViewDetached = 'viewDetached'
120
+
121
+
export function isViewDetached<V>(v: V) {
122
+
return is$typed(v, id, hashViewDetached)
123
+
}
124
+
125
+
export function validateViewDetached<V>(v: V) {
126
+
return validate<ViewDetached & V>(v, id, hashViewDetached)
127
+
}
128
+
129
+
export interface ViewNotFound {
130
+
$type?: 'app.bsky.embed.record#viewNotFound'
131
+
uri: string
132
+
notFound: true
133
+
}
134
+
135
+
const hashViewNotFound = 'viewNotFound'
136
+
137
+
export function isViewNotFound<V>(v: V) {
138
+
return is$typed(v, id, hashViewNotFound)
139
+
}
140
+
141
+
export function validateViewNotFound<V>(v: V) {
142
+
return validate<ViewNotFound & V>(v, id, hashViewNotFound)
143
+
}
+56
packages/lexicon/src/types/app/bsky/embed/recordWithMedia.ts
+56
packages/lexicon/src/types/app/bsky/embed/recordWithMedia.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
import type * as AppBskyEmbedExternal from './external.js'
10
+
import type * as AppBskyEmbedImages from './images.js'
11
+
import type * as AppBskyEmbedRecord from './record.js'
12
+
import type * as AppBskyEmbedVideo from './video.js'
13
+
14
+
const is$typed = _is$typed,
15
+
validate = _validate
16
+
const id = 'app.bsky.embed.recordWithMedia'
17
+
18
+
export interface Main {
19
+
$type?: 'app.bsky.embed.recordWithMedia'
20
+
media:
21
+
| $Typed<AppBskyEmbedImages.Main>
22
+
| $Typed<AppBskyEmbedVideo.Main>
23
+
| $Typed<AppBskyEmbedExternal.Main>
24
+
| { $type: string }
25
+
record: AppBskyEmbedRecord.Main
26
+
}
27
+
28
+
const hashMain = 'main'
29
+
30
+
export function isMain<V>(v: V) {
31
+
return is$typed(v, id, hashMain)
32
+
}
33
+
34
+
export function validateMain<V>(v: V) {
35
+
return validate<Main & V>(v, id, hashMain)
36
+
}
37
+
38
+
export interface View {
39
+
$type?: 'app.bsky.embed.recordWithMedia#view'
40
+
media:
41
+
| $Typed<AppBskyEmbedImages.View>
42
+
| $Typed<AppBskyEmbedVideo.View>
43
+
| $Typed<AppBskyEmbedExternal.View>
44
+
| { $type: string }
45
+
record: AppBskyEmbedRecord.View
46
+
}
47
+
48
+
const hashView = 'view'
49
+
50
+
export function isView<V>(v: V) {
51
+
return is$typed(v, id, hashView)
52
+
}
53
+
54
+
export function validateView<V>(v: V) {
55
+
return validate<View & V>(v, id, hashView)
56
+
}
+67
packages/lexicon/src/types/app/bsky/embed/video.ts
+67
packages/lexicon/src/types/app/bsky/embed/video.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
import type * as AppBskyEmbedDefs from './defs.js'
10
+
11
+
const is$typed = _is$typed,
12
+
validate = _validate
13
+
const id = 'app.bsky.embed.video'
14
+
15
+
export interface Main {
16
+
$type?: 'app.bsky.embed.video'
17
+
/** Alt text description of the video, for accessibility. */
18
+
alt?: string
19
+
video: BlobRef
20
+
captions?: Caption[]
21
+
aspectRatio?: AppBskyEmbedDefs.AspectRatio
22
+
}
23
+
24
+
const hashMain = 'main'
25
+
26
+
export function isMain<V>(v: V) {
27
+
return is$typed(v, id, hashMain)
28
+
}
29
+
30
+
export function validateMain<V>(v: V) {
31
+
return validate<Main & V>(v, id, hashMain)
32
+
}
33
+
34
+
export interface View {
35
+
$type?: 'app.bsky.embed.video#view'
36
+
alt?: string
37
+
cid: string
38
+
playlist: string
39
+
thumbnail?: string
40
+
aspectRatio?: AppBskyEmbedDefs.AspectRatio
41
+
}
42
+
43
+
const hashView = 'view'
44
+
45
+
export function isView<V>(v: V) {
46
+
return is$typed(v, id, hashView)
47
+
}
48
+
49
+
export function validateView<V>(v: V) {
50
+
return validate<View & V>(v, id, hashView)
51
+
}
52
+
53
+
export interface Caption {
54
+
$type?: 'app.bsky.embed.video#caption'
55
+
file: BlobRef
56
+
lang: string
57
+
}
58
+
59
+
const hashCaption = 'caption'
60
+
61
+
export function isCaption<V>(v: V) {
62
+
return is$typed(v, id, hashCaption)
63
+
}
64
+
65
+
export function validateCaption<V>(v: V) {
66
+
return validate<Caption & V>(v, id, hashCaption)
67
+
}
+419
packages/lexicon/src/types/app/bsky/feed/defs.ts
+419
packages/lexicon/src/types/app/bsky/feed/defs.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
10
+
import type * as AppBskyActorDefs from '../actor/defs.js'
11
+
import type * as AppBskyEmbedExternal from '../embed/external.js'
12
+
import type * as AppBskyEmbedImages from '../embed/images.js'
13
+
import type * as AppBskyEmbedRecord from '../embed/record.js'
14
+
import type * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia.js'
15
+
import type * as AppBskyEmbedVideo from '../embed/video.js'
16
+
import type * as AppBskyGraphDefs from '../graph/defs.js'
17
+
import type * as AppBskyRichtextFacet from '../richtext/facet.js'
18
+
19
+
const is$typed = _is$typed,
20
+
validate = _validate
21
+
const id = 'app.bsky.feed.defs'
22
+
23
+
export interface PostView {
24
+
$type?: 'app.bsky.feed.defs#postView'
25
+
cid: string
26
+
uri: string
27
+
embed?:
28
+
| $Typed<AppBskyEmbedImages.View>
29
+
| $Typed<AppBskyEmbedVideo.View>
30
+
| $Typed<AppBskyEmbedExternal.View>
31
+
| $Typed<AppBskyEmbedRecord.View>
32
+
| $Typed<AppBskyEmbedRecordWithMedia.View>
33
+
| { $type: string }
34
+
author: AppBskyActorDefs.ProfileViewBasic
35
+
labels?: ComAtprotoLabelDefs.Label[]
36
+
record: { [_ in string]: unknown }
37
+
viewer?: ViewerState
38
+
indexedAt: string
39
+
likeCount?: number
40
+
quoteCount?: number
41
+
replyCount?: number
42
+
threadgate?: ThreadgateView
43
+
repostCount?: number
44
+
}
45
+
46
+
const hashPostView = 'postView'
47
+
48
+
export function isPostView<V>(v: V) {
49
+
return is$typed(v, id, hashPostView)
50
+
}
51
+
52
+
export function validatePostView<V>(v: V) {
53
+
return validate<PostView & V>(v, id, hashPostView)
54
+
}
55
+
56
+
export interface ReplyRef {
57
+
$type?: 'app.bsky.feed.defs#replyRef'
58
+
root:
59
+
| $Typed<PostView>
60
+
| $Typed<NotFoundPost>
61
+
| $Typed<BlockedPost>
62
+
| { $type: string }
63
+
parent:
64
+
| $Typed<PostView>
65
+
| $Typed<NotFoundPost>
66
+
| $Typed<BlockedPost>
67
+
| { $type: string }
68
+
grandparentAuthor?: AppBskyActorDefs.ProfileViewBasic
69
+
}
70
+
71
+
const hashReplyRef = 'replyRef'
72
+
73
+
export function isReplyRef<V>(v: V) {
74
+
return is$typed(v, id, hashReplyRef)
75
+
}
76
+
77
+
export function validateReplyRef<V>(v: V) {
78
+
return validate<ReplyRef & V>(v, id, hashReplyRef)
79
+
}
80
+
81
+
export interface ReasonPin {
82
+
$type?: 'app.bsky.feed.defs#reasonPin'
83
+
}
84
+
85
+
const hashReasonPin = 'reasonPin'
86
+
87
+
export function isReasonPin<V>(v: V) {
88
+
return is$typed(v, id, hashReasonPin)
89
+
}
90
+
91
+
export function validateReasonPin<V>(v: V) {
92
+
return validate<ReasonPin & V>(v, id, hashReasonPin)
93
+
}
94
+
95
+
export interface BlockedPost {
96
+
$type?: 'app.bsky.feed.defs#blockedPost'
97
+
uri: string
98
+
author: BlockedAuthor
99
+
blocked: true
100
+
}
101
+
102
+
const hashBlockedPost = 'blockedPost'
103
+
104
+
export function isBlockedPost<V>(v: V) {
105
+
return is$typed(v, id, hashBlockedPost)
106
+
}
107
+
108
+
export function validateBlockedPost<V>(v: V) {
109
+
return validate<BlockedPost & V>(v, id, hashBlockedPost)
110
+
}
111
+
112
+
export interface Interaction {
113
+
$type?: 'app.bsky.feed.defs#interaction'
114
+
item?: string
115
+
event?:
116
+
| 'app.bsky.feed.defs#requestLess'
117
+
| 'app.bsky.feed.defs#requestMore'
118
+
| 'app.bsky.feed.defs#clickthroughItem'
119
+
| 'app.bsky.feed.defs#clickthroughAuthor'
120
+
| 'app.bsky.feed.defs#clickthroughReposter'
121
+
| 'app.bsky.feed.defs#clickthroughEmbed'
122
+
| 'app.bsky.feed.defs#interactionSeen'
123
+
| 'app.bsky.feed.defs#interactionLike'
124
+
| 'app.bsky.feed.defs#interactionRepost'
125
+
| 'app.bsky.feed.defs#interactionReply'
126
+
| 'app.bsky.feed.defs#interactionQuote'
127
+
| 'app.bsky.feed.defs#interactionShare'
128
+
| (string & {})
129
+
/** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. */
130
+
feedContext?: string
131
+
}
132
+
133
+
const hashInteraction = 'interaction'
134
+
135
+
export function isInteraction<V>(v: V) {
136
+
return is$typed(v, id, hashInteraction)
137
+
}
138
+
139
+
export function validateInteraction<V>(v: V) {
140
+
return validate<Interaction & V>(v, id, hashInteraction)
141
+
}
142
+
143
+
/** Request that less content like the given feed item be shown in the feed */
144
+
export const REQUESTLESS = `${id}#requestLess`
145
+
/** Request that more content like the given feed item be shown in the feed */
146
+
export const REQUESTMORE = `${id}#requestMore`
147
+
148
+
/** Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. */
149
+
export interface ViewerState {
150
+
$type?: 'app.bsky.feed.defs#viewerState'
151
+
like?: string
152
+
pinned?: boolean
153
+
repost?: string
154
+
threadMuted?: boolean
155
+
replyDisabled?: boolean
156
+
embeddingDisabled?: boolean
157
+
}
158
+
159
+
const hashViewerState = 'viewerState'
160
+
161
+
export function isViewerState<V>(v: V) {
162
+
return is$typed(v, id, hashViewerState)
163
+
}
164
+
165
+
export function validateViewerState<V>(v: V) {
166
+
return validate<ViewerState & V>(v, id, hashViewerState)
167
+
}
168
+
169
+
export interface FeedViewPost {
170
+
$type?: 'app.bsky.feed.defs#feedViewPost'
171
+
post: PostView
172
+
reply?: ReplyRef
173
+
reason?: $Typed<ReasonRepost> | $Typed<ReasonPin> | { $type: string }
174
+
/** Context provided by feed generator that may be passed back alongside interactions. */
175
+
feedContext?: string
176
+
}
177
+
178
+
const hashFeedViewPost = 'feedViewPost'
179
+
180
+
export function isFeedViewPost<V>(v: V) {
181
+
return is$typed(v, id, hashFeedViewPost)
182
+
}
183
+
184
+
export function validateFeedViewPost<V>(v: V) {
185
+
return validate<FeedViewPost & V>(v, id, hashFeedViewPost)
186
+
}
187
+
188
+
export interface NotFoundPost {
189
+
$type?: 'app.bsky.feed.defs#notFoundPost'
190
+
uri: string
191
+
notFound: true
192
+
}
193
+
194
+
const hashNotFoundPost = 'notFoundPost'
195
+
196
+
export function isNotFoundPost<V>(v: V) {
197
+
return is$typed(v, id, hashNotFoundPost)
198
+
}
199
+
200
+
export function validateNotFoundPost<V>(v: V) {
201
+
return validate<NotFoundPost & V>(v, id, hashNotFoundPost)
202
+
}
203
+
204
+
export interface ReasonRepost {
205
+
$type?: 'app.bsky.feed.defs#reasonRepost'
206
+
by: AppBskyActorDefs.ProfileViewBasic
207
+
indexedAt: string
208
+
}
209
+
210
+
const hashReasonRepost = 'reasonRepost'
211
+
212
+
export function isReasonRepost<V>(v: V) {
213
+
return is$typed(v, id, hashReasonRepost)
214
+
}
215
+
216
+
export function validateReasonRepost<V>(v: V) {
217
+
return validate<ReasonRepost & V>(v, id, hashReasonRepost)
218
+
}
219
+
220
+
export interface BlockedAuthor {
221
+
$type?: 'app.bsky.feed.defs#blockedAuthor'
222
+
did: string
223
+
viewer?: AppBskyActorDefs.ViewerState
224
+
}
225
+
226
+
const hashBlockedAuthor = 'blockedAuthor'
227
+
228
+
export function isBlockedAuthor<V>(v: V) {
229
+
return is$typed(v, id, hashBlockedAuthor)
230
+
}
231
+
232
+
export function validateBlockedAuthor<V>(v: V) {
233
+
return validate<BlockedAuthor & V>(v, id, hashBlockedAuthor)
234
+
}
235
+
236
+
export interface GeneratorView {
237
+
$type?: 'app.bsky.feed.defs#generatorView'
238
+
cid: string
239
+
did: string
240
+
uri: string
241
+
avatar?: string
242
+
labels?: ComAtprotoLabelDefs.Label[]
243
+
viewer?: GeneratorViewerState
244
+
creator: AppBskyActorDefs.ProfileView
245
+
indexedAt: string
246
+
likeCount?: number
247
+
contentMode?:
248
+
| 'app.bsky.feed.defs#contentModeUnspecified'
249
+
| 'app.bsky.feed.defs#contentModeVideo'
250
+
| (string & {})
251
+
description?: string
252
+
displayName: string
253
+
descriptionFacets?: AppBskyRichtextFacet.Main[]
254
+
acceptsInteractions?: boolean
255
+
}
256
+
257
+
const hashGeneratorView = 'generatorView'
258
+
259
+
export function isGeneratorView<V>(v: V) {
260
+
return is$typed(v, id, hashGeneratorView)
261
+
}
262
+
263
+
export function validateGeneratorView<V>(v: V) {
264
+
return validate<GeneratorView & V>(v, id, hashGeneratorView)
265
+
}
266
+
267
+
/** Metadata about this post within the context of the thread it is in. */
268
+
export interface ThreadContext {
269
+
$type?: 'app.bsky.feed.defs#threadContext'
270
+
rootAuthorLike?: string
271
+
}
272
+
273
+
const hashThreadContext = 'threadContext'
274
+
275
+
export function isThreadContext<V>(v: V) {
276
+
return is$typed(v, id, hashThreadContext)
277
+
}
278
+
279
+
export function validateThreadContext<V>(v: V) {
280
+
return validate<ThreadContext & V>(v, id, hashThreadContext)
281
+
}
282
+
283
+
export interface ThreadViewPost {
284
+
$type?: 'app.bsky.feed.defs#threadViewPost'
285
+
post: PostView
286
+
parent?:
287
+
| $Typed<ThreadViewPost>
288
+
| $Typed<NotFoundPost>
289
+
| $Typed<BlockedPost>
290
+
| { $type: string }
291
+
replies?: (
292
+
| $Typed<ThreadViewPost>
293
+
| $Typed<NotFoundPost>
294
+
| $Typed<BlockedPost>
295
+
| { $type: string }
296
+
)[]
297
+
threadContext?: ThreadContext
298
+
}
299
+
300
+
const hashThreadViewPost = 'threadViewPost'
301
+
302
+
export function isThreadViewPost<V>(v: V) {
303
+
return is$typed(v, id, hashThreadViewPost)
304
+
}
305
+
306
+
export function validateThreadViewPost<V>(v: V) {
307
+
return validate<ThreadViewPost & V>(v, id, hashThreadViewPost)
308
+
}
309
+
310
+
export interface ThreadgateView {
311
+
$type?: 'app.bsky.feed.defs#threadgateView'
312
+
cid?: string
313
+
uri?: string
314
+
lists?: AppBskyGraphDefs.ListViewBasic[]
315
+
record?: { [_ in string]: unknown }
316
+
}
317
+
318
+
const hashThreadgateView = 'threadgateView'
319
+
320
+
export function isThreadgateView<V>(v: V) {
321
+
return is$typed(v, id, hashThreadgateView)
322
+
}
323
+
324
+
export function validateThreadgateView<V>(v: V) {
325
+
return validate<ThreadgateView & V>(v, id, hashThreadgateView)
326
+
}
327
+
328
+
/** User liked the feed item */
329
+
export const INTERACTIONLIKE = `${id}#interactionLike`
330
+
/** Feed item was seen by user */
331
+
export const INTERACTIONSEEN = `${id}#interactionSeen`
332
+
/** User clicked through to the feed item */
333
+
export const CLICKTHROUGHITEM = `${id}#clickthroughItem`
334
+
/** Declares the feed generator returns posts containing app.bsky.embed.video embeds. */
335
+
export const CONTENTMODEVIDEO = `${id}#contentModeVideo`
336
+
/** User quoted the feed item */
337
+
export const INTERACTIONQUOTE = `${id}#interactionQuote`
338
+
/** User replied to the feed item */
339
+
export const INTERACTIONREPLY = `${id}#interactionReply`
340
+
/** User shared the feed item */
341
+
export const INTERACTIONSHARE = `${id}#interactionShare`
342
+
343
+
export interface SkeletonFeedPost {
344
+
$type?: 'app.bsky.feed.defs#skeletonFeedPost'
345
+
post: string
346
+
reason?:
347
+
| $Typed<SkeletonReasonRepost>
348
+
| $Typed<SkeletonReasonPin>
349
+
| { $type: string }
350
+
/** Context that will be passed through to client and may be passed to feed generator back alongside interactions. */
351
+
feedContext?: string
352
+
}
353
+
354
+
const hashSkeletonFeedPost = 'skeletonFeedPost'
355
+
356
+
export function isSkeletonFeedPost<V>(v: V) {
357
+
return is$typed(v, id, hashSkeletonFeedPost)
358
+
}
359
+
360
+
export function validateSkeletonFeedPost<V>(v: V) {
361
+
return validate<SkeletonFeedPost & V>(v, id, hashSkeletonFeedPost)
362
+
}
363
+
364
+
/** User clicked through to the embedded content of the feed item */
365
+
export const CLICKTHROUGHEMBED = `${id}#clickthroughEmbed`
366
+
/** User reposted the feed item */
367
+
export const INTERACTIONREPOST = `${id}#interactionRepost`
368
+
369
+
export interface SkeletonReasonPin {
370
+
$type?: 'app.bsky.feed.defs#skeletonReasonPin'
371
+
}
372
+
373
+
const hashSkeletonReasonPin = 'skeletonReasonPin'
374
+
375
+
export function isSkeletonReasonPin<V>(v: V) {
376
+
return is$typed(v, id, hashSkeletonReasonPin)
377
+
}
378
+
379
+
export function validateSkeletonReasonPin<V>(v: V) {
380
+
return validate<SkeletonReasonPin & V>(v, id, hashSkeletonReasonPin)
381
+
}
382
+
383
+
/** User clicked through to the author of the feed item */
384
+
export const CLICKTHROUGHAUTHOR = `${id}#clickthroughAuthor`
385
+
/** User clicked through to the reposter of the feed item */
386
+
export const CLICKTHROUGHREPOSTER = `${id}#clickthroughReposter`
387
+
388
+
export interface GeneratorViewerState {
389
+
$type?: 'app.bsky.feed.defs#generatorViewerState'
390
+
like?: string
391
+
}
392
+
393
+
const hashGeneratorViewerState = 'generatorViewerState'
394
+
395
+
export function isGeneratorViewerState<V>(v: V) {
396
+
return is$typed(v, id, hashGeneratorViewerState)
397
+
}
398
+
399
+
export function validateGeneratorViewerState<V>(v: V) {
400
+
return validate<GeneratorViewerState & V>(v, id, hashGeneratorViewerState)
401
+
}
402
+
403
+
export interface SkeletonReasonRepost {
404
+
$type?: 'app.bsky.feed.defs#skeletonReasonRepost'
405
+
repost: string
406
+
}
407
+
408
+
const hashSkeletonReasonRepost = 'skeletonReasonRepost'
409
+
410
+
export function isSkeletonReasonRepost<V>(v: V) {
411
+
return is$typed(v, id, hashSkeletonReasonRepost)
412
+
}
413
+
414
+
export function validateSkeletonReasonRepost<V>(v: V) {
415
+
return validate<SkeletonReasonRepost & V>(v, id, hashSkeletonReasonRepost)
416
+
}
417
+
418
+
/** Declares the feed generator returns any types of posts. */
419
+
export const CONTENTMODEUNSPECIFIED = `${id}#contentModeUnspecified`
+49
packages/lexicon/src/types/app/bsky/feed/postgate.ts
+49
packages/lexicon/src/types/app/bsky/feed/postgate.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
10
+
const is$typed = _is$typed,
11
+
validate = _validate
12
+
const id = 'app.bsky.feed.postgate'
13
+
14
+
export interface Record {
15
+
$type: 'app.bsky.feed.postgate'
16
+
/** Reference (AT-URI) to the post record. */
17
+
post: string
18
+
createdAt: string
19
+
/** List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. */
20
+
embeddingRules?: ($Typed<DisableRule> | { $type: string })[]
21
+
/** List of AT-URIs embedding this post that the author has detached from. */
22
+
detachedEmbeddingUris?: string[]
23
+
[k: string]: unknown
24
+
}
25
+
26
+
const hashRecord = 'main'
27
+
28
+
export function isRecord<V>(v: V) {
29
+
return is$typed(v, id, hashRecord)
30
+
}
31
+
32
+
export function validateRecord<V>(v: V) {
33
+
return validate<Record & V>(v, id, hashRecord, true)
34
+
}
35
+
36
+
/** Disables embedding of this post. */
37
+
export interface DisableRule {
38
+
$type?: 'app.bsky.feed.postgate#disableRule'
39
+
}
40
+
41
+
const hashDisableRule = 'disableRule'
42
+
43
+
export function isDisableRule<V>(v: V) {
44
+
return is$typed(v, id, hashDisableRule)
45
+
}
46
+
47
+
export function validateDisableRule<V>(v: V) {
48
+
return validate<DisableRule & V>(v, id, hashDisableRule)
49
+
}
+101
packages/lexicon/src/types/app/bsky/feed/threadgate.ts
+101
packages/lexicon/src/types/app/bsky/feed/threadgate.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
10
+
const is$typed = _is$typed,
11
+
validate = _validate
12
+
const id = 'app.bsky.feed.threadgate'
13
+
14
+
export interface Record {
15
+
$type: 'app.bsky.feed.threadgate'
16
+
/** Reference (AT-URI) to the post record. */
17
+
post: string
18
+
/** List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. */
19
+
allow?: (
20
+
| $Typed<MentionRule>
21
+
| $Typed<FollowerRule>
22
+
| $Typed<FollowingRule>
23
+
| $Typed<ListRule>
24
+
| { $type: string }
25
+
)[]
26
+
createdAt: string
27
+
/** List of hidden reply URIs. */
28
+
hiddenReplies?: string[]
29
+
[k: string]: unknown
30
+
}
31
+
32
+
const hashRecord = 'main'
33
+
34
+
export function isRecord<V>(v: V) {
35
+
return is$typed(v, id, hashRecord)
36
+
}
37
+
38
+
export function validateRecord<V>(v: V) {
39
+
return validate<Record & V>(v, id, hashRecord, true)
40
+
}
41
+
42
+
/** Allow replies from actors on a list. */
43
+
export interface ListRule {
44
+
$type?: 'app.bsky.feed.threadgate#listRule'
45
+
list: string
46
+
}
47
+
48
+
const hashListRule = 'listRule'
49
+
50
+
export function isListRule<V>(v: V) {
51
+
return is$typed(v, id, hashListRule)
52
+
}
53
+
54
+
export function validateListRule<V>(v: V) {
55
+
return validate<ListRule & V>(v, id, hashListRule)
56
+
}
57
+
58
+
/** Allow replies from actors mentioned in your post. */
59
+
export interface MentionRule {
60
+
$type?: 'app.bsky.feed.threadgate#mentionRule'
61
+
}
62
+
63
+
const hashMentionRule = 'mentionRule'
64
+
65
+
export function isMentionRule<V>(v: V) {
66
+
return is$typed(v, id, hashMentionRule)
67
+
}
68
+
69
+
export function validateMentionRule<V>(v: V) {
70
+
return validate<MentionRule & V>(v, id, hashMentionRule)
71
+
}
72
+
73
+
/** Allow replies from actors who follow you. */
74
+
export interface FollowerRule {
75
+
$type?: 'app.bsky.feed.threadgate#followerRule'
76
+
}
77
+
78
+
const hashFollowerRule = 'followerRule'
79
+
80
+
export function isFollowerRule<V>(v: V) {
81
+
return is$typed(v, id, hashFollowerRule)
82
+
}
83
+
84
+
export function validateFollowerRule<V>(v: V) {
85
+
return validate<FollowerRule & V>(v, id, hashFollowerRule)
86
+
}
87
+
88
+
/** Allow replies from actors you follow. */
89
+
export interface FollowingRule {
90
+
$type?: 'app.bsky.feed.threadgate#followingRule'
91
+
}
92
+
93
+
const hashFollowingRule = 'followingRule'
94
+
95
+
export function isFollowingRule<V>(v: V) {
96
+
return is$typed(v, id, hashFollowingRule)
97
+
}
98
+
99
+
export function validateFollowingRule<V>(v: V) {
100
+
return validate<FollowingRule & V>(v, id, hashFollowingRule)
101
+
}
+196
packages/lexicon/src/types/app/bsky/graph/defs.ts
+196
packages/lexicon/src/types/app/bsky/graph/defs.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
10
+
import type * as AppBskyActorDefs from '../actor/defs.js'
11
+
import type * as AppBskyFeedDefs from '../feed/defs.js'
12
+
import type * as AppBskyRichtextFacet from '../richtext/facet.js'
13
+
14
+
const is$typed = _is$typed,
15
+
validate = _validate
16
+
const id = 'app.bsky.graph.defs'
17
+
/** A list of actors to apply an aggregate moderation action (mute/block) on. */
18
+
export const MODLIST = `${id}#modlist`
19
+
20
+
export interface ListView {
21
+
$type?: 'app.bsky.graph.defs#listView'
22
+
cid: string
23
+
uri: string
24
+
name: string
25
+
avatar?: string
26
+
labels?: ComAtprotoLabelDefs.Label[]
27
+
viewer?: ListViewerState
28
+
creator: AppBskyActorDefs.ProfileView
29
+
purpose: ListPurpose
30
+
indexedAt: string
31
+
description?: string
32
+
listItemCount?: number
33
+
descriptionFacets?: AppBskyRichtextFacet.Main[]
34
+
}
35
+
36
+
const hashListView = 'listView'
37
+
38
+
export function isListView<V>(v: V) {
39
+
return is$typed(v, id, hashListView)
40
+
}
41
+
42
+
export function validateListView<V>(v: V) {
43
+
return validate<ListView & V>(v, id, hashListView)
44
+
}
45
+
46
+
/** A list of actors used for curation purposes such as list feeds or interaction gating. */
47
+
export const CURATELIST = `${id}#curatelist`
48
+
49
+
export type ListPurpose =
50
+
| 'app.bsky.graph.defs#modlist'
51
+
| 'app.bsky.graph.defs#curatelist'
52
+
| 'app.bsky.graph.defs#referencelist'
53
+
| (string & {})
54
+
55
+
export interface ListItemView {
56
+
$type?: 'app.bsky.graph.defs#listItemView'
57
+
uri: string
58
+
subject: AppBskyActorDefs.ProfileView
59
+
}
60
+
61
+
const hashListItemView = 'listItemView'
62
+
63
+
export function isListItemView<V>(v: V) {
64
+
return is$typed(v, id, hashListItemView)
65
+
}
66
+
67
+
export function validateListItemView<V>(v: V) {
68
+
return validate<ListItemView & V>(v, id, hashListItemView)
69
+
}
70
+
71
+
/** lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) */
72
+
export interface Relationship {
73
+
$type?: 'app.bsky.graph.defs#relationship'
74
+
did: string
75
+
/** if the actor follows this DID, this is the AT-URI of the follow record */
76
+
following?: string
77
+
/** if the actor is followed by this DID, contains the AT-URI of the follow record */
78
+
followedBy?: string
79
+
}
80
+
81
+
const hashRelationship = 'relationship'
82
+
83
+
export function isRelationship<V>(v: V) {
84
+
return is$typed(v, id, hashRelationship)
85
+
}
86
+
87
+
export function validateRelationship<V>(v: V) {
88
+
return validate<Relationship & V>(v, id, hashRelationship)
89
+
}
90
+
91
+
export interface ListViewBasic {
92
+
$type?: 'app.bsky.graph.defs#listViewBasic'
93
+
cid: string
94
+
uri: string
95
+
name: string
96
+
avatar?: string
97
+
labels?: ComAtprotoLabelDefs.Label[]
98
+
viewer?: ListViewerState
99
+
purpose: ListPurpose
100
+
indexedAt?: string
101
+
listItemCount?: number
102
+
}
103
+
104
+
const hashListViewBasic = 'listViewBasic'
105
+
106
+
export function isListViewBasic<V>(v: V) {
107
+
return is$typed(v, id, hashListViewBasic)
108
+
}
109
+
110
+
export function validateListViewBasic<V>(v: V) {
111
+
return validate<ListViewBasic & V>(v, id, hashListViewBasic)
112
+
}
113
+
114
+
/** indicates that a handle or DID could not be resolved */
115
+
export interface NotFoundActor {
116
+
$type?: 'app.bsky.graph.defs#notFoundActor'
117
+
actor: string
118
+
notFound: true
119
+
}
120
+
121
+
const hashNotFoundActor = 'notFoundActor'
122
+
123
+
export function isNotFoundActor<V>(v: V) {
124
+
return is$typed(v, id, hashNotFoundActor)
125
+
}
126
+
127
+
export function validateNotFoundActor<V>(v: V) {
128
+
return validate<NotFoundActor & V>(v, id, hashNotFoundActor)
129
+
}
130
+
131
+
/** A list of actors used for only for reference purposes such as within a starter pack. */
132
+
export const REFERENCELIST = `${id}#referencelist`
133
+
134
+
export interface ListViewerState {
135
+
$type?: 'app.bsky.graph.defs#listViewerState'
136
+
muted?: boolean
137
+
blocked?: string
138
+
}
139
+
140
+
const hashListViewerState = 'listViewerState'
141
+
142
+
export function isListViewerState<V>(v: V) {
143
+
return is$typed(v, id, hashListViewerState)
144
+
}
145
+
146
+
export function validateListViewerState<V>(v: V) {
147
+
return validate<ListViewerState & V>(v, id, hashListViewerState)
148
+
}
149
+
150
+
export interface StarterPackView {
151
+
$type?: 'app.bsky.graph.defs#starterPackView'
152
+
cid: string
153
+
uri: string
154
+
list?: ListViewBasic
155
+
feeds?: AppBskyFeedDefs.GeneratorView[]
156
+
labels?: ComAtprotoLabelDefs.Label[]
157
+
record: { [_ in string]: unknown }
158
+
creator: AppBskyActorDefs.ProfileViewBasic
159
+
indexedAt: string
160
+
joinedWeekCount?: number
161
+
listItemsSample?: ListItemView[]
162
+
joinedAllTimeCount?: number
163
+
}
164
+
165
+
const hashStarterPackView = 'starterPackView'
166
+
167
+
export function isStarterPackView<V>(v: V) {
168
+
return is$typed(v, id, hashStarterPackView)
169
+
}
170
+
171
+
export function validateStarterPackView<V>(v: V) {
172
+
return validate<StarterPackView & V>(v, id, hashStarterPackView)
173
+
}
174
+
175
+
export interface StarterPackViewBasic {
176
+
$type?: 'app.bsky.graph.defs#starterPackViewBasic'
177
+
cid: string
178
+
uri: string
179
+
labels?: ComAtprotoLabelDefs.Label[]
180
+
record: { [_ in string]: unknown }
181
+
creator: AppBskyActorDefs.ProfileViewBasic
182
+
indexedAt: string
183
+
listItemCount?: number
184
+
joinedWeekCount?: number
185
+
joinedAllTimeCount?: number
186
+
}
187
+
188
+
const hashStarterPackViewBasic = 'starterPackViewBasic'
189
+
190
+
export function isStarterPackViewBasic<V>(v: V) {
191
+
return is$typed(v, id, hashStarterPackViewBasic)
192
+
}
193
+
194
+
export function validateStarterPackViewBasic<V>(v: V) {
195
+
return validate<StarterPackViewBasic & V>(v, id, hashStarterPackViewBasic)
196
+
}
+90
packages/lexicon/src/types/app/bsky/labeler/defs.ts
+90
packages/lexicon/src/types/app/bsky/labeler/defs.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
10
+
import type * as AppBskyActorDefs from '../actor/defs.js'
11
+
12
+
const is$typed = _is$typed,
13
+
validate = _validate
14
+
const id = 'app.bsky.labeler.defs'
15
+
16
+
export interface LabelerView {
17
+
$type?: 'app.bsky.labeler.defs#labelerView'
18
+
cid: string
19
+
uri: string
20
+
labels?: ComAtprotoLabelDefs.Label[]
21
+
viewer?: LabelerViewerState
22
+
creator: AppBskyActorDefs.ProfileView
23
+
indexedAt: string
24
+
likeCount?: number
25
+
}
26
+
27
+
const hashLabelerView = 'labelerView'
28
+
29
+
export function isLabelerView<V>(v: V) {
30
+
return is$typed(v, id, hashLabelerView)
31
+
}
32
+
33
+
export function validateLabelerView<V>(v: V) {
34
+
return validate<LabelerView & V>(v, id, hashLabelerView)
35
+
}
36
+
37
+
export interface LabelerPolicies {
38
+
$type?: 'app.bsky.labeler.defs#labelerPolicies'
39
+
/** The label values which this labeler publishes. May include global or custom labels. */
40
+
labelValues: ComAtprotoLabelDefs.LabelValue[]
41
+
/** Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. */
42
+
labelValueDefinitions?: ComAtprotoLabelDefs.LabelValueDefinition[]
43
+
}
44
+
45
+
const hashLabelerPolicies = 'labelerPolicies'
46
+
47
+
export function isLabelerPolicies<V>(v: V) {
48
+
return is$typed(v, id, hashLabelerPolicies)
49
+
}
50
+
51
+
export function validateLabelerPolicies<V>(v: V) {
52
+
return validate<LabelerPolicies & V>(v, id, hashLabelerPolicies)
53
+
}
54
+
55
+
export interface LabelerViewerState {
56
+
$type?: 'app.bsky.labeler.defs#labelerViewerState'
57
+
like?: string
58
+
}
59
+
60
+
const hashLabelerViewerState = 'labelerViewerState'
61
+
62
+
export function isLabelerViewerState<V>(v: V) {
63
+
return is$typed(v, id, hashLabelerViewerState)
64
+
}
65
+
66
+
export function validateLabelerViewerState<V>(v: V) {
67
+
return validate<LabelerViewerState & V>(v, id, hashLabelerViewerState)
68
+
}
69
+
70
+
export interface LabelerViewDetailed {
71
+
$type?: 'app.bsky.labeler.defs#labelerViewDetailed'
72
+
cid: string
73
+
uri: string
74
+
labels?: ComAtprotoLabelDefs.Label[]
75
+
viewer?: LabelerViewerState
76
+
creator: AppBskyActorDefs.ProfileView
77
+
policies: LabelerPolicies
78
+
indexedAt: string
79
+
likeCount?: number
80
+
}
81
+
82
+
const hashLabelerViewDetailed = 'labelerViewDetailed'
83
+
84
+
export function isLabelerViewDetailed<V>(v: V) {
85
+
return is$typed(v, id, hashLabelerViewDetailed)
86
+
}
87
+
88
+
export function validateLabelerViewDetailed<V>(v: V) {
89
+
return validate<LabelerViewDetailed & V>(v, id, hashLabelerViewDetailed)
90
+
}
+94
packages/lexicon/src/types/app/bsky/richtext/facet.ts
+94
packages/lexicon/src/types/app/bsky/richtext/facet.ts
···
1
+
/**
2
+
* GENERATED CODE - DO NOT MODIFY
3
+
*/
4
+
import { BlobRef, ValidationResult } from '@atproto/lexicon'
5
+
import { CID } from 'multiformats/cid'
6
+
7
+
import { validate as _validate } from '../../../../lexicons'
8
+
import { is$typed as _is$typed, $Typed, OmitKey } from '../../../../util'
9
+
10
+
const is$typed = _is$typed,
11
+
validate = _validate
12
+
const id = 'app.bsky.richtext.facet'
13
+
14
+
/** Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). */
15
+
export interface Tag {
16
+
$type?: 'app.bsky.richtext.facet#tag'
17
+
tag: string
18
+
}
19
+
20
+
const hashTag = 'tag'
21
+
22
+
export function isTag<V>(v: V) {
23
+
return is$typed(v, id, hashTag)
24
+
}
25
+
26
+
export function validateTag<V>(v: V) {
27
+
return validate<Tag & V>(v, id, hashTag)
28
+
}
29
+
30
+
/** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. */
31
+
export interface Link {
32
+
$type?: 'app.bsky.richtext.facet#link'
33
+
uri: string
34
+
}
35
+
36
+
const hashLink = 'link'
37
+
38
+
export function isLink<V>(v: V) {
39
+
return is$typed(v, id, hashLink)
40
+
}
41
+
42
+
export function validateLink<V>(v: V) {
43
+
return validate<Link & V>(v, id, hashLink)
44
+
}
45
+
46
+
/** Annotation of a sub-string within rich text. */
47
+
export interface Main {
48
+
$type?: 'app.bsky.richtext.facet'
49
+
index: ByteSlice
50
+
features: ($Typed<Mention> | $Typed<Link> | $Typed<Tag> | { $type: string })[]
51
+
}
52
+
53
+
const hashMain = 'main'
54
+
55
+
export function isMain<V>(v: V) {
56
+
return is$typed(v, id, hashMain)
57
+
}
58
+
59
+
export function validateMain<V>(v: V) {
60
+
return validate<Main & V>(v, id, hashMain)
61
+
}
62
+
63
+
/** Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID. */
64
+
export interface Mention {
65
+
$type?: 'app.bsky.richtext.facet#mention'
66
+
did: string
67
+
}
68
+
69
+
const hashMention = 'mention'
70
+
71
+
export function isMention<V>(v: V) {
72
+
return is$typed(v, id, hashMention)
73
+
}
74
+
75
+
export function validateMention<V>(v: V) {
76
+
return validate<Mention & V>(v, id, hashMention)
77
+
}
78
+
79
+
/** Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. */
80
+
export interface ByteSlice {
81
+
$type?: 'app.bsky.richtext.facet#byteSlice'
82
+
byteEnd: number
83
+
byteStart: number
84
+
}
85
+
86
+
const hashByteSlice = 'byteSlice'
87
+
88
+
export function isByteSlice<V>(v: V) {
89
+
return is$typed(v, id, hashByteSlice)
90
+
}
91
+
92
+
export function validateByteSlice<V>(v: V) {
93
+
return validate<ByteSlice & V>(v, id, hashByteSlice)
94
+
}
+47
-47
packages/lexicon/src/types/com/atproto/label/defs.ts
+47
-47
packages/lexicon/src/types/com/atproto/label/defs.ts
···
14
14
/** Metadata tag on an atproto resource (eg, repo or record). */
15
15
export interface Label {
16
16
$type?: 'com.atproto.label.defs#label'
17
-
/** The AT Protocol version of the label object. */
18
-
ver?: number
19
-
/** DID of the actor who created this label. */
20
-
src: string
21
-
/** AT URI of the record, repository (account), or other resource that this label applies to. */
22
-
uri: string
23
17
/** Optionally, CID specifying the specific version of 'uri' resource this label applies to. */
24
18
cid?: string
25
-
/** The short string name of the value or type of this label. */
26
-
val: string
27
-
/** If true, this is a negation label, overwriting a previous label. */
28
-
neg?: boolean
29
19
/** Timestamp when this label was created. */
30
20
cts: string
31
21
/** Timestamp at which this label expires (no longer applies). */
32
22
exp?: string
23
+
/** If true, this is a negation label, overwriting a previous label. */
24
+
neg?: boolean
33
25
/** Signature of dag-cbor encoded label. */
34
26
sig?: Uint8Array
27
+
/** DID of the actor who created this label. */
28
+
src: string
29
+
/** AT URI of the record, repository (account), or other resource that this label applies to. */
30
+
uri: string
31
+
/** The short string name of the value or type of this label. */
32
+
val: string
33
+
/** The AT Protocol version of the label object. */
34
+
ver?: number
35
35
}
36
36
37
37
const hashLabel = 'label'
···
44
44
return validate<Label & V>(v, id, hashLabel)
45
45
}
46
46
47
-
/** Metadata tags on an atproto record, published by the author within the record. */
48
-
export interface SelfLabels {
49
-
$type?: 'com.atproto.label.defs#selfLabels'
50
-
values: SelfLabel[]
51
-
}
52
-
53
-
const hashSelfLabels = 'selfLabels'
54
-
55
-
export function isSelfLabels<V>(v: V) {
56
-
return is$typed(v, id, hashSelfLabels)
57
-
}
58
-
59
-
export function validateSelfLabels<V>(v: V) {
60
-
return validate<SelfLabels & V>(v, id, hashSelfLabels)
61
-
}
62
-
63
47
/** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. */
64
48
export interface SelfLabel {
65
49
$type?: 'com.atproto.label.defs#selfLabel'
···
77
61
return validate<SelfLabel & V>(v, id, hashSelfLabel)
78
62
}
79
63
64
+
export type LabelValue =
65
+
| '!hide'
66
+
| '!no-promote'
67
+
| '!warn'
68
+
| '!no-unauthenticated'
69
+
| 'dmca-violation'
70
+
| 'doxxing'
71
+
| 'porn'
72
+
| 'sexual'
73
+
| 'nudity'
74
+
| 'nsfl'
75
+
| 'gore'
76
+
| (string & {})
77
+
78
+
/** Metadata tags on an atproto record, published by the author within the record. */
79
+
export interface SelfLabels {
80
+
$type?: 'com.atproto.label.defs#selfLabels'
81
+
values: SelfLabel[]
82
+
}
83
+
84
+
const hashSelfLabels = 'selfLabels'
85
+
86
+
export function isSelfLabels<V>(v: V) {
87
+
return is$typed(v, id, hashSelfLabels)
88
+
}
89
+
90
+
export function validateSelfLabels<V>(v: V) {
91
+
return validate<SelfLabels & V>(v, id, hashSelfLabels)
92
+
}
93
+
80
94
/** Declares a label value and its expected interpretations and behaviors. */
81
95
export interface LabelValueDefinition {
82
96
$type?: 'com.atproto.label.defs#labelValueDefinition'
83
-
/** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */
84
-
identifier: string
85
-
/** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. */
86
-
severity: 'inform' | 'alert' | 'none' | (string & {})
87
97
/** What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing. */
88
98
blurs: 'content' | 'media' | 'none' | (string & {})
89
-
/** The default setting for this label. */
90
-
defaultSetting: 'ignore' | 'warn' | 'hide' | (string & {})
99
+
locales: LabelValueDefinitionStrings[]
100
+
/** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. */
101
+
severity: 'inform' | 'alert' | 'none' | (string & {})
91
102
/** Does the user need to have adult content enabled in order to configure this label? */
92
103
adultOnly?: boolean
93
-
locales: LabelValueDefinitionStrings[]
104
+
/** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */
105
+
identifier: string
106
+
/** The default setting for this label. */
107
+
defaultSetting: 'ignore' | 'warn' | 'hide' | (string & {})
94
108
}
95
109
96
110
const hashLabelValueDefinition = 'labelValueDefinition'
···
127
141
hashLabelValueDefinitionStrings,
128
142
)
129
143
}
130
-
131
-
export type LabelValue =
132
-
| '!hide'
133
-
| '!no-promote'
134
-
| '!warn'
135
-
| '!no-unauthenticated'
136
-
| 'dmca-violation'
137
-
| 'doxxing'
138
-
| 'porn'
139
-
| 'sexual'
140
-
| 'nudity'
141
-
| 'nsfl'
142
-
| 'gore'
143
-
| (string & {})
+36
-36
packages/lexicon/src/types/com/atproto/repo/applyWrites.ts
+36
-36
packages/lexicon/src/types/com/atproto/repo/applyWrites.ts
···
18
18
export interface InputSchema {
19
19
/** The handle or DID of the repo (aka, current account). */
20
20
repo: string
21
+
writes: ($Typed<Create> | $Typed<Update> | $Typed<Delete>)[]
21
22
/** Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons. */
22
23
validate?: boolean
23
-
writes: ($Typed<Create> | $Typed<Update> | $Typed<Delete>)[]
24
24
/** If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. */
25
25
swapCommit?: string
26
26
}
···
64
64
/** Operation which creates a new record. */
65
65
export interface Create {
66
66
$type?: 'com.atproto.repo.applyWrites#create'
67
-
collection: string
68
67
/** NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. */
69
68
rkey?: string
70
69
value: { [_ in string]: unknown }
70
+
collection: string
71
71
}
72
72
73
73
const hashCreate = 'create'
···
80
80
return validate<Create & V>(v, id, hashCreate)
81
81
}
82
82
83
+
/** Operation which deletes an existing record. */
84
+
export interface Delete {
85
+
$type?: 'com.atproto.repo.applyWrites#delete'
86
+
rkey: string
87
+
collection: string
88
+
}
89
+
90
+
const hashDelete = 'delete'
91
+
92
+
export function isDelete<V>(v: V) {
93
+
return is$typed(v, id, hashDelete)
94
+
}
95
+
96
+
export function validateDelete<V>(v: V) {
97
+
return validate<Delete & V>(v, id, hashDelete)
98
+
}
99
+
83
100
/** Operation which updates an existing record. */
84
101
export interface Update {
85
102
$type?: 'com.atproto.repo.applyWrites#update'
86
-
collection: string
87
103
rkey: string
88
104
value: { [_ in string]: unknown }
105
+
collection: string
89
106
}
90
107
91
108
const hashUpdate = 'update'
···
98
115
return validate<Update & V>(v, id, hashUpdate)
99
116
}
100
117
101
-
/** Operation which deletes an existing record. */
102
-
export interface Delete {
103
-
$type?: 'com.atproto.repo.applyWrites#delete'
104
-
collection: string
105
-
rkey: string
106
-
}
107
-
108
-
const hashDelete = 'delete'
109
-
110
-
export function isDelete<V>(v: V) {
111
-
return is$typed(v, id, hashDelete)
112
-
}
113
-
114
-
export function validateDelete<V>(v: V) {
115
-
return validate<Delete & V>(v, id, hashDelete)
116
-
}
117
-
118
118
export interface CreateResult {
119
119
$type?: 'com.atproto.repo.applyWrites#createResult'
120
+
cid: string
120
121
uri: string
121
-
cid: string
122
122
validationStatus?: 'valid' | 'unknown' | (string & {})
123
123
}
124
124
···
132
132
return validate<CreateResult & V>(v, id, hashCreateResult)
133
133
}
134
134
135
+
export interface DeleteResult {
136
+
$type?: 'com.atproto.repo.applyWrites#deleteResult'
137
+
}
138
+
139
+
const hashDeleteResult = 'deleteResult'
140
+
141
+
export function isDeleteResult<V>(v: V) {
142
+
return is$typed(v, id, hashDeleteResult)
143
+
}
144
+
145
+
export function validateDeleteResult<V>(v: V) {
146
+
return validate<DeleteResult & V>(v, id, hashDeleteResult)
147
+
}
148
+
135
149
export interface UpdateResult {
136
150
$type?: 'com.atproto.repo.applyWrites#updateResult'
137
-
uri: string
138
151
cid: string
152
+
uri: string
139
153
validationStatus?: 'valid' | 'unknown' | (string & {})
140
154
}
141
155
···
148
162
export function validateUpdateResult<V>(v: V) {
149
163
return validate<UpdateResult & V>(v, id, hashUpdateResult)
150
164
}
151
-
152
-
export interface DeleteResult {
153
-
$type?: 'com.atproto.repo.applyWrites#deleteResult'
154
-
}
155
-
156
-
const hashDeleteResult = 'deleteResult'
157
-
158
-
export function isDeleteResult<V>(v: V) {
159
-
return is$typed(v, id, hashDeleteResult)
160
-
}
161
-
162
-
export function validateDeleteResult<V>(v: V) {
163
-
return validate<DeleteResult & V>(v, id, hashDeleteResult)
164
-
}
+5
-5
packages/lexicon/src/types/com/atproto/repo/createRecord.ts
+5
-5
packages/lexicon/src/types/com/atproto/repo/createRecord.ts
···
18
18
export interface InputSchema {
19
19
/** The handle or DID of the repo (aka, current account). */
20
20
repo: string
21
-
/** The NSID of the record collection. */
22
-
collection: string
23
21
/** The Record Key. */
24
22
rkey?: string
25
-
/** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. */
26
-
validate?: boolean
27
23
/** The record itself. Must contain a $type field. */
28
24
record: { [_ in string]: unknown }
25
+
/** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. */
26
+
validate?: boolean
27
+
/** The NSID of the record collection. */
28
+
collection: string
29
29
/** Compare and swap with the previous commit by CID. */
30
30
swapCommit?: string
31
31
}
32
32
33
33
export interface OutputSchema {
34
-
uri: string
35
34
cid: string
35
+
uri: string
36
36
commit?: ComAtprotoRepoDefs.CommitMeta
37
37
validationStatus?: 'valid' | 'unknown' | (string & {})
38
38
}
+4
-4
packages/lexicon/src/types/com/atproto/repo/deleteRecord.ts
+4
-4
packages/lexicon/src/types/com/atproto/repo/deleteRecord.ts
···
18
18
export interface InputSchema {
19
19
/** The handle or DID of the repo (aka, current account). */
20
20
repo: string
21
-
/** The NSID of the record collection. */
22
-
collection: string
23
21
/** The Record Key. */
24
22
rkey: string
25
-
/** Compare and swap with the previous record by CID. */
26
-
swapRecord?: string
23
+
/** The NSID of the record collection. */
24
+
collection: string
27
25
/** Compare and swap with the previous commit by CID. */
28
26
swapCommit?: string
27
+
/** Compare and swap with the previous record by CID. */
28
+
swapRecord?: string
29
29
}
30
30
31
31
export interface OutputSchema {
+1
-1
packages/lexicon/src/types/com/atproto/repo/describeRepo.ts
+1
-1
packages/lexicon/src/types/com/atproto/repo/describeRepo.ts
···
20
20
export type InputSchema = undefined
21
21
22
22
export interface OutputSchema {
23
-
handle: string
24
23
did: string
25
24
/** The complete DID document for this account. */
26
25
didDoc: { [_ in string]: unknown }
26
+
handle: string
27
27
/** List of all the collections (NSIDs) for which this repo contains at least one record. */
28
28
collections: string[]
29
29
/** Indicates if handle is currently valid (resolves bi-directionally) */
+5
-5
packages/lexicon/src/types/com/atproto/repo/getRecord.ts
+5
-5
packages/lexicon/src/types/com/atproto/repo/getRecord.ts
···
13
13
const id = 'com.atproto.repo.getRecord'
14
14
15
15
export interface QueryParams {
16
+
/** The CID of the version of the record. If not specified, then return the most recent version. */
17
+
cid?: string
16
18
/** The handle or DID of the repo. */
17
19
repo: string
18
-
/** The NSID of the record collection. */
19
-
collection: string
20
20
/** The Record Key. */
21
21
rkey: string
22
-
/** The CID of the version of the record. If not specified, then return the most recent version. */
23
-
cid?: string
22
+
/** The NSID of the record collection. */
23
+
collection: string
24
24
}
25
25
26
26
export type InputSchema = undefined
27
27
28
28
export interface OutputSchema {
29
-
uri: string
30
29
cid?: string
30
+
uri: string
31
31
value: { [_ in string]: unknown }
32
32
}
33
33
+1
-1
packages/lexicon/src/types/com/atproto/repo/listMissingBlobs.ts
+1
-1
packages/lexicon/src/types/com/atproto/repo/listMissingBlobs.ts
+3
-7
packages/lexicon/src/types/com/atproto/repo/listRecords.ts
+3
-7
packages/lexicon/src/types/com/atproto/repo/listRecords.ts
···
15
15
export interface QueryParams {
16
16
/** The handle or DID of the repo. */
17
17
repo: string
18
-
/** The NSID of the record type. */
19
-
collection: string
20
18
/** The number of records to return. */
21
19
limit?: number
22
20
cursor?: string
23
-
/** DEPRECATED: The lowest sort-ordered rkey to start from (exclusive) */
24
-
rkeyStart?: string
25
-
/** DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) */
26
-
rkeyEnd?: string
27
21
/** Flag to reverse the order of the returned records. */
28
22
reverse?: boolean
23
+
/** The NSID of the record type. */
24
+
collection: string
29
25
}
30
26
31
27
export type InputSchema = undefined
···
52
48
53
49
export interface Record {
54
50
$type?: 'com.atproto.repo.listRecords#record'
55
-
uri: string
56
51
cid: string
52
+
uri: string
57
53
value: { [_ in string]: unknown }
58
54
}
59
55
+7
-7
packages/lexicon/src/types/com/atproto/repo/putRecord.ts
+7
-7
packages/lexicon/src/types/com/atproto/repo/putRecord.ts
···
18
18
export interface InputSchema {
19
19
/** The handle or DID of the repo (aka, current account). */
20
20
repo: string
21
-
/** The NSID of the record collection. */
22
-
collection: string
23
21
/** The Record Key. */
24
22
rkey: string
25
-
/** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. */
26
-
validate?: boolean
27
23
/** The record to write. */
28
24
record: { [_ in string]: unknown }
29
-
/** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation */
30
-
swapRecord?: string | null
25
+
/** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. */
26
+
validate?: boolean
27
+
/** The NSID of the record collection. */
28
+
collection: string
31
29
/** Compare and swap with the previous commit by CID. */
32
30
swapCommit?: string
31
+
/** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation */
32
+
swapRecord?: string | null
33
33
}
34
34
35
35
export interface OutputSchema {
36
-
uri: string
37
36
cid: string
37
+
uri: string
38
38
commit?: ComAtprotoRepoDefs.CommitMeta
39
39
validationStatus?: 'valid' | 'unknown' | (string & {})
40
40
}