Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Sep 25, 2023
2 parents c47f8b2 + 233a132 commit 7a4e435
Show file tree
Hide file tree
Showing 48 changed files with 1,848 additions and 21 deletions.
13 changes: 10 additions & 3 deletions lexicons/app/bsky/actor/searchActors.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@
"defs": {
"main": {
"type": "query",
"description": "Find actors matching search criteria.",
"description": "Find actors (profiles) matching search criteria.",
"parameters": {
"type": "params",
"properties": {
"term": { "type": "string" },
"term": {
"type": "string",
"description": "DEPRECATED: use 'q' instead"
},
"q": {
"type": "string",
"description": "search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
"default": 25
},
"cursor": { "type": "string" }
}
Expand Down
11 changes: 9 additions & 2 deletions lexicons/app/bsky/actor/searchActorsTypeahead.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@
"parameters": {
"type": "params",
"properties": {
"term": { "type": "string" },
"term": {
"type": "string",
"description": "DEPRECATED: use 'q' instead"
},
"q": {
"type": "string",
"description": "search query prefix; not a full query string"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
"default": 10
}
}
},
Expand Down
52 changes: 52 additions & 0 deletions lexicons/app/bsky/feed/searchPosts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"lexicon": 1,
"id": "app.bsky.feed.searchPosts",
"defs": {
"main": {
"type": "query",
"description": "Find posts matching search criteria",
"parameters": {
"type": "params",
"required": ["q"],
"properties": {
"q": {
"type": "string",
"description": "search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 25
},
"cursor": {
"type": "string",
"description": "optional pagination mechanism; may not necessarily allow scrolling through entire result set"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["posts"],
"properties": {
"cursor": { "type": "string" },
"hitsTotal": {
"type": "integer",
"description": "count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits"
},
"posts": {
"type": "array",
"items": {
"type": "ref",
"ref": "app.bsky.feed.defs#postView"
}
}
}
}
},
"errors": [{ "name": "BadQueryString" }]
}
}
}
20 changes: 20 additions & 0 deletions lexicons/app/bsky/unspecced/defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"lexicon": 1,
"id": "app.bsky.unspecced.defs",
"defs": {
"skeletonSearchPost": {
"type": "object",
"required": ["uri"],
"properties": {
"uri": { "type": "string", "format": "at-uri" }
}
},
"skeletonSearchActor": {
"type": "object",
"required": ["did"],
"properties": {
"did": { "type": "string", "format": "did" }
}
}
}
}
56 changes: 56 additions & 0 deletions lexicons/app/bsky/unspecced/searchActorsSkeleton.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"lexicon": 1,
"id": "app.bsky.unspecced.searchActorsSkeleton",
"defs": {
"main": {
"type": "query",
"description": "Backend Actors (profile) search, returning only skeleton",
"parameters": {
"type": "params",
"required": ["q"],
"properties": {
"q": {
"type": "string",
"description": "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"
},
"typeahead": {
"type": "boolean",
"description": "if true, acts as fast/simple 'typeahead' query"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 25
},
"cursor": {
"type": "string",
"description": "optional pagination mechanism; may not necessarily allow scrolling through entire result set"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["actors"],
"properties": {
"cursor": { "type": "string" },
"hitsTotal": {
"type": "integer",
"description": "count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits"
},
"actors": {
"type": "array",
"items": {
"type": "ref",
"ref": "app.bsky.unspecced.defs#skeletonSearchActor"
}
}
}
}
},
"errors": [{ "name": "BadQueryString" }]
}
}
}
52 changes: 52 additions & 0 deletions lexicons/app/bsky/unspecced/searchPostsSkeleton.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"lexicon": 1,
"id": "app.bsky.unspecced.searchPostsSkeleton",
"defs": {
"main": {
"type": "query",
"description": "Backend Posts search, returning only skeleton",
"parameters": {
"type": "params",
"required": ["q"],
"properties": {
"q": {
"type": "string",
"description": "search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 25
},
"cursor": {
"type": "string",
"description": "optional pagination mechanism; may not necessarily allow scrolling through entire result set"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["posts"],
"properties": {
"cursor": { "type": "string" },
"hitsTotal": {
"type": "integer",
"description": "count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits"
},
"posts": {
"type": "array",
"items": {
"type": "ref",
"ref": "app.bsky.unspecced.defs#skeletonSearchPost"
}
}
}
}
},
"errors": [{ "name": "BadQueryString" }]
}
}
}
6 changes: 5 additions & 1 deletion lexicons/com/atproto/admin/searchRepos.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
"parameters": {
"type": "params",
"properties": {
"term": { "type": "string" },
"term": {
"type": "string",
"description": "DEPRECATED: use 'q' instead"
},
"q": { "type": "string" },
"invitedBy": { "type": "string" },
"limit": {
"type": "integer",
Expand Down
6 changes: 6 additions & 0 deletions packages/api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @atproto/api

## 0.6.18

### Patch Changes

- [#1651](https://github.com/bluesky-social/atproto/pull/1651) [`2ce8a11b`](https://github.com/bluesky-social/atproto/commit/2ce8a11b8daf5d39027488c5dde8c47b0eb937bf) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Adds support for hashtags in the `RichText.detectFacets` method.

## 0.6.17

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atproto/api",
"version": "0.6.17",
"version": "0.6.18",
"license": "MIT",
"description": "Client library for atproto and Bluesky",
"keywords": [
Expand Down
41 changes: 41 additions & 0 deletions packages/api/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ import * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline'
import * as AppBskyFeedLike from './types/app/bsky/feed/like'
import * as AppBskyFeedPost from './types/app/bsky/feed/post'
import * as AppBskyFeedRepost from './types/app/bsky/feed/repost'
import * as AppBskyFeedSearchPosts from './types/app/bsky/feed/searchPosts'
import * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate'
import * as AppBskyGraphBlock from './types/app/bsky/graph/block'
import * as AppBskyGraphDefs from './types/app/bsky/graph/defs'
Expand All @@ -128,9 +129,12 @@ import * as AppBskyNotificationListNotifications from './types/app/bsky/notifica
import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush'
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
import * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
import * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
import * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'

export * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs'
export * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites'
Expand Down Expand Up @@ -228,6 +232,7 @@ export * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline'
export * as AppBskyFeedLike from './types/app/bsky/feed/like'
export * as AppBskyFeedPost from './types/app/bsky/feed/post'
export * as AppBskyFeedRepost from './types/app/bsky/feed/repost'
export * as AppBskyFeedSearchPosts from './types/app/bsky/feed/searchPosts'
export * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate'
export * as AppBskyGraphBlock from './types/app/bsky/graph/block'
export * as AppBskyGraphDefs from './types/app/bsky/graph/defs'
Expand All @@ -253,9 +258,12 @@ export * as AppBskyNotificationListNotifications from './types/app/bsky/notifica
export * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush'
export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
export * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
export * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
export * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
export * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
export * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'

export const COM_ATPROTO_ADMIN = {
DefsTakedown: 'com.atproto.admin.defs#takedown',
Expand Down Expand Up @@ -1379,6 +1387,17 @@ export class FeedNS {
throw AppBskyFeedGetTimeline.toKnownErr(e)
})
}

searchPosts(
params?: AppBskyFeedSearchPosts.QueryParams,
opts?: AppBskyFeedSearchPosts.CallOptions,
): Promise<AppBskyFeedSearchPosts.Response> {
return this._service.xrpc
.call('app.bsky.feed.searchPosts', params, undefined, opts)
.catch((e) => {
throw AppBskyFeedSearchPosts.toKnownErr(e)
})
}
}

export class GeneratorRecord {
Expand Down Expand Up @@ -2269,4 +2288,26 @@ export class UnspeccedNS {
throw AppBskyUnspeccedGetTimelineSkeleton.toKnownErr(e)
})
}

searchActorsSkeleton(
params?: AppBskyUnspeccedSearchActorsSkeleton.QueryParams,
opts?: AppBskyUnspeccedSearchActorsSkeleton.CallOptions,
): Promise<AppBskyUnspeccedSearchActorsSkeleton.Response> {
return this._service.xrpc
.call('app.bsky.unspecced.searchActorsSkeleton', params, undefined, opts)
.catch((e) => {
throw AppBskyUnspeccedSearchActorsSkeleton.toKnownErr(e)
})
}

searchPostsSkeleton(
params?: AppBskyUnspeccedSearchPostsSkeleton.QueryParams,
opts?: AppBskyUnspeccedSearchPostsSkeleton.CallOptions,
): Promise<AppBskyUnspeccedSearchPostsSkeleton.Response> {
return this._service.xrpc
.call('app.bsky.unspecced.searchPostsSkeleton', params, undefined, opts)
.catch((e) => {
throw AppBskyUnspeccedSearchPostsSkeleton.toKnownErr(e)
})
}
}
Loading

0 comments on commit 7a4e435

Please sign in to comment.