@atproto/api 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.d.ts +27 -0
- package/dist/client/lexicons.d.ts +104 -0
- package/dist/client/types/app/bsky/actor/defs.d.ts +2 -0
- package/dist/client/types/app/bsky/embed/record.d.ts +7 -1
- package/dist/client/types/app/bsky/feed/defs.d.ts +9 -2
- package/dist/client/types/app/bsky/feed/getAuthorFeed.d.ts +7 -1
- package/dist/client/types/app/bsky/feed/getPostThread.d.ts +1 -1
- package/dist/client/types/app/bsky/graph/block.d.ts +8 -0
- package/dist/client/types/app/bsky/graph/getBlocks.d.ts +21 -0
- package/dist/index.js +249 -36
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/src/client/index.ts +78 -0
- package/src/client/lexicons.ts +113 -0
- package/src/client/types/app/bsky/actor/defs.ts +2 -0
- package/src/client/types/app/bsky/embed/record.ts +22 -1
- package/src/client/types/app/bsky/feed/defs.ts +20 -0
- package/src/client/types/app/bsky/feed/getAuthorFeed.ts +14 -0
- package/src/client/types/app/bsky/feed/getPostThread.ts +1 -0
- package/src/client/types/app/bsky/graph/block.ts +26 -0
- package/src/client/types/app/bsky/graph/getBlocks.ts +38 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/dist/client/index.d.ts
CHANGED
|
@@ -67,7 +67,9 @@ import * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline';
|
|
|
67
67
|
import * as AppBskyFeedLike from './types/app/bsky/feed/like';
|
|
68
68
|
import * as AppBskyFeedPost from './types/app/bsky/feed/post';
|
|
69
69
|
import * as AppBskyFeedRepost from './types/app/bsky/feed/repost';
|
|
70
|
+
import * as AppBskyGraphBlock from './types/app/bsky/graph/block';
|
|
70
71
|
import * as AppBskyGraphFollow from './types/app/bsky/graph/follow';
|
|
72
|
+
import * as AppBskyGraphGetBlocks from './types/app/bsky/graph/getBlocks';
|
|
71
73
|
import * as AppBskyGraphGetFollowers from './types/app/bsky/graph/getFollowers';
|
|
72
74
|
import * as AppBskyGraphGetFollows from './types/app/bsky/graph/getFollows';
|
|
73
75
|
import * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes';
|
|
@@ -158,7 +160,9 @@ export * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline';
|
|
|
158
160
|
export * as AppBskyFeedLike from './types/app/bsky/feed/like';
|
|
159
161
|
export * as AppBskyFeedPost from './types/app/bsky/feed/post';
|
|
160
162
|
export * as AppBskyFeedRepost from './types/app/bsky/feed/repost';
|
|
163
|
+
export * as AppBskyGraphBlock from './types/app/bsky/graph/block';
|
|
161
164
|
export * as AppBskyGraphFollow from './types/app/bsky/graph/follow';
|
|
165
|
+
export * as AppBskyGraphGetBlocks from './types/app/bsky/graph/getBlocks';
|
|
162
166
|
export * as AppBskyGraphGetFollowers from './types/app/bsky/graph/getFollowers';
|
|
163
167
|
export * as AppBskyGraphGetFollows from './types/app/bsky/graph/getFollows';
|
|
164
168
|
export * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes';
|
|
@@ -421,14 +425,37 @@ export declare class RepostRecord {
|
|
|
421
425
|
}
|
|
422
426
|
export declare class GraphNS {
|
|
423
427
|
_service: AtpServiceClient;
|
|
428
|
+
block: BlockRecord;
|
|
424
429
|
follow: FollowRecord;
|
|
425
430
|
constructor(service: AtpServiceClient);
|
|
431
|
+
getBlocks(params?: AppBskyGraphGetBlocks.QueryParams, opts?: AppBskyGraphGetBlocks.CallOptions): Promise<AppBskyGraphGetBlocks.Response>;
|
|
426
432
|
getFollowers(params?: AppBskyGraphGetFollowers.QueryParams, opts?: AppBskyGraphGetFollowers.CallOptions): Promise<AppBskyGraphGetFollowers.Response>;
|
|
427
433
|
getFollows(params?: AppBskyGraphGetFollows.QueryParams, opts?: AppBskyGraphGetFollows.CallOptions): Promise<AppBskyGraphGetFollows.Response>;
|
|
428
434
|
getMutes(params?: AppBskyGraphGetMutes.QueryParams, opts?: AppBskyGraphGetMutes.CallOptions): Promise<AppBskyGraphGetMutes.Response>;
|
|
429
435
|
muteActor(data?: AppBskyGraphMuteActor.InputSchema, opts?: AppBskyGraphMuteActor.CallOptions): Promise<AppBskyGraphMuteActor.Response>;
|
|
430
436
|
unmuteActor(data?: AppBskyGraphUnmuteActor.InputSchema, opts?: AppBskyGraphUnmuteActor.CallOptions): Promise<AppBskyGraphUnmuteActor.Response>;
|
|
431
437
|
}
|
|
438
|
+
export declare class BlockRecord {
|
|
439
|
+
_service: AtpServiceClient;
|
|
440
|
+
constructor(service: AtpServiceClient);
|
|
441
|
+
list(params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>): Promise<{
|
|
442
|
+
cursor?: string;
|
|
443
|
+
records: {
|
|
444
|
+
uri: string;
|
|
445
|
+
value: AppBskyGraphBlock.Record;
|
|
446
|
+
}[];
|
|
447
|
+
}>;
|
|
448
|
+
get(params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>): Promise<{
|
|
449
|
+
uri: string;
|
|
450
|
+
cid: string;
|
|
451
|
+
value: AppBskyGraphBlock.Record;
|
|
452
|
+
}>;
|
|
453
|
+
create(params: Omit<ComAtprotoRepoCreateRecord.InputSchema, 'collection' | 'record'>, record: AppBskyGraphBlock.Record, headers?: Record<string, string>): Promise<{
|
|
454
|
+
uri: string;
|
|
455
|
+
cid: string;
|
|
456
|
+
}>;
|
|
457
|
+
delete(params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>, headers?: Record<string, string>): Promise<void>;
|
|
458
|
+
}
|
|
432
459
|
export declare class FollowRecord {
|
|
433
460
|
_service: AtpServiceClient;
|
|
434
461
|
constructor(service: AtpServiceClient);
|
|
@@ -3169,6 +3169,13 @@ export declare const schemaDict: {
|
|
|
3169
3169
|
muted: {
|
|
3170
3170
|
type: string;
|
|
3171
3171
|
};
|
|
3172
|
+
blockedBy: {
|
|
3173
|
+
type: string;
|
|
3174
|
+
};
|
|
3175
|
+
blocking: {
|
|
3176
|
+
type: string;
|
|
3177
|
+
format: string;
|
|
3178
|
+
};
|
|
3172
3179
|
following: {
|
|
3173
3180
|
type: string;
|
|
3174
3181
|
format: string;
|
|
@@ -3615,6 +3622,16 @@ export declare const schemaDict: {
|
|
|
3615
3622
|
};
|
|
3616
3623
|
};
|
|
3617
3624
|
};
|
|
3625
|
+
viewBlocked: {
|
|
3626
|
+
type: string;
|
|
3627
|
+
required: string[];
|
|
3628
|
+
properties: {
|
|
3629
|
+
uri: {
|
|
3630
|
+
type: string;
|
|
3631
|
+
format: string;
|
|
3632
|
+
};
|
|
3633
|
+
};
|
|
3634
|
+
};
|
|
3618
3635
|
};
|
|
3619
3636
|
};
|
|
3620
3637
|
AppBskyEmbedRecordWithMedia: {
|
|
@@ -3799,6 +3816,20 @@ export declare const schemaDict: {
|
|
|
3799
3816
|
};
|
|
3800
3817
|
};
|
|
3801
3818
|
};
|
|
3819
|
+
blockedPost: {
|
|
3820
|
+
type: string;
|
|
3821
|
+
required: string[];
|
|
3822
|
+
properties: {
|
|
3823
|
+
uri: {
|
|
3824
|
+
type: string;
|
|
3825
|
+
format: string;
|
|
3826
|
+
};
|
|
3827
|
+
blocked: {
|
|
3828
|
+
type: string;
|
|
3829
|
+
const: boolean;
|
|
3830
|
+
};
|
|
3831
|
+
};
|
|
3832
|
+
};
|
|
3802
3833
|
};
|
|
3803
3834
|
};
|
|
3804
3835
|
AppBskyFeedGetAuthorFeed: {
|
|
@@ -3846,6 +3877,9 @@ export declare const schemaDict: {
|
|
|
3846
3877
|
};
|
|
3847
3878
|
};
|
|
3848
3879
|
};
|
|
3880
|
+
errors: {
|
|
3881
|
+
name: string;
|
|
3882
|
+
}[];
|
|
3849
3883
|
};
|
|
3850
3884
|
};
|
|
3851
3885
|
};
|
|
@@ -4252,6 +4286,31 @@ export declare const schemaDict: {
|
|
|
4252
4286
|
};
|
|
4253
4287
|
};
|
|
4254
4288
|
};
|
|
4289
|
+
AppBskyGraphBlock: {
|
|
4290
|
+
lexicon: number;
|
|
4291
|
+
id: string;
|
|
4292
|
+
defs: {
|
|
4293
|
+
main: {
|
|
4294
|
+
type: string;
|
|
4295
|
+
description: string;
|
|
4296
|
+
key: string;
|
|
4297
|
+
record: {
|
|
4298
|
+
type: string;
|
|
4299
|
+
required: string[];
|
|
4300
|
+
properties: {
|
|
4301
|
+
subject: {
|
|
4302
|
+
type: string;
|
|
4303
|
+
format: string;
|
|
4304
|
+
};
|
|
4305
|
+
createdAt: {
|
|
4306
|
+
type: string;
|
|
4307
|
+
format: string;
|
|
4308
|
+
};
|
|
4309
|
+
};
|
|
4310
|
+
};
|
|
4311
|
+
};
|
|
4312
|
+
};
|
|
4313
|
+
};
|
|
4255
4314
|
AppBskyGraphFollow: {
|
|
4256
4315
|
lexicon: number;
|
|
4257
4316
|
id: string;
|
|
@@ -4277,6 +4336,49 @@ export declare const schemaDict: {
|
|
|
4277
4336
|
};
|
|
4278
4337
|
};
|
|
4279
4338
|
};
|
|
4339
|
+
AppBskyGraphGetBlocks: {
|
|
4340
|
+
lexicon: number;
|
|
4341
|
+
id: string;
|
|
4342
|
+
defs: {
|
|
4343
|
+
main: {
|
|
4344
|
+
type: string;
|
|
4345
|
+
description: string;
|
|
4346
|
+
parameters: {
|
|
4347
|
+
type: string;
|
|
4348
|
+
properties: {
|
|
4349
|
+
limit: {
|
|
4350
|
+
type: string;
|
|
4351
|
+
minimum: number;
|
|
4352
|
+
maximum: number;
|
|
4353
|
+
default: number;
|
|
4354
|
+
};
|
|
4355
|
+
cursor: {
|
|
4356
|
+
type: string;
|
|
4357
|
+
};
|
|
4358
|
+
};
|
|
4359
|
+
};
|
|
4360
|
+
output: {
|
|
4361
|
+
encoding: string;
|
|
4362
|
+
schema: {
|
|
4363
|
+
type: string;
|
|
4364
|
+
required: string[];
|
|
4365
|
+
properties: {
|
|
4366
|
+
cursor: {
|
|
4367
|
+
type: string;
|
|
4368
|
+
};
|
|
4369
|
+
blocks: {
|
|
4370
|
+
type: string;
|
|
4371
|
+
items: {
|
|
4372
|
+
type: string;
|
|
4373
|
+
ref: string;
|
|
4374
|
+
};
|
|
4375
|
+
};
|
|
4376
|
+
};
|
|
4377
|
+
};
|
|
4378
|
+
};
|
|
4379
|
+
};
|
|
4380
|
+
};
|
|
4381
|
+
};
|
|
4280
4382
|
AppBskyGraphGetFollowers: {
|
|
4281
4383
|
lexicon: number;
|
|
4282
4384
|
id: string;
|
|
@@ -4801,7 +4903,9 @@ export declare const ids: {
|
|
|
4801
4903
|
AppBskyFeedLike: string;
|
|
4802
4904
|
AppBskyFeedPost: string;
|
|
4803
4905
|
AppBskyFeedRepost: string;
|
|
4906
|
+
AppBskyGraphBlock: string;
|
|
4804
4907
|
AppBskyGraphFollow: string;
|
|
4908
|
+
AppBskyGraphGetBlocks: string;
|
|
4805
4909
|
AppBskyGraphGetFollowers: string;
|
|
4806
4910
|
AppBskyGraphGetFollows: string;
|
|
4807
4911
|
AppBskyGraphGetMutes: string;
|
|
@@ -43,6 +43,8 @@ export declare function isProfileViewDetailed(v: unknown): v is ProfileViewDetai
|
|
|
43
43
|
export declare function validateProfileViewDetailed(v: unknown): ValidationResult;
|
|
44
44
|
export interface ViewerState {
|
|
45
45
|
muted?: boolean;
|
|
46
|
+
blockedBy?: boolean;
|
|
47
|
+
blocking?: string;
|
|
46
48
|
following?: string;
|
|
47
49
|
followedBy?: string;
|
|
48
50
|
[k: string]: unknown;
|
|
@@ -12,7 +12,7 @@ export interface Main {
|
|
|
12
12
|
export declare function isMain(v: unknown): v is Main;
|
|
13
13
|
export declare function validateMain(v: unknown): ValidationResult;
|
|
14
14
|
export interface View {
|
|
15
|
-
record: ViewRecord | ViewNotFound | {
|
|
15
|
+
record: ViewRecord | ViewNotFound | ViewBlocked | {
|
|
16
16
|
$type: string;
|
|
17
17
|
[k: string]: unknown;
|
|
18
18
|
};
|
|
@@ -41,3 +41,9 @@ export interface ViewNotFound {
|
|
|
41
41
|
}
|
|
42
42
|
export declare function isViewNotFound(v: unknown): v is ViewNotFound;
|
|
43
43
|
export declare function validateViewNotFound(v: unknown): ValidationResult;
|
|
44
|
+
export interface ViewBlocked {
|
|
45
|
+
uri: string;
|
|
46
|
+
[k: string]: unknown;
|
|
47
|
+
}
|
|
48
|
+
export declare function isViewBlocked(v: unknown): v is ViewBlocked;
|
|
49
|
+
export declare function validateViewBlocked(v: unknown): ValidationResult;
|
|
@@ -58,11 +58,11 @@ export declare function isReasonRepost(v: unknown): v is ReasonRepost;
|
|
|
58
58
|
export declare function validateReasonRepost(v: unknown): ValidationResult;
|
|
59
59
|
export interface ThreadViewPost {
|
|
60
60
|
post: PostView;
|
|
61
|
-
parent?: ThreadViewPost | NotFoundPost | {
|
|
61
|
+
parent?: ThreadViewPost | NotFoundPost | BlockedPost | {
|
|
62
62
|
$type: string;
|
|
63
63
|
[k: string]: unknown;
|
|
64
64
|
};
|
|
65
|
-
replies?: (ThreadViewPost | NotFoundPost | {
|
|
65
|
+
replies?: (ThreadViewPost | NotFoundPost | BlockedPost | {
|
|
66
66
|
$type: string;
|
|
67
67
|
[k: string]: unknown;
|
|
68
68
|
})[];
|
|
@@ -77,3 +77,10 @@ export interface NotFoundPost {
|
|
|
77
77
|
}
|
|
78
78
|
export declare function isNotFoundPost(v: unknown): v is NotFoundPost;
|
|
79
79
|
export declare function validateNotFoundPost(v: unknown): ValidationResult;
|
|
80
|
+
export interface BlockedPost {
|
|
81
|
+
uri: string;
|
|
82
|
+
blocked: true;
|
|
83
|
+
[k: string]: unknown;
|
|
84
|
+
}
|
|
85
|
+
export declare function isBlockedPost(v: unknown): v is BlockedPost;
|
|
86
|
+
export declare function validateBlockedPost(v: unknown): ValidationResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Headers } from '@atproto/xrpc';
|
|
1
|
+
import { Headers, XRPCError } from '@atproto/xrpc';
|
|
2
2
|
import * as AppBskyFeedDefs from './defs';
|
|
3
3
|
export interface QueryParams {
|
|
4
4
|
actor: string;
|
|
@@ -19,4 +19,10 @@ export interface Response {
|
|
|
19
19
|
headers: Headers;
|
|
20
20
|
data: OutputSchema;
|
|
21
21
|
}
|
|
22
|
+
export declare class BlockedActorError extends XRPCError {
|
|
23
|
+
constructor(src: XRPCError);
|
|
24
|
+
}
|
|
25
|
+
export declare class BlockedByActorError extends XRPCError {
|
|
26
|
+
constructor(src: XRPCError);
|
|
27
|
+
}
|
|
22
28
|
export declare function toKnownErr(e: any): any;
|
|
@@ -6,7 +6,7 @@ export interface QueryParams {
|
|
|
6
6
|
}
|
|
7
7
|
export declare type InputSchema = undefined;
|
|
8
8
|
export interface OutputSchema {
|
|
9
|
-
thread: AppBskyFeedDefs.ThreadViewPost | AppBskyFeedDefs.NotFoundPost | {
|
|
9
|
+
thread: AppBskyFeedDefs.ThreadViewPost | AppBskyFeedDefs.NotFoundPost | AppBskyFeedDefs.BlockedPost | {
|
|
10
10
|
$type: string;
|
|
11
11
|
[k: string]: unknown;
|
|
12
12
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon';
|
|
2
|
+
export interface Record {
|
|
3
|
+
subject: string;
|
|
4
|
+
createdAt: string;
|
|
5
|
+
[k: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
export declare function isRecord(v: unknown): v is Record;
|
|
8
|
+
export declare function validateRecord(v: unknown): ValidationResult;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
import * as AppBskyActorDefs from '../actor/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
|
+
blocks: 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;
|