@atproto/api 0.0.8 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +44 -6
  2. package/dist/agent.d.ts +22 -0
  3. package/dist/client/index.d.ts +63 -61
  4. package/dist/client/lexicons.d.ts +237 -23
  5. package/dist/client/types/app/bsky/actor/getProfiles.d.ts +19 -0
  6. package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +0 -7
  7. package/dist/client/types/app/bsky/actor/profile.d.ts +25 -0
  8. package/dist/client/types/com/atproto/admin/blob.d.ts +37 -0
  9. package/dist/client/types/com/atproto/admin/moderationAction.d.ts +13 -2
  10. package/dist/client/types/com/atproto/admin/record.d.ts +5 -2
  11. package/dist/client/types/com/atproto/admin/repo.d.ts +2 -2
  12. package/dist/client/types/com/atproto/admin/takeModerationAction.d.ts +5 -1
  13. package/dist/client/types/com/atproto/sync/getRepo.d.ts +2 -1
  14. package/dist/index.d.ts +3 -3
  15. package/dist/index.js +623 -253
  16. package/dist/index.js.map +4 -4
  17. package/dist/types.d.ts +33 -0
  18. package/package.json +1 -1
  19. package/src/agent.ts +305 -0
  20. package/src/client/index.ts +75 -63
  21. package/src/client/lexicons.ts +281 -38
  22. package/src/client/types/app/bsky/actor/getProfiles.ts +35 -0
  23. package/src/client/types/app/bsky/actor/getSuggestions.ts +0 -18
  24. package/src/client/types/app/bsky/actor/profile.ts +45 -0
  25. package/src/client/types/com/atproto/admin/blob.ts +84 -0
  26. package/src/client/types/com/atproto/admin/moderationAction.ts +29 -10
  27. package/src/client/types/com/atproto/admin/record.ts +5 -2
  28. package/src/client/types/com/atproto/admin/repo.ts +2 -2
  29. package/src/client/types/com/atproto/admin/takeModerationAction.ts +8 -0
  30. package/src/client/types/com/atproto/sync/getRepo.ts +4 -2
  31. package/src/index.ts +3 -3
  32. package/src/types.ts +71 -0
  33. package/tests/_util.ts +26 -0
  34. package/tests/agent.test.ts +391 -0
  35. package/tests/errors.test.ts +4 -8
  36. package/tsconfig.build.tsbuildinfo +1 -1
  37. package/src/session.ts +0 -194
  38. package/tests/session.test.ts +0 -239
@@ -218,6 +218,78 @@ export const schemaDict = {
218
218
  },
219
219
  },
220
220
  },
221
+ ComAtprotoAdminBlob: {
222
+ lexicon: 1,
223
+ id: 'com.atproto.admin.blob',
224
+ defs: {
225
+ view: {
226
+ type: 'object',
227
+ required: ['cid', 'mimeType', 'size', 'createdAt'],
228
+ properties: {
229
+ cid: {
230
+ type: 'string',
231
+ },
232
+ mimeType: {
233
+ type: 'string',
234
+ },
235
+ size: {
236
+ type: 'integer',
237
+ },
238
+ createdAt: {
239
+ type: 'datetime',
240
+ },
241
+ details: {
242
+ type: 'union',
243
+ refs: [
244
+ 'lex:com.atproto.admin.blob#imageDetails',
245
+ 'lex:com.atproto.admin.blob#videoDetails',
246
+ ],
247
+ },
248
+ moderation: {
249
+ type: 'ref',
250
+ ref: 'lex:com.atproto.admin.blob#moderation',
251
+ },
252
+ },
253
+ },
254
+ imageDetails: {
255
+ type: 'object',
256
+ required: ['width', 'height'],
257
+ properties: {
258
+ width: {
259
+ type: 'integer',
260
+ },
261
+ height: {
262
+ type: 'integer',
263
+ },
264
+ },
265
+ },
266
+ videoDetails: {
267
+ type: 'object',
268
+ required: ['width', 'height', 'length'],
269
+ properties: {
270
+ width: {
271
+ type: 'integer',
272
+ },
273
+ height: {
274
+ type: 'integer',
275
+ },
276
+ length: {
277
+ type: 'integer',
278
+ },
279
+ },
280
+ },
281
+ moderation: {
282
+ type: 'object',
283
+ required: [],
284
+ properties: {
285
+ currentAction: {
286
+ type: 'ref',
287
+ ref: 'lex:com.atproto.admin.moderationAction#viewCurrent',
288
+ },
289
+ },
290
+ },
291
+ },
292
+ },
221
293
  ComAtprotoAdminGetModerationAction: {
222
294
  lexicon: 1,
223
295
  id: 'com.atproto.admin.getModerationAction',
@@ -430,6 +502,7 @@ export const schemaDict = {
430
502
  'id',
431
503
  'action',
432
504
  'subject',
505
+ 'subjectBlobCids',
433
506
  'reason',
434
507
  'createdBy',
435
508
  'createdAt',
@@ -440,12 +513,8 @@ export const schemaDict = {
440
513
  type: 'integer',
441
514
  },
442
515
  action: {
443
- type: 'string',
444
- knownValues: [
445
- 'com.atproto.admin.moderationAction#takedown',
446
- 'com.atproto.admin.moderationAction#flag',
447
- 'com.atproto.admin.moderationAction#acknowledge',
448
- ],
516
+ type: 'ref',
517
+ ref: 'lex:com.atproto.admin.moderationAction#actionType',
449
518
  },
450
519
  subject: {
451
520
  type: 'union',
@@ -454,6 +523,12 @@ export const schemaDict = {
454
523
  'lex:com.atproto.repo.strongRef',
455
524
  ],
456
525
  },
526
+ subjectBlobCids: {
527
+ type: 'array',
528
+ items: {
529
+ type: 'string',
530
+ },
531
+ },
457
532
  reason: {
458
533
  type: 'string',
459
534
  },
@@ -481,6 +556,7 @@ export const schemaDict = {
481
556
  'id',
482
557
  'action',
483
558
  'subject',
559
+ 'subjectBlobs',
484
560
  'reason',
485
561
  'createdBy',
486
562
  'createdAt',
@@ -491,12 +567,8 @@ export const schemaDict = {
491
567
  type: 'integer',
492
568
  },
493
569
  action: {
494
- type: 'string',
495
- knownValues: [
496
- 'com.atproto.admin.moderationAction#takedown',
497
- 'com.atproto.admin.moderationAction#flag',
498
- 'com.atproto.admin.moderationAction#acknowledge',
499
- ],
570
+ type: 'ref',
571
+ ref: 'lex:com.atproto.admin.moderationAction#actionType',
500
572
  },
501
573
  subject: {
502
574
  type: 'union',
@@ -505,6 +577,13 @@ export const schemaDict = {
505
577
  'lex:com.atproto.admin.record#view',
506
578
  ],
507
579
  },
580
+ subjectBlobs: {
581
+ type: 'array',
582
+ items: {
583
+ type: 'ref',
584
+ ref: 'lex:com.atproto.admin.blob#view',
585
+ },
586
+ },
508
587
  reason: {
509
588
  type: 'string',
510
589
  },
@@ -527,6 +606,19 @@ export const schemaDict = {
527
606
  },
528
607
  },
529
608
  },
609
+ viewCurrent: {
610
+ type: 'object',
611
+ required: ['id', 'action'],
612
+ properties: {
613
+ id: {
614
+ type: 'integer',
615
+ },
616
+ action: {
617
+ type: 'ref',
618
+ ref: 'lex:com.atproto.admin.moderationAction#actionType',
619
+ },
620
+ },
621
+ },
530
622
  reversal: {
531
623
  type: 'object',
532
624
  required: ['reason', 'createdBy', 'createdAt'],
@@ -542,6 +634,14 @@ export const schemaDict = {
542
634
  },
543
635
  },
544
636
  },
637
+ actionType: {
638
+ type: 'string',
639
+ knownValues: [
640
+ 'com.atproto.admin.moderationAction#takedown',
641
+ 'com.atproto.admin.moderationAction#flag',
642
+ 'com.atproto.admin.moderationAction#acknowledge',
643
+ ],
644
+ },
545
645
  takedown: {
546
646
  type: 'token',
547
647
  description:
@@ -656,7 +756,15 @@ export const schemaDict = {
656
756
  defs: {
657
757
  view: {
658
758
  type: 'object',
659
- required: ['uri', 'cid', 'value', 'indexedAt', 'moderation', 'repo'],
759
+ required: [
760
+ 'uri',
761
+ 'cid',
762
+ 'value',
763
+ 'blobCids',
764
+ 'indexedAt',
765
+ 'moderation',
766
+ 'repo',
767
+ ],
660
768
  properties: {
661
769
  uri: {
662
770
  type: 'string',
@@ -667,6 +775,12 @@ export const schemaDict = {
667
775
  value: {
668
776
  type: 'unknown',
669
777
  },
778
+ blobCids: {
779
+ type: 'array',
780
+ items: {
781
+ type: 'string',
782
+ },
783
+ },
670
784
  indexedAt: {
671
785
  type: 'string',
672
786
  },
@@ -682,7 +796,15 @@ export const schemaDict = {
682
796
  },
683
797
  viewDetail: {
684
798
  type: 'object',
685
- required: ['uri', 'cid', 'value', 'indexedAt', 'moderation', 'repo'],
799
+ required: [
800
+ 'uri',
801
+ 'cid',
802
+ 'value',
803
+ 'blobs',
804
+ 'indexedAt',
805
+ 'moderation',
806
+ 'repo',
807
+ ],
686
808
  properties: {
687
809
  uri: {
688
810
  type: 'string',
@@ -693,6 +815,13 @@ export const schemaDict = {
693
815
  value: {
694
816
  type: 'unknown',
695
817
  },
818
+ blobs: {
819
+ type: 'array',
820
+ items: {
821
+ type: 'ref',
822
+ ref: 'lex:com.atproto.admin.blob#view',
823
+ },
824
+ },
696
825
  indexedAt: {
697
826
  type: 'string',
698
827
  },
@@ -710,8 +839,9 @@ export const schemaDict = {
710
839
  type: 'object',
711
840
  required: [],
712
841
  properties: {
713
- takedownId: {
714
- type: 'integer',
842
+ currentAction: {
843
+ type: 'ref',
844
+ ref: 'lex:com.atproto.admin.moderationAction#viewCurrent',
715
845
  },
716
846
  },
717
847
  },
@@ -719,6 +849,10 @@ export const schemaDict = {
719
849
  type: 'object',
720
850
  required: ['actions', 'reports'],
721
851
  properties: {
852
+ currentAction: {
853
+ type: 'ref',
854
+ ref: 'lex:com.atproto.admin.moderationAction#viewCurrent',
855
+ },
722
856
  actions: {
723
857
  type: 'array',
724
858
  items: {
@@ -733,9 +867,6 @@ export const schemaDict = {
733
867
  ref: 'lex:com.atproto.admin.moderationReport#view',
734
868
  },
735
869
  },
736
- takedownId: {
737
- type: 'integer',
738
- },
739
870
  },
740
871
  },
741
872
  },
@@ -827,8 +958,9 @@ export const schemaDict = {
827
958
  type: 'object',
828
959
  required: [],
829
960
  properties: {
830
- takedownId: {
831
- type: 'integer',
961
+ currentAction: {
962
+ type: 'ref',
963
+ ref: 'lex:com.atproto.admin.moderationAction#viewCurrent',
832
964
  },
833
965
  },
834
966
  },
@@ -836,6 +968,10 @@ export const schemaDict = {
836
968
  type: 'object',
837
969
  required: ['actions', 'reports'],
838
970
  properties: {
971
+ currentAction: {
972
+ type: 'ref',
973
+ ref: 'lex:com.atproto.admin.moderationAction#viewCurrent',
974
+ },
839
975
  actions: {
840
976
  type: 'array',
841
977
  items: {
@@ -850,9 +986,6 @@ export const schemaDict = {
850
986
  ref: 'lex:com.atproto.admin.moderationReport#view',
851
987
  },
852
988
  },
853
- takedownId: {
854
- type: 'integer',
855
- },
856
989
  },
857
990
  },
858
991
  },
@@ -1004,6 +1137,12 @@ export const schemaDict = {
1004
1137
  'lex:com.atproto.repo.recordRef',
1005
1138
  ],
1006
1139
  },
1140
+ subjectBlobCids: {
1141
+ type: 'array',
1142
+ items: {
1143
+ type: 'string',
1144
+ },
1145
+ },
1007
1146
  reason: {
1008
1147
  type: 'string',
1009
1148
  },
@@ -1020,6 +1159,11 @@ export const schemaDict = {
1020
1159
  ref: 'lex:com.atproto.admin.moderationAction#view',
1021
1160
  },
1022
1161
  },
1162
+ errors: [
1163
+ {
1164
+ name: 'SubjectHasAction',
1165
+ },
1166
+ ],
1023
1167
  },
1024
1168
  },
1025
1169
  },
@@ -2011,9 +2155,15 @@ export const schemaDict = {
2011
2155
  type: 'string',
2012
2156
  description: 'The DID of the repo.',
2013
2157
  },
2014
- from: {
2158
+ earliest: {
2015
2159
  type: 'string',
2016
- description: 'A past commit CID.',
2160
+ description:
2161
+ 'The earliest commit in the commit range (not inclusive)',
2162
+ },
2163
+ latest: {
2164
+ type: 'string',
2165
+ description:
2166
+ 'The latest commit you in the commit range (inclusive',
2017
2167
  },
2018
2168
  },
2019
2169
  },
@@ -2109,6 +2259,44 @@ export const schemaDict = {
2109
2259
  },
2110
2260
  },
2111
2261
  },
2262
+ AppBskyActorGetProfiles: {
2263
+ lexicon: 1,
2264
+ id: 'app.bsky.actor.getProfiles',
2265
+ defs: {
2266
+ main: {
2267
+ type: 'query',
2268
+ parameters: {
2269
+ type: 'params',
2270
+ required: ['actors'],
2271
+ properties: {
2272
+ actors: {
2273
+ type: 'array',
2274
+ items: {
2275
+ type: 'string',
2276
+ },
2277
+ maxLength: 25,
2278
+ },
2279
+ },
2280
+ },
2281
+ output: {
2282
+ encoding: 'application/json',
2283
+ schema: {
2284
+ type: 'object',
2285
+ required: ['profiles'],
2286
+ properties: {
2287
+ profiles: {
2288
+ type: 'array',
2289
+ items: {
2290
+ type: 'ref',
2291
+ ref: 'lex:app.bsky.actor.profile#view',
2292
+ },
2293
+ },
2294
+ },
2295
+ },
2296
+ },
2297
+ },
2298
+ },
2299
+ },
2112
2300
  AppBskyActorGetSuggestions: {
2113
2301
  lexicon: 1,
2114
2302
  id: 'app.bsky.actor.getSuggestions',
@@ -2178,18 +2366,6 @@ export const schemaDict = {
2178
2366
  indexedAt: {
2179
2367
  type: 'datetime',
2180
2368
  },
2181
- myState: {
2182
- type: 'ref',
2183
- ref: 'lex:app.bsky.actor.getSuggestions#myState',
2184
- },
2185
- },
2186
- },
2187
- myState: {
2188
- type: 'object',
2189
- properties: {
2190
- follow: {
2191
- type: 'string',
2192
- },
2193
2369
  },
2194
2370
  },
2195
2371
  },
@@ -2230,6 +2406,71 @@ export const schemaDict = {
2230
2406
  },
2231
2407
  },
2232
2408
  },
2409
+ view: {
2410
+ type: 'object',
2411
+ required: [
2412
+ 'did',
2413
+ 'declaration',
2414
+ 'handle',
2415
+ 'creator',
2416
+ 'followersCount',
2417
+ 'followsCount',
2418
+ 'postsCount',
2419
+ ],
2420
+ properties: {
2421
+ did: {
2422
+ type: 'string',
2423
+ },
2424
+ declaration: {
2425
+ type: 'ref',
2426
+ ref: 'lex:app.bsky.system.declRef',
2427
+ },
2428
+ handle: {
2429
+ type: 'string',
2430
+ },
2431
+ creator: {
2432
+ type: 'string',
2433
+ },
2434
+ displayName: {
2435
+ type: 'string',
2436
+ maxLength: 64,
2437
+ },
2438
+ description: {
2439
+ type: 'string',
2440
+ maxLength: 256,
2441
+ },
2442
+ avatar: {
2443
+ type: 'string',
2444
+ },
2445
+ banner: {
2446
+ type: 'string',
2447
+ },
2448
+ followersCount: {
2449
+ type: 'integer',
2450
+ },
2451
+ followsCount: {
2452
+ type: 'integer',
2453
+ },
2454
+ postsCount: {
2455
+ type: 'integer',
2456
+ },
2457
+ myState: {
2458
+ type: 'ref',
2459
+ ref: 'lex:app.bsky.actor.profile#myState',
2460
+ },
2461
+ },
2462
+ },
2463
+ myState: {
2464
+ type: 'object',
2465
+ properties: {
2466
+ follow: {
2467
+ type: 'string',
2468
+ },
2469
+ muted: {
2470
+ type: 'boolean',
2471
+ },
2472
+ },
2473
+ },
2233
2474
  },
2234
2475
  },
2235
2476
  AppBskyActorRef: {
@@ -3836,6 +4077,7 @@ export const ids = {
3836
4077
  ComAtprotoAccountRequestPasswordReset:
3837
4078
  'com.atproto.account.requestPasswordReset',
3838
4079
  ComAtprotoAccountResetPassword: 'com.atproto.account.resetPassword',
4080
+ ComAtprotoAdminBlob: 'com.atproto.admin.blob',
3839
4081
  ComAtprotoAdminGetModerationAction: 'com.atproto.admin.getModerationAction',
3840
4082
  ComAtprotoAdminGetModerationActions: 'com.atproto.admin.getModerationActions',
3841
4083
  ComAtprotoAdminGetModerationReport: 'com.atproto.admin.getModerationReport',
@@ -3878,6 +4120,7 @@ export const ids = {
3878
4120
  ComAtprotoSyncGetRecord: 'com.atproto.sync.getRecord',
3879
4121
  ComAtprotoSyncGetRepo: 'com.atproto.sync.getRepo',
3880
4122
  AppBskyActorGetProfile: 'app.bsky.actor.getProfile',
4123
+ AppBskyActorGetProfiles: 'app.bsky.actor.getProfiles',
3881
4124
  AppBskyActorGetSuggestions: 'app.bsky.actor.getSuggestions',
3882
4125
  AppBskyActorProfile: 'app.bsky.actor.profile',
3883
4126
  AppBskyActorRef: 'app.bsky.actor.ref',
@@ -0,0 +1,35 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { Headers, XRPCError } from '@atproto/xrpc'
5
+ import { ValidationResult } from '@atproto/lexicon'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import * as AppBskyActorProfile from './profile'
9
+
10
+ export interface QueryParams {
11
+ actors: string[]
12
+ }
13
+
14
+ export type InputSchema = undefined
15
+
16
+ export interface OutputSchema {
17
+ profiles: AppBskyActorProfile.View[]
18
+ [k: string]: unknown
19
+ }
20
+
21
+ export interface CallOptions {
22
+ headers?: Headers
23
+ }
24
+
25
+ export interface Response {
26
+ success: boolean
27
+ headers: Headers
28
+ data: OutputSchema
29
+ }
30
+
31
+ export function toKnownErr(e: any) {
32
+ if (e instanceof XRPCError) {
33
+ }
34
+ return e
35
+ }
@@ -44,7 +44,6 @@ export interface Actor {
44
44
  description?: string
45
45
  avatar?: string
46
46
  indexedAt?: string
47
- myState?: MyState
48
47
  [k: string]: unknown
49
48
  }
50
49
 
@@ -59,20 +58,3 @@ export function isActor(v: unknown): v is Actor {
59
58
  export function validateActor(v: unknown): ValidationResult {
60
59
  return lexicons.validate('app.bsky.actor.getSuggestions#actor', v)
61
60
  }
62
-
63
- export interface MyState {
64
- follow?: string
65
- [k: string]: unknown
66
- }
67
-
68
- export function isMyState(v: unknown): v is MyState {
69
- return (
70
- isObj(v) &&
71
- hasProp(v, '$type') &&
72
- v.$type === 'app.bsky.actor.getSuggestions#myState'
73
- )
74
- }
75
-
76
- export function validateMyState(v: unknown): ValidationResult {
77
- return lexicons.validate('app.bsky.actor.getSuggestions#myState', v)
78
- }
@@ -4,6 +4,7 @@
4
4
  import { ValidationResult } from '@atproto/lexicon'
5
5
  import { isObj, hasProp } from '../../../../util'
6
6
  import { lexicons } from '../../../../lexicons'
7
+ import * as AppBskySystemDeclRef from '../system/declRef'
7
8
 
8
9
  export interface Record {
9
10
  displayName: string
@@ -25,3 +26,47 @@ export function isRecord(v: unknown): v is Record {
25
26
  export function validateRecord(v: unknown): ValidationResult {
26
27
  return lexicons.validate('app.bsky.actor.profile#main', v)
27
28
  }
29
+
30
+ export interface View {
31
+ did: string
32
+ declaration: AppBskySystemDeclRef.Main
33
+ handle: string
34
+ creator: string
35
+ displayName?: string
36
+ description?: string
37
+ avatar?: string
38
+ banner?: string
39
+ followersCount: number
40
+ followsCount: number
41
+ postsCount: number
42
+ myState?: MyState
43
+ [k: string]: unknown
44
+ }
45
+
46
+ export function isView(v: unknown): v is View {
47
+ return (
48
+ isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.actor.profile#view'
49
+ )
50
+ }
51
+
52
+ export function validateView(v: unknown): ValidationResult {
53
+ return lexicons.validate('app.bsky.actor.profile#view', v)
54
+ }
55
+
56
+ export interface MyState {
57
+ follow?: string
58
+ muted?: boolean
59
+ [k: string]: unknown
60
+ }
61
+
62
+ export function isMyState(v: unknown): v is MyState {
63
+ return (
64
+ isObj(v) &&
65
+ hasProp(v, '$type') &&
66
+ v.$type === 'app.bsky.actor.profile#myState'
67
+ )
68
+ }
69
+
70
+ export function validateMyState(v: unknown): ValidationResult {
71
+ return lexicons.validate('app.bsky.actor.profile#myState', v)
72
+ }
@@ -0,0 +1,84 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult } from '@atproto/lexicon'
5
+ import { isObj, hasProp } from '../../../../util'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import * as ComAtprotoAdminModerationAction from './moderationAction'
8
+
9
+ export interface View {
10
+ cid: string
11
+ mimeType: string
12
+ size: number
13
+ createdAt: string
14
+ details?:
15
+ | ImageDetails
16
+ | VideoDetails
17
+ | { $type: string; [k: string]: unknown }
18
+ moderation?: Moderation
19
+ [k: string]: unknown
20
+ }
21
+
22
+ export function isView(v: unknown): v is View {
23
+ return (
24
+ isObj(v) && hasProp(v, '$type') && v.$type === 'com.atproto.admin.blob#view'
25
+ )
26
+ }
27
+
28
+ export function validateView(v: unknown): ValidationResult {
29
+ return lexicons.validate('com.atproto.admin.blob#view', v)
30
+ }
31
+
32
+ export interface ImageDetails {
33
+ width: number
34
+ height: number
35
+ [k: string]: unknown
36
+ }
37
+
38
+ export function isImageDetails(v: unknown): v is ImageDetails {
39
+ return (
40
+ isObj(v) &&
41
+ hasProp(v, '$type') &&
42
+ v.$type === 'com.atproto.admin.blob#imageDetails'
43
+ )
44
+ }
45
+
46
+ export function validateImageDetails(v: unknown): ValidationResult {
47
+ return lexicons.validate('com.atproto.admin.blob#imageDetails', v)
48
+ }
49
+
50
+ export interface VideoDetails {
51
+ width: number
52
+ height: number
53
+ length: number
54
+ [k: string]: unknown
55
+ }
56
+
57
+ export function isVideoDetails(v: unknown): v is VideoDetails {
58
+ return (
59
+ isObj(v) &&
60
+ hasProp(v, '$type') &&
61
+ v.$type === 'com.atproto.admin.blob#videoDetails'
62
+ )
63
+ }
64
+
65
+ export function validateVideoDetails(v: unknown): ValidationResult {
66
+ return lexicons.validate('com.atproto.admin.blob#videoDetails', v)
67
+ }
68
+
69
+ export interface Moderation {
70
+ currentAction?: ComAtprotoAdminModerationAction.ViewCurrent
71
+ [k: string]: unknown
72
+ }
73
+
74
+ export function isModeration(v: unknown): v is Moderation {
75
+ return (
76
+ isObj(v) &&
77
+ hasProp(v, '$type') &&
78
+ v.$type === 'com.atproto.admin.blob#moderation'
79
+ )
80
+ }
81
+
82
+ export function validateModeration(v: unknown): ValidationResult {
83
+ return lexicons.validate('com.atproto.admin.blob#moderation', v)
84
+ }