From 14fe6d611fb2be5e962e9854dd89d068377a0205 Mon Sep 17 00:00:00 2001 From: Jonas Natten Date: Mon, 4 Nov 2024 10:03:44 +0100 Subject: [PATCH] search-api: Generate typescript type for `SearchParams` --- project/searchapi.scala | 1 + typescript/types-backend/search-api.ts | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/project/searchapi.scala b/project/searchapi.scala index f09ce6602..6148e63d1 100644 --- a/project/searchapi.scala +++ b/project/searchapi.scala @@ -39,6 +39,7 @@ object searchapi extends Module { "ImageResults", "LearningpathResults", "SearchError", + "SearchParams", "DraftSearchParams", "SubjectAggregations", "SubjectAggsInput" diff --git a/typescript/types-backend/search-api.ts b/typescript/types-backend/search-api.ts index 10825e165..5b58b5cfb 100644 --- a/typescript/types-backend/search-api.ts +++ b/typescript/types-backend/search-api.ts @@ -241,6 +241,29 @@ export interface ISearchError { errorMsg: string } +export interface ISearchParams { + page?: number + pageSize?: number + articleTypes?: string[] + scrollId?: string + query?: string + fallback?: boolean + language?: string + license?: string + ids?: number[] + subjects?: string[] + resourceTypes?: string[] + contextTypes?: string[] + relevance?: string[] + languageFilter?: string[] + grepCodes?: string[] + aggregatePaths?: string[] + embedResource?: string[] + embedId?: string + filterInactive?: boolean + sort?: string +} + export interface ISearchSuggestion { text: string offset: number