@atproto/api 0.2.6 → 0.2.7
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/agent.d.ts +27 -0
- package/dist/bsky-agent.d.ts +43 -0
- package/dist/client/types/app/bsky/actor/createScene.d.ts +32 -0
- package/dist/client/types/app/bsky/actor/getProfile.d.ts +16 -0
- package/dist/client/types/app/bsky/actor/getProfiles.d.ts +19 -0
- package/dist/client/types/app/bsky/actor/getSuggestions.d.ts +21 -0
- package/dist/client/types/app/bsky/actor/profile.d.ts +10 -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/searchActors.d.ts +22 -0
- package/dist/client/types/app/bsky/actor/searchActorsTypeahead.d.ts +20 -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 +31 -0
- package/dist/client/types/app/bsky/embed/images.d.ts +28 -0
- package/dist/client/types/app/bsky/embed/record.d.ts +41 -0
- package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +24 -0
- package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +28 -0
- package/dist/client/types/app/bsky/feed/getAuthorFeed.d.ts +22 -0
- package/dist/client/types/app/bsky/feed/getLikes.d.ts +34 -0
- package/dist/client/types/app/bsky/feed/getPostThread.d.ts +26 -0
- package/dist/client/types/app/bsky/feed/getRepostedBy.d.ts +25 -0
- package/dist/client/types/app/bsky/feed/getTimeline.d.ts +22 -0
- package/dist/client/types/app/bsky/feed/getVotes.d.ts +36 -0
- package/dist/client/types/app/bsky/feed/like.d.ts +9 -0
- package/dist/client/types/app/bsky/feed/post.d.ts +43 -0
- package/dist/client/types/app/bsky/feed/repost.d.ts +9 -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/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/follow.d.ts +8 -0
- package/dist/client/types/app/bsky/graph/getAssertions.d.ts +48 -0
- package/dist/client/types/app/bsky/graph/getFollowers.d.ts +23 -0
- package/dist/client/types/app/bsky/graph/getFollows.d.ts +23 -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/getMutes.d.ts +21 -0
- package/dist/client/types/app/bsky/graph/mute.d.ts +17 -0
- package/dist/client/types/app/bsky/graph/muteActor.d.ts +17 -0
- package/dist/client/types/app/bsky/graph/unmute.d.ts +17 -0
- package/dist/client/types/app/bsky/graph/unmuteActor.d.ts +17 -0
- package/dist/client/types/app/bsky/notification/getCount.d.ts +17 -0
- package/dist/client/types/app/bsky/notification/getUnreadCount.d.ts +17 -0
- package/dist/client/types/app/bsky/notification/list.d.ts +35 -0
- package/dist/client/types/app/bsky/notification/updateSeen.d.ts +17 -0
- package/dist/client/types/app/bsky/richtext/facet.d.ts +30 -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/getPopular.d.ts +21 -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/getModerationAction.d.ts +16 -0
- package/dist/client/types/com/atproto/admin/getModerationActions.d.ts +22 -0
- package/dist/client/types/com/atproto/admin/getModerationReport.d.ts +16 -0
- package/dist/client/types/com/atproto/admin/getModerationReports.d.ts +23 -0
- package/dist/client/types/com/atproto/admin/getRecord.d.ts +17 -0
- package/dist/client/types/com/atproto/admin/getRepo.d.ts +16 -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/admin/resolveModerationReports.d.ts +22 -0
- package/dist/client/types/com/atproto/admin/reverseModerationAction.d.ts +22 -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/identity/resolveHandle.d.ts +18 -0
- package/dist/client/types/com/atproto/identity/updateHandle.d.ts +17 -0
- package/dist/client/types/com/atproto/moderation/createReport.d.ts +38 -0
- package/dist/client/types/com/atproto/moderation/defs.d.ts +3 -0
- package/dist/client/types/com/atproto/repo/applyWrites.d.ts +47 -0
- package/dist/client/types/com/atproto/repo/batchWrite.d.ts +46 -0
- package/dist/client/types/com/atproto/repo/createRecord.d.ts +31 -0
- package/dist/client/types/com/atproto/repo/deleteRecord.d.ts +24 -0
- package/dist/client/types/com/atproto/repo/describe.d.ts +22 -0
- package/dist/client/types/com/atproto/repo/describeRepo.d.ts +22 -0
- package/dist/client/types/com/atproto/repo/getRecord.d.ts +23 -0
- package/dist/client/types/com/atproto/repo/putRecord.d.ts +32 -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 +8 -0
- package/dist/client/types/com/atproto/repo/uploadBlob.d.ts +20 -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/createAccount.d.ts +44 -0
- package/dist/client/types/com/atproto/server/deleteAccount.d.ts +25 -0
- package/dist/client/types/com/atproto/server/deleteSession.d.ts +13 -0
- package/dist/client/types/com/atproto/server/describeServer.d.ts +27 -0
- package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +27 -0
- package/dist/client/types/com/atproto/server/refreshSession.d.ts +24 -0
- package/dist/client/types/com/atproto/server/requestAccountDelete.d.ts +13 -0
- package/dist/client/types/com/atproto/server/requestPasswordReset.d.ts +17 -0
- package/dist/client/types/com/atproto/server/resetPassword.d.ts +24 -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/getBlob.d.ts +15 -0
- package/dist/client/types/com/atproto/sync/getBlocks.d.ts +15 -0
- package/dist/client/types/com/atproto/sync/getCheckout.d.ts +15 -0
- package/dist/client/types/com/atproto/sync/getCommitPath.d.ts +20 -0
- package/dist/client/types/com/atproto/sync/getHead.d.ts +18 -0
- package/dist/client/types/com/atproto/sync/getRecord.d.ts +17 -0
- package/dist/client/types/com/atproto/sync/getRepo.d.ts +16 -0
- package/dist/client/types/com/atproto/sync/getRoot.d.ts +18 -0
- package/dist/client/types/com/atproto/sync/listBlobs.d.ts +20 -0
- package/dist/client/types/com/atproto/sync/notifyOfUpdate.d.ts +13 -0
- package/dist/client/types/com/atproto/sync/requestCrawl.d.ts +13 -0
- package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +9 -0
- package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +58 -0
- package/dist/client/types/com/atproto/sync/updateRepo.d.ts +15 -0
- package/dist/client/util.d.ts +2 -0
- package/dist/helpers/bsky.d.ts +20 -0
- package/dist/index.d.ts +10 -0
- package/dist/mixins/bsky.d.ts +23 -0
- package/dist/rich-text/detection.d.ts +4 -0
- package/dist/rich-text/rich-text.d.ts +39 -0
- package/dist/rich-text/sanitization.d.ts +4 -0
- package/dist/rich-text/sanitize.d.ts +4 -0
- package/dist/rich-text/unicode.d.ts +11 -0
- package/dist/session.d.ts +42 -0
- package/package.json +1 -1
package/dist/agent.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AtpServiceClient, ComAtprotoServerCreateAccount, ComAtprotoServerCreateSession, ComAtprotoServerGetSession } from './client';
|
|
2
|
+
import { AtpSessionData, AtpAgentCreateAccountOpts, AtpAgentLoginOpts, AtpAgentFetchHandler, AtpAgentGlobalOpts, AtpPersistSessionHandler, AtpAgentOpts } from './types';
|
|
3
|
+
export declare class AtpAgent {
|
|
4
|
+
service: URL;
|
|
5
|
+
api: AtpServiceClient;
|
|
6
|
+
session?: AtpSessionData;
|
|
7
|
+
private _baseClient;
|
|
8
|
+
private _persistSession?;
|
|
9
|
+
private _refreshSessionPromise;
|
|
10
|
+
get com(): import("./client").ComNS;
|
|
11
|
+
static fetch: AtpAgentFetchHandler | undefined;
|
|
12
|
+
static configure(opts: AtpAgentGlobalOpts): void;
|
|
13
|
+
constructor(opts: AtpAgentOpts);
|
|
14
|
+
get hasSession(): boolean;
|
|
15
|
+
setPersistSessionHandler(handler?: AtpPersistSessionHandler): void;
|
|
16
|
+
createAccount(opts: AtpAgentCreateAccountOpts): Promise<ComAtprotoServerCreateAccount.Response>;
|
|
17
|
+
login(opts: AtpAgentLoginOpts): Promise<ComAtprotoServerCreateSession.Response>;
|
|
18
|
+
resumeSession(session: AtpSessionData): Promise<ComAtprotoServerGetSession.Response>;
|
|
19
|
+
private _addAuthHeader;
|
|
20
|
+
private _fetch;
|
|
21
|
+
private _refreshSession;
|
|
22
|
+
private _refreshSessionInner;
|
|
23
|
+
uploadBlob: typeof this.api.com.atproto.repo.uploadBlob;
|
|
24
|
+
resolveHandle: typeof this.api.com.atproto.identity.resolveHandle;
|
|
25
|
+
updateHandle: typeof this.api.com.atproto.identity.updateHandle;
|
|
26
|
+
createModerationReport: typeof this.api.com.atproto.moderation.createReport;
|
|
27
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AtpAgent } from './agent';
|
|
2
|
+
import { AppBskyFeedPost, AppBskyActorProfile } from './client';
|
|
3
|
+
export declare class BskyAgent extends AtpAgent {
|
|
4
|
+
get app(): import("./client").AppNS;
|
|
5
|
+
getTimeline: typeof this.api.app.bsky.feed.getTimeline;
|
|
6
|
+
getAuthorFeed: typeof this.api.app.bsky.feed.getAuthorFeed;
|
|
7
|
+
getPostThread: typeof this.api.app.bsky.feed.getPostThread;
|
|
8
|
+
getPost: typeof this.api.app.bsky.feed.post.get;
|
|
9
|
+
getLikes: typeof this.api.app.bsky.feed.getLikes;
|
|
10
|
+
getRepostedBy: typeof this.api.app.bsky.feed.getRepostedBy;
|
|
11
|
+
getFollows: typeof this.api.app.bsky.graph.getFollows;
|
|
12
|
+
getFollowers: typeof this.api.app.bsky.graph.getFollowers;
|
|
13
|
+
getProfile: typeof this.api.app.bsky.actor.getProfile;
|
|
14
|
+
getProfiles: typeof this.api.app.bsky.actor.getProfiles;
|
|
15
|
+
searchActors: typeof this.api.app.bsky.actor.searchActors;
|
|
16
|
+
searchActorsTypeahead: typeof this.api.app.bsky.actor.searchActorsTypeahead;
|
|
17
|
+
listNotifications: typeof this.api.app.bsky.notification.listNotifications;
|
|
18
|
+
countUnreadNotifications: typeof this.api.app.bsky.notification.getUnreadCount;
|
|
19
|
+
post(record: Partial<AppBskyFeedPost.Record> & Omit<AppBskyFeedPost.Record, 'createdAt'>): Promise<{
|
|
20
|
+
uri: string;
|
|
21
|
+
cid: string;
|
|
22
|
+
}>;
|
|
23
|
+
deletePost(postUri: string): Promise<void>;
|
|
24
|
+
like(uri: string, cid: string): Promise<{
|
|
25
|
+
uri: string;
|
|
26
|
+
cid: string;
|
|
27
|
+
}>;
|
|
28
|
+
deleteLike(likeUri: string): Promise<void>;
|
|
29
|
+
repost(uri: string, cid: string): Promise<{
|
|
30
|
+
uri: string;
|
|
31
|
+
cid: string;
|
|
32
|
+
}>;
|
|
33
|
+
deleteRepost(repostUri: string): Promise<void>;
|
|
34
|
+
follow(subjectDid: string): Promise<{
|
|
35
|
+
uri: string;
|
|
36
|
+
cid: string;
|
|
37
|
+
}>;
|
|
38
|
+
deleteFollow(followUri: string): Promise<void>;
|
|
39
|
+
upsertProfile(updateFn: (existing: AppBskyActorProfile.Record | undefined) => AppBskyActorProfile.Record | Promise<AppBskyActorProfile.Record>): Promise<void>;
|
|
40
|
+
mute(actor: string): Promise<import("./client/types/app/bsky/graph/muteActor").Response>;
|
|
41
|
+
unmute(actor: string): Promise<import("./client/types/app/bsky/graph/unmuteActor").Response>;
|
|
42
|
+
updateSeenNotifications(seenAt?: string): Promise<import("./client/types/app/bsky/notification/updateSeen").Response>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Headers, XRPCError } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
}
|
|
5
|
+
export interface InputSchema {
|
|
6
|
+
handle: string;
|
|
7
|
+
recoveryKey?: string;
|
|
8
|
+
[k: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface OutputSchema {
|
|
11
|
+
handle: string;
|
|
12
|
+
did: string;
|
|
13
|
+
declaration: AppBskySystemDeclRef.Main;
|
|
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 InvalidHandleError extends XRPCError {
|
|
27
|
+
constructor(src: XRPCError);
|
|
28
|
+
}
|
|
29
|
+
export declare class HandleNotAvailableError extends XRPCError {
|
|
30
|
+
constructor(src: XRPCError);
|
|
31
|
+
}
|
|
32
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyActorDefs from './defs';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
actor: string;
|
|
5
|
+
}
|
|
6
|
+
export declare type InputSchema = undefined;
|
|
7
|
+
export declare type OutputSchema = AppBskyActorDefs.ProfileViewDetailed;
|
|
8
|
+
export interface CallOptions {
|
|
9
|
+
headers?: Headers;
|
|
10
|
+
}
|
|
11
|
+
export interface Response {
|
|
12
|
+
success: boolean;
|
|
13
|
+
headers: Headers;
|
|
14
|
+
data: OutputSchema;
|
|
15
|
+
}
|
|
16
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyActorDefs from './defs';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
actors: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare type InputSchema = undefined;
|
|
7
|
+
export interface OutputSchema {
|
|
8
|
+
profiles: AppBskyActorDefs.ProfileViewDetailed[];
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export interface CallOptions {
|
|
12
|
+
headers?: Headers;
|
|
13
|
+
}
|
|
14
|
+
export interface Response {
|
|
15
|
+
success: boolean;
|
|
16
|
+
headers: Headers;
|
|
17
|
+
data: OutputSchema;
|
|
18
|
+
}
|
|
19
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyActorDefs from './defs';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
limit?: number;
|
|
5
|
+
cursor?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare type InputSchema = undefined;
|
|
8
|
+
export interface OutputSchema {
|
|
9
|
+
cursor?: string;
|
|
10
|
+
actors: AppBskyActorDefs.ProfileView[];
|
|
11
|
+
[k: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export interface CallOptions {
|
|
14
|
+
headers?: Headers;
|
|
15
|
+
}
|
|
16
|
+
export interface Response {
|
|
17
|
+
success: boolean;
|
|
18
|
+
headers: Headers;
|
|
19
|
+
data: OutputSchema;
|
|
20
|
+
}
|
|
21
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon';
|
|
2
|
+
export interface Record {
|
|
3
|
+
displayName?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
avatar?: BlobRef;
|
|
6
|
+
banner?: BlobRef;
|
|
7
|
+
[k: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export declare function isRecord(v: unknown): v is Record;
|
|
10
|
+
export declare function validateRecord(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as AppBskySystemDeclRef from '../system/declRef';
|
|
3
|
+
export interface Main {
|
|
4
|
+
did: string;
|
|
5
|
+
declarationCid: string;
|
|
6
|
+
[k: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare function isMain(v: unknown): v is Main;
|
|
9
|
+
export declare function validateMain(v: unknown): ValidationResult;
|
|
10
|
+
export interface WithInfo {
|
|
11
|
+
did: string;
|
|
12
|
+
declaration: AppBskySystemDeclRef.Main;
|
|
13
|
+
handle: string;
|
|
14
|
+
displayName?: string;
|
|
15
|
+
avatar?: string;
|
|
16
|
+
viewer?: ViewerState;
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export declare function isWithInfo(v: unknown): v is WithInfo;
|
|
20
|
+
export declare function validateWithInfo(v: unknown): ValidationResult;
|
|
21
|
+
export interface ViewerState {
|
|
22
|
+
muted?: boolean;
|
|
23
|
+
following?: string;
|
|
24
|
+
followedBy?: string;
|
|
25
|
+
[k: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export declare function isViewerState(v: unknown): v is ViewerState;
|
|
28
|
+
export declare function validateViewerState(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyActorProfile from './profile';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
term?: string;
|
|
5
|
+
limit?: number;
|
|
6
|
+
before?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare type InputSchema = undefined;
|
|
9
|
+
export interface OutputSchema {
|
|
10
|
+
cursor?: string;
|
|
11
|
+
users: AppBskyActorProfile.ViewBasic[];
|
|
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,22 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyActorDefs from './defs';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
term?: string;
|
|
5
|
+
limit?: number;
|
|
6
|
+
cursor?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare type InputSchema = undefined;
|
|
9
|
+
export interface OutputSchema {
|
|
10
|
+
cursor?: string;
|
|
11
|
+
actors: AppBskyActorDefs.ProfileView[];
|
|
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,20 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyActorDefs from './defs';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
term?: string;
|
|
5
|
+
limit?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare type InputSchema = undefined;
|
|
8
|
+
export interface OutputSchema {
|
|
9
|
+
actors: AppBskyActorDefs.ProfileViewBasic[];
|
|
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;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyActorRef from './ref';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
term?: string;
|
|
5
|
+
limit?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare type InputSchema = undefined;
|
|
8
|
+
export interface OutputSchema {
|
|
9
|
+
users: AppBskyActorRef.WithInfo[];
|
|
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;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Headers, XRPCError } from '@atproto/xrpc';
|
|
2
|
+
import { BlobRef } from '@atproto/lexicon';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
}
|
|
5
|
+
export interface InputSchema {
|
|
6
|
+
displayName?: string;
|
|
7
|
+
description?: string | null;
|
|
8
|
+
avatar?: BlobRef | null;
|
|
9
|
+
banner?: BlobRef | null;
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface OutputSchema {
|
|
13
|
+
uri: string;
|
|
14
|
+
cid: string;
|
|
15
|
+
record: {};
|
|
16
|
+
[k: string]: unknown;
|
|
17
|
+
}
|
|
18
|
+
export interface CallOptions {
|
|
19
|
+
headers?: Headers;
|
|
20
|
+
qp?: QueryParams;
|
|
21
|
+
encoding: 'application/json';
|
|
22
|
+
}
|
|
23
|
+
export interface Response {
|
|
24
|
+
success: boolean;
|
|
25
|
+
headers: Headers;
|
|
26
|
+
data: OutputSchema;
|
|
27
|
+
}
|
|
28
|
+
export declare class InvalidBlobError extends XRPCError {
|
|
29
|
+
constructor(src: XRPCError);
|
|
30
|
+
}
|
|
31
|
+
export declare class BlobTooLargeError extends XRPCError {
|
|
32
|
+
constructor(src: XRPCError);
|
|
33
|
+
}
|
|
34
|
+
export declare class InvalidMimeTypeError extends XRPCError {
|
|
35
|
+
constructor(src: XRPCError);
|
|
36
|
+
}
|
|
37
|
+
export declare class InvalidImageDimensionsError extends XRPCError {
|
|
38
|
+
constructor(src: XRPCError);
|
|
39
|
+
}
|
|
40
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon';
|
|
2
|
+
export interface Main {
|
|
3
|
+
external: External;
|
|
4
|
+
[k: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare function isMain(v: unknown): v is Main;
|
|
7
|
+
export declare function validateMain(v: unknown): ValidationResult;
|
|
8
|
+
export interface External {
|
|
9
|
+
uri: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
thumb?: BlobRef;
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export declare function isExternal(v: unknown): v is External;
|
|
16
|
+
export declare function validateExternal(v: unknown): ValidationResult;
|
|
17
|
+
export interface View {
|
|
18
|
+
external: ViewExternal;
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
export declare function isView(v: unknown): v is View;
|
|
22
|
+
export declare function validateView(v: unknown): ValidationResult;
|
|
23
|
+
export interface ViewExternal {
|
|
24
|
+
uri: string;
|
|
25
|
+
title: string;
|
|
26
|
+
description: string;
|
|
27
|
+
thumb?: string;
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
export declare function isViewExternal(v: unknown): v is ViewExternal;
|
|
31
|
+
export declare function validateViewExternal(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon';
|
|
2
|
+
export interface Main {
|
|
3
|
+
images: Image[];
|
|
4
|
+
[k: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare function isMain(v: unknown): v is Main;
|
|
7
|
+
export declare function validateMain(v: unknown): ValidationResult;
|
|
8
|
+
export interface Image {
|
|
9
|
+
image: BlobRef;
|
|
10
|
+
alt: string;
|
|
11
|
+
[k: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare function isImage(v: unknown): v is Image;
|
|
14
|
+
export declare function validateImage(v: unknown): ValidationResult;
|
|
15
|
+
export interface View {
|
|
16
|
+
images: ViewImage[];
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export declare function isView(v: unknown): v is View;
|
|
20
|
+
export declare function validateView(v: unknown): ValidationResult;
|
|
21
|
+
export interface ViewImage {
|
|
22
|
+
thumb: string;
|
|
23
|
+
fullsize: string;
|
|
24
|
+
alt: string;
|
|
25
|
+
[k: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export declare function isViewImage(v: unknown): v is ViewImage;
|
|
28
|
+
export declare function validateViewImage(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
|
3
|
+
import * as AppBskyActorDefs from '../actor/defs';
|
|
4
|
+
import * as AppBskyEmbedImages from './images';
|
|
5
|
+
import * as AppBskyEmbedExternal from './external';
|
|
6
|
+
import * as AppBskyEmbedRecordWithMedia from './recordWithMedia';
|
|
7
|
+
export interface Main {
|
|
8
|
+
record: ComAtprotoRepoStrongRef.Main;
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare function isMain(v: unknown): v is Main;
|
|
12
|
+
export declare function validateMain(v: unknown): ValidationResult;
|
|
13
|
+
export interface View {
|
|
14
|
+
record: ViewRecord | ViewNotFound | {
|
|
15
|
+
$type: string;
|
|
16
|
+
[k: string]: unknown;
|
|
17
|
+
};
|
|
18
|
+
[k: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
export declare function isView(v: unknown): v is View;
|
|
21
|
+
export declare function validateView(v: unknown): ValidationResult;
|
|
22
|
+
export interface ViewRecord {
|
|
23
|
+
uri: string;
|
|
24
|
+
cid: string;
|
|
25
|
+
author: AppBskyActorDefs.ProfileViewBasic;
|
|
26
|
+
value: {};
|
|
27
|
+
embeds?: (AppBskyEmbedImages.View | AppBskyEmbedExternal.View | View | AppBskyEmbedRecordWithMedia.View | {
|
|
28
|
+
$type: string;
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
})[];
|
|
31
|
+
indexedAt: string;
|
|
32
|
+
[k: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
export declare function isViewRecord(v: unknown): v is ViewRecord;
|
|
35
|
+
export declare function validateViewRecord(v: unknown): ValidationResult;
|
|
36
|
+
export interface ViewNotFound {
|
|
37
|
+
uri: string;
|
|
38
|
+
[k: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
export declare function isViewNotFound(v: unknown): v is ViewNotFound;
|
|
41
|
+
export declare function validateViewNotFound(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as AppBskyEmbedRecord from './record';
|
|
3
|
+
import * as AppBskyEmbedImages from './images';
|
|
4
|
+
import * as AppBskyEmbedExternal from './external';
|
|
5
|
+
export interface Main {
|
|
6
|
+
record: AppBskyEmbedRecord.Main;
|
|
7
|
+
media: AppBskyEmbedImages.Main | AppBskyEmbedExternal.Main | {
|
|
8
|
+
$type: string;
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
[k: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare function isMain(v: unknown): v is Main;
|
|
14
|
+
export declare function validateMain(v: unknown): ValidationResult;
|
|
15
|
+
export interface View {
|
|
16
|
+
record: AppBskyEmbedRecord.View;
|
|
17
|
+
media: AppBskyEmbedImages.View | AppBskyEmbedExternal.View | {
|
|
18
|
+
$type: string;
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
[k: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
export declare function isView(v: unknown): v is View;
|
|
24
|
+
export declare function validateView(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as AppBskyFeedPost from './post';
|
|
3
|
+
import * as AppBskyActorRef from '../actor/ref';
|
|
4
|
+
export interface Main {
|
|
5
|
+
post: AppBskyFeedPost.View;
|
|
6
|
+
reply?: ReplyRef;
|
|
7
|
+
reason?: ReasonRepost | {
|
|
8
|
+
$type: string;
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
[k: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare function isMain(v: unknown): v is Main;
|
|
14
|
+
export declare function validateMain(v: unknown): ValidationResult;
|
|
15
|
+
export interface ReplyRef {
|
|
16
|
+
root: AppBskyFeedPost.View;
|
|
17
|
+
parent: AppBskyFeedPost.View;
|
|
18
|
+
[k: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
export declare function isReplyRef(v: unknown): v is ReplyRef;
|
|
21
|
+
export declare function validateReplyRef(v: unknown): ValidationResult;
|
|
22
|
+
export interface ReasonRepost {
|
|
23
|
+
by: AppBskyActorRef.WithInfo;
|
|
24
|
+
indexedAt: string;
|
|
25
|
+
[k: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export declare function isReasonRepost(v: unknown): v is ReasonRepost;
|
|
28
|
+
export declare function validateReasonRepost(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyFeedDefs from './defs';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
actor: string;
|
|
5
|
+
limit?: number;
|
|
6
|
+
cursor?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare type InputSchema = undefined;
|
|
9
|
+
export interface OutputSchema {
|
|
10
|
+
cursor?: string;
|
|
11
|
+
feed: AppBskyFeedDefs.FeedViewPost[];
|
|
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,34 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
3
|
+
import * as AppBskyActorDefs from '../actor/defs';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
uri: string;
|
|
6
|
+
cid?: string;
|
|
7
|
+
limit?: number;
|
|
8
|
+
cursor?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare type InputSchema = undefined;
|
|
11
|
+
export interface OutputSchema {
|
|
12
|
+
uri: string;
|
|
13
|
+
cid?: string;
|
|
14
|
+
cursor?: string;
|
|
15
|
+
likes: Like[];
|
|
16
|
+
[k: string]: unknown;
|
|
17
|
+
}
|
|
18
|
+
export interface CallOptions {
|
|
19
|
+
headers?: Headers;
|
|
20
|
+
}
|
|
21
|
+
export interface Response {
|
|
22
|
+
success: boolean;
|
|
23
|
+
headers: Headers;
|
|
24
|
+
data: OutputSchema;
|
|
25
|
+
}
|
|
26
|
+
export declare function toKnownErr(e: any): any;
|
|
27
|
+
export interface Like {
|
|
28
|
+
indexedAt: string;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
actor: AppBskyActorDefs.ProfileView;
|
|
31
|
+
[k: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
export declare function isLike(v: unknown): v is Like;
|
|
34
|
+
export declare function validateLike(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Headers, XRPCError } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyFeedDefs from './defs';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
uri: string;
|
|
5
|
+
depth?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare type InputSchema = undefined;
|
|
8
|
+
export interface OutputSchema {
|
|
9
|
+
thread: AppBskyFeedDefs.ThreadViewPost | AppBskyFeedDefs.NotFoundPost | {
|
|
10
|
+
$type: string;
|
|
11
|
+
[k: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export interface CallOptions {
|
|
16
|
+
headers?: Headers;
|
|
17
|
+
}
|
|
18
|
+
export interface Response {
|
|
19
|
+
success: boolean;
|
|
20
|
+
headers: Headers;
|
|
21
|
+
data: OutputSchema;
|
|
22
|
+
}
|
|
23
|
+
export declare class NotFoundError extends XRPCError {
|
|
24
|
+
constructor(src: XRPCError);
|
|
25
|
+
}
|
|
26
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyActorDefs from '../actor/defs';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
uri: string;
|
|
5
|
+
cid?: string;
|
|
6
|
+
limit?: number;
|
|
7
|
+
cursor?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare type InputSchema = undefined;
|
|
10
|
+
export interface OutputSchema {
|
|
11
|
+
uri: string;
|
|
12
|
+
cid?: string;
|
|
13
|
+
cursor?: string;
|
|
14
|
+
repostedBy: AppBskyActorDefs.ProfileView[];
|
|
15
|
+
[k: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
export interface CallOptions {
|
|
18
|
+
headers?: Headers;
|
|
19
|
+
}
|
|
20
|
+
export interface Response {
|
|
21
|
+
success: boolean;
|
|
22
|
+
headers: Headers;
|
|
23
|
+
data: OutputSchema;
|
|
24
|
+
}
|
|
25
|
+
export declare function toKnownErr(e: any): any;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyFeedDefs from './defs';
|
|
3
|
+
export interface QueryParams {
|
|
4
|
+
algorithm?: string;
|
|
5
|
+
limit?: number;
|
|
6
|
+
cursor?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare type InputSchema = undefined;
|
|
9
|
+
export interface OutputSchema {
|
|
10
|
+
cursor?: string;
|
|
11
|
+
feed: AppBskyFeedDefs.FeedViewPost[];
|
|
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,36 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
3
|
+
import * as AppBskyActorRef from '../actor/ref';
|
|
4
|
+
export interface QueryParams {
|
|
5
|
+
uri: string;
|
|
6
|
+
cid?: string;
|
|
7
|
+
direction?: 'up' | 'down';
|
|
8
|
+
limit?: number;
|
|
9
|
+
before?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare type InputSchema = undefined;
|
|
12
|
+
export interface OutputSchema {
|
|
13
|
+
uri: string;
|
|
14
|
+
cid?: string;
|
|
15
|
+
cursor?: string;
|
|
16
|
+
votes: Vote[];
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface CallOptions {
|
|
20
|
+
headers?: Headers;
|
|
21
|
+
}
|
|
22
|
+
export interface Response {
|
|
23
|
+
success: boolean;
|
|
24
|
+
headers: Headers;
|
|
25
|
+
data: OutputSchema;
|
|
26
|
+
}
|
|
27
|
+
export declare function toKnownErr(e: any): any;
|
|
28
|
+
export interface Vote {
|
|
29
|
+
direction: 'up' | 'down';
|
|
30
|
+
indexedAt: string;
|
|
31
|
+
createdAt: string;
|
|
32
|
+
actor: AppBskyActorRef.WithInfo;
|
|
33
|
+
[k: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
export declare function isVote(v: unknown): v is Vote;
|
|
36
|
+
export declare function validateVote(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef';
|
|
3
|
+
export interface Record {
|
|
4
|
+
subject: ComAtprotoRepoStrongRef.Main;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
[k: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare function isRecord(v: unknown): v is Record;
|
|
9
|
+
export declare function validateRecord(v: unknown): ValidationResult;
|