@atproto/api 0.6.18 → 0.6.19

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.6.18",
3
+ "version": "0.6.19",
4
4
  "license": "MIT",
5
5
  "description": "Client library for atproto and Bluesky",
6
6
  "keywords": [
@@ -27,7 +27,7 @@
27
27
  "devDependencies": {
28
28
  "common-tags": "^1.8.2",
29
29
  "@atproto/lex-cli": "^0.2.1",
30
- "@atproto/pds": "^0.1.18"
30
+ "@atproto/pds": "^0.1.19"
31
31
  },
32
32
  "scripts": {
33
33
  "codegen": "pnpm docgen && node ./scripts/generate-code.mjs && lex gen-api ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",
@@ -103,6 +103,7 @@ import * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline'
103
103
  import * as AppBskyFeedLike from './types/app/bsky/feed/like'
104
104
  import * as AppBskyFeedPost from './types/app/bsky/feed/post'
105
105
  import * as AppBskyFeedRepost from './types/app/bsky/feed/repost'
106
+ import * as AppBskyFeedSearchPosts from './types/app/bsky/feed/searchPosts'
106
107
  import * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate'
107
108
  import * as AppBskyGraphBlock from './types/app/bsky/graph/block'
108
109
  import * as AppBskyGraphDefs from './types/app/bsky/graph/defs'
@@ -128,10 +129,12 @@ import * as AppBskyNotificationListNotifications from './types/app/bsky/notifica
128
129
  import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush'
129
130
  import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
130
131
  import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
131
- import * as AppBskyUnspeccedApplyLabels from './types/app/bsky/unspecced/applyLabels'
132
+ import * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
132
133
  import * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
133
134
  import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
134
135
  import * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
136
+ import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
137
+ import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
135
138
 
136
139
  export * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs'
137
140
  export * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites'
@@ -229,6 +232,7 @@ export * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline'
229
232
  export * as AppBskyFeedLike from './types/app/bsky/feed/like'
230
233
  export * as AppBskyFeedPost from './types/app/bsky/feed/post'
231
234
  export * as AppBskyFeedRepost from './types/app/bsky/feed/repost'
235
+ export * as AppBskyFeedSearchPosts from './types/app/bsky/feed/searchPosts'
232
236
  export * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate'
233
237
  export * as AppBskyGraphBlock from './types/app/bsky/graph/block'
234
238
  export * as AppBskyGraphDefs from './types/app/bsky/graph/defs'
@@ -254,10 +258,12 @@ export * as AppBskyNotificationListNotifications from './types/app/bsky/notifica
254
258
  export * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush'
255
259
  export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
256
260
  export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
257
- export * as AppBskyUnspeccedApplyLabels from './types/app/bsky/unspecced/applyLabels'
261
+ export * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
258
262
  export * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
259
263
  export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
260
264
  export * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
265
+ export * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
266
+ export * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
261
267
 
262
268
  export const COM_ATPROTO_ADMIN = {
263
269
  DefsTakedown: 'com.atproto.admin.defs#takedown',
@@ -1381,6 +1387,17 @@ export class FeedNS {
1381
1387
  throw AppBskyFeedGetTimeline.toKnownErr(e)
1382
1388
  })
1383
1389
  }
1390
+
1391
+ searchPosts(
1392
+ params?: AppBskyFeedSearchPosts.QueryParams,
1393
+ opts?: AppBskyFeedSearchPosts.CallOptions,
1394
+ ): Promise<AppBskyFeedSearchPosts.Response> {
1395
+ return this._service.xrpc
1396
+ .call('app.bsky.feed.searchPosts', params, undefined, opts)
1397
+ .catch((e) => {
1398
+ throw AppBskyFeedSearchPosts.toKnownErr(e)
1399
+ })
1400
+ }
1384
1401
  }
1385
1402
 
1386
1403
  export class GeneratorRecord {
@@ -2234,17 +2251,6 @@ export class UnspeccedNS {
2234
2251
  this._service = service
2235
2252
  }
2236
2253
 
2237
- applyLabels(
2238
- data?: AppBskyUnspeccedApplyLabels.InputSchema,
2239
- opts?: AppBskyUnspeccedApplyLabels.CallOptions,
2240
- ): Promise<AppBskyUnspeccedApplyLabels.Response> {
2241
- return this._service.xrpc
2242
- .call('app.bsky.unspecced.applyLabels', opts?.qp, data, opts)
2243
- .catch((e) => {
2244
- throw AppBskyUnspeccedApplyLabels.toKnownErr(e)
2245
- })
2246
- }
2247
-
2248
2254
  getPopular(
2249
2255
  params?: AppBskyUnspeccedGetPopular.QueryParams,
2250
2256
  opts?: AppBskyUnspeccedGetPopular.CallOptions,
@@ -2282,4 +2288,26 @@ export class UnspeccedNS {
2282
2288
  throw AppBskyUnspeccedGetTimelineSkeleton.toKnownErr(e)
2283
2289
  })
2284
2290
  }
2291
+
2292
+ searchActorsSkeleton(
2293
+ params?: AppBskyUnspeccedSearchActorsSkeleton.QueryParams,
2294
+ opts?: AppBskyUnspeccedSearchActorsSkeleton.CallOptions,
2295
+ ): Promise<AppBskyUnspeccedSearchActorsSkeleton.Response> {
2296
+ return this._service.xrpc
2297
+ .call('app.bsky.unspecced.searchActorsSkeleton', params, undefined, opts)
2298
+ .catch((e) => {
2299
+ throw AppBskyUnspeccedSearchActorsSkeleton.toKnownErr(e)
2300
+ })
2301
+ }
2302
+
2303
+ searchPostsSkeleton(
2304
+ params?: AppBskyUnspeccedSearchPostsSkeleton.QueryParams,
2305
+ opts?: AppBskyUnspeccedSearchPostsSkeleton.CallOptions,
2306
+ ): Promise<AppBskyUnspeccedSearchPostsSkeleton.Response> {
2307
+ return this._service.xrpc
2308
+ .call('app.bsky.unspecced.searchPostsSkeleton', params, undefined, opts)
2309
+ .catch((e) => {
2310
+ throw AppBskyUnspeccedSearchPostsSkeleton.toKnownErr(e)
2311
+ })
2312
+ }
2285
2313
  }
@@ -1113,6 +1113,10 @@ export const schemaDict = {
1113
1113
  properties: {
1114
1114
  term: {
1115
1115
  type: 'string',
1116
+ description: "DEPRECATED: use 'q' instead",
1117
+ },
1118
+ q: {
1119
+ type: 'string',
1116
1120
  },
1117
1121
  invitedBy: {
1118
1122
  type: 'string',
@@ -3998,18 +4002,24 @@ export const schemaDict = {
3998
4002
  defs: {
3999
4003
  main: {
4000
4004
  type: 'query',
4001
- description: 'Find actors matching search criteria.',
4005
+ description: 'Find actors (profiles) matching search criteria.',
4002
4006
  parameters: {
4003
4007
  type: 'params',
4004
4008
  properties: {
4005
4009
  term: {
4006
4010
  type: 'string',
4011
+ description: "DEPRECATED: use 'q' instead",
4012
+ },
4013
+ q: {
4014
+ type: 'string',
4015
+ description:
4016
+ 'search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended',
4007
4017
  },
4008
4018
  limit: {
4009
4019
  type: 'integer',
4010
4020
  minimum: 1,
4011
4021
  maximum: 100,
4012
- default: 50,
4022
+ default: 25,
4013
4023
  },
4014
4024
  cursor: {
4015
4025
  type: 'string',
@@ -4050,12 +4060,17 @@ export const schemaDict = {
4050
4060
  properties: {
4051
4061
  term: {
4052
4062
  type: 'string',
4063
+ description: "DEPRECATED: use 'q' instead",
4064
+ },
4065
+ q: {
4066
+ type: 'string',
4067
+ description: 'search query prefix; not a full query string',
4053
4068
  },
4054
4069
  limit: {
4055
4070
  type: 'integer',
4056
4071
  minimum: 1,
4057
4072
  maximum: 100,
4058
- default: 50,
4073
+ default: 10,
4059
4074
  },
4060
4075
  },
4061
4076
  },
@@ -5713,6 +5728,67 @@ export const schemaDict = {
5713
5728
  },
5714
5729
  },
5715
5730
  },
5731
+ AppBskyFeedSearchPosts: {
5732
+ lexicon: 1,
5733
+ id: 'app.bsky.feed.searchPosts',
5734
+ defs: {
5735
+ main: {
5736
+ type: 'query',
5737
+ description: 'Find posts matching search criteria',
5738
+ parameters: {
5739
+ type: 'params',
5740
+ required: ['q'],
5741
+ properties: {
5742
+ q: {
5743
+ type: 'string',
5744
+ description:
5745
+ 'search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended',
5746
+ },
5747
+ limit: {
5748
+ type: 'integer',
5749
+ minimum: 1,
5750
+ maximum: 100,
5751
+ default: 25,
5752
+ },
5753
+ cursor: {
5754
+ type: 'string',
5755
+ description:
5756
+ 'optional pagination mechanism; may not necessarily allow scrolling through entire result set',
5757
+ },
5758
+ },
5759
+ },
5760
+ output: {
5761
+ encoding: 'application/json',
5762
+ schema: {
5763
+ type: 'object',
5764
+ required: ['posts'],
5765
+ properties: {
5766
+ cursor: {
5767
+ type: 'string',
5768
+ },
5769
+ hitsTotal: {
5770
+ type: 'integer',
5771
+ description:
5772
+ 'count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits',
5773
+ },
5774
+ posts: {
5775
+ type: 'array',
5776
+ items: {
5777
+ type: 'ref',
5778
+ ref: 'lex:app.bsky.feed.defs#postView',
5779
+ },
5780
+ },
5781
+ },
5782
+ },
5783
+ },
5784
+ errors: [
5785
+ {
5786
+ name: 'BadQueryString',
5787
+ },
5788
+ ],
5789
+ },
5790
+ },
5791
+ },
5716
5792
  AppBskyFeedThreadgate: {
5717
5793
  lexicon: 1,
5718
5794
  id: 'app.bsky.feed.threadgate',
@@ -6829,27 +6905,27 @@ export const schemaDict = {
6829
6905
  },
6830
6906
  },
6831
6907
  },
6832
- AppBskyUnspeccedApplyLabels: {
6908
+ AppBskyUnspeccedDefs: {
6833
6909
  lexicon: 1,
6834
- id: 'app.bsky.unspecced.applyLabels',
6910
+ id: 'app.bsky.unspecced.defs',
6835
6911
  defs: {
6836
- main: {
6837
- type: 'procedure',
6838
- description: 'Allow a labeler to apply labels directly.',
6839
- input: {
6840
- encoding: 'application/json',
6841
- schema: {
6842
- type: 'object',
6843
- required: ['labels'],
6844
- properties: {
6845
- labels: {
6846
- type: 'array',
6847
- items: {
6848
- type: 'ref',
6849
- ref: 'lex:com.atproto.label.defs#label',
6850
- },
6851
- },
6852
- },
6912
+ skeletonSearchPost: {
6913
+ type: 'object',
6914
+ required: ['uri'],
6915
+ properties: {
6916
+ uri: {
6917
+ type: 'string',
6918
+ format: 'at-uri',
6919
+ },
6920
+ },
6921
+ },
6922
+ skeletonSearchActor: {
6923
+ type: 'object',
6924
+ required: ['did'],
6925
+ properties: {
6926
+ did: {
6927
+ type: 'string',
6928
+ format: 'did',
6853
6929
  },
6854
6930
  },
6855
6931
  },
@@ -6997,6 +7073,132 @@ export const schemaDict = {
6997
7073
  },
6998
7074
  },
6999
7075
  },
7076
+ AppBskyUnspeccedSearchActorsSkeleton: {
7077
+ lexicon: 1,
7078
+ id: 'app.bsky.unspecced.searchActorsSkeleton',
7079
+ defs: {
7080
+ main: {
7081
+ type: 'query',
7082
+ description: 'Backend Actors (profile) search, returning only skeleton',
7083
+ parameters: {
7084
+ type: 'params',
7085
+ required: ['q'],
7086
+ properties: {
7087
+ q: {
7088
+ type: 'string',
7089
+ description:
7090
+ 'search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax',
7091
+ },
7092
+ typeahead: {
7093
+ type: 'boolean',
7094
+ description: "if true, acts as fast/simple 'typeahead' query",
7095
+ },
7096
+ limit: {
7097
+ type: 'integer',
7098
+ minimum: 1,
7099
+ maximum: 100,
7100
+ default: 25,
7101
+ },
7102
+ cursor: {
7103
+ type: 'string',
7104
+ description:
7105
+ 'optional pagination mechanism; may not necessarily allow scrolling through entire result set',
7106
+ },
7107
+ },
7108
+ },
7109
+ output: {
7110
+ encoding: 'application/json',
7111
+ schema: {
7112
+ type: 'object',
7113
+ required: ['actors'],
7114
+ properties: {
7115
+ cursor: {
7116
+ type: 'string',
7117
+ },
7118
+ hitsTotal: {
7119
+ type: 'integer',
7120
+ description:
7121
+ 'count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits',
7122
+ },
7123
+ actors: {
7124
+ type: 'array',
7125
+ items: {
7126
+ type: 'ref',
7127
+ ref: 'lex:app.bsky.unspecced.defs#skeletonSearchActor',
7128
+ },
7129
+ },
7130
+ },
7131
+ },
7132
+ },
7133
+ errors: [
7134
+ {
7135
+ name: 'BadQueryString',
7136
+ },
7137
+ ],
7138
+ },
7139
+ },
7140
+ },
7141
+ AppBskyUnspeccedSearchPostsSkeleton: {
7142
+ lexicon: 1,
7143
+ id: 'app.bsky.unspecced.searchPostsSkeleton',
7144
+ defs: {
7145
+ main: {
7146
+ type: 'query',
7147
+ description: 'Backend Posts search, returning only skeleton',
7148
+ parameters: {
7149
+ type: 'params',
7150
+ required: ['q'],
7151
+ properties: {
7152
+ q: {
7153
+ type: 'string',
7154
+ description:
7155
+ 'search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended',
7156
+ },
7157
+ limit: {
7158
+ type: 'integer',
7159
+ minimum: 1,
7160
+ maximum: 100,
7161
+ default: 25,
7162
+ },
7163
+ cursor: {
7164
+ type: 'string',
7165
+ description:
7166
+ 'optional pagination mechanism; may not necessarily allow scrolling through entire result set',
7167
+ },
7168
+ },
7169
+ },
7170
+ output: {
7171
+ encoding: 'application/json',
7172
+ schema: {
7173
+ type: 'object',
7174
+ required: ['posts'],
7175
+ properties: {
7176
+ cursor: {
7177
+ type: 'string',
7178
+ },
7179
+ hitsTotal: {
7180
+ type: 'integer',
7181
+ description:
7182
+ 'count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits',
7183
+ },
7184
+ posts: {
7185
+ type: 'array',
7186
+ items: {
7187
+ type: 'ref',
7188
+ ref: 'lex:app.bsky.unspecced.defs#skeletonSearchPost',
7189
+ },
7190
+ },
7191
+ },
7192
+ },
7193
+ },
7194
+ errors: [
7195
+ {
7196
+ name: 'BadQueryString',
7197
+ },
7198
+ ],
7199
+ },
7200
+ },
7201
+ },
7000
7202
  }
7001
7203
  export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]
7002
7204
  export const lexicons: Lexicons = new Lexicons(schemas)
@@ -7103,6 +7305,7 @@ export const ids = {
7103
7305
  AppBskyFeedLike: 'app.bsky.feed.like',
7104
7306
  AppBskyFeedPost: 'app.bsky.feed.post',
7105
7307
  AppBskyFeedRepost: 'app.bsky.feed.repost',
7308
+ AppBskyFeedSearchPosts: 'app.bsky.feed.searchPosts',
7106
7309
  AppBskyFeedThreadgate: 'app.bsky.feed.threadgate',
7107
7310
  AppBskyGraphBlock: 'app.bsky.graph.block',
7108
7311
  AppBskyGraphDefs: 'app.bsky.graph.defs',
@@ -7130,9 +7333,12 @@ export const ids = {
7130
7333
  AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush',
7131
7334
  AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
7132
7335
  AppBskyRichtextFacet: 'app.bsky.richtext.facet',
7133
- AppBskyUnspeccedApplyLabels: 'app.bsky.unspecced.applyLabels',
7336
+ AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
7134
7337
  AppBskyUnspeccedGetPopular: 'app.bsky.unspecced.getPopular',
7135
7338
  AppBskyUnspeccedGetPopularFeedGenerators:
7136
7339
  'app.bsky.unspecced.getPopularFeedGenerators',
7137
7340
  AppBskyUnspeccedGetTimelineSkeleton: 'app.bsky.unspecced.getTimelineSkeleton',
7341
+ AppBskyUnspeccedSearchActorsSkeleton:
7342
+ 'app.bsky.unspecced.searchActorsSkeleton',
7343
+ AppBskyUnspeccedSearchPostsSkeleton: 'app.bsky.unspecced.searchPostsSkeleton',
7138
7344
  }
@@ -9,7 +9,10 @@ import { CID } from 'multiformats/cid'
9
9
  import * as AppBskyActorDefs from './defs'
10
10
 
11
11
  export interface QueryParams {
12
+ /** DEPRECATED: use 'q' instead */
12
13
  term?: string
14
+ /** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended */
15
+ q?: string
13
16
  limit?: number
14
17
  cursor?: string
15
18
  }
@@ -9,7 +9,10 @@ import { CID } from 'multiformats/cid'
9
9
  import * as AppBskyActorDefs from './defs'
10
10
 
11
11
  export interface QueryParams {
12
+ /** DEPRECATED: use 'q' instead */
12
13
  term?: string
14
+ /** search query prefix; not a full query string */
15
+ q?: string
13
16
  limit?: number
14
17
  }
15
18
 
@@ -0,0 +1,50 @@
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 './defs'
10
+
11
+ export interface QueryParams {
12
+ /** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended */
13
+ q: string
14
+ limit?: number
15
+ /** optional pagination mechanism; may not necessarily allow scrolling through entire result set */
16
+ cursor?: string
17
+ }
18
+
19
+ export type InputSchema = undefined
20
+
21
+ export interface OutputSchema {
22
+ cursor?: string
23
+ /** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
24
+ hitsTotal?: number
25
+ posts: AppBskyFeedDefs.PostView[]
26
+ [k: string]: unknown
27
+ }
28
+
29
+ export interface CallOptions {
30
+ headers?: Headers
31
+ }
32
+
33
+ export interface Response {
34
+ success: boolean
35
+ headers: Headers
36
+ data: OutputSchema
37
+ }
38
+
39
+ export class BadQueryStringError extends XRPCError {
40
+ constructor(src: XRPCError) {
41
+ super(src.status, src.error, src.message, src.headers)
42
+ }
43
+ }
44
+
45
+ export function toKnownErr(e: any) {
46
+ if (e instanceof XRPCError) {
47
+ if (e.error === 'BadQueryString') return new BadQueryStringError(e)
48
+ }
49
+ return e
50
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { isObj, hasProp } from '../../../../util'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { CID } from 'multiformats/cid'
8
+
9
+ export interface SkeletonSearchPost {
10
+ uri: string
11
+ [k: string]: unknown
12
+ }
13
+
14
+ export function isSkeletonSearchPost(v: unknown): v is SkeletonSearchPost {
15
+ return (
16
+ isObj(v) &&
17
+ hasProp(v, '$type') &&
18
+ v.$type === 'app.bsky.unspecced.defs#skeletonSearchPost'
19
+ )
20
+ }
21
+
22
+ export function validateSkeletonSearchPost(v: unknown): ValidationResult {
23
+ return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchPost', v)
24
+ }
25
+
26
+ export interface SkeletonSearchActor {
27
+ did: string
28
+ [k: string]: unknown
29
+ }
30
+
31
+ export function isSkeletonSearchActor(v: unknown): v is SkeletonSearchActor {
32
+ return (
33
+ isObj(v) &&
34
+ hasProp(v, '$type') &&
35
+ v.$type === 'app.bsky.unspecced.defs#skeletonSearchActor'
36
+ )
37
+ }
38
+
39
+ export function validateSkeletonSearchActor(v: unknown): ValidationResult {
40
+ return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchActor', v)
41
+ }
@@ -0,0 +1,52 @@
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 AppBskyUnspeccedDefs from './defs'
10
+
11
+ export interface QueryParams {
12
+ /** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax */
13
+ q: string
14
+ /** if true, acts as fast/simple 'typeahead' query */
15
+ typeahead?: boolean
16
+ limit?: number
17
+ /** optional pagination mechanism; may not necessarily allow scrolling through entire result set */
18
+ cursor?: string
19
+ }
20
+
21
+ export type InputSchema = undefined
22
+
23
+ export interface OutputSchema {
24
+ cursor?: string
25
+ /** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
26
+ hitsTotal?: number
27
+ actors: AppBskyUnspeccedDefs.SkeletonSearchActor[]
28
+ [k: string]: unknown
29
+ }
30
+
31
+ export interface CallOptions {
32
+ headers?: Headers
33
+ }
34
+
35
+ export interface Response {
36
+ success: boolean
37
+ headers: Headers
38
+ data: OutputSchema
39
+ }
40
+
41
+ export class BadQueryStringError extends XRPCError {
42
+ constructor(src: XRPCError) {
43
+ super(src.status, src.error, src.message, src.headers)
44
+ }
45
+ }
46
+
47
+ export function toKnownErr(e: any) {
48
+ if (e instanceof XRPCError) {
49
+ if (e.error === 'BadQueryString') return new BadQueryStringError(e)
50
+ }
51
+ return e
52
+ }
@@ -0,0 +1,50 @@
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 AppBskyUnspeccedDefs from './defs'
10
+
11
+ export interface QueryParams {
12
+ /** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended */
13
+ q: string
14
+ limit?: number
15
+ /** optional pagination mechanism; may not necessarily allow scrolling through entire result set */
16
+ cursor?: string
17
+ }
18
+
19
+ export type InputSchema = undefined
20
+
21
+ export interface OutputSchema {
22
+ cursor?: string
23
+ /** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
24
+ hitsTotal?: number
25
+ posts: AppBskyUnspeccedDefs.SkeletonSearchPost[]
26
+ [k: string]: unknown
27
+ }
28
+
29
+ export interface CallOptions {
30
+ headers?: Headers
31
+ }
32
+
33
+ export interface Response {
34
+ success: boolean
35
+ headers: Headers
36
+ data: OutputSchema
37
+ }
38
+
39
+ export class BadQueryStringError extends XRPCError {
40
+ constructor(src: XRPCError) {
41
+ super(src.status, src.error, src.message, src.headers)
42
+ }
43
+ }
44
+
45
+ export function toKnownErr(e: any) {
46
+ if (e instanceof XRPCError) {
47
+ if (e.error === 'BadQueryString') return new BadQueryStringError(e)
48
+ }
49
+ return e
50
+ }
@@ -9,7 +9,9 @@ import { CID } from 'multiformats/cid'
9
9
  import * as ComAtprotoAdminDefs from './defs'
10
10
 
11
11
  export interface QueryParams {
12
+ /** DEPRECATED: use 'q' instead */
12
13
  term?: string
14
+ q?: string
13
15
  invitedBy?: string
14
16
  limit?: number
15
17
  cursor?: string