@ndla/types-backend 0.2.100 → 0.2.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/search-api.d.ts +28 -3
- package/build/search-api.js.map +1 -1
- package/package.json +1 -1
package/build/search-api.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type GrepSort = ("-relevance" | "relevance" | "-title" | "title" | "-code" | "code");
|
|
1
2
|
export interface IApiTaxonomyContext {
|
|
2
3
|
publicId: string;
|
|
3
4
|
root: string;
|
|
@@ -21,7 +22,7 @@ export interface IArticleIntroduction {
|
|
|
21
22
|
}
|
|
22
23
|
export interface IArticleResult {
|
|
23
24
|
id: number;
|
|
24
|
-
title:
|
|
25
|
+
title: ITitleWithHtml;
|
|
25
26
|
introduction?: IArticleIntroduction;
|
|
26
27
|
articleType: string;
|
|
27
28
|
supportedLanguages: string[];
|
|
@@ -96,6 +97,26 @@ export interface IDraftSearchParams {
|
|
|
96
97
|
publishedDateTo?: string;
|
|
97
98
|
resultTypes?: SearchType[];
|
|
98
99
|
}
|
|
100
|
+
export interface IGrepResult {
|
|
101
|
+
code: string;
|
|
102
|
+
title: ITitle;
|
|
103
|
+
}
|
|
104
|
+
export interface IGrepSearchInput {
|
|
105
|
+
prefixFilter?: string[];
|
|
106
|
+
codes?: string[];
|
|
107
|
+
query?: string;
|
|
108
|
+
page?: number;
|
|
109
|
+
pageSize?: number;
|
|
110
|
+
sort?: GrepSort;
|
|
111
|
+
language?: string;
|
|
112
|
+
}
|
|
113
|
+
export interface IGrepSearchResults {
|
|
114
|
+
totalCount: number;
|
|
115
|
+
page: number;
|
|
116
|
+
pageSize: number;
|
|
117
|
+
language: string;
|
|
118
|
+
results: IGrepResult[];
|
|
119
|
+
}
|
|
99
120
|
export interface IGroupSearchResult {
|
|
100
121
|
totalCount: number;
|
|
101
122
|
page?: number;
|
|
@@ -172,7 +193,7 @@ export interface IMultiSearchSuggestion {
|
|
|
172
193
|
}
|
|
173
194
|
export interface IMultiSearchSummary {
|
|
174
195
|
id: number;
|
|
175
|
-
title:
|
|
196
|
+
title: ITitleWithHtml;
|
|
176
197
|
metaDescription: IMetaDescription;
|
|
177
198
|
metaImage?: IMetaImage;
|
|
178
199
|
url: string;
|
|
@@ -274,12 +295,16 @@ export interface ITermValue {
|
|
|
274
295
|
count: number;
|
|
275
296
|
}
|
|
276
297
|
export interface ITitle {
|
|
298
|
+
title: string;
|
|
299
|
+
language: string;
|
|
300
|
+
}
|
|
301
|
+
export interface ITitleWithHtml {
|
|
277
302
|
title: string;
|
|
278
303
|
htmlTitle: string;
|
|
279
304
|
language: string;
|
|
280
305
|
}
|
|
281
306
|
export type LearningResourceType = ("standard" | "topic-article" | "frontpage-article" | "learningpath" | "concept" | "gloss");
|
|
282
|
-
export type SearchType = ("article" | "draft" | "learningpath" | "concept");
|
|
307
|
+
export type SearchType = ("article" | "draft" | "learningpath" | "concept" | "grep");
|
|
283
308
|
export type Sort = SortEnum;
|
|
284
309
|
export declare enum SortEnum {
|
|
285
310
|
ByRelevanceDesc = "-relevance",
|
package/build/search-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-api.js","sourceRoot":"","sources":["../search-api.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;
|
|
1
|
+
{"version":3,"file":"search-api.js","sourceRoot":"","sources":["../search-api.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;AAiW3C,IAAY,QA6BX;AA7BD,WAAY,QAAQ;IAClB,0CAA8B,CAAA;IAC9B,wCAA4B,CAAA;IAC5B,kCAAsB,CAAA;IACtB,gCAAoB,CAAA;IACpB,8CAAkC,CAAA;IAClC,4CAAgC,CAAA;IAChC,4BAAgB,CAAA;IAChB,0BAAc,CAAA;IACd,wCAA4B,CAAA;IAC5B,sCAA0B,CAAA;IAC1B,8CAAkC,CAAA;IAClC,gDAAoC,CAAA;IACpC,kEAAsD,CAAA;IACtD,oEAAwD,CAAA;IACxD,kCAAsB,CAAA;IACtB,oCAAwB,CAAA;IACxB,8CAAkC,CAAA;IAClC,4CAAgC,CAAA;IAChC,sDAA0C,CAAA;IAC1C,oDAAwC,CAAA;IACxC,8CAAkC,CAAA;IAClC,4CAAgC,CAAA;IAChC,gDAAoC,CAAA;IACpC,8CAAkC,CAAA;IAClC,0CAA8B,CAAA;IAC9B,wCAA4B,CAAA;IAC5B,0CAA8B,CAAA;IAC9B,wCAA4B,CAAA;AAC9B,CAAC,EA7BW,QAAQ,wBAAR,QAAQ,QA6BnB"}
|
package/package.json
CHANGED