@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,255 @@
1
+ export type Availability = ("everyone" | "teacher");
2
+ export interface IAgreement {
3
+ id: number;
4
+ title: string;
5
+ content: string;
6
+ copyright: ICopyright;
7
+ created: string;
8
+ updated: string;
9
+ updatedBy: string;
10
+ }
11
+ export interface IAgreementSearchResult {
12
+ totalCount: number;
13
+ page?: number;
14
+ pageSize: number;
15
+ language: string;
16
+ results: IAgreementSummary[];
17
+ }
18
+ export interface IAgreementSummary {
19
+ id: number;
20
+ title: string;
21
+ license: string;
22
+ }
23
+ export interface IArticle {
24
+ id: number;
25
+ oldNdlaUrl?: string;
26
+ revision: number;
27
+ status: IStatus;
28
+ title?: IArticleTitle;
29
+ content?: IArticleContent;
30
+ copyright?: ICopyright;
31
+ tags?: IArticleTag;
32
+ requiredLibraries: IRequiredLibrary[];
33
+ visualElement?: IVisualElement;
34
+ introduction?: IArticleIntroduction;
35
+ metaDescription?: IArticleMetaDescription;
36
+ metaImage?: IArticleMetaImage;
37
+ created: string;
38
+ updated: string;
39
+ updatedBy: string;
40
+ published: string;
41
+ articleType: string;
42
+ supportedLanguages: string[];
43
+ notes: IEditorNote[];
44
+ editorLabels: string[];
45
+ grepCodes: string[];
46
+ conceptIds: number[];
47
+ availability: string;
48
+ relatedContent: (IRelatedContentLink | number)[];
49
+ revisions: IRevisionMeta[];
50
+ responsible?: IDraftResponsible;
51
+ slug?: string;
52
+ }
53
+ export interface IArticleContent {
54
+ content: string;
55
+ language: string;
56
+ }
57
+ export interface IArticleIntroduction {
58
+ introduction: string;
59
+ language: string;
60
+ }
61
+ export interface IArticleMetaDescription {
62
+ metaDescription: string;
63
+ language: string;
64
+ }
65
+ export interface IArticleMetaImage {
66
+ url: string;
67
+ alt: string;
68
+ language: string;
69
+ }
70
+ export interface IArticleSummary {
71
+ id: number;
72
+ title: IArticleTitle;
73
+ visualElement?: IVisualElement;
74
+ introduction?: IArticleIntroduction;
75
+ url: string;
76
+ license: string;
77
+ articleType: string;
78
+ supportedLanguages: string[];
79
+ tags?: IArticleTag;
80
+ notes: string[];
81
+ users: string[];
82
+ grepCodes: string[];
83
+ status: IStatus;
84
+ updated: string;
85
+ }
86
+ export interface IArticleTag {
87
+ tags: string[];
88
+ language: string;
89
+ }
90
+ export interface IArticleTitle {
91
+ title: string;
92
+ language: string;
93
+ }
94
+ export interface IAuthor {
95
+ type: string;
96
+ name: string;
97
+ }
98
+ export interface ICopyright {
99
+ license?: ILicense;
100
+ origin?: string;
101
+ creators: IAuthor[];
102
+ processors: IAuthor[];
103
+ rightsholders: IAuthor[];
104
+ agreementId?: number;
105
+ validFrom?: string;
106
+ validTo?: string;
107
+ }
108
+ export interface IDraftResponsible {
109
+ responsibleId: string;
110
+ lastUpdated: string;
111
+ }
112
+ export interface IEditorNote {
113
+ note: string;
114
+ user: string;
115
+ status: IStatus;
116
+ timestamp: string;
117
+ }
118
+ export interface IGrepCodesSearchResult {
119
+ totalCount: number;
120
+ page: number;
121
+ pageSize: number;
122
+ results: string[];
123
+ }
124
+ export interface ILicense {
125
+ license: string;
126
+ description?: string;
127
+ url?: string;
128
+ }
129
+ export interface INewAgreement {
130
+ title: string;
131
+ content: string;
132
+ copyright: INewAgreementCopyright;
133
+ }
134
+ export interface INewAgreementCopyright {
135
+ license?: ILicense;
136
+ origin?: string;
137
+ creators: IAuthor[];
138
+ processors: IAuthor[];
139
+ rightsholders: IAuthor[];
140
+ agreementId?: number;
141
+ validFrom?: string;
142
+ validTo?: string;
143
+ }
144
+ export interface INewArticle {
145
+ language: string;
146
+ title: string;
147
+ published?: string;
148
+ content?: string;
149
+ tags: string[];
150
+ introduction?: string;
151
+ metaDescription?: string;
152
+ metaImage?: INewArticleMetaImage;
153
+ visualElement?: string;
154
+ copyright?: ICopyright;
155
+ requiredLibraries: IRequiredLibrary[];
156
+ articleType: string;
157
+ notes: string[];
158
+ editorLabels: string[];
159
+ grepCodes: string[];
160
+ conceptIds: number[];
161
+ availability?: string;
162
+ relatedContent: (IRelatedContentLink | number)[];
163
+ revisionMeta?: IRevisionMeta[];
164
+ responsibleId?: string;
165
+ slug?: string;
166
+ }
167
+ export interface INewArticleMetaImage {
168
+ id: string;
169
+ alt: string;
170
+ }
171
+ export interface IRelatedContentLink {
172
+ title: string;
173
+ url: string;
174
+ }
175
+ export interface IRequiredLibrary {
176
+ mediaType: string;
177
+ name: string;
178
+ url: string;
179
+ }
180
+ export interface IRevisionMeta {
181
+ id?: string;
182
+ revisionDate: string;
183
+ note: string;
184
+ status: string;
185
+ }
186
+ export interface ISearchResult {
187
+ totalCount: number;
188
+ page: number;
189
+ pageSize: number;
190
+ language: string;
191
+ results: IArticleSummary[];
192
+ }
193
+ export interface IStatus {
194
+ current: string;
195
+ other: string[];
196
+ }
197
+ export interface ITagsSearchResult {
198
+ totalCount: number;
199
+ page: number;
200
+ pageSize: number;
201
+ language: string;
202
+ results: string[];
203
+ }
204
+ export interface IUpdatedAgreement {
205
+ title?: string;
206
+ content?: string;
207
+ copyright?: INewAgreementCopyright;
208
+ }
209
+ export interface IUpdatedArticle {
210
+ revision: number;
211
+ language?: string;
212
+ title?: string;
213
+ status?: string;
214
+ published?: string;
215
+ content?: string;
216
+ tags?: string[];
217
+ introduction?: string;
218
+ metaDescription?: string;
219
+ metaImage?: (null | INewArticleMetaImage);
220
+ visualElement?: string;
221
+ copyright?: ICopyright;
222
+ requiredLibraries?: IRequiredLibrary[];
223
+ articleType?: string;
224
+ notes?: string[];
225
+ editorLabels?: string[];
226
+ grepCodes?: string[];
227
+ conceptIds?: number[];
228
+ createNewVersion?: boolean;
229
+ availability?: string;
230
+ relatedContent?: (IRelatedContentLink | number)[];
231
+ revisionMeta?: IRevisionMeta[];
232
+ responsibleId?: (null | string);
233
+ slug?: string;
234
+ }
235
+ export interface IUpdatedUserData {
236
+ savedSearches?: string[];
237
+ latestEditedArticles?: string[];
238
+ favoriteSubjects?: string[];
239
+ }
240
+ export interface IUploadedFile {
241
+ filename: string;
242
+ mime: string;
243
+ extension: string;
244
+ path: string;
245
+ }
246
+ export interface IUserData {
247
+ userId: string;
248
+ savedSearches?: string[];
249
+ latestEditedArticles?: string[];
250
+ favoriteSubjects?: string[];
251
+ }
252
+ export interface IVisualElement {
253
+ visualElement: string;
254
+ language: string;
255
+ }
@@ -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=draft-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft-api.js","sourceRoot":"","sources":["../draft-api.ts"],"names":[],"mappings":";AAAA,2CAA2C"}
@@ -0,0 +1,135 @@
1
+ export interface IAboutFilmSubject {
2
+ title: string;
3
+ description: string;
4
+ visualElement: IVisualElement;
5
+ language: string;
6
+ }
7
+ export interface IAboutSubject {
8
+ title: string;
9
+ description: string;
10
+ visualElement: IVisualElement;
11
+ }
12
+ export interface IBannerImage {
13
+ mobileUrl?: string;
14
+ mobileId?: number;
15
+ desktopUrl: string;
16
+ desktopId: number;
17
+ }
18
+ export interface IErrorBody {
19
+ code: string;
20
+ description: string;
21
+ occuredAt: string;
22
+ }
23
+ export interface IFilmFrontPageData {
24
+ name: string;
25
+ about: IAboutFilmSubject[];
26
+ movieThemes: IMovieTheme[];
27
+ slideShow: string[];
28
+ }
29
+ export interface IFrontPageData {
30
+ topical: string[];
31
+ categories: ISubjectCollection[];
32
+ }
33
+ export interface IMovieTheme {
34
+ name: IMovieThemeName[];
35
+ movies: string[];
36
+ }
37
+ export interface IMovieThemeName {
38
+ name: string;
39
+ language: string;
40
+ }
41
+ export interface INewOrUpdateBannerImage {
42
+ mobileImageId?: number;
43
+ desktopImageId: number;
44
+ }
45
+ export interface INewOrUpdatedAboutSubject {
46
+ title: string;
47
+ description: string;
48
+ language: string;
49
+ visualElement: INewOrUpdatedVisualElement;
50
+ }
51
+ export interface INewOrUpdatedFilmFrontPageData {
52
+ name: string;
53
+ about: INewOrUpdatedAboutSubject[];
54
+ movieThemes: INewOrUpdatedMovieTheme[];
55
+ slideShow: string[];
56
+ }
57
+ export interface INewOrUpdatedMetaDescription {
58
+ metaDescription: string;
59
+ language: string;
60
+ }
61
+ export interface INewOrUpdatedMovieName {
62
+ name: string;
63
+ language: string;
64
+ }
65
+ export interface INewOrUpdatedMovieTheme {
66
+ name: INewOrUpdatedMovieName[];
67
+ movies: string[];
68
+ }
69
+ export interface INewOrUpdatedVisualElement {
70
+ type: string;
71
+ id: string;
72
+ alt?: string;
73
+ }
74
+ export interface INewSubjectFrontPageData {
75
+ name: string;
76
+ filters?: string[];
77
+ externalId?: string;
78
+ layout: string;
79
+ twitter?: string;
80
+ facebook?: string;
81
+ banner: INewOrUpdateBannerImage;
82
+ about: INewOrUpdatedAboutSubject[];
83
+ metaDescription: INewOrUpdatedMetaDescription[];
84
+ topical?: string;
85
+ mostRead?: string[];
86
+ editorsChoices?: string[];
87
+ latestContent?: string[];
88
+ goTo?: string[];
89
+ }
90
+ export interface ISubjectCollection {
91
+ name: string;
92
+ subjects: ISubjectFilters[];
93
+ }
94
+ export interface ISubjectFilters {
95
+ id: string;
96
+ filters: string[];
97
+ }
98
+ export interface ISubjectPageData {
99
+ id: number;
100
+ name: string;
101
+ filters?: string[];
102
+ layout: string;
103
+ twitter?: string;
104
+ facebook?: string;
105
+ banner: IBannerImage;
106
+ about?: IAboutSubject;
107
+ metaDescription?: string;
108
+ topical?: string;
109
+ mostRead: string[];
110
+ editorsChoices: string[];
111
+ latestContent?: string[];
112
+ goTo: string[];
113
+ supportedLanguages: string[];
114
+ }
115
+ export interface IUpdatedSubjectFrontPageData {
116
+ name?: string;
117
+ filters?: string[];
118
+ externalId?: string;
119
+ layout?: string;
120
+ twitter?: string;
121
+ facebook?: string;
122
+ banner?: INewOrUpdateBannerImage;
123
+ about?: INewOrUpdatedAboutSubject[];
124
+ metaDescription?: INewOrUpdatedMetaDescription[];
125
+ topical?: string;
126
+ mostRead?: string[];
127
+ editorsChoices?: string[];
128
+ latestContent?: string[];
129
+ goTo?: string[];
130
+ }
131
+ export interface IVisualElement {
132
+ type: string;
133
+ url: string;
134
+ alt?: string;
135
+ }
@@ -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=frontpage-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontpage-api.js","sourceRoot":"","sources":["../frontpage-api.ts"],"names":[],"mappings":";AAAA,2CAA2C"}
@@ -0,0 +1,169 @@
1
+ export interface IAuthor {
2
+ type: string;
3
+ name: string;
4
+ }
5
+ export interface ICopyright {
6
+ license: ILicense;
7
+ origin: string;
8
+ creators: IAuthor[];
9
+ processors: IAuthor[];
10
+ rightsholders: IAuthor[];
11
+ agreementId?: number;
12
+ validFrom?: string;
13
+ validTo?: string;
14
+ }
15
+ export interface IEditorNote {
16
+ timestamp: string;
17
+ updatedBy: string;
18
+ note: string;
19
+ }
20
+ export interface IImage {
21
+ url: string;
22
+ size: number;
23
+ contentType: string;
24
+ }
25
+ export interface IImageAltText {
26
+ alttext: string;
27
+ language: string;
28
+ }
29
+ export interface IImageCaption {
30
+ caption: string;
31
+ language: string;
32
+ }
33
+ export interface IImageDimensions {
34
+ width: number;
35
+ height: number;
36
+ }
37
+ export interface IImageFile {
38
+ fileName: string;
39
+ size: number;
40
+ contentType: string;
41
+ imageUrl: string;
42
+ dimensions?: IImageDimensions;
43
+ language: string;
44
+ }
45
+ export interface IImageMetaInformationV2 {
46
+ id: string;
47
+ metaUrl: string;
48
+ title: IImageTitle;
49
+ alttext: IImageAltText;
50
+ imageUrl: string;
51
+ size: number;
52
+ contentType: string;
53
+ copyright: ICopyright;
54
+ tags: IImageTag;
55
+ caption: IImageCaption;
56
+ supportedLanguages: string[];
57
+ created: string;
58
+ createdBy: string;
59
+ modelRelease: string;
60
+ editorNotes?: IEditorNote[];
61
+ imageDimensions?: IImageDimensions;
62
+ }
63
+ export interface IImageMetaInformationV3 {
64
+ id: string;
65
+ metaUrl: string;
66
+ title: IImageTitle;
67
+ alttext: IImageAltText;
68
+ copyright: ICopyright;
69
+ tags: IImageTag;
70
+ caption: IImageCaption;
71
+ supportedLanguages: string[];
72
+ created: string;
73
+ createdBy: string;
74
+ modelRelease: string;
75
+ editorNotes?: IEditorNote[];
76
+ image: IImageFile;
77
+ }
78
+ export interface IImageMetaSummary {
79
+ id: string;
80
+ title: IImageTitle;
81
+ contributors: string[];
82
+ altText: IImageAltText;
83
+ caption: IImageCaption;
84
+ previewUrl: string;
85
+ metaUrl: string;
86
+ license: string;
87
+ supportedLanguages: string[];
88
+ modelRelease?: string;
89
+ editorNotes?: string[];
90
+ lastUpdated: string;
91
+ fileSize: number;
92
+ contentType: string;
93
+ imageDimensions?: IImageDimensions;
94
+ }
95
+ export interface IImageTag {
96
+ tags: string[];
97
+ language: string;
98
+ }
99
+ export interface IImageTitle {
100
+ title: string;
101
+ language: string;
102
+ }
103
+ export interface ILicense {
104
+ license: string;
105
+ description: string;
106
+ url?: string;
107
+ }
108
+ export interface INewImageMetaInformationV2 {
109
+ title: string;
110
+ alttext?: string;
111
+ copyright: ICopyright;
112
+ tags: string[];
113
+ caption: string;
114
+ language: string;
115
+ modelReleased?: string;
116
+ }
117
+ export interface ISearchParams {
118
+ query?: string;
119
+ license?: string;
120
+ language?: string;
121
+ fallback?: boolean;
122
+ minimumSize?: number;
123
+ includeCopyrighted?: boolean;
124
+ sort?: string;
125
+ page?: number;
126
+ pageSize?: number;
127
+ scrollId?: string;
128
+ modelReleased?: string[];
129
+ }
130
+ export interface ISearchResult {
131
+ totalCount: number;
132
+ page?: number;
133
+ pageSize: number;
134
+ language: string;
135
+ results: IImageMetaSummary[];
136
+ }
137
+ export interface ISearchResultV3 {
138
+ totalCount: number;
139
+ page?: number;
140
+ pageSize: number;
141
+ language: string;
142
+ results: IImageMetaInformationV3[];
143
+ }
144
+ export interface ITagsSearchResult {
145
+ totalCount: number;
146
+ page: number;
147
+ pageSize: number;
148
+ language: string;
149
+ results: string[];
150
+ }
151
+ export interface IUpdateImageMetaInformation {
152
+ language: string;
153
+ title?: string;
154
+ alttext?: (null | string);
155
+ copyright?: ICopyright;
156
+ tags?: string[];
157
+ caption?: string;
158
+ modelReleased?: string;
159
+ }
160
+ export interface IValidationError {
161
+ code: string;
162
+ description: string;
163
+ messages: IValidationMessage[];
164
+ occurredAt: string;
165
+ }
166
+ export interface IValidationMessage {
167
+ field: string;
168
+ message: string;
169
+ }
@@ -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=image-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-api.js","sourceRoot":"","sources":["../image-api.ts"],"names":[],"mappings":";AAAA,2CAA2C"}