@profcomff/api-uilib 2025.9.26 → 2025.11.1-test

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profcomff/api-uilib",
3
- "version": "2025.09.26",
3
+ "version": "2025.11.01-test",
4
4
  "description": "API wrappers, autogenerated from openapi.json files",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.d.ts",
@@ -13,7 +13,7 @@ const apis = {
13
13
  social: "https://api.profcomff.com/social/openapi.json",
14
14
  userdata: "https://api.profcomff.com/userdata/openapi.json",
15
15
  achievement: "https://api.profcomff.com/achievement/openapi.json",
16
- rating: "https://api.profcomff.com/rating/openapi.json",
16
+ rating: "https://api.test.profcomff.com/rating/openapi.json",
17
17
  rental: "https://api.profcomff.com/rental/openapi.json",
18
18
  };
19
19
 
@@ -21,9 +21,10 @@ export interface paths {
21
21
  * Если без смещения возвращается комментарий с условным номером N,
22
22
  * то при значении offset = X будет возвращаться комментарий с номером N + X
23
23
  *
24
- * `order_by` - возможные значения `"create_ts", "mark_kindness", "mark_freebie", "mark_clarity", "mark_general"`.
25
- * Если передано `'create_ts'` - возвращается список комментариев отсортированных по времени
26
- * Если передано `'mark_...'` - возвращается список комментариев отсортированных по конкретной оценке
24
+ * `order_by` - возможные значения `"create_ts", "mark_kindness", "mark_freebie", "mark_clarity", "mark_general", "like_diff"`.
25
+ * Если передано `'create_ts'` - возвращается список комментариев, отсортированных по времени
26
+ * Если передано `'mark_...'` - возвращается список комментариев, отсортированных по конкретной оценке
27
+ * Если передано `'like_diff'` - возвращается список комментариев, отсортированных по разнице лайков и дизлайков
27
28
  *
28
29
  * `lecturer_id` - вернет все комментарии для преподавателя с конкретным id, по дефолту возвращает вообще все аппрувнутые комментарии.
29
30
  *
@@ -77,6 +78,41 @@ export interface paths {
77
78
  patch: operations["update_comment_comment__uuid__patch"];
78
79
  trace?: never;
79
80
  };
81
+ "/rating/comment/{uuid}/{reaction}": {
82
+ parameters: {
83
+ query?: never;
84
+ header?: never;
85
+ path?: never;
86
+ cookie?: never;
87
+ };
88
+ get?: never;
89
+ /**
90
+ * Like Comment
91
+ * @description Handles like/dislike reactions for a comment.
92
+ *
93
+ * This endpoint allows authenticated users to react to a comment (like/dislike) or change their existing reaction.
94
+ * If the user has no existing reaction, a new one is created. If the user changes their reaction, it gets updated.
95
+ * If the user clicks the same reaction again, the reaction is removed.
96
+ *
97
+ * Args:
98
+ * uuid (UUID): The UUID of the comment to react to.
99
+ * reaction (Reaction): The reaction type (like/dislike).
100
+ * user (dict): Authenticated user data from UnionAuth dependency.
101
+ *
102
+ * Returns:
103
+ * CommentGet: The updated comment with reactions in CommentGet format.
104
+ *
105
+ * Raises:
106
+ * ObjectNotFound: If the comment with given UUID doesn't exist.
107
+ */
108
+ put: operations["like_comment_comment__uuid___reaction__put"];
109
+ post?: never;
110
+ delete?: never;
111
+ options?: never;
112
+ head?: never;
113
+ patch?: never;
114
+ trace?: never;
115
+ };
80
116
  "/rating/comment/{uuid}/review": {
81
117
  parameters: {
82
118
  query?: never;
@@ -139,10 +175,16 @@ export interface paths {
139
175
  * `order_by` - возможные значения `"mark_weighted", "mark_kindness", "mark_freebie", "mark_clarity", "mark_general", "last_name"`.
140
176
  * Если передано `'last_name'` - возвращается список преподавателей отсортированных по алфавиту по фамилиям
141
177
  * Если передано `'mark_...'` - возвращается список преподавателей отсортированных по конкретной оценке
178
+ * Если передано просто так (или с '+' в начале параметра), то сортирует по возрастанию
179
+ * С '-' в начале -- по убыванию.
142
180
  *
143
- * `info` - возможные значения `'comments'`, `'mark'`.
181
+ * *Пример запросов с этим параметром*:
182
+ * - `...?order_by=-mark_kindness`
183
+ * - `...?order_by=mark_freebie`
184
+ * - `...?order_by=+mark_freebie` (эквивалентно 2ому пункту)
185
+ *
186
+ * `info` - возможные значения `'comments'`.
144
187
  * Если передано `'comments'`, то возвращаются одобренные комментарии к преподавателю.
145
- * Если передано `'mark'`, то возвращаются общие средние оценки, а также суммарная средняя оценка по всем одобренным комментариям.
146
188
  *
147
189
  * `subject`
148
190
  * Если передано `subject` - возвращает всех преподавателей, для которых переданное значение совпадает с одним из их предметов преподавания.
@@ -151,9 +193,9 @@ export interface paths {
151
193
  * `name`
152
194
  * Поле для ФИО. Если передано `name` - возвращает всех преподователей, для которых нашлись совпадения с переданной строкой
153
195
  *
154
- * `asc_order`
155
- * Если передано true, сортировать в порядке возрастания
156
- * Иначе - в порядке убывания
196
+ * `mark`
197
+ * Поле для оценки. Если передано, то возвращает только тех преподавателей, для которых средняя общая оценка ('general_mark')
198
+ * больше, чем переданный 'mark'.
157
199
  */
158
200
  get: operations["get_lecturers_lecturer_get"];
159
201
  put?: never;
@@ -183,10 +225,8 @@ export interface paths {
183
225
  *
184
226
  * Возвращает преподавателя по его ID в базе данных RatingAPI
185
227
  *
186
- * *QUERY* `info: string` - возможные значения `'comments'`, `'mark'`.
228
+ * *QUERY* `info: string` - возможные значения `'comments'`.
187
229
  * Если передано `'comments'`, то возвращаются одобренные комментарии к преподавателю.
188
- * Если передано `'mark'`, то возвращаются общие средние оценки, а также суммарная средняя оценка по всем одобренным комментариям.
189
- *
190
230
  * Subject лектора возвращшается либо из базы данных, либо из любого аппрувнутого комментария
191
231
  */
192
232
  get: operations["get_lecturer_lecturer__id__get"];
@@ -206,6 +246,28 @@ export interface paths {
206
246
  patch: operations["update_lecturer_lecturer__id__patch"];
207
247
  trace?: never;
208
248
  };
249
+ "/rating/lecturer/import_rating": {
250
+ parameters: {
251
+ query?: never;
252
+ header?: never;
253
+ path?: never;
254
+ cookie?: never;
255
+ };
256
+ get?: never;
257
+ put?: never;
258
+ post?: never;
259
+ delete?: never;
260
+ options?: never;
261
+ head?: never;
262
+ /**
263
+ * Update Lecturer Rating
264
+ * @description Scopes: `["rating.lecturer.update_rating"]`
265
+ *
266
+ * Обновляет рейтинг преподавателя в базе данных RatingAPI
267
+ */
268
+ patch: operations["update_lecturer_rating_lecturer_import_rating_patch"];
269
+ trace?: never;
270
+ };
209
271
  }
210
272
  export type webhooks = Record<string, never>;
211
273
  export interface components {
@@ -217,8 +279,12 @@ export interface components {
217
279
  * Format: date-time
218
280
  */
219
281
  create_ts: string;
282
+ /** Dislike Count */
283
+ dislike_count: number;
220
284
  /** Lecturer Id */
221
285
  lecturer_id: number;
286
+ /** Like Count */
287
+ like_count: number;
222
288
  /** Mark Clarity */
223
289
  mark_clarity: number;
224
290
  /** Mark Freebie */
@@ -259,7 +325,21 @@ export interface components {
259
325
  total: number;
260
326
  };
261
327
  /** CommentGetAllWithAllInfo */
262
- CommentGetAllWithAllInfo: {
328
+ "CommentGetAllWithAllInfo-Input": {
329
+ /**
330
+ * Comments
331
+ * @default []
332
+ */
333
+ comments: components["schemas"]["CommentGetWithAllInfo"][];
334
+ /** Limit */
335
+ limit: number;
336
+ /** Offset */
337
+ offset: number;
338
+ /** Total */
339
+ total: number;
340
+ };
341
+ /** CommentGetAllWithAllInfo */
342
+ "CommentGetAllWithAllInfo-Output": {
263
343
  /**
264
344
  * Comments
265
345
  * @default []
@@ -273,7 +353,21 @@ export interface components {
273
353
  total: number;
274
354
  };
275
355
  /** CommentGetAllWithStatus */
276
- 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
+ };
369
+ /** CommentGetAllWithStatus */
370
+ "CommentGetAllWithStatus-Output": {
277
371
  /**
278
372
  * Comments
279
373
  * @default []
@@ -295,8 +389,12 @@ export interface components {
295
389
  * Format: date-time
296
390
  */
297
391
  create_ts: string;
392
+ /** Dislike Count */
393
+ dislike_count: number;
298
394
  /** Lecturer Id */
299
395
  lecturer_id: number;
396
+ /** Like Count */
397
+ like_count: number;
300
398
  /** Mark Clarity */
301
399
  mark_clarity: number;
302
400
  /** Mark Freebie */
@@ -330,8 +428,12 @@ export interface components {
330
428
  * Format: date-time
331
429
  */
332
430
  create_ts: string;
431
+ /** Dislike Count */
432
+ dislike_count: number;
333
433
  /** Lecturer Id */
334
434
  lecturer_id: number;
435
+ /** Like Count */
436
+ like_count: number;
335
437
  /** Mark Clarity */
336
438
  mark_clarity: number;
337
439
  /** Mark Freebie */
@@ -365,15 +467,15 @@ export interface components {
365
467
  /** Lecturer Id */
366
468
  lecturer_id: number;
367
469
  /** Mark Clarity */
368
- mark_clarity: number;
470
+ mark_clarity?: number;
369
471
  /** Mark Freebie */
370
- mark_freebie: number;
472
+ mark_freebie?: number;
371
473
  /** Mark Kindness */
372
- mark_kindness: number;
474
+ mark_kindness?: number;
373
475
  /** Subject */
374
- subject?: string | null;
476
+ subject?: string;
375
477
  /** Text */
376
- text: string;
478
+ text?: string;
377
479
  /** Update Ts */
378
480
  update_ts?: string | null;
379
481
  };
@@ -392,15 +494,15 @@ export interface components {
392
494
  */
393
495
  is_anonymous: boolean;
394
496
  /** Mark Clarity */
395
- mark_clarity: number;
497
+ mark_clarity?: number;
396
498
  /** Mark Freebie */
397
- mark_freebie: number;
499
+ mark_freebie?: number;
398
500
  /** Mark Kindness */
399
- mark_kindness: number;
501
+ mark_kindness?: number;
400
502
  /** Subject */
401
- subject: string;
503
+ subject?: string;
402
504
  /** Text */
403
- text: string;
505
+ text?: string;
404
506
  /** Update Ts */
405
507
  update_ts?: string | null;
406
508
  };
@@ -434,22 +536,24 @@ export interface components {
434
536
  id: number;
435
537
  /** Last Name */
436
538
  last_name: string;
437
- /** Mark Clarity */
438
- mark_clarity?: number | null;
439
- /** Mark Freebie */
440
- mark_freebie?: number | null;
441
- /** Mark General */
442
- mark_general?: number | null;
443
- /** Mark Kindness */
444
- mark_kindness?: number | null;
539
+ /** Mark Clarity Weighted */
540
+ mark_clarity_weighted?: number | null;
541
+ /** Mark Freebie Weighted */
542
+ mark_freebie_weighted?: number | null;
543
+ /** Mark Kindness Weighted */
544
+ mark_kindness_weighted?: number | null;
445
545
  /** Mark Weighted */
446
546
  mark_weighted?: number | null;
447
547
  /** Middle Name */
448
548
  middle_name: string;
549
+ /** Rank */
550
+ rank?: number | null;
449
551
  /** Subjects */
450
552
  subjects?: string[] | null;
451
553
  /** Timetable Id */
452
554
  timetable_id: number;
555
+ /** Update Ts */
556
+ update_ts?: string | null;
453
557
  };
454
558
  /** LecturerGetAll */
455
559
  LecturerGetAll: {
@@ -491,6 +595,49 @@ export interface components {
491
595
  /** Timetable Id */
492
596
  timetable_id?: number | null;
493
597
  };
598
+ /** LecturerUpdateRatingPatch */
599
+ LecturerUpdateRatingPatch: {
600
+ /** Failed */
601
+ failed: number;
602
+ /** Failed Id */
603
+ failed_id: number[];
604
+ /** Updated */
605
+ updated: number;
606
+ /** Updated Id */
607
+ updated_id: number[];
608
+ };
609
+ /** LecturerWithRank */
610
+ LecturerWithRank: {
611
+ /** Avatar Link */
612
+ avatar_link?: string | null;
613
+ /** First Name */
614
+ first_name: string;
615
+ /** Id */
616
+ id: number;
617
+ /** Last Name */
618
+ last_name: string;
619
+ /** Mark Clarity Weighted */
620
+ mark_clarity_weighted: number;
621
+ /** Mark Freebie Weighted */
622
+ mark_freebie_weighted: number;
623
+ /** Mark Kindness Weighted */
624
+ mark_kindness_weighted: number;
625
+ /** Mark Weighted */
626
+ mark_weighted: number;
627
+ /** Middle Name */
628
+ middle_name: string;
629
+ /** Rank */
630
+ rank: number;
631
+ /** Timetable Id */
632
+ timetable_id: number;
633
+ /** Update Ts */
634
+ update_ts?: string | null;
635
+ };
636
+ /**
637
+ * Reaction
638
+ * @enum {string}
639
+ */
640
+ Reaction: "like" | "dislike";
494
641
  /**
495
642
  * ReviewStatus
496
643
  * @enum {string}
@@ -530,7 +677,7 @@ export interface operations {
530
677
  lecturer_id?: number | null;
531
678
  limit?: number;
532
679
  offset?: number;
533
- order_by?: "create_ts" | "mark_kindness" | "mark_freebie" | "mark_clarity" | "mark_general";
680
+ order_by?: "create_ts" | "mark_kindness" | "mark_freebie" | "mark_clarity" | "mark_general" | "like_diff";
534
681
  subject?: string | null;
535
682
  unreviewed?: boolean;
536
683
  user_id?: number | null;
@@ -547,7 +694,7 @@ export interface operations {
547
694
  [name: string]: unknown;
548
695
  };
549
696
  content: {
550
- "application/json": components["schemas"]["CommentGetAll"] | components["schemas"]["CommentGetAllWithAllInfo"] | components["schemas"]["CommentGetAllWithStatus"];
697
+ "application/json": components["schemas"]["CommentGetAll"] | components["schemas"]["CommentGetAllWithAllInfo-Output"] | components["schemas"]["CommentGetAllWithStatus-Output"];
551
698
  };
552
699
  };
553
700
  /** @description Validation Error */
@@ -693,6 +840,38 @@ export interface operations {
693
840
  };
694
841
  };
695
842
  };
843
+ like_comment_comment__uuid___reaction__put: {
844
+ parameters: {
845
+ query?: never;
846
+ header?: never;
847
+ path: {
848
+ reaction: components["schemas"]["Reaction"];
849
+ uuid: string;
850
+ };
851
+ cookie?: never;
852
+ };
853
+ requestBody?: never;
854
+ responses: {
855
+ /** @description Successful Response */
856
+ 200: {
857
+ headers: {
858
+ [name: string]: unknown;
859
+ };
860
+ content: {
861
+ "application/json": components["schemas"]["CommentGet"];
862
+ };
863
+ };
864
+ /** @description Validation Error */
865
+ 422: {
866
+ headers: {
867
+ [name: string]: unknown;
868
+ };
869
+ content: {
870
+ "application/json": components["schemas"]["HTTPValidationError"];
871
+ };
872
+ };
873
+ };
874
+ };
696
875
  review_comment_comment__uuid__review_patch: {
697
876
  parameters: {
698
877
  query?: {
@@ -762,12 +941,12 @@ export interface operations {
762
941
  get_lecturers_lecturer_get: {
763
942
  parameters: {
764
943
  query?: {
765
- asc_order?: boolean;
766
- info?: ("comments" | "mark")[];
944
+ info?: "comments"[];
767
945
  limit?: number;
946
+ mark?: number;
768
947
  name?: string;
769
948
  offset?: number;
770
- order_by?: "mark_weighted" | "mark_kindness" | "mark_freebie" | "mark_clarity" | "mark_general" | "last_name";
949
+ order_by?: string | null;
771
950
  subject?: string;
772
951
  };
773
952
  header?: never;
@@ -832,7 +1011,7 @@ export interface operations {
832
1011
  get_lecturer_lecturer__id__get: {
833
1012
  parameters: {
834
1013
  query?: {
835
- info?: ("comments" | "mark")[];
1014
+ info?: "comments"[];
836
1015
  };
837
1016
  header?: never;
838
1017
  path: {
@@ -928,4 +1107,37 @@ export interface operations {
928
1107
  };
929
1108
  };
930
1109
  };
1110
+ update_lecturer_rating_lecturer_import_rating_patch: {
1111
+ parameters: {
1112
+ query?: never;
1113
+ header?: never;
1114
+ path?: never;
1115
+ cookie?: never;
1116
+ };
1117
+ requestBody: {
1118
+ content: {
1119
+ "application/json": components["schemas"]["LecturerWithRank"][];
1120
+ };
1121
+ };
1122
+ responses: {
1123
+ /** @description Successful Response */
1124
+ 200: {
1125
+ headers: {
1126
+ [name: string]: unknown;
1127
+ };
1128
+ content: {
1129
+ "application/json": components["schemas"]["LecturerUpdateRatingPatch"];
1130
+ };
1131
+ };
1132
+ /** @description Validation Error */
1133
+ 422: {
1134
+ headers: {
1135
+ [name: string]: unknown;
1136
+ };
1137
+ content: {
1138
+ "application/json": components["schemas"]["HTTPValidationError"];
1139
+ };
1140
+ };
1141
+ };
1142
+ };
931
1143
  }
@@ -177,6 +177,8 @@ export interface paths {
177
177
  * Returns a status response.
178
178
  *
179
179
  * Raises **ObjectNotFound** if the item type with the specified ID is not found.
180
+ *
181
+ * Raises **ForbiddenAction** if the item type with the specified ID has items.
180
182
  */
181
183
  delete: operations["delete_item_type_itemtype__id__delete"];
182
184
  options?: never;
@@ -274,6 +276,8 @@ export interface paths {
274
276
  * Create Rental Session
275
277
  * @description Создает новую сессию аренды для указанного типа предмета.
276
278
  *
279
+ * Cкоупы: `["rental.session.create"]`
280
+ *
277
281
  * :param item_type_id: Идентификатор типа предмета.
278
282
  * :raises NoneAvailable: Если нет доступных предметов указанного типа.
279
283
  * :raises SessionExists: Если у пользователя уже есть сессия с указанным типом предмета.
@@ -463,6 +467,8 @@ export interface paths {
463
467
  * - **strike_info**: The data for the new strike.
464
468
  *
465
469
  * Returns the created strike.
470
+ *
471
+ * If session does not exist returns ObjectNotFound.
466
472
  */
467
473
  post: operations["create_strike_strike_post"];
468
474
  delete?: never;
@@ -587,12 +593,15 @@ export interface components {
587
593
  };
588
594
  /** ItemTypeGet */
589
595
  ItemTypeGet: {
590
- /** Availability */
591
- availability?: boolean | null;
596
+ /**
597
+ * Availability
598
+ * @default false
599
+ */
600
+ availability: boolean;
601
+ /** Available Items Count */
602
+ available_items_count?: number | null;
592
603
  /** Description */
593
604
  description?: string | null;
594
- /** Free Items Count */
595
- free_items_count?: number | null;
596
605
  /** Id */
597
606
  id: number;
598
607
  /** Image Url */
@@ -617,6 +626,8 @@ export interface components {
617
626
  admin_close_id: number | null;
618
627
  /** Admin Open Id */
619
628
  admin_open_id: number | null;
629
+ /** Deadline Ts */
630
+ deadline_ts?: string | null;
620
631
  /** End Ts */
621
632
  end_ts: string | null;
622
633
  /** Id */
@@ -635,6 +646,8 @@ export interface components {
635
646
  status: components["schemas"]["RentStatus"];
636
647
  /** Strike Id */
637
648
  strike_id?: number | null;
649
+ /** User Fullname */
650
+ user_fullname?: string | null;
638
651
  /** User Id */
639
652
  user_id: number;
640
653
  /** User Phone */
@@ -1301,10 +1314,13 @@ export interface operations {
1301
1314
  };
1302
1315
  start_rental_session_rental_sessions__session_id__start_patch: {
1303
1316
  parameters: {
1304
- query?: never;
1317
+ query?: {
1318
+ /** @description Deadline timestamp */
1319
+ deadline_ts?: string | null;
1320
+ };
1305
1321
  header?: never;
1306
1322
  path: {
1307
- session_id: number;
1323
+ session_id: unknown;
1308
1324
  };
1309
1325
  cookie?: never;
1310
1326
  };
@@ -1461,9 +1477,7 @@ export interface operations {
1461
1477
  [name: string]: unknown;
1462
1478
  };
1463
1479
  content: {
1464
- "application/json": {
1465
- [key: string]: unknown;
1466
- };
1480
+ "application/json": components["schemas"]["StatusResponseModel"];
1467
1481
  };
1468
1482
  };
1469
1483
  /** @description Validation Error */
@@ -299,6 +299,11 @@ export interface components {
299
299
  changeable: boolean;
300
300
  /** Id */
301
301
  id: number;
302
+ /**
303
+ * Is Public
304
+ * @default false
305
+ */
306
+ is_public: boolean;
302
307
  /** Is Required */
303
308
  is_required: boolean;
304
309
  /** Name */
@@ -316,6 +321,11 @@ export interface components {
316
321
  ParamPatch: {
317
322
  /** Changeable */
318
323
  changeable?: boolean | null;
324
+ /**
325
+ * Is Public
326
+ * @default false
327
+ */
328
+ is_public: boolean;
319
329
  /** Is Required */
320
330
  is_required?: boolean | null;
321
331
  /** Name */
@@ -333,6 +343,11 @@ export interface components {
333
343
  ParamPost: {
334
344
  /** Changeable */
335
345
  changeable: boolean;
346
+ /**
347
+ * Is Public
348
+ * @default false
349
+ */
350
+ is_public: boolean;
336
351
  /** Is Required */
337
352
  is_required: boolean;
338
353
  /** Name */
@@ -943,9 +958,7 @@ export interface operations {
943
958
  };
944
959
  get_user_info_user__id__get: {
945
960
  parameters: {
946
- query?: {
947
- additional_data?: number[];
948
- };
961
+ query?: never;
949
962
  header?: never;
950
963
  path: {
951
964
  id: number;