chore: workspace entity search endpoint (#6272)
* chore: workspace entity search endpoint * fix: editor entity search endpoint * chore: restrict guest users --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
This commit is contained in:
parent
2d9464e841
commit
f54f3a6091
10 changed files with 481 additions and 233 deletions
|
|
@ -12,6 +12,8 @@ import {
|
|||
IUserProjectsRole,
|
||||
IWorkspaceView,
|
||||
TIssuesResponse,
|
||||
TSearchResponse,
|
||||
TSearchEntityRequestPayload,
|
||||
} from "@plane/types";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// helpers
|
||||
|
|
@ -277,4 +279,17 @@ export class WorkspaceService extends APIService {
|
|||
throw error?.response?.data;
|
||||
});
|
||||
}
|
||||
|
||||
async searchEntity(workspaceSlug: string, params: TSearchEntityRequestPayload): Promise<TSearchResponse> {
|
||||
return this.get(`/api/workspaces/${workspaceSlug}/entity-search/`, {
|
||||
params: {
|
||||
...params,
|
||||
query_type: params.query_type.join(","),
|
||||
},
|
||||
})
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response?.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue