@ndla/types-backend 0.2.93 → 0.2.95

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"}
@@ -16,6 +16,7 @@ export interface IApiTaxonomyContext {
16
16
  }
17
17
  export interface IArticleIntroduction {
18
18
  introduction: string;
19
+ htmlIntroduction: string;
19
20
  language: string;
20
21
  }
21
22
  export interface IArticleResult {
@@ -252,6 +253,7 @@ export interface ITermValue {
252
253
  }
253
254
  export interface ITitle {
254
255
  title: string;
256
+ htmlTitle: string;
255
257
  language: string;
256
258
  }
257
259
  export type LearningResourceType = ("standard" | "topic-article" | "frontpage-article" | "learningpath" | "concept" | "gloss");
@@ -1 +1 @@
1
- {"version":3,"file":"search-api.js","sourceRoot":"","sources":["../search-api.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;AA0S3C,IAAY,QA6BX;AA7BD,WAAY,QAAQ;IAClB,0CAA8B,CAAA;IAC9B,wCAA4B,CAAA;IAC5B,kCAAsB,CAAA;IACtB,gCAAoB,CAAA;IACpB,8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AA4B,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.93"
30
+ "version": "0.2.95"
31
31
  }