@atproto/api 0.9.2 → 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 +13 -0
- package/dist/bsky-agent.d.ts +2 -1
- package/dist/client/index.d.ts +6 -0
- package/dist/client/lexicons.d.ts +153 -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/client/types/app/bsky/unspecced/getTaggedSuggestions.d.ts +26 -0
- package/dist/index.js +288 -42
- 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 +26 -0
- package/src/client/lexicons.ts +167 -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/client/types/app/bsky/unspecced/getTaggedSuggestions.ts +55 -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,
|
|
@@ -8938,6 +8939,7 @@ __export(src_exports2, {
|
|
|
8938
8939
|
AppBskyRichtextNS: () => AppBskyRichtextNS,
|
|
8939
8940
|
AppBskyUnspeccedDefs: () => defs_exports8,
|
|
8940
8941
|
AppBskyUnspeccedGetPopularFeedGenerators: () => getPopularFeedGenerators_exports,
|
|
8942
|
+
AppBskyUnspeccedGetTaggedSuggestions: () => getTaggedSuggestions_exports,
|
|
8941
8943
|
AppBskyUnspeccedGetTimelineSkeleton: () => getTimelineSkeleton_exports,
|
|
8942
8944
|
AppBskyUnspeccedNS: () => AppBskyUnspeccedNS,
|
|
8943
8945
|
AppBskyUnspeccedSearchActorsSkeleton: () => searchActorsSkeleton_exports,
|
|
@@ -20228,7 +20230,8 @@ var schemaDict = {
|
|
|
20228
20230
|
"lex:app.bsky.actor.defs#savedFeedsPref",
|
|
20229
20231
|
"lex:app.bsky.actor.defs#personalDetailsPref",
|
|
20230
20232
|
"lex:app.bsky.actor.defs#feedViewPref",
|
|
20231
|
-
"lex:app.bsky.actor.defs#threadViewPref"
|
|
20233
|
+
"lex:app.bsky.actor.defs#threadViewPref",
|
|
20234
|
+
"lex:app.bsky.actor.defs#interestsPref"
|
|
20232
20235
|
]
|
|
20233
20236
|
}
|
|
20234
20237
|
},
|
|
@@ -20328,6 +20331,22 @@ var schemaDict = {
|
|
|
20328
20331
|
description: "Show followed users at the top of all replies."
|
|
20329
20332
|
}
|
|
20330
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
|
+
}
|
|
20331
20350
|
}
|
|
20332
20351
|
}
|
|
20333
20352
|
},
|
|
@@ -22521,6 +22540,42 @@ var schemaDict = {
|
|
|
22521
22540
|
format: "at-uri"
|
|
22522
22541
|
}
|
|
22523
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
|
+
}
|
|
22524
22579
|
}
|
|
22525
22580
|
}
|
|
22526
22581
|
},
|
|
@@ -22925,6 +22980,63 @@ var schemaDict = {
|
|
|
22925
22980
|
}
|
|
22926
22981
|
}
|
|
22927
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
|
+
},
|
|
22928
23040
|
AppBskyGraphGetSuggestedFollowsByActor: {
|
|
22929
23041
|
lexicon: 1,
|
|
22930
23042
|
id: "app.bsky.graph.getSuggestedFollowsByActor",
|
|
@@ -23503,6 +23615,53 @@ var schemaDict = {
|
|
|
23503
23615
|
}
|
|
23504
23616
|
}
|
|
23505
23617
|
},
|
|
23618
|
+
AppBskyUnspeccedGetTaggedSuggestions: {
|
|
23619
|
+
lexicon: 1,
|
|
23620
|
+
id: "app.bsky.unspecced.getTaggedSuggestions",
|
|
23621
|
+
defs: {
|
|
23622
|
+
main: {
|
|
23623
|
+
type: "query",
|
|
23624
|
+
description: "Get a list of suggestions (feeds and users) tagged with categories",
|
|
23625
|
+
parameters: {
|
|
23626
|
+
type: "params",
|
|
23627
|
+
properties: {}
|
|
23628
|
+
},
|
|
23629
|
+
output: {
|
|
23630
|
+
encoding: "application/json",
|
|
23631
|
+
schema: {
|
|
23632
|
+
type: "object",
|
|
23633
|
+
required: ["suggestions"],
|
|
23634
|
+
properties: {
|
|
23635
|
+
suggestions: {
|
|
23636
|
+
type: "array",
|
|
23637
|
+
items: {
|
|
23638
|
+
type: "ref",
|
|
23639
|
+
ref: "lex:app.bsky.unspecced.getTaggedSuggestions#suggestion"
|
|
23640
|
+
}
|
|
23641
|
+
}
|
|
23642
|
+
}
|
|
23643
|
+
}
|
|
23644
|
+
}
|
|
23645
|
+
},
|
|
23646
|
+
suggestion: {
|
|
23647
|
+
type: "object",
|
|
23648
|
+
required: ["tag", "subjectType", "subject"],
|
|
23649
|
+
properties: {
|
|
23650
|
+
tag: {
|
|
23651
|
+
type: "string"
|
|
23652
|
+
},
|
|
23653
|
+
subjectType: {
|
|
23654
|
+
type: "string",
|
|
23655
|
+
knownValues: ["actor", "feed"]
|
|
23656
|
+
},
|
|
23657
|
+
subject: {
|
|
23658
|
+
type: "string",
|
|
23659
|
+
format: "uri"
|
|
23660
|
+
}
|
|
23661
|
+
}
|
|
23662
|
+
}
|
|
23663
|
+
}
|
|
23664
|
+
},
|
|
23506
23665
|
AppBskyUnspeccedGetTimelineSkeleton: {
|
|
23507
23666
|
lexicon: 1,
|
|
23508
23667
|
id: "app.bsky.unspecced.getTimelineSkeleton",
|
|
@@ -25298,12 +25457,31 @@ function toKnownErr103(e) {
|
|
|
25298
25457
|
return e;
|
|
25299
25458
|
}
|
|
25300
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
|
+
|
|
25301
25479
|
// src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts
|
|
25302
25480
|
var getSuggestedFollowsByActor_exports = {};
|
|
25303
25481
|
__export(getSuggestedFollowsByActor_exports, {
|
|
25304
|
-
toKnownErr: () =>
|
|
25482
|
+
toKnownErr: () => toKnownErr105
|
|
25305
25483
|
});
|
|
25306
|
-
function
|
|
25484
|
+
function toKnownErr105(e) {
|
|
25307
25485
|
if (e instanceof XRPCError) {
|
|
25308
25486
|
}
|
|
25309
25487
|
return e;
|
|
@@ -25312,9 +25490,9 @@ function toKnownErr104(e) {
|
|
|
25312
25490
|
// src/client/types/app/bsky/graph/muteActor.ts
|
|
25313
25491
|
var muteActor_exports = {};
|
|
25314
25492
|
__export(muteActor_exports, {
|
|
25315
|
-
toKnownErr: () =>
|
|
25493
|
+
toKnownErr: () => toKnownErr106
|
|
25316
25494
|
});
|
|
25317
|
-
function
|
|
25495
|
+
function toKnownErr106(e) {
|
|
25318
25496
|
if (e instanceof XRPCError) {
|
|
25319
25497
|
}
|
|
25320
25498
|
return e;
|
|
@@ -25323,9 +25501,9 @@ function toKnownErr105(e) {
|
|
|
25323
25501
|
// src/client/types/app/bsky/graph/muteActorList.ts
|
|
25324
25502
|
var muteActorList_exports = {};
|
|
25325
25503
|
__export(muteActorList_exports, {
|
|
25326
|
-
toKnownErr: () =>
|
|
25504
|
+
toKnownErr: () => toKnownErr107
|
|
25327
25505
|
});
|
|
25328
|
-
function
|
|
25506
|
+
function toKnownErr107(e) {
|
|
25329
25507
|
if (e instanceof XRPCError) {
|
|
25330
25508
|
}
|
|
25331
25509
|
return e;
|
|
@@ -25334,9 +25512,9 @@ function toKnownErr106(e) {
|
|
|
25334
25512
|
// src/client/types/app/bsky/graph/unmuteActor.ts
|
|
25335
25513
|
var unmuteActor_exports = {};
|
|
25336
25514
|
__export(unmuteActor_exports, {
|
|
25337
|
-
toKnownErr: () =>
|
|
25515
|
+
toKnownErr: () => toKnownErr108
|
|
25338
25516
|
});
|
|
25339
|
-
function
|
|
25517
|
+
function toKnownErr108(e) {
|
|
25340
25518
|
if (e instanceof XRPCError) {
|
|
25341
25519
|
}
|
|
25342
25520
|
return e;
|
|
@@ -25345,9 +25523,9 @@ function toKnownErr107(e) {
|
|
|
25345
25523
|
// src/client/types/app/bsky/graph/unmuteActorList.ts
|
|
25346
25524
|
var unmuteActorList_exports = {};
|
|
25347
25525
|
__export(unmuteActorList_exports, {
|
|
25348
|
-
toKnownErr: () =>
|
|
25526
|
+
toKnownErr: () => toKnownErr109
|
|
25349
25527
|
});
|
|
25350
|
-
function
|
|
25528
|
+
function toKnownErr109(e) {
|
|
25351
25529
|
if (e instanceof XRPCError) {
|
|
25352
25530
|
}
|
|
25353
25531
|
return e;
|
|
@@ -25356,9 +25534,9 @@ function toKnownErr108(e) {
|
|
|
25356
25534
|
// src/client/types/app/bsky/notification/getUnreadCount.ts
|
|
25357
25535
|
var getUnreadCount_exports = {};
|
|
25358
25536
|
__export(getUnreadCount_exports, {
|
|
25359
|
-
toKnownErr: () =>
|
|
25537
|
+
toKnownErr: () => toKnownErr110
|
|
25360
25538
|
});
|
|
25361
|
-
function
|
|
25539
|
+
function toKnownErr110(e) {
|
|
25362
25540
|
if (e instanceof XRPCError) {
|
|
25363
25541
|
}
|
|
25364
25542
|
return e;
|
|
@@ -25368,10 +25546,10 @@ function toKnownErr109(e) {
|
|
|
25368
25546
|
var listNotifications_exports = {};
|
|
25369
25547
|
__export(listNotifications_exports, {
|
|
25370
25548
|
isNotification: () => isNotification,
|
|
25371
|
-
toKnownErr: () =>
|
|
25549
|
+
toKnownErr: () => toKnownErr111,
|
|
25372
25550
|
validateNotification: () => validateNotification
|
|
25373
25551
|
});
|
|
25374
|
-
function
|
|
25552
|
+
function toKnownErr111(e) {
|
|
25375
25553
|
if (e instanceof XRPCError) {
|
|
25376
25554
|
}
|
|
25377
25555
|
return e;
|
|
@@ -25386,9 +25564,9 @@ function validateNotification(v) {
|
|
|
25386
25564
|
// src/client/types/app/bsky/notification/registerPush.ts
|
|
25387
25565
|
var registerPush_exports = {};
|
|
25388
25566
|
__export(registerPush_exports, {
|
|
25389
|
-
toKnownErr: () =>
|
|
25567
|
+
toKnownErr: () => toKnownErr112
|
|
25390
25568
|
});
|
|
25391
|
-
function
|
|
25569
|
+
function toKnownErr112(e) {
|
|
25392
25570
|
if (e instanceof XRPCError) {
|
|
25393
25571
|
}
|
|
25394
25572
|
return e;
|
|
@@ -25397,9 +25575,9 @@ function toKnownErr111(e) {
|
|
|
25397
25575
|
// src/client/types/app/bsky/notification/updateSeen.ts
|
|
25398
25576
|
var updateSeen_exports = {};
|
|
25399
25577
|
__export(updateSeen_exports, {
|
|
25400
|
-
toKnownErr: () =>
|
|
25578
|
+
toKnownErr: () => toKnownErr113
|
|
25401
25579
|
});
|
|
25402
|
-
function
|
|
25580
|
+
function toKnownErr113(e) {
|
|
25403
25581
|
if (e instanceof XRPCError) {
|
|
25404
25582
|
}
|
|
25405
25583
|
return e;
|
|
@@ -25408,26 +25586,45 @@ function toKnownErr112(e) {
|
|
|
25408
25586
|
// src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts
|
|
25409
25587
|
var getPopularFeedGenerators_exports = {};
|
|
25410
25588
|
__export(getPopularFeedGenerators_exports, {
|
|
25411
|
-
toKnownErr: () =>
|
|
25589
|
+
toKnownErr: () => toKnownErr114
|
|
25412
25590
|
});
|
|
25413
|
-
function
|
|
25591
|
+
function toKnownErr114(e) {
|
|
25414
25592
|
if (e instanceof XRPCError) {
|
|
25415
25593
|
}
|
|
25416
25594
|
return e;
|
|
25417
25595
|
}
|
|
25418
25596
|
|
|
25597
|
+
// src/client/types/app/bsky/unspecced/getTaggedSuggestions.ts
|
|
25598
|
+
var getTaggedSuggestions_exports = {};
|
|
25599
|
+
__export(getTaggedSuggestions_exports, {
|
|
25600
|
+
isSuggestion: () => isSuggestion,
|
|
25601
|
+
toKnownErr: () => toKnownErr115,
|
|
25602
|
+
validateSuggestion: () => validateSuggestion
|
|
25603
|
+
});
|
|
25604
|
+
function toKnownErr115(e) {
|
|
25605
|
+
if (e instanceof XRPCError) {
|
|
25606
|
+
}
|
|
25607
|
+
return e;
|
|
25608
|
+
}
|
|
25609
|
+
function isSuggestion(v) {
|
|
25610
|
+
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.unspecced.getTaggedSuggestions#suggestion";
|
|
25611
|
+
}
|
|
25612
|
+
function validateSuggestion(v) {
|
|
25613
|
+
return lexicons.validate("app.bsky.unspecced.getTaggedSuggestions#suggestion", v);
|
|
25614
|
+
}
|
|
25615
|
+
|
|
25419
25616
|
// src/client/types/app/bsky/unspecced/getTimelineSkeleton.ts
|
|
25420
25617
|
var getTimelineSkeleton_exports = {};
|
|
25421
25618
|
__export(getTimelineSkeleton_exports, {
|
|
25422
25619
|
UnknownFeedError: () => UnknownFeedError3,
|
|
25423
|
-
toKnownErr: () =>
|
|
25620
|
+
toKnownErr: () => toKnownErr116
|
|
25424
25621
|
});
|
|
25425
25622
|
var UnknownFeedError3 = class extends XRPCError {
|
|
25426
25623
|
constructor(src2) {
|
|
25427
25624
|
super(src2.status, src2.error, src2.message, src2.headers);
|
|
25428
25625
|
}
|
|
25429
25626
|
};
|
|
25430
|
-
function
|
|
25627
|
+
function toKnownErr116(e) {
|
|
25431
25628
|
if (e instanceof XRPCError) {
|
|
25432
25629
|
if (e.error === "UnknownFeed")
|
|
25433
25630
|
return new UnknownFeedError3(e);
|
|
@@ -25439,14 +25636,14 @@ function toKnownErr114(e) {
|
|
|
25439
25636
|
var searchActorsSkeleton_exports = {};
|
|
25440
25637
|
__export(searchActorsSkeleton_exports, {
|
|
25441
25638
|
BadQueryStringError: () => BadQueryStringError2,
|
|
25442
|
-
toKnownErr: () =>
|
|
25639
|
+
toKnownErr: () => toKnownErr117
|
|
25443
25640
|
});
|
|
25444
25641
|
var BadQueryStringError2 = class extends XRPCError {
|
|
25445
25642
|
constructor(src2) {
|
|
25446
25643
|
super(src2.status, src2.error, src2.message, src2.headers);
|
|
25447
25644
|
}
|
|
25448
25645
|
};
|
|
25449
|
-
function
|
|
25646
|
+
function toKnownErr117(e) {
|
|
25450
25647
|
if (e instanceof XRPCError) {
|
|
25451
25648
|
if (e.error === "BadQueryString")
|
|
25452
25649
|
return new BadQueryStringError2(e);
|
|
@@ -25458,14 +25655,14 @@ function toKnownErr115(e) {
|
|
|
25458
25655
|
var searchPostsSkeleton_exports = {};
|
|
25459
25656
|
__export(searchPostsSkeleton_exports, {
|
|
25460
25657
|
BadQueryStringError: () => BadQueryStringError3,
|
|
25461
|
-
toKnownErr: () =>
|
|
25658
|
+
toKnownErr: () => toKnownErr118
|
|
25462
25659
|
});
|
|
25463
25660
|
var BadQueryStringError3 = class extends XRPCError {
|
|
25464
25661
|
constructor(src2) {
|
|
25465
25662
|
super(src2.status, src2.error, src2.message, src2.headers);
|
|
25466
25663
|
}
|
|
25467
25664
|
};
|
|
25468
|
-
function
|
|
25665
|
+
function toKnownErr118(e) {
|
|
25469
25666
|
if (e instanceof XRPCError) {
|
|
25470
25667
|
if (e.error === "BadQueryString")
|
|
25471
25668
|
return new BadQueryStringError3(e);
|
|
@@ -25902,6 +26099,7 @@ __export(defs_exports5, {
|
|
|
25902
26099
|
isAdultContentPref: () => isAdultContentPref,
|
|
25903
26100
|
isContentLabelPref: () => isContentLabelPref,
|
|
25904
26101
|
isFeedViewPref: () => isFeedViewPref,
|
|
26102
|
+
isInterestsPref: () => isInterestsPref,
|
|
25905
26103
|
isPersonalDetailsPref: () => isPersonalDetailsPref,
|
|
25906
26104
|
isProfileView: () => isProfileView,
|
|
25907
26105
|
isProfileViewBasic: () => isProfileViewBasic,
|
|
@@ -25912,6 +26110,7 @@ __export(defs_exports5, {
|
|
|
25912
26110
|
validateAdultContentPref: () => validateAdultContentPref,
|
|
25913
26111
|
validateContentLabelPref: () => validateContentLabelPref,
|
|
25914
26112
|
validateFeedViewPref: () => validateFeedViewPref,
|
|
26113
|
+
validateInterestsPref: () => validateInterestsPref,
|
|
25915
26114
|
validatePersonalDetailsPref: () => validatePersonalDetailsPref,
|
|
25916
26115
|
validateProfileView: () => validateProfileView,
|
|
25917
26116
|
validateProfileViewBasic: () => validateProfileViewBasic,
|
|
@@ -25980,6 +26179,12 @@ function isThreadViewPref(v) {
|
|
|
25980
26179
|
function validateThreadViewPref(v) {
|
|
25981
26180
|
return lexicons.validate("app.bsky.actor.defs#threadViewPref", v);
|
|
25982
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
|
+
}
|
|
25983
26188
|
|
|
25984
26189
|
// src/client/types/app/bsky/actor/profile.ts
|
|
25985
26190
|
var profile_exports = {};
|
|
@@ -26394,10 +26599,14 @@ __export(defs_exports7, {
|
|
|
26394
26599
|
isListView: () => isListView,
|
|
26395
26600
|
isListViewBasic: () => isListViewBasic,
|
|
26396
26601
|
isListViewerState: () => isListViewerState,
|
|
26602
|
+
isNotFoundActor: () => isNotFoundActor,
|
|
26603
|
+
isRelationship: () => isRelationship,
|
|
26397
26604
|
validateListItemView: () => validateListItemView,
|
|
26398
26605
|
validateListView: () => validateListView,
|
|
26399
26606
|
validateListViewBasic: () => validateListViewBasic,
|
|
26400
|
-
validateListViewerState: () => validateListViewerState
|
|
26607
|
+
validateListViewerState: () => validateListViewerState,
|
|
26608
|
+
validateNotFoundActor: () => validateNotFoundActor,
|
|
26609
|
+
validateRelationship: () => validateRelationship
|
|
26401
26610
|
});
|
|
26402
26611
|
function isListViewBasic(v) {
|
|
26403
26612
|
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.graph.defs#listViewBasic";
|
|
@@ -26425,6 +26634,18 @@ function isListViewerState(v) {
|
|
|
26425
26634
|
function validateListViewerState(v) {
|
|
26426
26635
|
return lexicons.validate("app.bsky.graph.defs#listViewerState", v);
|
|
26427
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
|
+
}
|
|
26428
26649
|
|
|
26429
26650
|
// src/client/types/app/bsky/graph/follow.ts
|
|
26430
26651
|
var follow_exports = {};
|
|
@@ -27367,29 +27588,34 @@ var AppBskyGraphNS = class {
|
|
|
27367
27588
|
throw toKnownErr103(e);
|
|
27368
27589
|
});
|
|
27369
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
|
+
}
|
|
27370
27596
|
getSuggestedFollowsByActor(params2, opts) {
|
|
27371
27597
|
return this._service.xrpc.call("app.bsky.graph.getSuggestedFollowsByActor", params2, void 0, opts).catch((e) => {
|
|
27372
|
-
throw
|
|
27598
|
+
throw toKnownErr105(e);
|
|
27373
27599
|
});
|
|
27374
27600
|
}
|
|
27375
27601
|
muteActor(data, opts) {
|
|
27376
27602
|
return this._service.xrpc.call("app.bsky.graph.muteActor", opts?.qp, data, opts).catch((e) => {
|
|
27377
|
-
throw
|
|
27603
|
+
throw toKnownErr106(e);
|
|
27378
27604
|
});
|
|
27379
27605
|
}
|
|
27380
27606
|
muteActorList(data, opts) {
|
|
27381
27607
|
return this._service.xrpc.call("app.bsky.graph.muteActorList", opts?.qp, data, opts).catch((e) => {
|
|
27382
|
-
throw
|
|
27608
|
+
throw toKnownErr107(e);
|
|
27383
27609
|
});
|
|
27384
27610
|
}
|
|
27385
27611
|
unmuteActor(data, opts) {
|
|
27386
27612
|
return this._service.xrpc.call("app.bsky.graph.unmuteActor", opts?.qp, data, opts).catch((e) => {
|
|
27387
|
-
throw
|
|
27613
|
+
throw toKnownErr108(e);
|
|
27388
27614
|
});
|
|
27389
27615
|
}
|
|
27390
27616
|
unmuteActorList(data, opts) {
|
|
27391
27617
|
return this._service.xrpc.call("app.bsky.graph.unmuteActorList", opts?.qp, data, opts).catch((e) => {
|
|
27392
|
-
throw
|
|
27618
|
+
throw toKnownErr109(e);
|
|
27393
27619
|
});
|
|
27394
27620
|
}
|
|
27395
27621
|
};
|
|
@@ -27534,22 +27760,22 @@ var AppBskyNotificationNS = class {
|
|
|
27534
27760
|
}
|
|
27535
27761
|
getUnreadCount(params2, opts) {
|
|
27536
27762
|
return this._service.xrpc.call("app.bsky.notification.getUnreadCount", params2, void 0, opts).catch((e) => {
|
|
27537
|
-
throw
|
|
27763
|
+
throw toKnownErr110(e);
|
|
27538
27764
|
});
|
|
27539
27765
|
}
|
|
27540
27766
|
listNotifications(params2, opts) {
|
|
27541
27767
|
return this._service.xrpc.call("app.bsky.notification.listNotifications", params2, void 0, opts).catch((e) => {
|
|
27542
|
-
throw
|
|
27768
|
+
throw toKnownErr111(e);
|
|
27543
27769
|
});
|
|
27544
27770
|
}
|
|
27545
27771
|
registerPush(data, opts) {
|
|
27546
27772
|
return this._service.xrpc.call("app.bsky.notification.registerPush", opts?.qp, data, opts).catch((e) => {
|
|
27547
|
-
throw
|
|
27773
|
+
throw toKnownErr112(e);
|
|
27548
27774
|
});
|
|
27549
27775
|
}
|
|
27550
27776
|
updateSeen(data, opts) {
|
|
27551
27777
|
return this._service.xrpc.call("app.bsky.notification.updateSeen", opts?.qp, data, opts).catch((e) => {
|
|
27552
|
-
throw
|
|
27778
|
+
throw toKnownErr113(e);
|
|
27553
27779
|
});
|
|
27554
27780
|
}
|
|
27555
27781
|
};
|
|
@@ -27564,22 +27790,27 @@ var AppBskyUnspeccedNS = class {
|
|
|
27564
27790
|
}
|
|
27565
27791
|
getPopularFeedGenerators(params2, opts) {
|
|
27566
27792
|
return this._service.xrpc.call("app.bsky.unspecced.getPopularFeedGenerators", params2, void 0, opts).catch((e) => {
|
|
27567
|
-
throw
|
|
27793
|
+
throw toKnownErr114(e);
|
|
27794
|
+
});
|
|
27795
|
+
}
|
|
27796
|
+
getTaggedSuggestions(params2, opts) {
|
|
27797
|
+
return this._service.xrpc.call("app.bsky.unspecced.getTaggedSuggestions", params2, void 0, opts).catch((e) => {
|
|
27798
|
+
throw toKnownErr115(e);
|
|
27568
27799
|
});
|
|
27569
27800
|
}
|
|
27570
27801
|
getTimelineSkeleton(params2, opts) {
|
|
27571
27802
|
return this._service.xrpc.call("app.bsky.unspecced.getTimelineSkeleton", params2, void 0, opts).catch((e) => {
|
|
27572
|
-
throw
|
|
27803
|
+
throw toKnownErr116(e);
|
|
27573
27804
|
});
|
|
27574
27805
|
}
|
|
27575
27806
|
searchActorsSkeleton(params2, opts) {
|
|
27576
27807
|
return this._service.xrpc.call("app.bsky.unspecced.searchActorsSkeleton", params2, void 0, opts).catch((e) => {
|
|
27577
|
-
throw
|
|
27808
|
+
throw toKnownErr117(e);
|
|
27578
27809
|
});
|
|
27579
27810
|
}
|
|
27580
27811
|
searchPostsSkeleton(params2, opts) {
|
|
27581
27812
|
return this._service.xrpc.call("app.bsky.unspecced.searchPostsSkeleton", params2, void 0, opts).catch((e) => {
|
|
27582
|
-
throw
|
|
27813
|
+
throw toKnownErr118(e);
|
|
27583
27814
|
});
|
|
27584
27815
|
}
|
|
27585
27816
|
};
|
|
@@ -31266,7 +31497,10 @@ var BskyAgent = class extends AtpAgent {
|
|
|
31266
31497
|
threadViewPrefs: { ...THREAD_VIEW_PREF_DEFAULTS },
|
|
31267
31498
|
adultContentEnabled: false,
|
|
31268
31499
|
contentLabels: {},
|
|
31269
|
-
birthDate: void 0
|
|
31500
|
+
birthDate: void 0,
|
|
31501
|
+
interests: {
|
|
31502
|
+
tags: []
|
|
31503
|
+
}
|
|
31270
31504
|
};
|
|
31271
31505
|
const res = await this.app.bsky.actor.getPreferences({});
|
|
31272
31506
|
for (const pref of res.data.preferences) {
|
|
@@ -31293,6 +31527,9 @@ var BskyAgent = class extends AtpAgent {
|
|
|
31293
31527
|
} else if (defs_exports5.isThreadViewPref(pref) && defs_exports5.validateThreadViewPref(pref).success) {
|
|
31294
31528
|
const { $type, ...v } = pref;
|
|
31295
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 };
|
|
31296
31533
|
}
|
|
31297
31534
|
}
|
|
31298
31535
|
return prefs;
|
|
@@ -31394,6 +31631,15 @@ var BskyAgent = class extends AtpAgent {
|
|
|
31394
31631
|
return prefs.filter((p) => !defs_exports5.isThreadViewPref(p)).concat([{ ...pref, $type: "app.bsky.actor.defs#threadViewPref" }]);
|
|
31395
31632
|
});
|
|
31396
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
|
+
}
|
|
31397
31643
|
};
|
|
31398
31644
|
async function updatePreferences(agent, cb) {
|
|
31399
31645
|
const res = await agent.app.bsky.actor.getPreferences({});
|