@hexlet/frontend-blog-server 0.0.0-stage → 1.0.0
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/README.md +48 -2
- package/contract/main.tsp +286 -0
- package/contract/openapi.yaml +781 -0
- package/dist/bin/cli.d.ts +2 -0
- package/dist/bin/cli.js +63 -0
- package/dist/src/app.d.ts +6 -0
- package/dist/src/app.js +256 -0
- package/dist/src/generated/api.d.ts +911 -0
- package/dist/src/generated/api.js +5 -0
- package/dist/src/seed.d.ts +9 -0
- package/dist/src/seed.js +189 -0
- package/dist/src/state.d.ts +58 -0
- package/dist/src/state.js +81 -0
- package/package.json +50 -4
|
@@ -0,0 +1,911 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/api/articles": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/** @description Лента, новые статьи первыми. */
|
|
14
|
+
get: operations["Articles_list"];
|
|
15
|
+
put?: never;
|
|
16
|
+
post: operations["Articles_create"];
|
|
17
|
+
delete?: never;
|
|
18
|
+
options?: never;
|
|
19
|
+
head?: never;
|
|
20
|
+
patch?: never;
|
|
21
|
+
trace?: never;
|
|
22
|
+
};
|
|
23
|
+
"/api/articles/{id}": {
|
|
24
|
+
parameters: {
|
|
25
|
+
query?: never;
|
|
26
|
+
header?: never;
|
|
27
|
+
path?: never;
|
|
28
|
+
cookie?: never;
|
|
29
|
+
};
|
|
30
|
+
/** @description С токеном поле liked показывает лайк текущего пользователя. */
|
|
31
|
+
get: operations["Articles_read"];
|
|
32
|
+
put?: never;
|
|
33
|
+
post?: never;
|
|
34
|
+
/** @description Удаление вместе с комментариями и лайками. Доступно только автору. */
|
|
35
|
+
delete: operations["Articles_remove"];
|
|
36
|
+
options?: never;
|
|
37
|
+
head?: never;
|
|
38
|
+
/** @description Правка. Доступна только автору. */
|
|
39
|
+
patch: operations["Articles_update"];
|
|
40
|
+
trace?: never;
|
|
41
|
+
};
|
|
42
|
+
"/api/articles/{id}/comments": {
|
|
43
|
+
parameters: {
|
|
44
|
+
query?: never;
|
|
45
|
+
header?: never;
|
|
46
|
+
path?: never;
|
|
47
|
+
cookie?: never;
|
|
48
|
+
};
|
|
49
|
+
get: operations["Articles_comments"];
|
|
50
|
+
put?: never;
|
|
51
|
+
post: operations["Articles_comment"];
|
|
52
|
+
delete?: never;
|
|
53
|
+
options?: never;
|
|
54
|
+
head?: never;
|
|
55
|
+
patch?: never;
|
|
56
|
+
trace?: never;
|
|
57
|
+
};
|
|
58
|
+
"/api/articles/{id}/like": {
|
|
59
|
+
parameters: {
|
|
60
|
+
query?: never;
|
|
61
|
+
header?: never;
|
|
62
|
+
path?: never;
|
|
63
|
+
cookie?: never;
|
|
64
|
+
};
|
|
65
|
+
get?: never;
|
|
66
|
+
/** @description Поставить лайк. Повторный вызов ничего не меняет. */
|
|
67
|
+
put: operations["Articles_like"];
|
|
68
|
+
post?: never;
|
|
69
|
+
/** @description Снять лайк. Повторный вызов ничего не меняет. */
|
|
70
|
+
delete: operations["Articles_unlike"];
|
|
71
|
+
options?: never;
|
|
72
|
+
head?: never;
|
|
73
|
+
patch?: never;
|
|
74
|
+
trace?: never;
|
|
75
|
+
};
|
|
76
|
+
"/api/categories": {
|
|
77
|
+
parameters: {
|
|
78
|
+
query?: never;
|
|
79
|
+
header?: never;
|
|
80
|
+
path?: never;
|
|
81
|
+
cookie?: never;
|
|
82
|
+
};
|
|
83
|
+
get: operations["Categories_list"];
|
|
84
|
+
put?: never;
|
|
85
|
+
post?: never;
|
|
86
|
+
delete?: never;
|
|
87
|
+
options?: never;
|
|
88
|
+
head?: never;
|
|
89
|
+
patch?: never;
|
|
90
|
+
trace?: never;
|
|
91
|
+
};
|
|
92
|
+
"/api/health": {
|
|
93
|
+
parameters: {
|
|
94
|
+
query?: never;
|
|
95
|
+
header?: never;
|
|
96
|
+
path?: never;
|
|
97
|
+
cookie?: never;
|
|
98
|
+
};
|
|
99
|
+
get: operations["Health_check"];
|
|
100
|
+
put?: never;
|
|
101
|
+
post?: never;
|
|
102
|
+
delete?: never;
|
|
103
|
+
options?: never;
|
|
104
|
+
head?: never;
|
|
105
|
+
patch?: never;
|
|
106
|
+
trace?: never;
|
|
107
|
+
};
|
|
108
|
+
"/api/me": {
|
|
109
|
+
parameters: {
|
|
110
|
+
query?: never;
|
|
111
|
+
header?: never;
|
|
112
|
+
path?: never;
|
|
113
|
+
cookie?: never;
|
|
114
|
+
};
|
|
115
|
+
/** @description Текущий пользователь по токену. */
|
|
116
|
+
get: operations["Me_me"];
|
|
117
|
+
put?: never;
|
|
118
|
+
post?: never;
|
|
119
|
+
delete?: never;
|
|
120
|
+
options?: never;
|
|
121
|
+
head?: never;
|
|
122
|
+
patch?: never;
|
|
123
|
+
trace?: never;
|
|
124
|
+
};
|
|
125
|
+
"/api/session": {
|
|
126
|
+
parameters: {
|
|
127
|
+
query?: never;
|
|
128
|
+
header?: never;
|
|
129
|
+
path?: never;
|
|
130
|
+
cookie?: never;
|
|
131
|
+
};
|
|
132
|
+
get?: never;
|
|
133
|
+
put?: never;
|
|
134
|
+
/** @description Вход. */
|
|
135
|
+
post: operations["SessionRoutes_login"];
|
|
136
|
+
delete?: never;
|
|
137
|
+
options?: never;
|
|
138
|
+
head?: never;
|
|
139
|
+
patch?: never;
|
|
140
|
+
trace?: never;
|
|
141
|
+
};
|
|
142
|
+
"/api/users": {
|
|
143
|
+
parameters: {
|
|
144
|
+
query?: never;
|
|
145
|
+
header?: never;
|
|
146
|
+
path?: never;
|
|
147
|
+
cookie?: never;
|
|
148
|
+
};
|
|
149
|
+
get?: never;
|
|
150
|
+
put?: never;
|
|
151
|
+
/** @description Регистрация. Сразу возвращает сессию. */
|
|
152
|
+
post: operations["Users_signup"];
|
|
153
|
+
delete?: never;
|
|
154
|
+
options?: never;
|
|
155
|
+
head?: never;
|
|
156
|
+
patch?: never;
|
|
157
|
+
trace?: never;
|
|
158
|
+
};
|
|
159
|
+
"/api/users/{username}": {
|
|
160
|
+
parameters: {
|
|
161
|
+
query?: never;
|
|
162
|
+
header?: never;
|
|
163
|
+
path?: never;
|
|
164
|
+
cookie?: never;
|
|
165
|
+
};
|
|
166
|
+
/** @description Профиль автора по имени. */
|
|
167
|
+
get: operations["Users_profile"];
|
|
168
|
+
put?: never;
|
|
169
|
+
post?: never;
|
|
170
|
+
delete?: never;
|
|
171
|
+
options?: never;
|
|
172
|
+
head?: never;
|
|
173
|
+
patch?: never;
|
|
174
|
+
trace?: never;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
export type webhooks = Record<string, never>;
|
|
178
|
+
export interface components {
|
|
179
|
+
schemas: {
|
|
180
|
+
/**
|
|
181
|
+
* @description Ошибка API. code — машинный код без текста на конкретном языке, сообщение для
|
|
182
|
+
* пользователя фронтенд берёт из своих переводов по коду. message — подсказка
|
|
183
|
+
* разработчику на английском.
|
|
184
|
+
* @example {
|
|
185
|
+
* "code": "validation_error",
|
|
186
|
+
* "message": "title must not be empty"
|
|
187
|
+
* }
|
|
188
|
+
*/
|
|
189
|
+
ApiError: {
|
|
190
|
+
/** @enum {string} */
|
|
191
|
+
code: "validation_error" | "unauthorized" | "forbidden" | "not_found" | "username_taken" | "invalid_credentials";
|
|
192
|
+
message: string;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* @description Статья целиком. body — исходный Markdown, его рендерит фронтенд.
|
|
196
|
+
* liked — поставил ли лайк текущий пользователь; для гостя всегда false.
|
|
197
|
+
*/
|
|
198
|
+
Article: {
|
|
199
|
+
/** Format: int32 */
|
|
200
|
+
id: number;
|
|
201
|
+
title: string;
|
|
202
|
+
excerpt: string;
|
|
203
|
+
category: components["schemas"]["Category"];
|
|
204
|
+
author: components["schemas"]["User"];
|
|
205
|
+
/** Format: date-time */
|
|
206
|
+
createdAt: string;
|
|
207
|
+
/** Format: int32 */
|
|
208
|
+
likesCount: number;
|
|
209
|
+
/** Format: int32 */
|
|
210
|
+
commentsCount: number;
|
|
211
|
+
body: string;
|
|
212
|
+
/** Format: date-time */
|
|
213
|
+
updatedAt: string;
|
|
214
|
+
liked: boolean;
|
|
215
|
+
};
|
|
216
|
+
/** @description Данные для создания статьи. title: 1–120 символов, body: непустой. */
|
|
217
|
+
ArticleInput: {
|
|
218
|
+
title: string;
|
|
219
|
+
body: string;
|
|
220
|
+
/** Format: int32 */
|
|
221
|
+
categoryId: number;
|
|
222
|
+
};
|
|
223
|
+
/** @description Страница ленты. */
|
|
224
|
+
ArticlePage: {
|
|
225
|
+
items: components["schemas"]["ArticleSummary"][];
|
|
226
|
+
/** Format: int32 */
|
|
227
|
+
page: number;
|
|
228
|
+
/** Format: int32 */
|
|
229
|
+
perPage: number;
|
|
230
|
+
/** Format: int32 */
|
|
231
|
+
total: number;
|
|
232
|
+
};
|
|
233
|
+
/** @description Правка статьи: передаются только меняющиеся поля. */
|
|
234
|
+
ArticlePatch: {
|
|
235
|
+
title?: string;
|
|
236
|
+
body?: string;
|
|
237
|
+
/** Format: int32 */
|
|
238
|
+
categoryId?: number;
|
|
239
|
+
};
|
|
240
|
+
/** @description Статья в ленте. body в ленте не приходит, только excerpt — начало текста без разметки Markdown. */
|
|
241
|
+
ArticleSummary: {
|
|
242
|
+
/** Format: int32 */
|
|
243
|
+
id: number;
|
|
244
|
+
title: string;
|
|
245
|
+
excerpt: string;
|
|
246
|
+
category: components["schemas"]["Category"];
|
|
247
|
+
author: components["schemas"]["User"];
|
|
248
|
+
/** Format: date-time */
|
|
249
|
+
createdAt: string;
|
|
250
|
+
/** Format: int32 */
|
|
251
|
+
likesCount: number;
|
|
252
|
+
/** Format: int32 */
|
|
253
|
+
commentsCount: number;
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* @description Категория. Список статический и задаётся сидом. slug стабилен и годится для URL и
|
|
257
|
+
* ключей перевода, name — название по-английски.
|
|
258
|
+
* @example {
|
|
259
|
+
* "id": 1,
|
|
260
|
+
* "slug": "frontend",
|
|
261
|
+
* "name": "Frontend"
|
|
262
|
+
* }
|
|
263
|
+
*/
|
|
264
|
+
Category: {
|
|
265
|
+
/** Format: int32 */
|
|
266
|
+
id: number;
|
|
267
|
+
slug: string;
|
|
268
|
+
name: string;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* @description Комментарий. Список приходит плоским, по возрастанию createdAt; дерево фронтенд
|
|
272
|
+
* собирает сам по parentId. parentId = null у ответа на саму статью.
|
|
273
|
+
*/
|
|
274
|
+
Comment: {
|
|
275
|
+
/** Format: int32 */
|
|
276
|
+
id: number;
|
|
277
|
+
body: string;
|
|
278
|
+
/** Format: int32 */
|
|
279
|
+
parentId: number | null;
|
|
280
|
+
author: components["schemas"]["User"];
|
|
281
|
+
/** Format: date-time */
|
|
282
|
+
createdAt: string;
|
|
283
|
+
};
|
|
284
|
+
/** @description Новый комментарий. parentId — комментарий той же статьи, на который это ответ. */
|
|
285
|
+
CommentInput: {
|
|
286
|
+
body: string;
|
|
287
|
+
/** Format: int32 */
|
|
288
|
+
parentId?: number | null;
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* @description Логин и пароль. username: 3–20 символов из латиницы, цифр, _ и -; password: от 6 символов.
|
|
292
|
+
* @example {
|
|
293
|
+
* "username": "alice",
|
|
294
|
+
* "password": "password"
|
|
295
|
+
* }
|
|
296
|
+
*/
|
|
297
|
+
Credentials: {
|
|
298
|
+
username: string;
|
|
299
|
+
password: string;
|
|
300
|
+
};
|
|
301
|
+
/** @description Состояние лайка после изменения. */
|
|
302
|
+
LikeState: {
|
|
303
|
+
liked: boolean;
|
|
304
|
+
/** Format: int32 */
|
|
305
|
+
likesCount: number;
|
|
306
|
+
};
|
|
307
|
+
/** @description Профиль автора. */
|
|
308
|
+
Profile: {
|
|
309
|
+
/** Format: int32 */
|
|
310
|
+
id: number;
|
|
311
|
+
username: string;
|
|
312
|
+
/** Format: int32 */
|
|
313
|
+
articlesCount: number;
|
|
314
|
+
};
|
|
315
|
+
/** @description Ответ на вход и регистрацию. token передаётся в заголовке Authorization: Bearer <token>. */
|
|
316
|
+
Session: {
|
|
317
|
+
token: string;
|
|
318
|
+
user: components["schemas"]["User"];
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* @description Публичные данные пользователя.
|
|
322
|
+
* @example {
|
|
323
|
+
* "id": 1,
|
|
324
|
+
* "username": "alice"
|
|
325
|
+
* }
|
|
326
|
+
*/
|
|
327
|
+
User: {
|
|
328
|
+
/** Format: int32 */
|
|
329
|
+
id: number;
|
|
330
|
+
username: string;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
responses: never;
|
|
334
|
+
parameters: never;
|
|
335
|
+
requestBodies: never;
|
|
336
|
+
headers: never;
|
|
337
|
+
pathItems: never;
|
|
338
|
+
}
|
|
339
|
+
export type $defs = Record<string, never>;
|
|
340
|
+
export interface operations {
|
|
341
|
+
Articles_list: {
|
|
342
|
+
parameters: {
|
|
343
|
+
query?: {
|
|
344
|
+
page?: number;
|
|
345
|
+
/** @description От 1 до 50. */
|
|
346
|
+
perPage?: number;
|
|
347
|
+
/** @description slug категории. */
|
|
348
|
+
category?: string;
|
|
349
|
+
/** @description username автора. */
|
|
350
|
+
author?: string;
|
|
351
|
+
};
|
|
352
|
+
header?: never;
|
|
353
|
+
path?: never;
|
|
354
|
+
cookie?: never;
|
|
355
|
+
};
|
|
356
|
+
requestBody?: never;
|
|
357
|
+
responses: {
|
|
358
|
+
/** @description The request has succeeded. */
|
|
359
|
+
200: {
|
|
360
|
+
headers: {
|
|
361
|
+
[name: string]: unknown;
|
|
362
|
+
};
|
|
363
|
+
content: {
|
|
364
|
+
"application/json": components["schemas"]["ArticlePage"];
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
/** @description The server could not understand the request due to invalid syntax. */
|
|
368
|
+
400: {
|
|
369
|
+
headers: {
|
|
370
|
+
[name: string]: unknown;
|
|
371
|
+
};
|
|
372
|
+
content: {
|
|
373
|
+
"application/json": components["schemas"]["ApiError"];
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
Articles_create: {
|
|
379
|
+
parameters: {
|
|
380
|
+
query?: never;
|
|
381
|
+
header?: never;
|
|
382
|
+
path?: never;
|
|
383
|
+
cookie?: never;
|
|
384
|
+
};
|
|
385
|
+
requestBody: {
|
|
386
|
+
content: {
|
|
387
|
+
"application/json": components["schemas"]["ArticleInput"];
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
responses: {
|
|
391
|
+
/** @description The request has succeeded and a new resource has been created as a result. */
|
|
392
|
+
201: {
|
|
393
|
+
headers: {
|
|
394
|
+
[name: string]: unknown;
|
|
395
|
+
};
|
|
396
|
+
content: {
|
|
397
|
+
"application/json": components["schemas"]["Article"];
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
/** @description The server could not understand the request due to invalid syntax. */
|
|
401
|
+
400: {
|
|
402
|
+
headers: {
|
|
403
|
+
[name: string]: unknown;
|
|
404
|
+
};
|
|
405
|
+
content: {
|
|
406
|
+
"application/json": components["schemas"]["ApiError"];
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
/** @description Access is unauthorized. */
|
|
410
|
+
401: {
|
|
411
|
+
headers: {
|
|
412
|
+
[name: string]: unknown;
|
|
413
|
+
};
|
|
414
|
+
content: {
|
|
415
|
+
"application/json": components["schemas"]["ApiError"];
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
Articles_read: {
|
|
421
|
+
parameters: {
|
|
422
|
+
query?: never;
|
|
423
|
+
header?: never;
|
|
424
|
+
path: {
|
|
425
|
+
id: number;
|
|
426
|
+
};
|
|
427
|
+
cookie?: never;
|
|
428
|
+
};
|
|
429
|
+
requestBody?: never;
|
|
430
|
+
responses: {
|
|
431
|
+
/** @description The request has succeeded. */
|
|
432
|
+
200: {
|
|
433
|
+
headers: {
|
|
434
|
+
[name: string]: unknown;
|
|
435
|
+
};
|
|
436
|
+
content: {
|
|
437
|
+
"application/json": components["schemas"]["Article"];
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
/** @description The server cannot find the requested resource. */
|
|
441
|
+
404: {
|
|
442
|
+
headers: {
|
|
443
|
+
[name: string]: unknown;
|
|
444
|
+
};
|
|
445
|
+
content: {
|
|
446
|
+
"application/json": components["schemas"]["ApiError"];
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
Articles_remove: {
|
|
452
|
+
parameters: {
|
|
453
|
+
query?: never;
|
|
454
|
+
header?: never;
|
|
455
|
+
path: {
|
|
456
|
+
id: number;
|
|
457
|
+
};
|
|
458
|
+
cookie?: never;
|
|
459
|
+
};
|
|
460
|
+
requestBody?: never;
|
|
461
|
+
responses: {
|
|
462
|
+
/** @description There is no content to send for this request, but the headers may be useful. */
|
|
463
|
+
204: {
|
|
464
|
+
headers: {
|
|
465
|
+
[name: string]: unknown;
|
|
466
|
+
};
|
|
467
|
+
content?: never;
|
|
468
|
+
};
|
|
469
|
+
/** @description Access is unauthorized. */
|
|
470
|
+
401: {
|
|
471
|
+
headers: {
|
|
472
|
+
[name: string]: unknown;
|
|
473
|
+
};
|
|
474
|
+
content: {
|
|
475
|
+
"application/json": components["schemas"]["ApiError"];
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
/** @description Access is forbidden. */
|
|
479
|
+
403: {
|
|
480
|
+
headers: {
|
|
481
|
+
[name: string]: unknown;
|
|
482
|
+
};
|
|
483
|
+
content: {
|
|
484
|
+
"application/json": components["schemas"]["ApiError"];
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
/** @description The server cannot find the requested resource. */
|
|
488
|
+
404: {
|
|
489
|
+
headers: {
|
|
490
|
+
[name: string]: unknown;
|
|
491
|
+
};
|
|
492
|
+
content: {
|
|
493
|
+
"application/json": components["schemas"]["ApiError"];
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
Articles_update: {
|
|
499
|
+
parameters: {
|
|
500
|
+
query?: never;
|
|
501
|
+
header?: never;
|
|
502
|
+
path: {
|
|
503
|
+
id: number;
|
|
504
|
+
};
|
|
505
|
+
cookie?: never;
|
|
506
|
+
};
|
|
507
|
+
requestBody: {
|
|
508
|
+
content: {
|
|
509
|
+
"application/json": components["schemas"]["ArticlePatch"];
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
responses: {
|
|
513
|
+
/** @description The request has succeeded. */
|
|
514
|
+
200: {
|
|
515
|
+
headers: {
|
|
516
|
+
[name: string]: unknown;
|
|
517
|
+
};
|
|
518
|
+
content: {
|
|
519
|
+
"application/json": components["schemas"]["Article"];
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
/** @description The server could not understand the request due to invalid syntax. */
|
|
523
|
+
400: {
|
|
524
|
+
headers: {
|
|
525
|
+
[name: string]: unknown;
|
|
526
|
+
};
|
|
527
|
+
content: {
|
|
528
|
+
"application/json": components["schemas"]["ApiError"];
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
/** @description Access is unauthorized. */
|
|
532
|
+
401: {
|
|
533
|
+
headers: {
|
|
534
|
+
[name: string]: unknown;
|
|
535
|
+
};
|
|
536
|
+
content: {
|
|
537
|
+
"application/json": components["schemas"]["ApiError"];
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
/** @description Access is forbidden. */
|
|
541
|
+
403: {
|
|
542
|
+
headers: {
|
|
543
|
+
[name: string]: unknown;
|
|
544
|
+
};
|
|
545
|
+
content: {
|
|
546
|
+
"application/json": components["schemas"]["ApiError"];
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
/** @description The server cannot find the requested resource. */
|
|
550
|
+
404: {
|
|
551
|
+
headers: {
|
|
552
|
+
[name: string]: unknown;
|
|
553
|
+
};
|
|
554
|
+
content: {
|
|
555
|
+
"application/json": components["schemas"]["ApiError"];
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
Articles_comments: {
|
|
561
|
+
parameters: {
|
|
562
|
+
query?: never;
|
|
563
|
+
header?: never;
|
|
564
|
+
path: {
|
|
565
|
+
id: number;
|
|
566
|
+
};
|
|
567
|
+
cookie?: never;
|
|
568
|
+
};
|
|
569
|
+
requestBody?: never;
|
|
570
|
+
responses: {
|
|
571
|
+
/** @description The request has succeeded. */
|
|
572
|
+
200: {
|
|
573
|
+
headers: {
|
|
574
|
+
[name: string]: unknown;
|
|
575
|
+
};
|
|
576
|
+
content: {
|
|
577
|
+
"application/json": components["schemas"]["Comment"][];
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
/** @description The server cannot find the requested resource. */
|
|
581
|
+
404: {
|
|
582
|
+
headers: {
|
|
583
|
+
[name: string]: unknown;
|
|
584
|
+
};
|
|
585
|
+
content: {
|
|
586
|
+
"application/json": components["schemas"]["ApiError"];
|
|
587
|
+
};
|
|
588
|
+
};
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
Articles_comment: {
|
|
592
|
+
parameters: {
|
|
593
|
+
query?: never;
|
|
594
|
+
header?: never;
|
|
595
|
+
path: {
|
|
596
|
+
id: number;
|
|
597
|
+
};
|
|
598
|
+
cookie?: never;
|
|
599
|
+
};
|
|
600
|
+
requestBody: {
|
|
601
|
+
content: {
|
|
602
|
+
"application/json": components["schemas"]["CommentInput"];
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
responses: {
|
|
606
|
+
/** @description The request has succeeded and a new resource has been created as a result. */
|
|
607
|
+
201: {
|
|
608
|
+
headers: {
|
|
609
|
+
[name: string]: unknown;
|
|
610
|
+
};
|
|
611
|
+
content: {
|
|
612
|
+
"application/json": components["schemas"]["Comment"];
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
/** @description The server could not understand the request due to invalid syntax. */
|
|
616
|
+
400: {
|
|
617
|
+
headers: {
|
|
618
|
+
[name: string]: unknown;
|
|
619
|
+
};
|
|
620
|
+
content: {
|
|
621
|
+
"application/json": components["schemas"]["ApiError"];
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
/** @description Access is unauthorized. */
|
|
625
|
+
401: {
|
|
626
|
+
headers: {
|
|
627
|
+
[name: string]: unknown;
|
|
628
|
+
};
|
|
629
|
+
content: {
|
|
630
|
+
"application/json": components["schemas"]["ApiError"];
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
/** @description The server cannot find the requested resource. */
|
|
634
|
+
404: {
|
|
635
|
+
headers: {
|
|
636
|
+
[name: string]: unknown;
|
|
637
|
+
};
|
|
638
|
+
content: {
|
|
639
|
+
"application/json": components["schemas"]["ApiError"];
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
};
|
|
643
|
+
};
|
|
644
|
+
Articles_like: {
|
|
645
|
+
parameters: {
|
|
646
|
+
query?: never;
|
|
647
|
+
header?: never;
|
|
648
|
+
path: {
|
|
649
|
+
id: number;
|
|
650
|
+
};
|
|
651
|
+
cookie?: never;
|
|
652
|
+
};
|
|
653
|
+
requestBody?: never;
|
|
654
|
+
responses: {
|
|
655
|
+
/** @description The request has succeeded. */
|
|
656
|
+
200: {
|
|
657
|
+
headers: {
|
|
658
|
+
[name: string]: unknown;
|
|
659
|
+
};
|
|
660
|
+
content: {
|
|
661
|
+
"application/json": components["schemas"]["LikeState"];
|
|
662
|
+
};
|
|
663
|
+
};
|
|
664
|
+
/** @description Access is unauthorized. */
|
|
665
|
+
401: {
|
|
666
|
+
headers: {
|
|
667
|
+
[name: string]: unknown;
|
|
668
|
+
};
|
|
669
|
+
content: {
|
|
670
|
+
"application/json": components["schemas"]["ApiError"];
|
|
671
|
+
};
|
|
672
|
+
};
|
|
673
|
+
/** @description The server cannot find the requested resource. */
|
|
674
|
+
404: {
|
|
675
|
+
headers: {
|
|
676
|
+
[name: string]: unknown;
|
|
677
|
+
};
|
|
678
|
+
content: {
|
|
679
|
+
"application/json": components["schemas"]["ApiError"];
|
|
680
|
+
};
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
Articles_unlike: {
|
|
685
|
+
parameters: {
|
|
686
|
+
query?: never;
|
|
687
|
+
header?: never;
|
|
688
|
+
path: {
|
|
689
|
+
id: number;
|
|
690
|
+
};
|
|
691
|
+
cookie?: never;
|
|
692
|
+
};
|
|
693
|
+
requestBody?: never;
|
|
694
|
+
responses: {
|
|
695
|
+
/** @description The request has succeeded. */
|
|
696
|
+
200: {
|
|
697
|
+
headers: {
|
|
698
|
+
[name: string]: unknown;
|
|
699
|
+
};
|
|
700
|
+
content: {
|
|
701
|
+
"application/json": components["schemas"]["LikeState"];
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
/** @description Access is unauthorized. */
|
|
705
|
+
401: {
|
|
706
|
+
headers: {
|
|
707
|
+
[name: string]: unknown;
|
|
708
|
+
};
|
|
709
|
+
content: {
|
|
710
|
+
"application/json": components["schemas"]["ApiError"];
|
|
711
|
+
};
|
|
712
|
+
};
|
|
713
|
+
/** @description The server cannot find the requested resource. */
|
|
714
|
+
404: {
|
|
715
|
+
headers: {
|
|
716
|
+
[name: string]: unknown;
|
|
717
|
+
};
|
|
718
|
+
content: {
|
|
719
|
+
"application/json": components["schemas"]["ApiError"];
|
|
720
|
+
};
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
Categories_list: {
|
|
725
|
+
parameters: {
|
|
726
|
+
query?: never;
|
|
727
|
+
header?: never;
|
|
728
|
+
path?: never;
|
|
729
|
+
cookie?: never;
|
|
730
|
+
};
|
|
731
|
+
requestBody?: never;
|
|
732
|
+
responses: {
|
|
733
|
+
/** @description The request has succeeded. */
|
|
734
|
+
200: {
|
|
735
|
+
headers: {
|
|
736
|
+
[name: string]: unknown;
|
|
737
|
+
};
|
|
738
|
+
content: {
|
|
739
|
+
"application/json": components["schemas"]["Category"][];
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
};
|
|
744
|
+
Health_check: {
|
|
745
|
+
parameters: {
|
|
746
|
+
query?: never;
|
|
747
|
+
header?: never;
|
|
748
|
+
path?: never;
|
|
749
|
+
cookie?: never;
|
|
750
|
+
};
|
|
751
|
+
requestBody?: never;
|
|
752
|
+
responses: {
|
|
753
|
+
/** @description The request has succeeded. */
|
|
754
|
+
200: {
|
|
755
|
+
headers: {
|
|
756
|
+
[name: string]: unknown;
|
|
757
|
+
};
|
|
758
|
+
content: {
|
|
759
|
+
"application/json": {
|
|
760
|
+
/** @enum {string} */
|
|
761
|
+
status: "ok";
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
Me_me: {
|
|
768
|
+
parameters: {
|
|
769
|
+
query?: never;
|
|
770
|
+
header?: never;
|
|
771
|
+
path?: never;
|
|
772
|
+
cookie?: never;
|
|
773
|
+
};
|
|
774
|
+
requestBody?: never;
|
|
775
|
+
responses: {
|
|
776
|
+
/** @description The request has succeeded. */
|
|
777
|
+
200: {
|
|
778
|
+
headers: {
|
|
779
|
+
[name: string]: unknown;
|
|
780
|
+
};
|
|
781
|
+
content: {
|
|
782
|
+
"application/json": components["schemas"]["User"];
|
|
783
|
+
};
|
|
784
|
+
};
|
|
785
|
+
/** @description Access is unauthorized. */
|
|
786
|
+
401: {
|
|
787
|
+
headers: {
|
|
788
|
+
[name: string]: unknown;
|
|
789
|
+
};
|
|
790
|
+
content: {
|
|
791
|
+
"application/json": components["schemas"]["ApiError"];
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
};
|
|
795
|
+
};
|
|
796
|
+
SessionRoutes_login: {
|
|
797
|
+
parameters: {
|
|
798
|
+
query?: never;
|
|
799
|
+
header?: never;
|
|
800
|
+
path?: never;
|
|
801
|
+
cookie?: never;
|
|
802
|
+
};
|
|
803
|
+
requestBody: {
|
|
804
|
+
content: {
|
|
805
|
+
"application/json": components["schemas"]["Credentials"];
|
|
806
|
+
};
|
|
807
|
+
};
|
|
808
|
+
responses: {
|
|
809
|
+
/** @description The request has succeeded. */
|
|
810
|
+
200: {
|
|
811
|
+
headers: {
|
|
812
|
+
[name: string]: unknown;
|
|
813
|
+
};
|
|
814
|
+
content: {
|
|
815
|
+
"application/json": components["schemas"]["Session"];
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
/** @description The server could not understand the request due to invalid syntax. */
|
|
819
|
+
400: {
|
|
820
|
+
headers: {
|
|
821
|
+
[name: string]: unknown;
|
|
822
|
+
};
|
|
823
|
+
content: {
|
|
824
|
+
"application/json": components["schemas"]["ApiError"];
|
|
825
|
+
};
|
|
826
|
+
};
|
|
827
|
+
/** @description Access is unauthorized. */
|
|
828
|
+
401: {
|
|
829
|
+
headers: {
|
|
830
|
+
[name: string]: unknown;
|
|
831
|
+
};
|
|
832
|
+
content: {
|
|
833
|
+
"application/json": components["schemas"]["ApiError"];
|
|
834
|
+
};
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
Users_signup: {
|
|
839
|
+
parameters: {
|
|
840
|
+
query?: never;
|
|
841
|
+
header?: never;
|
|
842
|
+
path?: never;
|
|
843
|
+
cookie?: never;
|
|
844
|
+
};
|
|
845
|
+
requestBody: {
|
|
846
|
+
content: {
|
|
847
|
+
"application/json": components["schemas"]["Credentials"];
|
|
848
|
+
};
|
|
849
|
+
};
|
|
850
|
+
responses: {
|
|
851
|
+
/** @description The request has succeeded and a new resource has been created as a result. */
|
|
852
|
+
201: {
|
|
853
|
+
headers: {
|
|
854
|
+
[name: string]: unknown;
|
|
855
|
+
};
|
|
856
|
+
content: {
|
|
857
|
+
"application/json": components["schemas"]["Session"];
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
/** @description The server could not understand the request due to invalid syntax. */
|
|
861
|
+
400: {
|
|
862
|
+
headers: {
|
|
863
|
+
[name: string]: unknown;
|
|
864
|
+
};
|
|
865
|
+
content: {
|
|
866
|
+
"application/json": components["schemas"]["ApiError"];
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
/** @description The request conflicts with the current state of the server. */
|
|
870
|
+
409: {
|
|
871
|
+
headers: {
|
|
872
|
+
[name: string]: unknown;
|
|
873
|
+
};
|
|
874
|
+
content: {
|
|
875
|
+
"application/json": components["schemas"]["ApiError"];
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
};
|
|
879
|
+
};
|
|
880
|
+
Users_profile: {
|
|
881
|
+
parameters: {
|
|
882
|
+
query?: never;
|
|
883
|
+
header?: never;
|
|
884
|
+
path: {
|
|
885
|
+
username: string;
|
|
886
|
+
};
|
|
887
|
+
cookie?: never;
|
|
888
|
+
};
|
|
889
|
+
requestBody?: never;
|
|
890
|
+
responses: {
|
|
891
|
+
/** @description The request has succeeded. */
|
|
892
|
+
200: {
|
|
893
|
+
headers: {
|
|
894
|
+
[name: string]: unknown;
|
|
895
|
+
};
|
|
896
|
+
content: {
|
|
897
|
+
"application/json": components["schemas"]["Profile"];
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
/** @description The server cannot find the requested resource. */
|
|
901
|
+
404: {
|
|
902
|
+
headers: {
|
|
903
|
+
[name: string]: unknown;
|
|
904
|
+
};
|
|
905
|
+
content: {
|
|
906
|
+
"application/json": components["schemas"]["ApiError"];
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
};
|
|
911
|
+
}
|