@atproto/api 0.6.4 → 0.6.6
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/bsky-agent.d.ts +1 -0
- package/dist/client/index.d.ts +6 -0
- package/dist/client/lexicons.d.ts +87 -0
- package/dist/client/types/app/bsky/actor/createScene.d.ts +32 -0
- package/dist/client/types/app/bsky/actor/ref.d.ts +28 -0
- package/dist/client/types/app/bsky/actor/search.d.ts +22 -0
- package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +20 -0
- package/dist/client/types/app/bsky/actor/updateProfile.d.ts +40 -0
- package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +28 -0
- package/dist/client/types/app/bsky/feed/getActorLikes.d.ts +28 -0
- package/dist/client/types/app/bsky/feed/getSavedFeeds.d.ts +21 -0
- package/dist/client/types/app/bsky/feed/getVotes.d.ts +36 -0
- package/dist/client/types/app/bsky/feed/saveFeed.d.ts +17 -0
- package/dist/client/types/app/bsky/feed/setVote.d.ts +25 -0
- package/dist/client/types/app/bsky/feed/trend.d.ts +9 -0
- package/dist/client/types/app/bsky/feed/unsaveFeed.d.ts +17 -0
- package/dist/client/types/app/bsky/feed/vote.d.ts +10 -0
- package/dist/client/types/app/bsky/graph/assertCreator.d.ts +1 -0
- package/dist/client/types/app/bsky/graph/assertMember.d.ts +1 -0
- package/dist/client/types/app/bsky/graph/assertion.d.ts +10 -0
- package/dist/client/types/app/bsky/graph/confirmation.d.ts +11 -0
- package/dist/client/types/app/bsky/graph/getAssertions.d.ts +48 -0
- package/dist/client/types/app/bsky/graph/getListBlocks.d.ts +21 -0
- package/dist/client/types/app/bsky/graph/getMembers.d.ts +36 -0
- package/dist/client/types/app/bsky/graph/getMemberships.d.ts +36 -0
- package/dist/client/types/app/bsky/graph/listblock.d.ts +8 -0
- package/dist/client/types/app/bsky/graph/mute.d.ts +17 -0
- package/dist/client/types/app/bsky/graph/subscribeMuteList.d.ts +17 -0
- package/dist/client/types/app/bsky/graph/unmute.d.ts +17 -0
- package/dist/client/types/app/bsky/graph/unsubscribeMuteList.d.ts +17 -0
- package/dist/client/types/app/bsky/notification/getCount.d.ts +17 -0
- package/dist/client/types/app/bsky/notification/list.d.ts +35 -0
- package/dist/client/types/app/bsky/notification/registerPush.d.ts +20 -0
- package/dist/client/types/app/bsky/system/actorScene.d.ts +1 -0
- package/dist/client/types/app/bsky/system/actorUser.d.ts +1 -0
- package/dist/client/types/app/bsky/system/declRef.d.ts +8 -0
- package/dist/client/types/app/bsky/system/declaration.d.ts +7 -0
- package/dist/client/types/app/bsky/unspecced/registerPushNotification.d.ts +16 -0
- package/dist/client/types/com/atproto/account/create.d.ts +41 -0
- package/dist/client/types/com/atproto/account/createInviteCode.d.ts +22 -0
- package/dist/client/types/com/atproto/account/delete.d.ts +25 -0
- package/dist/client/types/com/atproto/account/get.d.ts +12 -0
- package/dist/client/types/com/atproto/account/requestDelete.d.ts +13 -0
- package/dist/client/types/com/atproto/account/requestPasswordReset.d.ts +17 -0
- package/dist/client/types/com/atproto/account/resetPassword.d.ts +24 -0
- package/dist/client/types/com/atproto/admin/blob.d.ts +37 -0
- package/dist/client/types/com/atproto/admin/moderationAction.d.ts +60 -0
- package/dist/client/types/com/atproto/admin/moderationReport.d.ts +37 -0
- package/dist/client/types/com/atproto/admin/record.d.ts +43 -0
- package/dist/client/types/com/atproto/admin/repo.d.ts +45 -0
- package/dist/client/types/com/atproto/blob/upload.d.ts +19 -0
- package/dist/client/types/com/atproto/handle/resolve.d.ts +18 -0
- package/dist/client/types/com/atproto/handle/update.d.ts +17 -0
- package/dist/client/types/com/atproto/repo/batchWrite.d.ts +46 -0
- package/dist/client/types/com/atproto/repo/describe.d.ts +22 -0
- package/dist/client/types/com/atproto/repo/recordRef.d.ts +8 -0
- package/dist/client/types/com/atproto/repo/repoRef.d.ts +7 -0
- package/dist/client/types/com/atproto/report/create.d.ts +39 -0
- package/dist/client/types/com/atproto/report/reasonType.d.ts +3 -0
- package/dist/client/types/com/atproto/report/subject.d.ts +23 -0
- package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +27 -0
- package/dist/client/types/com/atproto/session/create.d.ts +29 -0
- package/dist/client/types/com/atproto/session/delete.d.ts +13 -0
- package/dist/client/types/com/atproto/session/get.d.ts +18 -0
- package/dist/client/types/com/atproto/session/refresh.d.ts +24 -0
- package/dist/client/types/com/atproto/sync/getRoot.d.ts +18 -0
- package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +9 -0
- package/dist/client/types/com/atproto/sync/updateRepo.d.ts +15 -0
- package/dist/helpers/bsky.d.ts +20 -0
- package/dist/index.js +226 -85
- package/dist/index.js.map +4 -4
- package/dist/mixins/bsky.d.ts +23 -0
- package/dist/rich-text/sanitize.d.ts +4 -0
- package/dist/session.d.ts +42 -0
- package/package.json +1 -1
- package/src/bsky-agent.ts +3 -0
- package/src/client/index.ts +26 -0
- package/src/client/lexicons.ts +93 -0
- package/src/client/types/app/bsky/feed/getActorLikes.ts +53 -0
- package/src/client/types/app/bsky/notification/registerPush.ts +35 -0
- package/src/client/types/com/atproto/sync/subscribeRepos.ts +1 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -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;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
}
|
|
5
|
+
export interface InputSchema {
|
|
6
|
+
did: string;
|
|
7
|
+
validate?: boolean;
|
|
8
|
+
writes: (Create | Update | Delete)[];
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export interface CallOptions {
|
|
12
|
+
headers?: Headers;
|
|
13
|
+
qp?: QueryParams;
|
|
14
|
+
encoding: 'application/json';
|
|
15
|
+
}
|
|
16
|
+
export interface Response {
|
|
17
|
+
success: boolean;
|
|
18
|
+
headers: Headers;
|
|
19
|
+
}
|
|
20
|
+
export declare function toKnownErr(e: any): any;
|
|
21
|
+
export interface Create {
|
|
22
|
+
action: 'create';
|
|
23
|
+
collection: string;
|
|
24
|
+
rkey?: string;
|
|
25
|
+
value: {};
|
|
26
|
+
[k: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
export declare function isCreate(v: unknown): v is Create;
|
|
29
|
+
export declare function validateCreate(v: unknown): ValidationResult;
|
|
30
|
+
export interface Update {
|
|
31
|
+
action: 'update';
|
|
32
|
+
collection: string;
|
|
33
|
+
rkey: string;
|
|
34
|
+
value: {};
|
|
35
|
+
[k: string]: unknown;
|
|
36
|
+
}
|
|
37
|
+
export declare function isUpdate(v: unknown): v is Update;
|
|
38
|
+
export declare function validateUpdate(v: unknown): ValidationResult;
|
|
39
|
+
export interface Delete {
|
|
40
|
+
action: 'delete';
|
|
41
|
+
collection: string;
|
|
42
|
+
rkey: string;
|
|
43
|
+
[k: string]: unknown;
|
|
44
|
+
}
|
|
45
|
+
export declare function isDelete(v: unknown): v is Delete;
|
|
46
|
+
export declare function validateDelete(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
user: string;
|
|
4
|
+
}
|
|
5
|
+
export declare type InputSchema = undefined;
|
|
6
|
+
export interface OutputSchema {
|
|
7
|
+
handle: string;
|
|
8
|
+
did: string;
|
|
9
|
+
didDoc: {};
|
|
10
|
+
collections: string[];
|
|
11
|
+
handleIsCorrect: boolean;
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface CallOptions {
|
|
15
|
+
headers?: Headers;
|
|
16
|
+
}
|
|
17
|
+
export interface Response {
|
|
18
|
+
success: boolean;
|
|
19
|
+
headers: Headers;
|
|
20
|
+
data: OutputSchema;
|
|
21
|
+
}
|
|
22
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as ComAtprotoReportReasonType from './reasonType';
|
|
3
|
+
import * as ComAtprotoRepoRepoRef from '../repo/repoRef';
|
|
4
|
+
import * as ComAtprotoRepoRecordRef from '../repo/recordRef';
|
|
5
|
+
import * as ComAtprotoRepoStrongRef from '../repo/strongRef';
|
|
6
|
+
export interface QueryParams {
|
|
7
|
+
}
|
|
8
|
+
export interface InputSchema {
|
|
9
|
+
reasonType: ComAtprotoReportReasonType.Main;
|
|
10
|
+
reason?: string;
|
|
11
|
+
subject: ComAtprotoRepoRepoRef.Main | ComAtprotoRepoRecordRef.Main | {
|
|
12
|
+
$type: string;
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
[k: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
export interface OutputSchema {
|
|
18
|
+
id: number;
|
|
19
|
+
reasonType: ComAtprotoReportReasonType.Main;
|
|
20
|
+
reason?: string;
|
|
21
|
+
subject: ComAtprotoRepoRepoRef.Main | ComAtprotoRepoStrongRef.Main | {
|
|
22
|
+
$type: string;
|
|
23
|
+
[k: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
reportedByDid: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
[k: string]: unknown;
|
|
28
|
+
}
|
|
29
|
+
export interface CallOptions {
|
|
30
|
+
headers?: Headers;
|
|
31
|
+
qp?: QueryParams;
|
|
32
|
+
encoding: 'application/json';
|
|
33
|
+
}
|
|
34
|
+
export interface Response {
|
|
35
|
+
success: boolean;
|
|
36
|
+
headers: Headers;
|
|
37
|
+
data: OutputSchema;
|
|
38
|
+
}
|
|
39
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
export interface Repo {
|
|
3
|
+
did: string;
|
|
4
|
+
[k: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare function isRepo(v: unknown): v is Repo;
|
|
7
|
+
export declare function validateRepo(v: unknown): ValidationResult;
|
|
8
|
+
export interface Record {
|
|
9
|
+
did: string;
|
|
10
|
+
collection: string;
|
|
11
|
+
rkey: string;
|
|
12
|
+
cid?: string;
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export declare function isRecord(v: unknown): v is Record;
|
|
16
|
+
export declare function validateRecord(v: unknown): ValidationResult;
|
|
17
|
+
export interface RecordRef {
|
|
18
|
+
uri: string;
|
|
19
|
+
cid: string;
|
|
20
|
+
[k: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
export declare function isRecordRef(v: unknown): v is RecordRef;
|
|
23
|
+
export declare function validateRecordRef(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
}
|
|
5
|
+
export declare type InputSchema = undefined;
|
|
6
|
+
export interface OutputSchema {
|
|
7
|
+
inviteCodeRequired?: boolean;
|
|
8
|
+
availableUserDomains: string[];
|
|
9
|
+
links?: Links;
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface CallOptions {
|
|
13
|
+
headers?: Headers;
|
|
14
|
+
}
|
|
15
|
+
export interface Response {
|
|
16
|
+
success: boolean;
|
|
17
|
+
headers: Headers;
|
|
18
|
+
data: OutputSchema;
|
|
19
|
+
}
|
|
20
|
+
export declare function toKnownErr(e: any): any;
|
|
21
|
+
export interface Links {
|
|
22
|
+
privacyPolicy?: string;
|
|
23
|
+
termsOfService?: string;
|
|
24
|
+
[k: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
export declare function isLinks(v: unknown): v is Links;
|
|
27
|
+
export declare function validateLinks(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Headers, XRPCError } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
}
|
|
4
|
+
export interface InputSchema {
|
|
5
|
+
identifier?: string;
|
|
6
|
+
password: string;
|
|
7
|
+
[k: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface OutputSchema {
|
|
10
|
+
accessJwt: string;
|
|
11
|
+
refreshJwt: string;
|
|
12
|
+
handle: string;
|
|
13
|
+
did: string;
|
|
14
|
+
[k: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
export interface CallOptions {
|
|
17
|
+
headers?: Headers;
|
|
18
|
+
qp?: QueryParams;
|
|
19
|
+
encoding: 'application/json';
|
|
20
|
+
}
|
|
21
|
+
export interface Response {
|
|
22
|
+
success: boolean;
|
|
23
|
+
headers: Headers;
|
|
24
|
+
data: OutputSchema;
|
|
25
|
+
}
|
|
26
|
+
export declare class AccountTakedownError extends XRPCError {
|
|
27
|
+
constructor(src: XRPCError);
|
|
28
|
+
}
|
|
29
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
}
|
|
4
|
+
export declare type InputSchema = undefined;
|
|
5
|
+
export interface CallOptions {
|
|
6
|
+
headers?: Headers;
|
|
7
|
+
qp?: QueryParams;
|
|
8
|
+
}
|
|
9
|
+
export interface Response {
|
|
10
|
+
success: boolean;
|
|
11
|
+
headers: Headers;
|
|
12
|
+
}
|
|
13
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
}
|
|
4
|
+
export declare type InputSchema = undefined;
|
|
5
|
+
export interface OutputSchema {
|
|
6
|
+
handle: string;
|
|
7
|
+
did: string;
|
|
8
|
+
[k: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface CallOptions {
|
|
11
|
+
headers?: Headers;
|
|
12
|
+
}
|
|
13
|
+
export interface Response {
|
|
14
|
+
success: boolean;
|
|
15
|
+
headers: Headers;
|
|
16
|
+
data: OutputSchema;
|
|
17
|
+
}
|
|
18
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Headers, XRPCError } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
}
|
|
4
|
+
export declare type InputSchema = undefined;
|
|
5
|
+
export interface OutputSchema {
|
|
6
|
+
accessJwt: string;
|
|
7
|
+
refreshJwt: string;
|
|
8
|
+
handle: string;
|
|
9
|
+
did: string;
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface CallOptions {
|
|
13
|
+
headers?: Headers;
|
|
14
|
+
qp?: QueryParams;
|
|
15
|
+
}
|
|
16
|
+
export interface Response {
|
|
17
|
+
success: boolean;
|
|
18
|
+
headers: Headers;
|
|
19
|
+
data: OutputSchema;
|
|
20
|
+
}
|
|
21
|
+
export declare class AccountTakedownError extends XRPCError {
|
|
22
|
+
constructor(src: XRPCError);
|
|
23
|
+
}
|
|
24
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
did: string;
|
|
4
|
+
}
|
|
5
|
+
export declare type InputSchema = undefined;
|
|
6
|
+
export interface OutputSchema {
|
|
7
|
+
root: string;
|
|
8
|
+
[k: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface CallOptions {
|
|
11
|
+
headers?: Headers;
|
|
12
|
+
}
|
|
13
|
+
export interface Response {
|
|
14
|
+
success: boolean;
|
|
15
|
+
headers: Headers;
|
|
16
|
+
data: OutputSchema;
|
|
17
|
+
}
|
|
18
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
export interface RepoOp {
|
|
3
|
+
action: 'create' | 'update' | 'delete' | (string & {});
|
|
4
|
+
path: string;
|
|
5
|
+
cid: string | null;
|
|
6
|
+
[k: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare function isRepoOp(v: unknown): v is RepoOp;
|
|
9
|
+
export declare function validateRepoOp(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
did: string;
|
|
4
|
+
}
|
|
5
|
+
export declare type InputSchema = string | Uint8Array;
|
|
6
|
+
export interface CallOptions {
|
|
7
|
+
headers?: Headers;
|
|
8
|
+
qp?: QueryParams;
|
|
9
|
+
encoding: 'application/cbor';
|
|
10
|
+
}
|
|
11
|
+
export interface Response {
|
|
12
|
+
success: boolean;
|
|
13
|
+
headers: Headers;
|
|
14
|
+
}
|
|
15
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AtpAgent } from '../agent';
|
|
2
|
+
export declare class Bsky {
|
|
3
|
+
private agent;
|
|
4
|
+
constructor(agent: AtpAgent);
|
|
5
|
+
like(uri: string, cid: string): Promise<{
|
|
6
|
+
uri: string;
|
|
7
|
+
cid: string;
|
|
8
|
+
}>;
|
|
9
|
+
unlike(likeUri: string): Promise<void>;
|
|
10
|
+
repost(uri: string, cid: string): Promise<{
|
|
11
|
+
uri: string;
|
|
12
|
+
cid: string;
|
|
13
|
+
}>;
|
|
14
|
+
unrepost(repostUri: string): Promise<void>;
|
|
15
|
+
follow(subjectDid: string): Promise<{
|
|
16
|
+
uri: string;
|
|
17
|
+
cid: string;
|
|
18
|
+
}>;
|
|
19
|
+
unfollow(followUri: string): Promise<void>;
|
|
20
|
+
}
|