feat(api): GET /api/admin/search endpoint + regenerated client types
Expose full-text search over catalogue objects via a new admin endpoint backed by the Meilisearch SearchClient. Validates visibility filter values, short-circuits on empty queries, clamps pagination, and returns 503 when search is not configured. Registered in OpenAPI; schema.d.ts regenerated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vendored
+83
@@ -168,6 +168,22 @@ export interface paths {
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/api/admin/search": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: operations["search_objects"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/api/admin/users": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
@@ -430,6 +446,19 @@ export interface components {
|
||||
/** @description `"ok"` when ready, `"degraded"` otherwise. */
|
||||
status: string;
|
||||
};
|
||||
SearchHitView: {
|
||||
brief_description?: string | null;
|
||||
id: string;
|
||||
object_name: string;
|
||||
object_number: string;
|
||||
snippet?: string | null;
|
||||
visibility: string;
|
||||
};
|
||||
SearchResultsView: {
|
||||
/** @description Meilisearch's estimate of the total number of matches. */
|
||||
estimated_total: number;
|
||||
hits: components["schemas"]["SearchHitView"][];
|
||||
};
|
||||
TermView: {
|
||||
external_uri?: string | null;
|
||||
id: string;
|
||||
@@ -947,6 +976,60 @@ export interface operations {
|
||||
};
|
||||
};
|
||||
};
|
||||
search_objects: {
|
||||
parameters: {
|
||||
query: {
|
||||
/** @description Search query text */
|
||||
q: string;
|
||||
/** @description Filter: draft|internal|public */
|
||||
visibility?: string;
|
||||
/** @description default 0 */
|
||||
offset?: number;
|
||||
/** @description 1..=50, default 20 */
|
||||
limit?: number;
|
||||
};
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["SearchResultsView"];
|
||||
};
|
||||
};
|
||||
/** @description Invalid visibility value */
|
||||
400: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content?: never;
|
||||
};
|
||||
401: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content?: never;
|
||||
};
|
||||
403: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content?: never;
|
||||
};
|
||||
/** @description Search is not configured */
|
||||
503: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content?: never;
|
||||
};
|
||||
};
|
||||
};
|
||||
list_users: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
||||
Reference in New Issue
Block a user