@ndla/types-backend 1.0.23 → 1.0.25

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.
@@ -9,6 +9,7 @@ export declare enum ArticleSortEnum {
9
9
  ByIdAsc = "id"
10
10
  }
11
11
  export type Availability = ("everyone" | "teacher");
12
+ export type ContributorType = ("artist" | "cowriter" | "compiler" | "composer" | "correction" | "director" | "distributor" | "editorial" | "facilitator" | "idea" | "illustrator" | "linguistic" | "originator" | "photographer" | "processor" | "publisher" | "reader" | "rightsholder" | "scriptwriter" | "supplier" | "translator" | "writer");
12
13
  export interface IArticleContentV2DTO {
13
14
  content: string;
14
15
  language: string;
@@ -103,7 +104,7 @@ export interface IArticleV2DTO {
103
104
  disclaimer?: IDisclaimerDTO;
104
105
  }
105
106
  export interface IAuthorDTO {
106
- type: string;
107
+ type: ContributorType;
107
108
  name: string;
108
109
  }
109
110
  export interface ICopyrightDTO {
@@ -8,6 +8,7 @@ export declare enum AudioSortEnum {
8
8
  ByIdDesc = "-id",
9
9
  ByIdAsc = "id"
10
10
  }
11
+ export type ContributorType = ("artist" | "cowriter" | "compiler" | "composer" | "correction" | "director" | "distributor" | "editorial" | "facilitator" | "idea" | "illustrator" | "linguistic" | "originator" | "photographer" | "processor" | "publisher" | "reader" | "rightsholder" | "scriptwriter" | "supplier" | "translator" | "writer");
11
12
  export interface IAudioDTO {
12
13
  url: string;
13
14
  mimeType: string;
@@ -49,7 +50,7 @@ export interface IAudioSummarySearchResultDTO {
49
50
  results: IAudioSummaryDTO[];
50
51
  }
51
52
  export interface IAuthorDTO {
52
- type: string;
53
+ type: ContributorType;
53
54
  name: string;
54
55
  }
55
56
  export interface ICopyrightDTO {
@@ -16,8 +16,9 @@ export declare enum ConceptSortEnum {
16
16
  ByConceptTypeAsc = "conceptType",
17
17
  ByConceptTypeDesc = "-conceptType"
18
18
  }
19
+ export type ContributorType = ("artist" | "cowriter" | "compiler" | "composer" | "correction" | "director" | "distributor" | "editorial" | "facilitator" | "idea" | "illustrator" | "linguistic" | "originator" | "photographer" | "processor" | "publisher" | "reader" | "rightsholder" | "scriptwriter" | "supplier" | "translator" | "writer");
19
20
  export interface IAuthorDTO {
20
- type: string;
21
+ type: ContributorType;
21
22
  name: string;
22
23
  }
23
24
  export interface IConceptContent {
@@ -1,4 +1,5 @@
1
1
  export type Availability = ("everyone" | "teacher");
2
+ export type ContributorType = ("artist" | "cowriter" | "compiler" | "composer" | "correction" | "director" | "distributor" | "editorial" | "facilitator" | "idea" | "illustrator" | "linguistic" | "originator" | "photographer" | "processor" | "publisher" | "reader" | "rightsholder" | "scriptwriter" | "supplier" | "translator" | "writer");
2
3
  export declare enum DraftSortEnum {
3
4
  ByRelevanceDesc = "-relevance",
4
5
  ByRelevanceAsc = "relevance",
@@ -103,7 +104,7 @@ export interface IArticleTitleDTO {
103
104
  language: string;
104
105
  }
105
106
  export interface IAuthorDTO {
106
- type: string;
107
+ type: ContributorType;
107
108
  name: string;
108
109
  }
109
110
  export interface ICommentDTO {
@@ -1 +1 @@
1
- {"version":3,"file":"draft-api.js","sourceRoot":"","sources":["../draft-api.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;AAI3C,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":"draft-api.js","sourceRoot":"","sources":["../draft-api.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;AAM3C,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,5 +1,6 @@
1
+ export type ContributorType = ("artist" | "cowriter" | "compiler" | "composer" | "correction" | "director" | "distributor" | "editorial" | "facilitator" | "idea" | "illustrator" | "linguistic" | "originator" | "photographer" | "processor" | "publisher" | "reader" | "rightsholder" | "scriptwriter" | "supplier" | "translator" | "writer");
1
2
  export interface IAuthorDTO {
2
- type: string;
3
+ type: ContributorType;
3
4
  name: string;
4
5
  }
5
6
  export interface ICopyrightDTO {
@@ -1 +1 @@
1
- {"version":3,"file":"image-api.js","sourceRoot":"","sources":["../image-api.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;AAuL3C,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;;;AAyL3C,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,5 +1,6 @@
1
+ export type ContributorType = ("artist" | "cowriter" | "compiler" | "composer" | "correction" | "director" | "distributor" | "editorial" | "facilitator" | "idea" | "illustrator" | "linguistic" | "originator" | "photographer" | "processor" | "publisher" | "reader" | "rightsholder" | "scriptwriter" | "supplier" | "translator" | "writer");
1
2
  export interface IAuthorDTO {
2
- type: string;
3
+ type: ContributorType;
3
4
  name: string;
4
5
  }
5
6
  export interface IConfigMetaDTO {
@@ -1,50 +1,7 @@
1
- export type ArenaGroup = "ADMIN";
2
- export interface IArenaUserDTO {
3
- id: number;
4
- displayName: string;
5
- username: string;
6
- location: string;
7
- groups: ArenaGroup[];
8
- }
9
1
  export interface IBreadcrumbDTO {
10
2
  id: string;
11
3
  name: string;
12
4
  }
13
- export interface ICategoryBreadcrumbDTO {
14
- id: number;
15
- title: string;
16
- }
17
- export interface ICategoryDTO {
18
- id: number;
19
- title: string;
20
- description: string;
21
- topicCount: number;
22
- postCount: number;
23
- isFollowing: boolean;
24
- visible: boolean;
25
- rank: number;
26
- parentCategoryId?: number;
27
- categoryCount: number;
28
- subcategories: ICategoryDTO[];
29
- breadcrumbs: ICategoryBreadcrumbDTO[];
30
- }
31
- export interface ICategoryWithTopicsDTO {
32
- id: number;
33
- title: string;
34
- description: string;
35
- topicCount: number;
36
- postCount: number;
37
- topicPage: number;
38
- topicPageSize: number;
39
- topics: ITopicDTO[];
40
- isFollowing: boolean;
41
- visible: boolean;
42
- rank: number;
43
- parentCategoryId?: number;
44
- categoryCount: number;
45
- subcategories: ICategoryDTO[];
46
- breadcrumbs: ICategoryBreadcrumbDTO[];
47
- }
48
5
  export interface IConfigMetaDTO {
49
6
  key: string;
50
7
  value: (boolean | string[]);
@@ -55,14 +12,6 @@ export interface IConfigMetaRestrictedDTO {
55
12
  key: string;
56
13
  value: (boolean | string[]);
57
14
  }
58
- export interface IFlagDTO {
59
- id: number;
60
- reason: string;
61
- created: string;
62
- resolved?: string;
63
- isResolved: boolean;
64
- flagger?: IArenaUserDTO;
65
- }
66
15
  export interface IFolderDTO {
67
16
  id: string;
68
17
  name: string;
@@ -97,88 +46,23 @@ export interface IMyNDLAUserDTO {
97
46
  groups: IMyNDLAGroupDTO[];
98
47
  arenaEnabled: boolean;
99
48
  arenaAccepted: boolean;
100
- arenaGroups: ArenaGroup[];
101
49
  shareNameAccepted: boolean;
102
50
  }
103
- export interface INewCategoryDTO {
104
- title: string;
105
- description: string;
106
- visible: boolean;
107
- parentCategoryId?: number;
108
- }
109
- export interface INewFlagDTO {
110
- reason: string;
111
- }
112
51
  export interface INewFolderDTO {
113
52
  name: string;
114
53
  parentId?: string;
115
54
  status?: string;
116
55
  description?: string;
117
56
  }
118
- export interface INewPostDTO {
119
- content: string;
120
- toPostId?: number;
121
- }
122
- export interface INewPostNotificationDTO {
123
- id: number;
124
- topicId: number;
125
- isRead: boolean;
126
- topicTitle: string;
127
- post: IPostDTO;
128
- notificationTime: string;
129
- }
130
57
  export interface INewResourceDTO {
131
58
  resourceType: ResourceType;
132
59
  path: string;
133
60
  tags?: string[];
134
61
  resourceId: string;
135
62
  }
136
- export interface INewTopicDTO {
137
- title: string;
138
- initialPost: INewPostDTO;
139
- isLocked?: boolean;
140
- isPinned?: boolean;
141
- }
142
63
  export interface IOwnerDTO {
143
64
  name: string;
144
65
  }
145
- export interface IPaginatedArenaUsersDTO {
146
- totalCount: number;
147
- page: number;
148
- pageSize: number;
149
- items: IArenaUserDTO[];
150
- }
151
- export interface IPaginatedNewPostNotificationsDTO {
152
- totalCount: number;
153
- page: number;
154
- pageSize: number;
155
- items: INewPostNotificationDTO[];
156
- }
157
- export interface IPaginatedPostsDTO {
158
- totalCount: number;
159
- page: number;
160
- pageSize: number;
161
- items: IPostDTO[];
162
- }
163
- export interface IPaginatedTopicsDTO {
164
- totalCount: number;
165
- page: number;
166
- pageSize: number;
167
- items: ITopicDTO[];
168
- }
169
- export interface IPostDTO {
170
- id: number;
171
- content: string;
172
- created: string;
173
- updated: string;
174
- owner?: IArenaUserDTO;
175
- flags?: IFlagDTO[];
176
- topicId: number;
177
- replies: IPostWrapperDTO[];
178
- upvotes: number;
179
- upvoted: boolean;
180
- }
181
- export type IPostWrapperDTO = IPostDTO;
182
66
  export interface IResourceDTO {
183
67
  id: string;
184
68
  resourceType: ResourceType;
@@ -208,31 +92,6 @@ export interface IStatsDTO {
208
92
  [key: string]: number;
209
93
  };
210
94
  }
211
- export interface ITopicDTO {
212
- id: number;
213
- title: string;
214
- postCount: number;
215
- created: string;
216
- updated: string;
217
- categoryId: number;
218
- isFollowing: boolean;
219
- isLocked: boolean;
220
- isPinned: boolean;
221
- voteCount: number;
222
- }
223
- export interface ITopicWithPostsDTO {
224
- id: number;
225
- title: string;
226
- postCount: number;
227
- posts: IPaginatedPostsDTO;
228
- created: string;
229
- updated: string;
230
- categoryId: number;
231
- isFollowing: boolean;
232
- isLocked: boolean;
233
- isPinned: boolean;
234
- voteCount: number;
235
- }
236
95
  export interface IUpdatedFolderDTO {
237
96
  name?: string;
238
97
  status?: string;
@@ -241,7 +100,6 @@ export interface IUpdatedFolderDTO {
241
100
  export interface IUpdatedMyNDLAUserDTO {
242
101
  favoriteSubjects?: string[];
243
102
  arenaEnabled?: boolean;
244
- arenaGroups?: ArenaGroup[];
245
103
  arenaAccepted?: boolean;
246
104
  shareNameAccepted?: boolean;
247
105
  }
package/package.json CHANGED
@@ -27,5 +27,5 @@
27
27
  "devDependencies": {
28
28
  "typescript": "^5.3.3"
29
29
  },
30
- "version": "1.0.23"
30
+ "version": "1.0.25"
31
31
  }