@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,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {}
|
|
8
|
+
|
|
9
|
+
export interface InputSchema {
|
|
10
|
+
handle: string
|
|
11
|
+
recoveryKey?: string
|
|
12
|
+
[k: string]: unknown
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface OutputSchema {
|
|
16
|
+
handle: string
|
|
17
|
+
did: string
|
|
18
|
+
declaration: AppBskySystemDeclRef.Main
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CallOptions {
|
|
23
|
+
headers?: Headers
|
|
24
|
+
qp?: QueryParams
|
|
25
|
+
encoding: 'application/json'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface Response {
|
|
29
|
+
success: boolean
|
|
30
|
+
headers: Headers
|
|
31
|
+
data: OutputSchema
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class InvalidHandleError extends XRPCError {
|
|
35
|
+
constructor(src: XRPCError) {
|
|
36
|
+
super(src.status, src.error, src.message)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export class HandleNotAvailableError extends XRPCError {
|
|
41
|
+
constructor(src: XRPCError) {
|
|
42
|
+
super(src.status, src.error, src.message)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function toKnownErr(e: any) {
|
|
47
|
+
if (e instanceof XRPCError) {
|
|
48
|
+
if (e.error === 'InvalidHandle') return new InvalidHandleError(e)
|
|
49
|
+
if (e.error === 'HandleNotAvailable') return new HandleNotAvailableError(e)
|
|
50
|
+
}
|
|
51
|
+
return e
|
|
52
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
actor: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type InputSchema = undefined
|
|
12
|
+
|
|
13
|
+
export interface OutputSchema {
|
|
14
|
+
did: string
|
|
15
|
+
declaration: AppBskySystemDeclRef.Main
|
|
16
|
+
handle: string
|
|
17
|
+
creator: string
|
|
18
|
+
displayName?: string
|
|
19
|
+
description?: string
|
|
20
|
+
avatar?: string
|
|
21
|
+
banner?: string
|
|
22
|
+
followersCount: number
|
|
23
|
+
followsCount: number
|
|
24
|
+
membersCount: number
|
|
25
|
+
postsCount: number
|
|
26
|
+
myState?: MyState
|
|
27
|
+
[k: string]: unknown
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface CallOptions {
|
|
31
|
+
headers?: Headers
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface Response {
|
|
35
|
+
success: boolean
|
|
36
|
+
headers: Headers
|
|
37
|
+
data: OutputSchema
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function toKnownErr(e: any) {
|
|
41
|
+
if (e instanceof XRPCError) {
|
|
42
|
+
}
|
|
43
|
+
return e
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface MyState {
|
|
47
|
+
follow?: string
|
|
48
|
+
member?: string
|
|
49
|
+
[k: string]: unknown
|
|
50
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
limit?: number
|
|
9
|
+
cursor?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type InputSchema = undefined
|
|
13
|
+
|
|
14
|
+
export interface OutputSchema {
|
|
15
|
+
cursor?: string
|
|
16
|
+
actors: Actor[]
|
|
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 Actor {
|
|
37
|
+
did: string
|
|
38
|
+
declaration: AppBskySystemDeclRef.Main
|
|
39
|
+
handle: string
|
|
40
|
+
displayName?: string
|
|
41
|
+
description?: string
|
|
42
|
+
avatar?: string
|
|
43
|
+
indexedAt?: string
|
|
44
|
+
myState?: MyState
|
|
45
|
+
[k: string]: unknown
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface MyState {
|
|
49
|
+
follow?: string
|
|
50
|
+
[k: string]: unknown
|
|
51
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
export interface Record {
|
|
5
|
+
displayName: string
|
|
6
|
+
description?: string
|
|
7
|
+
avatar?: { cid: string; mimeType: string; [k: string]: unknown }
|
|
8
|
+
banner?: { cid: string; mimeType: string; [k: string]: unknown }
|
|
9
|
+
[k: string]: unknown
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
5
|
+
|
|
6
|
+
export interface Main {
|
|
7
|
+
did: string
|
|
8
|
+
declarationCid: string
|
|
9
|
+
[k: string]: unknown
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface WithInfo {
|
|
13
|
+
did: string
|
|
14
|
+
declaration: AppBskySystemDeclRef.Main
|
|
15
|
+
handle: string
|
|
16
|
+
displayName?: string
|
|
17
|
+
avatar?: string
|
|
18
|
+
[k: string]: unknown
|
|
19
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
term: string
|
|
9
|
+
limit?: number
|
|
10
|
+
before?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type InputSchema = undefined
|
|
14
|
+
|
|
15
|
+
export interface OutputSchema {
|
|
16
|
+
cursor?: string
|
|
17
|
+
users: User[]
|
|
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
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface User {
|
|
38
|
+
did: string
|
|
39
|
+
declaration: AppBskySystemDeclRef.Main
|
|
40
|
+
handle: string
|
|
41
|
+
displayName?: string
|
|
42
|
+
avatar?: string
|
|
43
|
+
description?: string
|
|
44
|
+
indexedAt?: string
|
|
45
|
+
[k: string]: unknown
|
|
46
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
term: string
|
|
9
|
+
limit?: number
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type InputSchema = undefined
|
|
13
|
+
|
|
14
|
+
export interface OutputSchema {
|
|
15
|
+
users: User[]
|
|
16
|
+
[k: string]: unknown
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CallOptions {
|
|
20
|
+
headers?: Headers
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Response {
|
|
24
|
+
success: boolean
|
|
25
|
+
headers: Headers
|
|
26
|
+
data: OutputSchema
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function toKnownErr(e: any) {
|
|
30
|
+
if (e instanceof XRPCError) {
|
|
31
|
+
}
|
|
32
|
+
return e
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface User {
|
|
36
|
+
did: string
|
|
37
|
+
declaration: AppBskySystemDeclRef.Main
|
|
38
|
+
handle: string
|
|
39
|
+
displayName?: string
|
|
40
|
+
avatar?: string
|
|
41
|
+
[k: string]: unknown
|
|
42
|
+
}
|
|
@@ -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
|
+
did?: string
|
|
10
|
+
displayName?: string
|
|
11
|
+
description?: string
|
|
12
|
+
avatar?: { cid: string; mimeType: string; [k: string]: unknown }
|
|
13
|
+
banner?: { cid: string; mimeType: string; [k: string]: unknown }
|
|
14
|
+
[k: string]: unknown
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface OutputSchema {
|
|
18
|
+
uri: string
|
|
19
|
+
cid: string
|
|
20
|
+
record: {}
|
|
21
|
+
[k: string]: unknown
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface CallOptions {
|
|
25
|
+
headers?: Headers
|
|
26
|
+
qp?: QueryParams
|
|
27
|
+
encoding: 'application/json'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface Response {
|
|
31
|
+
success: boolean
|
|
32
|
+
headers: Headers
|
|
33
|
+
data: OutputSchema
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class InvalidBlobError extends XRPCError {
|
|
37
|
+
constructor(src: XRPCError) {
|
|
38
|
+
super(src.status, src.error, src.message)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export class BlobTooLargeError extends XRPCError {
|
|
43
|
+
constructor(src: XRPCError) {
|
|
44
|
+
super(src.status, src.error, src.message)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class InvalidMimeTypeError extends XRPCError {
|
|
49
|
+
constructor(src: XRPCError) {
|
|
50
|
+
super(src.status, src.error, src.message)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export class InvalidImageDimensionsError extends XRPCError {
|
|
55
|
+
constructor(src: XRPCError) {
|
|
56
|
+
super(src.status, src.error, src.message)
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function toKnownErr(e: any) {
|
|
61
|
+
if (e instanceof XRPCError) {
|
|
62
|
+
if (e.error === 'InvalidBlob') return new InvalidBlobError(e)
|
|
63
|
+
if (e.error === 'BlobTooLarge') return new BlobTooLargeError(e)
|
|
64
|
+
if (e.error === 'InvalidMimeType') return new InvalidMimeTypeError(e)
|
|
65
|
+
if (e.error === 'InvalidImageDimensions')
|
|
66
|
+
return new InvalidImageDimensionsError(e)
|
|
67
|
+
}
|
|
68
|
+
return e
|
|
69
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
export interface Main {
|
|
5
|
+
external: External
|
|
6
|
+
[k: string]: unknown
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface External {
|
|
10
|
+
uri: string
|
|
11
|
+
title: string
|
|
12
|
+
description: string
|
|
13
|
+
thumb?: { cid: string; mimeType: string; [k: string]: unknown }
|
|
14
|
+
[k: string]: unknown
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface Presented {
|
|
18
|
+
external: PresentedExternal
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface PresentedExternal {
|
|
23
|
+
uri: string
|
|
24
|
+
title: string
|
|
25
|
+
description: string
|
|
26
|
+
thumb?: string
|
|
27
|
+
[k: string]: unknown
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
export interface Main {
|
|
5
|
+
images: Image[]
|
|
6
|
+
[k: string]: unknown
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface Image {
|
|
10
|
+
image: { cid: string; mimeType: string; [k: string]: unknown }
|
|
11
|
+
alt: string
|
|
12
|
+
[k: string]: unknown
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface Presented {
|
|
16
|
+
images: PresentedImage[]
|
|
17
|
+
[k: string]: unknown
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface PresentedImage {
|
|
21
|
+
thumb: string
|
|
22
|
+
fullsize: string
|
|
23
|
+
alt: string
|
|
24
|
+
[k: string]: unknown
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import * as AppBskyFeedPost from './post'
|
|
5
|
+
import * as AppBskyActorRef from '../actor/ref'
|
|
6
|
+
|
|
7
|
+
export interface Main {
|
|
8
|
+
post: AppBskyFeedPost.View
|
|
9
|
+
reply?: ReplyRef
|
|
10
|
+
reason?: ReasonTrend | ReasonRepost | { $type: string; [k: string]: unknown }
|
|
11
|
+
[k: string]: unknown
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ReplyRef {
|
|
15
|
+
root: AppBskyFeedPost.View
|
|
16
|
+
parent: AppBskyFeedPost.View
|
|
17
|
+
[k: string]: unknown
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ReasonTrend {
|
|
21
|
+
by: AppBskyActorRef.WithInfo
|
|
22
|
+
indexedAt: string
|
|
23
|
+
[k: string]: unknown
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ReasonRepost {
|
|
27
|
+
by: AppBskyActorRef.WithInfo
|
|
28
|
+
indexedAt: string
|
|
29
|
+
[k: string]: unknown
|
|
30
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskyFeedFeedViewPost from './feedViewPost'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
author: string
|
|
9
|
+
limit?: number
|
|
10
|
+
before?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type InputSchema = undefined
|
|
14
|
+
|
|
15
|
+
export interface OutputSchema {
|
|
16
|
+
cursor?: string
|
|
17
|
+
feed: AppBskyFeedFeedViewPost.Main[]
|
|
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
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskyFeedPost from './post'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
uri: string
|
|
9
|
+
depth?: number
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type InputSchema = undefined
|
|
13
|
+
|
|
14
|
+
export interface OutputSchema {
|
|
15
|
+
thread:
|
|
16
|
+
| ThreadViewPost
|
|
17
|
+
| NotFoundPost
|
|
18
|
+
| { $type: string; [k: string]: unknown }
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CallOptions {
|
|
23
|
+
headers?: Headers
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Response {
|
|
27
|
+
success: boolean
|
|
28
|
+
headers: Headers
|
|
29
|
+
data: OutputSchema
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export class NotFoundError extends XRPCError {
|
|
33
|
+
constructor(src: XRPCError) {
|
|
34
|
+
super(src.status, src.error, src.message)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function toKnownErr(e: any) {
|
|
39
|
+
if (e instanceof XRPCError) {
|
|
40
|
+
if (e.error === 'NotFound') return new NotFoundError(e)
|
|
41
|
+
}
|
|
42
|
+
return e
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ThreadViewPost {
|
|
46
|
+
post: AppBskyFeedPost.View
|
|
47
|
+
parent?:
|
|
48
|
+
| ThreadViewPost
|
|
49
|
+
| NotFoundPost
|
|
50
|
+
| { $type: string; [k: string]: unknown }
|
|
51
|
+
replies?: (
|
|
52
|
+
| ThreadViewPost
|
|
53
|
+
| NotFoundPost
|
|
54
|
+
| { $type: string; [k: string]: unknown }
|
|
55
|
+
)[]
|
|
56
|
+
[k: string]: unknown
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface NotFoundPost {
|
|
60
|
+
uri: string
|
|
61
|
+
notFound: true
|
|
62
|
+
[k: string]: unknown
|
|
63
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskySystemDeclRef from '../system/declRef'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
uri: string
|
|
9
|
+
cid?: string
|
|
10
|
+
limit?: number
|
|
11
|
+
before?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type InputSchema = undefined
|
|
15
|
+
|
|
16
|
+
export interface OutputSchema {
|
|
17
|
+
uri: string
|
|
18
|
+
cid?: string
|
|
19
|
+
cursor?: string
|
|
20
|
+
repostedBy: RepostedBy[]
|
|
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 RepostedBy {
|
|
41
|
+
did: string
|
|
42
|
+
declaration: AppBskySystemDeclRef.Main
|
|
43
|
+
handle: string
|
|
44
|
+
displayName?: string
|
|
45
|
+
avatar?: string
|
|
46
|
+
createdAt?: string
|
|
47
|
+
indexedAt: string
|
|
48
|
+
[k: string]: unknown
|
|
49
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import * as AppBskyFeedFeedViewPost from './feedViewPost'
|
|
6
|
+
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
algorithm?: string
|
|
9
|
+
limit?: number
|
|
10
|
+
before?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type InputSchema = undefined
|
|
14
|
+
|
|
15
|
+
export interface OutputSchema {
|
|
16
|
+
cursor?: string
|
|
17
|
+
feed: AppBskyFeedFeedViewPost.Main[]
|
|
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
|
+
}
|
|
@@ -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
|
+
|
|
7
|
+
export interface QueryParams {
|
|
8
|
+
uri: string
|
|
9
|
+
cid?: string
|
|
10
|
+
direction?: 'up' | 'down'
|
|
11
|
+
limit?: number
|
|
12
|
+
before?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type InputSchema = undefined
|
|
16
|
+
|
|
17
|
+
export interface OutputSchema {
|
|
18
|
+
uri: string
|
|
19
|
+
cid?: string
|
|
20
|
+
cursor?: string
|
|
21
|
+
votes: Vote[]
|
|
22
|
+
[k: string]: unknown
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CallOptions {
|
|
26
|
+
headers?: Headers
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface Response {
|
|
30
|
+
success: boolean
|
|
31
|
+
headers: Headers
|
|
32
|
+
data: OutputSchema
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function toKnownErr(e: any) {
|
|
36
|
+
if (e instanceof XRPCError) {
|
|
37
|
+
}
|
|
38
|
+
return e
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface Vote {
|
|
42
|
+
direction: 'up' | 'down'
|
|
43
|
+
indexedAt: string
|
|
44
|
+
createdAt: string
|
|
45
|
+
actor: AppBskyActorRef.WithInfo
|
|
46
|
+
[k: string]: unknown
|
|
47
|
+
}
|