@atproto/api 0.1.1 → 0.1.3

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 (47) hide show
  1. package/build.js +8 -0
  2. package/dist/client/index.d.ts +14 -0
  3. package/dist/client/lexicons.d.ts +251 -227
  4. package/dist/client/types/app/bsky/actor/getProfile.d.ts +2 -24
  5. package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +2 -15
  6. package/dist/client/types/app/bsky/actor/profile.d.ts +24 -1
  7. package/dist/client/types/app/bsky/actor/ref.d.ts +2 -0
  8. package/dist/client/types/app/bsky/actor/search.d.ts +2 -15
  9. package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +2 -13
  10. package/dist/client/types/app/bsky/actor/updateProfile.d.ts +3 -3
  11. package/dist/client/types/app/bsky/embed/record.d.ts +33 -0
  12. package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +2 -15
  13. package/dist/client/types/app/bsky/feed/post.d.ts +3 -2
  14. package/dist/client/types/app/bsky/graph/getFollowers.d.ts +1 -15
  15. package/dist/client/types/app/bsky/graph/getFollows.d.ts +1 -15
  16. package/dist/client/types/app/bsky/graph/getMutes.d.ts +2 -13
  17. package/dist/client/types/com/atproto/handle/update.d.ts +17 -0
  18. package/dist/client/types/com/atproto/report/reasonType.d.ts +1 -1
  19. package/dist/client/types/com/atproto/sync/getBlocks.d.ts +15 -0
  20. package/dist/client/types/com/atproto/sync/notifyOfUpdate.d.ts +12 -0
  21. package/dist/client/types/com/atproto/sync/requestCrawl.d.ts +13 -0
  22. package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +1 -0
  23. package/dist/index.js +709 -545
  24. package/dist/index.js.map +4 -4
  25. package/package.json +1 -1
  26. package/src/client/index.ts +56 -0
  27. package/src/client/lexicons.ts +290 -253
  28. package/src/client/types/app/bsky/actor/getProfile.ts +2 -35
  29. package/src/client/types/app/bsky/actor/getSuggestions.ts +2 -25
  30. package/src/client/types/app/bsky/actor/profile.ts +47 -1
  31. package/src/client/types/app/bsky/actor/ref.ts +2 -0
  32. package/src/client/types/app/bsky/actor/search.ts +2 -23
  33. package/src/client/types/app/bsky/actor/searchTypeahead.ts +2 -23
  34. package/src/client/types/app/bsky/actor/updateProfile.ts +3 -3
  35. package/src/client/types/app/bsky/embed/record.ts +83 -0
  36. package/src/client/types/app/bsky/feed/getRepostedBy.ts +2 -25
  37. package/src/client/types/app/bsky/feed/post.ts +3 -0
  38. package/src/client/types/app/bsky/graph/getFollowers.ts +1 -25
  39. package/src/client/types/app/bsky/graph/getFollows.ts +1 -25
  40. package/src/client/types/app/bsky/graph/getMutes.ts +2 -23
  41. package/src/client/types/com/atproto/handle/update.ts +31 -0
  42. package/src/client/types/com/atproto/report/reasonType.ts +2 -2
  43. package/src/client/types/com/atproto/sync/getBlocks.ts +31 -0
  44. package/src/client/types/com/atproto/sync/notifyOfUpdate.ts +26 -0
  45. package/src/client/types/com/atproto/sync/requestCrawl.ts +29 -0
  46. package/src/client/types/com/atproto/sync/subscribeAllRepos.ts +7 -0
  47. package/tsconfig.build.tsbuildinfo +1 -1
@@ -5,29 +5,14 @@ import { Headers, XRPCError } from '@atproto/xrpc'
5
5
  import { ValidationResult } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
- import * as AppBskySystemDeclRef from '../system/declRef'
8
+ import * as AppBskyActorProfile from './profile'
9
9
 
10
10
  export interface QueryParams {
11
11
  actor: string
12
12
  }
13
13
 
14
14
  export type InputSchema = undefined
15
-
16
- export interface OutputSchema {
17
- did: string
18
- declaration: AppBskySystemDeclRef.Main
19
- handle: string
20
- creator: string
21
- displayName?: string
22
- description?: string
23
- avatar?: string
24
- banner?: string
25
- followersCount: number
26
- followsCount: number
27
- postsCount: number
28
- myState?: MyState
29
- [k: string]: unknown
30
- }
15
+ export type OutputSchema = AppBskyActorProfile.View
31
16
 
32
17
  export interface CallOptions {
33
18
  headers?: Headers
@@ -44,21 +29,3 @@ export function toKnownErr(e: any) {
44
29
  }
45
30
  return e
46
31
  }
47
-
48
- export interface MyState {
49
- follow?: string
50
- muted?: boolean
51
- [k: string]: unknown
52
- }
53
-
54
- export function isMyState(v: unknown): v is MyState {
55
- return (
56
- isObj(v) &&
57
- hasProp(v, '$type') &&
58
- v.$type === 'app.bsky.actor.getProfile#myState'
59
- )
60
- }
61
-
62
- export function validateMyState(v: unknown): ValidationResult {
63
- return lexicons.validate('app.bsky.actor.getProfile#myState', v)
64
- }
@@ -5,7 +5,7 @@ import { Headers, XRPCError } from '@atproto/xrpc'
5
5
  import { ValidationResult } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
- import * as AppBskySystemDeclRef from '../system/declRef'
8
+ import * as AppBskyActorProfile from './profile'
9
9
 
10
10
  export interface QueryParams {
11
11
  limit?: number
@@ -16,7 +16,7 @@ export type InputSchema = undefined
16
16
 
17
17
  export interface OutputSchema {
18
18
  cursor?: string
19
- actors: Actor[]
19
+ actors: AppBskyActorProfile.ViewBasic[]
20
20
  [k: string]: unknown
21
21
  }
22
22
 
@@ -35,26 +35,3 @@ export function toKnownErr(e: any) {
35
35
  }
36
36
  return e
37
37
  }
38
-
39
- export interface Actor {
40
- did: string
41
- declaration: AppBskySystemDeclRef.Main
42
- handle: string
43
- displayName?: string
44
- description?: string
45
- avatar?: string
46
- indexedAt?: string
47
- [k: string]: unknown
48
- }
49
-
50
- export function isActor(v: unknown): v is Actor {
51
- return (
52
- isObj(v) &&
53
- hasProp(v, '$type') &&
54
- v.$type === 'app.bsky.actor.getSuggestions#actor'
55
- )
56
- }
57
-
58
- export function validateActor(v: unknown): ValidationResult {
59
- return lexicons.validate('app.bsky.actor.getSuggestions#actor', v)
60
- }
@@ -31,7 +31,6 @@ export interface View {
31
31
  did: string
32
32
  declaration: AppBskySystemDeclRef.Main
33
33
  handle: string
34
- creator: string
35
34
  displayName?: string
36
35
  description?: string
37
36
  avatar?: string
@@ -39,6 +38,9 @@ export interface View {
39
38
  followersCount: number
40
39
  followsCount: number
41
40
  postsCount: number
41
+ creator: string
42
+ indexedAt?: string
43
+ viewer?: ViewerState
42
44
  myState?: MyState
43
45
  [k: string]: unknown
44
46
  }
@@ -53,6 +55,50 @@ export function validateView(v: unknown): ValidationResult {
53
55
  return lexicons.validate('app.bsky.actor.profile#view', v)
54
56
  }
55
57
 
58
+ export interface ViewBasic {
59
+ did: string
60
+ declaration: AppBskySystemDeclRef.Main
61
+ handle: string
62
+ displayName?: string
63
+ description?: string
64
+ avatar?: string
65
+ indexedAt?: string
66
+ viewer?: ViewerState
67
+ [k: string]: unknown
68
+ }
69
+
70
+ export function isViewBasic(v: unknown): v is ViewBasic {
71
+ return (
72
+ isObj(v) &&
73
+ hasProp(v, '$type') &&
74
+ v.$type === 'app.bsky.actor.profile#viewBasic'
75
+ )
76
+ }
77
+
78
+ export function validateViewBasic(v: unknown): ValidationResult {
79
+ return lexicons.validate('app.bsky.actor.profile#viewBasic', v)
80
+ }
81
+
82
+ export interface ViewerState {
83
+ muted?: boolean
84
+ following?: string
85
+ followedBy?: string
86
+ [k: string]: unknown
87
+ }
88
+
89
+ export function isViewerState(v: unknown): v is ViewerState {
90
+ return (
91
+ isObj(v) &&
92
+ hasProp(v, '$type') &&
93
+ v.$type === 'app.bsky.actor.profile#viewerState'
94
+ )
95
+ }
96
+
97
+ export function validateViewerState(v: unknown): ValidationResult {
98
+ return lexicons.validate('app.bsky.actor.profile#viewerState', v)
99
+ }
100
+
101
+ /** Deprecated in favor of #viewerState */
56
102
  export interface MyState {
57
103
  follow?: string
58
104
  muted?: boolean
@@ -46,6 +46,8 @@ export function validateWithInfo(v: unknown): ValidationResult {
46
46
 
47
47
  export interface ViewerState {
48
48
  muted?: boolean
49
+ following?: string
50
+ followedBy?: string
49
51
  [k: string]: unknown
50
52
  }
51
53
 
@@ -5,7 +5,7 @@ import { Headers, XRPCError } from '@atproto/xrpc'
5
5
  import { ValidationResult } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
- import * as AppBskySystemDeclRef from '../system/declRef'
8
+ import * as AppBskyActorProfile from './profile'
9
9
 
10
10
  export interface QueryParams {
11
11
  term?: string
@@ -17,7 +17,7 @@ export type InputSchema = undefined
17
17
 
18
18
  export interface OutputSchema {
19
19
  cursor?: string
20
- users: User[]
20
+ users: AppBskyActorProfile.ViewBasic[]
21
21
  [k: string]: unknown
22
22
  }
23
23
 
@@ -36,24 +36,3 @@ export function toKnownErr(e: any) {
36
36
  }
37
37
  return e
38
38
  }
39
-
40
- export interface User {
41
- did: string
42
- declaration: AppBskySystemDeclRef.Main
43
- handle: string
44
- displayName?: string
45
- avatar?: string
46
- description?: string
47
- indexedAt?: string
48
- [k: string]: unknown
49
- }
50
-
51
- export function isUser(v: unknown): v is User {
52
- return (
53
- isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.actor.search#user'
54
- )
55
- }
56
-
57
- export function validateUser(v: unknown): ValidationResult {
58
- return lexicons.validate('app.bsky.actor.search#user', v)
59
- }
@@ -5,7 +5,7 @@ import { Headers, XRPCError } from '@atproto/xrpc'
5
5
  import { ValidationResult } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
- import * as AppBskySystemDeclRef from '../system/declRef'
8
+ import * as AppBskyActorRef from './ref'
9
9
 
10
10
  export interface QueryParams {
11
11
  term?: string
@@ -15,7 +15,7 @@ export interface QueryParams {
15
15
  export type InputSchema = undefined
16
16
 
17
17
  export interface OutputSchema {
18
- users: User[]
18
+ users: AppBskyActorRef.WithInfo[]
19
19
  [k: string]: unknown
20
20
  }
21
21
 
@@ -34,24 +34,3 @@ export function toKnownErr(e: any) {
34
34
  }
35
35
  return e
36
36
  }
37
-
38
- export interface User {
39
- did: string
40
- declaration: AppBskySystemDeclRef.Main
41
- handle: string
42
- displayName?: string
43
- avatar?: string
44
- [k: string]: unknown
45
- }
46
-
47
- export function isUser(v: unknown): v is User {
48
- return (
49
- isObj(v) &&
50
- hasProp(v, '$type') &&
51
- v.$type === 'app.bsky.actor.searchTypeahead#user'
52
- )
53
- }
54
-
55
- export function validateUser(v: unknown): ValidationResult {
56
- return lexicons.validate('app.bsky.actor.searchTypeahead#user', v)
57
- }
@@ -10,9 +10,9 @@ export interface QueryParams {}
10
10
 
11
11
  export interface InputSchema {
12
12
  displayName?: string
13
- description?: string
14
- avatar?: { cid: string; mimeType: string; [k: string]: unknown }
15
- banner?: { cid: string; mimeType: string; [k: string]: unknown }
13
+ description?: string | null
14
+ avatar?: { cid: string; mimeType: string; [k: string]: unknown } | null
15
+ banner?: { cid: string; mimeType: string; [k: string]: unknown } | null
16
16
  [k: string]: unknown
17
17
  }
18
18
 
@@ -0,0 +1,83 @@
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 ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
8
+ import * as AppBskyActorRef from '../actor/ref'
9
+
10
+ export interface Main {
11
+ record: ComAtprotoRepoStrongRef.Main
12
+ [k: string]: unknown
13
+ }
14
+
15
+ export function isMain(v: unknown): v is Main {
16
+ return (
17
+ isObj(v) &&
18
+ hasProp(v, '$type') &&
19
+ (v.$type === 'app.bsky.embed.record#main' ||
20
+ v.$type === 'app.bsky.embed.record')
21
+ )
22
+ }
23
+
24
+ export function validateMain(v: unknown): ValidationResult {
25
+ return lexicons.validate('app.bsky.embed.record#main', v)
26
+ }
27
+
28
+ export interface Presented {
29
+ record:
30
+ | PresentedRecord
31
+ | PresentedNotFound
32
+ | { $type: string; [k: string]: unknown }
33
+ [k: string]: unknown
34
+ }
35
+
36
+ export function isPresented(v: unknown): v is Presented {
37
+ return (
38
+ isObj(v) &&
39
+ hasProp(v, '$type') &&
40
+ v.$type === 'app.bsky.embed.record#presented'
41
+ )
42
+ }
43
+
44
+ export function validatePresented(v: unknown): ValidationResult {
45
+ return lexicons.validate('app.bsky.embed.record#presented', v)
46
+ }
47
+
48
+ export interface PresentedRecord {
49
+ uri: string
50
+ cid: string
51
+ author: AppBskyActorRef.WithInfo
52
+ record: {}
53
+ [k: string]: unknown
54
+ }
55
+
56
+ export function isPresentedRecord(v: unknown): v is PresentedRecord {
57
+ return (
58
+ isObj(v) &&
59
+ hasProp(v, '$type') &&
60
+ v.$type === 'app.bsky.embed.record#presentedRecord'
61
+ )
62
+ }
63
+
64
+ export function validatePresentedRecord(v: unknown): ValidationResult {
65
+ return lexicons.validate('app.bsky.embed.record#presentedRecord', v)
66
+ }
67
+
68
+ export interface PresentedNotFound {
69
+ uri: string
70
+ [k: string]: unknown
71
+ }
72
+
73
+ export function isPresentedNotFound(v: unknown): v is PresentedNotFound {
74
+ return (
75
+ isObj(v) &&
76
+ hasProp(v, '$type') &&
77
+ v.$type === 'app.bsky.embed.record#presentedNotFound'
78
+ )
79
+ }
80
+
81
+ export function validatePresentedNotFound(v: unknown): ValidationResult {
82
+ return lexicons.validate('app.bsky.embed.record#presentedNotFound', v)
83
+ }
@@ -5,7 +5,7 @@ import { Headers, XRPCError } from '@atproto/xrpc'
5
5
  import { ValidationResult } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
- import * as AppBskySystemDeclRef from '../system/declRef'
8
+ import * as AppBskyActorRef from '../actor/ref'
9
9
 
10
10
  export interface QueryParams {
11
11
  uri: string
@@ -20,7 +20,7 @@ export interface OutputSchema {
20
20
  uri: string
21
21
  cid?: string
22
22
  cursor?: string
23
- repostedBy: RepostedBy[]
23
+ repostedBy: AppBskyActorRef.WithInfo[]
24
24
  [k: string]: unknown
25
25
  }
26
26
 
@@ -39,26 +39,3 @@ export function toKnownErr(e: any) {
39
39
  }
40
40
  return e
41
41
  }
42
-
43
- export interface RepostedBy {
44
- did: string
45
- declaration: AppBskySystemDeclRef.Main
46
- handle: string
47
- displayName?: string
48
- avatar?: string
49
- createdAt?: string
50
- indexedAt: string
51
- [k: string]: unknown
52
- }
53
-
54
- export function isRepostedBy(v: unknown): v is RepostedBy {
55
- return (
56
- isObj(v) &&
57
- hasProp(v, '$type') &&
58
- v.$type === 'app.bsky.feed.getRepostedBy#repostedBy'
59
- )
60
- }
61
-
62
- export function validateRepostedBy(v: unknown): ValidationResult {
63
- return lexicons.validate('app.bsky.feed.getRepostedBy#repostedBy', v)
64
- }
@@ -6,6 +6,7 @@ import { isObj, hasProp } from '../../../../util'
6
6
  import { lexicons } from '../../../../lexicons'
7
7
  import * as AppBskyEmbedImages from '../embed/images'
8
8
  import * as AppBskyEmbedExternal from '../embed/external'
9
+ import * as AppBskyEmbedRecord from '../embed/record'
9
10
  import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
10
11
  import * as AppBskyActorRef from '../actor/ref'
11
12
 
@@ -16,6 +17,7 @@ export interface Record {
16
17
  embed?:
17
18
  | AppBskyEmbedImages.Main
18
19
  | AppBskyEmbedExternal.Main
20
+ | AppBskyEmbedRecord.Main
19
21
  | { $type: string; [k: string]: unknown }
20
22
  createdAt: string
21
23
  [k: string]: unknown
@@ -94,6 +96,7 @@ export interface View {
94
96
  embed?:
95
97
  | AppBskyEmbedImages.Presented
96
98
  | AppBskyEmbedExternal.Presented
99
+ | AppBskyEmbedRecord.Presented
97
100
  | { $type: string; [k: string]: unknown }
98
101
  replyCount: number
99
102
  repostCount: number
@@ -6,7 +6,6 @@ import { ValidationResult } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
8
  import * as AppBskyActorRef from '../actor/ref'
9
- import * as AppBskySystemDeclRef from '../system/declRef'
10
9
 
11
10
  export interface QueryParams {
12
11
  user: string
@@ -19,7 +18,7 @@ export type InputSchema = undefined
19
18
  export interface OutputSchema {
20
19
  subject: AppBskyActorRef.WithInfo
21
20
  cursor?: string
22
- followers: Follower[]
21
+ followers: AppBskyActorRef.WithInfo[]
23
22
  [k: string]: unknown
24
23
  }
25
24
 
@@ -38,26 +37,3 @@ export function toKnownErr(e: any) {
38
37
  }
39
38
  return e
40
39
  }
41
-
42
- export interface Follower {
43
- did: string
44
- declaration: AppBskySystemDeclRef.Main
45
- handle: string
46
- displayName?: string
47
- avatar?: string
48
- createdAt?: string
49
- indexedAt: string
50
- [k: string]: unknown
51
- }
52
-
53
- export function isFollower(v: unknown): v is Follower {
54
- return (
55
- isObj(v) &&
56
- hasProp(v, '$type') &&
57
- v.$type === 'app.bsky.graph.getFollowers#follower'
58
- )
59
- }
60
-
61
- export function validateFollower(v: unknown): ValidationResult {
62
- return lexicons.validate('app.bsky.graph.getFollowers#follower', v)
63
- }
@@ -6,7 +6,6 @@ import { ValidationResult } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
8
  import * as AppBskyActorRef from '../actor/ref'
9
- import * as AppBskySystemDeclRef from '../system/declRef'
10
9
 
11
10
  export interface QueryParams {
12
11
  user: string
@@ -19,7 +18,7 @@ export type InputSchema = undefined
19
18
  export interface OutputSchema {
20
19
  subject: AppBskyActorRef.WithInfo
21
20
  cursor?: string
22
- follows: Follow[]
21
+ follows: AppBskyActorRef.WithInfo[]
23
22
  [k: string]: unknown
24
23
  }
25
24
 
@@ -38,26 +37,3 @@ export function toKnownErr(e: any) {
38
37
  }
39
38
  return e
40
39
  }
41
-
42
- export interface Follow {
43
- did: string
44
- declaration: AppBskySystemDeclRef.Main
45
- handle: string
46
- displayName?: string
47
- avatar?: string
48
- createdAt?: string
49
- indexedAt: string
50
- [k: string]: unknown
51
- }
52
-
53
- export function isFollow(v: unknown): v is Follow {
54
- return (
55
- isObj(v) &&
56
- hasProp(v, '$type') &&
57
- v.$type === 'app.bsky.graph.getFollows#follow'
58
- )
59
- }
60
-
61
- export function validateFollow(v: unknown): ValidationResult {
62
- return lexicons.validate('app.bsky.graph.getFollows#follow', v)
63
- }
@@ -5,7 +5,7 @@ import { Headers, XRPCError } from '@atproto/xrpc'
5
5
  import { ValidationResult } from '@atproto/lexicon'
6
6
  import { isObj, hasProp } from '../../../../util'
7
7
  import { lexicons } from '../../../../lexicons'
8
- import * as AppBskySystemDeclRef from '../system/declRef'
8
+ import * as AppBskyActorRef from '../actor/ref'
9
9
 
10
10
  export interface QueryParams {
11
11
  limit?: number
@@ -16,7 +16,7 @@ export type InputSchema = undefined
16
16
 
17
17
  export interface OutputSchema {
18
18
  cursor?: string
19
- mutes: Mute[]
19
+ mutes: AppBskyActorRef.WithInfo[]
20
20
  [k: string]: unknown
21
21
  }
22
22
 
@@ -35,24 +35,3 @@ export function toKnownErr(e: any) {
35
35
  }
36
36
  return e
37
37
  }
38
-
39
- export interface Mute {
40
- did: string
41
- declaration: AppBskySystemDeclRef.Main
42
- handle: string
43
- displayName?: string
44
- createdAt: string
45
- [k: string]: unknown
46
- }
47
-
48
- export function isMute(v: unknown): v is Mute {
49
- return (
50
- isObj(v) &&
51
- hasProp(v, '$type') &&
52
- v.$type === 'app.bsky.graph.getMutes#mute'
53
- )
54
- }
55
-
56
- export function validateMute(v: unknown): ValidationResult {
57
- return lexicons.validate('app.bsky.graph.getMutes#mute', v)
58
- }
@@ -0,0 +1,31 @@
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
+
9
+ export interface QueryParams {}
10
+
11
+ export interface InputSchema {
12
+ handle: string
13
+ [k: string]: unknown
14
+ }
15
+
16
+ export interface CallOptions {
17
+ headers?: Headers
18
+ qp?: QueryParams
19
+ encoding: 'application/json'
20
+ }
21
+
22
+ export interface Response {
23
+ success: boolean
24
+ headers: Headers
25
+ }
26
+
27
+ export function toKnownErr(e: any) {
28
+ if (e instanceof XRPCError) {
29
+ }
30
+ return e
31
+ }
@@ -6,8 +6,8 @@ import { isObj, hasProp } from '../../../../util'
6
6
  import { lexicons } from '../../../../lexicons'
7
7
 
8
8
  export type Main =
9
- | 'com.atproto.report.reason#spam'
10
- | 'com.atproto.report.reason#other'
9
+ | 'com.atproto.report.reasonType#spam'
10
+ | 'com.atproto.report.reasonType#other'
11
11
  | (string & {})
12
12
 
13
13
  /** Moderation report reason: Spam. */
@@ -0,0 +1,31 @@
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
+
9
+ export interface QueryParams {
10
+ /** The DID of the repo. */
11
+ did: string
12
+ cids: string[]
13
+ }
14
+
15
+ export type InputSchema = undefined
16
+
17
+ export interface CallOptions {
18
+ headers?: Headers
19
+ }
20
+
21
+ export interface Response {
22
+ success: boolean
23
+ headers: Headers
24
+ data: Uint8Array
25
+ }
26
+
27
+ export function toKnownErr(e: any) {
28
+ if (e instanceof XRPCError) {
29
+ }
30
+ return e
31
+ }
@@ -0,0 +1,26 @@
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
+
9
+ export interface QueryParams {}
10
+
11
+ export type InputSchema = undefined
12
+
13
+ export interface CallOptions {
14
+ headers?: Headers
15
+ }
16
+
17
+ export interface Response {
18
+ success: boolean
19
+ headers: Headers
20
+ }
21
+
22
+ export function toKnownErr(e: any) {
23
+ if (e instanceof XRPCError) {
24
+ }
25
+ return e
26
+ }
@@ -0,0 +1,29 @@
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
+
9
+ export interface QueryParams {
10
+ /** Hostname of the service that is requesting to be crawled. */
11
+ host?: string
12
+ }
13
+
14
+ export type InputSchema = undefined
15
+
16
+ export interface CallOptions {
17
+ headers?: Headers
18
+ }
19
+
20
+ export interface Response {
21
+ success: boolean
22
+ headers: Headers
23
+ }
24
+
25
+ export function toKnownErr(e: any) {
26
+ if (e instanceof XRPCError) {
27
+ }
28
+ return e
29
+ }