Skip to content

Commit a350eb7

Browse files
Batuevio/chore/2025 12 21 (#29)
* Switch userdata to test api * API codegen update (#28) Co-authored-by: BatuevIO <124889562+BatuevIO@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 9dc61ae commit a350eb7

3 files changed

Lines changed: 126 additions & 32 deletions

File tree

scripts/generate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const apis = {
1111
services: "https://api.profcomff.com/services/openapi.json",
1212
print: "https://api.profcomff.com/print/openapi.json",
1313
social: "https://api.profcomff.com/social/openapi.json",
14-
userdata: "https://api.profcomff.com/userdata/openapi.json",
14+
userdata: "https://api.test.profcomff.com/userdata/openapi.json",
1515
achievement: "https://api.profcomff.com/achievement/openapi.json",
1616
rating: "https://api.test.profcomff.com/rating/openapi.json",
1717
rental: "https://api.profcomff.com/rental/openapi.json",

src/openapi/rating.ts

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ export interface components {
302302
* Format: date-time
303303
*/
304304
update_ts: string;
305+
/** User Fullname */
306+
user_fullname?: string | null;
305307
/** User Id */
306308
user_id?: number | null;
307309
/**
@@ -325,7 +327,7 @@ export interface components {
325327
total: number;
326328
};
327329
/** CommentGetAllWithAllInfo */
328-
"CommentGetAllWithAllInfo-Input": {
330+
CommentGetAllWithAllInfo: {
329331
/**
330332
* Comments
331333
* @default []
@@ -338,36 +340,8 @@ export interface components {
338340
/** Total */
339341
total: number;
340342
};
341-
/** CommentGetAllWithAllInfo */
342-
"CommentGetAllWithAllInfo-Output": {
343-
/**
344-
* Comments
345-
* @default []
346-
*/
347-
comments: components["schemas"]["CommentGetWithAllInfo"][];
348-
/** Limit */
349-
limit: number;
350-
/** Offset */
351-
offset: number;
352-
/** Total */
353-
total: number;
354-
};
355-
/** CommentGetAllWithStatus */
356-
"CommentGetAllWithStatus-Input": {
357-
/**
358-
* Comments
359-
* @default []
360-
*/
361-
comments: components["schemas"]["CommentGetWithStatus"][];
362-
/** Limit */
363-
limit: number;
364-
/** Offset */
365-
offset: number;
366-
/** Total */
367-
total: number;
368-
};
369343
/** CommentGetAllWithStatus */
370-
"CommentGetAllWithStatus-Output": {
344+
CommentGetAllWithStatus: {
371345
/**
372346
* Comments
373347
* @default []
@@ -413,6 +387,8 @@ export interface components {
413387
* Format: date-time
414388
*/
415389
update_ts: string;
390+
/** User Fullname */
391+
user_fullname?: string | null;
416392
/** User Id */
417393
user_id?: number | null;
418394
/**
@@ -452,6 +428,8 @@ export interface components {
452428
* Format: date-time
453429
*/
454430
update_ts: string;
431+
/** User Fullname */
432+
user_fullname?: string | null;
455433
/** User Id */
456434
user_id?: number | null;
457435
/**
@@ -694,7 +672,7 @@ export interface operations {
694672
[name: string]: unknown;
695673
};
696674
content: {
697-
"application/json": components["schemas"]["CommentGetAll"] | components["schemas"]["CommentGetAllWithAllInfo-Output"] | components["schemas"]["CommentGetAllWithStatus-Output"];
675+
"application/json": components["schemas"]["CommentGetAll"] | components["schemas"]["CommentGetAllWithAllInfo"] | components["schemas"]["CommentGetAllWithStatus"];
698676
};
699677
};
700678
/** @description Validation Error */

src/openapi/userdata.ts

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,36 @@
44
*/
55

66
export interface paths {
7+
"/userdata/admin/user/{user_id}": {
8+
parameters: {
9+
query?: never;
10+
header?: never;
11+
path?: never;
12+
cookie?: never;
13+
};
14+
/**
15+
* Get User Card
16+
* @description Получает профсоюзную информацию пользователя.
17+
*
18+
* Скоупы: `["userdata.info.admin"]`
19+
*/
20+
get: operations["get_user_card_admin_user__user_id__get"];
21+
put?: never;
22+
post?: never;
23+
delete?: never;
24+
options?: never;
25+
head?: never;
26+
/**
27+
* Update User Card
28+
* @description Обновить данные в профсоюзной информации пользователя.
29+
*
30+
* Скоупы: `["userdata.info.admin"]`
31+
*
32+
* - **user_id**: id пользователя.
33+
*/
34+
patch: operations["update_user_card_admin_user__user_id__patch"];
35+
trace?: never;
36+
};
737
"/userdata/category": {
838
parameters: {
939
query?: never;
@@ -393,6 +423,26 @@ export interface components {
393423
/** Status */
394424
status: string;
395425
};
426+
/** UserCardGet */
427+
UserCardGet: {
428+
/** Full Name */
429+
full_name?: string | null;
430+
/** Is Union Member */
431+
is_union_member: string;
432+
/** Student Card Number */
433+
student_card_number?: string | null;
434+
/** Union Card Number */
435+
union_card_number?: string | null;
436+
/** User Id */
437+
user_id: number;
438+
};
439+
/** UserCardUpdate */
440+
UserCardUpdate: {
441+
/** Full Name */
442+
full_name?: string | null;
443+
/** Student Card Number */
444+
student_card_number?: string | null;
445+
};
396446
/** UserInfo */
397447
UserInfo: {
398448
/** Category */
@@ -446,6 +496,72 @@ export interface components {
446496
}
447497
export type $defs = Record<string, never>;
448498
export interface operations {
499+
get_user_card_admin_user__user_id__get: {
500+
parameters: {
501+
query?: never;
502+
header?: never;
503+
path: {
504+
user_id: number;
505+
};
506+
cookie?: never;
507+
};
508+
requestBody?: never;
509+
responses: {
510+
/** @description Successful Response */
511+
200: {
512+
headers: {
513+
[name: string]: unknown;
514+
};
515+
content: {
516+
"application/json": components["schemas"]["UserCardGet"];
517+
};
518+
};
519+
/** @description Validation Error */
520+
422: {
521+
headers: {
522+
[name: string]: unknown;
523+
};
524+
content: {
525+
"application/json": components["schemas"]["HTTPValidationError"];
526+
};
527+
};
528+
};
529+
};
530+
update_user_card_admin_user__user_id__patch: {
531+
parameters: {
532+
query?: never;
533+
header?: never;
534+
path: {
535+
user_id: number;
536+
};
537+
cookie?: never;
538+
};
539+
requestBody: {
540+
content: {
541+
"application/json": components["schemas"]["UserCardUpdate"];
542+
};
543+
};
544+
responses: {
545+
/** @description Successful Response */
546+
200: {
547+
headers: {
548+
[name: string]: unknown;
549+
};
550+
content: {
551+
"application/json": components["schemas"]["StatusResponseModel"];
552+
};
553+
};
554+
/** @description Validation Error */
555+
422: {
556+
headers: {
557+
[name: string]: unknown;
558+
};
559+
content: {
560+
"application/json": components["schemas"]["HTTPValidationError"];
561+
};
562+
};
563+
};
564+
};
449565
get_categories_category_get: {
450566
parameters: {
451567
query?: {

0 commit comments

Comments
 (0)