@atproto/api 0.9.5 → 0.9.6

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,11 @@
1
1
  # @atproto/api
2
2
 
3
+ ## 0.9.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2124](https://github.com/bluesky-social/atproto/pull/2124) [`e4ec7af03`](https://github.com/bluesky-social/atproto/commit/e4ec7af03608949fc3b00a845f547a77599b5ad0) Thanks [@foysalit](https://github.com/foysalit)! - Allow filtering for comment, label, report type and date range on queryModerationEvents endpoint.
8
+
3
9
  ## 0.9.5
4
10
 
5
11
  ### Patch Changes
package/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  Dual MIT/Apache-2.0 License
2
2
 
3
- Copyright (c) 2022-2023 Bluesky PBC, and Contributors
3
+ Copyright (c) 2022-2024 Bluesky PBC, and Contributors
4
4
 
5
5
  Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).
6
6
 
@@ -126,7 +126,6 @@ import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/
126
126
  import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen';
127
127
  import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators';
128
128
  import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions';
129
- import * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton';
130
129
  import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton';
131
130
  import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton';
132
131
  export * as ComAtprotoAdminCreateCommunicationTemplate from './types/com/atproto/admin/createCommunicationTemplate';
@@ -272,7 +271,6 @@ export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet';
272
271
  export * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs';
273
272
  export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators';
274
273
  export * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions';
275
- export * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton';
276
274
  export * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton';
277
275
  export * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton';
278
276
  export declare const COM_ATPROTO_ADMIN: {
@@ -756,7 +754,6 @@ export declare class AppBskyUnspeccedNS {
756
754
  constructor(service: AtpServiceClient);
757
755
  getPopularFeedGenerators(params?: AppBskyUnspeccedGetPopularFeedGenerators.QueryParams, opts?: AppBskyUnspeccedGetPopularFeedGenerators.CallOptions): Promise<AppBskyUnspeccedGetPopularFeedGenerators.Response>;
758
756
  getTaggedSuggestions(params?: AppBskyUnspeccedGetTaggedSuggestions.QueryParams, opts?: AppBskyUnspeccedGetTaggedSuggestions.CallOptions): Promise<AppBskyUnspeccedGetTaggedSuggestions.Response>;
759
- getTimelineSkeleton(params?: AppBskyUnspeccedGetTimelineSkeleton.QueryParams, opts?: AppBskyUnspeccedGetTimelineSkeleton.CallOptions): Promise<AppBskyUnspeccedGetTimelineSkeleton.Response>;
760
757
  searchActorsSkeleton(params?: AppBskyUnspeccedSearchActorsSkeleton.QueryParams, opts?: AppBskyUnspeccedSearchActorsSkeleton.CallOptions): Promise<AppBskyUnspeccedSearchActorsSkeleton.Response>;
761
758
  searchPostsSkeleton(params?: AppBskyUnspeccedSearchPostsSkeleton.QueryParams, opts?: AppBskyUnspeccedSearchPostsSkeleton.CallOptions): Promise<AppBskyUnspeccedSearchPostsSkeleton.Response>;
762
759
  }
@@ -1296,6 +1296,16 @@ export declare const schemaDict: {
1296
1296
  enum: string[];
1297
1297
  description: string;
1298
1298
  };
1299
+ createdAfter: {
1300
+ type: string;
1301
+ format: string;
1302
+ description: string;
1303
+ };
1304
+ createdBefore: {
1305
+ type: string;
1306
+ format: string;
1307
+ description: string;
1308
+ };
1299
1309
  subject: {
1300
1310
  type: string;
1301
1311
  format: string;
@@ -1311,6 +1321,34 @@ export declare const schemaDict: {
1311
1321
  maximum: number;
1312
1322
  default: number;
1313
1323
  };
1324
+ hasComment: {
1325
+ type: string;
1326
+ description: string;
1327
+ };
1328
+ comment: {
1329
+ type: string;
1330
+ description: string;
1331
+ };
1332
+ addedLabels: {
1333
+ type: string;
1334
+ items: {
1335
+ type: string;
1336
+ };
1337
+ description: string;
1338
+ };
1339
+ removedLabels: {
1340
+ type: string;
1341
+ items: {
1342
+ type: string;
1343
+ };
1344
+ description: string;
1345
+ };
1346
+ reportTypes: {
1347
+ type: string;
1348
+ items: {
1349
+ type: string;
1350
+ };
1351
+ };
1314
1352
  cursor: {
1315
1353
  type: string;
1316
1354
  };
@@ -7602,52 +7640,6 @@ export declare const schemaDict: {
7602
7640
  };
7603
7641
  };
7604
7642
  };
7605
- AppBskyUnspeccedGetTimelineSkeleton: {
7606
- lexicon: number;
7607
- id: string;
7608
- defs: {
7609
- main: {
7610
- type: string;
7611
- description: string;
7612
- parameters: {
7613
- type: string;
7614
- properties: {
7615
- limit: {
7616
- type: string;
7617
- minimum: number;
7618
- maximum: number;
7619
- default: number;
7620
- };
7621
- cursor: {
7622
- type: string;
7623
- };
7624
- };
7625
- };
7626
- output: {
7627
- encoding: string;
7628
- schema: {
7629
- type: string;
7630
- required: string[];
7631
- properties: {
7632
- cursor: {
7633
- type: string;
7634
- };
7635
- feed: {
7636
- type: string;
7637
- items: {
7638
- type: string;
7639
- ref: string;
7640
- };
7641
- };
7642
- };
7643
- };
7644
- };
7645
- errors: {
7646
- name: string;
7647
- }[];
7648
- };
7649
- };
7650
- };
7651
7643
  AppBskyUnspeccedSearchActorsSkeleton: {
7652
7644
  lexicon: number;
7653
7645
  id: string;
@@ -7911,7 +7903,6 @@ export declare const ids: {
7911
7903
  AppBskyUnspeccedDefs: string;
7912
7904
  AppBskyUnspeccedGetPopularFeedGenerators: string;
7913
7905
  AppBskyUnspeccedGetTaggedSuggestions: string;
7914
- AppBskyUnspeccedGetTimelineSkeleton: string;
7915
7906
  AppBskyUnspeccedSearchActorsSkeleton: string;
7916
7907
  AppBskyUnspeccedSearchPostsSkeleton: string;
7917
7908
  };
@@ -12,7 +12,7 @@ export declare function isStatusAttr(v: unknown): v is StatusAttr;
12
12
  export declare function validateStatusAttr(v: unknown): ValidationResult;
13
13
  export interface ModEventView {
14
14
  id: number;
15
- event: ModEventTakedown | ModEventReverseTakedown | ModEventComment | ModEventReport | ModEventLabel | ModEventAcknowledge | ModEventEscalate | ModEventMute | ModEventEmail | {
15
+ event: ModEventTakedown | ModEventReverseTakedown | ModEventComment | ModEventReport | ModEventLabel | ModEventAcknowledge | ModEventEscalate | ModEventMute | ModEventEmail | ModEventResolveAppeal | {
16
16
  $type: string;
17
17
  [k: string]: unknown;
18
18
  };
@@ -31,7 +31,7 @@ export declare function isModEventView(v: unknown): v is ModEventView;
31
31
  export declare function validateModEventView(v: unknown): ValidationResult;
32
32
  export interface ModEventViewDetail {
33
33
  id: number;
34
- event: ModEventTakedown | ModEventReverseTakedown | ModEventComment | ModEventReport | ModEventLabel | ModEventAcknowledge | ModEventEscalate | ModEventMute | ModEventResolveAppeal | {
34
+ event: ModEventTakedown | ModEventReverseTakedown | ModEventComment | ModEventReport | ModEventLabel | ModEventAcknowledge | ModEventEscalate | ModEventMute | ModEventEmail | ModEventResolveAppeal | {
35
35
  $type: string;
36
36
  [k: string]: unknown;
37
37
  };
@@ -4,9 +4,16 @@ export interface QueryParams {
4
4
  types?: string[];
5
5
  createdBy?: string;
6
6
  sortDirection?: 'asc' | 'desc';
7
+ createdAfter?: string;
8
+ createdBefore?: string;
7
9
  subject?: string;
8
10
  includeAllUserRecords?: boolean;
9
11
  limit?: number;
12
+ hasComment?: boolean;
13
+ comment?: string;
14
+ addedLabels?: string[];
15
+ removedLabels?: string[];
16
+ reportTypes?: string[];
10
17
  cursor?: string;
11
18
  }
12
19
  export type InputSchema = undefined;
package/dist/index.js CHANGED
@@ -8940,7 +8940,6 @@ __export(src_exports2, {
8940
8940
  AppBskyUnspeccedDefs: () => defs_exports8,
8941
8941
  AppBskyUnspeccedGetPopularFeedGenerators: () => getPopularFeedGenerators_exports,
8942
8942
  AppBskyUnspeccedGetTaggedSuggestions: () => getTaggedSuggestions_exports,
8943
- AppBskyUnspeccedGetTimelineSkeleton: () => getTimelineSkeleton_exports,
8944
8943
  AppBskyUnspeccedNS: () => AppBskyUnspeccedNS,
8945
8944
  AppBskyUnspeccedSearchActorsSkeleton: () => searchActorsSkeleton_exports,
8946
8945
  AppBskyUnspeccedSearchPostsSkeleton: () => searchPostsSkeleton_exports,
@@ -15766,7 +15765,8 @@ var schemaDict = {
15766
15765
  "lex:com.atproto.admin.defs#modEventAcknowledge",
15767
15766
  "lex:com.atproto.admin.defs#modEventEscalate",
15768
15767
  "lex:com.atproto.admin.defs#modEventMute",
15769
- "lex:com.atproto.admin.defs#modEventEmail"
15768
+ "lex:com.atproto.admin.defs#modEventEmail",
15769
+ "lex:com.atproto.admin.defs#modEventResolveAppeal"
15770
15770
  ]
15771
15771
  },
15772
15772
  subject: {
@@ -15823,6 +15823,7 @@ var schemaDict = {
15823
15823
  "lex:com.atproto.admin.defs#modEventAcknowledge",
15824
15824
  "lex:com.atproto.admin.defs#modEventEscalate",
15825
15825
  "lex:com.atproto.admin.defs#modEventMute",
15826
+ "lex:com.atproto.admin.defs#modEventEmail",
15826
15827
  "lex:com.atproto.admin.defs#modEventResolveAppeal"
15827
15828
  ]
15828
15829
  },
@@ -17112,6 +17113,16 @@ var schemaDict = {
17112
17113
  enum: ["asc", "desc"],
17113
17114
  description: "Sort direction for the events. Defaults to descending order of created at timestamp."
17114
17115
  },
17116
+ createdAfter: {
17117
+ type: "string",
17118
+ format: "datetime",
17119
+ description: "Retrieve events created after a given timestamp"
17120
+ },
17121
+ createdBefore: {
17122
+ type: "string",
17123
+ format: "datetime",
17124
+ description: "Retrieve events created before a given timestamp"
17125
+ },
17115
17126
  subject: {
17116
17127
  type: "string",
17117
17128
  format: "uri"
@@ -17127,6 +17138,34 @@ var schemaDict = {
17127
17138
  maximum: 100,
17128
17139
  default: 50
17129
17140
  },
17141
+ hasComment: {
17142
+ type: "boolean",
17143
+ description: "If true, only events with comments are returned"
17144
+ },
17145
+ comment: {
17146
+ type: "string",
17147
+ description: "If specified, only events with comments containing the keyword are returned"
17148
+ },
17149
+ addedLabels: {
17150
+ type: "array",
17151
+ items: {
17152
+ type: "string"
17153
+ },
17154
+ description: "If specified, only events where all of these labels were added are returned"
17155
+ },
17156
+ removedLabels: {
17157
+ type: "array",
17158
+ items: {
17159
+ type: "string"
17160
+ },
17161
+ description: "If specified, only events where all of these labels were removed are returned"
17162
+ },
17163
+ reportTypes: {
17164
+ type: "array",
17165
+ items: {
17166
+ type: "string"
17167
+ }
17168
+ },
17130
17169
  cursor: {
17131
17170
  type: "string"
17132
17171
  }
@@ -23691,54 +23730,6 @@ var schemaDict = {
23691
23730
  }
23692
23731
  }
23693
23732
  },
23694
- AppBskyUnspeccedGetTimelineSkeleton: {
23695
- lexicon: 1,
23696
- id: "app.bsky.unspecced.getTimelineSkeleton",
23697
- defs: {
23698
- main: {
23699
- type: "query",
23700
- description: "DEPRECATED: a skeleton of a timeline. Unspecced and will be unavailable soon.",
23701
- parameters: {
23702
- type: "params",
23703
- properties: {
23704
- limit: {
23705
- type: "integer",
23706
- minimum: 1,
23707
- maximum: 100,
23708
- default: 50
23709
- },
23710
- cursor: {
23711
- type: "string"
23712
- }
23713
- }
23714
- },
23715
- output: {
23716
- encoding: "application/json",
23717
- schema: {
23718
- type: "object",
23719
- required: ["feed"],
23720
- properties: {
23721
- cursor: {
23722
- type: "string"
23723
- },
23724
- feed: {
23725
- type: "array",
23726
- items: {
23727
- type: "ref",
23728
- ref: "lex:app.bsky.feed.defs#skeletonFeedPost"
23729
- }
23730
- }
23731
- }
23732
- }
23733
- },
23734
- errors: [
23735
- {
23736
- name: "UnknownFeed"
23737
- }
23738
- ]
23739
- }
23740
- }
23741
- },
23742
23733
  AppBskyUnspeccedSearchActorsSkeleton: {
23743
23734
  lexicon: 1,
23744
23735
  id: "app.bsky.unspecced.searchActorsSkeleton",
@@ -25653,37 +25644,18 @@ function validateSuggestion(v) {
25653
25644
  return lexicons.validate("app.bsky.unspecced.getTaggedSuggestions#suggestion", v);
25654
25645
  }
25655
25646
 
25656
- // src/client/types/app/bsky/unspecced/getTimelineSkeleton.ts
25657
- var getTimelineSkeleton_exports = {};
25658
- __export(getTimelineSkeleton_exports, {
25659
- UnknownFeedError: () => UnknownFeedError3,
25660
- toKnownErr: () => toKnownErr117
25661
- });
25662
- var UnknownFeedError3 = class extends XRPCError {
25663
- constructor(src2) {
25664
- super(src2.status, src2.error, src2.message, src2.headers);
25665
- }
25666
- };
25667
- function toKnownErr117(e) {
25668
- if (e instanceof XRPCError) {
25669
- if (e.error === "UnknownFeed")
25670
- return new UnknownFeedError3(e);
25671
- }
25672
- return e;
25673
- }
25674
-
25675
25647
  // src/client/types/app/bsky/unspecced/searchActorsSkeleton.ts
25676
25648
  var searchActorsSkeleton_exports = {};
25677
25649
  __export(searchActorsSkeleton_exports, {
25678
25650
  BadQueryStringError: () => BadQueryStringError2,
25679
- toKnownErr: () => toKnownErr118
25651
+ toKnownErr: () => toKnownErr117
25680
25652
  });
25681
25653
  var BadQueryStringError2 = class extends XRPCError {
25682
25654
  constructor(src2) {
25683
25655
  super(src2.status, src2.error, src2.message, src2.headers);
25684
25656
  }
25685
25657
  };
25686
- function toKnownErr118(e) {
25658
+ function toKnownErr117(e) {
25687
25659
  if (e instanceof XRPCError) {
25688
25660
  if (e.error === "BadQueryString")
25689
25661
  return new BadQueryStringError2(e);
@@ -25695,14 +25667,14 @@ function toKnownErr118(e) {
25695
25667
  var searchPostsSkeleton_exports = {};
25696
25668
  __export(searchPostsSkeleton_exports, {
25697
25669
  BadQueryStringError: () => BadQueryStringError3,
25698
- toKnownErr: () => toKnownErr119
25670
+ toKnownErr: () => toKnownErr118
25699
25671
  });
25700
25672
  var BadQueryStringError3 = class extends XRPCError {
25701
25673
  constructor(src2) {
25702
25674
  super(src2.status, src2.error, src2.message, src2.headers);
25703
25675
  }
25704
25676
  };
25705
- function toKnownErr119(e) {
25677
+ function toKnownErr118(e) {
25706
25678
  if (e instanceof XRPCError) {
25707
25679
  if (e.error === "BadQueryString")
25708
25680
  return new BadQueryStringError3(e);
@@ -27843,19 +27815,14 @@ var AppBskyUnspeccedNS = class {
27843
27815
  throw toKnownErr116(e);
27844
27816
  });
27845
27817
  }
27846
- getTimelineSkeleton(params2, opts) {
27847
- return this._service.xrpc.call("app.bsky.unspecced.getTimelineSkeleton", params2, void 0, opts).catch((e) => {
27848
- throw toKnownErr117(e);
27849
- });
27850
- }
27851
27818
  searchActorsSkeleton(params2, opts) {
27852
27819
  return this._service.xrpc.call("app.bsky.unspecced.searchActorsSkeleton", params2, void 0, opts).catch((e) => {
27853
- throw toKnownErr118(e);
27820
+ throw toKnownErr117(e);
27854
27821
  });
27855
27822
  }
27856
27823
  searchPostsSkeleton(params2, opts) {
27857
27824
  return this._service.xrpc.call("app.bsky.unspecced.searchPostsSkeleton", params2, void 0, opts).catch((e) => {
27858
- throw toKnownErr119(e);
27825
+ throw toKnownErr118(e);
27859
27826
  });
27860
27827
  }
27861
27828
  };