@profcomff/api-uilib 2025.3.1 → 2025.4.30
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/package.json +1 -1
- package/scripts/generate.js +1 -0
- package/src/index.ts +4 -2
- package/src/openapi/rating.ts +182 -15
- package/src/openapi/rental.ts +1288 -0
package/package.json
CHANGED
package/scripts/generate.js
CHANGED
|
@@ -14,6 +14,7 @@ const apis = {
|
|
|
14
14
|
userdata: "https://api.profcomff.com/userdata/openapi.json",
|
|
15
15
|
achievement: "https://api.profcomff.com/achievement/openapi.json",
|
|
16
16
|
rating: "https://api.profcomff.com/rating/openapi.json",
|
|
17
|
+
rental: "https://api.profcomff.com/rental/openapi.json",
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
const header = `/**
|
package/src/index.ts
CHANGED
|
@@ -9,7 +9,8 @@ import type { paths as servicesPaths } from "./openapi/services.ts";
|
|
|
9
9
|
import type { paths as socialPaths } from "./openapi/social.ts";
|
|
10
10
|
import type { paths as timetablePaths } from "./openapi/timetable.ts";
|
|
11
11
|
import type { paths as userdataPaths } from "./openapi/userdata.ts";
|
|
12
|
-
import type { paths as ratingPaths } from "./openapi/rating.
|
|
12
|
+
import type { paths as ratingPaths } from "./openapi/rating.ts";
|
|
13
|
+
import type { paths as rentalPaths } from "./openapi/rental.ts";
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
export type paths = (
|
|
@@ -21,7 +22,8 @@ export type paths = (
|
|
|
21
22
|
socialPaths &
|
|
22
23
|
timetablePaths &
|
|
23
24
|
userdataPaths &
|
|
24
|
-
ratingPaths
|
|
25
|
+
ratingPaths &
|
|
26
|
+
rentalPaths
|
|
25
27
|
);
|
|
26
28
|
|
|
27
29
|
let currentClient: ReturnType<typeof Client<paths>> | undefined = undefined;
|
package/src/openapi/rating.ts
CHANGED
|
@@ -33,11 +33,8 @@ export interface paths {
|
|
|
33
33
|
put?: never;
|
|
34
34
|
/**
|
|
35
35
|
* Create Comment
|
|
36
|
-
* @description
|
|
37
|
-
* Создает комментарий к преподавателю в базе данных RatingAPI
|
|
36
|
+
* @description Создает комментарий к преподавателю в базе данных RatingAPI
|
|
38
37
|
* Для создания комментария нужно быть авторизованным
|
|
39
|
-
*
|
|
40
|
-
* Для возможности создания комментария с указанием времени создания и изменения необходим скоуп ["rating.comment.import"]
|
|
41
38
|
*/
|
|
42
39
|
post: operations["create_comment_comment_post"];
|
|
43
40
|
delete?: never;
|
|
@@ -69,6 +66,26 @@ export interface paths {
|
|
|
69
66
|
delete: operations["delete_comment_comment__uuid__delete"];
|
|
70
67
|
options?: never;
|
|
71
68
|
head?: never;
|
|
69
|
+
/**
|
|
70
|
+
* Update Comment
|
|
71
|
+
* @description Позволяет изменить свой неанонимный комментарий
|
|
72
|
+
*/
|
|
73
|
+
patch: operations["update_comment_comment__uuid__patch"];
|
|
74
|
+
trace?: never;
|
|
75
|
+
};
|
|
76
|
+
"/rating/comment/{uuid}/review": {
|
|
77
|
+
parameters: {
|
|
78
|
+
query?: never;
|
|
79
|
+
header?: never;
|
|
80
|
+
path?: never;
|
|
81
|
+
cookie?: never;
|
|
82
|
+
};
|
|
83
|
+
get?: never;
|
|
84
|
+
put?: never;
|
|
85
|
+
post?: never;
|
|
86
|
+
delete?: never;
|
|
87
|
+
options?: never;
|
|
88
|
+
head?: never;
|
|
72
89
|
/**
|
|
73
90
|
* Review Comment
|
|
74
91
|
* @description Scopes: `["rating.comment.review"]`
|
|
@@ -78,7 +95,7 @@ export interface paths {
|
|
|
78
95
|
* `approved` - комментарий одобрен и возвращается при запросе лектора
|
|
79
96
|
* `dismissed` - комментарий отклонен, не отображается в запросе лектора
|
|
80
97
|
*/
|
|
81
|
-
patch: operations["
|
|
98
|
+
patch: operations["review_comment_comment__uuid__review_patch"];
|
|
82
99
|
trace?: never;
|
|
83
100
|
};
|
|
84
101
|
"/rating/comment/import": {
|
|
@@ -115,7 +132,7 @@ export interface paths {
|
|
|
115
132
|
*
|
|
116
133
|
* `offset` - нижняя граница получения преподавателей, т.е. если по дефолту первым возвращается преподаватель с условным номером N, то при наличии ненулевого offset будет возвращаться преподаватель с номером N + offset
|
|
117
134
|
*
|
|
118
|
-
* `order_by` - возможные значения `"mark_kindness", "mark_freebie", "mark_clarity", "mark_general", "last_name"`.
|
|
135
|
+
* `order_by` - возможные значения `"mark_weighted", "mark_kindness", "mark_freebie", "mark_clarity", "mark_general", "last_name"`.
|
|
119
136
|
* Если передано `'last_name'` - возвращается список преподавателей отсортированных по алфавиту по фамилиям
|
|
120
137
|
* Если передано `'mark_...'` - возвращается список преподавателей отсортированных по конкретной оценке
|
|
121
138
|
*
|
|
@@ -237,15 +254,110 @@ export interface components {
|
|
|
237
254
|
/** Total */
|
|
238
255
|
total: number;
|
|
239
256
|
};
|
|
257
|
+
/** CommentGetAllWithAllInfo */
|
|
258
|
+
CommentGetAllWithAllInfo: {
|
|
259
|
+
/**
|
|
260
|
+
* Comments
|
|
261
|
+
* @default []
|
|
262
|
+
*/
|
|
263
|
+
comments: components["schemas"]["CommentGetWithAllInfo"][];
|
|
264
|
+
/** Limit */
|
|
265
|
+
limit: number;
|
|
266
|
+
/** Offset */
|
|
267
|
+
offset: number;
|
|
268
|
+
/** Total */
|
|
269
|
+
total: number;
|
|
270
|
+
};
|
|
271
|
+
/** CommentGetAllWithStatus */
|
|
272
|
+
CommentGetAllWithStatus: {
|
|
273
|
+
/**
|
|
274
|
+
* Comments
|
|
275
|
+
* @default []
|
|
276
|
+
*/
|
|
277
|
+
comments: components["schemas"]["CommentGetWithStatus"][];
|
|
278
|
+
/** Limit */
|
|
279
|
+
limit: number;
|
|
280
|
+
/** Offset */
|
|
281
|
+
offset: number;
|
|
282
|
+
/** Total */
|
|
283
|
+
total: number;
|
|
284
|
+
};
|
|
285
|
+
/** CommentGetWithAllInfo */
|
|
286
|
+
CommentGetWithAllInfo: {
|
|
287
|
+
/** Approved By */
|
|
288
|
+
approved_by?: number | null;
|
|
289
|
+
/**
|
|
290
|
+
* Create Ts
|
|
291
|
+
* Format: date-time
|
|
292
|
+
*/
|
|
293
|
+
create_ts: string;
|
|
294
|
+
/** Lecturer Id */
|
|
295
|
+
lecturer_id: number;
|
|
296
|
+
/** Mark Clarity */
|
|
297
|
+
mark_clarity: number;
|
|
298
|
+
/** Mark Freebie */
|
|
299
|
+
mark_freebie: number;
|
|
300
|
+
/** Mark General */
|
|
301
|
+
mark_general: number;
|
|
302
|
+
/** Mark Kindness */
|
|
303
|
+
mark_kindness: number;
|
|
304
|
+
review_status: components["schemas"]["ReviewStatus"];
|
|
305
|
+
/** Subject */
|
|
306
|
+
subject?: string | null;
|
|
307
|
+
/** Text */
|
|
308
|
+
text: string;
|
|
309
|
+
/**
|
|
310
|
+
* Update Ts
|
|
311
|
+
* Format: date-time
|
|
312
|
+
*/
|
|
313
|
+
update_ts: string;
|
|
314
|
+
/** User Id */
|
|
315
|
+
user_id?: number | null;
|
|
316
|
+
/**
|
|
317
|
+
* Uuid
|
|
318
|
+
* Format: uuid
|
|
319
|
+
*/
|
|
320
|
+
uuid: string;
|
|
321
|
+
};
|
|
322
|
+
/** CommentGetWithStatus */
|
|
323
|
+
CommentGetWithStatus: {
|
|
324
|
+
/**
|
|
325
|
+
* Create Ts
|
|
326
|
+
* Format: date-time
|
|
327
|
+
*/
|
|
328
|
+
create_ts: string;
|
|
329
|
+
/** Lecturer Id */
|
|
330
|
+
lecturer_id: number;
|
|
331
|
+
/** Mark Clarity */
|
|
332
|
+
mark_clarity: number;
|
|
333
|
+
/** Mark Freebie */
|
|
334
|
+
mark_freebie: number;
|
|
335
|
+
/** Mark General */
|
|
336
|
+
mark_general: number;
|
|
337
|
+
/** Mark Kindness */
|
|
338
|
+
mark_kindness: number;
|
|
339
|
+
review_status: components["schemas"]["ReviewStatus"];
|
|
340
|
+
/** Subject */
|
|
341
|
+
subject?: string | null;
|
|
342
|
+
/** Text */
|
|
343
|
+
text: string;
|
|
344
|
+
/**
|
|
345
|
+
* Update Ts
|
|
346
|
+
* Format: date-time
|
|
347
|
+
*/
|
|
348
|
+
update_ts: string;
|
|
349
|
+
/** User Id */
|
|
350
|
+
user_id?: number | null;
|
|
351
|
+
/**
|
|
352
|
+
* Uuid
|
|
353
|
+
* Format: uuid
|
|
354
|
+
*/
|
|
355
|
+
uuid: string;
|
|
356
|
+
};
|
|
240
357
|
/** CommentImport */
|
|
241
358
|
CommentImport: {
|
|
242
359
|
/** Create Ts */
|
|
243
360
|
create_ts?: string | null;
|
|
244
|
-
/**
|
|
245
|
-
* Is Anonymous
|
|
246
|
-
* @default true
|
|
247
|
-
*/
|
|
248
|
-
is_anonymous: boolean;
|
|
249
361
|
/** Lecturer Id */
|
|
250
362
|
lecturer_id: number;
|
|
251
363
|
/** Mark Clarity */
|
|
@@ -288,6 +400,19 @@ export interface components {
|
|
|
288
400
|
/** Update Ts */
|
|
289
401
|
update_ts?: string | null;
|
|
290
402
|
};
|
|
403
|
+
/** CommentUpdate */
|
|
404
|
+
CommentUpdate: {
|
|
405
|
+
/** Mark Clarity */
|
|
406
|
+
mark_clarity?: number;
|
|
407
|
+
/** Mark Freebie */
|
|
408
|
+
mark_freebie?: number;
|
|
409
|
+
/** Mark Kindness */
|
|
410
|
+
mark_kindness?: number;
|
|
411
|
+
/** Subject */
|
|
412
|
+
subject?: string;
|
|
413
|
+
/** Text */
|
|
414
|
+
text?: string;
|
|
415
|
+
};
|
|
291
416
|
/** HTTPValidationError */
|
|
292
417
|
HTTPValidationError: {
|
|
293
418
|
/** Detail */
|
|
@@ -313,6 +438,8 @@ export interface components {
|
|
|
313
438
|
mark_general?: number | null;
|
|
314
439
|
/** Mark Kindness */
|
|
315
440
|
mark_kindness?: number | null;
|
|
441
|
+
/** Mark Weighted */
|
|
442
|
+
mark_weighted?: number | null;
|
|
316
443
|
/** Middle Name */
|
|
317
444
|
middle_name: string;
|
|
318
445
|
/** Subjects */
|
|
@@ -360,6 +487,11 @@ export interface components {
|
|
|
360
487
|
/** Timetable Id */
|
|
361
488
|
timetable_id?: number | null;
|
|
362
489
|
};
|
|
490
|
+
/**
|
|
491
|
+
* ReviewStatus
|
|
492
|
+
* @enum {string}
|
|
493
|
+
*/
|
|
494
|
+
ReviewStatus: "approved" | "pending" | "dismissed";
|
|
363
495
|
/** StatusResponseModel */
|
|
364
496
|
StatusResponseModel: {
|
|
365
497
|
/** Message */
|
|
@@ -409,7 +541,7 @@ export interface operations {
|
|
|
409
541
|
[name: string]: unknown;
|
|
410
542
|
};
|
|
411
543
|
content: {
|
|
412
|
-
"application/json": components["schemas"]["CommentGetAll"];
|
|
544
|
+
"application/json": components["schemas"]["CommentGetAll"] | components["schemas"]["CommentGetAllWithAllInfo"] | components["schemas"]["CommentGetAllWithStatus"];
|
|
413
545
|
};
|
|
414
546
|
};
|
|
415
547
|
/** @description Validation Error */
|
|
@@ -520,7 +652,42 @@ export interface operations {
|
|
|
520
652
|
};
|
|
521
653
|
};
|
|
522
654
|
};
|
|
523
|
-
|
|
655
|
+
update_comment_comment__uuid__patch: {
|
|
656
|
+
parameters: {
|
|
657
|
+
query?: never;
|
|
658
|
+
header?: never;
|
|
659
|
+
path: {
|
|
660
|
+
uuid: string;
|
|
661
|
+
};
|
|
662
|
+
cookie?: never;
|
|
663
|
+
};
|
|
664
|
+
requestBody: {
|
|
665
|
+
content: {
|
|
666
|
+
"application/json": components["schemas"]["CommentUpdate"];
|
|
667
|
+
};
|
|
668
|
+
};
|
|
669
|
+
responses: {
|
|
670
|
+
/** @description Successful Response */
|
|
671
|
+
200: {
|
|
672
|
+
headers: {
|
|
673
|
+
[name: string]: unknown;
|
|
674
|
+
};
|
|
675
|
+
content: {
|
|
676
|
+
"application/json": components["schemas"]["CommentGet"];
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
/** @description Validation Error */
|
|
680
|
+
422: {
|
|
681
|
+
headers: {
|
|
682
|
+
[name: string]: unknown;
|
|
683
|
+
};
|
|
684
|
+
content: {
|
|
685
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
686
|
+
};
|
|
687
|
+
};
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
review_comment_comment__uuid__review_patch: {
|
|
524
691
|
parameters: {
|
|
525
692
|
query?: {
|
|
526
693
|
review_status?: "approved" | "dismissed";
|
|
@@ -539,7 +706,7 @@ export interface operations {
|
|
|
539
706
|
[name: string]: unknown;
|
|
540
707
|
};
|
|
541
708
|
content: {
|
|
542
|
-
"application/json": components["schemas"]["
|
|
709
|
+
"application/json": components["schemas"]["CommentGetWithAllInfo"];
|
|
543
710
|
};
|
|
544
711
|
};
|
|
545
712
|
/** @description Validation Error */
|
|
@@ -594,7 +761,7 @@ export interface operations {
|
|
|
594
761
|
limit?: number;
|
|
595
762
|
name?: string;
|
|
596
763
|
offset?: number;
|
|
597
|
-
order_by?: "mark_kindness" | "mark_freebie" | "mark_clarity" | "mark_general" | "last_name";
|
|
764
|
+
order_by?: "mark_weighted" | "mark_kindness" | "mark_freebie" | "mark_clarity" | "mark_general" | "last_name";
|
|
598
765
|
subject?: string;
|
|
599
766
|
};
|
|
600
767
|
header?: never;
|