@ndla/types-backend 0.2.94 → 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.
- package/build/draft-api.d.ts +24 -0
- package/build/draft-api.js +12 -0
- package/build/draft-api.js.map +1 -1
- package/package.json +1 -1
package/build/draft-api.d.ts
CHANGED
|
@@ -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);
|
package/build/draft-api.js
CHANGED
|
@@ -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
|
package/build/draft-api.js.map
CHANGED
|
@@ -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"}
|
package/package.json
CHANGED