@atproto/api 0.9.2 → 0.9.3

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.2",
3
+ "version": "0.9.3",
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.25"
31
+ "@atproto/dev-env": "^0.2.26"
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/*/*",
@@ -147,6 +147,7 @@ import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/up
147
147
  import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
148
148
  import * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
149
149
  import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
150
+ import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions'
150
151
  import * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
151
152
  import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
152
153
  import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
@@ -291,6 +292,7 @@ export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/up
291
292
  export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
292
293
  export * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
293
294
  export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
295
+ export * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions'
294
296
  export * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
295
297
  export * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
296
298
  export * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
@@ -2508,6 +2510,17 @@ export class AppBskyUnspeccedNS {
2508
2510
  })
2509
2511
  }
2510
2512
 
2513
+ getTaggedSuggestions(
2514
+ params?: AppBskyUnspeccedGetTaggedSuggestions.QueryParams,
2515
+ opts?: AppBskyUnspeccedGetTaggedSuggestions.CallOptions,
2516
+ ): Promise<AppBskyUnspeccedGetTaggedSuggestions.Response> {
2517
+ return this._service.xrpc
2518
+ .call('app.bsky.unspecced.getTaggedSuggestions', params, undefined, opts)
2519
+ .catch((e) => {
2520
+ throw AppBskyUnspeccedGetTaggedSuggestions.toKnownErr(e)
2521
+ })
2522
+ }
2523
+
2511
2524
  getTimelineSkeleton(
2512
2525
  params?: AppBskyUnspeccedGetTimelineSkeleton.QueryParams,
2513
2526
  opts?: AppBskyUnspeccedGetTimelineSkeleton.CallOptions,
@@ -7908,6 +7908,54 @@ export const schemaDict = {
7908
7908
  },
7909
7909
  },
7910
7910
  },
7911
+ AppBskyUnspeccedGetTaggedSuggestions: {
7912
+ lexicon: 1,
7913
+ id: 'app.bsky.unspecced.getTaggedSuggestions',
7914
+ defs: {
7915
+ main: {
7916
+ type: 'query',
7917
+ description:
7918
+ 'Get a list of suggestions (feeds and users) tagged with categories',
7919
+ parameters: {
7920
+ type: 'params',
7921
+ properties: {},
7922
+ },
7923
+ output: {
7924
+ encoding: 'application/json',
7925
+ schema: {
7926
+ type: 'object',
7927
+ required: ['suggestions'],
7928
+ properties: {
7929
+ suggestions: {
7930
+ type: 'array',
7931
+ items: {
7932
+ type: 'ref',
7933
+ ref: 'lex:app.bsky.unspecced.getTaggedSuggestions#suggestion',
7934
+ },
7935
+ },
7936
+ },
7937
+ },
7938
+ },
7939
+ },
7940
+ suggestion: {
7941
+ type: 'object',
7942
+ required: ['tag', 'subjectType', 'subject'],
7943
+ properties: {
7944
+ tag: {
7945
+ type: 'string',
7946
+ },
7947
+ subjectType: {
7948
+ type: 'string',
7949
+ knownValues: ['actor', 'feed'],
7950
+ },
7951
+ subject: {
7952
+ type: 'string',
7953
+ format: 'uri',
7954
+ },
7955
+ },
7956
+ },
7957
+ },
7958
+ },
7911
7959
  AppBskyUnspeccedGetTimelineSkeleton: {
7912
7960
  lexicon: 1,
7913
7961
  id: 'app.bsky.unspecced.getTimelineSkeleton',
@@ -8242,6 +8290,8 @@ export const ids = {
8242
8290
  AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
8243
8291
  AppBskyUnspeccedGetPopularFeedGenerators:
8244
8292
  'app.bsky.unspecced.getPopularFeedGenerators',
8293
+ AppBskyUnspeccedGetTaggedSuggestions:
8294
+ 'app.bsky.unspecced.getTaggedSuggestions',
8245
8295
  AppBskyUnspeccedGetTimelineSkeleton: 'app.bsky.unspecced.getTimelineSkeleton',
8246
8296
  AppBskyUnspeccedSearchActorsSkeleton:
8247
8297
  'app.bsky.unspecced.searchActorsSkeleton',
@@ -0,0 +1,55 @@
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
+
10
+ export interface QueryParams {}
11
+
12
+ export type InputSchema = undefined
13
+
14
+ export interface OutputSchema {
15
+ suggestions: Suggestion[]
16
+ [k: string]: unknown
17
+ }
18
+
19
+ export interface CallOptions {
20
+ headers?: Headers
21
+ }
22
+
23
+ export interface Response {
24
+ success: boolean
25
+ headers: Headers
26
+ data: OutputSchema
27
+ }
28
+
29
+ export function toKnownErr(e: any) {
30
+ if (e instanceof XRPCError) {
31
+ }
32
+ return e
33
+ }
34
+
35
+ export interface Suggestion {
36
+ tag: string
37
+ subjectType: 'actor' | 'feed' | (string & {})
38
+ subject: string
39
+ [k: string]: unknown
40
+ }
41
+
42
+ export function isSuggestion(v: unknown): v is Suggestion {
43
+ return (
44
+ isObj(v) &&
45
+ hasProp(v, '$type') &&
46
+ v.$type === 'app.bsky.unspecced.getTaggedSuggestions#suggestion'
47
+ )
48
+ }
49
+
50
+ export function validateSuggestion(v: unknown): ValidationResult {
51
+ return lexicons.validate(
52
+ 'app.bsky.unspecced.getTaggedSuggestions#suggestion',
53
+ v,
54
+ )
55
+ }