Support fulltext search api in REST api-client (#8712)
Some checks failed
CI / build (push) Has been cancelled
CI / uitest (push) Has been cancelled
CI / uitest-pg (push) Has been cancelled
CI / uitest-qms (push) Has been cancelled
CI / uitest-workspaces (push) Has been cancelled
CI / svelte-check (push) Has been cancelled
CI / formatting (push) Has been cancelled
CI / test (push) Has been cancelled
CI / docker-build (push) Has been cancelled
CI / dist-build (push) Has been cancelled

* Support fulltext search api in REST api-client

Signed-off-by: Nikolay Marchuk <nikolay.marchuk@hardcoreeng.com>

* Fix template string formatting

Signed-off-by: Nikolay Marchuk <nikolay.marchuk@hardcoreeng.com>

---------

Signed-off-by: Nikolay Marchuk <nikolay.marchuk@hardcoreeng.com>
This commit is contained in:
Nikolay Marchuk 2025-04-25 23:05:30 +07:00 committed by GitHub
parent e61eea7076
commit e4fbe05455
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -229,7 +229,7 @@ export class RestClientImpl implements RestClient {
if (options.limit != null) {
params.append('limit', `${options.limit}`)
}
const requestUrl = concatLink(this.endpoint, `/api/v1/search-fulltext/${this.workspace}`)
const requestUrl = concatLink(this.endpoint, `/api/v1/search-fulltext/${this.workspace}?${params.toString()}`)
const response = await fetch(requestUrl, {
method: 'GET',
headers: this.jsonHeaders(),

View File

@ -22,6 +22,7 @@ import {
type Doc,
type DocumentQuery,
type FindOptions,
type FulltextStorage,
type Hierarchy,
type ModelDb,
type Ref,
@ -29,7 +30,7 @@ import {
type WithLookup
} from '@hcengineering/core'
export interface RestClient extends Storage {
export interface RestClient extends Storage, FulltextStorage {
getAccount: () => Promise<Account>
findOne: <T extends Doc>(