@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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
import
|
|
3
|
-
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
2
|
+
import * as AppBskyActorProfile from './profile';
|
|
4
3
|
export interface QueryParams {
|
|
5
4
|
limit?: number;
|
|
6
5
|
cursor?: string;
|
|
@@ -8,7 +7,7 @@ export interface QueryParams {
|
|
|
8
7
|
export declare type InputSchema = undefined;
|
|
9
8
|
export interface OutputSchema {
|
|
10
9
|
cursor?: string;
|
|
11
|
-
actors:
|
|
10
|
+
actors: AppBskyActorProfile.ViewBasic[];
|
|
12
11
|
[k: string]: unknown;
|
|
13
12
|
}
|
|
14
13
|
export interface CallOptions {
|
|
@@ -20,15 +19,3 @@ export interface Response {
|
|
|
20
19
|
data: OutputSchema;
|
|
21
20
|
}
|
|
22
21
|
export declare function toKnownErr(e: any): any;
|
|
23
|
-
export interface Actor {
|
|
24
|
-
did: string;
|
|
25
|
-
declaration: AppBskySystemDeclRef.Main;
|
|
26
|
-
handle: string;
|
|
27
|
-
displayName?: string;
|
|
28
|
-
description?: string;
|
|
29
|
-
avatar?: string;
|
|
30
|
-
indexedAt?: string;
|
|
31
|
-
[k: string]: unknown;
|
|
32
|
-
}
|
|
33
|
-
export declare function isActor(v: unknown): v is Actor;
|
|
34
|
-
export declare function validateActor(v: unknown): ValidationResult;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
2
3
|
export interface Record {
|
|
3
4
|
displayName: string;
|
|
4
5
|
description?: string;
|
|
@@ -16,3 +17,50 @@ export interface Record {
|
|
|
16
17
|
}
|
|
17
18
|
export declare function isRecord(v: unknown): v is Record;
|
|
18
19
|
export declare function validateRecord(v: unknown): ValidationResult;
|
|
20
|
+
export interface View {
|
|
21
|
+
did: string;
|
|
22
|
+
declaration: AppBskySystemDeclRef.Main;
|
|
23
|
+
handle: string;
|
|
24
|
+
displayName?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
avatar?: string;
|
|
27
|
+
banner?: string;
|
|
28
|
+
followersCount: number;
|
|
29
|
+
followsCount: number;
|
|
30
|
+
postsCount: number;
|
|
31
|
+
creator: string;
|
|
32
|
+
indexedAt?: string;
|
|
33
|
+
viewer?: ViewerState;
|
|
34
|
+
myState?: MyState;
|
|
35
|
+
[k: string]: unknown;
|
|
36
|
+
}
|
|
37
|
+
export declare function isView(v: unknown): v is View;
|
|
38
|
+
export declare function validateView(v: unknown): ValidationResult;
|
|
39
|
+
export interface ViewBasic {
|
|
40
|
+
did: string;
|
|
41
|
+
declaration: AppBskySystemDeclRef.Main;
|
|
42
|
+
handle: string;
|
|
43
|
+
displayName?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
avatar?: string;
|
|
46
|
+
indexedAt?: string;
|
|
47
|
+
viewer?: ViewerState;
|
|
48
|
+
[k: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
export declare function isViewBasic(v: unknown): v is ViewBasic;
|
|
51
|
+
export declare function validateViewBasic(v: unknown): ValidationResult;
|
|
52
|
+
export interface ViewerState {
|
|
53
|
+
muted?: boolean;
|
|
54
|
+
following?: string;
|
|
55
|
+
followedBy?: string;
|
|
56
|
+
[k: string]: unknown;
|
|
57
|
+
}
|
|
58
|
+
export declare function isViewerState(v: unknown): v is ViewerState;
|
|
59
|
+
export declare function validateViewerState(v: unknown): ValidationResult;
|
|
60
|
+
export interface MyState {
|
|
61
|
+
follow?: string;
|
|
62
|
+
muted?: boolean;
|
|
63
|
+
[k: string]: unknown;
|
|
64
|
+
}
|
|
65
|
+
export declare function isMyState(v: unknown): v is MyState;
|
|
66
|
+
export declare function validateMyState(v: unknown): ValidationResult;
|
|
@@ -20,6 +20,8 @@ export declare function isWithInfo(v: unknown): v is WithInfo;
|
|
|
20
20
|
export declare function validateWithInfo(v: unknown): ValidationResult;
|
|
21
21
|
export interface ViewerState {
|
|
22
22
|
muted?: boolean;
|
|
23
|
+
following?: string;
|
|
24
|
+
followedBy?: string;
|
|
23
25
|
[k: string]: unknown;
|
|
24
26
|
}
|
|
25
27
|
export declare function isViewerState(v: unknown): v is ViewerState;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
import
|
|
3
|
-
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
2
|
+
import * as AppBskyActorProfile from './profile';
|
|
4
3
|
export interface QueryParams {
|
|
5
4
|
term?: string;
|
|
6
5
|
limit?: number;
|
|
@@ -9,7 +8,7 @@ export interface QueryParams {
|
|
|
9
8
|
export declare type InputSchema = undefined;
|
|
10
9
|
export interface OutputSchema {
|
|
11
10
|
cursor?: string;
|
|
12
|
-
users:
|
|
11
|
+
users: AppBskyActorProfile.ViewBasic[];
|
|
13
12
|
[k: string]: unknown;
|
|
14
13
|
}
|
|
15
14
|
export interface CallOptions {
|
|
@@ -21,15 +20,3 @@ export interface Response {
|
|
|
21
20
|
data: OutputSchema;
|
|
22
21
|
}
|
|
23
22
|
export declare function toKnownErr(e: any): any;
|
|
24
|
-
export interface User {
|
|
25
|
-
did: string;
|
|
26
|
-
declaration: AppBskySystemDeclRef.Main;
|
|
27
|
-
handle: string;
|
|
28
|
-
displayName?: string;
|
|
29
|
-
avatar?: string;
|
|
30
|
-
description?: string;
|
|
31
|
-
indexedAt?: string;
|
|
32
|
-
[k: string]: unknown;
|
|
33
|
-
}
|
|
34
|
-
export declare function isUser(v: unknown): v is User;
|
|
35
|
-
export declare function validateUser(v: unknown): ValidationResult;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
import
|
|
3
|
-
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
2
|
+
import * as AppBskyActorRef from './ref';
|
|
4
3
|
export interface QueryParams {
|
|
5
4
|
term?: string;
|
|
6
5
|
limit?: number;
|
|
7
6
|
}
|
|
8
7
|
export declare type InputSchema = undefined;
|
|
9
8
|
export interface OutputSchema {
|
|
10
|
-
users:
|
|
9
|
+
users: AppBskyActorRef.WithInfo[];
|
|
11
10
|
[k: string]: unknown;
|
|
12
11
|
}
|
|
13
12
|
export interface CallOptions {
|
|
@@ -19,13 +18,3 @@ export interface Response {
|
|
|
19
18
|
data: OutputSchema;
|
|
20
19
|
}
|
|
21
20
|
export declare function toKnownErr(e: any): any;
|
|
22
|
-
export interface User {
|
|
23
|
-
did: string;
|
|
24
|
-
declaration: AppBskySystemDeclRef.Main;
|
|
25
|
-
handle: string;
|
|
26
|
-
displayName?: string;
|
|
27
|
-
avatar?: string;
|
|
28
|
-
[k: string]: unknown;
|
|
29
|
-
}
|
|
30
|
-
export declare function isUser(v: unknown): v is User;
|
|
31
|
-
export declare function validateUser(v: unknown): ValidationResult;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
import
|
|
3
|
-
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
2
|
+
import * as AppBskyActorRef from '../actor/ref';
|
|
4
3
|
export interface QueryParams {
|
|
5
4
|
uri: string;
|
|
6
5
|
cid?: string;
|
|
@@ -12,7 +11,7 @@ export interface OutputSchema {
|
|
|
12
11
|
uri: string;
|
|
13
12
|
cid?: string;
|
|
14
13
|
cursor?: string;
|
|
15
|
-
repostedBy:
|
|
14
|
+
repostedBy: AppBskyActorRef.WithInfo[];
|
|
16
15
|
[k: string]: unknown;
|
|
17
16
|
}
|
|
18
17
|
export interface CallOptions {
|
|
@@ -24,15 +23,3 @@ export interface Response {
|
|
|
24
23
|
data: OutputSchema;
|
|
25
24
|
}
|
|
26
25
|
export declare function toKnownErr(e: any): any;
|
|
27
|
-
export interface RepostedBy {
|
|
28
|
-
did: string;
|
|
29
|
-
declaration: AppBskySystemDeclRef.Main;
|
|
30
|
-
handle: string;
|
|
31
|
-
displayName?: string;
|
|
32
|
-
avatar?: string;
|
|
33
|
-
createdAt?: string;
|
|
34
|
-
indexedAt: string;
|
|
35
|
-
[k: string]: unknown;
|
|
36
|
-
}
|
|
37
|
-
export declare function isRepostedBy(v: unknown): v is RepostedBy;
|
|
38
|
-
export declare function validateRepostedBy(v: unknown): ValidationResult;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
import { ValidationResult } from '@atproto/lexicon';
|
|
3
2
|
import * as AppBskyActorRef from '../actor/ref';
|
|
4
|
-
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
5
3
|
export interface QueryParams {
|
|
6
4
|
user: string;
|
|
7
5
|
limit?: number;
|
|
@@ -11,7 +9,7 @@ export declare type InputSchema = undefined;
|
|
|
11
9
|
export interface OutputSchema {
|
|
12
10
|
subject: AppBskyActorRef.WithInfo;
|
|
13
11
|
cursor?: string;
|
|
14
|
-
followers:
|
|
12
|
+
followers: AppBskyActorRef.WithInfo[];
|
|
15
13
|
[k: string]: unknown;
|
|
16
14
|
}
|
|
17
15
|
export interface CallOptions {
|
|
@@ -23,15 +21,3 @@ export interface Response {
|
|
|
23
21
|
data: OutputSchema;
|
|
24
22
|
}
|
|
25
23
|
export declare function toKnownErr(e: any): any;
|
|
26
|
-
export interface Follower {
|
|
27
|
-
did: string;
|
|
28
|
-
declaration: AppBskySystemDeclRef.Main;
|
|
29
|
-
handle: string;
|
|
30
|
-
displayName?: string;
|
|
31
|
-
avatar?: string;
|
|
32
|
-
createdAt?: string;
|
|
33
|
-
indexedAt: string;
|
|
34
|
-
[k: string]: unknown;
|
|
35
|
-
}
|
|
36
|
-
export declare function isFollower(v: unknown): v is Follower;
|
|
37
|
-
export declare function validateFollower(v: unknown): ValidationResult;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
import { ValidationResult } from '@atproto/lexicon';
|
|
3
2
|
import * as AppBskyActorRef from '../actor/ref';
|
|
4
|
-
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
5
3
|
export interface QueryParams {
|
|
6
4
|
user: string;
|
|
7
5
|
limit?: number;
|
|
@@ -11,7 +9,7 @@ export declare type InputSchema = undefined;
|
|
|
11
9
|
export interface OutputSchema {
|
|
12
10
|
subject: AppBskyActorRef.WithInfo;
|
|
13
11
|
cursor?: string;
|
|
14
|
-
follows:
|
|
12
|
+
follows: AppBskyActorRef.WithInfo[];
|
|
15
13
|
[k: string]: unknown;
|
|
16
14
|
}
|
|
17
15
|
export interface CallOptions {
|
|
@@ -23,15 +21,3 @@ export interface Response {
|
|
|
23
21
|
data: OutputSchema;
|
|
24
22
|
}
|
|
25
23
|
export declare function toKnownErr(e: any): any;
|
|
26
|
-
export interface Follow {
|
|
27
|
-
did: string;
|
|
28
|
-
declaration: AppBskySystemDeclRef.Main;
|
|
29
|
-
handle: string;
|
|
30
|
-
displayName?: string;
|
|
31
|
-
avatar?: string;
|
|
32
|
-
createdAt?: string;
|
|
33
|
-
indexedAt: string;
|
|
34
|
-
[k: string]: unknown;
|
|
35
|
-
}
|
|
36
|
-
export declare function isFollow(v: unknown): v is Follow;
|
|
37
|
-
export declare function validateFollow(v: unknown): ValidationResult;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Headers } from '@atproto/xrpc';
|
|
2
|
-
import
|
|
3
|
-
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
2
|
+
import * as AppBskyActorRef from '../actor/ref';
|
|
4
3
|
export interface QueryParams {
|
|
5
4
|
limit?: number;
|
|
6
5
|
before?: string;
|
|
@@ -8,7 +7,7 @@ export interface QueryParams {
|
|
|
8
7
|
export declare type InputSchema = undefined;
|
|
9
8
|
export interface OutputSchema {
|
|
10
9
|
cursor?: string;
|
|
11
|
-
mutes:
|
|
10
|
+
mutes: AppBskyActorRef.WithInfo[];
|
|
12
11
|
[k: string]: unknown;
|
|
13
12
|
}
|
|
14
13
|
export interface CallOptions {
|
|
@@ -20,13 +19,3 @@ export interface Response {
|
|
|
20
19
|
data: OutputSchema;
|
|
21
20
|
}
|
|
22
21
|
export declare function toKnownErr(e: any): any;
|
|
23
|
-
export interface Mute {
|
|
24
|
-
did: string;
|
|
25
|
-
declaration: AppBskySystemDeclRef.Main;
|
|
26
|
-
handle: string;
|
|
27
|
-
displayName?: string;
|
|
28
|
-
createdAt: string;
|
|
29
|
-
[k: string]: unknown;
|
|
30
|
-
}
|
|
31
|
-
export declare function isMute(v: unknown): v is Mute;
|
|
32
|
-
export declare function validateMute(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
}
|
|
4
|
+
export interface InputSchema {
|
|
5
|
+
handle: string;
|
|
6
|
+
[k: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface CallOptions {
|
|
9
|
+
headers?: Headers;
|
|
10
|
+
qp?: QueryParams;
|
|
11
|
+
encoding: 'application/json';
|
|
12
|
+
}
|
|
13
|
+
export interface Response {
|
|
14
|
+
success: boolean;
|
|
15
|
+
headers: Headers;
|
|
16
|
+
}
|
|
17
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare type Main = 'com.atproto.report.
|
|
1
|
+
export declare type Main = 'com.atproto.report.reasonType#spam' | 'com.atproto.report.reasonType#other' | (string & {});
|
|
2
2
|
export declare const SPAM = "com.atproto.report.reasonType#spam";
|
|
3
3
|
export declare const OTHER = "com.atproto.report.reasonType#other";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
export interface RepoAppend {
|
|
3
|
+
time: string;
|
|
4
|
+
repo: string;
|
|
5
|
+
commit: string;
|
|
6
|
+
prev?: string;
|
|
7
|
+
blocks: {};
|
|
8
|
+
blobs: string[];
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare function isRepoAppend(v: unknown): v is RepoAppend;
|
|
12
|
+
export declare function validateRepoAppend(v: unknown): ValidationResult;
|
|
13
|
+
export interface RepoRebase {
|
|
14
|
+
time: string;
|
|
15
|
+
repo: string;
|
|
16
|
+
commit: string;
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export declare function isRepoRebase(v: unknown): v is RepoRebase;
|
|
20
|
+
export declare function validateRepoRebase(v: unknown): ValidationResult;
|