@ndla/types-backend 1.0.25 → 1.0.27
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/myndla-api.d.ts +2 -1
- package/build/search-api.d.ts +16 -3
- package/build/search-api.js.map +1 -1
- package/package.json +1 -1
package/build/myndla-api.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface IMyNDLAUserDTO {
|
|
|
41
41
|
email: string;
|
|
42
42
|
displayName: string;
|
|
43
43
|
favoriteSubjects: string[];
|
|
44
|
-
role:
|
|
44
|
+
role: UserRole;
|
|
45
45
|
organization: string;
|
|
46
46
|
groups: IMyNDLAGroupDTO[];
|
|
47
47
|
arenaEnabled: boolean;
|
|
@@ -112,3 +112,4 @@ export interface IUserFolderDTO {
|
|
|
112
112
|
sharedFolders: IFolderDTO[];
|
|
113
113
|
}
|
|
114
114
|
export type ResourceType = ("article" | "audio" | "concept" | "image" | "learningpath" | "multidisciplinary" | "topic" | "video");
|
|
115
|
+
export type UserRole = ("employee" | "student");
|
package/build/search-api.d.ts
CHANGED
|
@@ -174,7 +174,7 @@ export interface IGroupSearchResultDTO {
|
|
|
174
174
|
page?: number;
|
|
175
175
|
pageSize: number;
|
|
176
176
|
language: string;
|
|
177
|
-
results:
|
|
177
|
+
results: MultiSummaryBaseDTO[];
|
|
178
178
|
suggestions: IMultiSearchSuggestionDTO[];
|
|
179
179
|
aggregations: IMultiSearchTermsAggregationDTO[];
|
|
180
180
|
resourceType: string;
|
|
@@ -235,7 +235,7 @@ export interface IMultiSearchResultDTO {
|
|
|
235
235
|
page?: number;
|
|
236
236
|
pageSize: number;
|
|
237
237
|
language: string;
|
|
238
|
-
results:
|
|
238
|
+
results: MultiSummaryBaseDTO[];
|
|
239
239
|
suggestions: IMultiSearchSuggestionDTO[];
|
|
240
240
|
aggregations: IMultiSearchTermsAggregationDTO[];
|
|
241
241
|
}
|
|
@@ -271,6 +271,7 @@ export interface IMultiSearchSummaryDTO {
|
|
|
271
271
|
published?: string;
|
|
272
272
|
favorited?: number;
|
|
273
273
|
resultType: SearchType;
|
|
274
|
+
typename: "MultiSearchSummaryDTO";
|
|
274
275
|
}
|
|
275
276
|
export interface IMultiSearchTermsAggregationDTO {
|
|
276
277
|
field: string;
|
|
@@ -278,6 +279,11 @@ export interface IMultiSearchTermsAggregationDTO {
|
|
|
278
279
|
docCountErrorUpperBound: number;
|
|
279
280
|
values: ITermValueDTO[];
|
|
280
281
|
}
|
|
282
|
+
export interface INodeHitDTO {
|
|
283
|
+
id: string;
|
|
284
|
+
subjectPage?: ISubjectPageSummaryDTO;
|
|
285
|
+
typename: "NodeHitDTO";
|
|
286
|
+
}
|
|
281
287
|
export interface IRevisionMetaDTO {
|
|
282
288
|
revisionDate: string;
|
|
283
289
|
note: string;
|
|
@@ -304,6 +310,7 @@ export interface ISearchParamsDTO {
|
|
|
304
310
|
embedResource?: string[];
|
|
305
311
|
embedId?: string;
|
|
306
312
|
filterInactive?: boolean;
|
|
313
|
+
resultTypes?: SearchType[];
|
|
307
314
|
sort?: string;
|
|
308
315
|
}
|
|
309
316
|
export interface ISearchSuggestionDTO {
|
|
@@ -330,6 +337,11 @@ export interface ISubjectAggregationsDTO {
|
|
|
330
337
|
export interface ISubjectAggsInputDTO {
|
|
331
338
|
subjects?: string[];
|
|
332
339
|
}
|
|
340
|
+
export interface ISubjectPageSummaryDTO {
|
|
341
|
+
id: number;
|
|
342
|
+
name: string;
|
|
343
|
+
metaDescription: IMetaDescriptionDTO;
|
|
344
|
+
}
|
|
333
345
|
export interface ISuggestOptionDTO {
|
|
334
346
|
text: string;
|
|
335
347
|
score: number;
|
|
@@ -353,8 +365,9 @@ export interface ITitleWithHtmlDTO {
|
|
|
353
365
|
language: string;
|
|
354
366
|
}
|
|
355
367
|
export type LearningResourceType = ("standard" | "topic-article" | "frontpage-article" | "learningpath" | "concept" | "gloss");
|
|
368
|
+
export type MultiSummaryBaseDTO = (IMultiSearchSummaryDTO | INodeHitDTO);
|
|
356
369
|
export type SearchTrait = ("VIDEO" | "H5P" | "AUDIO" | "PODCAST");
|
|
357
|
-
export type SearchType = ("article" | "draft" | "learningpath" | "concept" | "grep");
|
|
370
|
+
export type SearchType = ("article" | "draft" | "learningpath" | "concept" | "grep" | "node");
|
|
358
371
|
export type Sort = SortEnum;
|
|
359
372
|
export declare enum SortEnum {
|
|
360
373
|
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;;;AA6a3C,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