@ndla/types-backend 0.2.101 → 1.0.2

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,86 +1,86 @@
1
- export interface IAuthor {
1
+ export interface IAuthorDTO {
2
2
  type: string;
3
3
  name: string;
4
4
  }
5
- export interface ICopyright {
6
- license: ILicense;
5
+ export interface ICopyrightDTO {
6
+ license: ILicenseDTO;
7
7
  origin?: string;
8
- creators: IAuthor[];
9
- processors: IAuthor[];
10
- rightsholders: IAuthor[];
8
+ creators: IAuthorDTO[];
9
+ processors: IAuthorDTO[];
10
+ rightsholders: IAuthorDTO[];
11
11
  validFrom?: string;
12
12
  validTo?: string;
13
13
  processed: boolean;
14
14
  }
15
- export interface IEditorNote {
15
+ export interface IEditorNoteDTO {
16
16
  timestamp: string;
17
17
  updatedBy: string;
18
18
  note: string;
19
19
  }
20
- export interface IImage {
21
- url: string;
22
- size: number;
23
- contentType: string;
24
- }
25
- export interface IImageAltText {
20
+ export interface IImageAltTextDTO {
26
21
  alttext: string;
27
22
  language: string;
28
23
  }
29
- export interface IImageCaption {
24
+ export interface IImageCaptionDTO {
30
25
  caption: string;
31
26
  language: string;
32
27
  }
33
- export interface IImageDimensions {
28
+ export interface IImageDTO {
29
+ url: string;
30
+ size: number;
31
+ contentType: string;
32
+ }
33
+ export interface IImageDimensionsDTO {
34
34
  width: number;
35
35
  height: number;
36
36
  }
37
- export interface IImageFile {
37
+ export interface IImageFileDTO {
38
38
  fileName: string;
39
39
  size: number;
40
40
  contentType: string;
41
41
  imageUrl: string;
42
- dimensions?: IImageDimensions;
42
+ dimensions?: IImageDimensionsDTO;
43
43
  language: string;
44
44
  }
45
- export interface IImageMetaInformationV2 {
45
+ export interface IImageMetaInformationV2DTO {
46
46
  id: string;
47
47
  metaUrl: string;
48
- title: IImageTitle;
49
- alttext: IImageAltText;
48
+ title: IImageTitleDTO;
49
+ alttext: IImageAltTextDTO;
50
50
  imageUrl: string;
51
51
  size: number;
52
52
  contentType: string;
53
- copyright: ICopyright;
54
- tags: IImageTag;
55
- caption: IImageCaption;
53
+ copyright: ICopyrightDTO;
54
+ tags: IImageTagDTO;
55
+ caption: IImageCaptionDTO;
56
56
  supportedLanguages: string[];
57
57
  created: string;
58
58
  createdBy: string;
59
59
  modelRelease: string;
60
- editorNotes?: IEditorNote[];
61
- imageDimensions?: IImageDimensions;
60
+ editorNotes?: IEditorNoteDTO[];
61
+ imageDimensions?: IImageDimensionsDTO;
62
62
  }
63
- export interface IImageMetaInformationV3 {
63
+ export interface IImageMetaInformationV3DTO {
64
64
  id: string;
65
65
  metaUrl: string;
66
- title: IImageTitle;
67
- alttext: IImageAltText;
68
- copyright: ICopyright;
69
- tags: IImageTag;
70
- caption: IImageCaption;
66
+ title: IImageTitleDTO;
67
+ alttext: IImageAltTextDTO;
68
+ copyright: ICopyrightDTO;
69
+ tags: IImageTagDTO;
70
+ caption: IImageCaptionDTO;
71
71
  supportedLanguages: string[];
72
72
  created: string;
73
73
  createdBy: string;
74
74
  modelRelease: string;
75
- editorNotes?: IEditorNote[];
76
- image: IImageFile;
75
+ editorNotes?: IEditorNoteDTO[];
76
+ image: IImageFileDTO;
77
77
  }
78
- export interface IImageMetaSummary {
78
+ export interface IImageMetaSummaryDTO {
79
79
  id: string;
80
- title: IImageTitle;
80
+ title: IImageTitleDTO;
81
81
  contributors: string[];
82
- altText: IImageAltText;
83
- caption: IImageCaption;
82
+ altText: IImageAltTextDTO;
83
+ caption: IImageCaptionDTO;
84
84
  previewUrl: string;
85
85
  metaUrl: string;
86
86
  license: string;
@@ -90,31 +90,31 @@ export interface IImageMetaSummary {
90
90
  lastUpdated: string;
91
91
  fileSize: number;
92
92
  contentType: string;
93
- imageDimensions?: IImageDimensions;
93
+ imageDimensions?: IImageDimensionsDTO;
94
94
  }
95
- export interface IImageTag {
95
+ export interface IImageTagDTO {
96
96
  tags: string[];
97
97
  language: string;
98
98
  }
99
- export interface IImageTitle {
99
+ export interface IImageTitleDTO {
100
100
  title: string;
101
101
  language: string;
102
102
  }
103
- export interface ILicense {
103
+ export interface ILicenseDTO {
104
104
  license: string;
105
105
  description?: string;
106
106
  url?: string;
107
107
  }
108
- export interface INewImageMetaInformationV2 {
108
+ export interface INewImageMetaInformationV2DTO {
109
109
  title: string;
110
110
  alttext?: string;
111
- copyright: ICopyright;
111
+ copyright: ICopyrightDTO;
112
112
  tags: string[];
113
113
  caption: string;
114
114
  language: string;
115
115
  modelReleased?: string;
116
116
  }
117
- export interface ISearchParams {
117
+ export interface ISearchParamsDTO {
118
118
  query?: string;
119
119
  license?: string;
120
120
  language?: string;
@@ -128,46 +128,36 @@ export interface ISearchParams {
128
128
  scrollId?: string;
129
129
  modelReleased?: string[];
130
130
  }
131
- export interface ISearchResult {
131
+ export interface ISearchResultDTO {
132
132
  totalCount: number;
133
133
  page?: number;
134
134
  pageSize: number;
135
135
  language: string;
136
- results: IImageMetaSummary[];
136
+ results: IImageMetaSummaryDTO[];
137
137
  }
138
- export interface ISearchResultV3 {
138
+ export interface ISearchResultV3DTO {
139
139
  totalCount: number;
140
140
  page?: number;
141
141
  pageSize: number;
142
142
  language: string;
143
- results: IImageMetaInformationV3[];
143
+ results: IImageMetaInformationV3DTO[];
144
144
  }
145
- export interface ITagsSearchResult {
145
+ export interface ITagsSearchResultDTO {
146
146
  totalCount: number;
147
147
  page: number;
148
148
  pageSize: number;
149
149
  language: string;
150
150
  results: string[];
151
151
  }
152
- export interface IUpdateImageMetaInformation {
152
+ export interface IUpdateImageMetaInformationDTO {
153
153
  language: string;
154
154
  title?: string;
155
155
  alttext: UpdateOrDeleteString;
156
- copyright?: ICopyright;
156
+ copyright?: ICopyrightDTO;
157
157
  tags?: string[];
158
158
  caption?: string;
159
159
  modelReleased?: string;
160
160
  }
161
- export interface IValidationError {
162
- code: string;
163
- description: string;
164
- messages: IValidationMessage[];
165
- occurredAt: string;
166
- }
167
- export interface IValidationMessage {
168
- field: string;
169
- message: string;
170
- }
171
161
  export declare enum ImageSortEnum {
172
162
  ByRelevanceDesc = "-relevance",
173
163
  ByRelevanceAsc = "relevance",
@@ -1 +1 @@
1
- {"version":3,"file":"image-api.js","sourceRoot":"","sources":["../image-api.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;AAkM3C,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"}
1
+ {"version":3,"file":"image-api.js","sourceRoot":"","sources":["../image-api.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;AAsL3C,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"}
@@ -1,141 +1,141 @@
1
- export interface IAuthor {
1
+ export interface IAuthorDTO {
2
2
  type: string;
3
3
  name: string;
4
4
  }
5
- export interface IConfigMeta {
5
+ export interface IConfigMetaDTO {
6
6
  key: string;
7
7
  value: (boolean | string[]);
8
8
  updatedAt: string;
9
9
  updatedBy: string;
10
10
  }
11
- export interface IConfigMetaRestricted {
11
+ export interface IConfigMetaRestrictedDTO {
12
12
  key: string;
13
13
  value: (boolean | string[]);
14
14
  }
15
- export interface ICopyright {
16
- license: ILicense;
17
- contributors: IAuthor[];
15
+ export interface ICopyrightDTO {
16
+ license: ILicenseDTO;
17
+ contributors: IAuthorDTO[];
18
18
  }
19
- export interface ICoverPhoto {
19
+ export interface ICoverPhotoDTO {
20
20
  url: string;
21
21
  metaUrl: string;
22
22
  }
23
- export interface IDescription {
23
+ export interface IDescriptionDTO {
24
24
  description: string;
25
25
  language: string;
26
26
  }
27
- export interface IEmbedUrlV2 {
27
+ export interface IEmbedUrlV2DTO {
28
28
  url: string;
29
29
  embedType: string;
30
30
  }
31
- export interface IIntroduction {
31
+ export interface IIntroductionDTO {
32
32
  introduction: string;
33
33
  language: string;
34
34
  }
35
- export interface ILearningPathStatus {
35
+ export interface ILearningPathStatusDTO {
36
36
  status: string;
37
37
  }
38
- export interface ILearningPathSummaryV2 {
38
+ export interface ILearningPathSummaryV2DTO {
39
39
  id: number;
40
40
  revision?: number;
41
- title: ITitle;
42
- description: IDescription;
43
- introduction: IIntroduction;
41
+ title: ITitleDTO;
42
+ description: IDescriptionDTO;
43
+ introduction: IIntroductionDTO;
44
44
  metaUrl: string;
45
45
  coverPhotoUrl?: string;
46
46
  duration?: number;
47
47
  status: string;
48
48
  created: string;
49
49
  lastUpdated: string;
50
- tags: ILearningPathTags;
51
- copyright: ICopyright;
50
+ tags: ILearningPathTagsDTO;
51
+ copyright: ICopyrightDTO;
52
52
  supportedLanguages: string[];
53
53
  isBasedOn?: number;
54
54
  message?: string;
55
55
  }
56
- export interface ILearningPathTags {
56
+ export interface ILearningPathTagsDTO {
57
57
  tags: string[];
58
58
  language: string;
59
59
  }
60
- export interface ILearningPathTagsSummary {
60
+ export interface ILearningPathTagsSummaryDTO {
61
61
  language: string;
62
62
  supportedLanguages: string[];
63
63
  tags: string[];
64
64
  }
65
- export interface ILearningPathV2 {
65
+ export interface ILearningPathV2DTO {
66
66
  id: number;
67
67
  revision: number;
68
68
  isBasedOn?: number;
69
- title: ITitle;
70
- description: IDescription;
69
+ title: ITitleDTO;
70
+ description: IDescriptionDTO;
71
71
  metaUrl: string;
72
- learningsteps: ILearningStepV2[];
72
+ learningsteps: ILearningStepV2DTO[];
73
73
  learningstepUrl: string;
74
- coverPhoto?: ICoverPhoto;
74
+ coverPhoto?: ICoverPhotoDTO;
75
75
  duration?: number;
76
76
  status: string;
77
77
  verificationStatus: string;
78
78
  created: string;
79
79
  lastUpdated: string;
80
- tags: ILearningPathTags;
81
- copyright: ICopyright;
80
+ tags: ILearningPathTagsDTO;
81
+ copyright: ICopyrightDTO;
82
82
  canEdit: boolean;
83
83
  supportedLanguages: string[];
84
84
  ownerId?: string;
85
- message?: IMessage;
85
+ message?: IMessageDTO;
86
86
  madeAvailable?: string;
87
87
  }
88
- export interface ILearningStepContainerSummary {
88
+ export interface ILearningStepContainerSummaryDTO {
89
89
  language: string;
90
- learningsteps: ILearningStepSummaryV2[];
90
+ learningsteps: ILearningStepSummaryV2DTO[];
91
91
  supportedLanguages: string[];
92
92
  }
93
- export interface ILearningStepSeqNo {
93
+ export interface ILearningStepSeqNoDTO {
94
94
  seqNo: number;
95
95
  }
96
- export interface ILearningStepStatus {
96
+ export interface ILearningStepStatusDTO {
97
97
  status: string;
98
98
  }
99
- export interface ILearningStepSummaryV2 {
99
+ export interface ILearningStepSummaryV2DTO {
100
100
  id: number;
101
101
  seqNo: number;
102
- title: ITitle;
102
+ title: ITitleDTO;
103
103
  type: string;
104
104
  metaUrl: string;
105
105
  }
106
- export interface ILearningStepV2 {
106
+ export interface ILearningStepV2DTO {
107
107
  id: number;
108
108
  revision: number;
109
109
  seqNo: number;
110
- title: ITitle;
111
- introduction?: IIntroduction;
112
- description?: IDescription;
113
- embedUrl?: IEmbedUrlV2;
110
+ title: ITitleDTO;
111
+ introduction?: IIntroductionDTO;
112
+ description?: IDescriptionDTO;
113
+ embedUrl?: IEmbedUrlV2DTO;
114
114
  showTitle: boolean;
115
115
  type: string;
116
- license?: ILicense;
116
+ license?: ILicenseDTO;
117
117
  metaUrl: string;
118
118
  canEdit: boolean;
119
119
  status: string;
120
120
  supportedLanguages: string[];
121
121
  }
122
- export interface ILicense {
122
+ export interface ILicenseDTO {
123
123
  license: string;
124
124
  description?: string;
125
125
  url?: string;
126
126
  }
127
- export interface IMessage {
127
+ export interface IMessageDTO {
128
128
  message: string;
129
129
  date: string;
130
130
  }
131
- export interface ISearchResultV2 {
131
+ export interface ISearchResultV2DTO {
132
132
  totalCount: number;
133
133
  page?: number;
134
134
  pageSize: number;
135
135
  language: string;
136
- results: ILearningPathSummaryV2[];
136
+ results: ILearningPathSummaryV2DTO[];
137
137
  }
138
- export interface ITitle {
138
+ export interface ITitleDTO {
139
139
  title: string;
140
140
  language: string;
141
141
  }