@atproto/api 0.3.13 → 0.4.1

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.3.13",
3
+ "version": "0.4.1",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "codegen": "lex gen-api ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",
@@ -123,6 +123,7 @@ import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/up
123
123
  import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
124
124
  import * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
125
125
  import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
126
+ import * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
126
127
 
127
128
  export * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs'
128
129
  export * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites'
@@ -240,6 +241,7 @@ export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/up
240
241
  export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
241
242
  export * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
242
243
  export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
244
+ export * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
243
245
 
244
246
  export const COM_ATPROTO_ADMIN = {
245
247
  DefsTakedown: 'com.atproto.admin.defs#takedown',
@@ -2047,4 +2049,15 @@ export class UnspeccedNS {
2047
2049
  throw AppBskyUnspeccedGetPopularFeedGenerators.toKnownErr(e)
2048
2050
  })
2049
2051
  }
2052
+
2053
+ getTimelineSkeleton(
2054
+ params?: AppBskyUnspeccedGetTimelineSkeleton.QueryParams,
2055
+ opts?: AppBskyUnspeccedGetTimelineSkeleton.CallOptions,
2056
+ ): Promise<AppBskyUnspeccedGetTimelineSkeleton.Response> {
2057
+ return this._service.xrpc
2058
+ .call('app.bsky.unspecced.getTimelineSkeleton', params, undefined, opts)
2059
+ .catch((e) => {
2060
+ throw AppBskyUnspeccedGetTimelineSkeleton.toKnownErr(e)
2061
+ })
2062
+ }
2050
2063
  }
@@ -865,6 +865,12 @@ export const schemaDict = {
865
865
  type: 'string',
866
866
  },
867
867
  },
868
+ actionedBy: {
869
+ type: 'string',
870
+ format: 'did',
871
+ description:
872
+ 'Get all reports that were actioned by a specific moderator',
873
+ },
868
874
  reporters: {
869
875
  type: 'array',
870
876
  items: {
@@ -6285,12 +6291,29 @@ export const schemaDict = {
6285
6291
  main: {
6286
6292
  type: 'query',
6287
6293
  description: 'An unspecced view of globally popular feed generators',
6294
+ parameters: {
6295
+ type: 'params',
6296
+ properties: {
6297
+ limit: {
6298
+ type: 'integer',
6299
+ minimum: 1,
6300
+ maximum: 100,
6301
+ default: 50,
6302
+ },
6303
+ cursor: {
6304
+ type: 'string',
6305
+ },
6306
+ },
6307
+ },
6288
6308
  output: {
6289
6309
  encoding: 'application/json',
6290
6310
  schema: {
6291
6311
  type: 'object',
6292
6312
  required: ['feeds'],
6293
6313
  properties: {
6314
+ cursor: {
6315
+ type: 'string',
6316
+ },
6294
6317
  feeds: {
6295
6318
  type: 'array',
6296
6319
  items: {
@@ -6304,6 +6327,54 @@ export const schemaDict = {
6304
6327
  },
6305
6328
  },
6306
6329
  },
6330
+ AppBskyUnspeccedGetTimelineSkeleton: {
6331
+ lexicon: 1,
6332
+ id: 'app.bsky.unspecced.getTimelineSkeleton',
6333
+ defs: {
6334
+ main: {
6335
+ type: 'query',
6336
+ description: 'A skeleton of a timeline - UNSPECCED & WILL GO AWAY SOON',
6337
+ parameters: {
6338
+ type: 'params',
6339
+ properties: {
6340
+ limit: {
6341
+ type: 'integer',
6342
+ minimum: 1,
6343
+ maximum: 100,
6344
+ default: 50,
6345
+ },
6346
+ cursor: {
6347
+ type: 'string',
6348
+ },
6349
+ },
6350
+ },
6351
+ output: {
6352
+ encoding: 'application/json',
6353
+ schema: {
6354
+ type: 'object',
6355
+ required: ['feed'],
6356
+ properties: {
6357
+ cursor: {
6358
+ type: 'string',
6359
+ },
6360
+ feed: {
6361
+ type: 'array',
6362
+ items: {
6363
+ type: 'ref',
6364
+ ref: 'lex:app.bsky.feed.defs#skeletonFeedPost',
6365
+ },
6366
+ },
6367
+ },
6368
+ },
6369
+ },
6370
+ errors: [
6371
+ {
6372
+ name: 'UnknownFeed',
6373
+ },
6374
+ ],
6375
+ },
6376
+ },
6377
+ },
6307
6378
  }
6308
6379
  export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]
6309
6380
  export const lexicons: Lexicons = new Lexicons(schemas)
@@ -6432,4 +6503,5 @@ export const ids = {
6432
6503
  AppBskyUnspeccedGetPopular: 'app.bsky.unspecced.getPopular',
6433
6504
  AppBskyUnspeccedGetPopularFeedGenerators:
6434
6505
  'app.bsky.unspecced.getPopularFeedGenerators',
6506
+ AppBskyUnspeccedGetTimelineSkeleton: 'app.bsky.unspecced.getTimelineSkeleton',
6435
6507
  }
@@ -8,11 +8,15 @@ import { lexicons } from '../../../../lexicons'
8
8
  import { CID } from 'multiformats/cid'
9
9
  import * as AppBskyFeedDefs from '../feed/defs'
10
10
 
11
- export interface QueryParams {}
11
+ export interface QueryParams {
12
+ limit?: number
13
+ cursor?: string
14
+ }
12
15
 
13
16
  export type InputSchema = undefined
14
17
 
15
18
  export interface OutputSchema {
19
+ cursor?: string
16
20
  feeds: AppBskyFeedDefs.GeneratorView[]
17
21
  [k: string]: unknown
18
22
  }
@@ -0,0 +1,45 @@
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)
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
+ }
@@ -11,6 +11,8 @@ import * as ComAtprotoAdminDefs from './defs'
11
11
  export interface QueryParams {
12
12
  subject?: string
13
13
  ignoreSubjects?: string[]
14
+ /** Get all reports that were actioned by a specific moderator */
15
+ actionedBy?: string
14
16
  /** Filter reports made by one or more DIDs */
15
17
  reporters?: string[]
16
18
  resolved?: boolean