@ndla/types-backend 0.2.38 → 0.2.39

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,4 @@
1
- export type Availability = ("decoder" | "encoder" | "everyone" | "teacher");
1
+ export type Availability = ("everyone" | "teacher");
2
2
  export interface IArticleContentV2 {
3
3
  content: string;
4
4
  language: string;
@@ -1,3 +1,4 @@
1
+ export type Either = (ILeft | IRight);
1
2
  export interface IAuthor {
2
3
  type: string;
3
4
  name: string;
@@ -139,6 +140,10 @@ export interface IGlossExample {
139
140
  [key: string]: string;
140
141
  };
141
142
  }
143
+ export interface ILeft {
144
+ value: "Could not find TSType[A] in scope and could not generate it";
145
+ type: "Left";
146
+ }
142
147
  export interface ILicense {
143
148
  license: string;
144
149
  description?: string;
@@ -162,6 +167,10 @@ export interface INewConceptMetaImage {
162
167
  id: string;
163
168
  alt: string;
164
169
  }
170
+ export interface IRight {
171
+ value: "Could not find TSType[B] in scope and could not generate it";
172
+ type: "Right";
173
+ }
165
174
  export interface IStatus {
166
175
  current: string;
167
176
  other: string[];
@@ -182,14 +191,14 @@ export interface IUpdatedConcept {
182
191
  language: string;
183
192
  title?: string;
184
193
  content?: string;
185
- metaImage?: (null | INewConceptMetaImage);
194
+ metaImage: Either;
186
195
  copyright?: IDraftCopyright;
187
196
  tags?: string[];
188
197
  subjectIds?: string[];
189
198
  articleIds?: number[];
190
199
  status?: string;
191
200
  visualElement?: string;
192
- responsibleId?: (null | string);
201
+ responsibleId: Either;
193
202
  conceptType?: string;
194
203
  glossData?: IGlossData;
195
204
  }
@@ -1,4 +1,5 @@
1
- export type Availability = ("decoder" | "encoder" | "everyone" | "teacher");
1
+ export type Availability = ("everyone" | "teacher");
2
+ export type Either = (ILeft | IRight);
2
3
  export interface IArticle {
3
4
  id: number;
4
5
  oldNdlaUrl?: string;
@@ -112,6 +113,10 @@ export interface IGrepCodesSearchResult {
112
113
  pageSize: number;
113
114
  results: string[];
114
115
  }
116
+ export interface ILeft {
117
+ value: "Could not find TSType[A] in scope and could not generate it";
118
+ type: "Left";
119
+ }
115
120
  export interface ILicense {
116
121
  license: string;
117
122
  description?: string;
@@ -166,6 +171,10 @@ export interface IRevisionMeta {
166
171
  note: string;
167
172
  status: string;
168
173
  }
174
+ export interface IRight {
175
+ value: "Could not find TSType[B] in scope and could not generate it";
176
+ type: "Right";
177
+ }
169
178
  export interface ISearchResult {
170
179
  totalCount: number;
171
180
  page: number;
@@ -194,7 +203,7 @@ export interface IUpdatedArticle {
194
203
  tags?: string[];
195
204
  introduction?: string;
196
205
  metaDescription?: string;
197
- metaImage?: (null | INewArticleMetaImage);
206
+ metaImage: Either;
198
207
  visualElement?: string;
199
208
  copyright?: IDraftCopyright;
200
209
  requiredLibraries?: IRequiredLibrary[];
@@ -207,7 +216,7 @@ export interface IUpdatedArticle {
207
216
  availability?: string;
208
217
  relatedContent?: (IRelatedContentLink | number)[];
209
218
  revisionMeta?: IRevisionMeta[];
210
- responsibleId?: (null | string);
219
+ responsibleId: Either;
211
220
  slug?: string;
212
221
  comments?: IUpdatedComment[];
213
222
  prioritized?: boolean;
@@ -1,3 +1,4 @@
1
+ export type Either = (ILeft | IRight);
1
2
  export interface IAuthor {
2
3
  type: string;
3
4
  name: string;
@@ -100,6 +101,10 @@ export interface IImageTitle {
100
101
  title: string;
101
102
  language: string;
102
103
  }
104
+ export interface ILeft {
105
+ value: "Could not find TSType[A] in scope and could not generate it";
106
+ type: "Left";
107
+ }
103
108
  export interface ILicense {
104
109
  license: string;
105
110
  description?: string;
@@ -114,6 +119,10 @@ export interface INewImageMetaInformationV2 {
114
119
  language: string;
115
120
  modelReleased?: string;
116
121
  }
122
+ export interface IRight {
123
+ value: "Could not find TSType[B] in scope and could not generate it";
124
+ type: "Right";
125
+ }
117
126
  export interface ISearchParams {
118
127
  query?: string;
119
128
  license?: string;
@@ -152,7 +161,7 @@ export interface ITagsSearchResult {
152
161
  export interface IUpdateImageMetaInformation {
153
162
  language: string;
154
163
  title?: string;
155
- alttext?: (null | string);
164
+ alttext: Either;
156
165
  copyright?: ICopyright;
157
166
  tags?: string[];
158
167
  caption?: string;
package/package.json CHANGED
@@ -27,5 +27,5 @@
27
27
  "devDependencies": {
28
28
  "typescript": "^5.0.2"
29
29
  },
30
- "version": "0.2.38"
30
+ "version": "0.2.39"
31
31
  }