@atproto/api 0.9.3 → 0.9.4
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 +7 -0
- package/dist/bsky-agent.d.ts +2 -1
- package/dist/client/index.d.ts +3 -0
- package/dist/client/lexicons.d.ts +105 -0
- package/dist/client/types/app/bsky/actor/defs.d.ts +7 -1
- package/dist/client/types/app/bsky/graph/defs.d.ts +15 -0
- package/dist/client/types/app/bsky/graph/getRelationships.d.ts +27 -0
- package/dist/index.js +219 -45
- package/dist/index.js.map +3 -3
- package/dist/types.d.ts +5 -0
- package/package.json +2 -2
- package/src/bsky-agent.ts +27 -0
- package/src/client/index.ts +13 -0
- package/src/client/lexicons.ts +117 -0
- package/src/client/types/app/bsky/actor/defs.ts +19 -0
- package/src/client/types/app/bsky/graph/defs.ts +41 -0
- package/src/client/types/app/bsky/graph/getRelationships.ts +49 -0
- package/src/types.ts +9 -0
- package/tests/bsky-agent.test.ts +109 -0
package/dist/index.js
CHANGED
|
@@ -8919,6 +8919,7 @@ __export(src_exports2, {
|
|
|
8919
8919
|
AppBskyGraphGetListMutes: () => getListMutes_exports,
|
|
8920
8920
|
AppBskyGraphGetLists: () => getLists_exports,
|
|
8921
8921
|
AppBskyGraphGetMutes: () => getMutes_exports,
|
|
8922
|
+
AppBskyGraphGetRelationships: () => getRelationships_exports,
|
|
8922
8923
|
AppBskyGraphGetSuggestedFollowsByActor: () => getSuggestedFollowsByActor_exports,
|
|
8923
8924
|
AppBskyGraphList: () => list_exports,
|
|
8924
8925
|
AppBskyGraphListblock: () => listblock_exports,
|
|
@@ -20229,7 +20230,8 @@ var schemaDict = {
|
|
|
20229
20230
|
"lex:app.bsky.actor.defs#savedFeedsPref",
|
|
20230
20231
|
"lex:app.bsky.actor.defs#personalDetailsPref",
|
|
20231
20232
|
"lex:app.bsky.actor.defs#feedViewPref",
|
|
20232
|
-
"lex:app.bsky.actor.defs#threadViewPref"
|
|
20233
|
+
"lex:app.bsky.actor.defs#threadViewPref",
|
|
20234
|
+
"lex:app.bsky.actor.defs#interestsPref"
|
|
20233
20235
|
]
|
|
20234
20236
|
}
|
|
20235
20237
|
},
|
|
@@ -20329,6 +20331,22 @@ var schemaDict = {
|
|
|
20329
20331
|
description: "Show followed users at the top of all replies."
|
|
20330
20332
|
}
|
|
20331
20333
|
}
|
|
20334
|
+
},
|
|
20335
|
+
interestsPref: {
|
|
20336
|
+
type: "object",
|
|
20337
|
+
required: ["tags"],
|
|
20338
|
+
properties: {
|
|
20339
|
+
tags: {
|
|
20340
|
+
type: "array",
|
|
20341
|
+
maxLength: 100,
|
|
20342
|
+
items: {
|
|
20343
|
+
type: "string",
|
|
20344
|
+
maxLength: 640,
|
|
20345
|
+
maxGraphemes: 64
|
|
20346
|
+
},
|
|
20347
|
+
description: "A list of tags which describe the account owner's interests gathered during onboarding."
|
|
20348
|
+
}
|
|
20349
|
+
}
|
|
20332
20350
|
}
|
|
20333
20351
|
}
|
|
20334
20352
|
},
|
|
@@ -22522,6 +22540,42 @@ var schemaDict = {
|
|
|
22522
22540
|
format: "at-uri"
|
|
22523
22541
|
}
|
|
22524
22542
|
}
|
|
22543
|
+
},
|
|
22544
|
+
notFoundActor: {
|
|
22545
|
+
type: "object",
|
|
22546
|
+
description: "indicates that a handle or DID could not be resolved",
|
|
22547
|
+
required: ["actor", "notFound"],
|
|
22548
|
+
properties: {
|
|
22549
|
+
actor: {
|
|
22550
|
+
type: "string",
|
|
22551
|
+
format: "at-identifier"
|
|
22552
|
+
},
|
|
22553
|
+
notFound: {
|
|
22554
|
+
type: "boolean",
|
|
22555
|
+
const: true
|
|
22556
|
+
}
|
|
22557
|
+
}
|
|
22558
|
+
},
|
|
22559
|
+
relationship: {
|
|
22560
|
+
type: "object",
|
|
22561
|
+
description: "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)",
|
|
22562
|
+
required: ["did"],
|
|
22563
|
+
properties: {
|
|
22564
|
+
did: {
|
|
22565
|
+
type: "string",
|
|
22566
|
+
format: "did"
|
|
22567
|
+
},
|
|
22568
|
+
following: {
|
|
22569
|
+
type: "string",
|
|
22570
|
+
format: "at-uri",
|
|
22571
|
+
description: "if the actor follows this DID, this is the AT-URI of the follow record"
|
|
22572
|
+
},
|
|
22573
|
+
followedBy: {
|
|
22574
|
+
type: "string",
|
|
22575
|
+
format: "at-uri",
|
|
22576
|
+
description: "if the actor is followed by this DID, contains the AT-URI of the follow record"
|
|
22577
|
+
}
|
|
22578
|
+
}
|
|
22525
22579
|
}
|
|
22526
22580
|
}
|
|
22527
22581
|
},
|
|
@@ -22926,6 +22980,63 @@ var schemaDict = {
|
|
|
22926
22980
|
}
|
|
22927
22981
|
}
|
|
22928
22982
|
},
|
|
22983
|
+
AppBskyGraphGetRelationships: {
|
|
22984
|
+
lexicon: 1,
|
|
22985
|
+
id: "app.bsky.graph.getRelationships",
|
|
22986
|
+
defs: {
|
|
22987
|
+
main: {
|
|
22988
|
+
type: "query",
|
|
22989
|
+
description: "Enumerates public relationships between one account, and a list of other accounts",
|
|
22990
|
+
parameters: {
|
|
22991
|
+
type: "params",
|
|
22992
|
+
required: ["actor"],
|
|
22993
|
+
properties: {
|
|
22994
|
+
actor: {
|
|
22995
|
+
type: "string",
|
|
22996
|
+
format: "at-identifier"
|
|
22997
|
+
},
|
|
22998
|
+
others: {
|
|
22999
|
+
type: "array",
|
|
23000
|
+
maxLength: 30,
|
|
23001
|
+
items: {
|
|
23002
|
+
type: "string",
|
|
23003
|
+
format: "at-identifier"
|
|
23004
|
+
}
|
|
23005
|
+
}
|
|
23006
|
+
}
|
|
23007
|
+
},
|
|
23008
|
+
output: {
|
|
23009
|
+
encoding: "application/json",
|
|
23010
|
+
schema: {
|
|
23011
|
+
type: "object",
|
|
23012
|
+
required: ["relationships"],
|
|
23013
|
+
properties: {
|
|
23014
|
+
actor: {
|
|
23015
|
+
type: "string",
|
|
23016
|
+
format: "did"
|
|
23017
|
+
},
|
|
23018
|
+
relationships: {
|
|
23019
|
+
type: "array",
|
|
23020
|
+
items: {
|
|
23021
|
+
type: "union",
|
|
23022
|
+
refs: [
|
|
23023
|
+
"lex:app.bsky.graph.defs#relationship",
|
|
23024
|
+
"lex:app.bsky.graph.defs#notFoundActor"
|
|
23025
|
+
]
|
|
23026
|
+
}
|
|
23027
|
+
}
|
|
23028
|
+
}
|
|
23029
|
+
}
|
|
23030
|
+
},
|
|
23031
|
+
errors: [
|
|
23032
|
+
{
|
|
23033
|
+
name: "ActorNotFound",
|
|
23034
|
+
description: "the primary actor at-identifier could not be resolved"
|
|
23035
|
+
}
|
|
23036
|
+
]
|
|
23037
|
+
}
|
|
23038
|
+
}
|
|
23039
|
+
},
|
|
22929
23040
|
AppBskyGraphGetSuggestedFollowsByActor: {
|
|
22930
23041
|
lexicon: 1,
|
|
22931
23042
|
id: "app.bsky.graph.getSuggestedFollowsByActor",
|
|
@@ -25346,12 +25457,31 @@ function toKnownErr103(e) {
|
|
|
25346
25457
|
return e;
|
|
25347
25458
|
}
|
|
25348
25459
|
|
|
25460
|
+
// src/client/types/app/bsky/graph/getRelationships.ts
|
|
25461
|
+
var getRelationships_exports = {};
|
|
25462
|
+
__export(getRelationships_exports, {
|
|
25463
|
+
ActorNotFoundError: () => ActorNotFoundError,
|
|
25464
|
+
toKnownErr: () => toKnownErr104
|
|
25465
|
+
});
|
|
25466
|
+
var ActorNotFoundError = class extends XRPCError {
|
|
25467
|
+
constructor(src2) {
|
|
25468
|
+
super(src2.status, src2.error, src2.message, src2.headers);
|
|
25469
|
+
}
|
|
25470
|
+
};
|
|
25471
|
+
function toKnownErr104(e) {
|
|
25472
|
+
if (e instanceof XRPCError) {
|
|
25473
|
+
if (e.error === "ActorNotFound")
|
|
25474
|
+
return new ActorNotFoundError(e);
|
|
25475
|
+
}
|
|
25476
|
+
return e;
|
|
25477
|
+
}
|
|
25478
|
+
|
|
25349
25479
|
// src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts
|
|
25350
25480
|
var getSuggestedFollowsByActor_exports = {};
|
|
25351
25481
|
__export(getSuggestedFollowsByActor_exports, {
|
|
25352
|
-
toKnownErr: () =>
|
|
25482
|
+
toKnownErr: () => toKnownErr105
|
|
25353
25483
|
});
|
|
25354
|
-
function
|
|
25484
|
+
function toKnownErr105(e) {
|
|
25355
25485
|
if (e instanceof XRPCError) {
|
|
25356
25486
|
}
|
|
25357
25487
|
return e;
|
|
@@ -25360,9 +25490,9 @@ function toKnownErr104(e) {
|
|
|
25360
25490
|
// src/client/types/app/bsky/graph/muteActor.ts
|
|
25361
25491
|
var muteActor_exports = {};
|
|
25362
25492
|
__export(muteActor_exports, {
|
|
25363
|
-
toKnownErr: () =>
|
|
25493
|
+
toKnownErr: () => toKnownErr106
|
|
25364
25494
|
});
|
|
25365
|
-
function
|
|
25495
|
+
function toKnownErr106(e) {
|
|
25366
25496
|
if (e instanceof XRPCError) {
|
|
25367
25497
|
}
|
|
25368
25498
|
return e;
|
|
@@ -25371,9 +25501,9 @@ function toKnownErr105(e) {
|
|
|
25371
25501
|
// src/client/types/app/bsky/graph/muteActorList.ts
|
|
25372
25502
|
var muteActorList_exports = {};
|
|
25373
25503
|
__export(muteActorList_exports, {
|
|
25374
|
-
toKnownErr: () =>
|
|
25504
|
+
toKnownErr: () => toKnownErr107
|
|
25375
25505
|
});
|
|
25376
|
-
function
|
|
25506
|
+
function toKnownErr107(e) {
|
|
25377
25507
|
if (e instanceof XRPCError) {
|
|
25378
25508
|
}
|
|
25379
25509
|
return e;
|
|
@@ -25382,9 +25512,9 @@ function toKnownErr106(e) {
|
|
|
25382
25512
|
// src/client/types/app/bsky/graph/unmuteActor.ts
|
|
25383
25513
|
var unmuteActor_exports = {};
|
|
25384
25514
|
__export(unmuteActor_exports, {
|
|
25385
|
-
toKnownErr: () =>
|
|
25515
|
+
toKnownErr: () => toKnownErr108
|
|
25386
25516
|
});
|
|
25387
|
-
function
|
|
25517
|
+
function toKnownErr108(e) {
|
|
25388
25518
|
if (e instanceof XRPCError) {
|
|
25389
25519
|
}
|
|
25390
25520
|
return e;
|
|
@@ -25393,9 +25523,9 @@ function toKnownErr107(e) {
|
|
|
25393
25523
|
// src/client/types/app/bsky/graph/unmuteActorList.ts
|
|
25394
25524
|
var unmuteActorList_exports = {};
|
|
25395
25525
|
__export(unmuteActorList_exports, {
|
|
25396
|
-
toKnownErr: () =>
|
|
25526
|
+
toKnownErr: () => toKnownErr109
|
|
25397
25527
|
});
|
|
25398
|
-
function
|
|
25528
|
+
function toKnownErr109(e) {
|
|
25399
25529
|
if (e instanceof XRPCError) {
|
|
25400
25530
|
}
|
|
25401
25531
|
return e;
|
|
@@ -25404,9 +25534,9 @@ function toKnownErr108(e) {
|
|
|
25404
25534
|
// src/client/types/app/bsky/notification/getUnreadCount.ts
|
|
25405
25535
|
var getUnreadCount_exports = {};
|
|
25406
25536
|
__export(getUnreadCount_exports, {
|
|
25407
|
-
toKnownErr: () =>
|
|
25537
|
+
toKnownErr: () => toKnownErr110
|
|
25408
25538
|
});
|
|
25409
|
-
function
|
|
25539
|
+
function toKnownErr110(e) {
|
|
25410
25540
|
if (e instanceof XRPCError) {
|
|
25411
25541
|
}
|
|
25412
25542
|
return e;
|
|
@@ -25416,10 +25546,10 @@ function toKnownErr109(e) {
|
|
|
25416
25546
|
var listNotifications_exports = {};
|
|
25417
25547
|
__export(listNotifications_exports, {
|
|
25418
25548
|
isNotification: () => isNotification,
|
|
25419
|
-
toKnownErr: () =>
|
|
25549
|
+
toKnownErr: () => toKnownErr111,
|
|
25420
25550
|
validateNotification: () => validateNotification
|
|
25421
25551
|
});
|
|
25422
|
-
function
|
|
25552
|
+
function toKnownErr111(e) {
|
|
25423
25553
|
if (e instanceof XRPCError) {
|
|
25424
25554
|
}
|
|
25425
25555
|
return e;
|
|
@@ -25434,9 +25564,9 @@ function validateNotification(v) {
|
|
|
25434
25564
|
// src/client/types/app/bsky/notification/registerPush.ts
|
|
25435
25565
|
var registerPush_exports = {};
|
|
25436
25566
|
__export(registerPush_exports, {
|
|
25437
|
-
toKnownErr: () =>
|
|
25567
|
+
toKnownErr: () => toKnownErr112
|
|
25438
25568
|
});
|
|
25439
|
-
function
|
|
25569
|
+
function toKnownErr112(e) {
|
|
25440
25570
|
if (e instanceof XRPCError) {
|
|
25441
25571
|
}
|
|
25442
25572
|
return e;
|
|
@@ -25445,9 +25575,9 @@ function toKnownErr111(e) {
|
|
|
25445
25575
|
// src/client/types/app/bsky/notification/updateSeen.ts
|
|
25446
25576
|
var updateSeen_exports = {};
|
|
25447
25577
|
__export(updateSeen_exports, {
|
|
25448
|
-
toKnownErr: () =>
|
|
25578
|
+
toKnownErr: () => toKnownErr113
|
|
25449
25579
|
});
|
|
25450
|
-
function
|
|
25580
|
+
function toKnownErr113(e) {
|
|
25451
25581
|
if (e instanceof XRPCError) {
|
|
25452
25582
|
}
|
|
25453
25583
|
return e;
|
|
@@ -25456,9 +25586,9 @@ function toKnownErr112(e) {
|
|
|
25456
25586
|
// src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts
|
|
25457
25587
|
var getPopularFeedGenerators_exports = {};
|
|
25458
25588
|
__export(getPopularFeedGenerators_exports, {
|
|
25459
|
-
toKnownErr: () =>
|
|
25589
|
+
toKnownErr: () => toKnownErr114
|
|
25460
25590
|
});
|
|
25461
|
-
function
|
|
25591
|
+
function toKnownErr114(e) {
|
|
25462
25592
|
if (e instanceof XRPCError) {
|
|
25463
25593
|
}
|
|
25464
25594
|
return e;
|
|
@@ -25468,10 +25598,10 @@ function toKnownErr113(e) {
|
|
|
25468
25598
|
var getTaggedSuggestions_exports = {};
|
|
25469
25599
|
__export(getTaggedSuggestions_exports, {
|
|
25470
25600
|
isSuggestion: () => isSuggestion,
|
|
25471
|
-
toKnownErr: () =>
|
|
25601
|
+
toKnownErr: () => toKnownErr115,
|
|
25472
25602
|
validateSuggestion: () => validateSuggestion
|
|
25473
25603
|
});
|
|
25474
|
-
function
|
|
25604
|
+
function toKnownErr115(e) {
|
|
25475
25605
|
if (e instanceof XRPCError) {
|
|
25476
25606
|
}
|
|
25477
25607
|
return e;
|
|
@@ -25487,14 +25617,14 @@ function validateSuggestion(v) {
|
|
|
25487
25617
|
var getTimelineSkeleton_exports = {};
|
|
25488
25618
|
__export(getTimelineSkeleton_exports, {
|
|
25489
25619
|
UnknownFeedError: () => UnknownFeedError3,
|
|
25490
|
-
toKnownErr: () =>
|
|
25620
|
+
toKnownErr: () => toKnownErr116
|
|
25491
25621
|
});
|
|
25492
25622
|
var UnknownFeedError3 = class extends XRPCError {
|
|
25493
25623
|
constructor(src2) {
|
|
25494
25624
|
super(src2.status, src2.error, src2.message, src2.headers);
|
|
25495
25625
|
}
|
|
25496
25626
|
};
|
|
25497
|
-
function
|
|
25627
|
+
function toKnownErr116(e) {
|
|
25498
25628
|
if (e instanceof XRPCError) {
|
|
25499
25629
|
if (e.error === "UnknownFeed")
|
|
25500
25630
|
return new UnknownFeedError3(e);
|
|
@@ -25506,14 +25636,14 @@ function toKnownErr115(e) {
|
|
|
25506
25636
|
var searchActorsSkeleton_exports = {};
|
|
25507
25637
|
__export(searchActorsSkeleton_exports, {
|
|
25508
25638
|
BadQueryStringError: () => BadQueryStringError2,
|
|
25509
|
-
toKnownErr: () =>
|
|
25639
|
+
toKnownErr: () => toKnownErr117
|
|
25510
25640
|
});
|
|
25511
25641
|
var BadQueryStringError2 = class extends XRPCError {
|
|
25512
25642
|
constructor(src2) {
|
|
25513
25643
|
super(src2.status, src2.error, src2.message, src2.headers);
|
|
25514
25644
|
}
|
|
25515
25645
|
};
|
|
25516
|
-
function
|
|
25646
|
+
function toKnownErr117(e) {
|
|
25517
25647
|
if (e instanceof XRPCError) {
|
|
25518
25648
|
if (e.error === "BadQueryString")
|
|
25519
25649
|
return new BadQueryStringError2(e);
|
|
@@ -25525,14 +25655,14 @@ function toKnownErr116(e) {
|
|
|
25525
25655
|
var searchPostsSkeleton_exports = {};
|
|
25526
25656
|
__export(searchPostsSkeleton_exports, {
|
|
25527
25657
|
BadQueryStringError: () => BadQueryStringError3,
|
|
25528
|
-
toKnownErr: () =>
|
|
25658
|
+
toKnownErr: () => toKnownErr118
|
|
25529
25659
|
});
|
|
25530
25660
|
var BadQueryStringError3 = class extends XRPCError {
|
|
25531
25661
|
constructor(src2) {
|
|
25532
25662
|
super(src2.status, src2.error, src2.message, src2.headers);
|
|
25533
25663
|
}
|
|
25534
25664
|
};
|
|
25535
|
-
function
|
|
25665
|
+
function toKnownErr118(e) {
|
|
25536
25666
|
if (e instanceof XRPCError) {
|
|
25537
25667
|
if (e.error === "BadQueryString")
|
|
25538
25668
|
return new BadQueryStringError3(e);
|
|
@@ -25969,6 +26099,7 @@ __export(defs_exports5, {
|
|
|
25969
26099
|
isAdultContentPref: () => isAdultContentPref,
|
|
25970
26100
|
isContentLabelPref: () => isContentLabelPref,
|
|
25971
26101
|
isFeedViewPref: () => isFeedViewPref,
|
|
26102
|
+
isInterestsPref: () => isInterestsPref,
|
|
25972
26103
|
isPersonalDetailsPref: () => isPersonalDetailsPref,
|
|
25973
26104
|
isProfileView: () => isProfileView,
|
|
25974
26105
|
isProfileViewBasic: () => isProfileViewBasic,
|
|
@@ -25979,6 +26110,7 @@ __export(defs_exports5, {
|
|
|
25979
26110
|
validateAdultContentPref: () => validateAdultContentPref,
|
|
25980
26111
|
validateContentLabelPref: () => validateContentLabelPref,
|
|
25981
26112
|
validateFeedViewPref: () => validateFeedViewPref,
|
|
26113
|
+
validateInterestsPref: () => validateInterestsPref,
|
|
25982
26114
|
validatePersonalDetailsPref: () => validatePersonalDetailsPref,
|
|
25983
26115
|
validateProfileView: () => validateProfileView,
|
|
25984
26116
|
validateProfileViewBasic: () => validateProfileViewBasic,
|
|
@@ -26047,6 +26179,12 @@ function isThreadViewPref(v) {
|
|
|
26047
26179
|
function validateThreadViewPref(v) {
|
|
26048
26180
|
return lexicons.validate("app.bsky.actor.defs#threadViewPref", v);
|
|
26049
26181
|
}
|
|
26182
|
+
function isInterestsPref(v) {
|
|
26183
|
+
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.actor.defs#interestsPref";
|
|
26184
|
+
}
|
|
26185
|
+
function validateInterestsPref(v) {
|
|
26186
|
+
return lexicons.validate("app.bsky.actor.defs#interestsPref", v);
|
|
26187
|
+
}
|
|
26050
26188
|
|
|
26051
26189
|
// src/client/types/app/bsky/actor/profile.ts
|
|
26052
26190
|
var profile_exports = {};
|
|
@@ -26461,10 +26599,14 @@ __export(defs_exports7, {
|
|
|
26461
26599
|
isListView: () => isListView,
|
|
26462
26600
|
isListViewBasic: () => isListViewBasic,
|
|
26463
26601
|
isListViewerState: () => isListViewerState,
|
|
26602
|
+
isNotFoundActor: () => isNotFoundActor,
|
|
26603
|
+
isRelationship: () => isRelationship,
|
|
26464
26604
|
validateListItemView: () => validateListItemView,
|
|
26465
26605
|
validateListView: () => validateListView,
|
|
26466
26606
|
validateListViewBasic: () => validateListViewBasic,
|
|
26467
|
-
validateListViewerState: () => validateListViewerState
|
|
26607
|
+
validateListViewerState: () => validateListViewerState,
|
|
26608
|
+
validateNotFoundActor: () => validateNotFoundActor,
|
|
26609
|
+
validateRelationship: () => validateRelationship
|
|
26468
26610
|
});
|
|
26469
26611
|
function isListViewBasic(v) {
|
|
26470
26612
|
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.graph.defs#listViewBasic";
|
|
@@ -26492,6 +26634,18 @@ function isListViewerState(v) {
|
|
|
26492
26634
|
function validateListViewerState(v) {
|
|
26493
26635
|
return lexicons.validate("app.bsky.graph.defs#listViewerState", v);
|
|
26494
26636
|
}
|
|
26637
|
+
function isNotFoundActor(v) {
|
|
26638
|
+
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.graph.defs#notFoundActor";
|
|
26639
|
+
}
|
|
26640
|
+
function validateNotFoundActor(v) {
|
|
26641
|
+
return lexicons.validate("app.bsky.graph.defs#notFoundActor", v);
|
|
26642
|
+
}
|
|
26643
|
+
function isRelationship(v) {
|
|
26644
|
+
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.graph.defs#relationship";
|
|
26645
|
+
}
|
|
26646
|
+
function validateRelationship(v) {
|
|
26647
|
+
return lexicons.validate("app.bsky.graph.defs#relationship", v);
|
|
26648
|
+
}
|
|
26495
26649
|
|
|
26496
26650
|
// src/client/types/app/bsky/graph/follow.ts
|
|
26497
26651
|
var follow_exports = {};
|
|
@@ -27434,29 +27588,34 @@ var AppBskyGraphNS = class {
|
|
|
27434
27588
|
throw toKnownErr103(e);
|
|
27435
27589
|
});
|
|
27436
27590
|
}
|
|
27591
|
+
getRelationships(params2, opts) {
|
|
27592
|
+
return this._service.xrpc.call("app.bsky.graph.getRelationships", params2, void 0, opts).catch((e) => {
|
|
27593
|
+
throw toKnownErr104(e);
|
|
27594
|
+
});
|
|
27595
|
+
}
|
|
27437
27596
|
getSuggestedFollowsByActor(params2, opts) {
|
|
27438
27597
|
return this._service.xrpc.call("app.bsky.graph.getSuggestedFollowsByActor", params2, void 0, opts).catch((e) => {
|
|
27439
|
-
throw
|
|
27598
|
+
throw toKnownErr105(e);
|
|
27440
27599
|
});
|
|
27441
27600
|
}
|
|
27442
27601
|
muteActor(data, opts) {
|
|
27443
27602
|
return this._service.xrpc.call("app.bsky.graph.muteActor", opts?.qp, data, opts).catch((e) => {
|
|
27444
|
-
throw
|
|
27603
|
+
throw toKnownErr106(e);
|
|
27445
27604
|
});
|
|
27446
27605
|
}
|
|
27447
27606
|
muteActorList(data, opts) {
|
|
27448
27607
|
return this._service.xrpc.call("app.bsky.graph.muteActorList", opts?.qp, data, opts).catch((e) => {
|
|
27449
|
-
throw
|
|
27608
|
+
throw toKnownErr107(e);
|
|
27450
27609
|
});
|
|
27451
27610
|
}
|
|
27452
27611
|
unmuteActor(data, opts) {
|
|
27453
27612
|
return this._service.xrpc.call("app.bsky.graph.unmuteActor", opts?.qp, data, opts).catch((e) => {
|
|
27454
|
-
throw
|
|
27613
|
+
throw toKnownErr108(e);
|
|
27455
27614
|
});
|
|
27456
27615
|
}
|
|
27457
27616
|
unmuteActorList(data, opts) {
|
|
27458
27617
|
return this._service.xrpc.call("app.bsky.graph.unmuteActorList", opts?.qp, data, opts).catch((e) => {
|
|
27459
|
-
throw
|
|
27618
|
+
throw toKnownErr109(e);
|
|
27460
27619
|
});
|
|
27461
27620
|
}
|
|
27462
27621
|
};
|
|
@@ -27601,22 +27760,22 @@ var AppBskyNotificationNS = class {
|
|
|
27601
27760
|
}
|
|
27602
27761
|
getUnreadCount(params2, opts) {
|
|
27603
27762
|
return this._service.xrpc.call("app.bsky.notification.getUnreadCount", params2, void 0, opts).catch((e) => {
|
|
27604
|
-
throw
|
|
27763
|
+
throw toKnownErr110(e);
|
|
27605
27764
|
});
|
|
27606
27765
|
}
|
|
27607
27766
|
listNotifications(params2, opts) {
|
|
27608
27767
|
return this._service.xrpc.call("app.bsky.notification.listNotifications", params2, void 0, opts).catch((e) => {
|
|
27609
|
-
throw
|
|
27768
|
+
throw toKnownErr111(e);
|
|
27610
27769
|
});
|
|
27611
27770
|
}
|
|
27612
27771
|
registerPush(data, opts) {
|
|
27613
27772
|
return this._service.xrpc.call("app.bsky.notification.registerPush", opts?.qp, data, opts).catch((e) => {
|
|
27614
|
-
throw
|
|
27773
|
+
throw toKnownErr112(e);
|
|
27615
27774
|
});
|
|
27616
27775
|
}
|
|
27617
27776
|
updateSeen(data, opts) {
|
|
27618
27777
|
return this._service.xrpc.call("app.bsky.notification.updateSeen", opts?.qp, data, opts).catch((e) => {
|
|
27619
|
-
throw
|
|
27778
|
+
throw toKnownErr113(e);
|
|
27620
27779
|
});
|
|
27621
27780
|
}
|
|
27622
27781
|
};
|
|
@@ -27631,27 +27790,27 @@ var AppBskyUnspeccedNS = class {
|
|
|
27631
27790
|
}
|
|
27632
27791
|
getPopularFeedGenerators(params2, opts) {
|
|
27633
27792
|
return this._service.xrpc.call("app.bsky.unspecced.getPopularFeedGenerators", params2, void 0, opts).catch((e) => {
|
|
27634
|
-
throw
|
|
27793
|
+
throw toKnownErr114(e);
|
|
27635
27794
|
});
|
|
27636
27795
|
}
|
|
27637
27796
|
getTaggedSuggestions(params2, opts) {
|
|
27638
27797
|
return this._service.xrpc.call("app.bsky.unspecced.getTaggedSuggestions", params2, void 0, opts).catch((e) => {
|
|
27639
|
-
throw
|
|
27798
|
+
throw toKnownErr115(e);
|
|
27640
27799
|
});
|
|
27641
27800
|
}
|
|
27642
27801
|
getTimelineSkeleton(params2, opts) {
|
|
27643
27802
|
return this._service.xrpc.call("app.bsky.unspecced.getTimelineSkeleton", params2, void 0, opts).catch((e) => {
|
|
27644
|
-
throw
|
|
27803
|
+
throw toKnownErr116(e);
|
|
27645
27804
|
});
|
|
27646
27805
|
}
|
|
27647
27806
|
searchActorsSkeleton(params2, opts) {
|
|
27648
27807
|
return this._service.xrpc.call("app.bsky.unspecced.searchActorsSkeleton", params2, void 0, opts).catch((e) => {
|
|
27649
|
-
throw
|
|
27808
|
+
throw toKnownErr117(e);
|
|
27650
27809
|
});
|
|
27651
27810
|
}
|
|
27652
27811
|
searchPostsSkeleton(params2, opts) {
|
|
27653
27812
|
return this._service.xrpc.call("app.bsky.unspecced.searchPostsSkeleton", params2, void 0, opts).catch((e) => {
|
|
27654
|
-
throw
|
|
27813
|
+
throw toKnownErr118(e);
|
|
27655
27814
|
});
|
|
27656
27815
|
}
|
|
27657
27816
|
};
|
|
@@ -31338,7 +31497,10 @@ var BskyAgent = class extends AtpAgent {
|
|
|
31338
31497
|
threadViewPrefs: { ...THREAD_VIEW_PREF_DEFAULTS },
|
|
31339
31498
|
adultContentEnabled: false,
|
|
31340
31499
|
contentLabels: {},
|
|
31341
|
-
birthDate: void 0
|
|
31500
|
+
birthDate: void 0,
|
|
31501
|
+
interests: {
|
|
31502
|
+
tags: []
|
|
31503
|
+
}
|
|
31342
31504
|
};
|
|
31343
31505
|
const res = await this.app.bsky.actor.getPreferences({});
|
|
31344
31506
|
for (const pref of res.data.preferences) {
|
|
@@ -31365,6 +31527,9 @@ var BskyAgent = class extends AtpAgent {
|
|
|
31365
31527
|
} else if (defs_exports5.isThreadViewPref(pref) && defs_exports5.validateThreadViewPref(pref).success) {
|
|
31366
31528
|
const { $type, ...v } = pref;
|
|
31367
31529
|
prefs.threadViewPrefs = { ...prefs.threadViewPrefs, ...v };
|
|
31530
|
+
} else if (defs_exports5.isInterestsPref(pref) && defs_exports5.validateInterestsPref(pref).success) {
|
|
31531
|
+
const { $type, ...v } = pref;
|
|
31532
|
+
prefs.interests = { ...prefs.interests, ...v };
|
|
31368
31533
|
}
|
|
31369
31534
|
}
|
|
31370
31535
|
return prefs;
|
|
@@ -31466,6 +31631,15 @@ var BskyAgent = class extends AtpAgent {
|
|
|
31466
31631
|
return prefs.filter((p) => !defs_exports5.isThreadViewPref(p)).concat([{ ...pref, $type: "app.bsky.actor.defs#threadViewPref" }]);
|
|
31467
31632
|
});
|
|
31468
31633
|
}
|
|
31634
|
+
async setInterestsPref(pref) {
|
|
31635
|
+
await updatePreferences(this, (prefs) => {
|
|
31636
|
+
const existing = prefs.findLast((pref2) => defs_exports5.isInterestsPref(pref2) && defs_exports5.validateInterestsPref(pref2).success);
|
|
31637
|
+
if (existing) {
|
|
31638
|
+
pref = { ...existing, ...pref };
|
|
31639
|
+
}
|
|
31640
|
+
return prefs.filter((p) => !defs_exports5.isInterestsPref(p)).concat([{ ...pref, $type: "app.bsky.actor.defs#interestsPref" }]);
|
|
31641
|
+
});
|
|
31642
|
+
}
|
|
31469
31643
|
};
|
|
31470
31644
|
async function updatePreferences(agent, cb) {
|
|
31471
31645
|
const res = await agent.app.bsky.actor.getPreferences({});
|