@ndla/types-backend 0.2.16 → 0.2.18

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 = ("everyone" | "teacher");
1
+ export type Availability = ("decoder" | "encoder" | "everyone" | "teacher");
2
2
  export interface IArticleContentV2 {
3
3
  content: string;
4
4
  language: string;
@@ -33,12 +33,12 @@ export interface IArticleSearchParams {
33
33
  license?: string;
34
34
  page?: number;
35
35
  pageSize?: number;
36
- idList: number[];
37
- articleTypes: string[];
36
+ idList?: number[];
37
+ articleTypes?: string[];
38
38
  sort?: string;
39
39
  fallback?: boolean;
40
40
  scrollId?: string;
41
- grepCodes: string[];
41
+ grepCodes?: string[];
42
42
  }
43
43
  export interface IArticleSummaryV2 {
44
44
  id: number;
@@ -50,7 +50,7 @@ export interface IArticleSummaryV2 {
50
50
  url: string;
51
51
  license: string;
52
52
  articleType: string;
53
- lastUpdated: string;
53
+ lastUpdated: INDLADate;
54
54
  supportedLanguages: string[];
55
55
  grepCodes: string[];
56
56
  availability: string;
@@ -76,17 +76,17 @@ export interface IArticleV2 {
76
76
  metaImage?: IArticleMetaImage;
77
77
  introduction?: IArticleIntroduction;
78
78
  metaDescription: IArticleMetaDescription;
79
- created: string;
80
- updated: string;
79
+ created: INDLADate;
80
+ updated: INDLADate;
81
81
  updatedBy: string;
82
- published: string;
82
+ published: INDLADate;
83
83
  articleType: string;
84
84
  supportedLanguages: string[];
85
85
  grepCodes: string[];
86
86
  conceptIds: number[];
87
87
  availability: string;
88
88
  relatedContent: (IRelatedContentLink | number)[];
89
- revisionDate?: string;
89
+ revisionDate?: INDLADate;
90
90
  slug?: string;
91
91
  }
92
92
  export interface IAuthor {
@@ -100,22 +100,16 @@ export interface ICopyright {
100
100
  processors: IAuthor[];
101
101
  rightsholders: IAuthor[];
102
102
  agreementId?: number;
103
- validFrom?: string;
104
- validTo?: string;
103
+ validFrom?: INDLADate;
104
+ validTo?: INDLADate;
105
105
  }
106
106
  export interface ILicense {
107
107
  license: string;
108
108
  description?: string;
109
109
  url?: string;
110
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);
111
+ export interface INDLADate {
112
+ underlying: string;
119
113
  }
120
114
  export interface IRelatedContentLink {
121
115
  title: string;
@@ -154,4 +148,3 @@ export interface IVisualElement {
154
148
  visualElement: string;
155
149
  language: string;
156
150
  }
157
- export type NullAlias = null;
@@ -16,8 +16,8 @@ export interface IAudioMetaInformation {
16
16
  podcastMeta?: IPodcastMeta;
17
17
  series?: ISeries;
18
18
  manuscript?: IManuscript;
19
- created: string;
20
- updated: string;
19
+ created: INDLADate;
20
+ updated: INDLADate;
21
21
  }
22
22
  export interface IAudioSummary {
23
23
  id: number;
@@ -29,7 +29,7 @@ export interface IAudioSummary {
29
29
  manuscript?: IManuscript;
30
30
  podcastMeta?: IPodcastMeta;
31
31
  series?: ISeriesSummary;
32
- lastUpdated: string;
32
+ lastUpdated: INDLADate;
33
33
  }
34
34
  export interface IAudioSummarySearchResult {
35
35
  totalCount: number;
@@ -49,8 +49,8 @@ export interface ICopyright {
49
49
  processors: IAuthor[];
50
50
  rightsholders: IAuthor[];
51
51
  agreementId?: number;
52
- validFrom?: string;
53
- validTo?: string;
52
+ validFrom?: INDLADate;
53
+ validTo?: INDLADate;
54
54
  }
55
55
  export interface ICoverPhoto {
56
56
  id: string;
@@ -70,6 +70,9 @@ export interface IManuscript {
70
70
  manuscript: string;
71
71
  language: string;
72
72
  }
73
+ export interface INDLADate {
74
+ underlying: string;
75
+ }
73
76
  export interface INewAudioMetaInformation {
74
77
  title: string;
75
78
  language: string;
@@ -12,8 +12,8 @@ export interface IConcept {
12
12
  metaImage?: IConceptMetaImage;
13
13
  tags?: IConceptTags;
14
14
  subjectIds?: string[];
15
- created: string;
16
- updated: string;
15
+ created: INDLADate;
16
+ updated: INDLADate;
17
17
  updatedBy?: string[];
18
18
  supportedLanguages: string[];
19
19
  articleIds: number[];
@@ -34,7 +34,7 @@ export interface IConceptMetaImage {
34
34
  }
35
35
  export interface IConceptResponsible {
36
36
  responsibleId: string;
37
- lastUpdated: string;
37
+ lastUpdated: INDLADate;
38
38
  }
39
39
  export interface IConceptSearchParams {
40
40
  query?: string;
@@ -67,8 +67,8 @@ export interface IConceptSummary {
67
67
  tags?: IConceptTags;
68
68
  subjectIds?: string[];
69
69
  supportedLanguages: string[];
70
- lastUpdated: string;
71
- created: string;
70
+ lastUpdated: INDLADate;
71
+ created: INDLADate;
72
72
  status: IStatus;
73
73
  updatedBy: string[];
74
74
  license?: string;
@@ -77,6 +77,7 @@ export interface IConceptSummary {
77
77
  articleIds: number[];
78
78
  source?: string;
79
79
  responsible?: IConceptResponsible;
80
+ conceptType: string;
80
81
  }
81
82
  export interface IConceptTags {
82
83
  tags: string[];
@@ -93,8 +94,8 @@ export interface ICopyright {
93
94
  processors: IAuthor[];
94
95
  rightsholders: IAuthor[];
95
96
  agreementId?: number;
96
- validFrom?: string;
97
- validTo?: string;
97
+ validFrom?: INDLADate;
98
+ validTo?: INDLADate;
98
99
  }
99
100
  export interface IDraftConceptSearchParams {
100
101
  query?: string;
@@ -135,6 +136,9 @@ export interface ILicense {
135
136
  description?: string;
136
137
  url?: string;
137
138
  }
139
+ export interface INDLADate {
140
+ underlying: string;
141
+ }
138
142
  export interface INewConcept {
139
143
  language: string;
140
144
  title: string;
@@ -1,11 +1,11 @@
1
- export type Availability = ("everyone" | "teacher");
1
+ export type Availability = ("decoder" | "encoder" | "everyone" | "teacher");
2
2
  export interface IAgreement {
3
3
  id: number;
4
4
  title: string;
5
5
  content: string;
6
6
  copyright: ICopyright;
7
- created: string;
8
- updated: string;
7
+ created: INDLADate;
8
+ updated: INDLADate;
9
9
  updatedBy: string;
10
10
  }
11
11
  export interface IAgreementSearchResult {
@@ -34,10 +34,10 @@ export interface IArticle {
34
34
  introduction?: IArticleIntroduction;
35
35
  metaDescription?: IArticleMetaDescription;
36
36
  metaImage?: IArticleMetaImage;
37
- created: string;
38
- updated: string;
37
+ created: INDLADate;
38
+ updated: INDLADate;
39
39
  updatedBy: string;
40
- published: string;
40
+ published: INDLADate;
41
41
  articleType: string;
42
42
  supportedLanguages: string[];
43
43
  notes: IEditorNote[];
@@ -84,7 +84,7 @@ export interface IArticleSummary {
84
84
  users: string[];
85
85
  grepCodes: string[];
86
86
  status: IStatus;
87
- updated: string;
87
+ updated: INDLADate;
88
88
  }
89
89
  export interface IArticleTag {
90
90
  tags: string[];
@@ -101,8 +101,8 @@ export interface IAuthor {
101
101
  export interface IComment {
102
102
  id: string;
103
103
  content: string;
104
- created: string;
105
- updated: string;
104
+ created: INDLADate;
105
+ updated: INDLADate;
106
106
  isOpen: boolean;
107
107
  }
108
108
  export interface ICopyright {
@@ -112,18 +112,18 @@ export interface ICopyright {
112
112
  processors: IAuthor[];
113
113
  rightsholders: IAuthor[];
114
114
  agreementId?: number;
115
- validFrom?: string;
116
- validTo?: string;
115
+ validFrom?: INDLADate;
116
+ validTo?: INDLADate;
117
117
  }
118
118
  export interface IDraftResponsible {
119
119
  responsibleId: string;
120
- lastUpdated: string;
120
+ lastUpdated: INDLADate;
121
121
  }
122
122
  export interface IEditorNote {
123
123
  note: string;
124
124
  user: string;
125
125
  status: IStatus;
126
- timestamp: string;
126
+ timestamp: INDLADate;
127
127
  }
128
128
  export interface IGrepCodesSearchResult {
129
129
  totalCount: number;
@@ -136,6 +136,9 @@ export interface ILicense {
136
136
  description?: string;
137
137
  url?: string;
138
138
  }
139
+ export interface INDLADate {
140
+ underlying: string;
141
+ }
139
142
  export interface INewAgreement {
140
143
  title: string;
141
144
  content: string;
@@ -154,7 +157,7 @@ export interface INewAgreementCopyright {
154
157
  export interface INewArticle {
155
158
  language: string;
156
159
  title: string;
157
- published?: string;
160
+ published?: INDLADate;
158
161
  content?: string;
159
162
  tags: string[];
160
163
  introduction?: string;
@@ -195,7 +198,7 @@ export interface IRequiredLibrary {
195
198
  }
196
199
  export interface IRevisionMeta {
197
200
  id?: string;
198
- revisionDate: string;
201
+ revisionDate: INDLADate;
199
202
  note: string;
200
203
  status: string;
201
204
  }
@@ -227,7 +230,7 @@ export interface IUpdatedArticle {
227
230
  language?: string;
228
231
  title?: string;
229
232
  status?: string;
230
- published?: string;
233
+ published?: INDLADate;
231
234
  content?: string;
232
235
  tags?: string[];
233
236
  introduction?: string;
@@ -18,8 +18,7 @@ export interface IBannerImage {
18
18
  export interface IErrorBody {
19
19
  code: string;
20
20
  description: string;
21
- occurredAt: string;
22
- messages?: IValidationMessage[];
21
+ occurredAt: INDLADate;
23
22
  statusCode: number;
24
23
  }
25
24
  export interface IFilmFrontPageData {
@@ -45,6 +44,9 @@ export interface IMovieThemeName {
45
44
  name: string;
46
45
  language: string;
47
46
  }
47
+ export interface INDLADate {
48
+ underlying: string;
49
+ }
48
50
  export interface INewOrUpdateBannerImage {
49
51
  mobileImageId?: number;
50
52
  desktopImageId: number;
@@ -127,10 +129,6 @@ export interface IUpdatedSubjectFrontPageData {
127
129
  latestContent?: string[];
128
130
  goTo?: string[];
129
131
  }
130
- export interface IValidationMessage {
131
- field: string;
132
- message: string;
133
- }
134
132
  export interface IVisualElement {
135
133
  type: string;
136
134
  url: string;
@@ -9,11 +9,11 @@ export interface ICopyright {
9
9
  processors: IAuthor[];
10
10
  rightsholders: IAuthor[];
11
11
  agreementId?: number;
12
- validFrom?: string;
13
- validTo?: string;
12
+ validFrom?: INDLADate;
13
+ validTo?: INDLADate;
14
14
  }
15
15
  export interface IEditorNote {
16
- timestamp: string;
16
+ timestamp: INDLADate;
17
17
  updatedBy: string;
18
18
  note: string;
19
19
  }
@@ -54,7 +54,7 @@ export interface IImageMetaInformationV2 {
54
54
  tags: IImageTag;
55
55
  caption: IImageCaption;
56
56
  supportedLanguages: string[];
57
- created: string;
57
+ created: INDLADate;
58
58
  createdBy: string;
59
59
  modelRelease: string;
60
60
  editorNotes?: IEditorNote[];
@@ -69,7 +69,7 @@ export interface IImageMetaInformationV3 {
69
69
  tags: IImageTag;
70
70
  caption: IImageCaption;
71
71
  supportedLanguages: string[];
72
- created: string;
72
+ created: INDLADate;
73
73
  createdBy: string;
74
74
  modelRelease: string;
75
75
  editorNotes?: IEditorNote[];
@@ -87,7 +87,7 @@ export interface IImageMetaSummary {
87
87
  supportedLanguages: string[];
88
88
  modelRelease?: string;
89
89
  editorNotes?: string[];
90
- lastUpdated: string;
90
+ lastUpdated: INDLADate;
91
91
  fileSize: number;
92
92
  contentType: string;
93
93
  imageDimensions?: IImageDimensions;
@@ -105,6 +105,9 @@ export interface ILicense {
105
105
  description: string;
106
106
  url?: string;
107
107
  }
108
+ export interface INDLADate {
109
+ underlying: string;
110
+ }
108
111
  export interface INewImageMetaInformationV2 {
109
112
  title: string;
110
113
  alttext?: string;
@@ -9,7 +9,7 @@ export interface IBreadcrumb {
9
9
  export interface IConfigMeta {
10
10
  key: string;
11
11
  value: string;
12
- updatedAt: string;
12
+ updatedAt: INDLADate;
13
13
  updatedBy: string;
14
14
  }
15
15
  export interface IConfigMetaRestricted {
@@ -46,9 +46,9 @@ export interface IFolder {
46
46
  subfolders: IFolderData[];
47
47
  resources: IResource[];
48
48
  rank?: number;
49
- created: string;
50
- updated: string;
51
- shared?: string;
49
+ created: INDLADate;
50
+ updated: INDLADate;
51
+ shared?: INDLADate;
52
52
  description?: string;
53
53
  }
54
54
  export type IFolderData = IFolder;
@@ -69,7 +69,7 @@ export interface ILearningPathSummaryV2 {
69
69
  coverPhotoUrl?: string;
70
70
  duration?: number;
71
71
  status: string;
72
- lastUpdated: string;
72
+ lastUpdated: INDLADate;
73
73
  tags: ILearningPathTags;
74
74
  copyright: ICopyright;
75
75
  supportedLanguages: string[];
@@ -98,7 +98,7 @@ export interface ILearningPathV2 {
98
98
  duration?: number;
99
99
  status: string;
100
100
  verificationStatus: string;
101
- lastUpdated: string;
101
+ lastUpdated: INDLADate;
102
102
  tags: ILearningPathTags;
103
103
  copyright: ICopyright;
104
104
  canEdit: boolean;
@@ -146,7 +146,7 @@ export interface ILicense {
146
146
  }
147
147
  export interface IMessage {
148
148
  message: string;
149
- date: string;
149
+ date: INDLADate;
150
150
  }
151
151
  export interface IMyNDLAUser {
152
152
  id: number;
@@ -154,6 +154,9 @@ export interface IMyNDLAUser {
154
154
  role: string;
155
155
  organization: string;
156
156
  }
157
+ export interface INDLADate {
158
+ underlying: string;
159
+ }
157
160
  export interface INewFolder {
158
161
  name: string;
159
162
  parentId?: string;
@@ -170,7 +173,7 @@ export interface IResource {
170
173
  id: string;
171
174
  resourceType: string;
172
175
  path: string;
173
- created: string;
176
+ created: INDLADate;
174
177
  tags: string[];
175
178
  resourceId: string;
176
179
  rank?: number;
@@ -52,13 +52,13 @@ export interface IAudioResults {
52
52
  export interface IComment {
53
53
  id: string;
54
54
  content: string;
55
- created: string;
56
- updated: string;
55
+ created: INDLADate;
56
+ updated: INDLADate;
57
57
  isOpen: boolean;
58
58
  }
59
59
  export interface IDraftResponsible {
60
60
  responsibleId: string;
61
- lastUpdated: string;
61
+ lastUpdated: INDLADate;
62
62
  }
63
63
  export interface IGroupSearchResult {
64
64
  totalCount: number;
@@ -148,7 +148,7 @@ export interface IMultiSearchSummary {
148
148
  score: number;
149
149
  highlights: IHighlightedField[];
150
150
  paths: string[];
151
- lastUpdated: string;
151
+ lastUpdated: INDLADate;
152
152
  license?: string;
153
153
  revisions: IRevisionMeta[];
154
154
  responsible?: IDraftResponsible;
@@ -161,8 +161,11 @@ export interface IMultiSearchTermsAggregation {
161
161
  docCountErrorUpperBound: number;
162
162
  values: ITermValue[];
163
163
  }
164
+ export interface INDLADate {
165
+ underlying: string;
166
+ }
164
167
  export interface IRevisionMeta {
165
- revisionDate: string;
168
+ revisionDate: INDLADate;
166
169
  note: string;
167
170
  status: string;
168
171
  }
package/package.json CHANGED
@@ -26,5 +26,5 @@
26
26
  "devDependencies": {
27
27
  "typescript": "^5.0.2"
28
28
  },
29
- "version": "0.2.16"
29
+ "version": "0.2.18"
30
30
  }