@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "license": "MIT",
5
5
  "description": "Client library for atproto and Bluesky",
6
6
  "keywords": [
@@ -28,7 +28,7 @@
28
28
  "devDependencies": {
29
29
  "common-tags": "^1.8.2",
30
30
  "@atproto/lex-cli": "^0.3.0",
31
- "@atproto/dev-env": "^0.2.28"
31
+ "@atproto/dev-env": "^0.2.29"
32
32
  },
33
33
  "scripts": {
34
34
  "codegen": "pnpm docgen && node ./scripts/generate-code.mjs && lex gen-api ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",
@@ -150,7 +150,6 @@ import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
150
150
  import * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
151
151
  import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
152
152
  import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions'
153
- import * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
154
153
  import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
155
154
  import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
156
155
 
@@ -297,7 +296,6 @@ export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
297
296
  export * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
298
297
  export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
299
298
  export * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions'
300
- export * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
301
299
  export * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
302
300
  export * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
303
301
 
@@ -2547,17 +2545,6 @@ export class AppBskyUnspeccedNS {
2547
2545
  })
2548
2546
  }
2549
2547
 
2550
- getTimelineSkeleton(
2551
- params?: AppBskyUnspeccedGetTimelineSkeleton.QueryParams,
2552
- opts?: AppBskyUnspeccedGetTimelineSkeleton.CallOptions,
2553
- ): Promise<AppBskyUnspeccedGetTimelineSkeleton.Response> {
2554
- return this._service.xrpc
2555
- .call('app.bsky.unspecced.getTimelineSkeleton', params, undefined, opts)
2556
- .catch((e) => {
2557
- throw AppBskyUnspeccedGetTimelineSkeleton.toKnownErr(e)
2558
- })
2559
- }
2560
-
2561
2548
  searchActorsSkeleton(
2562
2549
  params?: AppBskyUnspeccedSearchActorsSkeleton.QueryParams,
2563
2550
  opts?: AppBskyUnspeccedSearchActorsSkeleton.CallOptions,
@@ -91,6 +91,7 @@ export const schemaDict = {
91
91
  'lex:com.atproto.admin.defs#modEventEscalate',
92
92
  'lex:com.atproto.admin.defs#modEventMute',
93
93
  'lex:com.atproto.admin.defs#modEventEmail',
94
+ 'lex:com.atproto.admin.defs#modEventResolveAppeal',
94
95
  ],
95
96
  },
96
97
  subject: {
@@ -147,6 +148,7 @@ export const schemaDict = {
147
148
  'lex:com.atproto.admin.defs#modEventAcknowledge',
148
149
  'lex:com.atproto.admin.defs#modEventEscalate',
149
150
  'lex:com.atproto.admin.defs#modEventMute',
151
+ 'lex:com.atproto.admin.defs#modEventEmail',
150
152
  'lex:com.atproto.admin.defs#modEventResolveAppeal',
151
153
  ],
152
154
  },
@@ -1450,6 +1452,16 @@ export const schemaDict = {
1450
1452
  description:
1451
1453
  'Sort direction for the events. Defaults to descending order of created at timestamp.',
1452
1454
  },
1455
+ createdAfter: {
1456
+ type: 'string',
1457
+ format: 'datetime',
1458
+ description: 'Retrieve events created after a given timestamp',
1459
+ },
1460
+ createdBefore: {
1461
+ type: 'string',
1462
+ format: 'datetime',
1463
+ description: 'Retrieve events created before a given timestamp',
1464
+ },
1453
1465
  subject: {
1454
1466
  type: 'string',
1455
1467
  format: 'uri',
@@ -1466,6 +1478,37 @@ export const schemaDict = {
1466
1478
  maximum: 100,
1467
1479
  default: 50,
1468
1480
  },
1481
+ hasComment: {
1482
+ type: 'boolean',
1483
+ description: 'If true, only events with comments are returned',
1484
+ },
1485
+ comment: {
1486
+ type: 'string',
1487
+ description:
1488
+ 'If specified, only events with comments containing the keyword are returned',
1489
+ },
1490
+ addedLabels: {
1491
+ type: 'array',
1492
+ items: {
1493
+ type: 'string',
1494
+ },
1495
+ description:
1496
+ 'If specified, only events where all of these labels were added are returned',
1497
+ },
1498
+ removedLabels: {
1499
+ type: 'array',
1500
+ items: {
1501
+ type: 'string',
1502
+ },
1503
+ description:
1504
+ 'If specified, only events where all of these labels were removed are returned',
1505
+ },
1506
+ reportTypes: {
1507
+ type: 'array',
1508
+ items: {
1509
+ type: 'string',
1510
+ },
1511
+ },
1469
1512
  cursor: {
1470
1513
  type: 'string',
1471
1514
  },
@@ -8100,55 +8143,6 @@ export const schemaDict = {
8100
8143
  },
8101
8144
  },
8102
8145
  },
8103
- AppBskyUnspeccedGetTimelineSkeleton: {
8104
- lexicon: 1,
8105
- id: 'app.bsky.unspecced.getTimelineSkeleton',
8106
- defs: {
8107
- main: {
8108
- type: 'query',
8109
- description:
8110
- 'DEPRECATED: a skeleton of a timeline. Unspecced and will be unavailable soon.',
8111
- parameters: {
8112
- type: 'params',
8113
- properties: {
8114
- limit: {
8115
- type: 'integer',
8116
- minimum: 1,
8117
- maximum: 100,
8118
- default: 50,
8119
- },
8120
- cursor: {
8121
- type: 'string',
8122
- },
8123
- },
8124
- },
8125
- output: {
8126
- encoding: 'application/json',
8127
- schema: {
8128
- type: 'object',
8129
- required: ['feed'],
8130
- properties: {
8131
- cursor: {
8132
- type: 'string',
8133
- },
8134
- feed: {
8135
- type: 'array',
8136
- items: {
8137
- type: 'ref',
8138
- ref: 'lex:app.bsky.feed.defs#skeletonFeedPost',
8139
- },
8140
- },
8141
- },
8142
- },
8143
- },
8144
- errors: [
8145
- {
8146
- name: 'UnknownFeed',
8147
- },
8148
- ],
8149
- },
8150
- },
8151
- },
8152
8146
  AppBskyUnspeccedSearchActorsSkeleton: {
8153
8147
  lexicon: 1,
8154
8148
  id: 'app.bsky.unspecced.searchActorsSkeleton',
@@ -8438,7 +8432,6 @@ export const ids = {
8438
8432
  'app.bsky.unspecced.getPopularFeedGenerators',
8439
8433
  AppBskyUnspeccedGetTaggedSuggestions:
8440
8434
  'app.bsky.unspecced.getTaggedSuggestions',
8441
- AppBskyUnspeccedGetTimelineSkeleton: 'app.bsky.unspecced.getTimelineSkeleton',
8442
8435
  AppBskyUnspeccedSearchActorsSkeleton:
8443
8436
  'app.bsky.unspecced.searchActorsSkeleton',
8444
8437
  AppBskyUnspeccedSearchPostsSkeleton: 'app.bsky.unspecced.searchPostsSkeleton',
@@ -40,6 +40,7 @@ export interface ModEventView {
40
40
  | ModEventEscalate
41
41
  | ModEventMute
42
42
  | ModEventEmail
43
+ | ModEventResolveAppeal
43
44
  | { $type: string; [k: string]: unknown }
44
45
  subject:
45
46
  | RepoRef
@@ -76,6 +77,7 @@ export interface ModEventViewDetail {
76
77
  | ModEventAcknowledge
77
78
  | ModEventEscalate
78
79
  | ModEventMute
80
+ | ModEventEmail
79
81
  | ModEventResolveAppeal
80
82
  | { $type: string; [k: string]: unknown }
81
83
  subject:
@@ -14,10 +14,23 @@ export interface QueryParams {
14
14
  createdBy?: string
15
15
  /** Sort direction for the events. Defaults to descending order of created at timestamp. */
16
16
  sortDirection?: 'asc' | 'desc'
17
+ /** Retrieve events created after a given timestamp */
18
+ createdAfter?: string
19
+ /** Retrieve events created before a given timestamp */
20
+ createdBefore?: string
17
21
  subject?: string
18
22
  /** If true, events on all record types (posts, lists, profile etc.) owned by the did are returned */
19
23
  includeAllUserRecords?: boolean
20
24
  limit?: number
25
+ /** If true, only events with comments are returned */
26
+ hasComment?: boolean
27
+ /** If specified, only events with comments containing the keyword are returned */
28
+ comment?: string
29
+ /** If specified, only events where all of these labels were added are returned */
30
+ addedLabels?: string[]
31
+ /** If specified, only events where all of these labels were removed are returned */
32
+ removedLabels?: string[]
33
+ reportTypes?: string[]
21
34
  cursor?: string
22
35
  }
23
36
 
@@ -1,24 +0,0 @@
1
- import { Headers, XRPCError } from '@atproto/xrpc';
2
- import * as AppBskyFeedDefs from '../feed/defs';
3
- export interface QueryParams {
4
- limit?: number;
5
- cursor?: string;
6
- }
7
- export type InputSchema = undefined;
8
- export interface OutputSchema {
9
- cursor?: string;
10
- feed: AppBskyFeedDefs.SkeletonFeedPost[];
11
- [k: string]: unknown;
12
- }
13
- export interface CallOptions {
14
- headers?: Headers;
15
- }
16
- export interface Response {
17
- success: boolean;
18
- headers: Headers;
19
- data: OutputSchema;
20
- }
21
- export declare class UnknownFeedError extends XRPCError {
22
- constructor(src: XRPCError);
23
- }
24
- export declare function toKnownErr(e: any): any;
@@ -1,45 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import { Headers, XRPCError } from '@atproto/xrpc'
5
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
- import { isObj, hasProp } from '../../../../util'
7
- import { lexicons } from '../../../../lexicons'
8
- import { CID } from 'multiformats/cid'
9
- import * as AppBskyFeedDefs from '../feed/defs'
10
-
11
- export interface QueryParams {
12
- limit?: number
13
- cursor?: string
14
- }
15
-
16
- export type InputSchema = undefined
17
-
18
- export interface OutputSchema {
19
- cursor?: string
20
- feed: AppBskyFeedDefs.SkeletonFeedPost[]
21
- [k: string]: unknown
22
- }
23
-
24
- export interface CallOptions {
25
- headers?: Headers
26
- }
27
-
28
- export interface Response {
29
- success: boolean
30
- headers: Headers
31
- data: OutputSchema
32
- }
33
-
34
- export class UnknownFeedError extends XRPCError {
35
- constructor(src: XRPCError) {
36
- super(src.status, src.error, src.message, src.headers)
37
- }
38
- }
39
-
40
- export function toKnownErr(e: any) {
41
- if (e instanceof XRPCError) {
42
- if (e.error === 'UnknownFeed') return new UnknownFeedError(e)
43
- }
44
- return e
45
- }