@atproto/api 0.5.3 → 0.5.5
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/README.md +11 -3
- package/dist/agent.d.ts +44 -25
- package/dist/bsky-agent.d.ts +62 -43
- package/dist/client/lexicons.d.ts +48 -0
- package/dist/client/types/app/bsky/actor/defs.d.ts +74 -65
- package/dist/client/types/app/bsky/actor/profile.d.ts +5 -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 +53 -41
- package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +26 -20
- package/dist/client/types/app/bsky/feed/defs.d.ts +141 -107
- package/dist/client/types/app/bsky/feed/generator.d.ts +5 -0
- package/dist/client/types/app/bsky/feed/getAuthorFeed.d.ts +1 -0
- package/dist/client/types/app/bsky/feed/like.d.ts +7 -7
- package/dist/client/types/app/bsky/feed/post.d.ts +5 -0
- package/dist/client/types/app/bsky/feed/repost.d.ts +7 -7
- package/dist/client/types/app/bsky/graph/block.d.ts +6 -6
- 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/list.d.ts +5 -0
- package/dist/client/types/app/bsky/graph/listitem.d.ts +7 -7
- package/dist/client/types/app/bsky/richtext/facet.d.ts +26 -22
- package/dist/client/types/com/atproto/label/defs.d.ts +12 -0
- package/dist/client/types/com/atproto/label/subscribeLabels.d.ts +12 -12
- package/dist/client/types/com/atproto/moderation/defs.d.ts +16 -7
- package/dist/client/types/com/atproto/repo/strongRef.d.ts +6 -6
- package/dist/client/types/com/atproto/server/defs.d.ts +16 -16
- package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +46 -46
- package/dist/client/util.d.ts +5 -2
- package/dist/index.js +94 -22
- package/dist/index.js.map +2 -2
- package/dist/moderation/types.d.ts +7 -3
- package/dist/moderation/util.d.ts +1 -3
- 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 +7 -4
- package/dist/rich-text/unicode.d.ts +9 -9
- package/dist/types.d.ts +34 -22
- package/docs/moderation.md +14 -5
- package/package.json +1 -1
- package/src/client/lexicons.ts +55 -0
- package/src/client/types/app/bsky/actor/profile.ts +4 -0
- package/src/client/types/app/bsky/feed/generator.ts +4 -0
- package/src/client/types/app/bsky/feed/getAuthorFeed.ts +5 -0
- package/src/client/types/app/bsky/feed/post.ts +4 -0
- package/src/client/types/app/bsky/graph/list.ts +4 -0
- package/src/client/types/com/atproto/label/defs.ts +37 -0
- package/src/moderation/accumulator.ts +17 -12
- package/src/moderation/types.ts +5 -3
- package/tests/moderation.test.ts +334 -0
- package/tests/util/moderation-behavior.ts +3 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/client/types/app/bsky/actor/createScene.d.ts +0 -32
- package/dist/client/types/app/bsky/actor/ref.d.ts +0 -28
- package/dist/client/types/app/bsky/actor/search.d.ts +0 -22
- package/dist/client/types/app/bsky/actor/searchTypeahead.d.ts +0 -20
- package/dist/client/types/app/bsky/actor/updateProfile.d.ts +0 -40
- package/dist/client/types/app/bsky/feed/feedViewPost.d.ts +0 -28
- package/dist/client/types/app/bsky/feed/getSavedFeeds.d.ts +0 -21
- package/dist/client/types/app/bsky/feed/getVotes.d.ts +0 -36
- package/dist/client/types/app/bsky/feed/saveFeed.d.ts +0 -17
- package/dist/client/types/app/bsky/feed/setVote.d.ts +0 -25
- package/dist/client/types/app/bsky/feed/trend.d.ts +0 -9
- package/dist/client/types/app/bsky/feed/unsaveFeed.d.ts +0 -17
- package/dist/client/types/app/bsky/feed/vote.d.ts +0 -10
- package/dist/client/types/app/bsky/graph/assertCreator.d.ts +0 -1
- package/dist/client/types/app/bsky/graph/assertMember.d.ts +0 -1
- package/dist/client/types/app/bsky/graph/assertion.d.ts +0 -10
- package/dist/client/types/app/bsky/graph/confirmation.d.ts +0 -11
- package/dist/client/types/app/bsky/graph/getAssertions.d.ts +0 -48
- package/dist/client/types/app/bsky/graph/getListBlocks.d.ts +0 -21
- package/dist/client/types/app/bsky/graph/getMembers.d.ts +0 -36
- package/dist/client/types/app/bsky/graph/getMemberships.d.ts +0 -36
- package/dist/client/types/app/bsky/graph/listblock.d.ts +0 -8
- package/dist/client/types/app/bsky/graph/mute.d.ts +0 -17
- package/dist/client/types/app/bsky/graph/subscribeMuteList.d.ts +0 -17
- package/dist/client/types/app/bsky/graph/unmute.d.ts +0 -17
- package/dist/client/types/app/bsky/graph/unsubscribeMuteList.d.ts +0 -17
- package/dist/client/types/app/bsky/notification/getCount.d.ts +0 -17
- package/dist/client/types/app/bsky/notification/list.d.ts +0 -35
- package/dist/client/types/app/bsky/system/actorScene.d.ts +0 -1
- package/dist/client/types/app/bsky/system/actorUser.d.ts +0 -1
- package/dist/client/types/app/bsky/system/declRef.d.ts +0 -8
- package/dist/client/types/app/bsky/system/declaration.d.ts +0 -7
- package/dist/client/types/com/atproto/account/create.d.ts +0 -41
- package/dist/client/types/com/atproto/account/createInviteCode.d.ts +0 -22
- package/dist/client/types/com/atproto/account/delete.d.ts +0 -25
- package/dist/client/types/com/atproto/account/get.d.ts +0 -12
- package/dist/client/types/com/atproto/account/requestDelete.d.ts +0 -13
- package/dist/client/types/com/atproto/account/requestPasswordReset.d.ts +0 -17
- package/dist/client/types/com/atproto/account/resetPassword.d.ts +0 -24
- package/dist/client/types/com/atproto/admin/blob.d.ts +0 -37
- package/dist/client/types/com/atproto/admin/moderationAction.d.ts +0 -60
- package/dist/client/types/com/atproto/admin/moderationReport.d.ts +0 -37
- package/dist/client/types/com/atproto/admin/record.d.ts +0 -43
- package/dist/client/types/com/atproto/admin/repo.d.ts +0 -45
- package/dist/client/types/com/atproto/blob/upload.d.ts +0 -19
- package/dist/client/types/com/atproto/handle/resolve.d.ts +0 -18
- package/dist/client/types/com/atproto/handle/update.d.ts +0 -17
- package/dist/client/types/com/atproto/repo/batchWrite.d.ts +0 -46
- package/dist/client/types/com/atproto/repo/describe.d.ts +0 -22
- package/dist/client/types/com/atproto/repo/recordRef.d.ts +0 -8
- package/dist/client/types/com/atproto/repo/repoRef.d.ts +0 -7
- package/dist/client/types/com/atproto/report/create.d.ts +0 -39
- package/dist/client/types/com/atproto/report/reasonType.d.ts +0 -3
- package/dist/client/types/com/atproto/report/subject.d.ts +0 -23
- package/dist/client/types/com/atproto/server/getAccountsConfig.d.ts +0 -27
- package/dist/client/types/com/atproto/session/create.d.ts +0 -29
- package/dist/client/types/com/atproto/session/delete.d.ts +0 -13
- package/dist/client/types/com/atproto/session/get.d.ts +0 -18
- package/dist/client/types/com/atproto/session/refresh.d.ts +0 -24
- package/dist/client/types/com/atproto/sync/getRoot.d.ts +0 -18
- package/dist/client/types/com/atproto/sync/subscribeAllRepos.d.ts +0 -9
- package/dist/client/types/com/atproto/sync/updateRepo.d.ts +0 -15
- package/dist/helpers/bsky.d.ts +0 -20
- package/dist/mixins/bsky.d.ts +0 -23
- package/dist/rich-text/sanitize.d.ts +0 -4
- package/dist/session.d.ts +0 -42
package/README.md
CHANGED
|
@@ -222,14 +222,22 @@ function getOpts() {
|
|
|
222
222
|
// is adult content allowed?
|
|
223
223
|
adultContentEnabled: true,
|
|
224
224
|
|
|
225
|
-
// the
|
|
226
|
-
|
|
225
|
+
// the global label settings (used on self-labels)
|
|
226
|
+
labels: {
|
|
227
|
+
porn: 'hide',
|
|
228
|
+
sexual: 'warn',
|
|
229
|
+
nudity: 'ignore',
|
|
230
|
+
// ...
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
// the per-labeler settings
|
|
234
|
+
labelers: [
|
|
227
235
|
{
|
|
228
236
|
labeler: {
|
|
229
237
|
did: '...',
|
|
230
238
|
displayName: 'My mod service'
|
|
231
239
|
},
|
|
232
|
-
|
|
240
|
+
labels: {
|
|
233
241
|
porn: 'hide',
|
|
234
242
|
sexual: 'warn',
|
|
235
243
|
nudity: 'ignore',
|
package/dist/agent.d.ts
CHANGED
|
@@ -1,27 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
AtpServiceClient,
|
|
3
|
+
ComAtprotoServerCreateAccount,
|
|
4
|
+
ComAtprotoServerCreateSession,
|
|
5
|
+
ComAtprotoServerGetSession,
|
|
6
|
+
} from './client'
|
|
7
|
+
import {
|
|
8
|
+
AtpSessionData,
|
|
9
|
+
AtpAgentCreateAccountOpts,
|
|
10
|
+
AtpAgentLoginOpts,
|
|
11
|
+
AtpAgentFetchHandler,
|
|
12
|
+
AtpAgentGlobalOpts,
|
|
13
|
+
AtpPersistSessionHandler,
|
|
14
|
+
AtpAgentOpts,
|
|
15
|
+
} from './types'
|
|
3
16
|
export declare class AtpAgent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
service: URL
|
|
18
|
+
api: AtpServiceClient
|
|
19
|
+
session?: AtpSessionData
|
|
20
|
+
private _baseClient
|
|
21
|
+
private _persistSession?
|
|
22
|
+
private _refreshSessionPromise
|
|
23
|
+
get com(): import('./client').ComNS
|
|
24
|
+
static fetch: AtpAgentFetchHandler | undefined
|
|
25
|
+
static configure(opts: AtpAgentGlobalOpts): void
|
|
26
|
+
constructor(opts: AtpAgentOpts)
|
|
27
|
+
get hasSession(): boolean
|
|
28
|
+
setPersistSessionHandler(handler?: AtpPersistSessionHandler): void
|
|
29
|
+
createAccount(
|
|
30
|
+
opts: AtpAgentCreateAccountOpts,
|
|
31
|
+
): Promise<ComAtprotoServerCreateAccount.Response>
|
|
32
|
+
login(
|
|
33
|
+
opts: AtpAgentLoginOpts,
|
|
34
|
+
): Promise<ComAtprotoServerCreateSession.Response>
|
|
35
|
+
resumeSession(
|
|
36
|
+
session: AtpSessionData,
|
|
37
|
+
): Promise<ComAtprotoServerGetSession.Response>
|
|
38
|
+
private _addAuthHeader
|
|
39
|
+
private _fetch
|
|
40
|
+
private _refreshSession
|
|
41
|
+
private _refreshSessionInner
|
|
42
|
+
uploadBlob: typeof this.api.com.atproto.repo.uploadBlob
|
|
43
|
+
resolveHandle: typeof this.api.com.atproto.identity.resolveHandle
|
|
44
|
+
updateHandle: typeof this.api.com.atproto.identity.updateHandle
|
|
45
|
+
createModerationReport: typeof this.api.com.atproto.moderation.createReport
|
|
27
46
|
}
|
package/dist/bsky-agent.d.ts
CHANGED
|
@@ -1,45 +1,64 @@
|
|
|
1
|
-
import { AtpAgent } from './agent'
|
|
2
|
-
import { AppBskyFeedPost, AppBskyActorProfile } from './client'
|
|
1
|
+
import { AtpAgent } from './agent'
|
|
2
|
+
import { AppBskyFeedPost, AppBskyActorProfile } from './client'
|
|
3
3
|
export declare class BskyAgent extends AtpAgent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
+
getPosts: typeof this.api.app.bsky.feed.getPosts
|
|
10
|
+
getLikes: typeof this.api.app.bsky.feed.getLikes
|
|
11
|
+
getRepostedBy: typeof this.api.app.bsky.feed.getRepostedBy
|
|
12
|
+
getFollows: typeof this.api.app.bsky.graph.getFollows
|
|
13
|
+
getFollowers: typeof this.api.app.bsky.graph.getFollowers
|
|
14
|
+
getProfile: typeof this.api.app.bsky.actor.getProfile
|
|
15
|
+
getProfiles: typeof this.api.app.bsky.actor.getProfiles
|
|
16
|
+
getSuggestions: typeof this.api.app.bsky.actor.getSuggestions
|
|
17
|
+
searchActors: typeof this.api.app.bsky.actor.searchActors
|
|
18
|
+
searchActorsTypeahead: typeof this.api.app.bsky.actor.searchActorsTypeahead
|
|
19
|
+
listNotifications: typeof this.api.app.bsky.notification.listNotifications
|
|
20
|
+
countUnreadNotifications: typeof this.api.app.bsky.notification.getUnreadCount
|
|
21
|
+
post(
|
|
22
|
+
record: Partial<AppBskyFeedPost.Record> &
|
|
23
|
+
Omit<AppBskyFeedPost.Record, 'createdAt'>,
|
|
24
|
+
): Promise<{
|
|
25
|
+
uri: string
|
|
26
|
+
cid: string
|
|
27
|
+
}>
|
|
28
|
+
deletePost(postUri: string): Promise<void>
|
|
29
|
+
like(
|
|
30
|
+
uri: string,
|
|
31
|
+
cid: string,
|
|
32
|
+
): Promise<{
|
|
33
|
+
uri: string
|
|
34
|
+
cid: string
|
|
35
|
+
}>
|
|
36
|
+
deleteLike(likeUri: string): Promise<void>
|
|
37
|
+
repost(
|
|
38
|
+
uri: string,
|
|
39
|
+
cid: string,
|
|
40
|
+
): Promise<{
|
|
41
|
+
uri: string
|
|
42
|
+
cid: string
|
|
43
|
+
}>
|
|
44
|
+
deleteRepost(repostUri: string): Promise<void>
|
|
45
|
+
follow(subjectDid: string): Promise<{
|
|
46
|
+
uri: string
|
|
47
|
+
cid: string
|
|
48
|
+
}>
|
|
49
|
+
deleteFollow(followUri: string): Promise<void>
|
|
50
|
+
upsertProfile(
|
|
51
|
+
updateFn: (
|
|
52
|
+
existing: AppBskyActorProfile.Record | undefined,
|
|
53
|
+
) => AppBskyActorProfile.Record | Promise<AppBskyActorProfile.Record>,
|
|
54
|
+
): Promise<void>
|
|
55
|
+
mute(
|
|
56
|
+
actor: string,
|
|
57
|
+
): Promise<import('./client/types/app/bsky/graph/muteActor').Response>
|
|
58
|
+
unmute(
|
|
59
|
+
actor: string,
|
|
60
|
+
): Promise<import('./client/types/app/bsky/graph/unmuteActor').Response>
|
|
61
|
+
updateSeenNotifications(
|
|
62
|
+
seenAt?: string,
|
|
63
|
+
): Promise<import('./client/types/app/bsky/notification/updateSeen').Response>
|
|
45
64
|
}
|
|
@@ -1315,6 +1315,33 @@ export declare const schemaDict: {
|
|
|
1315
1315
|
};
|
|
1316
1316
|
};
|
|
1317
1317
|
};
|
|
1318
|
+
selfLabels: {
|
|
1319
|
+
type: string;
|
|
1320
|
+
description: string;
|
|
1321
|
+
required: string[];
|
|
1322
|
+
properties: {
|
|
1323
|
+
values: {
|
|
1324
|
+
type: string;
|
|
1325
|
+
items: {
|
|
1326
|
+
type: string;
|
|
1327
|
+
ref: string;
|
|
1328
|
+
};
|
|
1329
|
+
maxLength: number;
|
|
1330
|
+
};
|
|
1331
|
+
};
|
|
1332
|
+
};
|
|
1333
|
+
selfLabel: {
|
|
1334
|
+
type: string;
|
|
1335
|
+
description: string;
|
|
1336
|
+
required: string[];
|
|
1337
|
+
properties: {
|
|
1338
|
+
val: {
|
|
1339
|
+
type: string;
|
|
1340
|
+
maxLength: number;
|
|
1341
|
+
description: string;
|
|
1342
|
+
};
|
|
1343
|
+
};
|
|
1344
|
+
};
|
|
1318
1345
|
};
|
|
1319
1346
|
};
|
|
1320
1347
|
ComAtprotoLabelQueryLabels: {
|
|
@@ -3653,6 +3680,10 @@ export declare const schemaDict: {
|
|
|
3653
3680
|
accept: string[];
|
|
3654
3681
|
maxSize: number;
|
|
3655
3682
|
};
|
|
3683
|
+
labels: {
|
|
3684
|
+
type: string;
|
|
3685
|
+
refs: string[];
|
|
3686
|
+
};
|
|
3656
3687
|
};
|
|
3657
3688
|
};
|
|
3658
3689
|
};
|
|
@@ -4360,6 +4391,10 @@ export declare const schemaDict: {
|
|
|
4360
4391
|
accept: string[];
|
|
4361
4392
|
maxSize: number;
|
|
4362
4393
|
};
|
|
4394
|
+
labels: {
|
|
4395
|
+
type: string;
|
|
4396
|
+
refs: string[];
|
|
4397
|
+
};
|
|
4363
4398
|
createdAt: {
|
|
4364
4399
|
type: string;
|
|
4365
4400
|
format: string;
|
|
@@ -4441,6 +4476,11 @@ export declare const schemaDict: {
|
|
|
4441
4476
|
cursor: {
|
|
4442
4477
|
type: string;
|
|
4443
4478
|
};
|
|
4479
|
+
filter: {
|
|
4480
|
+
type: string;
|
|
4481
|
+
knownValues: string[];
|
|
4482
|
+
default: string;
|
|
4483
|
+
};
|
|
4444
4484
|
};
|
|
4445
4485
|
};
|
|
4446
4486
|
output: {
|
|
@@ -4988,6 +5028,10 @@ export declare const schemaDict: {
|
|
|
4988
5028
|
format: string;
|
|
4989
5029
|
};
|
|
4990
5030
|
};
|
|
5031
|
+
labels: {
|
|
5032
|
+
type: string;
|
|
5033
|
+
refs: string[];
|
|
5034
|
+
};
|
|
4991
5035
|
createdAt: {
|
|
4992
5036
|
type: string;
|
|
4993
5037
|
format: string;
|
|
@@ -5605,6 +5649,10 @@ export declare const schemaDict: {
|
|
|
5605
5649
|
accept: string[];
|
|
5606
5650
|
maxSize: number;
|
|
5607
5651
|
};
|
|
5652
|
+
labels: {
|
|
5653
|
+
type: string;
|
|
5654
|
+
refs: string[];
|
|
5655
|
+
};
|
|
5608
5656
|
createdAt: {
|
|
5609
5657
|
type: string;
|
|
5610
5658
|
format: string;
|
|
@@ -1,79 +1,88 @@
|
|
|
1
|
-
import { ValidationResult } from '@atproto/lexicon'
|
|
2
|
-
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
|
|
3
|
-
import * as AppBskyGraphDefs from '../graph/defs'
|
|
1
|
+
import { ValidationResult } from '@atproto/lexicon'
|
|
2
|
+
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
|
|
3
|
+
import * as AppBskyGraphDefs from '../graph/defs'
|
|
4
4
|
export interface ProfileViewBasic {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
did: string
|
|
6
|
+
handle: string
|
|
7
|
+
displayName?: string
|
|
8
|
+
avatar?: string
|
|
9
|
+
viewer?: ViewerState
|
|
10
|
+
labels?: ComAtprotoLabelDefs.Label[]
|
|
11
|
+
[k: string]: unknown
|
|
12
12
|
}
|
|
13
|
-
export declare function isProfileViewBasic(v: unknown): v is ProfileViewBasic
|
|
14
|
-
export declare function validateProfileViewBasic(v: unknown): ValidationResult
|
|
13
|
+
export declare function isProfileViewBasic(v: unknown): v is ProfileViewBasic
|
|
14
|
+
export declare function validateProfileViewBasic(v: unknown): ValidationResult
|
|
15
15
|
export interface ProfileView {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
did: string
|
|
17
|
+
handle: string
|
|
18
|
+
displayName?: string
|
|
19
|
+
description?: string
|
|
20
|
+
avatar?: string
|
|
21
|
+
indexedAt?: string
|
|
22
|
+
viewer?: ViewerState
|
|
23
|
+
labels?: ComAtprotoLabelDefs.Label[]
|
|
24
|
+
[k: string]: unknown
|
|
25
25
|
}
|
|
26
|
-
export declare function isProfileView(v: unknown): v is ProfileView
|
|
27
|
-
export declare function validateProfileView(v: unknown): ValidationResult
|
|
26
|
+
export declare function isProfileView(v: unknown): v is ProfileView
|
|
27
|
+
export declare function validateProfileView(v: unknown): ValidationResult
|
|
28
28
|
export interface ProfileViewDetailed {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
did: string
|
|
30
|
+
handle: string
|
|
31
|
+
displayName?: string
|
|
32
|
+
description?: string
|
|
33
|
+
avatar?: string
|
|
34
|
+
banner?: string
|
|
35
|
+
followersCount?: number
|
|
36
|
+
followsCount?: number
|
|
37
|
+
postsCount?: number
|
|
38
|
+
indexedAt?: string
|
|
39
|
+
viewer?: ViewerState
|
|
40
|
+
labels?: ComAtprotoLabelDefs.Label[]
|
|
41
|
+
[k: string]: unknown
|
|
42
42
|
}
|
|
43
|
-
export declare function isProfileViewDetailed(
|
|
44
|
-
|
|
43
|
+
export declare function isProfileViewDetailed(
|
|
44
|
+
v: unknown,
|
|
45
|
+
): v is ProfileViewDetailed
|
|
46
|
+
export declare function validateProfileViewDetailed(
|
|
47
|
+
v: unknown,
|
|
48
|
+
): ValidationResult
|
|
45
49
|
export interface ViewerState {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
muted?: boolean
|
|
51
|
+
mutedByList?: AppBskyGraphDefs.ListViewBasic
|
|
52
|
+
blockedBy?: boolean
|
|
53
|
+
blocking?: string
|
|
54
|
+
following?: string
|
|
55
|
+
followedBy?: string
|
|
56
|
+
[k: string]: unknown
|
|
53
57
|
}
|
|
54
|
-
export declare function isViewerState(v: unknown): v is ViewerState
|
|
55
|
-
export declare function validateViewerState(v: unknown): ValidationResult
|
|
56
|
-
export declare type Preferences = (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
export declare function isViewerState(v: unknown): v is ViewerState
|
|
59
|
+
export declare function validateViewerState(v: unknown): ValidationResult
|
|
60
|
+
export declare type Preferences = (
|
|
61
|
+
| AdultContentPref
|
|
62
|
+
| ContentLabelPref
|
|
63
|
+
| SavedFeedsPref
|
|
64
|
+
| {
|
|
65
|
+
$type: string
|
|
66
|
+
[k: string]: unknown
|
|
67
|
+
}
|
|
68
|
+
)[]
|
|
60
69
|
export interface AdultContentPref {
|
|
61
|
-
|
|
62
|
-
|
|
70
|
+
enabled: boolean
|
|
71
|
+
[k: string]: unknown
|
|
63
72
|
}
|
|
64
|
-
export declare function isAdultContentPref(v: unknown): v is AdultContentPref
|
|
65
|
-
export declare function validateAdultContentPref(v: unknown): ValidationResult
|
|
73
|
+
export declare function isAdultContentPref(v: unknown): v is AdultContentPref
|
|
74
|
+
export declare function validateAdultContentPref(v: unknown): ValidationResult
|
|
66
75
|
export interface ContentLabelPref {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
label: string
|
|
77
|
+
visibility: 'show' | 'warn' | 'hide' | (string & {})
|
|
78
|
+
[k: string]: unknown
|
|
70
79
|
}
|
|
71
|
-
export declare function isContentLabelPref(v: unknown): v is ContentLabelPref
|
|
72
|
-
export declare function validateContentLabelPref(v: unknown): ValidationResult
|
|
80
|
+
export declare function isContentLabelPref(v: unknown): v is ContentLabelPref
|
|
81
|
+
export declare function validateContentLabelPref(v: unknown): ValidationResult
|
|
73
82
|
export interface SavedFeedsPref {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
pinned: string[]
|
|
84
|
+
saved: string[]
|
|
85
|
+
[k: string]: unknown
|
|
77
86
|
}
|
|
78
|
-
export declare function isSavedFeedsPref(v: unknown): v is SavedFeedsPref
|
|
79
|
-
export declare function validateSavedFeedsPref(v: unknown): ValidationResult
|
|
87
|
+
export declare function isSavedFeedsPref(v: unknown): v is SavedFeedsPref
|
|
88
|
+
export declare function validateSavedFeedsPref(v: unknown): ValidationResult
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { ValidationResult, BlobRef } from '@atproto/lexicon';
|
|
2
|
+
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs';
|
|
2
3
|
export interface Record {
|
|
3
4
|
displayName?: string;
|
|
4
5
|
description?: string;
|
|
5
6
|
avatar?: BlobRef;
|
|
6
7
|
banner?: BlobRef;
|
|
8
|
+
labels?: ComAtprotoLabelDefs.SelfLabels | {
|
|
9
|
+
$type: string;
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
};
|
|
7
12
|
[k: string]: unknown;
|
|
8
13
|
}
|
|
9
14
|
export declare function isRecord(v: unknown): v is Record;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
1
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
2
2
|
export interface Main {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
external: External
|
|
4
|
+
[k: string]: unknown
|
|
5
5
|
}
|
|
6
|
-
export declare function isMain(v: unknown): v is Main
|
|
7
|
-
export declare function validateMain(v: unknown): ValidationResult
|
|
6
|
+
export declare function isMain(v: unknown): v is Main
|
|
7
|
+
export declare function validateMain(v: unknown): ValidationResult
|
|
8
8
|
export interface External {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
uri: string
|
|
10
|
+
title: string
|
|
11
|
+
description: string
|
|
12
|
+
thumb?: BlobRef
|
|
13
|
+
[k: string]: unknown
|
|
14
14
|
}
|
|
15
|
-
export declare function isExternal(v: unknown): v is External
|
|
16
|
-
export declare function validateExternal(v: unknown): ValidationResult
|
|
15
|
+
export declare function isExternal(v: unknown): v is External
|
|
16
|
+
export declare function validateExternal(v: unknown): ValidationResult
|
|
17
17
|
export interface View {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
external: ViewExternal
|
|
19
|
+
[k: string]: unknown
|
|
20
20
|
}
|
|
21
|
-
export declare function isView(v: unknown): v is View
|
|
22
|
-
export declare function validateView(v: unknown): ValidationResult
|
|
21
|
+
export declare function isView(v: unknown): v is View
|
|
22
|
+
export declare function validateView(v: unknown): ValidationResult
|
|
23
23
|
export interface ViewExternal {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
uri: string
|
|
25
|
+
title: string
|
|
26
|
+
description: string
|
|
27
|
+
thumb?: string
|
|
28
|
+
[k: string]: unknown
|
|
29
29
|
}
|
|
30
|
-
export declare function isViewExternal(v: unknown): v is ViewExternal
|
|
31
|
-
export declare function validateViewExternal(v: unknown): ValidationResult
|
|
30
|
+
export declare function isViewExternal(v: unknown): v is ViewExternal
|
|
31
|
+
export declare function validateViewExternal(v: unknown): ValidationResult
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
1
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
2
2
|
export interface Main {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
images: Image[]
|
|
4
|
+
[k: string]: unknown
|
|
5
5
|
}
|
|
6
|
-
export declare function isMain(v: unknown): v is Main
|
|
7
|
-
export declare function validateMain(v: unknown): ValidationResult
|
|
6
|
+
export declare function isMain(v: unknown): v is Main
|
|
7
|
+
export declare function validateMain(v: unknown): ValidationResult
|
|
8
8
|
export interface Image {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
image: BlobRef
|
|
10
|
+
alt: string
|
|
11
|
+
[k: string]: unknown
|
|
12
12
|
}
|
|
13
|
-
export declare function isImage(v: unknown): v is Image
|
|
14
|
-
export declare function validateImage(v: unknown): ValidationResult
|
|
13
|
+
export declare function isImage(v: unknown): v is Image
|
|
14
|
+
export declare function validateImage(v: unknown): ValidationResult
|
|
15
15
|
export interface View {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
images: ViewImage[]
|
|
17
|
+
[k: string]: unknown
|
|
18
18
|
}
|
|
19
|
-
export declare function isView(v: unknown): v is View
|
|
20
|
-
export declare function validateView(v: unknown): ValidationResult
|
|
19
|
+
export declare function isView(v: unknown): v is View
|
|
20
|
+
export declare function validateView(v: unknown): ValidationResult
|
|
21
21
|
export interface ViewImage {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
thumb: string
|
|
23
|
+
fullsize: string
|
|
24
|
+
alt: string
|
|
25
|
+
[k: string]: unknown
|
|
26
26
|
}
|
|
27
|
-
export declare function isViewImage(v: unknown): v is ViewImage
|
|
28
|
-
export declare function validateViewImage(v: unknown): ValidationResult
|
|
27
|
+
export declare function isViewImage(v: unknown): v is ViewImage
|
|
28
|
+
export declare function validateViewImage(v: unknown): ValidationResult
|