@ndla/types-backend 0.2.94 → 0.2.96

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.
@@ -1,4 +1,14 @@
1
1
  export type Availability = ("everyone" | "teacher");
2
+ export declare enum DraftSortEnum {
3
+ ByRelevanceDesc = "-relevance",
4
+ ByRelevanceAsc = "relevance",
5
+ ByTitleDesc = "-title",
6
+ ByTitleAsc = "title",
7
+ ByLastUpdatedDesc = "-lastUpdated",
8
+ ByLastUpdatedAsc = "lastUpdated",
9
+ ByIdDesc = "-id",
10
+ ByIdAsc = "id"
11
+ }
2
12
  export type Grade = (1 | 2 | 3 | 4 | 5);
3
13
  export interface IArticle {
4
14
  id: number;
@@ -53,6 +63,19 @@ export interface IArticleMetaImage {
53
63
  alt: string;
54
64
  language: string;
55
65
  }
66
+ export interface IArticleSearchParams {
67
+ query?: string;
68
+ language?: string;
69
+ license?: string;
70
+ page?: number;
71
+ pageSize?: number;
72
+ ids?: number[];
73
+ articleTypes?: string[];
74
+ sort?: Sort;
75
+ scrollId?: string;
76
+ fallback?: boolean;
77
+ grepCodes?: string[];
78
+ }
56
79
  export interface IArticleSummary {
57
80
  id: number;
58
81
  title: IArticleTitle;
@@ -256,5 +279,6 @@ export interface IVisualElement {
256
279
  visualElement: string;
257
280
  language: string;
258
281
  }
282
+ export type Sort = DraftSortEnum;
259
283
  export type UpdateOrDeleteNewArticleMetaImage = (null | undefined | INewArticleMetaImage);
260
284
  export type UpdateOrDeleteString = (null | undefined | string);
@@ -1,4 +1,16 @@
1
1
  "use strict";
2
2
  // DO NOT EDIT: generated file by scala-tsi
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.DraftSortEnum = void 0;
5
+ var DraftSortEnum;
6
+ (function (DraftSortEnum) {
7
+ DraftSortEnum["ByRelevanceDesc"] = "-relevance";
8
+ DraftSortEnum["ByRelevanceAsc"] = "relevance";
9
+ DraftSortEnum["ByTitleDesc"] = "-title";
10
+ DraftSortEnum["ByTitleAsc"] = "title";
11
+ DraftSortEnum["ByLastUpdatedDesc"] = "-lastUpdated";
12
+ DraftSortEnum["ByLastUpdatedAsc"] = "lastUpdated";
13
+ DraftSortEnum["ByIdDesc"] = "-id";
14
+ DraftSortEnum["ByIdAsc"] = "id";
15
+ })(DraftSortEnum || (exports.DraftSortEnum = DraftSortEnum = {}));
4
16
  //# sourceMappingURL=draft-api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"draft-api.js","sourceRoot":"","sources":["../draft-api.ts"],"names":[],"mappings":";AAAA,2CAA2C"}
1
+ {"version":3,"file":"draft-api.js","sourceRoot":"","sources":["../draft-api.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;AAI3C,IAAY,aASX;AATD,WAAY,aAAa;IACvB,+CAA8B,CAAA;IAC9B,6CAA4B,CAAA;IAC5B,uCAAsB,CAAA;IACtB,qCAAoB,CAAA;IACpB,mDAAkC,CAAA;IAClC,iDAAgC,CAAA;IAChC,iCAAgB,CAAA;IAChB,+BAAc,CAAA;AAChB,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB"}
@@ -214,6 +214,28 @@ export interface ISearchError {
214
214
  type: string;
215
215
  errorMsg: string;
216
216
  }
217
+ export interface ISearchParams {
218
+ page?: number;
219
+ pageSize?: number;
220
+ articleTypes?: string[];
221
+ scrollId?: string;
222
+ query?: string;
223
+ fallback?: boolean;
224
+ language?: string;
225
+ license?: string;
226
+ ids?: number[];
227
+ subjects?: string[];
228
+ resourceTypes?: string[];
229
+ contextTypes?: string[];
230
+ relevance?: string[];
231
+ languageFilter?: string[];
232
+ grepCodes?: string[];
233
+ aggregatePaths?: string[];
234
+ embedResource?: string[];
235
+ embedId?: string;
236
+ filterInactive?: boolean;
237
+ sort?: string;
238
+ }
217
239
  export interface ISearchSuggestion {
218
240
  text: string;
219
241
  offset: number;
@@ -1 +1 @@
1
- {"version":3,"file":"search-api.js","sourceRoot":"","sources":["../search-api.ts"],"names":[],"mappings":";AAAA,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kC,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
@@ -27,5 +27,5 @@
27
27
  "devDependencies": {
28
28
  "typescript": "^5.3.3"
29
29
  },
30
- "version": "0.2.94"
30
+ "version": "0.2.96"
31
31
  }