@atproto/api 0.6.7 → 0.6.8
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/build.js +8 -0
- package/dist/agent.d.ts +25 -44
- package/dist/bsky-agent.d.ts +24 -0
- package/dist/client/types/app/bsky/actor/createScene.d.ts +32 -0
- package/dist/client/types/app/bsky/actor/defs.d.ts +65 -74
- 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/embed/external.d.ts +23 -23
- package/dist/client/types/app/bsky/embed/images.d.ts +20 -20
- package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +20 -26
- package/dist/client/types/app/bsky/feed/feedViewPost.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/like.d.ts +7 -7
- package/dist/client/types/app/bsky/feed/repost.d.ts +7 -7
- 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/block.d.ts +6 -6
- package/dist/client/types/app/bsky/graph/confirmation.d.ts +11 -0
- package/dist/client/types/app/bsky/graph/defs.d.ts +36 -36
- package/dist/client/types/app/bsky/graph/follow.d.ts +6 -6
- 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/listitem.d.ts +7 -7
- 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/richtext/facet.d.ts +22 -26
- 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/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/label/subscribeLabels.d.ts +12 -12
- package/dist/client/types/com/atproto/moderation/defs.d.ts +7 -16
- 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/repo/strongRef.d.ts +6 -6
- 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/defs.d.ts +16 -16
- 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/subscribeRepos.d.ts +46 -46
- package/dist/client/types/com/atproto/sync/updateRepo.d.ts +15 -0
- package/dist/client/util.d.ts +2 -5
- package/dist/helpers/bsky.d.ts +20 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1260 -865
- package/dist/index.js.map +4 -4
- package/dist/mixins/bsky.d.ts +23 -0
- package/dist/rich-text/detection.d.ts +4 -4
- package/dist/rich-text/rich-text.d.ts +31 -31
- package/dist/rich-text/sanitization.d.ts +4 -7
- package/dist/rich-text/sanitize.d.ts +4 -0
- package/dist/rich-text/unicode.d.ts +9 -9
- package/dist/session.d.ts +42 -0
- package/dist/types.d.ts +32 -34
- package/package.json +23 -22
- package/src/bsky-agent.ts +181 -1
- package/src/client/index.ts +36 -39
- package/src/client/lexicons.ts +76 -129
- package/src/client/types/com/atproto/sync/getCheckout.ts +0 -2
- package/src/client/types/com/atproto/sync/{getCommitPath.ts → getLatestCommit.ts} +9 -5
- package/src/client/types/com/atproto/sync/getRepo.ts +2 -4
- package/src/client/types/com/atproto/sync/listBlobs.ts +5 -4
- package/src/client/types/com/atproto/sync/subscribeRepos.ts +5 -1
- package/src/client/types/com/atproto/{admin/rebaseRepo.ts → temp/upgradeRepoVersion.ts} +1 -18
- package/src/index.ts +1 -1
- package/src/types.ts +20 -0
- package/tests/bsky-agent.test.ts +149 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/update-pkg.js +14 -0
- package/LICENSE +0 -21
- package/src/client/types/com/atproto/repo/rebaseRepo.ts +0 -49
|
@@ -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;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ValidationResult } from '@atproto/lexicon'
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
2
|
export interface InviteCode {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
code: string;
|
|
4
|
+
available: number;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
forAccount: string;
|
|
7
|
+
createdBy: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
uses: InviteCodeUse[];
|
|
10
|
+
[k: string]: unknown;
|
|
11
11
|
}
|
|
12
|
-
export declare function isInviteCode(v: unknown): v is InviteCode
|
|
13
|
-
export declare function validateInviteCode(v: unknown): ValidationResult
|
|
12
|
+
export declare function isInviteCode(v: unknown): v is InviteCode;
|
|
13
|
+
export declare function validateInviteCode(v: unknown): ValidationResult;
|
|
14
14
|
export interface InviteCodeUse {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
usedBy: string;
|
|
16
|
+
usedAt: string;
|
|
17
|
+
[k: string]: unknown;
|
|
18
18
|
}
|
|
19
|
-
export declare function isInviteCodeUse(v: unknown): v is InviteCodeUse
|
|
20
|
-
export declare function validateInviteCodeUse(v: unknown): ValidationResult
|
|
19
|
+
export declare function isInviteCodeUse(v: unknown): v is InviteCodeUse;
|
|
20
|
+
export declare function validateInviteCodeUse(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;
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { ValidationResult } from '@atproto/lexicon'
|
|
2
|
-
import { CID } from 'multiformats/cid'
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import { CID } from 'multiformats/cid';
|
|
3
3
|
export interface Commit {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
seq: number;
|
|
5
|
+
rebase: boolean;
|
|
6
|
+
tooBig: boolean;
|
|
7
|
+
repo: string;
|
|
8
|
+
commit: CID;
|
|
9
|
+
prev: CID | null;
|
|
10
|
+
blocks: Uint8Array;
|
|
11
|
+
ops: RepoOp[];
|
|
12
|
+
blobs: CID[];
|
|
13
|
+
time: string;
|
|
14
|
+
[k: string]: unknown;
|
|
15
15
|
}
|
|
16
|
-
export declare function isCommit(v: unknown): v is Commit
|
|
17
|
-
export declare function validateCommit(v: unknown): ValidationResult
|
|
16
|
+
export declare function isCommit(v: unknown): v is Commit;
|
|
17
|
+
export declare function validateCommit(v: unknown): ValidationResult;
|
|
18
18
|
export interface Handle {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
seq: number;
|
|
20
|
+
did: string;
|
|
21
|
+
handle: string;
|
|
22
|
+
time: string;
|
|
23
|
+
[k: string]: unknown;
|
|
24
24
|
}
|
|
25
|
-
export declare function isHandle(v: unknown): v is Handle
|
|
26
|
-
export declare function validateHandle(v: unknown): ValidationResult
|
|
25
|
+
export declare function isHandle(v: unknown): v is Handle;
|
|
26
|
+
export declare function validateHandle(v: unknown): ValidationResult;
|
|
27
27
|
export interface Migrate {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
seq: number;
|
|
29
|
+
did: string;
|
|
30
|
+
migrateTo: string | null;
|
|
31
|
+
time: string;
|
|
32
|
+
[k: string]: unknown;
|
|
33
33
|
}
|
|
34
|
-
export declare function isMigrate(v: unknown): v is Migrate
|
|
35
|
-
export declare function validateMigrate(v: unknown): ValidationResult
|
|
34
|
+
export declare function isMigrate(v: unknown): v is Migrate;
|
|
35
|
+
export declare function validateMigrate(v: unknown): ValidationResult;
|
|
36
36
|
export interface Tombstone {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
seq: number;
|
|
38
|
+
did: string;
|
|
39
|
+
time: string;
|
|
40
|
+
[k: string]: unknown;
|
|
41
41
|
}
|
|
42
|
-
export declare function isTombstone(v: unknown): v is Tombstone
|
|
43
|
-
export declare function validateTombstone(v: unknown): ValidationResult
|
|
42
|
+
export declare function isTombstone(v: unknown): v is Tombstone;
|
|
43
|
+
export declare function validateTombstone(v: unknown): ValidationResult;
|
|
44
44
|
export interface Info {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
name: 'OutdatedCursor' | (string & {});
|
|
46
|
+
message?: string;
|
|
47
|
+
[k: string]: unknown;
|
|
48
48
|
}
|
|
49
|
-
export declare function isInfo(v: unknown): v is Info
|
|
50
|
-
export declare function validateInfo(v: unknown): ValidationResult
|
|
49
|
+
export declare function isInfo(v: unknown): v is Info;
|
|
50
|
+
export declare function validateInfo(v: unknown): ValidationResult;
|
|
51
51
|
export interface RepoOp {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
action: 'create' | 'update' | 'delete' | (string & {});
|
|
53
|
+
path: string;
|
|
54
|
+
cid: CID | null;
|
|
55
|
+
[k: string]: unknown;
|
|
56
56
|
}
|
|
57
|
-
export declare function isRepoOp(v: unknown): v is RepoOp
|
|
58
|
-
export declare function validateRepoOp(v: unknown): ValidationResult
|
|
57
|
+
export declare function isRepoOp(v: unknown): v is RepoOp;
|
|
58
|
+
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;
|
package/dist/client/util.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export declare function isObj(v: unknown): v is Record<string, unknown
|
|
2
|
-
export declare function hasProp<K extends PropertyKey>(
|
|
3
|
-
data: object,
|
|
4
|
-
prop: K,
|
|
5
|
-
): data is Record<K, unknown>
|
|
1
|
+
export declare function isObj(v: unknown): v is Record<string, unknown>;
|
|
2
|
+
export declare function hasProp<K extends PropertyKey>(data: object, prop: K): data is Record<K, unknown>;
|
|
@@ -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
|
+
}
|
package/dist/index.d.ts
CHANGED