@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
@@ -0,0 +1,1406 @@
|
|
1
|
+
import { Client } from '@hey-api/client-fetch';
|
2
|
+
import { ClientOptions as ClientOptions_2 } from '@hey-api/client-fetch';
|
3
|
+
import { Config } from '@hey-api/client-fetch';
|
4
|
+
import { Options as Options_2 } from '@hey-api/client-fetch';
|
5
|
+
import { RequestResult } from '@hey-api/client-fetch';
|
6
|
+
import { TDataShape } from '@hey-api/client-fetch';
|
7
|
+
|
8
|
+
/**
|
9
|
+
* Authentication
|
10
|
+
*/
|
11
|
+
export declare type AccessTokenOidcRequest = {
|
12
|
+
code: string;
|
13
|
+
nonce: string;
|
14
|
+
};
|
15
|
+
|
16
|
+
export declare type AccessTokenRequest = {
|
17
|
+
emailOrUsername: string;
|
18
|
+
password: string;
|
19
|
+
};
|
20
|
+
|
21
|
+
export declare type Action = {
|
22
|
+
id: string;
|
23
|
+
createdAt: Date;
|
24
|
+
updatedAt?: Date;
|
25
|
+
type: CommentType;
|
26
|
+
data: ActionText;
|
27
|
+
cardId: string;
|
28
|
+
userId: string;
|
29
|
+
};
|
30
|
+
|
31
|
+
export declare type ActionText = {
|
32
|
+
text: string;
|
33
|
+
};
|
34
|
+
|
35
|
+
export declare type ArrayResponse<T> = {
|
36
|
+
items: T[];
|
37
|
+
included?: Partial<Include>;
|
38
|
+
};
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Attachments
|
42
|
+
*/
|
43
|
+
export declare type Attachment = {
|
44
|
+
id: string;
|
45
|
+
name: string;
|
46
|
+
cardId: string;
|
47
|
+
url: string;
|
48
|
+
createUserId: string;
|
49
|
+
createdAt: Date;
|
50
|
+
updatedAt?: Date;
|
51
|
+
coverUrl?: string;
|
52
|
+
image?: Image_2;
|
53
|
+
};
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Create access token
|
57
|
+
* 'POST /api/access-tokens': 'access-tokens/create'
|
58
|
+
* @param options
|
59
|
+
*/
|
60
|
+
export declare const authorize: <ThrowOnError extends boolean = false>(options: Options<AuthorizeRequest, ThrowOnError>) => RequestResult<AuthorizeResponse, HttpError, ThrowOnError>;
|
61
|
+
|
62
|
+
export declare type AuthorizeError = HttpError;
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Exchange access token using oidc
|
66
|
+
* 'POST /api/access-tokens/exchange-using-oidc': 'access-tokens/exchange-using-oidc'
|
67
|
+
* TODO -- this endpoint needs a written test
|
68
|
+
* @param options
|
69
|
+
*/
|
70
|
+
export declare const authorizeOidc: <ThrowOnError extends boolean = false>(options: Options<AuthorizeOidcRequest, ThrowOnError>) => RequestResult<AuthorizeOidcResponse, HttpError, ThrowOnError>;
|
71
|
+
|
72
|
+
export declare type AuthorizeOidcRequest = {
|
73
|
+
body: AccessTokenOidcRequest;
|
74
|
+
path?: never;
|
75
|
+
query?: never;
|
76
|
+
url: '/api/access-tokens/exchange-using-oidc';
|
77
|
+
};
|
78
|
+
|
79
|
+
export declare type AuthorizeOidcResponse = SingleResponse<string>;
|
80
|
+
|
81
|
+
export declare type AuthorizeRequest = {
|
82
|
+
body: AccessTokenRequest;
|
83
|
+
path?: never;
|
84
|
+
query?: never;
|
85
|
+
url: '/api/access-tokens';
|
86
|
+
};
|
87
|
+
|
88
|
+
export declare type AuthorizeResponse = SingleResponse<string>;
|
89
|
+
|
90
|
+
export declare type Background = {
|
91
|
+
type: BackgroundType;
|
92
|
+
name?: BackgroundGradient;
|
93
|
+
};
|
94
|
+
|
95
|
+
export declare type BackgroundGradient = 'old-lime' | 'ocean-dive' | 'tzepesch-style' | 'jungle-mesh' | 'strawberry-dust' | 'purple-rose' | 'sun-scream' | 'warm-rust' | 'sky-change' | 'green-eyes' | 'blue-xchange' | 'blood-orange' | 'sour-peel' | 'green-ninja' | 'algae-green' | 'coral-reef' | 'steel-grey' | 'heat-waves' | 'velvet-lounge' | 'purple-rain' | 'blue-steel' | 'blueish-curve' | 'prism-light' | 'green-mist' | 'red-curtain';
|
96
|
+
|
97
|
+
export declare type BackgroundImage = {
|
98
|
+
url?: string;
|
99
|
+
coverUrl?: string;
|
100
|
+
};
|
101
|
+
|
102
|
+
export declare type BackgroundType = 'gradient' | 'image';
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Boards
|
106
|
+
*/
|
107
|
+
export declare type Board = {
|
108
|
+
id: string;
|
109
|
+
createdAt: Date;
|
110
|
+
updatedAt?: Date;
|
111
|
+
position: number;
|
112
|
+
name: string;
|
113
|
+
projectId: string;
|
114
|
+
};
|
115
|
+
|
116
|
+
/**
|
117
|
+
* Board memberships
|
118
|
+
*/
|
119
|
+
export declare type BoardMembership = {
|
120
|
+
id: string;
|
121
|
+
createdAt: Date;
|
122
|
+
updatedAt?: Date;
|
123
|
+
role: Role;
|
124
|
+
canComment?: boolean;
|
125
|
+
boardId: string;
|
126
|
+
userId: string;
|
127
|
+
};
|
128
|
+
|
129
|
+
/**
|
130
|
+
* Cards
|
131
|
+
*/
|
132
|
+
export declare type Card = {
|
133
|
+
id: string;
|
134
|
+
createdAt: Date;
|
135
|
+
updatedAt?: Date;
|
136
|
+
creatorUserId: string;
|
137
|
+
position: number;
|
138
|
+
name: string;
|
139
|
+
description?: string;
|
140
|
+
dueDate?: Date;
|
141
|
+
isDueDateCompleted?: boolean;
|
142
|
+
boardId: string;
|
143
|
+
listId: string;
|
144
|
+
coverAttachmentId?: string;
|
145
|
+
isSubscribed: boolean;
|
146
|
+
};
|
147
|
+
|
148
|
+
export declare type CardLabel = {
|
149
|
+
id: string;
|
150
|
+
createdAt: Date;
|
151
|
+
updatedAt?: Date;
|
152
|
+
cardId: string;
|
153
|
+
labelId?: string;
|
154
|
+
};
|
155
|
+
|
156
|
+
export declare type CardMembership = {
|
157
|
+
id: string;
|
158
|
+
createdAt: Date;
|
159
|
+
updatedAt?: Date;
|
160
|
+
cardId: string;
|
161
|
+
userId: string;
|
162
|
+
};
|
163
|
+
|
164
|
+
export declare const client: Client;
|
165
|
+
|
166
|
+
export declare type ClientOptions = {
|
167
|
+
baseUrl: `${string}://${string}/api` | (string & {});
|
168
|
+
};
|
169
|
+
|
170
|
+
/**
|
171
|
+
* Comments
|
172
|
+
*/
|
173
|
+
declare type Comment_2 = {
|
174
|
+
id: string;
|
175
|
+
createdAt: Date;
|
176
|
+
updatedAt?: Date;
|
177
|
+
cardId: string;
|
178
|
+
userId: string;
|
179
|
+
data: ActionText;
|
180
|
+
type: CommentType;
|
181
|
+
};
|
182
|
+
export { Comment_2 as Comment }
|
183
|
+
|
184
|
+
export declare type CommentType = 'commentCard';
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Create attachment
|
188
|
+
* 'POST /api/cards/:cardId/attachments': 'attachments/create'
|
189
|
+
* @param options
|
190
|
+
*/
|
191
|
+
export declare const createAttachment: <ThrowOnError extends boolean = false>(options: Options<CreateAttachmentRequest, ThrowOnError>) => RequestResult<CreateAttachmentResponse, HttpError, ThrowOnError>;
|
192
|
+
|
193
|
+
export declare type CreateAttachmentRequest = {
|
194
|
+
body: {
|
195
|
+
file: File;
|
196
|
+
};
|
197
|
+
path: {
|
198
|
+
cardId: string;
|
199
|
+
};
|
200
|
+
query?: never;
|
201
|
+
url: '/api/cards/{cardId}/attachments';
|
202
|
+
};
|
203
|
+
|
204
|
+
export declare type CreateAttachmentResponse = SingleResponse<Attachment>;
|
205
|
+
|
206
|
+
/**
|
207
|
+
* Create board
|
208
|
+
* 'POST /api/projects/:projectId/boards': 'boards/create'
|
209
|
+
* @param options
|
210
|
+
*/
|
211
|
+
export declare const createBoard: <ThrowOnError extends boolean = false>(options: Options<CreateBoardRequest, ThrowOnError>) => RequestResult<CreateBoardResponse, HttpError, ThrowOnError>;
|
212
|
+
|
213
|
+
/**
|
214
|
+
* Create board membership
|
215
|
+
* 'POST /api/boards/:boardId/memberships': 'board-memberships/create'
|
216
|
+
* @param options
|
217
|
+
*/
|
218
|
+
export declare const createBoardMembership: <ThrowOnError extends boolean = false>(options: Options<CreateBoardMembershipRequest, ThrowOnError>) => RequestResult<CreateBoardMembershipResponse, HttpError, ThrowOnError>;
|
219
|
+
|
220
|
+
export declare type CreateBoardMembershipRequest = {
|
221
|
+
body: {
|
222
|
+
userId: string;
|
223
|
+
role: Role;
|
224
|
+
};
|
225
|
+
path: {
|
226
|
+
boardId: string;
|
227
|
+
};
|
228
|
+
query?: never;
|
229
|
+
url: '/api/boards/{boardId}/memberships';
|
230
|
+
};
|
231
|
+
|
232
|
+
export declare type CreateBoardMembershipResponse = SingleResponse<BoardMembership>;
|
233
|
+
|
234
|
+
export declare type CreateBoardRequest = {
|
235
|
+
body: {
|
236
|
+
position: number;
|
237
|
+
name: string;
|
238
|
+
};
|
239
|
+
path: {
|
240
|
+
projectId: string;
|
241
|
+
};
|
242
|
+
query?: never;
|
243
|
+
url: '/api/projects/{projectId}/boards';
|
244
|
+
};
|
245
|
+
|
246
|
+
export declare type CreateBoardResponse = SingleResponse<Board>;
|
247
|
+
|
248
|
+
/**
|
249
|
+
* Create card
|
250
|
+
* 'POST /api/lists/:listId/cards': 'cards/create'
|
251
|
+
* @param options
|
252
|
+
*/
|
253
|
+
export declare const createCard: <ThrowOnError extends boolean = false>(options: Options<CreateCardRequest, ThrowOnError>) => RequestResult<CreateCardResponse, HttpError, ThrowOnError>;
|
254
|
+
|
255
|
+
/**
|
256
|
+
* Create card label
|
257
|
+
* 'POST /api/cards/:cardId/labels': 'card-labels/create'
|
258
|
+
* @param options
|
259
|
+
*/
|
260
|
+
export declare const createCardLabel: <ThrowOnError extends boolean = false>(options: Options<CreateCardLabelRequest, ThrowOnError>) => RequestResult<CreateCardLabelResponse, HttpError, ThrowOnError>;
|
261
|
+
|
262
|
+
export declare type CreateCardLabelRequest = {
|
263
|
+
body: {
|
264
|
+
labelId: string;
|
265
|
+
};
|
266
|
+
path: {
|
267
|
+
cardId: string;
|
268
|
+
};
|
269
|
+
query?: never;
|
270
|
+
url: '/api/cards/{cardId}/labels';
|
271
|
+
};
|
272
|
+
|
273
|
+
export declare type CreateCardLabelResponse = SingleResponse<CardLabel>;
|
274
|
+
|
275
|
+
/**
|
276
|
+
* Create card membership
|
277
|
+
* 'POST /api/cards/:cardId/memberships': 'card-memberships/create'
|
278
|
+
* @param options
|
279
|
+
*/
|
280
|
+
export declare const createCardMembership: <ThrowOnError extends boolean = false>(options: Options<CreateCardMembershipRequest, ThrowOnError>) => RequestResult<CreateCardMembershipResponse, HttpError, ThrowOnError>;
|
281
|
+
|
282
|
+
export declare type CreateCardMembershipRequest = {
|
283
|
+
body: {
|
284
|
+
userId: string;
|
285
|
+
};
|
286
|
+
path: {
|
287
|
+
cardId: string;
|
288
|
+
};
|
289
|
+
query?: never;
|
290
|
+
url: '/api/cards/{cardId}/memberships';
|
291
|
+
};
|
292
|
+
|
293
|
+
export declare type CreateCardMembershipResponse = SingleResponse<CardMembership>;
|
294
|
+
|
295
|
+
export declare type CreateCardRequest = {
|
296
|
+
body: {
|
297
|
+
name: string;
|
298
|
+
position: number;
|
299
|
+
};
|
300
|
+
path: {
|
301
|
+
listId: string;
|
302
|
+
};
|
303
|
+
query?: never;
|
304
|
+
url: '/api/lists/{listId}/cards';
|
305
|
+
};
|
306
|
+
|
307
|
+
export declare type CreateCardResponse = SingleResponse<Card>;
|
308
|
+
|
309
|
+
export declare type CreateClientConfig<T extends ClientOptions_2 = ClientOptions> = (override?: Config<ClientOptions_2 & T>) => Config<Required<ClientOptions_2> & T>;
|
310
|
+
|
311
|
+
/**
|
312
|
+
* Create comment action
|
313
|
+
* 'POST /api/cards/:cardId/comment-actions': 'comment-actions/create'
|
314
|
+
* @param options
|
315
|
+
*/
|
316
|
+
export declare const createCommentAction: <ThrowOnError extends boolean = false>(options: Options<CreateCommentActionRequest, ThrowOnError>) => RequestResult<CreateCommentActionResponse, HttpError, ThrowOnError>;
|
317
|
+
|
318
|
+
export declare type CreateCommentActionRequest = {
|
319
|
+
body: {
|
320
|
+
text: string;
|
321
|
+
};
|
322
|
+
path: {
|
323
|
+
cardId: string;
|
324
|
+
};
|
325
|
+
query?: never;
|
326
|
+
url: '/api/cards/{cardId}/comment-actions';
|
327
|
+
};
|
328
|
+
|
329
|
+
export declare type CreateCommentActionResponse = SingleResponse<Comment_2>;
|
330
|
+
|
331
|
+
/**
|
332
|
+
* Create label
|
333
|
+
* 'POST /api/boards/:boardId/labels': 'labels/create'
|
334
|
+
* @param options
|
335
|
+
*/
|
336
|
+
export declare const createLabel: <ThrowOnError extends boolean = false>(options: Options<CreateLabelRequest, ThrowOnError>) => RequestResult<CreateLabelResponse, HttpError, ThrowOnError>;
|
337
|
+
|
338
|
+
export declare type CreateLabelRequest = {
|
339
|
+
body: {
|
340
|
+
name: string;
|
341
|
+
position: number;
|
342
|
+
color: LabelColor;
|
343
|
+
};
|
344
|
+
path: {
|
345
|
+
boardId: string;
|
346
|
+
};
|
347
|
+
query?: never;
|
348
|
+
url: '/api/boards/{boardId}/labels';
|
349
|
+
};
|
350
|
+
|
351
|
+
export declare type CreateLabelResponse = SingleResponse<Label>;
|
352
|
+
|
353
|
+
/**
|
354
|
+
* Create list
|
355
|
+
* 'POST /api/boards/:boardId/lists': 'lists/create'
|
356
|
+
* @param options
|
357
|
+
*/
|
358
|
+
export declare const createList: <ThrowOnError extends boolean = false>(options: Options<CreateListRequest, ThrowOnError>) => RequestResult<CreateListResponse, HttpError, ThrowOnError>;
|
359
|
+
|
360
|
+
export declare type CreateListRequest = {
|
361
|
+
body: {
|
362
|
+
position: number;
|
363
|
+
name: string;
|
364
|
+
};
|
365
|
+
path: {
|
366
|
+
boardId: string;
|
367
|
+
};
|
368
|
+
query?: never;
|
369
|
+
url: '/api/boards/{boardId}/lists';
|
370
|
+
};
|
371
|
+
|
372
|
+
export declare type CreateListResponse = SingleResponse<List>;
|
373
|
+
|
374
|
+
/**
|
375
|
+
* Create project
|
376
|
+
* 'POST /api/projects': 'projects/create'
|
377
|
+
* @param options
|
378
|
+
*/
|
379
|
+
export declare const createProject: <ThrowOnError extends boolean = false>(options: Options<CreateProjectRequest, ThrowOnError>) => RequestResult<CreateProjectResponse, HttpError, ThrowOnError>;
|
380
|
+
|
381
|
+
/**
|
382
|
+
* Create project manager
|
383
|
+
* 'POST /api/projects/:projectId/managers': 'project-managers/create'
|
384
|
+
* @param options
|
385
|
+
*/
|
386
|
+
export declare const createProjectManager: <ThrowOnError extends boolean = false>(options: Options<CreateProjectManagerRequest, ThrowOnError>) => RequestResult<CreateProjectManagerResponse, HttpError, ThrowOnError>;
|
387
|
+
|
388
|
+
export declare type CreateProjectManagerRequest = {
|
389
|
+
body: {
|
390
|
+
userId: string;
|
391
|
+
};
|
392
|
+
path: {
|
393
|
+
projectId: string;
|
394
|
+
};
|
395
|
+
query?: never;
|
396
|
+
url: '/api/projects/{projectId}/managers';
|
397
|
+
};
|
398
|
+
|
399
|
+
export declare type CreateProjectManagerResponse = SingleResponse<ProjectManager>;
|
400
|
+
|
401
|
+
export declare type CreateProjectRequest = {
|
402
|
+
body: {
|
403
|
+
name: string;
|
404
|
+
};
|
405
|
+
path?: never;
|
406
|
+
query?: never;
|
407
|
+
url: '/api/projects';
|
408
|
+
};
|
409
|
+
|
410
|
+
export declare type CreateProjectResponse = SingleResponse<Project>;
|
411
|
+
|
412
|
+
/**
|
413
|
+
* Create task
|
414
|
+
* 'POST /api/cards/:cardId/tasks': 'tasks/create'
|
415
|
+
* @param options
|
416
|
+
*/
|
417
|
+
export declare const createTask: <ThrowOnError extends boolean = false>(options: Options<CreateTaskRequest, ThrowOnError>) => RequestResult<CreateTaskResponse, HttpError, ThrowOnError>;
|
418
|
+
|
419
|
+
export declare type CreateTaskRequest = {
|
420
|
+
body: {
|
421
|
+
position: number;
|
422
|
+
name: string;
|
423
|
+
};
|
424
|
+
path: {
|
425
|
+
cardId: string;
|
426
|
+
};
|
427
|
+
query?: never;
|
428
|
+
url: '/api/cards/{cardId}/tasks';
|
429
|
+
};
|
430
|
+
|
431
|
+
export declare type CreateTaskResponse = SingleResponse<Task>;
|
432
|
+
|
433
|
+
/**
|
434
|
+
* Create user
|
435
|
+
* 'POST /api/users': 'users/create'
|
436
|
+
* @param options
|
437
|
+
*/
|
438
|
+
export declare const createUser: <ThrowOnError extends boolean = false>(options: Options<CreateUserRequest, ThrowOnError>) => RequestResult<CreateUserResponse, HttpError, ThrowOnError>;
|
439
|
+
|
440
|
+
export declare type CreateUserRequest = {
|
441
|
+
body: {
|
442
|
+
email: string;
|
443
|
+
password: string;
|
444
|
+
name: string;
|
445
|
+
username?: string;
|
446
|
+
};
|
447
|
+
path?: never;
|
448
|
+
query?: never;
|
449
|
+
url: '/api/users';
|
450
|
+
};
|
451
|
+
|
452
|
+
export declare type CreateUserResponse = SingleResponse<User>;
|
453
|
+
|
454
|
+
/**
|
455
|
+
* Delete attachment
|
456
|
+
* 'DELETE /api/attachments/:id': 'attachments/delete'
|
457
|
+
* @param options
|
458
|
+
*/
|
459
|
+
export declare const deleteAttachment: <ThrowOnError extends boolean = false>(options: Options<DeleteAttachmentRequest, ThrowOnError>) => RequestResult<DeleteAttachmentResponse, HttpError, ThrowOnError>;
|
460
|
+
|
461
|
+
export declare type DeleteAttachmentRequest = {
|
462
|
+
body?: never;
|
463
|
+
path: {
|
464
|
+
id: string;
|
465
|
+
};
|
466
|
+
query?: never;
|
467
|
+
url: '/api/attachments/{id}';
|
468
|
+
};
|
469
|
+
|
470
|
+
export declare type DeleteAttachmentResponse = SingleResponse<Attachment>;
|
471
|
+
|
472
|
+
/**
|
473
|
+
* Delete board
|
474
|
+
* 'DELETE /api/boards/:id': 'boards/delete'
|
475
|
+
* @param options
|
476
|
+
*/
|
477
|
+
export declare const deleteBoard: <ThrowOnError extends boolean = false>(options: Options<DeleteBoardRequest, ThrowOnError>) => RequestResult<DeleteBoardResponse, HttpError, ThrowOnError>;
|
478
|
+
|
479
|
+
/**
|
480
|
+
* Delete board membership
|
481
|
+
* 'DELETE /api/board-memberships/:id': 'board-memberships/delete'
|
482
|
+
* @param options
|
483
|
+
*/
|
484
|
+
export declare const deleteBoardMembership: <ThrowOnError extends boolean = false>(options: Options<DeleteBoardMembershipRequest, ThrowOnError>) => RequestResult<DeleteBoardMembershipResponse, HttpError, ThrowOnError>;
|
485
|
+
|
486
|
+
export declare type DeleteBoardMembershipRequest = {
|
487
|
+
body?: never;
|
488
|
+
path: {
|
489
|
+
id: string;
|
490
|
+
};
|
491
|
+
query?: never;
|
492
|
+
url: '/api/board-memberships/{id}';
|
493
|
+
};
|
494
|
+
|
495
|
+
export declare type DeleteBoardMembershipResponse = SingleResponse<BoardMembership>;
|
496
|
+
|
497
|
+
export declare type DeleteBoardRequest = {
|
498
|
+
body?: never;
|
499
|
+
path: {
|
500
|
+
id: string;
|
501
|
+
};
|
502
|
+
query?: never;
|
503
|
+
url: '/api/boards/{id}';
|
504
|
+
};
|
505
|
+
|
506
|
+
export declare type DeleteBoardResponse = SingleResponse<void>;
|
507
|
+
|
508
|
+
/**
|
509
|
+
* Delete card
|
510
|
+
* 'DELETE /api/cards/:id': 'cards/delete'
|
511
|
+
* @param options
|
512
|
+
*/
|
513
|
+
export declare const deleteCard: <ThrowOnError extends boolean = false>(options: Options<DeleteCardRequest, ThrowOnError>) => RequestResult<DeleteCardResponse, HttpError, ThrowOnError>;
|
514
|
+
|
515
|
+
/**
|
516
|
+
* Delete card label
|
517
|
+
* 'DELETE /api/cards/:cardId/labels/:labelId': 'card-labels/delete'
|
518
|
+
* @param options
|
519
|
+
*/
|
520
|
+
export declare const deleteCardLabel: <ThrowOnError extends boolean = false>(options: Options<DeleteCardLabelRequest, ThrowOnError>) => RequestResult<DeleteCardLabelResponse, HttpError, ThrowOnError>;
|
521
|
+
|
522
|
+
export declare type DeleteCardLabelRequest = {
|
523
|
+
body?: never;
|
524
|
+
path: {
|
525
|
+
cardId: string;
|
526
|
+
labelId: string;
|
527
|
+
};
|
528
|
+
query?: never;
|
529
|
+
url: '/api/cards/{cardId}/labels/{labelId}';
|
530
|
+
};
|
531
|
+
|
532
|
+
export declare type DeleteCardLabelResponse = SingleResponse<CardLabel>;
|
533
|
+
|
534
|
+
/**
|
535
|
+
* Delete card membership
|
536
|
+
* 'DELETE /api/cards/:cardId/memberships': 'card-memberships/delete'
|
537
|
+
* @param options
|
538
|
+
*/
|
539
|
+
export declare const deleteCardMembership: <ThrowOnError extends boolean = false>(options: Options<DeleteCardMembershipRequest, ThrowOnError>) => RequestResult<DeleteCardMembershipResponse, HttpError, ThrowOnError>;
|
540
|
+
|
541
|
+
export declare type DeleteCardMembershipRequest = {
|
542
|
+
body: {
|
543
|
+
userId: string;
|
544
|
+
};
|
545
|
+
path: {
|
546
|
+
cardId: string;
|
547
|
+
};
|
548
|
+
query?: never;
|
549
|
+
url: '/api/cards/{cardId}/memberships';
|
550
|
+
};
|
551
|
+
|
552
|
+
export declare type DeleteCardMembershipResponse = SingleResponse<CardMembership>;
|
553
|
+
|
554
|
+
export declare type DeleteCardRequest = {
|
555
|
+
body?: never;
|
556
|
+
path: {
|
557
|
+
id: string;
|
558
|
+
};
|
559
|
+
query?: never;
|
560
|
+
url: '/api/cards/{id}';
|
561
|
+
};
|
562
|
+
|
563
|
+
export declare type DeleteCardResponse = SingleResponse<Card>;
|
564
|
+
|
565
|
+
/**
|
566
|
+
* Delete comment action
|
567
|
+
* 'DELETE /api/comment-actions/:id': 'comment-actions/delete'
|
568
|
+
* @param options
|
569
|
+
*/
|
570
|
+
export declare const deleteCommentAction: <ThrowOnError extends boolean = false>(options: Options<DeleteCommentActionRequest, ThrowOnError>) => RequestResult<DeleteCommentActionResponse, HttpError, ThrowOnError>;
|
571
|
+
|
572
|
+
export declare type DeleteCommentActionRequest = {
|
573
|
+
body?: never;
|
574
|
+
path: {
|
575
|
+
id: string;
|
576
|
+
};
|
577
|
+
query?: never;
|
578
|
+
url: '/api/comment-actions/{id}';
|
579
|
+
};
|
580
|
+
|
581
|
+
export declare type DeleteCommentActionResponse = SingleResponse<Comment_2>;
|
582
|
+
|
583
|
+
/**
|
584
|
+
* Delete label
|
585
|
+
* 'DELETE /api/labels/:id': 'labels/delete'
|
586
|
+
* @param options
|
587
|
+
*/
|
588
|
+
export declare const deleteLabel: <ThrowOnError extends boolean = false>(options: Options<DeleteLabelRequest, ThrowOnError>) => RequestResult<DeleteLabelResponse, HttpError, ThrowOnError>;
|
589
|
+
|
590
|
+
export declare type DeleteLabelRequest = {
|
591
|
+
body?: never;
|
592
|
+
path: {
|
593
|
+
id: string;
|
594
|
+
};
|
595
|
+
query?: never;
|
596
|
+
url: '/api/labels/{id}';
|
597
|
+
};
|
598
|
+
|
599
|
+
export declare type DeleteLabelResponse = SingleResponse<Label>;
|
600
|
+
|
601
|
+
/**
|
602
|
+
* Delete list
|
603
|
+
* 'DELETE /api/lists/:id': 'lists/delete'
|
604
|
+
* @param options
|
605
|
+
*/
|
606
|
+
export declare const deleteList: <ThrowOnError extends boolean = false>(options: Options<DeleteListRequest, ThrowOnError>) => RequestResult<DeleteListResponse, HttpError, ThrowOnError>;
|
607
|
+
|
608
|
+
export declare type DeleteListRequest = {
|
609
|
+
body?: never;
|
610
|
+
path: {
|
611
|
+
id: string;
|
612
|
+
};
|
613
|
+
query?: never;
|
614
|
+
url: '/api/lists/{id}';
|
615
|
+
};
|
616
|
+
|
617
|
+
export declare type DeleteListResponse = SingleResponse<List>;
|
618
|
+
|
619
|
+
/**
|
620
|
+
* Delete project
|
621
|
+
* 'DELETE /api/projects/:id': 'projects/delete'
|
622
|
+
* @param options
|
623
|
+
*/
|
624
|
+
export declare const deleteProject: <ThrowOnError extends boolean = false>(options: Options<DeleteProjectRequest, ThrowOnError>) => RequestResult<DeleteProjectResponse, HttpError, ThrowOnError>;
|
625
|
+
|
626
|
+
/**
|
627
|
+
* Delete project manager
|
628
|
+
* 'DELETE /api/project-managers/:id': 'project-managers/delete'
|
629
|
+
* @param options
|
630
|
+
*/
|
631
|
+
export declare const deleteProjectManager: <ThrowOnError extends boolean = false>(options: Options<DeleteProjectManagerRequest, ThrowOnError>) => RequestResult<DeleteProjectManagerResponse, HttpError, ThrowOnError>;
|
632
|
+
|
633
|
+
export declare type DeleteProjectManagerRequest = {
|
634
|
+
body?: never;
|
635
|
+
path: {
|
636
|
+
id: string;
|
637
|
+
};
|
638
|
+
query?: never;
|
639
|
+
url: '/api/project-managers/{id}';
|
640
|
+
};
|
641
|
+
|
642
|
+
export declare type DeleteProjectManagerResponse = SingleResponse<ProjectManager>;
|
643
|
+
|
644
|
+
export declare type DeleteProjectRequest = {
|
645
|
+
body?: never;
|
646
|
+
path: {
|
647
|
+
id: string;
|
648
|
+
};
|
649
|
+
query?: never;
|
650
|
+
url: '/api/projects/{id}';
|
651
|
+
};
|
652
|
+
|
653
|
+
export declare type DeleteProjectResponse = SingleResponse<Project>;
|
654
|
+
|
655
|
+
/**
|
656
|
+
* Delete task
|
657
|
+
* 'DELETE /api/tasks/:id': 'tasks/delete'
|
658
|
+
* @param options
|
659
|
+
*/
|
660
|
+
export declare const deleteTask: <ThrowOnError extends boolean = false>(options: Options<DeleteTaskRequest, ThrowOnError>) => RequestResult<DeleteTaskResponse, HttpError, ThrowOnError>;
|
661
|
+
|
662
|
+
export declare type DeleteTaskRequest = {
|
663
|
+
body?: never;
|
664
|
+
path: {
|
665
|
+
id: string;
|
666
|
+
};
|
667
|
+
query?: never;
|
668
|
+
url: '/api/tasks/{id}';
|
669
|
+
};
|
670
|
+
|
671
|
+
export declare type DeleteTaskResponse = SingleResponse<Task>;
|
672
|
+
|
673
|
+
/**
|
674
|
+
* Delete user
|
675
|
+
* 'DELETE /api/users/:id': 'users/delete'
|
676
|
+
* @param options
|
677
|
+
*/
|
678
|
+
export declare const deleteUser: <ThrowOnError extends boolean = false>(options: Options<DeleteUserRequest, ThrowOnError>) => RequestResult<DeleteUserResponse, HttpError, ThrowOnError>;
|
679
|
+
|
680
|
+
export declare type DeleteUserRequest = {
|
681
|
+
body?: never;
|
682
|
+
path: {
|
683
|
+
id: string;
|
684
|
+
};
|
685
|
+
query?: never;
|
686
|
+
url: '/api/users/{id}';
|
687
|
+
};
|
688
|
+
|
689
|
+
export declare type DeleteUserResponse = SingleResponse<User>;
|
690
|
+
|
691
|
+
/**
|
692
|
+
* Duplicate card
|
693
|
+
* 'POST /api/cards/:id/duplicate': 'cards/duplicate'
|
694
|
+
* @param options
|
695
|
+
*/
|
696
|
+
export declare const duplicateCard: <ThrowOnError extends boolean = false>(options: Options<DuplicateCardRequest, ThrowOnError>) => RequestResult<DuplicateCardResponse, HttpError, ThrowOnError>;
|
697
|
+
|
698
|
+
export declare type DuplicateCardRequest = {
|
699
|
+
body: {
|
700
|
+
position: number;
|
701
|
+
};
|
702
|
+
path: {
|
703
|
+
id: string;
|
704
|
+
};
|
705
|
+
query?: never;
|
706
|
+
url: '/api/cards/{id}/duplicate';
|
707
|
+
};
|
708
|
+
|
709
|
+
export declare type DuplicateCardResponse = SingleResponse<Card>;
|
710
|
+
|
711
|
+
/**
|
712
|
+
* Get attachment
|
713
|
+
* 'GET /attachments/:id/download/:filename'
|
714
|
+
* Note: this endpoint requires access token to be passed as a cookie, not as bearer token
|
715
|
+
* @param options
|
716
|
+
*/
|
717
|
+
export declare const getAttachment: <ThrowOnError extends boolean = false>(options: Options<GetAttachmentRequest, ThrowOnError>) => RequestResult<Blob, HttpError, ThrowOnError>;
|
718
|
+
|
719
|
+
export declare type GetAttachmentRequest = {
|
720
|
+
body?: never;
|
721
|
+
path: {
|
722
|
+
id: string;
|
723
|
+
filename: string;
|
724
|
+
};
|
725
|
+
query?: never;
|
726
|
+
url: '/attachments/{id}/download/{filename}';
|
727
|
+
};
|
728
|
+
|
729
|
+
export declare type GetAttachmentResponse = Blob;
|
730
|
+
|
731
|
+
/**
|
732
|
+
* Get attachment thumbnail
|
733
|
+
* 'GET /attachments/:id/download/thumbnails/cover-256.:extension'
|
734
|
+
* Note: this endpoint requires access token to be passed as a cookie, not as bearer token
|
735
|
+
* @param options
|
736
|
+
*/
|
737
|
+
export declare const getAttachmentThumbnail: <ThrowOnError extends boolean = false>(options: Options<GetAttachmentThumbnailRequest, ThrowOnError>) => RequestResult<Blob, HttpError, ThrowOnError>;
|
738
|
+
|
739
|
+
export declare type GetAttachmentThumbnailRequest = {
|
740
|
+
body?: never;
|
741
|
+
path: {
|
742
|
+
id: string;
|
743
|
+
extension: string;
|
744
|
+
};
|
745
|
+
query?: never;
|
746
|
+
url: '/attachments/{id}/download/thumbnails/cover-256.{extension}';
|
747
|
+
};
|
748
|
+
|
749
|
+
export declare type GetAttachmentThumbnailResponse = Blob;
|
750
|
+
|
751
|
+
/**
|
752
|
+
* Get board
|
753
|
+
* 'GET /api/boards/:id': 'boards/show'
|
754
|
+
* @param options
|
755
|
+
*/
|
756
|
+
export declare const getBoard: <ThrowOnError extends boolean = false>(options: Options<GetBoardRequest, ThrowOnError>) => RequestResult<GetBoardResponse, HttpError, ThrowOnError>;
|
757
|
+
|
758
|
+
export declare type GetBoardRequest = {
|
759
|
+
body?: never;
|
760
|
+
path: {
|
761
|
+
id: string;
|
762
|
+
};
|
763
|
+
query?: never;
|
764
|
+
url: '/api/boards/{id}';
|
765
|
+
};
|
766
|
+
|
767
|
+
export declare type GetBoardResponse = SingleResponse<Board>;
|
768
|
+
|
769
|
+
/**
|
770
|
+
* Get card
|
771
|
+
* 'GET /api/cards/:id': 'cards/show'
|
772
|
+
* @param options
|
773
|
+
*/
|
774
|
+
export declare const getCard: <ThrowOnError extends boolean = false>(options: Options<GetCardRequest, ThrowOnError>) => RequestResult<GetCardResponse, HttpError, ThrowOnError>;
|
775
|
+
|
776
|
+
/**
|
777
|
+
* Get card actions
|
778
|
+
* 'GET /api/cards/:cardId/actions': 'actions/index'
|
779
|
+
* @param options
|
780
|
+
*/
|
781
|
+
export declare const getCardActions: <ThrowOnError extends boolean = false>(options: Options<GetCardActionsRequest, ThrowOnError>) => RequestResult<GetCardActionsResponse, HttpError, ThrowOnError>;
|
782
|
+
|
783
|
+
export declare type GetCardActionsRequest = {
|
784
|
+
body?: never;
|
785
|
+
path: {
|
786
|
+
cardId: string;
|
787
|
+
};
|
788
|
+
query?: never;
|
789
|
+
url: '/api/cards/{cardId}/actions';
|
790
|
+
};
|
791
|
+
|
792
|
+
export declare type GetCardActionsResponse = ArrayResponse<Action>;
|
793
|
+
|
794
|
+
export declare type GetCardRequest = {
|
795
|
+
body?: never;
|
796
|
+
path: {
|
797
|
+
id: string;
|
798
|
+
};
|
799
|
+
query?: never;
|
800
|
+
url: '/api/cards/{id}';
|
801
|
+
};
|
802
|
+
|
803
|
+
export declare type GetCardResponse = SingleResponse<Card>;
|
804
|
+
|
805
|
+
/**
|
806
|
+
* Get config
|
807
|
+
* 'GET /api/config': 'show-config'
|
808
|
+
* @param options
|
809
|
+
*/
|
810
|
+
export declare const getConfig: <ThrowOnError extends boolean = false>(options?: Options<GetConfigRequest, ThrowOnError>) => RequestResult<GetConfigResponse, unknown, ThrowOnError>;
|
811
|
+
|
812
|
+
/**
|
813
|
+
* All types necessary to provide to the hey-api client
|
814
|
+
*/
|
815
|
+
export declare type GetConfigRequest = {
|
816
|
+
body?: never;
|
817
|
+
path?: never;
|
818
|
+
query?: never;
|
819
|
+
url: '/api/config';
|
820
|
+
};
|
821
|
+
|
822
|
+
export declare type GetConfigResponse = SingleResponse<Oidc>;
|
823
|
+
|
824
|
+
/**
|
825
|
+
* Get notification
|
826
|
+
* 'GET /api/notifications/:id': 'notifications/show'
|
827
|
+
* @param options
|
828
|
+
*/
|
829
|
+
export declare const getNotification: <ThrowOnError extends boolean = false>(options: Options<GetNotificationRequest, ThrowOnError>) => RequestResult<GetNotificationResponse, HttpError, ThrowOnError>;
|
830
|
+
|
831
|
+
export declare type GetNotificationRequest = {
|
832
|
+
body?: never;
|
833
|
+
path: {
|
834
|
+
id: string;
|
835
|
+
};
|
836
|
+
query?: never;
|
837
|
+
url: '/api/notifications/{id}';
|
838
|
+
};
|
839
|
+
|
840
|
+
export declare type GetNotificationResponse = SingleResponse<Notification_2>;
|
841
|
+
|
842
|
+
/**
|
843
|
+
* Get notifications
|
844
|
+
* 'GET /api/notifications': 'notifications/index'
|
845
|
+
* @param options
|
846
|
+
*/
|
847
|
+
export declare const getNotifications: <ThrowOnError extends boolean = false>(options?: Options<GetNotificationsRequest, ThrowOnError>) => RequestResult<GetNotificationsResponse, HttpError, ThrowOnError>;
|
848
|
+
|
849
|
+
export declare type GetNotificationsRequest = {
|
850
|
+
body?: never;
|
851
|
+
path?: never;
|
852
|
+
query?: never;
|
853
|
+
url: '/api/notifications';
|
854
|
+
};
|
855
|
+
|
856
|
+
export declare type GetNotificationsResponse = ArrayResponse<Notification_2>;
|
857
|
+
|
858
|
+
/**
|
859
|
+
* Get project
|
860
|
+
* 'GET /api/projects/:id': 'projects/show'
|
861
|
+
* @param options
|
862
|
+
*/
|
863
|
+
export declare const getProject: <ThrowOnError extends boolean = false>(options: Options<GetProjectRequest, ThrowOnError>) => RequestResult<GetProjectResponse, HttpError, ThrowOnError>;
|
864
|
+
|
865
|
+
export declare type GetProjectRequest = {
|
866
|
+
body?: never;
|
867
|
+
path: {
|
868
|
+
id: string;
|
869
|
+
};
|
870
|
+
query?: never;
|
871
|
+
url: '/api/projects/{id}';
|
872
|
+
};
|
873
|
+
|
874
|
+
export declare type GetProjectResponse = SingleResponse<Project>;
|
875
|
+
|
876
|
+
/**
|
877
|
+
* Get projects
|
878
|
+
* 'GET /api/projects': 'projects/index'
|
879
|
+
* @param options
|
880
|
+
*/
|
881
|
+
export declare const getProjects: <ThrowOnError extends boolean = false>(options: Options<GetProjectsRequest, ThrowOnError>) => RequestResult<GetProjectsResponse, HttpError, ThrowOnError>;
|
882
|
+
|
883
|
+
export declare type GetProjectsRequest = {
|
884
|
+
body?: never;
|
885
|
+
path?: never;
|
886
|
+
query?: never;
|
887
|
+
url: '/api/projects';
|
888
|
+
};
|
889
|
+
|
890
|
+
export declare type GetProjectsResponse = ArrayResponse<Project>;
|
891
|
+
|
892
|
+
/**
|
893
|
+
* Get user
|
894
|
+
* 'GET /api/users/:id': 'users/show'
|
895
|
+
* @param options
|
896
|
+
*/
|
897
|
+
export declare const getUser: <ThrowOnError extends boolean = false>(options: Options<GetUserRequest, ThrowOnError>) => RequestResult<GetUserResponse, HttpError, ThrowOnError>;
|
898
|
+
|
899
|
+
export declare type GetUserRequest = {
|
900
|
+
path: {
|
901
|
+
id: string;
|
902
|
+
};
|
903
|
+
body?: never;
|
904
|
+
query?: never;
|
905
|
+
url: '/api/users/{id}';
|
906
|
+
};
|
907
|
+
|
908
|
+
export declare type GetUserResponse = SingleResponse<User>;
|
909
|
+
|
910
|
+
/**
|
911
|
+
* Get users
|
912
|
+
* 'GET /api/users': 'users/index'
|
913
|
+
* @param options
|
914
|
+
*/
|
915
|
+
export declare const getUsers: <ThrowOnError extends boolean = false>(options?: Options<GetUsersRequest, ThrowOnError>) => RequestResult<GetUsersResponse, HttpError, ThrowOnError>;
|
916
|
+
|
917
|
+
export declare type GetUsersRequest = {
|
918
|
+
body?: never;
|
919
|
+
path?: never;
|
920
|
+
query?: never;
|
921
|
+
url: '/api/users';
|
922
|
+
};
|
923
|
+
|
924
|
+
export declare type GetUsersResponse = ArrayResponse<User>;
|
925
|
+
|
926
|
+
/**
|
927
|
+
* Most errors are roughly the same, so they are types singly
|
928
|
+
*/
|
929
|
+
export declare type HttpError = {
|
930
|
+
code: 'E_MISSING_OR_INVALID_PARAMS' | 'E_UNAUTHORIZED' | 'E_NOT_FOUND' | 'E_CONFLICT' | 'E_UNPROCESSABLE_ENTITY';
|
931
|
+
message?: string;
|
932
|
+
problems?: string[];
|
933
|
+
};
|
934
|
+
|
935
|
+
declare type Image_2 = {
|
936
|
+
width: number;
|
937
|
+
height: number;
|
938
|
+
};
|
939
|
+
export { Image_2 as Image }
|
940
|
+
|
941
|
+
export declare type Include = {
|
942
|
+
users: User[];
|
943
|
+
boardMemberships: BoardMembership[];
|
944
|
+
labels: Label[];
|
945
|
+
lists: List[];
|
946
|
+
cards: Card[];
|
947
|
+
cardMemberships: Card[];
|
948
|
+
cardLabels: Label[];
|
949
|
+
tasks: Action[];
|
950
|
+
boards: Board[];
|
951
|
+
actions: Action[];
|
952
|
+
projectManagers: ProjectManager[];
|
953
|
+
};
|
954
|
+
|
955
|
+
/**
|
956
|
+
* Labels
|
957
|
+
*/
|
958
|
+
export declare type Label = {
|
959
|
+
id: string;
|
960
|
+
createdAt: Date;
|
961
|
+
updatedAt?: Date;
|
962
|
+
position: number;
|
963
|
+
name: string;
|
964
|
+
color: LabelColor;
|
965
|
+
boardId: string;
|
966
|
+
};
|
967
|
+
|
968
|
+
export declare type LabelColor = 'berry-red' | 'pumpkin-orange' | 'lagoon-blue' | 'pink-tulip' | 'light-mud' | 'orange-peel' | 'bright-moss' | 'antique-blue' | 'dark-granite' | 'lagune-blue' | 'sunny-grass' | 'morning-sky' | 'light-orange' | 'midnight-blue' | 'tank-green' | 'gun-metal' | 'wet-moss' | 'red-burgundy' | 'light-concrete' | 'apricot-red' | 'desert-sand' | 'navy-blue' | 'egg-yellow' | 'coral-green' | 'light-cocoa';
|
969
|
+
|
970
|
+
export declare type Language = 'ar-YE' | 'bg-BG' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'en-GB' | 'en-US' | 'es-ES' | 'fa-IR' | 'fr-FR' | 'hu-HU' | 'id-ID' | 'it-IT' | 'ja-JP' | 'ko-KR' | 'nl-NL' | 'pl-PL' | 'pt-BR' | 'ro-RO' | 'ru-RU' | 'sk-SK' | 'sv-SE' | 'tr-TR' | 'uk-UA' | 'uz-UZ' | 'zh-CN' | 'zh-TW';
|
971
|
+
|
972
|
+
/**
|
973
|
+
* Lists
|
974
|
+
*/
|
975
|
+
export declare type List = {
|
976
|
+
id: string;
|
977
|
+
createdAt: Date;
|
978
|
+
updatedAt?: Date;
|
979
|
+
position: number;
|
980
|
+
name: string;
|
981
|
+
boardId: string;
|
982
|
+
};
|
983
|
+
|
984
|
+
/**
|
985
|
+
* Notifications
|
986
|
+
*/
|
987
|
+
declare type Notification_2 = {
|
988
|
+
id: string;
|
989
|
+
createdAt: Date;
|
990
|
+
updatedAt?: Date;
|
991
|
+
isRead: boolean;
|
992
|
+
userId: string;
|
993
|
+
cardId: string;
|
994
|
+
actionId: string;
|
995
|
+
};
|
996
|
+
export { Notification_2 as Notification }
|
997
|
+
|
998
|
+
export declare type Oidc = {
|
999
|
+
oidc: string;
|
1000
|
+
};
|
1001
|
+
|
1002
|
+
export declare type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options_2<TData, ThrowOnError> & {
|
1003
|
+
client?: Client;
|
1004
|
+
meta?: Record<string, unknown>;
|
1005
|
+
};
|
1006
|
+
|
1007
|
+
/**
|
1008
|
+
* Projects
|
1009
|
+
*/
|
1010
|
+
export declare type Project = {
|
1011
|
+
id: string;
|
1012
|
+
createdAt: Date;
|
1013
|
+
updatedAt?: Date;
|
1014
|
+
name: string;
|
1015
|
+
background?: Background;
|
1016
|
+
backgroundImage?: BackgroundImage;
|
1017
|
+
};
|
1018
|
+
|
1019
|
+
export declare type ProjectManager = {
|
1020
|
+
id: string;
|
1021
|
+
createdAt: Date;
|
1022
|
+
updatedAt: Date;
|
1023
|
+
projectId: string;
|
1024
|
+
userId: string;
|
1025
|
+
};
|
1026
|
+
|
1027
|
+
export declare type Role = 'editor' | 'viewer';
|
1028
|
+
|
1029
|
+
/**
|
1030
|
+
* Responses are given as single or array, and can include other data types
|
1031
|
+
*/
|
1032
|
+
export declare type SingleResponse<T> = {
|
1033
|
+
item: T;
|
1034
|
+
included?: Partial<Include>;
|
1035
|
+
};
|
1036
|
+
|
1037
|
+
/**
|
1038
|
+
* Sort list
|
1039
|
+
* 'POST /api/lists/:id/sort': 'lists/sort'
|
1040
|
+
* @param options
|
1041
|
+
*/
|
1042
|
+
export declare const sortList: <ThrowOnError extends boolean = false>(options: Options<SortListRequest, ThrowOnError>) => RequestResult<SortListResponse, HttpError, ThrowOnError>;
|
1043
|
+
|
1044
|
+
export declare type SortListRequest = {
|
1045
|
+
body: {
|
1046
|
+
type: SortType;
|
1047
|
+
};
|
1048
|
+
path: {
|
1049
|
+
id: string;
|
1050
|
+
};
|
1051
|
+
query?: never;
|
1052
|
+
url: '/api/lists/{id}/sort';
|
1053
|
+
};
|
1054
|
+
|
1055
|
+
export declare type SortListResponse = SingleResponse<List>;
|
1056
|
+
|
1057
|
+
export declare type SortType = 'name_asc' | 'dueDate_asc' | 'createdAt_asc' | 'createdAt_desc';
|
1058
|
+
|
1059
|
+
export declare type Task = {
|
1060
|
+
id: string;
|
1061
|
+
createdAt: Date;
|
1062
|
+
updatedAt?: Date;
|
1063
|
+
position: number;
|
1064
|
+
name: string;
|
1065
|
+
isCompleted: boolean;
|
1066
|
+
cardId: string;
|
1067
|
+
};
|
1068
|
+
|
1069
|
+
/**
|
1070
|
+
* Delete access token
|
1071
|
+
* 'DELETE /api/access-tokens/me': 'access-tokens/delete'
|
1072
|
+
* @param options
|
1073
|
+
*/
|
1074
|
+
export declare const unauthorize: <ThrowOnError extends boolean = false>(options?: Options<UnauthorizeRequest, ThrowOnError>) => RequestResult<UnauthorizeResponse, HttpError, ThrowOnError>;
|
1075
|
+
|
1076
|
+
export declare type UnauthorizeRequest = {
|
1077
|
+
body?: never;
|
1078
|
+
path?: never;
|
1079
|
+
query?: never;
|
1080
|
+
url: '/api/access-tokens/me';
|
1081
|
+
};
|
1082
|
+
|
1083
|
+
export declare type UnauthorizeResponse = SingleResponse<string>;
|
1084
|
+
|
1085
|
+
/**
|
1086
|
+
* Update attachment
|
1087
|
+
* 'PATCH /api/attachments/:id': 'attachments/update'
|
1088
|
+
* @param options
|
1089
|
+
*/
|
1090
|
+
export declare const updateAttachment: <ThrowOnError extends boolean = false>(options: Options<UpdateAttachmentRequest, ThrowOnError>) => RequestResult<UpdateAttachmentResponse, HttpError, ThrowOnError>;
|
1091
|
+
|
1092
|
+
export declare type UpdateAttachmentRequest = {
|
1093
|
+
body: Partial<Omit<Attachment, 'createdAt' | 'updatedAt' | 'id' | 'cardId' | 'createUserId' | 'url' | 'coverUrl'>>;
|
1094
|
+
path: {
|
1095
|
+
id: string;
|
1096
|
+
};
|
1097
|
+
query?: never;
|
1098
|
+
url: '/api/attachments/{id}';
|
1099
|
+
};
|
1100
|
+
|
1101
|
+
export declare type UpdateAttachmentResponse = SingleResponse<Attachment>;
|
1102
|
+
|
1103
|
+
/**
|
1104
|
+
* Update board
|
1105
|
+
* 'PATCH /api/boards/:id': 'boards/update'
|
1106
|
+
* @param options
|
1107
|
+
*/
|
1108
|
+
export declare const updateBoard: <ThrowOnError extends boolean = false>(options: Options<UpdateBoardRequest, ThrowOnError>) => RequestResult<UpdateBoardResponse, HttpError, ThrowOnError>;
|
1109
|
+
|
1110
|
+
/**
|
1111
|
+
* Update board membership
|
1112
|
+
* 'PATCH /api/board-memberships/:id': 'board-memberships/update'
|
1113
|
+
* @param options
|
1114
|
+
*/
|
1115
|
+
export declare const updateBoardMembership: <ThrowOnError extends boolean = false>(options: Options<UpdateBoardMembershipRequest, ThrowOnError>) => RequestResult<UpdateBoardMembershipResponse, HttpError, ThrowOnError>;
|
1116
|
+
|
1117
|
+
export declare type UpdateBoardMembershipRequest = {
|
1118
|
+
body: {
|
1119
|
+
role: Role;
|
1120
|
+
};
|
1121
|
+
path: {
|
1122
|
+
id: string;
|
1123
|
+
};
|
1124
|
+
query?: never;
|
1125
|
+
url: '/api/board-memberships/{id}';
|
1126
|
+
};
|
1127
|
+
|
1128
|
+
export declare type UpdateBoardMembershipResponse = SingleResponse<BoardMembership>;
|
1129
|
+
|
1130
|
+
export declare type UpdateBoardRequest = {
|
1131
|
+
body: Partial<Omit<Board, 'createdAt' | 'updatedAt' | 'id' | 'projectId'>>;
|
1132
|
+
path: {
|
1133
|
+
id: string;
|
1134
|
+
};
|
1135
|
+
query?: never;
|
1136
|
+
url: '/api/boards/{id}';
|
1137
|
+
};
|
1138
|
+
|
1139
|
+
export declare type UpdateBoardResponse = SingleResponse<Board>;
|
1140
|
+
|
1141
|
+
/**
|
1142
|
+
* Update card
|
1143
|
+
* 'PATCH /api/cards/:id': 'cards/update'
|
1144
|
+
* @param options
|
1145
|
+
*/
|
1146
|
+
export declare const updateCard: <ThrowOnError extends boolean = false>(options: Options<UpdateCardRequest, ThrowOnError>) => RequestResult<UpdateCardResponse, HttpError, ThrowOnError>;
|
1147
|
+
|
1148
|
+
export declare type UpdateCardRequest = {
|
1149
|
+
body: Partial<Omit<Card, 'createdAt' | 'updatedAt' | 'id' | 'creatorUserId' | 'isSubscribed'>>;
|
1150
|
+
path: {
|
1151
|
+
id: string;
|
1152
|
+
};
|
1153
|
+
query?: never;
|
1154
|
+
url: '/api/cards/{id}';
|
1155
|
+
};
|
1156
|
+
|
1157
|
+
export declare type UpdateCardResponse = SingleResponse<Card>;
|
1158
|
+
|
1159
|
+
/**
|
1160
|
+
* Update comment action
|
1161
|
+
* 'PATCH /api/comment-actions/:id': 'comment-actions/update'
|
1162
|
+
* @param options
|
1163
|
+
*/
|
1164
|
+
export declare const updateCommentAction: <ThrowOnError extends boolean = false>(options: Options<UpdateCommentActionRequest, ThrowOnError>) => RequestResult<UpdateCommentActionResponse, HttpError, ThrowOnError>;
|
1165
|
+
|
1166
|
+
export declare type UpdateCommentActionRequest = {
|
1167
|
+
body: {
|
1168
|
+
text: string;
|
1169
|
+
};
|
1170
|
+
path: {
|
1171
|
+
id: string;
|
1172
|
+
};
|
1173
|
+
query?: never;
|
1174
|
+
url: '/api/comment-actions/{id}';
|
1175
|
+
};
|
1176
|
+
|
1177
|
+
export declare type UpdateCommentActionResponse = SingleResponse<Comment_2>;
|
1178
|
+
|
1179
|
+
/**
|
1180
|
+
* Update label
|
1181
|
+
* 'PATCH /api/labels/:id': 'labels/update'
|
1182
|
+
* @param options
|
1183
|
+
*/
|
1184
|
+
export declare const updateLabel: <ThrowOnError extends boolean = false>(options: Options<UpdateLabelRequest, ThrowOnError>) => RequestResult<UpdateLabelResponse, HttpError, ThrowOnError>;
|
1185
|
+
|
1186
|
+
export declare type UpdateLabelRequest = {
|
1187
|
+
body: Partial<Omit<Label, 'createdAt' | 'updatedAt' | 'id' | 'boardId'>>;
|
1188
|
+
path: {
|
1189
|
+
id: string;
|
1190
|
+
};
|
1191
|
+
query?: never;
|
1192
|
+
url: '/api/labels/{id}';
|
1193
|
+
};
|
1194
|
+
|
1195
|
+
export declare type UpdateLabelResponse = SingleResponse<Label>;
|
1196
|
+
|
1197
|
+
/**
|
1198
|
+
* Update list
|
1199
|
+
* 'PATCH /api/lists/:id': 'lists/update'
|
1200
|
+
* @param options
|
1201
|
+
*/
|
1202
|
+
export declare const updateList: <ThrowOnError extends boolean = false>(options: Options<UpdateListRequest, ThrowOnError>) => RequestResult<UpdateListResponse, HttpError, ThrowOnError>;
|
1203
|
+
|
1204
|
+
export declare type UpdateListRequest = {
|
1205
|
+
body: Partial<Omit<List, 'createdAt' | 'updatedAt' | 'id' | 'boardId'>>;
|
1206
|
+
path: {
|
1207
|
+
id: string;
|
1208
|
+
};
|
1209
|
+
query?: never;
|
1210
|
+
url: '/api/lists/{id}';
|
1211
|
+
};
|
1212
|
+
|
1213
|
+
export declare type UpdateListResponse = SingleResponse<List>;
|
1214
|
+
|
1215
|
+
/**
|
1216
|
+
* Update notifications
|
1217
|
+
* 'PATCH /api/notifications/:ids': 'notifications/update'
|
1218
|
+
* @param options
|
1219
|
+
*/
|
1220
|
+
export declare const updateNotifications: <ThrowOnError extends boolean = false>(options: Options<UpdateNotificationsRequest, ThrowOnError>) => RequestResult<UpdateNotificationsResponse, HttpError, ThrowOnError>;
|
1221
|
+
|
1222
|
+
export declare type UpdateNotificationsRequest = {
|
1223
|
+
body: Partial<Omit<Notification_2, 'createdAt' | 'updatedAt' | 'id' | 'cardId' | 'userId' | 'actionId'>>;
|
1224
|
+
path: {
|
1225
|
+
ids: string[];
|
1226
|
+
};
|
1227
|
+
query?: never;
|
1228
|
+
url: '/api/notifications/{ids}';
|
1229
|
+
};
|
1230
|
+
|
1231
|
+
export declare type UpdateNotificationsResponse = ArrayResponse<Notification_2>;
|
1232
|
+
|
1233
|
+
/**
|
1234
|
+
* Update project
|
1235
|
+
* 'PATCH /api/projects/:id': 'projects/update'
|
1236
|
+
* @param options
|
1237
|
+
*/
|
1238
|
+
export declare const updateProject: <ThrowOnError extends boolean = false>(options: Options<UpdateProjectRequest, ThrowOnError>) => RequestResult<UpdateProjectResponse, HttpError, ThrowOnError>;
|
1239
|
+
|
1240
|
+
/**
|
1241
|
+
* Update project background image
|
1242
|
+
* 'POST /api/projects/:id/background-image': 'projects/update-background-image'
|
1243
|
+
* @param options
|
1244
|
+
*/
|
1245
|
+
export declare const updateProjectBackgroundImage: <ThrowOnError extends boolean = false>(options: Options<UpdateProjectBackgroundImageRequest, ThrowOnError>) => RequestResult<UpdateProjectBackgroundImageResponse, HttpError, ThrowOnError>;
|
1246
|
+
|
1247
|
+
export declare type UpdateProjectBackgroundImageRequest = {
|
1248
|
+
body: {
|
1249
|
+
file: File;
|
1250
|
+
};
|
1251
|
+
path: {
|
1252
|
+
id: string;
|
1253
|
+
};
|
1254
|
+
query?: never;
|
1255
|
+
url: '/api/projects/{id}/background-image';
|
1256
|
+
};
|
1257
|
+
|
1258
|
+
export declare type UpdateProjectBackgroundImageResponse = SingleResponse<Project>;
|
1259
|
+
|
1260
|
+
export declare type UpdateProjectRequest = {
|
1261
|
+
body: Partial<Omit<Project, 'createdAt' | 'updatedAt' | 'id' | 'backgroundImage'>>;
|
1262
|
+
path: {
|
1263
|
+
id: string;
|
1264
|
+
};
|
1265
|
+
query?: never;
|
1266
|
+
url: '/api/projects/{id}';
|
1267
|
+
};
|
1268
|
+
|
1269
|
+
export declare type UpdateProjectResponse = SingleResponse<Project>;
|
1270
|
+
|
1271
|
+
/**
|
1272
|
+
* Update task
|
1273
|
+
* 'PATCH /api/tasks/:id': 'tasks/update'
|
1274
|
+
* @param options
|
1275
|
+
*/
|
1276
|
+
export declare const updateTask: <ThrowOnError extends boolean = false>(options: Options<UpdateTaskRequest, ThrowOnError>) => RequestResult<UpdateTaskResponse, HttpError, ThrowOnError>;
|
1277
|
+
|
1278
|
+
export declare type UpdateTaskRequest = {
|
1279
|
+
body: Partial<Omit<Task, 'createdAt' | 'updatedAt' | 'id' | 'cardId'>>;
|
1280
|
+
path: {
|
1281
|
+
id: string;
|
1282
|
+
};
|
1283
|
+
query?: never;
|
1284
|
+
url: '/api/tasks/{id}';
|
1285
|
+
};
|
1286
|
+
|
1287
|
+
export declare type UpdateTaskResponse = SingleResponse<Task>;
|
1288
|
+
|
1289
|
+
/**
|
1290
|
+
* Update user
|
1291
|
+
* 'PATCH /api/users/:id': 'users/update'
|
1292
|
+
* @param options
|
1293
|
+
*/
|
1294
|
+
export declare const updateUser: <ThrowOnError extends boolean = false>(options: Options<UpdateUserRequest, ThrowOnError>) => RequestResult<UpdateUserResponse, HttpError, ThrowOnError>;
|
1295
|
+
|
1296
|
+
/**
|
1297
|
+
* Update user avatar
|
1298
|
+
* 'POST /api/users/:id/avatar': 'users/update-avatar'
|
1299
|
+
* @param options
|
1300
|
+
*/
|
1301
|
+
export declare const updateUserAvatar: <ThrowOnError extends boolean = false>(options: Options<UpdateUserAvatarRequest, ThrowOnError>) => RequestResult<UpdateUserAvatarResponse, HttpError, ThrowOnError>;
|
1302
|
+
|
1303
|
+
export declare type UpdateUserAvatarRequest = {
|
1304
|
+
body: {
|
1305
|
+
file: File;
|
1306
|
+
};
|
1307
|
+
path: {
|
1308
|
+
id: string;
|
1309
|
+
};
|
1310
|
+
query?: never;
|
1311
|
+
url: '/api/users/{id}/avatar';
|
1312
|
+
};
|
1313
|
+
|
1314
|
+
export declare type UpdateUserAvatarResponse = SingleResponse<User>;
|
1315
|
+
|
1316
|
+
/**
|
1317
|
+
* Update user email
|
1318
|
+
* 'PATCH /api/users/:id/email': 'users/update-email'
|
1319
|
+
* @param options
|
1320
|
+
*/
|
1321
|
+
export declare const updateUserEmail: <ThrowOnError extends boolean = false>(options: Options<UpdateUserEmailRequest, ThrowOnError>) => RequestResult<UpdateUserEmailResponse, HttpError, ThrowOnError>;
|
1322
|
+
|
1323
|
+
export declare type UpdateUserEmailRequest = {
|
1324
|
+
body: {
|
1325
|
+
email: string;
|
1326
|
+
};
|
1327
|
+
path: {
|
1328
|
+
id: string;
|
1329
|
+
};
|
1330
|
+
query?: never;
|
1331
|
+
url: '/api/users/{id}/email';
|
1332
|
+
};
|
1333
|
+
|
1334
|
+
export declare type UpdateUserEmailResponse = SingleResponse<User>;
|
1335
|
+
|
1336
|
+
/**
|
1337
|
+
* Update user password
|
1338
|
+
* 'PATCH /api/users/:id/password': 'users/update-password'
|
1339
|
+
* @param options
|
1340
|
+
*/
|
1341
|
+
export declare const updateUserPassword: <ThrowOnError extends boolean = false>(options: Options<UpdateUserPasswordRequest, ThrowOnError>) => RequestResult<UpdateUserPasswordResponse, HttpError, ThrowOnError>;
|
1342
|
+
|
1343
|
+
export declare type UpdateUserPasswordRequest = {
|
1344
|
+
body: {
|
1345
|
+
password: string;
|
1346
|
+
};
|
1347
|
+
path: {
|
1348
|
+
id: string;
|
1349
|
+
};
|
1350
|
+
query?: never;
|
1351
|
+
url: '/api/users/{id}/password';
|
1352
|
+
};
|
1353
|
+
|
1354
|
+
export declare type UpdateUserPasswordResponse = SingleResponse<User>;
|
1355
|
+
|
1356
|
+
export declare type UpdateUserRequest = {
|
1357
|
+
body: Partial<Omit<User, 'updatedAt' | 'createdAt' | 'deletedAt' | 'username' | 'email' | 'avatarUrl'>>;
|
1358
|
+
path: {
|
1359
|
+
id: string;
|
1360
|
+
};
|
1361
|
+
query?: never;
|
1362
|
+
url: '/api/users/{id}/email';
|
1363
|
+
};
|
1364
|
+
|
1365
|
+
export declare type UpdateUserResponse = SingleResponse<User>;
|
1366
|
+
|
1367
|
+
/**
|
1368
|
+
* Update user username
|
1369
|
+
* 'PATCH /api/users/:id/username': 'users/update-username'
|
1370
|
+
* @param options
|
1371
|
+
*/
|
1372
|
+
export declare const updateUserUsername: <ThrowOnError extends boolean = false>(options: Options<UpdateUserUsernameRequest, ThrowOnError>) => RequestResult<UpdateUserUsernameResponse, HttpError, ThrowOnError>;
|
1373
|
+
|
1374
|
+
export declare type UpdateUserUsernameRequest = {
|
1375
|
+
body: {
|
1376
|
+
username: string;
|
1377
|
+
};
|
1378
|
+
path: {
|
1379
|
+
id: string;
|
1380
|
+
};
|
1381
|
+
query?: never;
|
1382
|
+
url: '/api/users/{id}/username';
|
1383
|
+
};
|
1384
|
+
|
1385
|
+
export declare type UpdateUserUsernameResponse = SingleResponse<User>;
|
1386
|
+
|
1387
|
+
/**
|
1388
|
+
* Users
|
1389
|
+
*/
|
1390
|
+
export declare type User = {
|
1391
|
+
id: string;
|
1392
|
+
email: string;
|
1393
|
+
isAdmin: boolean;
|
1394
|
+
name: string;
|
1395
|
+
username: string;
|
1396
|
+
phone?: string;
|
1397
|
+
organization?: string;
|
1398
|
+
language?: Language;
|
1399
|
+
subscribeToOwnCards: boolean;
|
1400
|
+
avatarUrl?: string;
|
1401
|
+
createdAt: Date;
|
1402
|
+
updatedAt?: Date;
|
1403
|
+
deletedAt?: Date;
|
1404
|
+
};
|
1405
|
+
|
1406
|
+
export { }
|