@atproto/api 0.6.1 → 0.6.3
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 +25 -44
- package/dist/bsky-agent.d.ts +43 -62
- package/dist/client/lexicons.d.ts +30 -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/record.d.ts +44 -53
- package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +20 -26
- package/dist/client/types/app/bsky/feed/defs.d.ts +115 -141
- 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.js +79 -12
- package/dist/index.js.map +2 -2
- package/dist/mixins/bsky.d.ts +23 -0
- package/dist/moderation/accumulator.d.ts +1 -0
- package/dist/moderation/types.d.ts +4 -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 +22 -34
- package/package.json +1 -1
- package/src/client/lexicons.ts +33 -3
- package/src/client/types/app/bsky/embed/record.ts +3 -0
- package/src/client/types/app/bsky/feed/defs.ts +19 -0
- package/src/client/types/app/bsky/feed/getAuthorFeed.ts +2 -2
- package/src/client/types/app/bsky/feed/getFeed.ts +1 -1
- package/src/client/types/app/bsky/feed/getFeedSkeleton.ts +1 -1
- package/src/client/types/app/bsky/feed/getPostThread.ts +1 -1
- package/src/client/types/app/bsky/unspecced/getTimelineSkeleton.ts +1 -1
- package/src/client/types/com/atproto/admin/getRecord.ts +1 -1
- package/src/client/types/com/atproto/admin/getRepo.ts +1 -1
- package/src/client/types/com/atproto/admin/rebaseRepo.ts +2 -2
- package/src/client/types/com/atproto/admin/takeModerationAction.ts +1 -1
- package/src/client/types/com/atproto/repo/applyWrites.ts +1 -1
- package/src/client/types/com/atproto/repo/createRecord.ts +1 -1
- package/src/client/types/com/atproto/repo/deleteRecord.ts +1 -1
- package/src/client/types/com/atproto/repo/putRecord.ts +1 -1
- package/src/client/types/com/atproto/repo/rebaseRepo.ts +2 -2
- package/src/client/types/com/atproto/server/createAccount.ts +7 -7
- package/src/client/types/com/atproto/server/createAppPassword.ts +1 -1
- package/src/client/types/com/atproto/server/createSession.ts +1 -1
- package/src/client/types/com/atproto/server/deleteAccount.ts +2 -2
- package/src/client/types/com/atproto/server/getAccountInviteCodes.ts +1 -1
- package/src/client/types/com/atproto/server/listAppPasswords.ts +1 -1
- package/src/client/types/com/atproto/server/refreshSession.ts +1 -1
- package/src/client/types/com/atproto/server/resetPassword.ts +2 -2
- package/src/client/types/com/atproto/sync/getHead.ts +1 -1
- package/src/moderation/accumulator.ts +15 -1
- package/src/moderation/subjects/quoted-post.ts +18 -0
- package/src/moderation/types.ts +1 -0
- package/src/moderation/util.ts +2 -14
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AtpAgentType } from '../types';
|
|
2
|
+
export declare function addBsky<TBase extends AtpAgentType>(Base: TBase): {
|
|
3
|
+
new (...args: any[]): {
|
|
4
|
+
like(uri: string, cid: string): Promise<{
|
|
5
|
+
uri: string;
|
|
6
|
+
cid: string;
|
|
7
|
+
}>;
|
|
8
|
+
unlike(likeUri: string): Promise<void>;
|
|
9
|
+
repost(uri: string, cid: string): Promise<{
|
|
10
|
+
uri: string;
|
|
11
|
+
cid: string;
|
|
12
|
+
}>;
|
|
13
|
+
unrepost(repostUri: string): Promise<void>;
|
|
14
|
+
follow(subjectDid: string): Promise<{
|
|
15
|
+
uri: string;
|
|
16
|
+
cid: string;
|
|
17
|
+
}>;
|
|
18
|
+
unfollow(followUri: string): Promise<void>;
|
|
19
|
+
service: URL;
|
|
20
|
+
api: import("..").AtpServiceClient;
|
|
21
|
+
session?: import("../types").AtpSessionData | undefined;
|
|
22
|
+
};
|
|
23
|
+
} & TBase;
|
|
@@ -7,6 +7,7 @@ export declare class ModerationCauseAccumulator {
|
|
|
7
7
|
setDid(did: string): void;
|
|
8
8
|
addBlocking(blocking: string | undefined): void;
|
|
9
9
|
addBlockedBy(blockedBy: boolean | undefined): void;
|
|
10
|
+
addBlockOther(blockOther: boolean | undefined): void;
|
|
10
11
|
addLabel(label: Label, opts: ModerationOpts): void;
|
|
11
12
|
addMuted(muted: boolean | undefined): void;
|
|
12
13
|
addMutedByList(mutedByList: AppBskyGraphDefs.ListViewBasic | undefined): void;
|
|
@@ -61,6 +61,10 @@ export declare type ModerationCause = {
|
|
|
61
61
|
type: 'blocked-by';
|
|
62
62
|
source: ModerationCauseSource;
|
|
63
63
|
priority: 4;
|
|
64
|
+
} | {
|
|
65
|
+
type: 'block-other';
|
|
66
|
+
source: ModerationCauseSource;
|
|
67
|
+
priority: 4;
|
|
64
68
|
} | {
|
|
65
69
|
type: 'label';
|
|
66
70
|
source: ModerationCauseSource;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppBskyRichtextFacet } from '../client'
|
|
2
|
-
import { UnicodeString } from './unicode'
|
|
3
|
-
export declare type Facet = AppBskyRichtextFacet.Main
|
|
4
|
-
export declare function detectFacets(text: UnicodeString): Facet[] | undefined
|
|
1
|
+
import { AppBskyRichtextFacet } from '../client';
|
|
2
|
+
import { UnicodeString } from './unicode';
|
|
3
|
+
export declare type Facet = AppBskyRichtextFacet.Main;
|
|
4
|
+
export declare function detectFacets(text: UnicodeString): Facet[] | undefined;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { AtpAgent } from '../agent'
|
|
2
|
-
import { AppBskyFeedPost, AppBskyRichtextFacet } from '../client'
|
|
3
|
-
import { UnicodeString } from './unicode'
|
|
4
|
-
export declare type Facet = AppBskyRichtextFacet.Main
|
|
5
|
-
export declare type FacetLink = AppBskyRichtextFacet.Link
|
|
6
|
-
export declare type FacetMention = AppBskyRichtextFacet.Mention
|
|
7
|
-
export declare type Entity = AppBskyFeedPost.Entity
|
|
1
|
+
import { AtpAgent } from '../agent';
|
|
2
|
+
import { AppBskyFeedPost, AppBskyRichtextFacet } from '../client';
|
|
3
|
+
import { UnicodeString } from './unicode';
|
|
4
|
+
export declare type Facet = AppBskyRichtextFacet.Main;
|
|
5
|
+
export declare type FacetLink = AppBskyRichtextFacet.Link;
|
|
6
|
+
export declare type FacetMention = AppBskyRichtextFacet.Mention;
|
|
7
|
+
export declare type Entity = AppBskyFeedPost.Entity;
|
|
8
8
|
export interface RichTextProps {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
text: string;
|
|
10
|
+
facets?: Facet[];
|
|
11
|
+
entities?: Entity[];
|
|
12
12
|
}
|
|
13
13
|
export interface RichTextOpts {
|
|
14
|
-
|
|
14
|
+
cleanNewlines?: boolean;
|
|
15
15
|
}
|
|
16
16
|
export declare class RichTextSegment {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
text: string;
|
|
18
|
+
facet?: AppBskyRichtextFacet.Main | undefined;
|
|
19
|
+
constructor(text: string, facet?: AppBskyRichtextFacet.Main | undefined);
|
|
20
|
+
get link(): FacetLink | undefined;
|
|
21
|
+
isLink(): boolean;
|
|
22
|
+
get mention(): FacetMention | undefined;
|
|
23
|
+
isMention(): boolean;
|
|
24
24
|
}
|
|
25
25
|
export declare class RichText {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
unicodeText: UnicodeString;
|
|
27
|
+
facets?: Facet[];
|
|
28
|
+
constructor(props: RichTextProps, opts?: RichTextOpts);
|
|
29
|
+
get text(): string;
|
|
30
|
+
get length(): number;
|
|
31
|
+
get graphemeLength(): number;
|
|
32
|
+
clone(): RichText;
|
|
33
|
+
copyInto(target: RichText): void;
|
|
34
|
+
segments(): Generator<RichTextSegment, void, void>;
|
|
35
|
+
insert(insertIndex: number, insertText: string): this;
|
|
36
|
+
delete(removeStartIndex: number, removeEndIndex: number): this;
|
|
37
|
+
detectFacets(agent: AtpAgent): Promise<void>;
|
|
38
|
+
detectFacetsWithoutResolution(): void;
|
|
39
39
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { RichText } from './rich-text'
|
|
2
|
-
export declare function sanitizeRichText(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
cleanNewlines?: boolean
|
|
6
|
-
},
|
|
7
|
-
): RichText
|
|
1
|
+
import { RichText } from './rich-text';
|
|
2
|
+
export declare function sanitizeRichText(richText: RichText, opts: {
|
|
3
|
+
cleanNewlines?: boolean;
|
|
4
|
+
}): RichText;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare class UnicodeString {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
utf16: string;
|
|
3
|
+
utf8: Uint8Array;
|
|
4
|
+
private _graphemeLen?;
|
|
5
|
+
constructor(utf16: string);
|
|
6
|
+
get length(): number;
|
|
7
|
+
get graphemeLength(): number;
|
|
8
|
+
slice(start?: number, end?: number): string;
|
|
9
|
+
utf16IndexToUtf8Index(i: number): number;
|
|
10
|
+
toString(): string;
|
|
11
11
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CallOptions, Client as XrpcClient, ServiceClient as XrpcServiceClient, QueryParams, XRPCResponse } from '@atproto/xrpc';
|
|
2
|
+
import TypedEmitter from 'typed-emitter';
|
|
3
|
+
import { Client, ServiceClient } from './client';
|
|
4
|
+
export declare class SessionClient extends Client {
|
|
5
|
+
service(serviceUri: string | URL): SessionServiceClient;
|
|
6
|
+
}
|
|
7
|
+
declare const defaultInst: SessionClient;
|
|
8
|
+
export default defaultInst;
|
|
9
|
+
export declare class SessionServiceClient extends ServiceClient {
|
|
10
|
+
xrpc: SessionXrpcServiceClient;
|
|
11
|
+
sessionManager: SessionManager;
|
|
12
|
+
constructor(baseClient: Client, xrpcService: SessionXrpcServiceClient);
|
|
13
|
+
}
|
|
14
|
+
export declare class SessionXrpcServiceClient extends XrpcServiceClient {
|
|
15
|
+
sessionManager: SessionManager;
|
|
16
|
+
refreshing?: Promise<XRPCResponse>;
|
|
17
|
+
constructor(baseClient: XrpcClient, serviceUri: string | URL);
|
|
18
|
+
call(methodNsid: string, params?: QueryParams, data?: unknown, opts?: CallOptions): Promise<XRPCResponse>;
|
|
19
|
+
refresh(opts?: CallOptions): Promise<XRPCResponse>;
|
|
20
|
+
private _refresh;
|
|
21
|
+
}
|
|
22
|
+
declare const SessionManager_base: new () => TypedEmitter<SessionEvents>;
|
|
23
|
+
export declare class SessionManager extends SessionManager_base {
|
|
24
|
+
session?: Session;
|
|
25
|
+
get(): Session | undefined;
|
|
26
|
+
set(session: Session): void;
|
|
27
|
+
unset(): void;
|
|
28
|
+
active(): boolean;
|
|
29
|
+
accessHeaders(): {
|
|
30
|
+
authorization: string;
|
|
31
|
+
} | undefined;
|
|
32
|
+
refreshHeaders(): {
|
|
33
|
+
authorization: string;
|
|
34
|
+
} | undefined;
|
|
35
|
+
}
|
|
36
|
+
export declare type Session = {
|
|
37
|
+
refreshJwt: string;
|
|
38
|
+
accessJwt: string;
|
|
39
|
+
};
|
|
40
|
+
declare type SessionEvents = {
|
|
41
|
+
session: (session?: Session) => void;
|
|
42
|
+
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,46 +1,34 @@
|
|
|
1
|
-
export declare type AtpSessionEvent =
|
|
2
|
-
| 'create'
|
|
3
|
-
| 'create-failed'
|
|
4
|
-
| 'update'
|
|
5
|
-
| 'expired'
|
|
1
|
+
export declare type AtpSessionEvent = 'create' | 'create-failed' | 'update' | 'expired';
|
|
6
2
|
export interface AtpSessionData {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
refreshJwt: string;
|
|
4
|
+
accessJwt: string;
|
|
5
|
+
handle: string;
|
|
6
|
+
did: string;
|
|
7
|
+
email?: string;
|
|
12
8
|
}
|
|
13
|
-
export declare type AtpPersistSessionHandler = (
|
|
14
|
-
evt: AtpSessionEvent,
|
|
15
|
-
session: AtpSessionData | undefined,
|
|
16
|
-
) => void | Promise<void>
|
|
9
|
+
export declare type AtpPersistSessionHandler = (evt: AtpSessionEvent, session: AtpSessionData | undefined) => void | Promise<void>;
|
|
17
10
|
export interface AtpAgentOpts {
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
service: string | URL;
|
|
12
|
+
persistSession?: AtpPersistSessionHandler;
|
|
20
13
|
}
|
|
21
14
|
export interface AtpAgentCreateAccountOpts {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
email: string;
|
|
16
|
+
password: string;
|
|
17
|
+
handle: string;
|
|
18
|
+
inviteCode?: string;
|
|
26
19
|
}
|
|
27
20
|
export interface AtpAgentLoginOpts {
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
identifier: string;
|
|
22
|
+
password: string;
|
|
30
23
|
}
|
|
31
|
-
declare type AtpAgentFetchHeaders = Record<string, string
|
|
24
|
+
declare type AtpAgentFetchHeaders = Record<string, string>;
|
|
32
25
|
export interface AtpAgentFetchHandlerResponse {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
status: number;
|
|
27
|
+
headers: Record<string, string>;
|
|
28
|
+
body: any;
|
|
36
29
|
}
|
|
37
|
-
export declare type AtpAgentFetchHandler = (
|
|
38
|
-
httpUri: string,
|
|
39
|
-
httpMethod: string,
|
|
40
|
-
httpHeaders: AtpAgentFetchHeaders,
|
|
41
|
-
httpReqBody: any,
|
|
42
|
-
) => Promise<AtpAgentFetchHandlerResponse>
|
|
30
|
+
export declare type AtpAgentFetchHandler = (httpUri: string, httpMethod: string, httpHeaders: AtpAgentFetchHeaders, httpReqBody: any) => Promise<AtpAgentFetchHandlerResponse>;
|
|
43
31
|
export interface AtpAgentGlobalOpts {
|
|
44
|
-
|
|
32
|
+
fetch: AtpAgentFetchHandler;
|
|
45
33
|
}
|
|
46
|
-
export {}
|
|
34
|
+
export {};
|
package/package.json
CHANGED
package/src/client/lexicons.ts
CHANGED
|
@@ -4283,22 +4283,34 @@ export const schemaDict = {
|
|
|
4283
4283
|
},
|
|
4284
4284
|
viewNotFound: {
|
|
4285
4285
|
type: 'object',
|
|
4286
|
-
required: ['uri'],
|
|
4286
|
+
required: ['uri', 'notFound'],
|
|
4287
4287
|
properties: {
|
|
4288
4288
|
uri: {
|
|
4289
4289
|
type: 'string',
|
|
4290
4290
|
format: 'at-uri',
|
|
4291
4291
|
},
|
|
4292
|
+
notFound: {
|
|
4293
|
+
type: 'boolean',
|
|
4294
|
+
const: true,
|
|
4295
|
+
},
|
|
4292
4296
|
},
|
|
4293
4297
|
},
|
|
4294
4298
|
viewBlocked: {
|
|
4295
4299
|
type: 'object',
|
|
4296
|
-
required: ['uri'],
|
|
4300
|
+
required: ['uri', 'blocked', 'author'],
|
|
4297
4301
|
properties: {
|
|
4298
4302
|
uri: {
|
|
4299
4303
|
type: 'string',
|
|
4300
4304
|
format: 'at-uri',
|
|
4301
4305
|
},
|
|
4306
|
+
blocked: {
|
|
4307
|
+
type: 'boolean',
|
|
4308
|
+
const: true,
|
|
4309
|
+
},
|
|
4310
|
+
author: {
|
|
4311
|
+
type: 'ref',
|
|
4312
|
+
ref: 'lex:app.bsky.feed.defs#blockedAuthor',
|
|
4313
|
+
},
|
|
4302
4314
|
},
|
|
4303
4315
|
},
|
|
4304
4316
|
},
|
|
@@ -4512,7 +4524,7 @@ export const schemaDict = {
|
|
|
4512
4524
|
},
|
|
4513
4525
|
blockedPost: {
|
|
4514
4526
|
type: 'object',
|
|
4515
|
-
required: ['uri', 'blocked'],
|
|
4527
|
+
required: ['uri', 'blocked', 'author'],
|
|
4516
4528
|
properties: {
|
|
4517
4529
|
uri: {
|
|
4518
4530
|
type: 'string',
|
|
@@ -4522,6 +4534,24 @@ export const schemaDict = {
|
|
|
4522
4534
|
type: 'boolean',
|
|
4523
4535
|
const: true,
|
|
4524
4536
|
},
|
|
4537
|
+
author: {
|
|
4538
|
+
type: 'ref',
|
|
4539
|
+
ref: 'lex:app.bsky.feed.defs#blockedAuthor',
|
|
4540
|
+
},
|
|
4541
|
+
},
|
|
4542
|
+
},
|
|
4543
|
+
blockedAuthor: {
|
|
4544
|
+
type: 'object',
|
|
4545
|
+
required: ['did'],
|
|
4546
|
+
properties: {
|
|
4547
|
+
did: {
|
|
4548
|
+
type: 'string',
|
|
4549
|
+
format: 'did',
|
|
4550
|
+
},
|
|
4551
|
+
viewer: {
|
|
4552
|
+
type: 'ref',
|
|
4553
|
+
ref: 'lex:app.bsky.actor.defs#viewerState',
|
|
4554
|
+
},
|
|
4525
4555
|
},
|
|
4526
4556
|
},
|
|
4527
4557
|
generatorView: {
|
|
@@ -84,6 +84,7 @@ export function validateViewRecord(v: unknown): ValidationResult {
|
|
|
84
84
|
|
|
85
85
|
export interface ViewNotFound {
|
|
86
86
|
uri: string
|
|
87
|
+
notFound: true
|
|
87
88
|
[k: string]: unknown
|
|
88
89
|
}
|
|
89
90
|
|
|
@@ -101,6 +102,8 @@ export function validateViewNotFound(v: unknown): ValidationResult {
|
|
|
101
102
|
|
|
102
103
|
export interface ViewBlocked {
|
|
103
104
|
uri: string
|
|
105
|
+
blocked: true
|
|
106
|
+
author: AppBskyFeedDefs.BlockedAuthor
|
|
104
107
|
[k: string]: unknown
|
|
105
108
|
}
|
|
106
109
|
|
|
@@ -171,6 +171,7 @@ export function validateNotFoundPost(v: unknown): ValidationResult {
|
|
|
171
171
|
export interface BlockedPost {
|
|
172
172
|
uri: string
|
|
173
173
|
blocked: true
|
|
174
|
+
author: BlockedAuthor
|
|
174
175
|
[k: string]: unknown
|
|
175
176
|
}
|
|
176
177
|
|
|
@@ -186,6 +187,24 @@ export function validateBlockedPost(v: unknown): ValidationResult {
|
|
|
186
187
|
return lexicons.validate('app.bsky.feed.defs#blockedPost', v)
|
|
187
188
|
}
|
|
188
189
|
|
|
190
|
+
export interface BlockedAuthor {
|
|
191
|
+
did: string
|
|
192
|
+
viewer?: AppBskyActorDefs.ViewerState
|
|
193
|
+
[k: string]: unknown
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function isBlockedAuthor(v: unknown): v is BlockedAuthor {
|
|
197
|
+
return (
|
|
198
|
+
isObj(v) &&
|
|
199
|
+
hasProp(v, '$type') &&
|
|
200
|
+
v.$type === 'app.bsky.feed.defs#blockedAuthor'
|
|
201
|
+
)
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export function validateBlockedAuthor(v: unknown): ValidationResult {
|
|
205
|
+
return lexicons.validate('app.bsky.feed.defs#blockedAuthor', v)
|
|
206
|
+
}
|
|
207
|
+
|
|
189
208
|
export interface GeneratorView {
|
|
190
209
|
uri: string
|
|
191
210
|
cid: string
|
|
@@ -39,13 +39,13 @@ export interface Response {
|
|
|
39
39
|
|
|
40
40
|
export class BlockedActorError extends XRPCError {
|
|
41
41
|
constructor(src: XRPCError) {
|
|
42
|
-
super(src.status, src.error, src.message)
|
|
42
|
+
super(src.status, src.error, src.message, src.headers)
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export class BlockedByActorError extends XRPCError {
|
|
47
47
|
constructor(src: XRPCError) {
|
|
48
|
-
super(src.status, src.error, src.message)
|
|
48
|
+
super(src.status, src.error, src.message, src.headers)
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -30,13 +30,13 @@ export interface Response {
|
|
|
30
30
|
|
|
31
31
|
export class InvalidSwapError extends XRPCError {
|
|
32
32
|
constructor(src: XRPCError) {
|
|
33
|
-
super(src.status, src.error, src.message)
|
|
33
|
+
super(src.status, src.error, src.message, src.headers)
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export class ConcurrentWritesError extends XRPCError {
|
|
38
38
|
constructor(src: XRPCError) {
|
|
39
|
-
super(src.status, src.error, src.message)
|
|
39
|
+
super(src.status, src.error, src.message, src.headers)
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -30,13 +30,13 @@ export interface Response {
|
|
|
30
30
|
|
|
31
31
|
export class InvalidSwapError extends XRPCError {
|
|
32
32
|
constructor(src: XRPCError) {
|
|
33
|
-
super(src.status, src.error, src.message)
|
|
33
|
+
super(src.status, src.error, src.message, src.headers)
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export class ConcurrentWritesError extends XRPCError {
|
|
38
38
|
constructor(src: XRPCError) {
|
|
39
|
-
super(src.status, src.error, src.message)
|
|
39
|
+
super(src.status, src.error, src.message, src.headers)
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -41,43 +41,43 @@ export interface Response {
|
|
|
41
41
|
|
|
42
42
|
export class InvalidHandleError extends XRPCError {
|
|
43
43
|
constructor(src: XRPCError) {
|
|
44
|
-
super(src.status, src.error, src.message)
|
|
44
|
+
super(src.status, src.error, src.message, src.headers)
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export class InvalidPasswordError extends XRPCError {
|
|
49
49
|
constructor(src: XRPCError) {
|
|
50
|
-
super(src.status, src.error, src.message)
|
|
50
|
+
super(src.status, src.error, src.message, src.headers)
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export class InvalidInviteCodeError extends XRPCError {
|
|
55
55
|
constructor(src: XRPCError) {
|
|
56
|
-
super(src.status, src.error, src.message)
|
|
56
|
+
super(src.status, src.error, src.message, src.headers)
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export class HandleNotAvailableError extends XRPCError {
|
|
61
61
|
constructor(src: XRPCError) {
|
|
62
|
-
super(src.status, src.error, src.message)
|
|
62
|
+
super(src.status, src.error, src.message, src.headers)
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
export class UnsupportedDomainError extends XRPCError {
|
|
67
67
|
constructor(src: XRPCError) {
|
|
68
|
-
super(src.status, src.error, src.message)
|
|
68
|
+
super(src.status, src.error, src.message, src.headers)
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export class UnresolvableDidError extends XRPCError {
|
|
73
73
|
constructor(src: XRPCError) {
|
|
74
|
-
super(src.status, src.error, src.message)
|
|
74
|
+
super(src.status, src.error, src.message, src.headers)
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export class IncompatibleDidDocError extends XRPCError {
|
|
79
79
|
constructor(src: XRPCError) {
|
|
80
|
-
super(src.status, src.error, src.message)
|
|
80
|
+
super(src.status, src.error, src.message, src.headers)
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -29,13 +29,13 @@ export interface Response {
|
|
|
29
29
|
|
|
30
30
|
export class ExpiredTokenError extends XRPCError {
|
|
31
31
|
constructor(src: XRPCError) {
|
|
32
|
-
super(src.status, src.error, src.message)
|
|
32
|
+
super(src.status, src.error, src.message, src.headers)
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export class InvalidTokenError extends XRPCError {
|
|
37
37
|
constructor(src: XRPCError) {
|
|
38
|
-
super(src.status, src.error, src.message)
|
|
38
|
+
super(src.status, src.error, src.message, src.headers)
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|