@gewis/planka-client 2.0.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.
- package/LICENSE.txt +674 -0
- package/README.md +65 -0
- package/dist/planka-client.d.ts +1406 -0
- package/dist/planka-client.js +470 -0
- package/dist/planka-client.umd.cjs +1 -0
- package/package.json +69 -0
- package/src/index.ts +2 -0
- package/src/services.ts +951 -0
- package/src/types.ts +1042 -0
package/src/types.ts
ADDED
@@ -0,0 +1,1042 @@
|
|
1
|
+
/**
|
2
|
+
* Authentication
|
3
|
+
*/
|
4
|
+
export type AccessTokenOidcRequest = {
|
5
|
+
code: string;
|
6
|
+
nonce: string;
|
7
|
+
};
|
8
|
+
|
9
|
+
export type AccessTokenRequest = {
|
10
|
+
emailOrUsername: string;
|
11
|
+
password: string;
|
12
|
+
};
|
13
|
+
|
14
|
+
export type Oidc = {
|
15
|
+
oidc: string;
|
16
|
+
};
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Users
|
20
|
+
*/
|
21
|
+
export type User = {
|
22
|
+
id: string;
|
23
|
+
email: string;
|
24
|
+
isAdmin: boolean;
|
25
|
+
name: string;
|
26
|
+
username: string;
|
27
|
+
phone?: string;
|
28
|
+
organization?: string;
|
29
|
+
language?: Language;
|
30
|
+
subscribeToOwnCards: boolean;
|
31
|
+
avatarUrl?: string;
|
32
|
+
createdAt: Date;
|
33
|
+
updatedAt?: Date;
|
34
|
+
deletedAt?: Date;
|
35
|
+
};
|
36
|
+
|
37
|
+
export type Language =
|
38
|
+
| 'ar-YE'
|
39
|
+
| 'bg-BG'
|
40
|
+
| 'cs-CZ'
|
41
|
+
| 'da-DK'
|
42
|
+
| 'de-DE'
|
43
|
+
| 'en-GB'
|
44
|
+
| 'en-US'
|
45
|
+
| 'es-ES'
|
46
|
+
| 'fa-IR'
|
47
|
+
| 'fr-FR'
|
48
|
+
| 'hu-HU'
|
49
|
+
| 'id-ID'
|
50
|
+
| 'it-IT'
|
51
|
+
| 'ja-JP'
|
52
|
+
| 'ko-KR'
|
53
|
+
| 'nl-NL'
|
54
|
+
| 'pl-PL'
|
55
|
+
| 'pt-BR'
|
56
|
+
| 'ro-RO'
|
57
|
+
| 'ru-RU'
|
58
|
+
| 'sk-SK'
|
59
|
+
| 'sv-SE'
|
60
|
+
| 'tr-TR'
|
61
|
+
| 'uk-UA'
|
62
|
+
| 'uz-UZ'
|
63
|
+
| 'zh-CN'
|
64
|
+
| 'zh-TW';
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Projects
|
68
|
+
*/
|
69
|
+
export type Project = {
|
70
|
+
id: string;
|
71
|
+
createdAt: Date;
|
72
|
+
updatedAt?: Date;
|
73
|
+
name: string;
|
74
|
+
background?: Background;
|
75
|
+
backgroundImage?: BackgroundImage;
|
76
|
+
};
|
77
|
+
|
78
|
+
export type Background = {
|
79
|
+
type: BackgroundType;
|
80
|
+
name?: BackgroundGradient;
|
81
|
+
};
|
82
|
+
|
83
|
+
export type BackgroundGradient =
|
84
|
+
| 'old-lime'
|
85
|
+
| 'ocean-dive'
|
86
|
+
| 'tzepesch-style'
|
87
|
+
| 'jungle-mesh'
|
88
|
+
| 'strawberry-dust'
|
89
|
+
| 'purple-rose'
|
90
|
+
| 'sun-scream'
|
91
|
+
| 'warm-rust'
|
92
|
+
| 'sky-change'
|
93
|
+
| 'green-eyes'
|
94
|
+
| 'blue-xchange'
|
95
|
+
| 'blood-orange'
|
96
|
+
| 'sour-peel'
|
97
|
+
| 'green-ninja'
|
98
|
+
| 'algae-green'
|
99
|
+
| 'coral-reef'
|
100
|
+
| 'steel-grey'
|
101
|
+
| 'heat-waves'
|
102
|
+
| 'velvet-lounge'
|
103
|
+
| 'purple-rain'
|
104
|
+
| 'blue-steel'
|
105
|
+
| 'blueish-curve'
|
106
|
+
| 'prism-light'
|
107
|
+
| 'green-mist'
|
108
|
+
| 'red-curtain';
|
109
|
+
|
110
|
+
export type BackgroundImage = {
|
111
|
+
url?: string;
|
112
|
+
coverUrl?: string;
|
113
|
+
};
|
114
|
+
|
115
|
+
export type BackgroundType = 'gradient' | 'image';
|
116
|
+
|
117
|
+
export type ProjectManager = {
|
118
|
+
id: string;
|
119
|
+
createdAt: Date;
|
120
|
+
updatedAt: Date;
|
121
|
+
projectId: string;
|
122
|
+
userId: string;
|
123
|
+
};
|
124
|
+
|
125
|
+
/**
|
126
|
+
* Boards
|
127
|
+
*/
|
128
|
+
export type Board = {
|
129
|
+
id: string;
|
130
|
+
createdAt: Date;
|
131
|
+
updatedAt?: Date;
|
132
|
+
position: number;
|
133
|
+
name: string;
|
134
|
+
projectId: string;
|
135
|
+
};
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Board memberships
|
139
|
+
*/
|
140
|
+
export type BoardMembership = {
|
141
|
+
id: string;
|
142
|
+
createdAt: Date;
|
143
|
+
updatedAt?: Date;
|
144
|
+
role: Role;
|
145
|
+
canComment?: boolean;
|
146
|
+
boardId: string;
|
147
|
+
userId: string;
|
148
|
+
};
|
149
|
+
|
150
|
+
export type Role = 'editor' | 'viewer';
|
151
|
+
|
152
|
+
/**
|
153
|
+
* Labels
|
154
|
+
*/
|
155
|
+
export type Label = {
|
156
|
+
id: string;
|
157
|
+
createdAt: Date;
|
158
|
+
updatedAt?: Date;
|
159
|
+
position: number;
|
160
|
+
name: string;
|
161
|
+
color: LabelColor;
|
162
|
+
boardId: string;
|
163
|
+
};
|
164
|
+
|
165
|
+
export type LabelColor =
|
166
|
+
| 'berry-red'
|
167
|
+
| 'pumpkin-orange'
|
168
|
+
| 'lagoon-blue'
|
169
|
+
| 'pink-tulip'
|
170
|
+
| 'light-mud'
|
171
|
+
| 'orange-peel'
|
172
|
+
| 'bright-moss'
|
173
|
+
| 'antique-blue'
|
174
|
+
| 'dark-granite'
|
175
|
+
| 'lagune-blue'
|
176
|
+
| 'sunny-grass'
|
177
|
+
| 'morning-sky'
|
178
|
+
| 'light-orange'
|
179
|
+
| 'midnight-blue'
|
180
|
+
| 'tank-green'
|
181
|
+
| 'gun-metal'
|
182
|
+
| 'wet-moss'
|
183
|
+
| 'red-burgundy'
|
184
|
+
| 'light-concrete'
|
185
|
+
| 'apricot-red'
|
186
|
+
| 'desert-sand'
|
187
|
+
| 'navy-blue'
|
188
|
+
| 'egg-yellow'
|
189
|
+
| 'coral-green'
|
190
|
+
| 'light-cocoa';
|
191
|
+
|
192
|
+
/**
|
193
|
+
* Lists
|
194
|
+
*/
|
195
|
+
export type List = {
|
196
|
+
id: string;
|
197
|
+
createdAt: Date;
|
198
|
+
updatedAt?: Date;
|
199
|
+
position: number;
|
200
|
+
name: string;
|
201
|
+
boardId: string;
|
202
|
+
};
|
203
|
+
|
204
|
+
export type SortType = 'name_asc' | 'dueDate_asc' | 'createdAt_asc' | 'createdAt_desc';
|
205
|
+
|
206
|
+
/**
|
207
|
+
* Cards
|
208
|
+
*/
|
209
|
+
export type Card = {
|
210
|
+
id: string;
|
211
|
+
createdAt: Date;
|
212
|
+
updatedAt?: Date;
|
213
|
+
creatorUserId: string;
|
214
|
+
position: number;
|
215
|
+
name: string;
|
216
|
+
description?: string;
|
217
|
+
dueDate?: Date;
|
218
|
+
isDueDateCompleted?: boolean;
|
219
|
+
boardId: string;
|
220
|
+
listId: string;
|
221
|
+
coverAttachmentId?: string;
|
222
|
+
isSubscribed: boolean;
|
223
|
+
};
|
224
|
+
|
225
|
+
export type CardMembership = {
|
226
|
+
id: string;
|
227
|
+
createdAt: Date;
|
228
|
+
updatedAt?: Date;
|
229
|
+
cardId: string;
|
230
|
+
userId: string;
|
231
|
+
};
|
232
|
+
|
233
|
+
export type CardLabel = {
|
234
|
+
id: string;
|
235
|
+
createdAt: Date;
|
236
|
+
updatedAt?: Date;
|
237
|
+
cardId: string;
|
238
|
+
labelId?: string;
|
239
|
+
};
|
240
|
+
|
241
|
+
export type Task = {
|
242
|
+
id: string;
|
243
|
+
createdAt: Date;
|
244
|
+
updatedAt?: Date;
|
245
|
+
position: number;
|
246
|
+
name: string;
|
247
|
+
isCompleted: boolean;
|
248
|
+
cardId: string;
|
249
|
+
};
|
250
|
+
|
251
|
+
export type Action = {
|
252
|
+
id: string;
|
253
|
+
createdAt: Date;
|
254
|
+
updatedAt?: Date;
|
255
|
+
type: CommentType;
|
256
|
+
data: ActionText;
|
257
|
+
cardId: string;
|
258
|
+
userId: string;
|
259
|
+
};
|
260
|
+
|
261
|
+
/**
|
262
|
+
* Attachments
|
263
|
+
*/
|
264
|
+
export type Attachment = {
|
265
|
+
id: string;
|
266
|
+
name: string;
|
267
|
+
cardId: string;
|
268
|
+
url: string;
|
269
|
+
createUserId: string;
|
270
|
+
createdAt: Date;
|
271
|
+
updatedAt?: Date;
|
272
|
+
coverUrl?: string;
|
273
|
+
image?: Image;
|
274
|
+
};
|
275
|
+
|
276
|
+
export type Image = {
|
277
|
+
width: number;
|
278
|
+
height: number;
|
279
|
+
};
|
280
|
+
|
281
|
+
/**
|
282
|
+
* Comments
|
283
|
+
*/
|
284
|
+
export type Comment = {
|
285
|
+
id: string;
|
286
|
+
createdAt: Date;
|
287
|
+
updatedAt?: Date;
|
288
|
+
cardId: string;
|
289
|
+
userId: string;
|
290
|
+
data: ActionText;
|
291
|
+
type: CommentType;
|
292
|
+
};
|
293
|
+
|
294
|
+
export type ActionText = {
|
295
|
+
text: string;
|
296
|
+
};
|
297
|
+
|
298
|
+
export type CommentType = 'commentCard';
|
299
|
+
|
300
|
+
/**
|
301
|
+
* Notifications
|
302
|
+
*/
|
303
|
+
export type Notification = {
|
304
|
+
id: string;
|
305
|
+
createdAt: Date;
|
306
|
+
updatedAt?: Date;
|
307
|
+
isRead: boolean;
|
308
|
+
userId: string;
|
309
|
+
cardId: string;
|
310
|
+
actionId: string;
|
311
|
+
};
|
312
|
+
|
313
|
+
/**
|
314
|
+
* Responses are given as single or array, and can include other data types
|
315
|
+
*/
|
316
|
+
export type SingleResponse<T> = {
|
317
|
+
item: T;
|
318
|
+
included?: Partial<Include>;
|
319
|
+
};
|
320
|
+
|
321
|
+
export type ArrayResponse<T> = {
|
322
|
+
items: T[];
|
323
|
+
included?: Partial<Include>;
|
324
|
+
};
|
325
|
+
|
326
|
+
export type Include = {
|
327
|
+
users: User[];
|
328
|
+
boardMemberships: BoardMembership[];
|
329
|
+
labels: Label[];
|
330
|
+
lists: List[];
|
331
|
+
cards: Card[];
|
332
|
+
cardMemberships: Card[];
|
333
|
+
cardLabels: Label[];
|
334
|
+
tasks: Action[];
|
335
|
+
boards: Board[];
|
336
|
+
actions: Action[];
|
337
|
+
projectManagers: ProjectManager[];
|
338
|
+
};
|
339
|
+
|
340
|
+
/**
|
341
|
+
* Most errors are roughly the same, so they are types singly
|
342
|
+
*/
|
343
|
+
export type HttpError = {
|
344
|
+
code: 'E_MISSING_OR_INVALID_PARAMS' | 'E_UNAUTHORIZED' | 'E_NOT_FOUND' | 'E_CONFLICT' | 'E_UNPROCESSABLE_ENTITY';
|
345
|
+
message?: string;
|
346
|
+
problems?: string[];
|
347
|
+
};
|
348
|
+
|
349
|
+
/**
|
350
|
+
* All types necessary to provide to the hey-api client
|
351
|
+
*/
|
352
|
+
|
353
|
+
// 'GET /api/config': 'show-config'
|
354
|
+
export type GetConfigRequest = {
|
355
|
+
body?: never;
|
356
|
+
path?: never;
|
357
|
+
query?: never;
|
358
|
+
url: '/api/config';
|
359
|
+
};
|
360
|
+
export type GetConfigResponse = SingleResponse<Oidc>;
|
361
|
+
|
362
|
+
// 'POST /api/access-tokens': 'access-tokens/create'
|
363
|
+
export type AuthorizeRequest = {
|
364
|
+
body: AccessTokenRequest;
|
365
|
+
path?: never;
|
366
|
+
query?: never;
|
367
|
+
url: '/api/access-tokens';
|
368
|
+
};
|
369
|
+
export type AuthorizeResponse = SingleResponse<string>;
|
370
|
+
export type AuthorizeError = HttpError;
|
371
|
+
|
372
|
+
// 'POST /api/access-tokens/exchange-using-oidc': 'access-tokens/exchange-using-oidc'
|
373
|
+
export type AuthorizeOidcRequest = {
|
374
|
+
body: AccessTokenOidcRequest;
|
375
|
+
path?: never;
|
376
|
+
query?: never;
|
377
|
+
url: '/api/access-tokens/exchange-using-oidc';
|
378
|
+
};
|
379
|
+
export type AuthorizeOidcResponse = SingleResponse<string>;
|
380
|
+
|
381
|
+
// 'DELETE /api/access-tokens/me': 'access-tokens/delete'
|
382
|
+
export type UnauthorizeRequest = {
|
383
|
+
body?: never;
|
384
|
+
path?: never;
|
385
|
+
query?: never;
|
386
|
+
url: '/api/access-tokens/me';
|
387
|
+
};
|
388
|
+
export type UnauthorizeResponse = SingleResponse<string>;
|
389
|
+
|
390
|
+
// 'GET /api/users': 'users/index'
|
391
|
+
export type GetUsersRequest = {
|
392
|
+
body?: never;
|
393
|
+
path?: never;
|
394
|
+
query?: never;
|
395
|
+
url: '/api/users';
|
396
|
+
};
|
397
|
+
export type GetUsersResponse = ArrayResponse<User>;
|
398
|
+
|
399
|
+
// 'POST /api/users': 'users/create'
|
400
|
+
export type CreateUserRequest = {
|
401
|
+
body: {
|
402
|
+
email: string;
|
403
|
+
password: string;
|
404
|
+
name: string;
|
405
|
+
username?: string;
|
406
|
+
};
|
407
|
+
path?: never;
|
408
|
+
query?: never;
|
409
|
+
url: '/api/users';
|
410
|
+
};
|
411
|
+
export type CreateUserResponse = SingleResponse<User>;
|
412
|
+
|
413
|
+
// 'GET /api/users/:id': 'users/show'
|
414
|
+
export type GetUserRequest = {
|
415
|
+
path: {
|
416
|
+
id: string;
|
417
|
+
};
|
418
|
+
body?: never;
|
419
|
+
query?: never;
|
420
|
+
url: '/api/users/{id}';
|
421
|
+
};
|
422
|
+
export type GetUserResponse = SingleResponse<User>;
|
423
|
+
|
424
|
+
// 'PATCH /api/users/:id/email': 'users/update-email'
|
425
|
+
export type UpdateUserRequest = {
|
426
|
+
body: Partial<Omit<User, 'updatedAt' | 'createdAt' | 'deletedAt' | 'username' | 'email' | 'avatarUrl'>>;
|
427
|
+
path: {
|
428
|
+
id: string;
|
429
|
+
};
|
430
|
+
query?: never;
|
431
|
+
url: '/api/users/{id}/email';
|
432
|
+
};
|
433
|
+
export type UpdateUserResponse = SingleResponse<User>;
|
434
|
+
|
435
|
+
// 'PATCH /api/users/:id/email': 'users/update-email'
|
436
|
+
export type UpdateUserEmailRequest = {
|
437
|
+
body: {
|
438
|
+
email: string;
|
439
|
+
};
|
440
|
+
path: {
|
441
|
+
id: string;
|
442
|
+
};
|
443
|
+
query?: never;
|
444
|
+
url: '/api/users/{id}/email';
|
445
|
+
};
|
446
|
+
export type UpdateUserEmailResponse = SingleResponse<User>;
|
447
|
+
|
448
|
+
// 'PATCH /api/users/:id/password': 'users/update-password'
|
449
|
+
export type UpdateUserPasswordRequest = {
|
450
|
+
body: {
|
451
|
+
password: string;
|
452
|
+
};
|
453
|
+
path: {
|
454
|
+
id: string;
|
455
|
+
};
|
456
|
+
query?: never;
|
457
|
+
url: '/api/users/{id}/password';
|
458
|
+
};
|
459
|
+
export type UpdateUserPasswordResponse = SingleResponse<User>;
|
460
|
+
|
461
|
+
// 'PATCH /api/users/:id/username': 'users/update-username'
|
462
|
+
export type UpdateUserUsernameRequest = {
|
463
|
+
body: {
|
464
|
+
username: string;
|
465
|
+
};
|
466
|
+
path: {
|
467
|
+
id: string;
|
468
|
+
};
|
469
|
+
query?: never;
|
470
|
+
url: '/api/users/{id}/username';
|
471
|
+
};
|
472
|
+
export type UpdateUserUsernameResponse = SingleResponse<User>;
|
473
|
+
|
474
|
+
// 'PATCH /api/users/:id/username': 'users/update-username'
|
475
|
+
export type UpdateUserAvatarRequest = {
|
476
|
+
body: {
|
477
|
+
file: File;
|
478
|
+
};
|
479
|
+
path: {
|
480
|
+
id: string;
|
481
|
+
};
|
482
|
+
query?: never;
|
483
|
+
url: '/api/users/{id}/avatar';
|
484
|
+
};
|
485
|
+
export type UpdateUserAvatarResponse = SingleResponse<User>;
|
486
|
+
|
487
|
+
// 'DELETE /api/users/:id': 'users/delete'
|
488
|
+
export type DeleteUserRequest = {
|
489
|
+
body?: never;
|
490
|
+
path: {
|
491
|
+
id: string;
|
492
|
+
};
|
493
|
+
query?: never;
|
494
|
+
url: '/api/users/{id}';
|
495
|
+
};
|
496
|
+
export type DeleteUserResponse = SingleResponse<User>;
|
497
|
+
|
498
|
+
// 'GET /api/projects': 'projects/index'
|
499
|
+
export type GetProjectsRequest = {
|
500
|
+
body?: never;
|
501
|
+
path?: never;
|
502
|
+
query?: never;
|
503
|
+
url: '/api/projects';
|
504
|
+
};
|
505
|
+
export type GetProjectsResponse = ArrayResponse<Project>;
|
506
|
+
|
507
|
+
// 'POST /api/projects': 'projects/create'
|
508
|
+
export type CreateProjectRequest = {
|
509
|
+
body: {
|
510
|
+
name: string;
|
511
|
+
};
|
512
|
+
path?: never;
|
513
|
+
query?: never;
|
514
|
+
url: '/api/projects';
|
515
|
+
};
|
516
|
+
export type CreateProjectResponse = SingleResponse<Project>;
|
517
|
+
|
518
|
+
// 'GET /api/projects/:id': 'projects/show'
|
519
|
+
export type GetProjectRequest = {
|
520
|
+
body?: never;
|
521
|
+
path: {
|
522
|
+
id: string;
|
523
|
+
};
|
524
|
+
query?: never;
|
525
|
+
url: '/api/projects/{id}';
|
526
|
+
};
|
527
|
+
export type GetProjectResponse = SingleResponse<Project>;
|
528
|
+
|
529
|
+
// 'POST /api/projects/:id/background-image': 'projects/update-background-image'
|
530
|
+
export type UpdateProjectBackgroundImageRequest = {
|
531
|
+
body: {
|
532
|
+
file: File;
|
533
|
+
};
|
534
|
+
path: {
|
535
|
+
id: string;
|
536
|
+
};
|
537
|
+
query?: never;
|
538
|
+
url: '/api/projects/{id}/background-image';
|
539
|
+
};
|
540
|
+
export type UpdateProjectBackgroundImageResponse = SingleResponse<Project>;
|
541
|
+
|
542
|
+
// 'PATCH /api/projects/:id': 'projects/update'
|
543
|
+
export type UpdateProjectRequest = {
|
544
|
+
body: Partial<Omit<Project, 'createdAt' | 'updatedAt' | 'id' | 'backgroundImage'>>;
|
545
|
+
path: {
|
546
|
+
id: string;
|
547
|
+
};
|
548
|
+
query?: never;
|
549
|
+
url: '/api/projects/{id}';
|
550
|
+
};
|
551
|
+
export type UpdateProjectResponse = SingleResponse<Project>;
|
552
|
+
|
553
|
+
// 'DELETE /api/projects/:id': 'projects/delete'
|
554
|
+
export type DeleteProjectRequest = {
|
555
|
+
body?: never;
|
556
|
+
path: {
|
557
|
+
id: string;
|
558
|
+
};
|
559
|
+
query?: never;
|
560
|
+
url: '/api/projects/{id}';
|
561
|
+
};
|
562
|
+
export type DeleteProjectResponse = SingleResponse<Project>;
|
563
|
+
|
564
|
+
// 'POST /api/projects/:projectId/managers': 'project-managers/create'
|
565
|
+
export type CreateProjectManagerRequest = {
|
566
|
+
body: {
|
567
|
+
userId: string;
|
568
|
+
};
|
569
|
+
path: {
|
570
|
+
projectId: string;
|
571
|
+
};
|
572
|
+
query?: never;
|
573
|
+
url: '/api/projects/{projectId}/managers';
|
574
|
+
};
|
575
|
+
export type CreateProjectManagerResponse = SingleResponse<ProjectManager>;
|
576
|
+
|
577
|
+
// 'DELETE /api/project-managers/:id': 'project-managers/delete'
|
578
|
+
export type DeleteProjectManagerRequest = {
|
579
|
+
body?: never;
|
580
|
+
path: {
|
581
|
+
id: string;
|
582
|
+
};
|
583
|
+
query?: never;
|
584
|
+
url: '/api/project-managers/{id}';
|
585
|
+
};
|
586
|
+
export type DeleteProjectManagerResponse = SingleResponse<ProjectManager>;
|
587
|
+
|
588
|
+
// 'POST /api/projects/:projectId/boards': 'boards/create'
|
589
|
+
export type CreateBoardRequest = {
|
590
|
+
body: {
|
591
|
+
position: number;
|
592
|
+
name: string;
|
593
|
+
};
|
594
|
+
path: {
|
595
|
+
projectId: string;
|
596
|
+
};
|
597
|
+
query?: never;
|
598
|
+
url: '/api/projects/{projectId}/boards';
|
599
|
+
};
|
600
|
+
export type CreateBoardResponse = SingleResponse<Board>;
|
601
|
+
|
602
|
+
// 'GET /api/boards/:id': 'boards/show'
|
603
|
+
export type GetBoardRequest = {
|
604
|
+
body?: never;
|
605
|
+
path: {
|
606
|
+
id: string;
|
607
|
+
};
|
608
|
+
query?: never;
|
609
|
+
url: '/api/boards/{id}';
|
610
|
+
};
|
611
|
+
export type GetBoardResponse = SingleResponse<Board>;
|
612
|
+
|
613
|
+
// 'PATCH /api/boards/:id': 'boards/update'
|
614
|
+
export type UpdateBoardRequest = {
|
615
|
+
body: Partial<Omit<Board, 'createdAt' | 'updatedAt' | 'id' | 'projectId'>>;
|
616
|
+
path: {
|
617
|
+
id: string;
|
618
|
+
};
|
619
|
+
query?: never;
|
620
|
+
url: '/api/boards/{id}';
|
621
|
+
};
|
622
|
+
export type UpdateBoardResponse = SingleResponse<Board>;
|
623
|
+
|
624
|
+
// 'DELETE /api/boards/:id': 'boards/delete'
|
625
|
+
export type DeleteBoardRequest = {
|
626
|
+
body?: never;
|
627
|
+
path: {
|
628
|
+
id: string;
|
629
|
+
};
|
630
|
+
query?: never;
|
631
|
+
url: '/api/boards/{id}';
|
632
|
+
};
|
633
|
+
export type DeleteBoardResponse = SingleResponse<void>;
|
634
|
+
|
635
|
+
// 'POST /api/boards/:boardId/memberships': 'board-memberships/create'
|
636
|
+
export type CreateBoardMembershipRequest = {
|
637
|
+
body: {
|
638
|
+
userId: string;
|
639
|
+
role: Role;
|
640
|
+
};
|
641
|
+
path: {
|
642
|
+
boardId: string;
|
643
|
+
};
|
644
|
+
query?: never;
|
645
|
+
url: '/api/boards/{boardId}/memberships';
|
646
|
+
};
|
647
|
+
export type CreateBoardMembershipResponse = SingleResponse<BoardMembership>;
|
648
|
+
|
649
|
+
// 'PATCH /api/board-memberships/:id': 'board-memberships/update'
|
650
|
+
export type UpdateBoardMembershipRequest = {
|
651
|
+
body: {
|
652
|
+
role: Role;
|
653
|
+
};
|
654
|
+
path: {
|
655
|
+
id: string;
|
656
|
+
};
|
657
|
+
query?: never;
|
658
|
+
url: '/api/board-memberships/{id}';
|
659
|
+
};
|
660
|
+
export type UpdateBoardMembershipResponse = SingleResponse<BoardMembership>;
|
661
|
+
|
662
|
+
// 'DELETE /api/board-memberships/:id': 'board-memberships/delete'
|
663
|
+
export type DeleteBoardMembershipRequest = {
|
664
|
+
body?: never;
|
665
|
+
path: {
|
666
|
+
id: string;
|
667
|
+
};
|
668
|
+
query?: never;
|
669
|
+
url: '/api/board-memberships/{id}';
|
670
|
+
};
|
671
|
+
export type DeleteBoardMembershipResponse = SingleResponse<BoardMembership>;
|
672
|
+
|
673
|
+
// 'POST /api/boards/:boardId/labels': 'labels/create'
|
674
|
+
export type CreateLabelRequest = {
|
675
|
+
body: {
|
676
|
+
name: string;
|
677
|
+
position: number;
|
678
|
+
color: LabelColor;
|
679
|
+
};
|
680
|
+
path: {
|
681
|
+
boardId: string;
|
682
|
+
};
|
683
|
+
query?: never;
|
684
|
+
url: '/api/boards/{boardId}/labels';
|
685
|
+
};
|
686
|
+
export type CreateLabelResponse = SingleResponse<Label>;
|
687
|
+
|
688
|
+
// 'PATCH /api/labels/:id': 'labels/update'
|
689
|
+
export type UpdateLabelRequest = {
|
690
|
+
body: Partial<Omit<Label, 'createdAt' | 'updatedAt' | 'id' | 'boardId'>>;
|
691
|
+
path: {
|
692
|
+
id: string;
|
693
|
+
};
|
694
|
+
query?: never;
|
695
|
+
url: '/api/labels/{id}';
|
696
|
+
};
|
697
|
+
export type UpdateLabelResponse = SingleResponse<Label>;
|
698
|
+
|
699
|
+
// 'DELETE /api/labels/:id': 'labels/delete'
|
700
|
+
export type DeleteLabelRequest = {
|
701
|
+
body?: never;
|
702
|
+
path: {
|
703
|
+
id: string;
|
704
|
+
};
|
705
|
+
query?: never;
|
706
|
+
url: '/api/labels/{id}';
|
707
|
+
};
|
708
|
+
export type DeleteLabelResponse = SingleResponse<Label>;
|
709
|
+
|
710
|
+
// 'POST /api/boards/:boardId/lists': 'lists/create'
|
711
|
+
export type CreateListRequest = {
|
712
|
+
body: {
|
713
|
+
position: number;
|
714
|
+
name: string;
|
715
|
+
};
|
716
|
+
path: {
|
717
|
+
boardId: string;
|
718
|
+
};
|
719
|
+
query?: never;
|
720
|
+
url: '/api/boards/{boardId}/lists';
|
721
|
+
};
|
722
|
+
export type CreateListResponse = SingleResponse<List>;
|
723
|
+
|
724
|
+
// 'PATCH /api/lists/:id': 'lists/update'
|
725
|
+
export type UpdateListRequest = {
|
726
|
+
body: Partial<Omit<List, 'createdAt' | 'updatedAt' | 'id' | 'boardId'>>;
|
727
|
+
path: {
|
728
|
+
id: string;
|
729
|
+
};
|
730
|
+
query?: never;
|
731
|
+
url: '/api/lists/{id}';
|
732
|
+
};
|
733
|
+
export type UpdateListResponse = SingleResponse<List>;
|
734
|
+
|
735
|
+
// 'POST /api/lists/:id/sort': 'lists/sort'
|
736
|
+
export type SortListRequest = {
|
737
|
+
body: {
|
738
|
+
type: SortType;
|
739
|
+
};
|
740
|
+
path: {
|
741
|
+
id: string;
|
742
|
+
};
|
743
|
+
query?: never;
|
744
|
+
url: '/api/lists/{id}/sort';
|
745
|
+
};
|
746
|
+
export type SortListResponse = SingleResponse<List>;
|
747
|
+
|
748
|
+
// 'DELETE /api/lists/:id': 'lists/delete'
|
749
|
+
export type DeleteListRequest = {
|
750
|
+
body?: never;
|
751
|
+
path: {
|
752
|
+
id: string;
|
753
|
+
};
|
754
|
+
query?: never;
|
755
|
+
url: '/api/lists/{id}';
|
756
|
+
};
|
757
|
+
export type DeleteListResponse = SingleResponse<List>;
|
758
|
+
|
759
|
+
// 'POST /api/lists/:listId/cards': 'cards/create'
|
760
|
+
export type CreateCardRequest = {
|
761
|
+
body: {
|
762
|
+
name: string;
|
763
|
+
position: number;
|
764
|
+
};
|
765
|
+
path: {
|
766
|
+
listId: string;
|
767
|
+
};
|
768
|
+
query?: never;
|
769
|
+
url: '/api/lists/{listId}/cards';
|
770
|
+
};
|
771
|
+
export type CreateCardResponse = SingleResponse<Card>;
|
772
|
+
|
773
|
+
// 'GET /api/cards/:id': 'cards/show'
|
774
|
+
export type GetCardRequest = {
|
775
|
+
body?: never;
|
776
|
+
path: {
|
777
|
+
id: string;
|
778
|
+
};
|
779
|
+
query?: never;
|
780
|
+
url: '/api/cards/{id}';
|
781
|
+
};
|
782
|
+
export type GetCardResponse = SingleResponse<Card>;
|
783
|
+
|
784
|
+
// 'PATCH /api/cards/:id': 'cards/update'
|
785
|
+
export type UpdateCardRequest = {
|
786
|
+
body: Partial<Omit<Card, 'createdAt' | 'updatedAt' | 'id' | 'creatorUserId' | 'isSubscribed'>>;
|
787
|
+
path: {
|
788
|
+
id: string;
|
789
|
+
};
|
790
|
+
query?: never;
|
791
|
+
url: '/api/cards/{id}';
|
792
|
+
};
|
793
|
+
export type UpdateCardResponse = SingleResponse<Card>;
|
794
|
+
|
795
|
+
// 'POST /api/cards/:id/duplicate': 'cards/duplicate'
|
796
|
+
export type DuplicateCardRequest = {
|
797
|
+
body: {
|
798
|
+
position: number;
|
799
|
+
};
|
800
|
+
path: {
|
801
|
+
id: string;
|
802
|
+
};
|
803
|
+
query?: never;
|
804
|
+
url: '/api/cards/{id}/duplicate';
|
805
|
+
};
|
806
|
+
export type DuplicateCardResponse = SingleResponse<Card>;
|
807
|
+
|
808
|
+
// 'DELETE /api/cards/:id': 'cards/delete'
|
809
|
+
export type DeleteCardRequest = {
|
810
|
+
body?: never;
|
811
|
+
path: {
|
812
|
+
id: string;
|
813
|
+
};
|
814
|
+
query?: never;
|
815
|
+
url: '/api/cards/{id}';
|
816
|
+
};
|
817
|
+
export type DeleteCardResponse = SingleResponse<Card>;
|
818
|
+
|
819
|
+
// 'POST /api/cards/:cardId/memberships': 'card-memberships/create'
|
820
|
+
export type CreateCardMembershipRequest = {
|
821
|
+
body: {
|
822
|
+
userId: string;
|
823
|
+
};
|
824
|
+
path: {
|
825
|
+
cardId: string;
|
826
|
+
};
|
827
|
+
query?: never;
|
828
|
+
url: '/api/cards/{cardId}/memberships';
|
829
|
+
};
|
830
|
+
export type CreateCardMembershipResponse = SingleResponse<CardMembership>;
|
831
|
+
|
832
|
+
// 'DELETE /api/cards/:cardId/memberships': 'card-memberships/delete'
|
833
|
+
export type DeleteCardMembershipRequest = {
|
834
|
+
body: {
|
835
|
+
userId: string;
|
836
|
+
};
|
837
|
+
path: {
|
838
|
+
cardId: string;
|
839
|
+
};
|
840
|
+
query?: never;
|
841
|
+
url: '/api/cards/{cardId}/memberships';
|
842
|
+
};
|
843
|
+
export type DeleteCardMembershipResponse = SingleResponse<CardMembership>;
|
844
|
+
|
845
|
+
// 'POST /api/cards/:cardId/labels': 'card-labels/create'
|
846
|
+
export type CreateCardLabelRequest = {
|
847
|
+
body: {
|
848
|
+
labelId: string;
|
849
|
+
};
|
850
|
+
path: {
|
851
|
+
cardId: string;
|
852
|
+
};
|
853
|
+
query?: never;
|
854
|
+
url: '/api/cards/{cardId}/labels';
|
855
|
+
};
|
856
|
+
export type CreateCardLabelResponse = SingleResponse<CardLabel>;
|
857
|
+
|
858
|
+
// 'DELETE /api/cards/:cardId/labels/:labelId': 'card-labels/delete'
|
859
|
+
export type DeleteCardLabelRequest = {
|
860
|
+
body?: never;
|
861
|
+
path: {
|
862
|
+
cardId: string;
|
863
|
+
labelId: string;
|
864
|
+
};
|
865
|
+
query?: never;
|
866
|
+
url: '/api/cards/{cardId}/labels/{labelId}';
|
867
|
+
};
|
868
|
+
export type DeleteCardLabelResponse = SingleResponse<CardLabel>;
|
869
|
+
|
870
|
+
// 'POST /api/cards/:cardId/tasks': 'tasks/create'
|
871
|
+
export type CreateTaskRequest = {
|
872
|
+
body: {
|
873
|
+
position: number;
|
874
|
+
name: string;
|
875
|
+
};
|
876
|
+
path: {
|
877
|
+
cardId: string;
|
878
|
+
};
|
879
|
+
query?: never;
|
880
|
+
url: '/api/cards/{cardId}/tasks';
|
881
|
+
};
|
882
|
+
export type CreateTaskResponse = SingleResponse<Task>;
|
883
|
+
|
884
|
+
// 'PATCH /api/tasks/:id': 'tasks/update'
|
885
|
+
export type UpdateTaskRequest = {
|
886
|
+
body: Partial<Omit<Task, 'createdAt' | 'updatedAt' | 'id' | 'cardId'>>;
|
887
|
+
path: {
|
888
|
+
id: string;
|
889
|
+
};
|
890
|
+
query?: never;
|
891
|
+
url: '/api/tasks/{id}';
|
892
|
+
};
|
893
|
+
export type UpdateTaskResponse = SingleResponse<Task>;
|
894
|
+
|
895
|
+
// 'DELETE /api/tasks/:id': 'tasks/delete'
|
896
|
+
export type DeleteTaskRequest = {
|
897
|
+
body?: never;
|
898
|
+
path: {
|
899
|
+
id: string;
|
900
|
+
};
|
901
|
+
query?: never;
|
902
|
+
url: '/api/tasks/{id}';
|
903
|
+
};
|
904
|
+
export type DeleteTaskResponse = SingleResponse<Task>;
|
905
|
+
|
906
|
+
// 'POST /api/cards/:cardId/attachments': 'attachments/create'
|
907
|
+
export type CreateAttachmentRequest = {
|
908
|
+
body: {
|
909
|
+
file: File;
|
910
|
+
};
|
911
|
+
path: {
|
912
|
+
cardId: string;
|
913
|
+
};
|
914
|
+
query?: never;
|
915
|
+
url: '/api/cards/{cardId}/attachments';
|
916
|
+
};
|
917
|
+
export type CreateAttachmentResponse = SingleResponse<Attachment>;
|
918
|
+
|
919
|
+
// 'PATCH /api/attachments/:id': 'attachments/update'
|
920
|
+
export type UpdateAttachmentRequest = {
|
921
|
+
body: Partial<Omit<Attachment, 'createdAt' | 'updatedAt' | 'id' | 'cardId' | 'createUserId' | 'url' | 'coverUrl'>>;
|
922
|
+
path: {
|
923
|
+
id: string;
|
924
|
+
};
|
925
|
+
query?: never;
|
926
|
+
url: '/api/attachments/{id}';
|
927
|
+
};
|
928
|
+
export type UpdateAttachmentResponse = SingleResponse<Attachment>;
|
929
|
+
|
930
|
+
// 'DELETE /api/attachments/:id': 'attachments/delete'
|
931
|
+
export type DeleteAttachmentRequest = {
|
932
|
+
body?: never;
|
933
|
+
path: {
|
934
|
+
id: string;
|
935
|
+
};
|
936
|
+
query?: never;
|
937
|
+
url: '/api/attachments/{id}';
|
938
|
+
};
|
939
|
+
export type DeleteAttachmentResponse = SingleResponse<Attachment>;
|
940
|
+
|
941
|
+
// 'GET /attachments/:id/download/:filename'
|
942
|
+
export type GetAttachmentRequest = {
|
943
|
+
body?: never;
|
944
|
+
path: {
|
945
|
+
id: string;
|
946
|
+
filename: string;
|
947
|
+
};
|
948
|
+
query?: never;
|
949
|
+
url: '/attachments/{id}/download/{filename}';
|
950
|
+
};
|
951
|
+
export type GetAttachmentResponse = Blob;
|
952
|
+
|
953
|
+
// 'GET /attachments/:id/download/thumbnails/cover-256.:extension'
|
954
|
+
export type GetAttachmentThumbnailRequest = {
|
955
|
+
body?: never;
|
956
|
+
path: {
|
957
|
+
id: string;
|
958
|
+
extension: string;
|
959
|
+
};
|
960
|
+
query?: never;
|
961
|
+
url: '/attachments/{id}/download/thumbnails/cover-256.{extension}';
|
962
|
+
};
|
963
|
+
export type GetAttachmentThumbnailResponse = Blob;
|
964
|
+
|
965
|
+
// 'GET /api/cards/:cardId/actions': 'actions/index'
|
966
|
+
export type GetCardActionsRequest = {
|
967
|
+
body?: never;
|
968
|
+
path: {
|
969
|
+
cardId: string;
|
970
|
+
};
|
971
|
+
query?: never;
|
972
|
+
url: '/api/cards/{cardId}/actions';
|
973
|
+
};
|
974
|
+
export type GetCardActionsResponse = ArrayResponse<Action>;
|
975
|
+
|
976
|
+
// 'POST /api/cards/:cardId/comment-actions': 'comment-actions/create'
|
977
|
+
export type CreateCommentActionRequest = {
|
978
|
+
body: {
|
979
|
+
text: string;
|
980
|
+
};
|
981
|
+
path: {
|
982
|
+
cardId: string;
|
983
|
+
};
|
984
|
+
query?: never;
|
985
|
+
url: '/api/cards/{cardId}/comment-actions';
|
986
|
+
};
|
987
|
+
export type CreateCommentActionResponse = SingleResponse<Comment>;
|
988
|
+
|
989
|
+
// 'PATCH /api/comment-actions/:id': 'comment-actions/update'
|
990
|
+
export type UpdateCommentActionRequest = {
|
991
|
+
body: {
|
992
|
+
text: string;
|
993
|
+
};
|
994
|
+
path: {
|
995
|
+
id: string;
|
996
|
+
};
|
997
|
+
query?: never;
|
998
|
+
url: '/api/comment-actions/{id}';
|
999
|
+
};
|
1000
|
+
export type UpdateCommentActionResponse = SingleResponse<Comment>;
|
1001
|
+
|
1002
|
+
// 'DELETE /api/comment-actions/:id': 'comment-actions/delete'
|
1003
|
+
export type DeleteCommentActionRequest = {
|
1004
|
+
body?: never;
|
1005
|
+
path: {
|
1006
|
+
id: string;
|
1007
|
+
};
|
1008
|
+
query?: never;
|
1009
|
+
url: '/api/comment-actions/{id}';
|
1010
|
+
};
|
1011
|
+
export type DeleteCommentActionResponse = SingleResponse<Comment>;
|
1012
|
+
|
1013
|
+
// 'GET /api/notifications': 'notifications/index'
|
1014
|
+
export type GetNotificationsRequest = {
|
1015
|
+
body?: never;
|
1016
|
+
path?: never;
|
1017
|
+
query?: never;
|
1018
|
+
url: '/api/notifications';
|
1019
|
+
};
|
1020
|
+
export type GetNotificationsResponse = ArrayResponse<Notification>;
|
1021
|
+
|
1022
|
+
// 'GET /api/notifications/:id': 'notifications/show'
|
1023
|
+
export type GetNotificationRequest = {
|
1024
|
+
body?: never;
|
1025
|
+
path: {
|
1026
|
+
id: string;
|
1027
|
+
};
|
1028
|
+
query?: never;
|
1029
|
+
url: '/api/notifications/{id}';
|
1030
|
+
};
|
1031
|
+
export type GetNotificationResponse = SingleResponse<Notification>;
|
1032
|
+
|
1033
|
+
// 'PATCH /api/notifications/:ids': 'notifications/update'
|
1034
|
+
export type UpdateNotificationsRequest = {
|
1035
|
+
body: Partial<Omit<Notification, 'createdAt' | 'updatedAt' | 'id' | 'cardId' | 'userId' | 'actionId'>>;
|
1036
|
+
path: {
|
1037
|
+
ids: string[];
|
1038
|
+
};
|
1039
|
+
query?: never;
|
1040
|
+
url: '/api/notifications/{ids}';
|
1041
|
+
};
|
1042
|
+
export type UpdateNotificationsResponse = ArrayResponse<Notification>;
|