@atproto/bsky 0.0.5 → 0.0.7

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atproto/bsky
2
2
 
3
+ ## 0.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`56e2cf89`](https://github.com/bluesky-social/atproto/commit/56e2cf8999f6d7522529a9be8652c47545f82242)]:
8
+ - @atproto/api@0.6.16
9
+
10
+ ## 0.0.6
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`2cc329f2`](https://github.com/bluesky-social/atproto/commit/2cc329f26547217dd94b6bb11ee590d707cbd14f)]:
15
+ - @atproto/api@0.6.15
16
+
3
17
  ## 0.0.5
4
18
 
5
19
  ### Patch Changes
package/README.md CHANGED
@@ -1,3 +1,10 @@
1
- # Bsky App View
1
+ # @atproto/bsky: Bluesky AppView Service
2
2
 
3
- The Bsky App View. This contains the indexers and XRPC methods for reading data from the Bsky application.
3
+ TypeScript implementation of the `app.bsky` Lexicons backing the https://bsky.app microblogging application.
4
+
5
+ [![NPM](https://img.shields.io/npm/v/@atproto/bsky)](https://www.npmjs.com/package/@atproto/bsky)
6
+ [![Github CI Status](https://github.com/bluesky-social/atproto/actions/workflows/repo.yaml/badge.svg)](https://github.com/bluesky-social/atproto/actions/workflows/repo.yaml)
7
+
8
+ ## License
9
+
10
+ MIT License
package/dist/index.js CHANGED
@@ -105127,7 +105127,7 @@ var lexObject = z.object({
105127
105127
  description: z.string().optional(),
105128
105128
  required: z.string().array().optional(),
105129
105129
  nullable: z.string().array().optional(),
105130
- properties: z.record(z.union([lexRefVariant, lexIpldType, lexArray, lexBlob, lexPrimitive])).optional()
105130
+ properties: z.record(z.union([lexRefVariant, lexIpldType, lexArray, lexBlob, lexPrimitive]))
105131
105131
  }).strict().superRefine(requiredPropertiesRefinement);
105132
105132
  var lexXrpcParameters = z.object({
105133
105133
  type: z.literal("params"),
@@ -105822,7 +105822,7 @@ var XRPCError2 = class extends Error {
105822
105822
  }
105823
105823
  };
105824
105824
  function isHandlerError(v) {
105825
- return handlerError.safeParse(v).success;
105825
+ return !!v && typeof v === "object" && typeof v["status"] === "number" && (v["error"] === void 0 || typeof v["error"] === "string") && (v["message"] === void 0 || typeof v["message"] === "string");
105826
105826
  }
105827
105827
  var InvalidRequestError = class extends XRPCError2 {
105828
105828
  constructor(errorMessage, customErrorName) {
@@ -110783,7 +110783,8 @@ var Server = class {
110783
110783
  if (config2.rateLimit) {
110784
110784
  const limits = Array.isArray(config2.rateLimit) ? config2.rateLimit : [config2.rateLimit];
110785
110785
  this.routeRateLimiterFns[nsid2] = [];
110786
- for (const limit of limits) {
110786
+ for (let i = 0; i < limits.length; i++) {
110787
+ const limit = limits[i];
110787
110788
  const { calcKey, calcPoints } = limit;
110788
110789
  if (isShared(limit)) {
110789
110790
  const rateLimiter = this.sharedRateLimiters[limit.name];
@@ -110797,7 +110798,7 @@ var Server = class {
110797
110798
  } else {
110798
110799
  const { durationMs, points } = limit;
110799
110800
  const rateLimiter = this.options.rateLimits?.creator({
110800
- keyPrefix: nsid2,
110801
+ keyPrefix: `nsid-${i}`,
110801
110802
  durationMs,
110802
110803
  points,
110803
110804
  calcKey,
@@ -122426,7 +122427,9 @@ var schemaDict = {
122426
122427
  "lex:app.bsky.actor.defs#adultContentPref",
122427
122428
  "lex:app.bsky.actor.defs#contentLabelPref",
122428
122429
  "lex:app.bsky.actor.defs#savedFeedsPref",
122429
- "lex:app.bsky.actor.defs#personalDetailsPref"
122430
+ "lex:app.bsky.actor.defs#personalDetailsPref",
122431
+ "lex:app.bsky.actor.defs#feedViewPref",
122432
+ "lex:app.bsky.actor.defs#threadViewPref"
122430
122433
  ]
122431
122434
  }
122432
122435
  },
@@ -122482,6 +122485,50 @@ var schemaDict = {
122482
122485
  description: "The birth date of the owner of the account."
122483
122486
  }
122484
122487
  }
122488
+ },
122489
+ feedViewPref: {
122490
+ type: "object",
122491
+ required: ["feed"],
122492
+ properties: {
122493
+ feed: {
122494
+ type: "string",
122495
+ description: "The URI of the feed, or an identifier which describes the feed."
122496
+ },
122497
+ hideReplies: {
122498
+ type: "boolean",
122499
+ description: "Hide replies in the feed."
122500
+ },
122501
+ hideRepliesByUnfollowed: {
122502
+ type: "boolean",
122503
+ description: "Hide replies in the feed if they are not by followed users."
122504
+ },
122505
+ hideRepliesByLikeCount: {
122506
+ type: "integer",
122507
+ description: "Hide replies in the feed if they do not have this number of likes."
122508
+ },
122509
+ hideReposts: {
122510
+ type: "boolean",
122511
+ description: "Hide reposts in the feed."
122512
+ },
122513
+ hideQuotePosts: {
122514
+ type: "boolean",
122515
+ description: "Hide quote posts in the feed."
122516
+ }
122517
+ }
122518
+ },
122519
+ threadViewPref: {
122520
+ type: "object",
122521
+ properties: {
122522
+ sort: {
122523
+ type: "string",
122524
+ description: "Sorting mode.",
122525
+ knownValues: ["oldest", "newest", "most-likes", "random"]
122526
+ },
122527
+ prioritizeFollowedUsers: {
122528
+ type: "boolean",
122529
+ description: "Show followed users at the top of all replies."
122530
+ }
122531
+ }
122485
122532
  }
122486
122533
  }
122487
122534
  },
@@ -124422,11 +124469,13 @@ var schemaDict = {
124422
124469
  },
124423
124470
  mentionRule: {
124424
124471
  type: "object",
124425
- description: "Allow replies from actors mentioned in your post."
124472
+ description: "Allow replies from actors mentioned in your post.",
124473
+ properties: {}
124426
124474
  },
124427
124475
  followingRule: {
124428
124476
  type: "object",
124429
- description: "Allow replies from actors you follow."
124477
+ description: "Allow replies from actors you follow.",
124478
+ properties: {}
124430
124479
  },
124431
124480
  listRule: {
124432
124481
  type: "object",
@@ -125513,7 +125562,7 @@ var schemaDict = {
125513
125562
  defs: {
125514
125563
  main: {
125515
125564
  type: "query",
125516
- description: "An unspecced view of globally popular items",
125565
+ description: "DEPRECATED: will be removed soon, please find a feed generator alternative",
125517
125566
  parameters: {
125518
125567
  type: "params",
125519
125568
  properties: {
@@ -132660,7 +132709,9 @@ var schemaDict2 = {
132660
132709
  "lex:app.bsky.actor.defs#adultContentPref",
132661
132710
  "lex:app.bsky.actor.defs#contentLabelPref",
132662
132711
  "lex:app.bsky.actor.defs#savedFeedsPref",
132663
- "lex:app.bsky.actor.defs#personalDetailsPref"
132712
+ "lex:app.bsky.actor.defs#personalDetailsPref",
132713
+ "lex:app.bsky.actor.defs#feedViewPref",
132714
+ "lex:app.bsky.actor.defs#threadViewPref"
132664
132715
  ]
132665
132716
  }
132666
132717
  },
@@ -132716,6 +132767,50 @@ var schemaDict2 = {
132716
132767
  description: "The birth date of the owner of the account."
132717
132768
  }
132718
132769
  }
132770
+ },
132771
+ feedViewPref: {
132772
+ type: "object",
132773
+ required: ["feed"],
132774
+ properties: {
132775
+ feed: {
132776
+ type: "string",
132777
+ description: "The URI of the feed, or an identifier which describes the feed."
132778
+ },
132779
+ hideReplies: {
132780
+ type: "boolean",
132781
+ description: "Hide replies in the feed."
132782
+ },
132783
+ hideRepliesByUnfollowed: {
132784
+ type: "boolean",
132785
+ description: "Hide replies in the feed if they are not by followed users."
132786
+ },
132787
+ hideRepliesByLikeCount: {
132788
+ type: "integer",
132789
+ description: "Hide replies in the feed if they do not have this number of likes."
132790
+ },
132791
+ hideReposts: {
132792
+ type: "boolean",
132793
+ description: "Hide reposts in the feed."
132794
+ },
132795
+ hideQuotePosts: {
132796
+ type: "boolean",
132797
+ description: "Hide quote posts in the feed."
132798
+ }
132799
+ }
132800
+ },
132801
+ threadViewPref: {
132802
+ type: "object",
132803
+ properties: {
132804
+ sort: {
132805
+ type: "string",
132806
+ description: "Sorting mode.",
132807
+ knownValues: ["oldest", "newest", "most-likes", "random"]
132808
+ },
132809
+ prioritizeFollowedUsers: {
132810
+ type: "boolean",
132811
+ description: "Show followed users at the top of all replies."
132812
+ }
132813
+ }
132719
132814
  }
132720
132815
  }
132721
132816
  },
@@ -134656,11 +134751,13 @@ var schemaDict2 = {
134656
134751
  },
134657
134752
  mentionRule: {
134658
134753
  type: "object",
134659
- description: "Allow replies from actors mentioned in your post."
134754
+ description: "Allow replies from actors mentioned in your post.",
134755
+ properties: {}
134660
134756
  },
134661
134757
  followingRule: {
134662
134758
  type: "object",
134663
- description: "Allow replies from actors you follow."
134759
+ description: "Allow replies from actors you follow.",
134760
+ properties: {}
134664
134761
  },
134665
134762
  listRule: {
134666
134763
  type: "object",
@@ -135747,7 +135844,7 @@ var schemaDict2 = {
135747
135844
  defs: {
135748
135845
  main: {
135749
135846
  type: "query",
135750
- description: "An unspecced view of globally popular items",
135847
+ description: "DEPRECATED: will be removed soon, please find a feed generator alternative",
135751
135848
  parameters: {
135752
135849
  type: "params",
135753
135850
  properties: {