@ndla/types-backend 0.1.1

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.
@@ -0,0 +1,157 @@
1
+ export type Availability = ("everyone" | "teacher");
2
+ export interface IArticleContentV2 {
3
+ content: string;
4
+ language: string;
5
+ }
6
+ export interface IArticleDump {
7
+ totalCount: number;
8
+ page: number;
9
+ pageSize: number;
10
+ language: string;
11
+ results: IArticleV2[];
12
+ }
13
+ export interface IArticleIds {
14
+ articleId: number;
15
+ externalIds: string[];
16
+ }
17
+ export interface IArticleIntroduction {
18
+ introduction: string;
19
+ language: string;
20
+ }
21
+ export interface IArticleMetaDescription {
22
+ metaDescription: string;
23
+ language: string;
24
+ }
25
+ export interface IArticleMetaImage {
26
+ url: string;
27
+ alt: string;
28
+ language: string;
29
+ }
30
+ export interface IArticleSearchParams {
31
+ query?: string;
32
+ language?: string;
33
+ license?: string;
34
+ page?: number;
35
+ pageSize?: number;
36
+ idList: number[];
37
+ articleTypes: string[];
38
+ sort?: string;
39
+ fallback?: boolean;
40
+ scrollId?: string;
41
+ grepCodes: string[];
42
+ }
43
+ export interface IArticleSummaryV2 {
44
+ id: number;
45
+ title: IArticleTitle;
46
+ visualElement?: IVisualElement;
47
+ introduction?: IArticleIntroduction;
48
+ metaDescription?: IArticleMetaDescription;
49
+ metaImage?: IArticleMetaImage;
50
+ url: string;
51
+ license: string;
52
+ articleType: string;
53
+ lastUpdated: string;
54
+ supportedLanguages: string[];
55
+ grepCodes: string[];
56
+ availability: string;
57
+ }
58
+ export interface IArticleTag {
59
+ tags: string[];
60
+ language: string;
61
+ }
62
+ export interface IArticleTitle {
63
+ title: string;
64
+ language: string;
65
+ }
66
+ export interface IArticleV2 {
67
+ id: number;
68
+ oldNdlaUrl?: string;
69
+ revision: number;
70
+ title: IArticleTitle;
71
+ content: IArticleContentV2;
72
+ copyright: ICopyright;
73
+ tags: IArticleTag;
74
+ requiredLibraries: IRequiredLibrary[];
75
+ visualElement?: IVisualElement;
76
+ metaImage?: IArticleMetaImage;
77
+ introduction?: IArticleIntroduction;
78
+ metaDescription: IArticleMetaDescription;
79
+ created: string;
80
+ updated: string;
81
+ updatedBy: string;
82
+ published: string;
83
+ articleType: string;
84
+ supportedLanguages: string[];
85
+ grepCodes: string[];
86
+ conceptIds: number[];
87
+ availability: string;
88
+ relatedContent: (IRelatedContentLink | number)[];
89
+ revisionDate?: string;
90
+ slug?: string;
91
+ }
92
+ export interface IAuthor {
93
+ type: string;
94
+ name: string;
95
+ }
96
+ export interface ICopyright {
97
+ license: ILicense;
98
+ origin: string;
99
+ creators: IAuthor[];
100
+ processors: IAuthor[];
101
+ rightsholders: IAuthor[];
102
+ agreementId?: number;
103
+ validFrom?: string;
104
+ validTo?: string;
105
+ }
106
+ export interface ILicense {
107
+ license: string;
108
+ description?: string;
109
+ url?: string;
110
+ }
111
+ export interface IPartialPublishArticle {
112
+ availability?: Availability;
113
+ grepCodes?: string[];
114
+ license?: string;
115
+ metaDescription?: IArticleMetaDescription[];
116
+ relatedContent?: (IRelatedContentLink | number)[];
117
+ tags?: IArticleTag[];
118
+ revisionDate?: (NullAlias | string);
119
+ }
120
+ export interface IRelatedContentLink {
121
+ title: string;
122
+ url: string;
123
+ }
124
+ export interface IRequiredLibrary {
125
+ mediaType: string;
126
+ name: string;
127
+ url: string;
128
+ }
129
+ export interface ISearchResultV2 {
130
+ totalCount: number;
131
+ page?: number;
132
+ pageSize: number;
133
+ language: string;
134
+ results: IArticleSummaryV2[];
135
+ }
136
+ export interface ITagsSearchResult {
137
+ totalCount: number;
138
+ page: number;
139
+ pageSize: number;
140
+ language: string;
141
+ results: string[];
142
+ }
143
+ export interface IValidationError {
144
+ code: string;
145
+ description: string;
146
+ messages: IValidationMessage[];
147
+ occuredAt: string;
148
+ }
149
+ export interface IValidationMessage {
150
+ field: string;
151
+ message: string;
152
+ }
153
+ export interface IVisualElement {
154
+ visualElement: string;
155
+ language: string;
156
+ }
157
+ export type NullAlias = null;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // DO NOT EDIT: generated file by scala-tsi
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=article-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"article-api.js","sourceRoot":"","sources":["../article-api.ts"],"names":[],"mappings":";AAAA,2CAA2C"}
@@ -0,0 +1,184 @@
1
+ export interface IAudio {
2
+ url: string;
3
+ mimeType: string;
4
+ fileSize: number;
5
+ language: string;
6
+ }
7
+ export interface IAudioMetaInformation {
8
+ id: number;
9
+ revision: number;
10
+ title: ITitle;
11
+ audioFile: IAudio;
12
+ copyright: ICopyright;
13
+ tags: ITag;
14
+ supportedLanguages: string[];
15
+ audioType: string;
16
+ podcastMeta?: IPodcastMeta;
17
+ series?: ISeries;
18
+ manuscript?: IManuscript;
19
+ created: string;
20
+ updated: string;
21
+ }
22
+ export interface IAudioSummary {
23
+ id: number;
24
+ title: ITitle;
25
+ audioType: string;
26
+ url: string;
27
+ license: string;
28
+ supportedLanguages: string[];
29
+ manuscript?: IManuscript;
30
+ podcastMeta?: IPodcastMeta;
31
+ series?: ISeriesSummary;
32
+ lastUpdated: string;
33
+ }
34
+ export interface IAudioSummarySearchResult {
35
+ totalCount: number;
36
+ page?: number;
37
+ pageSize: number;
38
+ language: string;
39
+ results: IAudioSummary[];
40
+ }
41
+ export interface IAuthor {
42
+ type: string;
43
+ name: string;
44
+ }
45
+ export interface ICopyright {
46
+ license: ILicense;
47
+ origin?: string;
48
+ creators: IAuthor[];
49
+ processors: IAuthor[];
50
+ rightsholders: IAuthor[];
51
+ agreementId?: number;
52
+ validFrom?: string;
53
+ validTo?: string;
54
+ }
55
+ export interface ICoverPhoto {
56
+ id: string;
57
+ url: string;
58
+ altText: string;
59
+ }
60
+ export interface IDescription {
61
+ description: string;
62
+ language: string;
63
+ }
64
+ export interface ILicense {
65
+ license: string;
66
+ description?: string;
67
+ url?: string;
68
+ }
69
+ export interface IManuscript {
70
+ manuscript: string;
71
+ language: string;
72
+ }
73
+ export interface INewAudioMetaInformation {
74
+ title: string;
75
+ language: string;
76
+ copyright: ICopyright;
77
+ tags: string[];
78
+ audioType?: string;
79
+ podcastMeta?: INewPodcastMeta;
80
+ seriesId?: number;
81
+ manuscript?: string;
82
+ }
83
+ export interface INewPodcastMeta {
84
+ introduction: string;
85
+ coverPhotoId: string;
86
+ coverPhotoAltText: string;
87
+ }
88
+ export interface INewSeries {
89
+ title: string;
90
+ description: string;
91
+ coverPhotoId: string;
92
+ coverPhotoAltText: string;
93
+ episodes: number[];
94
+ language: string;
95
+ revision?: number;
96
+ hasRSS?: boolean;
97
+ }
98
+ export interface IPodcastMeta {
99
+ introduction: string;
100
+ coverPhoto: ICoverPhoto;
101
+ language: string;
102
+ }
103
+ export interface ISearchParams {
104
+ query?: string;
105
+ license?: string;
106
+ language?: string;
107
+ page?: number;
108
+ pageSize?: number;
109
+ sort?: string;
110
+ scrollId?: string;
111
+ audioType?: string;
112
+ filterBySeries?: boolean;
113
+ fallback?: boolean;
114
+ }
115
+ export interface ISeries {
116
+ id: number;
117
+ revision: number;
118
+ title: ITitle;
119
+ description: IDescription;
120
+ coverPhoto: ICoverPhoto;
121
+ episodes?: IAudioMetaInformation[];
122
+ supportedLanguages: string[];
123
+ hasRSS: boolean;
124
+ }
125
+ export interface ISeriesSearchParams {
126
+ query?: string;
127
+ language?: string;
128
+ page?: number;
129
+ pageSize?: number;
130
+ sort?: string;
131
+ scrollId?: string;
132
+ fallback?: boolean;
133
+ }
134
+ export interface ISeriesSummary {
135
+ id: number;
136
+ title: ITitle;
137
+ description: IDescription;
138
+ supportedLanguages: string[];
139
+ episodes?: IAudioSummary[];
140
+ coverPhoto: ICoverPhoto;
141
+ }
142
+ export interface ISeriesSummarySearchResult {
143
+ totalCount: number;
144
+ page?: number;
145
+ pageSize: number;
146
+ language: string;
147
+ results: ISeriesSummary[];
148
+ }
149
+ export interface ITag {
150
+ tags: string[];
151
+ language: string;
152
+ }
153
+ export interface ITagsSearchResult {
154
+ totalCount: number;
155
+ page: number;
156
+ pageSize: number;
157
+ language: string;
158
+ results: string[];
159
+ }
160
+ export interface ITitle {
161
+ title: string;
162
+ language: string;
163
+ }
164
+ export interface IUpdatedAudioMetaInformation {
165
+ revision: number;
166
+ title: string;
167
+ language: string;
168
+ copyright: ICopyright;
169
+ tags: string[];
170
+ audioType?: string;
171
+ podcastMeta?: INewPodcastMeta;
172
+ seriesId?: number;
173
+ manuscript?: string;
174
+ }
175
+ export interface IValidationError {
176
+ code: string;
177
+ description: string;
178
+ messages: IValidationMessage[];
179
+ occuredAt: string;
180
+ }
181
+ export interface IValidationMessage {
182
+ field: string;
183
+ message: string;
184
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // DO NOT EDIT: generated file by scala-tsi
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=audio-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audio-api.js","sourceRoot":"","sources":["../audio-api.ts"],"names":[],"mappings":";AAAA,2CAA2C"}
@@ -0,0 +1,178 @@
1
+ export interface IAuthor {
2
+ type: string;
3
+ name: string;
4
+ }
5
+ export interface IConcept {
6
+ id: number;
7
+ revision: number;
8
+ title: IConceptTitle;
9
+ content?: IConceptContent;
10
+ copyright?: ICopyright;
11
+ source?: string;
12
+ metaImage?: IConceptMetaImage;
13
+ tags?: IConceptTags;
14
+ subjectIds?: string[];
15
+ created: string;
16
+ updated: string;
17
+ updatedBy?: string[];
18
+ supportedLanguages: string[];
19
+ articleIds: number[];
20
+ status: IStatus;
21
+ visualElement?: IVisualElement;
22
+ responsible?: IConceptResponsible;
23
+ }
24
+ export interface IConceptContent {
25
+ content: string;
26
+ language: string;
27
+ }
28
+ export interface IConceptMetaImage {
29
+ url: string;
30
+ alt: string;
31
+ language: string;
32
+ }
33
+ export interface IConceptResponsible {
34
+ responsibleId: string;
35
+ lastUpdated: string;
36
+ }
37
+ export interface IConceptSearchParams {
38
+ query?: string;
39
+ language?: string;
40
+ page?: number;
41
+ pageSize?: number;
42
+ idList: number[];
43
+ sort?: string;
44
+ fallback?: boolean;
45
+ scrollId?: string;
46
+ subjects: string[];
47
+ tags: string[];
48
+ exactTitleMatch?: boolean;
49
+ embedResource?: string;
50
+ embedId?: string;
51
+ }
52
+ export interface IConceptSearchResult {
53
+ totalCount: number;
54
+ page?: number;
55
+ pageSize: number;
56
+ language: string;
57
+ results: IConceptSummary[];
58
+ }
59
+ export interface IConceptSummary {
60
+ id: number;
61
+ title: IConceptTitle;
62
+ content: IConceptContent;
63
+ metaImage: IConceptMetaImage;
64
+ tags?: IConceptTags;
65
+ subjectIds?: string[];
66
+ supportedLanguages: string[];
67
+ lastUpdated: string;
68
+ created: string;
69
+ status: IStatus;
70
+ updatedBy: string[];
71
+ license?: string;
72
+ copyright?: ICopyright;
73
+ visualElement?: IVisualElement;
74
+ articleIds: number[];
75
+ source?: string;
76
+ responsible?: IConceptResponsible;
77
+ }
78
+ export interface IConceptTags {
79
+ tags: string[];
80
+ language: string;
81
+ }
82
+ export interface IConceptTitle {
83
+ title: string;
84
+ language: string;
85
+ }
86
+ export interface ICopyright {
87
+ license?: ILicense;
88
+ origin?: string;
89
+ creators: IAuthor[];
90
+ processors: IAuthor[];
91
+ rightsholders: IAuthor[];
92
+ agreementId?: number;
93
+ validFrom?: string;
94
+ validTo?: string;
95
+ }
96
+ export interface IDraftConceptSearchParams {
97
+ query?: string;
98
+ language?: string;
99
+ page?: number;
100
+ pageSize?: number;
101
+ idList: number[];
102
+ sort?: string;
103
+ fallback?: boolean;
104
+ scrollId?: string;
105
+ subjects: string[];
106
+ tags: string[];
107
+ status: string[];
108
+ users: string[];
109
+ embedResource?: string;
110
+ embedId?: string;
111
+ responsibleIds: string[];
112
+ }
113
+ export interface ILicense {
114
+ license: string;
115
+ description?: string;
116
+ url?: string;
117
+ }
118
+ export interface INewConcept {
119
+ language: string;
120
+ title: string;
121
+ content?: string;
122
+ copyright?: ICopyright;
123
+ source?: string;
124
+ metaImage?: INewConceptMetaImage;
125
+ tags?: string[];
126
+ subjectIds?: string[];
127
+ articleIds?: number[];
128
+ visualElement?: string;
129
+ responsibleId?: string;
130
+ }
131
+ export interface INewConceptMetaImage {
132
+ id: string;
133
+ alt: string;
134
+ }
135
+ export interface IStatus {
136
+ current: string;
137
+ other: string[];
138
+ }
139
+ export interface ISubjectTags {
140
+ subjectId: string;
141
+ tags: string[];
142
+ language: string;
143
+ }
144
+ export interface ITagsSearchResult {
145
+ totalCount: number;
146
+ page: number;
147
+ pageSize: number;
148
+ language: string;
149
+ results: string[];
150
+ }
151
+ export interface IUpdatedConcept {
152
+ language: string;
153
+ title?: string;
154
+ content?: string;
155
+ metaImage?: (null | INewConceptMetaImage);
156
+ copyright?: ICopyright;
157
+ source?: string;
158
+ tags?: string[];
159
+ subjectIds?: string[];
160
+ articleIds?: number[];
161
+ status?: string;
162
+ visualElement?: string;
163
+ responsibleId?: (null | string);
164
+ }
165
+ export interface IValidationError {
166
+ code: string;
167
+ description: string;
168
+ messages: IValidationMessage[];
169
+ occuredAt: string;
170
+ }
171
+ export interface IValidationMessage {
172
+ field: string;
173
+ message: string;
174
+ }
175
+ export interface IVisualElement {
176
+ visualElement: string;
177
+ language: string;
178
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // DO NOT EDIT: generated file by scala-tsi
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=concept-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concept-api.js","sourceRoot":"","sources":["../concept-api.ts"],"names":[],"mappings":";AAAA,2CAA2C"}