feat: implement durable permission-aware search
This commit is contained in:
@@ -27,6 +27,8 @@ export type SearchResult = {
|
||||
breadcrumbs: string[];
|
||||
external_reference?: SearchExternalReference | null;
|
||||
metadata: Record<string, unknown>;
|
||||
source_revision?: string | null;
|
||||
provenance: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type SearchResponse = {
|
||||
@@ -37,6 +39,8 @@ export type SearchResponse = {
|
||||
status: "unavailable";
|
||||
message: string;
|
||||
}>;
|
||||
next_cursor?: string | null;
|
||||
has_more: boolean;
|
||||
};
|
||||
|
||||
export type SearchRequest = {
|
||||
@@ -47,6 +51,8 @@ export type SearchRequest = {
|
||||
contextId?: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
cursor?: string;
|
||||
language?: string;
|
||||
};
|
||||
|
||||
export function search(
|
||||
@@ -63,7 +69,9 @@ export function search(
|
||||
context_kind: request.contextKind,
|
||||
context_id: request.contextId,
|
||||
limit: request.limit,
|
||||
offset: request.offset
|
||||
offset: request.offset,
|
||||
cursor: request.cursor,
|
||||
language: request.language
|
||||
}),
|
||||
{ signal }
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user