@atproto/api 0.2.8 → 0.2.9

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.
@@ -61,6 +61,7 @@ import * as AppBskyActorSearchActorsTypeahead from './types/app/bsky/actor/searc
61
61
  import * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed';
62
62
  import * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes';
63
63
  import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread';
64
+ import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts';
64
65
  import * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy';
65
66
  import * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline';
66
67
  import * as AppBskyFeedLike from './types/app/bsky/feed/like';
@@ -151,6 +152,7 @@ export * as AppBskyFeedDefs from './types/app/bsky/feed/defs';
151
152
  export * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed';
152
153
  export * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes';
153
154
  export * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread';
155
+ export * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts';
154
156
  export * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy';
155
157
  export * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline';
156
158
  export * as AppBskyFeedLike from './types/app/bsky/feed/like';
@@ -350,6 +352,7 @@ export declare class FeedNS {
350
352
  getAuthorFeed(params?: AppBskyFeedGetAuthorFeed.QueryParams, opts?: AppBskyFeedGetAuthorFeed.CallOptions): Promise<AppBskyFeedGetAuthorFeed.Response>;
351
353
  getLikes(params?: AppBskyFeedGetLikes.QueryParams, opts?: AppBskyFeedGetLikes.CallOptions): Promise<AppBskyFeedGetLikes.Response>;
352
354
  getPostThread(params?: AppBskyFeedGetPostThread.QueryParams, opts?: AppBskyFeedGetPostThread.CallOptions): Promise<AppBskyFeedGetPostThread.Response>;
355
+ getPosts(params?: AppBskyFeedGetPosts.QueryParams, opts?: AppBskyFeedGetPosts.CallOptions): Promise<AppBskyFeedGetPosts.Response>;
353
356
  getRepostedBy(params?: AppBskyFeedGetRepostedBy.QueryParams, opts?: AppBskyFeedGetRepostedBy.CallOptions): Promise<AppBskyFeedGetRepostedBy.Response>;
354
357
  getTimeline(params?: AppBskyFeedGetTimeline.QueryParams, opts?: AppBskyFeedGetTimeline.CallOptions): Promise<AppBskyFeedGetTimeline.Response>;
355
358
  }
@@ -3957,6 +3957,46 @@ export declare const schemaDict: {
3957
3957
  };
3958
3958
  };
3959
3959
  };
3960
+ AppBskyFeedGetPosts: {
3961
+ lexicon: number;
3962
+ id: string;
3963
+ defs: {
3964
+ main: {
3965
+ type: string;
3966
+ description: string;
3967
+ parameters: {
3968
+ type: string;
3969
+ required: string[];
3970
+ properties: {
3971
+ uris: {
3972
+ type: string;
3973
+ items: {
3974
+ type: string;
3975
+ format: string;
3976
+ };
3977
+ maxLength: number;
3978
+ };
3979
+ };
3980
+ };
3981
+ output: {
3982
+ encoding: string;
3983
+ schema: {
3984
+ type: string;
3985
+ required: string[];
3986
+ properties: {
3987
+ posts: {
3988
+ type: string;
3989
+ items: {
3990
+ type: string;
3991
+ ref: string;
3992
+ };
3993
+ };
3994
+ };
3995
+ };
3996
+ };
3997
+ };
3998
+ };
3999
+ };
3960
4000
  AppBskyFeedGetRepostedBy: {
3961
4001
  lexicon: number;
3962
4002
  id: string;
@@ -4748,6 +4788,7 @@ export declare const ids: {
4748
4788
  AppBskyFeedGetAuthorFeed: string;
4749
4789
  AppBskyFeedGetLikes: string;
4750
4790
  AppBskyFeedGetPostThread: string;
4791
+ AppBskyFeedGetPosts: string;
4751
4792
  AppBskyFeedGetRepostedBy: string;
4752
4793
  AppBskyFeedGetTimeline: string;
4753
4794
  AppBskyFeedLike: string;
@@ -0,0 +1,19 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import * as AppBskyFeedDefs from './defs';
3
+ export interface QueryParams {
4
+ uris: string[];
5
+ }
6
+ export declare type InputSchema = undefined;
7
+ export interface OutputSchema {
8
+ posts: AppBskyFeedDefs.PostView[];
9
+ [k: string]: unknown;
10
+ }
11
+ export interface CallOptions {
12
+ headers?: Headers;
13
+ }
14
+ export interface Response {
15
+ success: boolean;
16
+ headers: Headers;
17
+ data: OutputSchema;
18
+ }
19
+ export declare function toKnownErr(e: any): any;
package/dist/index.js CHANGED
@@ -95,6 +95,7 @@ __export(src_exports4, {
95
95
  AppBskyFeedGetAuthorFeed: () => getAuthorFeed_exports,
96
96
  AppBskyFeedGetLikes: () => getLikes_exports,
97
97
  AppBskyFeedGetPostThread: () => getPostThread_exports,
98
+ AppBskyFeedGetPosts: () => getPosts_exports,
98
99
  AppBskyFeedGetRepostedBy: () => getRepostedBy_exports,
99
100
  AppBskyFeedGetTimeline: () => getTimeline_exports,
100
101
  AppBskyFeedLike: () => like_exports,
@@ -5342,7 +5343,57 @@ var famousAccounts = [
5342
5343
  "ukraine",
5343
5344
  "washingtonpost",
5344
5345
  "yousuck2020",
5345
- "zelenskyyua"
5346
+ "zelenskyyua",
5347
+ "akiko_lawson",
5348
+ "ariyoshihiroiki",
5349
+ "asahi",
5350
+ "dozle_official",
5351
+ "famima_now",
5352
+ "ff_xiv_jp",
5353
+ "fujitv",
5354
+ "gigazine",
5355
+ "hajimesyacho",
5356
+ "hikakin",
5357
+ "jocx",
5358
+ "jotx",
5359
+ "kiyo_saiore",
5360
+ "mainichi",
5361
+ "matsu_bouzu",
5362
+ "naomiosaka",
5363
+ "nhk",
5364
+ "nikkei",
5365
+ "nintendo",
5366
+ "ntv",
5367
+ "oowareware1945",
5368
+ "pamyurin",
5369
+ "poke_times",
5370
+ "rolaworld",
5371
+ "seikintv",
5372
+ "starbucksjapan",
5373
+ "tbs",
5374
+ "tbs_pr",
5375
+ "tvasahi",
5376
+ "tvtokyo",
5377
+ "yokoono",
5378
+ "yomiuri_online",
5379
+ "brasildefato",
5380
+ "claudialeitte",
5381
+ "correio",
5382
+ "em_com",
5383
+ "estadao",
5384
+ "folha",
5385
+ "gazetadopovo",
5386
+ "ivetesangalo",
5387
+ "jairbolsonaro",
5388
+ "jornaldobrasil",
5389
+ "jornaloglobo",
5390
+ "lucianohuck",
5391
+ "lulaoficial",
5392
+ "marcosmion",
5393
+ "paulocoelho",
5394
+ "portalr7",
5395
+ "rede_globo",
5396
+ "zerohora"
5346
5397
  ];
5347
5398
  var reservedSubdomains = [
5348
5399
  ...atpSpecific,
@@ -9958,7 +10009,7 @@ var schemaDict = {
9958
10009
  latest: {
9959
10010
  type: "string",
9960
10011
  format: "cid",
9961
- description: "The latest commit you in the commit range (inclusive"
10012
+ description: "The latest commit in the commit range (inclusive)"
9962
10013
  }
9963
10014
  }
9964
10015
  },
@@ -11252,6 +11303,46 @@ var schemaDict = {
11252
11303
  }
11253
11304
  }
11254
11305
  },
11306
+ AppBskyFeedGetPosts: {
11307
+ lexicon: 1,
11308
+ id: "app.bsky.feed.getPosts",
11309
+ defs: {
11310
+ main: {
11311
+ type: "query",
11312
+ description: "A view of an actor's feed.",
11313
+ parameters: {
11314
+ type: "params",
11315
+ required: ["uris"],
11316
+ properties: {
11317
+ uris: {
11318
+ type: "array",
11319
+ items: {
11320
+ type: "string",
11321
+ format: "at-uri"
11322
+ },
11323
+ maxLength: 25
11324
+ }
11325
+ }
11326
+ },
11327
+ output: {
11328
+ encoding: "application/json",
11329
+ schema: {
11330
+ type: "object",
11331
+ required: ["posts"],
11332
+ properties: {
11333
+ posts: {
11334
+ type: "array",
11335
+ items: {
11336
+ type: "ref",
11337
+ ref: "lex:app.bsky.feed.defs#postView"
11338
+ }
11339
+ }
11340
+ }
11341
+ }
11342
+ }
11343
+ }
11344
+ }
11345
+ },
11255
11346
  AppBskyFeedGetRepostedBy: {
11256
11347
  lexicon: 1,
11257
11348
  id: "app.bsky.feed.getRepostedBy",
@@ -12918,12 +13009,23 @@ function toKnownErr61(e) {
12918
13009
  return e;
12919
13010
  }
12920
13011
 
13012
+ // src/client/types/app/bsky/feed/getPosts.ts
13013
+ var getPosts_exports = {};
13014
+ __export(getPosts_exports, {
13015
+ toKnownErr: () => toKnownErr62
13016
+ });
13017
+ function toKnownErr62(e) {
13018
+ if (e instanceof XRPCError) {
13019
+ }
13020
+ return e;
13021
+ }
13022
+
12921
13023
  // src/client/types/app/bsky/feed/getRepostedBy.ts
12922
13024
  var getRepostedBy_exports = {};
12923
13025
  __export(getRepostedBy_exports, {
12924
- toKnownErr: () => toKnownErr62
13026
+ toKnownErr: () => toKnownErr63
12925
13027
  });
12926
- function toKnownErr62(e) {
13028
+ function toKnownErr63(e) {
12927
13029
  if (e instanceof XRPCError) {
12928
13030
  }
12929
13031
  return e;
@@ -12932,9 +13034,9 @@ function toKnownErr62(e) {
12932
13034
  // src/client/types/app/bsky/feed/getTimeline.ts
12933
13035
  var getTimeline_exports = {};
12934
13036
  __export(getTimeline_exports, {
12935
- toKnownErr: () => toKnownErr63
13037
+ toKnownErr: () => toKnownErr64
12936
13038
  });
12937
- function toKnownErr63(e) {
13039
+ function toKnownErr64(e) {
12938
13040
  if (e instanceof XRPCError) {
12939
13041
  }
12940
13042
  return e;
@@ -12943,9 +13045,9 @@ function toKnownErr63(e) {
12943
13045
  // src/client/types/app/bsky/graph/getFollowers.ts
12944
13046
  var getFollowers_exports = {};
12945
13047
  __export(getFollowers_exports, {
12946
- toKnownErr: () => toKnownErr64
13048
+ toKnownErr: () => toKnownErr65
12947
13049
  });
12948
- function toKnownErr64(e) {
13050
+ function toKnownErr65(e) {
12949
13051
  if (e instanceof XRPCError) {
12950
13052
  }
12951
13053
  return e;
@@ -12954,9 +13056,9 @@ function toKnownErr64(e) {
12954
13056
  // src/client/types/app/bsky/graph/getFollows.ts
12955
13057
  var getFollows_exports = {};
12956
13058
  __export(getFollows_exports, {
12957
- toKnownErr: () => toKnownErr65
13059
+ toKnownErr: () => toKnownErr66
12958
13060
  });
12959
- function toKnownErr65(e) {
13061
+ function toKnownErr66(e) {
12960
13062
  if (e instanceof XRPCError) {
12961
13063
  }
12962
13064
  return e;
@@ -12965,9 +13067,9 @@ function toKnownErr65(e) {
12965
13067
  // src/client/types/app/bsky/graph/getMutes.ts
12966
13068
  var getMutes_exports = {};
12967
13069
  __export(getMutes_exports, {
12968
- toKnownErr: () => toKnownErr66
13070
+ toKnownErr: () => toKnownErr67
12969
13071
  });
12970
- function toKnownErr66(e) {
13072
+ function toKnownErr67(e) {
12971
13073
  if (e instanceof XRPCError) {
12972
13074
  }
12973
13075
  return e;
@@ -12976,9 +13078,9 @@ function toKnownErr66(e) {
12976
13078
  // src/client/types/app/bsky/graph/muteActor.ts
12977
13079
  var muteActor_exports = {};
12978
13080
  __export(muteActor_exports, {
12979
- toKnownErr: () => toKnownErr67
13081
+ toKnownErr: () => toKnownErr68
12980
13082
  });
12981
- function toKnownErr67(e) {
13083
+ function toKnownErr68(e) {
12982
13084
  if (e instanceof XRPCError) {
12983
13085
  }
12984
13086
  return e;
@@ -12987,9 +13089,9 @@ function toKnownErr67(e) {
12987
13089
  // src/client/types/app/bsky/graph/unmuteActor.ts
12988
13090
  var unmuteActor_exports = {};
12989
13091
  __export(unmuteActor_exports, {
12990
- toKnownErr: () => toKnownErr68
13092
+ toKnownErr: () => toKnownErr69
12991
13093
  });
12992
- function toKnownErr68(e) {
13094
+ function toKnownErr69(e) {
12993
13095
  if (e instanceof XRPCError) {
12994
13096
  }
12995
13097
  return e;
@@ -12998,9 +13100,9 @@ function toKnownErr68(e) {
12998
13100
  // src/client/types/app/bsky/notification/getUnreadCount.ts
12999
13101
  var getUnreadCount_exports = {};
13000
13102
  __export(getUnreadCount_exports, {
13001
- toKnownErr: () => toKnownErr69
13103
+ toKnownErr: () => toKnownErr70
13002
13104
  });
13003
- function toKnownErr69(e) {
13105
+ function toKnownErr70(e) {
13004
13106
  if (e instanceof XRPCError) {
13005
13107
  }
13006
13108
  return e;
@@ -13010,10 +13112,10 @@ function toKnownErr69(e) {
13010
13112
  var listNotifications_exports = {};
13011
13113
  __export(listNotifications_exports, {
13012
13114
  isNotification: () => isNotification,
13013
- toKnownErr: () => toKnownErr70,
13115
+ toKnownErr: () => toKnownErr71,
13014
13116
  validateNotification: () => validateNotification
13015
13117
  });
13016
- function toKnownErr70(e) {
13118
+ function toKnownErr71(e) {
13017
13119
  if (e instanceof XRPCError) {
13018
13120
  }
13019
13121
  return e;
@@ -13031,9 +13133,9 @@ function validateNotification(v) {
13031
13133
  // src/client/types/app/bsky/notification/updateSeen.ts
13032
13134
  var updateSeen_exports = {};
13033
13135
  __export(updateSeen_exports, {
13034
- toKnownErr: () => toKnownErr71
13136
+ toKnownErr: () => toKnownErr72
13035
13137
  });
13036
- function toKnownErr71(e) {
13138
+ function toKnownErr72(e) {
13037
13139
  if (e instanceof XRPCError) {
13038
13140
  }
13039
13141
  return e;
@@ -13042,9 +13144,9 @@ function toKnownErr71(e) {
13042
13144
  // src/client/types/app/bsky/unspecced/getPopular.ts
13043
13145
  var getPopular_exports = {};
13044
13146
  __export(getPopular_exports, {
13045
- toKnownErr: () => toKnownErr72
13147
+ toKnownErr: () => toKnownErr73
13046
13148
  });
13047
- function toKnownErr72(e) {
13149
+ function toKnownErr73(e) {
13048
13150
  if (e instanceof XRPCError) {
13049
13151
  }
13050
13152
  return e;
@@ -14148,14 +14250,19 @@ var FeedNS = class {
14148
14250
  throw toKnownErr61(e);
14149
14251
  });
14150
14252
  }
14253
+ getPosts(params2, opts) {
14254
+ return this._service.xrpc.call("app.bsky.feed.getPosts", params2, void 0, opts).catch((e) => {
14255
+ throw toKnownErr62(e);
14256
+ });
14257
+ }
14151
14258
  getRepostedBy(params2, opts) {
14152
14259
  return this._service.xrpc.call("app.bsky.feed.getRepostedBy", params2, void 0, opts).catch((e) => {
14153
- throw toKnownErr62(e);
14260
+ throw toKnownErr63(e);
14154
14261
  });
14155
14262
  }
14156
14263
  getTimeline(params2, opts) {
14157
14264
  return this._service.xrpc.call("app.bsky.feed.getTimeline", params2, void 0, opts).catch((e) => {
14158
- throw toKnownErr63(e);
14265
+ throw toKnownErr64(e);
14159
14266
  });
14160
14267
  }
14161
14268
  };
@@ -14277,27 +14384,27 @@ var GraphNS = class {
14277
14384
  }
14278
14385
  getFollowers(params2, opts) {
14279
14386
  return this._service.xrpc.call("app.bsky.graph.getFollowers", params2, void 0, opts).catch((e) => {
14280
- throw toKnownErr64(e);
14387
+ throw toKnownErr65(e);
14281
14388
  });
14282
14389
  }
14283
14390
  getFollows(params2, opts) {
14284
14391
  return this._service.xrpc.call("app.bsky.graph.getFollows", params2, void 0, opts).catch((e) => {
14285
- throw toKnownErr65(e);
14392
+ throw toKnownErr66(e);
14286
14393
  });
14287
14394
  }
14288
14395
  getMutes(params2, opts) {
14289
14396
  return this._service.xrpc.call("app.bsky.graph.getMutes", params2, void 0, opts).catch((e) => {
14290
- throw toKnownErr66(e);
14397
+ throw toKnownErr67(e);
14291
14398
  });
14292
14399
  }
14293
14400
  muteActor(data, opts) {
14294
14401
  return this._service.xrpc.call("app.bsky.graph.muteActor", opts?.qp, data, opts).catch((e) => {
14295
- throw toKnownErr67(e);
14402
+ throw toKnownErr68(e);
14296
14403
  });
14297
14404
  }
14298
14405
  unmuteActor(data, opts) {
14299
14406
  return this._service.xrpc.call("app.bsky.graph.unmuteActor", opts?.qp, data, opts).catch((e) => {
14300
- throw toKnownErr68(e);
14407
+ throw toKnownErr69(e);
14301
14408
  });
14302
14409
  }
14303
14410
  };
@@ -14344,17 +14451,17 @@ var NotificationNS = class {
14344
14451
  }
14345
14452
  getUnreadCount(params2, opts) {
14346
14453
  return this._service.xrpc.call("app.bsky.notification.getUnreadCount", params2, void 0, opts).catch((e) => {
14347
- throw toKnownErr69(e);
14454
+ throw toKnownErr70(e);
14348
14455
  });
14349
14456
  }
14350
14457
  listNotifications(params2, opts) {
14351
14458
  return this._service.xrpc.call("app.bsky.notification.listNotifications", params2, void 0, opts).catch((e) => {
14352
- throw toKnownErr70(e);
14459
+ throw toKnownErr71(e);
14353
14460
  });
14354
14461
  }
14355
14462
  updateSeen(data, opts) {
14356
14463
  return this._service.xrpc.call("app.bsky.notification.updateSeen", opts?.qp, data, opts).catch((e) => {
14357
- throw toKnownErr71(e);
14464
+ throw toKnownErr72(e);
14358
14465
  });
14359
14466
  }
14360
14467
  };
@@ -14369,7 +14476,7 @@ var UnspeccedNS = class {
14369
14476
  }
14370
14477
  getPopular(params2, opts) {
14371
14478
  return this._service.xrpc.call("app.bsky.unspecced.getPopular", params2, void 0, opts).catch((e) => {
14372
- throw toKnownErr72(e);
14479
+ throw toKnownErr73(e);
14373
14480
  });
14374
14481
  }
14375
14482
  };