@atproto/api 0.9.8 → 0.10.0
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/CHANGELOG.md +10 -0
- package/dist/bsky-agent.d.ts +6 -1
- package/dist/client/index.d.ts +30 -9
- package/dist/client/lexicons.d.ts +392 -110
- package/dist/client/types/app/bsky/actor/defs.d.ts +20 -0
- package/dist/client/types/com/atproto/identity/getRecommendedDidCredentials.d.ts +20 -0
- package/dist/client/types/com/atproto/{temp/pushBlob.d.ts → identity/requestPlcOperationSignature.d.ts} +1 -3
- package/dist/client/types/com/atproto/identity/signPlcOperation.d.ts +26 -0
- package/dist/client/types/com/atproto/identity/submitPlcOperation.d.ts +17 -0
- package/dist/client/types/com/atproto/{temp → repo}/importRepo.d.ts +0 -2
- package/dist/client/types/com/atproto/repo/listMissingBlobs.d.ts +28 -0
- package/dist/client/types/com/atproto/server/activateAccount.d.ts +13 -0
- package/dist/client/types/com/atproto/server/checkAccountStatus.d.ts +25 -0
- package/dist/client/types/com/atproto/server/deactivateAccount.d.ts +17 -0
- package/dist/client/types/com/atproto/server/describeServer.d.ts +1 -0
- package/dist/client/types/com/atproto/server/getServiceAuth.d.ts +18 -0
- package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +8 -0
- package/dist/index.js +991 -538
- package/dist/index.js.map +3 -3
- package/dist/types.d.ts +3 -0
- package/package.json +2 -2
- package/src/bsky-agent.ts +136 -0
- package/src/client/index.ts +140 -39
- package/src/client/lexicons.ts +429 -138
- package/src/client/types/app/bsky/actor/defs.ts +59 -0
- package/src/client/types/app/bsky/feed/post.ts +1 -1
- package/src/client/types/com/atproto/identity/getRecommendedDidCredentials.ts +37 -0
- package/src/client/types/com/atproto/identity/requestPlcOperationSignature.ts +28 -0
- package/src/client/types/com/atproto/identity/signPlcOperation.ts +44 -0
- package/src/client/types/com/atproto/{temp/pushBlob.ts → identity/submitPlcOperation.ts} +6 -6
- package/src/client/types/com/atproto/{temp → repo}/importRepo.ts +1 -5
- package/src/client/types/com/atproto/repo/listMissingBlobs.ts +55 -0
- package/src/client/types/com/atproto/server/activateAccount.ts +28 -0
- package/src/client/types/com/atproto/server/checkAccountStatus.ts +41 -0
- package/src/client/types/com/atproto/server/deactivateAccount.ts +33 -0
- package/src/client/types/com/atproto/server/describeServer.ts +1 -0
- package/src/client/types/com/atproto/server/getServiceAuth.ts +36 -0
- package/src/client/types/com/atproto/sync/subscribeRepos.ts +23 -3
- package/src/types.ts +3 -0
- package/tests/agent.test.ts +1 -0
- package/tests/bsky-agent.test.ts +183 -0
- package/dist/client/types/com/atproto/temp/transferAccount.d.ts +0 -48
- package/src/client/types/com/atproto/temp/transferAccount.ts +0 -92
|
@@ -254,3 +254,62 @@ export function isInterestsPref(v: unknown): v is InterestsPref {
|
|
|
254
254
|
export function validateInterestsPref(v: unknown): ValidationResult {
|
|
255
255
|
return lexicons.validate('app.bsky.actor.defs#interestsPref', v)
|
|
256
256
|
}
|
|
257
|
+
|
|
258
|
+
export type MutedWordTarget = 'content' | 'tag' | (string & {})
|
|
259
|
+
|
|
260
|
+
/** A word that the account owner has muted. */
|
|
261
|
+
export interface MutedWord {
|
|
262
|
+
/** The muted word itself. */
|
|
263
|
+
value: string
|
|
264
|
+
/** The intended targets of the muted word. */
|
|
265
|
+
targets: MutedWordTarget[]
|
|
266
|
+
[k: string]: unknown
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function isMutedWord(v: unknown): v is MutedWord {
|
|
270
|
+
return (
|
|
271
|
+
isObj(v) &&
|
|
272
|
+
hasProp(v, '$type') &&
|
|
273
|
+
v.$type === 'app.bsky.actor.defs#mutedWord'
|
|
274
|
+
)
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export function validateMutedWord(v: unknown): ValidationResult {
|
|
278
|
+
return lexicons.validate('app.bsky.actor.defs#mutedWord', v)
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export interface MutedWordsPref {
|
|
282
|
+
/** A list of words the account owner has muted. */
|
|
283
|
+
items: MutedWord[]
|
|
284
|
+
[k: string]: unknown
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export function isMutedWordsPref(v: unknown): v is MutedWordsPref {
|
|
288
|
+
return (
|
|
289
|
+
isObj(v) &&
|
|
290
|
+
hasProp(v, '$type') &&
|
|
291
|
+
v.$type === 'app.bsky.actor.defs#mutedWordsPref'
|
|
292
|
+
)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export function validateMutedWordsPref(v: unknown): ValidationResult {
|
|
296
|
+
return lexicons.validate('app.bsky.actor.defs#mutedWordsPref', v)
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export interface HiddenPostsPref {
|
|
300
|
+
/** A list of URIs of posts the account owner has hidden. */
|
|
301
|
+
items: string[]
|
|
302
|
+
[k: string]: unknown
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export function isHiddenPostsPref(v: unknown): v is HiddenPostsPref {
|
|
306
|
+
return (
|
|
307
|
+
isObj(v) &&
|
|
308
|
+
hasProp(v, '$type') &&
|
|
309
|
+
v.$type === 'app.bsky.actor.defs#hiddenPostsPref'
|
|
310
|
+
)
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export function validateHiddenPostsPref(v: unknown): ValidationResult {
|
|
314
|
+
return lexicons.validate('app.bsky.actor.defs#hiddenPostsPref', v)
|
|
315
|
+
}
|
|
@@ -32,7 +32,7 @@ export interface Record {
|
|
|
32
32
|
labels?:
|
|
33
33
|
| ComAtprotoLabelDefs.SelfLabels
|
|
34
34
|
| { $type: string; [k: string]: unknown }
|
|
35
|
-
/** Additional
|
|
35
|
+
/** Additional hashtags, in addition to any included in post text and facets. */
|
|
36
36
|
tags?: string[]
|
|
37
37
|
/** Client-declared timestamp when this post was originally created. */
|
|
38
38
|
createdAt: string
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
|
|
10
|
+
export interface QueryParams {}
|
|
11
|
+
|
|
12
|
+
export type InputSchema = undefined
|
|
13
|
+
|
|
14
|
+
export interface OutputSchema {
|
|
15
|
+
/** Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. */
|
|
16
|
+
rotationKeys?: string[]
|
|
17
|
+
alsoKnownAs?: string[]
|
|
18
|
+
verificationMethods?: {}
|
|
19
|
+
services?: {}
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CallOptions {
|
|
24
|
+
headers?: Headers
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: Headers
|
|
30
|
+
data: OutputSchema
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toKnownErr(e: any) {
|
|
34
|
+
if (e instanceof XRPCError) {
|
|
35
|
+
}
|
|
36
|
+
return e
|
|
37
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
|
|
10
|
+
export interface QueryParams {}
|
|
11
|
+
|
|
12
|
+
export type InputSchema = undefined
|
|
13
|
+
|
|
14
|
+
export interface CallOptions {
|
|
15
|
+
headers?: Headers
|
|
16
|
+
qp?: QueryParams
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Response {
|
|
20
|
+
success: boolean
|
|
21
|
+
headers: Headers
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function toKnownErr(e: any) {
|
|
25
|
+
if (e instanceof XRPCError) {
|
|
26
|
+
}
|
|
27
|
+
return e
|
|
28
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
|
|
10
|
+
export interface QueryParams {}
|
|
11
|
+
|
|
12
|
+
export interface InputSchema {
|
|
13
|
+
/** A token received through com.atproto.identity.requestPlcOperationSignature */
|
|
14
|
+
token?: string
|
|
15
|
+
rotationKeys?: string[]
|
|
16
|
+
alsoKnownAs?: string[]
|
|
17
|
+
verificationMethods?: {}
|
|
18
|
+
services?: {}
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface OutputSchema {
|
|
23
|
+
/** A signed DID PLC operation. */
|
|
24
|
+
operation: {}
|
|
25
|
+
[k: string]: unknown
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface CallOptions {
|
|
29
|
+
headers?: Headers
|
|
30
|
+
qp?: QueryParams
|
|
31
|
+
encoding: 'application/json'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface Response {
|
|
35
|
+
success: boolean
|
|
36
|
+
headers: Headers
|
|
37
|
+
data: OutputSchema
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function toKnownErr(e: any) {
|
|
41
|
+
if (e instanceof XRPCError) {
|
|
42
|
+
}
|
|
43
|
+
return e
|
|
44
|
+
}
|
|
@@ -7,17 +7,17 @@ import { isObj, hasProp } from '../../../../util'
|
|
|
7
7
|
import { lexicons } from '../../../../lexicons'
|
|
8
8
|
import { CID } from 'multiformats/cid'
|
|
9
9
|
|
|
10
|
-
export interface QueryParams {
|
|
11
|
-
/** The DID of the repo. */
|
|
12
|
-
did: string
|
|
13
|
-
}
|
|
10
|
+
export interface QueryParams {}
|
|
14
11
|
|
|
15
|
-
export
|
|
12
|
+
export interface InputSchema {
|
|
13
|
+
operation: {}
|
|
14
|
+
[k: string]: unknown
|
|
15
|
+
}
|
|
16
16
|
|
|
17
17
|
export interface CallOptions {
|
|
18
18
|
headers?: Headers
|
|
19
19
|
qp?: QueryParams
|
|
20
|
-
encoding:
|
|
20
|
+
encoding: 'application/json'
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface Response {
|
|
@@ -7,10 +7,7 @@ import { isObj, hasProp } from '../../../../util'
|
|
|
7
7
|
import { lexicons } from '../../../../lexicons'
|
|
8
8
|
import { CID } from 'multiformats/cid'
|
|
9
9
|
|
|
10
|
-
export interface QueryParams {
|
|
11
|
-
/** The DID of the repo. */
|
|
12
|
-
did: string
|
|
13
|
-
}
|
|
10
|
+
export interface QueryParams {}
|
|
14
11
|
|
|
15
12
|
export type InputSchema = string | Uint8Array
|
|
16
13
|
|
|
@@ -23,7 +20,6 @@ export interface CallOptions {
|
|
|
23
20
|
export interface Response {
|
|
24
21
|
success: boolean
|
|
25
22
|
headers: Headers
|
|
26
|
-
data: Uint8Array
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
export function toKnownErr(e: any) {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
|
|
10
|
+
export interface QueryParams {
|
|
11
|
+
limit?: number
|
|
12
|
+
cursor?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type InputSchema = undefined
|
|
16
|
+
|
|
17
|
+
export interface OutputSchema {
|
|
18
|
+
cursor?: string
|
|
19
|
+
blobs: RecordBlob[]
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CallOptions {
|
|
24
|
+
headers?: Headers
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: Headers
|
|
30
|
+
data: OutputSchema
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toKnownErr(e: any) {
|
|
34
|
+
if (e instanceof XRPCError) {
|
|
35
|
+
}
|
|
36
|
+
return e
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface RecordBlob {
|
|
40
|
+
cid: string
|
|
41
|
+
recordUri: string
|
|
42
|
+
[k: string]: unknown
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function isRecordBlob(v: unknown): v is RecordBlob {
|
|
46
|
+
return (
|
|
47
|
+
isObj(v) &&
|
|
48
|
+
hasProp(v, '$type') &&
|
|
49
|
+
v.$type === 'com.atproto.repo.listMissingBlobs#recordBlob'
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function validateRecordBlob(v: unknown): ValidationResult {
|
|
54
|
+
return lexicons.validate('com.atproto.repo.listMissingBlobs#recordBlob', v)
|
|
55
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
|
|
10
|
+
export interface QueryParams {}
|
|
11
|
+
|
|
12
|
+
export type InputSchema = undefined
|
|
13
|
+
|
|
14
|
+
export interface CallOptions {
|
|
15
|
+
headers?: Headers
|
|
16
|
+
qp?: QueryParams
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Response {
|
|
20
|
+
success: boolean
|
|
21
|
+
headers: Headers
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function toKnownErr(e: any) {
|
|
25
|
+
if (e instanceof XRPCError) {
|
|
26
|
+
}
|
|
27
|
+
return e
|
|
28
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
|
|
10
|
+
export interface QueryParams {}
|
|
11
|
+
|
|
12
|
+
export type InputSchema = undefined
|
|
13
|
+
|
|
14
|
+
export interface OutputSchema {
|
|
15
|
+
activated: boolean
|
|
16
|
+
validDid: boolean
|
|
17
|
+
repoCommit: string
|
|
18
|
+
repoRev: string
|
|
19
|
+
repoBlocks: number
|
|
20
|
+
indexedRecords: number
|
|
21
|
+
privateStateValues: number
|
|
22
|
+
expectedBlobs: number
|
|
23
|
+
importedBlobs: number
|
|
24
|
+
[k: string]: unknown
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface CallOptions {
|
|
28
|
+
headers?: Headers
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Response {
|
|
32
|
+
success: boolean
|
|
33
|
+
headers: Headers
|
|
34
|
+
data: OutputSchema
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function toKnownErr(e: any) {
|
|
38
|
+
if (e instanceof XRPCError) {
|
|
39
|
+
}
|
|
40
|
+
return e
|
|
41
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
|
|
10
|
+
export interface QueryParams {}
|
|
11
|
+
|
|
12
|
+
export interface InputSchema {
|
|
13
|
+
/** A recommendation to server as to how long they should hold onto the deactivated account before deleting. */
|
|
14
|
+
deleteAfter?: string
|
|
15
|
+
[k: string]: unknown
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface CallOptions {
|
|
19
|
+
headers?: Headers
|
|
20
|
+
qp?: QueryParams
|
|
21
|
+
encoding: 'application/json'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface Response {
|
|
25
|
+
success: boolean
|
|
26
|
+
headers: Headers
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function toKnownErr(e: any) {
|
|
30
|
+
if (e instanceof XRPCError) {
|
|
31
|
+
}
|
|
32
|
+
return e
|
|
33
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
|
|
10
|
+
export interface QueryParams {
|
|
11
|
+
/** The DID of the service that the token will be used to authenticate with */
|
|
12
|
+
aud: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type InputSchema = undefined
|
|
16
|
+
|
|
17
|
+
export interface OutputSchema {
|
|
18
|
+
token: string
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CallOptions {
|
|
23
|
+
headers?: Headers
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Response {
|
|
27
|
+
success: boolean
|
|
28
|
+
headers: Headers
|
|
29
|
+
data: OutputSchema
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function toKnownErr(e: any) {
|
|
33
|
+
if (e instanceof XRPCError) {
|
|
34
|
+
}
|
|
35
|
+
return e
|
|
36
|
+
}
|
|
@@ -46,7 +46,27 @@ export function validateCommit(v: unknown): ValidationResult {
|
|
|
46
46
|
return lexicons.validate('com.atproto.sync.subscribeRepos#commit', v)
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
/** Represents
|
|
49
|
+
/** Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache. */
|
|
50
|
+
export interface Identity {
|
|
51
|
+
seq: number
|
|
52
|
+
did: string
|
|
53
|
+
time: string
|
|
54
|
+
[k: string]: unknown
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function isIdentity(v: unknown): v is Identity {
|
|
58
|
+
return (
|
|
59
|
+
isObj(v) &&
|
|
60
|
+
hasProp(v, '$type') &&
|
|
61
|
+
v.$type === 'com.atproto.sync.subscribeRepos#identity'
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function validateIdentity(v: unknown): ValidationResult {
|
|
66
|
+
return lexicons.validate('com.atproto.sync.subscribeRepos#identity', v)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Represents an update of the account's handle, or transition to/from invalid state. NOTE: Will be deprecated in favor of #identity. */
|
|
50
70
|
export interface Handle {
|
|
51
71
|
seq: number
|
|
52
72
|
did: string
|
|
@@ -67,7 +87,7 @@ export function validateHandle(v: unknown): ValidationResult {
|
|
|
67
87
|
return lexicons.validate('com.atproto.sync.subscribeRepos#handle', v)
|
|
68
88
|
}
|
|
69
89
|
|
|
70
|
-
/** Represents an account moving from one PDS instance to another. NOTE: not implemented;
|
|
90
|
+
/** Represents an account moving from one PDS instance to another. NOTE: not implemented; account migration uses #identity instead */
|
|
71
91
|
export interface Migrate {
|
|
72
92
|
seq: number
|
|
73
93
|
did: string
|
|
@@ -88,7 +108,7 @@ export function validateMigrate(v: unknown): ValidationResult {
|
|
|
88
108
|
return lexicons.validate('com.atproto.sync.subscribeRepos#migrate', v)
|
|
89
109
|
}
|
|
90
110
|
|
|
91
|
-
/** Indicates that an account has been deleted. */
|
|
111
|
+
/** Indicates that an account has been deleted. NOTE: may be deprecated in favor of #identity or a future #account event */
|
|
92
112
|
export interface Tombstone {
|
|
93
113
|
seq: number
|
|
94
114
|
did: string
|
package/src/types.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AppBskyActorNS, AppBskyActorDefs } from './client'
|
|
1
2
|
import { LabelPreference } from './moderation/types'
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -119,4 +120,6 @@ export interface BskyPreferences {
|
|
|
119
120
|
contentLabels: Record<string, BskyLabelPreference>
|
|
120
121
|
birthDate: Date | undefined
|
|
121
122
|
interests: BskyInterestsPreference
|
|
123
|
+
mutedWords: AppBskyActorDefs.MutedWord[]
|
|
124
|
+
hiddenPosts: string[]
|
|
122
125
|
}
|
package/tests/agent.test.ts
CHANGED