@atproto/api 0.0.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.
- package/README.md +34 -0
- package/babel.config.js +3 -0
- package/build.js +22 -0
- package/dist/index.js +8724 -0
- package/dist/index.js.map +7 -0
- package/dist/src/client/index.d.ts +462 -0
- package/dist/src/client/lexicons.d.ts +2910 -0
- package/dist/src/client/schemas.d.ts +17 -0
- package/dist/src/client/types/app/bsky/actor/createScene.d.ts +32 -0
- package/dist/src/client/types/app/bsky/actor/getProfile.d.ts +36 -0
- package/dist/src/client/types/app/bsky/actor/getSuggestions.d.ts +36 -0
- package/dist/src/client/types/app/bsky/actor/profile.d.ts +15 -0
- package/dist/src/client/types/app/bsky/actor/ref.d.ts +14 -0
- package/dist/src/client/types/app/bsky/actor/search.d.ts +32 -0
- package/dist/src/client/types/app/bsky/actor/searchTypeahead.d.ts +28 -0
- package/dist/src/client/types/app/bsky/actor/updateProfile.d.ts +48 -0
- package/dist/src/client/types/app/bsky/embed/external.d.ts +26 -0
- package/dist/src/client/types/app/bsky/embed/images.d.ts +23 -0
- package/dist/src/client/types/app/bsky/feed/debug.d.ts +57 -0
- package/dist/src/client/types/app/bsky/feed/embed.d.ts +36 -0
- package/dist/src/client/types/app/bsky/feed/feedViewPost.d.ts +26 -0
- package/dist/src/client/types/app/bsky/feed/getAuthorFeed.d.ts +22 -0
- package/dist/src/client/types/app/bsky/feed/getLikedBy.d.ts +29 -0
- package/dist/src/client/types/app/bsky/feed/getPostThread.d.ts +43 -0
- package/dist/src/client/types/app/bsky/feed/getRepostedBy.d.ts +35 -0
- package/dist/src/client/types/app/bsky/feed/getTimeline.d.ts +22 -0
- package/dist/src/client/types/app/bsky/feed/getVotes.d.ts +33 -0
- package/dist/src/client/types/app/bsky/feed/like.d.ts +10 -0
- package/dist/src/client/types/app/bsky/feed/mediaEmbed.d.ts +18 -0
- package/dist/src/client/types/app/bsky/feed/post.d.ts +54 -0
- package/dist/src/client/types/app/bsky/feed/repost.d.ts +6 -0
- package/dist/src/client/types/app/bsky/feed/setVote.d.ts +25 -0
- package/dist/src/client/types/app/bsky/feed/trend.d.ts +6 -0
- package/dist/src/client/types/app/bsky/feed/vote.d.ts +7 -0
- package/dist/src/client/types/app/bsky/graph/assertCreator.d.ts +1 -0
- package/dist/src/client/types/app/bsky/graph/assertMember.d.ts +1 -0
- package/dist/src/client/types/app/bsky/graph/assertion.d.ts +7 -0
- package/dist/src/client/types/app/bsky/graph/confirmation.d.ts +8 -0
- package/dist/src/client/types/app/bsky/graph/follow.d.ts +6 -0
- package/dist/src/client/types/app/bsky/graph/getAssertions.d.ts +43 -0
- package/dist/src/client/types/app/bsky/graph/getFollowers.d.ts +34 -0
- package/dist/src/client/types/app/bsky/graph/getFollows.d.ts +33 -0
- package/dist/src/client/types/app/bsky/graph/getMembers.d.ts +33 -0
- package/dist/src/client/types/app/bsky/graph/getMemberships.d.ts +33 -0
- package/dist/src/client/types/app/bsky/graph/invite.d.ts +10 -0
- package/dist/src/client/types/app/bsky/graph/inviteAccept.d.ts +14 -0
- package/dist/src/client/types/app/bsky/notification/getCount.d.ts +17 -0
- package/dist/src/client/types/app/bsky/notification/list.d.ts +32 -0
- package/dist/src/client/types/app/bsky/notification/updateSeen.d.ts +17 -0
- package/dist/src/client/types/app/bsky/system/actorScene.d.ts +1 -0
- package/dist/src/client/types/app/bsky/system/actorUser.d.ts +1 -0
- package/dist/src/client/types/app/bsky/system/declRef.d.ts +5 -0
- package/dist/src/client/types/app/bsky/system/declaration.d.ts +4 -0
- package/dist/src/client/types/com/atproto/account/create.d.ts +41 -0
- package/dist/src/client/types/com/atproto/account/createInviteCode.d.ts +22 -0
- package/dist/src/client/types/com/atproto/account/delete.d.ts +13 -0
- package/dist/src/client/types/com/atproto/account/get.d.ts +12 -0
- package/dist/src/client/types/com/atproto/account/requestPasswordReset.d.ts +17 -0
- package/dist/src/client/types/com/atproto/account/resetPassword.d.ts +24 -0
- package/dist/src/client/types/com/atproto/blob/upload.d.ts +19 -0
- package/dist/src/client/types/com/atproto/data/uploadFile.d.ts +22 -0
- package/dist/src/client/types/com/atproto/handle/resolve.d.ts +18 -0
- package/dist/src/client/types/com/atproto/repo/batchWrite.d.ts +39 -0
- package/dist/src/client/types/com/atproto/repo/createRecord.d.ts +26 -0
- package/dist/src/client/types/com/atproto/repo/deleteRecord.d.ts +19 -0
- package/dist/src/client/types/com/atproto/repo/describe.d.ts +22 -0
- package/dist/src/client/types/com/atproto/repo/getRecord.d.ts +23 -0
- package/dist/src/client/types/com/atproto/repo/listRecords.d.ts +30 -0
- package/dist/src/client/types/com/atproto/repo/putRecord.d.ts +27 -0
- package/dist/src/client/types/com/atproto/repo/strongRef.d.ts +5 -0
- package/dist/src/client/types/com/atproto/server/getAccountsConfig.d.ts +24 -0
- package/dist/src/client/types/com/atproto/session/create.d.ts +26 -0
- package/dist/src/client/types/com/atproto/session/delete.d.ts +13 -0
- package/dist/src/client/types/com/atproto/session/get.d.ts +18 -0
- package/dist/src/client/types/com/atproto/session/refresh.d.ts +21 -0
- package/dist/src/client/types/com/atproto/sync/getRepo.d.ts +15 -0
- package/dist/src/client/types/com/atproto/sync/getRoot.d.ts +18 -0
- package/dist/src/client/types/com/atproto/sync/updateRepo.d.ts +15 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/session.d.ts +42 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/jest.config.js +6 -0
- package/package.json +21 -0
- package/src/client/index.ts +1393 -0
- package/src/client/lexicons.ts +3041 -0
- package/src/client/types/app/bsky/actor/createScene.ts +52 -0
- package/src/client/types/app/bsky/actor/getProfile.ts +50 -0
- package/src/client/types/app/bsky/actor/getSuggestions.ts +51 -0
- package/src/client/types/app/bsky/actor/profile.ts +10 -0
- package/src/client/types/app/bsky/actor/ref.ts +19 -0
- package/src/client/types/app/bsky/actor/search.ts +46 -0
- package/src/client/types/app/bsky/actor/searchTypeahead.ts +42 -0
- package/src/client/types/app/bsky/actor/updateProfile.ts +69 -0
- package/src/client/types/app/bsky/embed/external.ts +28 -0
- package/src/client/types/app/bsky/embed/images.ts +25 -0
- package/src/client/types/app/bsky/feed/feedViewPost.ts +30 -0
- package/src/client/types/app/bsky/feed/getAuthorFeed.ts +35 -0
- package/src/client/types/app/bsky/feed/getPostThread.ts +63 -0
- package/src/client/types/app/bsky/feed/getRepostedBy.ts +49 -0
- package/src/client/types/app/bsky/feed/getTimeline.ts +35 -0
- package/src/client/types/app/bsky/feed/getVotes.ts +47 -0
- package/src/client/types/app/bsky/feed/post.ts +64 -0
- package/src/client/types/app/bsky/feed/repost.ts +10 -0
- package/src/client/types/app/bsky/feed/setVote.ts +37 -0
- package/src/client/types/app/bsky/feed/trend.ts +10 -0
- package/src/client/types/app/bsky/feed/vote.ts +11 -0
- package/src/client/types/app/bsky/graph/assertCreator.ts +5 -0
- package/src/client/types/app/bsky/graph/assertMember.ts +5 -0
- package/src/client/types/app/bsky/graph/assertion.ts +11 -0
- package/src/client/types/app/bsky/graph/confirmation.ts +12 -0
- package/src/client/types/app/bsky/graph/follow.ts +10 -0
- package/src/client/types/app/bsky/graph/getAssertions.ts +58 -0
- package/src/client/types/app/bsky/graph/getFollowers.ts +48 -0
- package/src/client/types/app/bsky/graph/getFollows.ts +47 -0
- package/src/client/types/app/bsky/graph/getMembers.ts +47 -0
- package/src/client/types/app/bsky/graph/getMemberships.ts +47 -0
- package/src/client/types/app/bsky/notification/getCount.ts +29 -0
- package/src/client/types/app/bsky/notification/list.ts +55 -0
- package/src/client/types/app/bsky/notification/updateSeen.ts +28 -0
- package/src/client/types/app/bsky/system/actorScene.ts +5 -0
- package/src/client/types/app/bsky/system/actorUser.ts +5 -0
- package/src/client/types/app/bsky/system/declRef.ts +12 -0
- package/src/client/types/app/bsky/system/declaration.ts +10 -0
- package/src/client/types/com/atproto/account/create.ts +69 -0
- package/src/client/types/com/atproto/account/createInviteCode.ts +34 -0
- package/src/client/types/com/atproto/account/delete.ts +24 -0
- package/src/client/types/com/atproto/account/get.ts +23 -0
- package/src/client/types/com/atproto/account/requestPasswordReset.ts +28 -0
- package/src/client/types/com/atproto/account/resetPassword.ts +43 -0
- package/src/client/types/com/atproto/blob/upload.ts +31 -0
- package/src/client/types/com/atproto/handle/resolve.ts +32 -0
- package/src/client/types/com/atproto/repo/batchWrite.ts +55 -0
- package/src/client/types/com/atproto/repo/createRecord.ts +42 -0
- package/src/client/types/com/atproto/repo/deleteRecord.ts +33 -0
- package/src/client/types/com/atproto/repo/describe.ts +36 -0
- package/src/client/types/com/atproto/repo/getRecord.ts +40 -0
- package/src/client/types/com/atproto/repo/listRecords.ts +50 -0
- package/src/client/types/com/atproto/repo/putRecord.ts +44 -0
- package/src/client/types/com/atproto/repo/strongRef.ts +8 -0
- package/src/client/types/com/atproto/server/getAccountsConfig.ts +37 -0
- package/src/client/types/com/atproto/session/create.ts +38 -0
- package/src/client/types/com/atproto/session/delete.ts +24 -0
- package/src/client/types/com/atproto/session/get.ts +30 -0
- package/src/client/types/com/atproto/session/refresh.ts +33 -0
- package/src/client/types/com/atproto/sync/getRepo.ts +29 -0
- package/src/client/types/com/atproto/sync/getRoot.ts +32 -0
- package/src/client/types/com/atproto/sync/updateRepo.ts +28 -0
- package/src/index.ts +4 -0
- package/src/session.ts +194 -0
- package/tests/errors.test.ts +39 -0
- package/tests/session.test.ts +239 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +12 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import * as AppBskyEmbedImages from '../embed/images'
|
|
5
|
+
import * as AppBskyEmbedExternal from '../embed/external'
|
|
6
|
+
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
7
|
+
import * as AppBskyActorRef from '../actor/ref'
|
|
8
|
+
|
|
9
|
+
export interface Record {
|
|
10
|
+
text: string
|
|
11
|
+
entities?: Entity[]
|
|
12
|
+
reply?: ReplyRef
|
|
13
|
+
embed?:
|
|
14
|
+
| AppBskyEmbedImages.Main
|
|
15
|
+
| AppBskyEmbedExternal.Main
|
|
16
|
+
| { $type: string; [k: string]: unknown }
|
|
17
|
+
createdAt: string
|
|
18
|
+
[k: string]: unknown
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ReplyRef {
|
|
22
|
+
root: ComAtprotoRepoStrongRef.Main
|
|
23
|
+
parent: ComAtprotoRepoStrongRef.Main
|
|
24
|
+
[k: string]: unknown
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Entity {
|
|
28
|
+
index: TextSlice
|
|
29
|
+
/** Expected values are 'mention', 'hashtag', and 'link'. */
|
|
30
|
+
type: string
|
|
31
|
+
value: string
|
|
32
|
+
[k: string]: unknown
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface TextSlice {
|
|
36
|
+
start: number
|
|
37
|
+
end: number
|
|
38
|
+
[k: string]: unknown
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface View {
|
|
42
|
+
uri: string
|
|
43
|
+
cid: string
|
|
44
|
+
author: AppBskyActorRef.WithInfo
|
|
45
|
+
record: {}
|
|
46
|
+
embed?:
|
|
47
|
+
| AppBskyEmbedImages.Presented
|
|
48
|
+
| AppBskyEmbedExternal.Presented
|
|
49
|
+
| { $type: string; [k: string]: unknown }
|
|
50
|
+
replyCount: number
|
|
51
|
+
repostCount: number
|
|
52
|
+
upvoteCount: number
|
|
53
|
+
downvoteCount: number
|
|
54
|
+
indexedAt: string
|
|
55
|
+
viewer: ViewerState
|
|
56
|
+
[k: string]: unknown
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface ViewerState {
|
|
60
|
+
repost?: string
|
|
61
|
+
upvote?: string
|
|
62
|
+
downvote?: string
|
|
63
|
+
[k: string]: unknown
|
|
64
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {}
|
|
8
|
+
|
|
9
|
+
export interface InputSchema {
|
|
10
|
+
subject: ComAtprotoRepoStrongRef.Main
|
|
11
|
+
direction: 'up' | 'down' | 'none'
|
|
12
|
+
[k: string]: unknown
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface OutputSchema {
|
|
16
|
+
upvote?: string
|
|
17
|
+
downvote?: string
|
|
18
|
+
[k: string]: unknown
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface CallOptions {
|
|
22
|
+
headers?: Headers
|
|
23
|
+
qp?: QueryParams
|
|
24
|
+
encoding: 'application/json'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: Headers
|
|
30
|
+
data: OutputSchema
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toKnownErr(e: any) {
|
|
34
|
+
if (e instanceof XRPCError) {
|
|
35
|
+
}
|
|
36
|
+
return e
|
|
37
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
5
|
+
|
|
6
|
+
export interface Record {
|
|
7
|
+
subject: ComAtprotoRepoStrongRef.Main
|
|
8
|
+
direction: 'up' | 'down'
|
|
9
|
+
createdAt: string
|
|
10
|
+
[k: string]: unknown
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import * as AppBskyActorRef from '../actor/ref'
|
|
5
|
+
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
6
|
+
|
|
7
|
+
export interface Record {
|
|
8
|
+
originator: AppBskyActorRef.Main
|
|
9
|
+
assertion: ComAtprotoRepoStrongRef.Main
|
|
10
|
+
createdAt: string
|
|
11
|
+
[k: string]: unknown
|
|
12
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskyActorRef from '../actor/ref'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
author?: string
|
|
9
|
+
subject?: string
|
|
10
|
+
assertion?: string
|
|
11
|
+
confirmed?: boolean
|
|
12
|
+
limit?: number
|
|
13
|
+
before?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type InputSchema = undefined
|
|
17
|
+
|
|
18
|
+
export interface OutputSchema {
|
|
19
|
+
cursor?: string
|
|
20
|
+
assertions: Assertion[]
|
|
21
|
+
[k: string]: unknown
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface CallOptions {
|
|
25
|
+
headers?: Headers
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface Response {
|
|
29
|
+
success: boolean
|
|
30
|
+
headers: Headers
|
|
31
|
+
data: OutputSchema
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function toKnownErr(e: any) {
|
|
35
|
+
if (e instanceof XRPCError) {
|
|
36
|
+
}
|
|
37
|
+
return e
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface Assertion {
|
|
41
|
+
uri: string
|
|
42
|
+
cid: string
|
|
43
|
+
assertion: string
|
|
44
|
+
confirmation?: Confirmation
|
|
45
|
+
author: AppBskyActorRef.WithInfo
|
|
46
|
+
subject: AppBskyActorRef.WithInfo
|
|
47
|
+
indexedAt: string
|
|
48
|
+
createdAt: string
|
|
49
|
+
[k: string]: unknown
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface Confirmation {
|
|
53
|
+
uri: string
|
|
54
|
+
cid: string
|
|
55
|
+
indexedAt: string
|
|
56
|
+
createdAt: string
|
|
57
|
+
[k: string]: unknown
|
|
58
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskyActorRef from '../actor/ref'
|
|
6
|
+
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
7
|
+
|
|
8
|
+
export interface QueryParams {
|
|
9
|
+
user: string
|
|
10
|
+
limit?: number
|
|
11
|
+
before?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type InputSchema = undefined
|
|
15
|
+
|
|
16
|
+
export interface OutputSchema {
|
|
17
|
+
subject: AppBskyActorRef.WithInfo
|
|
18
|
+
cursor?: string
|
|
19
|
+
followers: Follower[]
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CallOptions {
|
|
24
|
+
headers?: Headers
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: Headers
|
|
30
|
+
data: OutputSchema
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toKnownErr(e: any) {
|
|
34
|
+
if (e instanceof XRPCError) {
|
|
35
|
+
}
|
|
36
|
+
return e
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface Follower {
|
|
40
|
+
did: string
|
|
41
|
+
declaration: AppBskySystemDeclRef.Main
|
|
42
|
+
handle: string
|
|
43
|
+
displayName?: string
|
|
44
|
+
avatar?: string
|
|
45
|
+
createdAt?: string
|
|
46
|
+
indexedAt: string
|
|
47
|
+
[k: string]: unknown
|
|
48
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskyActorRef from '../actor/ref'
|
|
6
|
+
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
7
|
+
|
|
8
|
+
export interface QueryParams {
|
|
9
|
+
user: string
|
|
10
|
+
limit?: number
|
|
11
|
+
before?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type InputSchema = undefined
|
|
15
|
+
|
|
16
|
+
export interface OutputSchema {
|
|
17
|
+
subject: AppBskyActorRef.WithInfo
|
|
18
|
+
cursor?: string
|
|
19
|
+
follows: Follow[]
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CallOptions {
|
|
24
|
+
headers?: Headers
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: Headers
|
|
30
|
+
data: OutputSchema
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toKnownErr(e: any) {
|
|
34
|
+
if (e instanceof XRPCError) {
|
|
35
|
+
}
|
|
36
|
+
return e
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface Follow {
|
|
40
|
+
did: string
|
|
41
|
+
declaration: AppBskySystemDeclRef.Main
|
|
42
|
+
handle: string
|
|
43
|
+
displayName?: string
|
|
44
|
+
createdAt?: string
|
|
45
|
+
indexedAt: string
|
|
46
|
+
[k: string]: unknown
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskyActorRef from '../actor/ref'
|
|
6
|
+
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
7
|
+
|
|
8
|
+
export interface QueryParams {
|
|
9
|
+
actor: string
|
|
10
|
+
limit?: number
|
|
11
|
+
before?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type InputSchema = undefined
|
|
15
|
+
|
|
16
|
+
export interface OutputSchema {
|
|
17
|
+
subject: AppBskyActorRef.WithInfo
|
|
18
|
+
cursor?: string
|
|
19
|
+
members: Member[]
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CallOptions {
|
|
24
|
+
headers?: Headers
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: Headers
|
|
30
|
+
data: OutputSchema
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toKnownErr(e: any) {
|
|
34
|
+
if (e instanceof XRPCError) {
|
|
35
|
+
}
|
|
36
|
+
return e
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface Member {
|
|
40
|
+
did: string
|
|
41
|
+
declaration: AppBskySystemDeclRef.Main
|
|
42
|
+
handle: string
|
|
43
|
+
displayName?: string
|
|
44
|
+
createdAt?: string
|
|
45
|
+
indexedAt: string
|
|
46
|
+
[k: string]: unknown
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskyActorRef from '../actor/ref'
|
|
6
|
+
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
7
|
+
|
|
8
|
+
export interface QueryParams {
|
|
9
|
+
actor: string
|
|
10
|
+
limit?: number
|
|
11
|
+
before?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type InputSchema = undefined
|
|
15
|
+
|
|
16
|
+
export interface OutputSchema {
|
|
17
|
+
subject: AppBskyActorRef.WithInfo
|
|
18
|
+
cursor?: string
|
|
19
|
+
memberships: Membership[]
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CallOptions {
|
|
24
|
+
headers?: Headers
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: Headers
|
|
30
|
+
data: OutputSchema
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toKnownErr(e: any) {
|
|
34
|
+
if (e instanceof XRPCError) {
|
|
35
|
+
}
|
|
36
|
+
return e
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface Membership {
|
|
40
|
+
did: string
|
|
41
|
+
declaration: AppBskySystemDeclRef.Main
|
|
42
|
+
handle: string
|
|
43
|
+
displayName?: string
|
|
44
|
+
createdAt?: string
|
|
45
|
+
indexedAt: string
|
|
46
|
+
[k: string]: unknown
|
|
47
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
|
|
6
|
+
export interface QueryParams {}
|
|
7
|
+
|
|
8
|
+
export type InputSchema = undefined
|
|
9
|
+
|
|
10
|
+
export interface OutputSchema {
|
|
11
|
+
count: number
|
|
12
|
+
[k: string]: unknown
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CallOptions {
|
|
16
|
+
headers?: Headers
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Response {
|
|
20
|
+
success: boolean
|
|
21
|
+
headers: Headers
|
|
22
|
+
data: OutputSchema
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function toKnownErr(e: any) {
|
|
26
|
+
if (e instanceof XRPCError) {
|
|
27
|
+
}
|
|
28
|
+
return e
|
|
29
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskyActorRef from '../actor/ref'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
limit?: number
|
|
9
|
+
before?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type InputSchema = undefined
|
|
13
|
+
|
|
14
|
+
export interface OutputSchema {
|
|
15
|
+
cursor?: string
|
|
16
|
+
notifications: Notification[]
|
|
17
|
+
[k: string]: unknown
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CallOptions {
|
|
21
|
+
headers?: Headers
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface Response {
|
|
25
|
+
success: boolean
|
|
26
|
+
headers: Headers
|
|
27
|
+
data: OutputSchema
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function toKnownErr(e: any) {
|
|
31
|
+
if (e instanceof XRPCError) {
|
|
32
|
+
}
|
|
33
|
+
return e
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface Notification {
|
|
37
|
+
uri: string
|
|
38
|
+
cid: string
|
|
39
|
+
author: AppBskyActorRef.WithInfo
|
|
40
|
+
/** Expected values are 'vote', 'repost', 'trend', 'follow', 'invite', 'mention' and 'reply'. */
|
|
41
|
+
reason:
|
|
42
|
+
| 'vote'
|
|
43
|
+
| 'repost'
|
|
44
|
+
| 'trend'
|
|
45
|
+
| 'follow'
|
|
46
|
+
| 'invite'
|
|
47
|
+
| 'mention'
|
|
48
|
+
| 'reply'
|
|
49
|
+
| (string & {})
|
|
50
|
+
reasonSubject?: string
|
|
51
|
+
record: {}
|
|
52
|
+
isRead: boolean
|
|
53
|
+
indexedAt: string
|
|
54
|
+
[k: string]: unknown
|
|
55
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
|
|
6
|
+
export interface QueryParams {}
|
|
7
|
+
|
|
8
|
+
export interface InputSchema {
|
|
9
|
+
seenAt: string
|
|
10
|
+
[k: string]: unknown
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface CallOptions {
|
|
14
|
+
headers?: Headers
|
|
15
|
+
qp?: QueryParams
|
|
16
|
+
encoding: 'application/json'
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Response {
|
|
20
|
+
success: boolean
|
|
21
|
+
headers: Headers
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function toKnownErr(e: any) {
|
|
25
|
+
if (e instanceof XRPCError) {
|
|
26
|
+
}
|
|
27
|
+
return e
|
|
28
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
/** A reference to a app.bsky.system.declaration record. */
|
|
5
|
+
export interface Main {
|
|
6
|
+
cid: string
|
|
7
|
+
actorType:
|
|
8
|
+
| 'app.bsky.system.actorUser'
|
|
9
|
+
| 'app.bsky.system.actorScene'
|
|
10
|
+
| (string & {})
|
|
11
|
+
[k: string]: unknown
|
|
12
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
|
|
6
|
+
export interface QueryParams {}
|
|
7
|
+
|
|
8
|
+
export interface InputSchema {
|
|
9
|
+
email: string
|
|
10
|
+
handle: string
|
|
11
|
+
inviteCode?: string
|
|
12
|
+
password: string
|
|
13
|
+
recoveryKey?: string
|
|
14
|
+
[k: string]: unknown
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface OutputSchema {
|
|
18
|
+
accessJwt: string
|
|
19
|
+
refreshJwt: string
|
|
20
|
+
handle: string
|
|
21
|
+
did: string
|
|
22
|
+
[k: string]: unknown
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CallOptions {
|
|
26
|
+
headers?: Headers
|
|
27
|
+
qp?: QueryParams
|
|
28
|
+
encoding: 'application/json'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Response {
|
|
32
|
+
success: boolean
|
|
33
|
+
headers: Headers
|
|
34
|
+
data: OutputSchema
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class InvalidHandleError extends XRPCError {
|
|
38
|
+
constructor(src: XRPCError) {
|
|
39
|
+
super(src.status, src.error, src.message)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export class InvalidPasswordError extends XRPCError {
|
|
44
|
+
constructor(src: XRPCError) {
|
|
45
|
+
super(src.status, src.error, src.message)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export class InvalidInviteCodeError extends XRPCError {
|
|
50
|
+
constructor(src: XRPCError) {
|
|
51
|
+
super(src.status, src.error, src.message)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export class HandleNotAvailableError extends XRPCError {
|
|
56
|
+
constructor(src: XRPCError) {
|
|
57
|
+
super(src.status, src.error, src.message)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function toKnownErr(e: any) {
|
|
62
|
+
if (e instanceof XRPCError) {
|
|
63
|
+
if (e.error === 'InvalidHandle') return new InvalidHandleError(e)
|
|
64
|
+
if (e.error === 'InvalidPassword') return new InvalidPasswordError(e)
|
|
65
|
+
if (e.error === 'InvalidInviteCode') return new InvalidInviteCodeError(e)
|
|
66
|
+
if (e.error === 'HandleNotAvailable') return new HandleNotAvailableError(e)
|
|
67
|
+
}
|
|
68
|
+
return e
|
|
69
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
|
|
6
|
+
export interface QueryParams {}
|
|
7
|
+
|
|
8
|
+
export interface InputSchema {
|
|
9
|
+
useCount: number
|
|
10
|
+
[k: string]: unknown
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface OutputSchema {
|
|
14
|
+
code: string
|
|
15
|
+
[k: string]: unknown
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface CallOptions {
|
|
19
|
+
headers?: Headers
|
|
20
|
+
qp?: QueryParams
|
|
21
|
+
encoding: 'application/json'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface Response {
|
|
25
|
+
success: boolean
|
|
26
|
+
headers: Headers
|
|
27
|
+
data: OutputSchema
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function toKnownErr(e: any) {
|
|
31
|
+
if (e instanceof XRPCError) {
|
|
32
|
+
}
|
|
33
|
+
return e
|
|
34
|
+
}
|