@atproto/api 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.d.ts +7 -0
- package/dist/client/lexicons.d.ts +254 -240
- package/dist/client/types/app/bsky/actor/getProfile.d.ts +2 -24
- package/dist/client/types/app/bsky/actor/getProfiles.d.ts +19 -0
- package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +2 -15
- package/dist/client/types/app/bsky/actor/profile.d.ts +48 -0
- package/dist/client/types/app/bsky/actor/ref.d.ts +2 -0
- package/dist/client/types/app/bsky/actor/search.d.ts +2 -15
- package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +2 -13
- package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +2 -15
- package/dist/client/types/app/bsky/graph/getFollowers.d.ts +1 -15
- package/dist/client/types/app/bsky/graph/getFollows.d.ts +1 -15
- package/dist/client/types/app/bsky/graph/getMutes.d.ts +2 -13
- package/dist/client/types/com/atproto/handle/update.d.ts +17 -0
- package/dist/client/types/com/atproto/report/reasonType.d.ts +1 -1
- package/dist/client/types/com/atproto/sync/getRepo.d.ts +2 -1
- package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +20 -0
- package/dist/index.js +632 -544
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/src/client/index.ts +28 -0
- package/src/client/lexicons.ts +282 -262
- package/src/client/types/app/bsky/actor/getProfile.ts +2 -35
- package/src/client/types/app/bsky/actor/getProfiles.ts +35 -0
- package/src/client/types/app/bsky/actor/getSuggestions.ts +2 -25
- package/src/client/types/app/bsky/actor/profile.ts +91 -0
- package/src/client/types/app/bsky/actor/ref.ts +2 -0
- package/src/client/types/app/bsky/actor/search.ts +2 -23
- package/src/client/types/app/bsky/actor/searchTypeahead.ts +2 -23
- package/src/client/types/app/bsky/feed/getRepostedBy.ts +2 -25
- package/src/client/types/app/bsky/graph/getFollowers.ts +1 -25
- package/src/client/types/app/bsky/graph/getFollows.ts +1 -25
- package/src/client/types/app/bsky/graph/getMutes.ts +2 -23
- package/src/client/types/com/atproto/handle/update.ts +31 -0
- package/src/client/types/com/atproto/report/reasonType.ts +2 -2
- package/src/client/types/com/atproto/sync/getRepo.ts +4 -2
- package/src/client/types/com/atproto/sync/subscribeAllRepos.ts +48 -0
- 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
|
|
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
|
-
}
|
|
@@ -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
|
+
}
|
|
@@ -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
|
|
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:
|
|
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
|
-
}
|
|
@@ -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,93 @@ 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
|
+
displayName?: string
|
|
35
|
+
description?: string
|
|
36
|
+
avatar?: string
|
|
37
|
+
banner?: string
|
|
38
|
+
followersCount: number
|
|
39
|
+
followsCount: number
|
|
40
|
+
postsCount: number
|
|
41
|
+
creator: string
|
|
42
|
+
indexedAt?: string
|
|
43
|
+
viewer?: ViewerState
|
|
44
|
+
myState?: MyState
|
|
45
|
+
[k: string]: unknown
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function isView(v: unknown): v is View {
|
|
49
|
+
return (
|
|
50
|
+
isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.actor.profile#view'
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function validateView(v: unknown): ValidationResult {
|
|
55
|
+
return lexicons.validate('app.bsky.actor.profile#view', v)
|
|
56
|
+
}
|
|
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 */
|
|
102
|
+
export interface MyState {
|
|
103
|
+
follow?: string
|
|
104
|
+
muted?: boolean
|
|
105
|
+
[k: string]: unknown
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function isMyState(v: unknown): v is MyState {
|
|
109
|
+
return (
|
|
110
|
+
isObj(v) &&
|
|
111
|
+
hasProp(v, '$type') &&
|
|
112
|
+
v.$type === 'app.bsky.actor.profile#myState'
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function validateMyState(v: unknown): ValidationResult {
|
|
117
|
+
return lexicons.validate('app.bsky.actor.profile#myState', v)
|
|
118
|
+
}
|
|
@@ -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
|
|
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:
|
|
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
|
|
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:
|
|
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
|
-
}
|
|
@@ -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
|
|
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:
|
|
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,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:
|
|
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:
|
|
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
|
|
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:
|
|
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.
|
|
10
|
-
| 'com.atproto.report.
|
|
9
|
+
| 'com.atproto.report.reasonType#spam'
|
|
10
|
+
| 'com.atproto.report.reasonType#other'
|
|
11
11
|
| (string & {})
|
|
12
12
|
|
|
13
13
|
/** Moderation report reason: Spam. */
|
|
@@ -9,8 +9,10 @@ import { lexicons } from '../../../../lexicons'
|
|
|
9
9
|
export interface QueryParams {
|
|
10
10
|
/** The DID of the repo. */
|
|
11
11
|
did: string
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/** The earliest commit in the commit range (not inclusive) */
|
|
13
|
+
earliest?: string
|
|
14
|
+
/** The latest commit you in the commit range (inclusive */
|
|
15
|
+
latest?: string
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export type InputSchema = undefined
|
|
@@ -0,0 +1,48 @@
|
|
|
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 RepoAppend {
|
|
10
|
+
time: string
|
|
11
|
+
repo: string
|
|
12
|
+
commit: string
|
|
13
|
+
prev?: string
|
|
14
|
+
blocks: {}
|
|
15
|
+
blobs: string[]
|
|
16
|
+
[k: string]: unknown
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function isRepoAppend(v: unknown): v is RepoAppend {
|
|
20
|
+
return (
|
|
21
|
+
isObj(v) &&
|
|
22
|
+
hasProp(v, '$type') &&
|
|
23
|
+
v.$type === 'com.atproto.sync.subscribeAllRepos#repoAppend'
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function validateRepoAppend(v: unknown): ValidationResult {
|
|
28
|
+
return lexicons.validate('com.atproto.sync.subscribeAllRepos#repoAppend', v)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface RepoRebase {
|
|
32
|
+
time: string
|
|
33
|
+
repo: string
|
|
34
|
+
commit: string
|
|
35
|
+
[k: string]: unknown
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function isRepoRebase(v: unknown): v is RepoRebase {
|
|
39
|
+
return (
|
|
40
|
+
isObj(v) &&
|
|
41
|
+
hasProp(v, '$type') &&
|
|
42
|
+
v.$type === 'com.atproto.sync.subscribeAllRepos#repoRebase'
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function validateRepoRebase(v: unknown): ValidationResult {
|
|
47
|
+
return lexicons.validate('com.atproto.sync.subscribeAllRepos#repoRebase', v)
|
|
48
|
+
}
|