@profcomff/api-uilib 2024.10.22 → 2025.3.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/README.md +1 -1
- package/package.json +1 -1
- package/src/openapi/auth.ts +242 -1
- package/src/openapi/rating.ts +122 -16
- package/src/openapi/userdata.ts +115 -2
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ pnpm install @profcomff/api-uilib
|
|
|
18
18
|
Используйте для совершения запросов к <https://api.test.profcomff.com> и <https://api.profcomff.com>.
|
|
19
19
|
|
|
20
20
|
```ts
|
|
21
|
-
import { createClient } from "@profcomff/api-uilib";
|
|
21
|
+
import { createClient, setupAuth } from "@profcomff/api-uilib";
|
|
22
22
|
|
|
23
23
|
// Setup client with base API path
|
|
24
24
|
// You can use environment `import.meta.env.VITE_API_URL` for example
|
package/package.json
CHANGED
package/src/openapi/auth.ts
CHANGED
|
@@ -38,6 +38,106 @@ export interface paths {
|
|
|
38
38
|
patch?: never;
|
|
39
39
|
trace?: never;
|
|
40
40
|
};
|
|
41
|
+
"/auth/authentic": {
|
|
42
|
+
parameters: {
|
|
43
|
+
query?: never;
|
|
44
|
+
header?: never;
|
|
45
|
+
path?: never;
|
|
46
|
+
cookie?: never;
|
|
47
|
+
};
|
|
48
|
+
get?: never;
|
|
49
|
+
put?: never;
|
|
50
|
+
post?: never;
|
|
51
|
+
/**
|
|
52
|
+
* Unregister
|
|
53
|
+
* @description Отключает для пользователя метод входа
|
|
54
|
+
*/
|
|
55
|
+
delete: operations["_unregister_authentic_delete"];
|
|
56
|
+
options?: never;
|
|
57
|
+
head?: never;
|
|
58
|
+
patch?: never;
|
|
59
|
+
trace?: never;
|
|
60
|
+
};
|
|
61
|
+
"/auth/authentic/auth_url": {
|
|
62
|
+
parameters: {
|
|
63
|
+
query?: never;
|
|
64
|
+
header?: never;
|
|
65
|
+
path?: never;
|
|
66
|
+
cookie?: never;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Auth Url
|
|
70
|
+
* @description URL на который происходит редирект из приложения для авторизации на стороне провайдера
|
|
71
|
+
*/
|
|
72
|
+
get: operations["_auth_url_authentic_auth_url_get"];
|
|
73
|
+
put?: never;
|
|
74
|
+
post?: never;
|
|
75
|
+
delete?: never;
|
|
76
|
+
options?: never;
|
|
77
|
+
head?: never;
|
|
78
|
+
patch?: never;
|
|
79
|
+
trace?: never;
|
|
80
|
+
};
|
|
81
|
+
"/auth/authentic/login": {
|
|
82
|
+
parameters: {
|
|
83
|
+
query?: never;
|
|
84
|
+
header?: never;
|
|
85
|
+
path?: never;
|
|
86
|
+
cookie?: never;
|
|
87
|
+
};
|
|
88
|
+
get?: never;
|
|
89
|
+
put?: never;
|
|
90
|
+
/**
|
|
91
|
+
* Login
|
|
92
|
+
* @description Вход в пользователя с помощью аккаунта Authentic
|
|
93
|
+
*/
|
|
94
|
+
post: operations["_login_authentic_login_post"];
|
|
95
|
+
delete?: never;
|
|
96
|
+
options?: never;
|
|
97
|
+
head?: never;
|
|
98
|
+
patch?: never;
|
|
99
|
+
trace?: never;
|
|
100
|
+
};
|
|
101
|
+
"/auth/authentic/redirect_url": {
|
|
102
|
+
parameters: {
|
|
103
|
+
query?: never;
|
|
104
|
+
header?: never;
|
|
105
|
+
path?: never;
|
|
106
|
+
cookie?: never;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Redirect Url
|
|
110
|
+
* @description URL на который происходит редирект после завершения входа на стороне провайдера
|
|
111
|
+
*/
|
|
112
|
+
get: operations["_redirect_url_authentic_redirect_url_get"];
|
|
113
|
+
put?: never;
|
|
114
|
+
post?: never;
|
|
115
|
+
delete?: never;
|
|
116
|
+
options?: never;
|
|
117
|
+
head?: never;
|
|
118
|
+
patch?: never;
|
|
119
|
+
trace?: never;
|
|
120
|
+
};
|
|
121
|
+
"/auth/authentic/registration": {
|
|
122
|
+
parameters: {
|
|
123
|
+
query?: never;
|
|
124
|
+
header?: never;
|
|
125
|
+
path?: never;
|
|
126
|
+
cookie?: never;
|
|
127
|
+
};
|
|
128
|
+
get?: never;
|
|
129
|
+
put?: never;
|
|
130
|
+
/**
|
|
131
|
+
* Register
|
|
132
|
+
* @description Создает аккаунт или привязывает существующий
|
|
133
|
+
*/
|
|
134
|
+
post: operations["_register_authentic_registration_post"];
|
|
135
|
+
delete?: never;
|
|
136
|
+
options?: never;
|
|
137
|
+
head?: never;
|
|
138
|
+
patch?: never;
|
|
139
|
+
trace?: never;
|
|
140
|
+
};
|
|
41
141
|
"/auth/coder/{user_id}/link": {
|
|
42
142
|
parameters: {
|
|
43
143
|
query?: never;
|
|
@@ -1135,7 +1235,7 @@ export interface paths {
|
|
|
1135
1235
|
post?: never;
|
|
1136
1236
|
/**
|
|
1137
1237
|
* Delete User
|
|
1138
|
-
* @description Scopes: `["auth.user.delete"]`
|
|
1238
|
+
* @description Scopes: `["auth.user.delete"]` or `["auth.user.selfdelete"]` for self delete
|
|
1139
1239
|
*/
|
|
1140
1240
|
delete: operations["delete_user_user__user_id__delete"];
|
|
1141
1241
|
options?: never;
|
|
@@ -1381,6 +1481,17 @@ export interface components {
|
|
|
1381
1481
|
user_id: number;
|
|
1382
1482
|
};
|
|
1383
1483
|
/** OauthResponseSchema */
|
|
1484
|
+
auth_backend__auth_plugins__authentic__AuthenticAuth__OauthResponseSchema: {
|
|
1485
|
+
/** Code */
|
|
1486
|
+
code?: string | null;
|
|
1487
|
+
/** Id Token */
|
|
1488
|
+
id_token?: string | null;
|
|
1489
|
+
/** Scopes */
|
|
1490
|
+
scopes?: string[] | null;
|
|
1491
|
+
/** Session Name */
|
|
1492
|
+
session_name?: string | null;
|
|
1493
|
+
};
|
|
1494
|
+
/** OauthResponseSchema */
|
|
1384
1495
|
auth_backend__auth_plugins__github__GithubAuth__OauthResponseSchema: {
|
|
1385
1496
|
/** Code */
|
|
1386
1497
|
code?: string | null;
|
|
@@ -1466,6 +1577,8 @@ export interface components {
|
|
|
1466
1577
|
expires?: string | null;
|
|
1467
1578
|
/** Id */
|
|
1468
1579
|
id: number;
|
|
1580
|
+
/** Is Unbounded */
|
|
1581
|
+
is_unbounded?: boolean | null;
|
|
1469
1582
|
/**
|
|
1470
1583
|
* Last Activity
|
|
1471
1584
|
* Format: date-time
|
|
@@ -1634,6 +1747,8 @@ export interface components {
|
|
|
1634
1747
|
SessionPost: {
|
|
1635
1748
|
/** Expires */
|
|
1636
1749
|
expires?: string | null;
|
|
1750
|
+
/** Is Unbounded */
|
|
1751
|
+
is_unbounded?: boolean | null;
|
|
1637
1752
|
/**
|
|
1638
1753
|
* Scopes
|
|
1639
1754
|
* @default []
|
|
@@ -1803,6 +1918,132 @@ export interface operations {
|
|
|
1803
1918
|
};
|
|
1804
1919
|
};
|
|
1805
1920
|
};
|
|
1921
|
+
_unregister_authentic_delete: {
|
|
1922
|
+
parameters: {
|
|
1923
|
+
query?: never;
|
|
1924
|
+
header?: never;
|
|
1925
|
+
path?: never;
|
|
1926
|
+
cookie?: never;
|
|
1927
|
+
};
|
|
1928
|
+
requestBody?: never;
|
|
1929
|
+
responses: {
|
|
1930
|
+
/** @description Successful Response */
|
|
1931
|
+
200: {
|
|
1932
|
+
headers: {
|
|
1933
|
+
[name: string]: unknown;
|
|
1934
|
+
};
|
|
1935
|
+
content: {
|
|
1936
|
+
"application/json": unknown;
|
|
1937
|
+
};
|
|
1938
|
+
};
|
|
1939
|
+
};
|
|
1940
|
+
};
|
|
1941
|
+
_auth_url_authentic_auth_url_get: {
|
|
1942
|
+
parameters: {
|
|
1943
|
+
query?: never;
|
|
1944
|
+
header?: never;
|
|
1945
|
+
path?: never;
|
|
1946
|
+
cookie?: never;
|
|
1947
|
+
};
|
|
1948
|
+
requestBody?: never;
|
|
1949
|
+
responses: {
|
|
1950
|
+
/** @description Successful Response */
|
|
1951
|
+
200: {
|
|
1952
|
+
headers: {
|
|
1953
|
+
[name: string]: unknown;
|
|
1954
|
+
};
|
|
1955
|
+
content: {
|
|
1956
|
+
"application/json": components["schemas"]["UrlSchema"];
|
|
1957
|
+
};
|
|
1958
|
+
};
|
|
1959
|
+
};
|
|
1960
|
+
};
|
|
1961
|
+
_login_authentic_login_post: {
|
|
1962
|
+
parameters: {
|
|
1963
|
+
query?: never;
|
|
1964
|
+
header?: never;
|
|
1965
|
+
path?: never;
|
|
1966
|
+
cookie?: never;
|
|
1967
|
+
};
|
|
1968
|
+
requestBody: {
|
|
1969
|
+
content: {
|
|
1970
|
+
"application/json": components["schemas"]["auth_backend__auth_plugins__authentic__AuthenticAuth__OauthResponseSchema"];
|
|
1971
|
+
};
|
|
1972
|
+
};
|
|
1973
|
+
responses: {
|
|
1974
|
+
/** @description Successful Response */
|
|
1975
|
+
200: {
|
|
1976
|
+
headers: {
|
|
1977
|
+
[name: string]: unknown;
|
|
1978
|
+
};
|
|
1979
|
+
content: {
|
|
1980
|
+
"application/json": components["schemas"]["auth_backend__auth_method__session__Session"];
|
|
1981
|
+
};
|
|
1982
|
+
};
|
|
1983
|
+
/** @description Validation Error */
|
|
1984
|
+
422: {
|
|
1985
|
+
headers: {
|
|
1986
|
+
[name: string]: unknown;
|
|
1987
|
+
};
|
|
1988
|
+
content: {
|
|
1989
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
1990
|
+
};
|
|
1991
|
+
};
|
|
1992
|
+
};
|
|
1993
|
+
};
|
|
1994
|
+
_redirect_url_authentic_redirect_url_get: {
|
|
1995
|
+
parameters: {
|
|
1996
|
+
query?: never;
|
|
1997
|
+
header?: never;
|
|
1998
|
+
path?: never;
|
|
1999
|
+
cookie?: never;
|
|
2000
|
+
};
|
|
2001
|
+
requestBody?: never;
|
|
2002
|
+
responses: {
|
|
2003
|
+
/** @description Successful Response */
|
|
2004
|
+
200: {
|
|
2005
|
+
headers: {
|
|
2006
|
+
[name: string]: unknown;
|
|
2007
|
+
};
|
|
2008
|
+
content: {
|
|
2009
|
+
"application/json": components["schemas"]["UrlSchema"];
|
|
2010
|
+
};
|
|
2011
|
+
};
|
|
2012
|
+
};
|
|
2013
|
+
};
|
|
2014
|
+
_register_authentic_registration_post: {
|
|
2015
|
+
parameters: {
|
|
2016
|
+
query?: never;
|
|
2017
|
+
header?: never;
|
|
2018
|
+
path?: never;
|
|
2019
|
+
cookie?: never;
|
|
2020
|
+
};
|
|
2021
|
+
requestBody: {
|
|
2022
|
+
content: {
|
|
2023
|
+
"application/json": components["schemas"]["auth_backend__auth_plugins__authentic__AuthenticAuth__OauthResponseSchema"];
|
|
2024
|
+
};
|
|
2025
|
+
};
|
|
2026
|
+
responses: {
|
|
2027
|
+
/** @description Successful Response */
|
|
2028
|
+
200: {
|
|
2029
|
+
headers: {
|
|
2030
|
+
[name: string]: unknown;
|
|
2031
|
+
};
|
|
2032
|
+
content: {
|
|
2033
|
+
"application/json": components["schemas"]["auth_backend__auth_method__session__Session"];
|
|
2034
|
+
};
|
|
2035
|
+
};
|
|
2036
|
+
/** @description Validation Error */
|
|
2037
|
+
422: {
|
|
2038
|
+
headers: {
|
|
2039
|
+
[name: string]: unknown;
|
|
2040
|
+
};
|
|
2041
|
+
content: {
|
|
2042
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
2043
|
+
};
|
|
2044
|
+
};
|
|
2045
|
+
};
|
|
2046
|
+
};
|
|
1806
2047
|
_get_link_coder__user_id__link_get: {
|
|
1807
2048
|
parameters: {
|
|
1808
2049
|
query?: never;
|
package/src/openapi/rating.ts
CHANGED
|
@@ -25,14 +25,19 @@ export interface paths {
|
|
|
25
25
|
*
|
|
26
26
|
* `lecturer_id` - вернет все комментарии для преподавателя с конкретным id, по дефолту возвращает вообще все аппрувнутые комментарии.
|
|
27
27
|
*
|
|
28
|
+
* `user_id` - вернет все комментарии пользователя с конкретным id
|
|
29
|
+
*
|
|
28
30
|
* `unreviewed` - вернет все непроверенные комментарии, если True. По дефолту False.
|
|
29
31
|
*/
|
|
30
32
|
get: operations["get_comments_comment_get"];
|
|
31
33
|
put?: never;
|
|
32
34
|
/**
|
|
33
35
|
* Create Comment
|
|
34
|
-
* @description
|
|
36
|
+
* @description Scopes: `["rating.comment.import"]`
|
|
37
|
+
* Создает комментарий к преподавателю в базе данных RatingAPI
|
|
35
38
|
* Для создания комментария нужно быть авторизованным
|
|
39
|
+
*
|
|
40
|
+
* Для возможности создания комментария с указанием времени создания и изменения необходим скоуп ["rating.comment.import"]
|
|
36
41
|
*/
|
|
37
42
|
post: operations["create_comment_comment_post"];
|
|
38
43
|
delete?: never;
|
|
@@ -76,6 +81,27 @@ export interface paths {
|
|
|
76
81
|
patch: operations["review_comment_comment__uuid__patch"];
|
|
77
82
|
trace?: never;
|
|
78
83
|
};
|
|
84
|
+
"/rating/comment/import": {
|
|
85
|
+
parameters: {
|
|
86
|
+
query?: never;
|
|
87
|
+
header?: never;
|
|
88
|
+
path?: never;
|
|
89
|
+
cookie?: never;
|
|
90
|
+
};
|
|
91
|
+
get?: never;
|
|
92
|
+
put?: never;
|
|
93
|
+
/**
|
|
94
|
+
* Import Comments
|
|
95
|
+
* @description Scopes: `["rating.comment.import"]`
|
|
96
|
+
* Создает комментарии в базе данных RatingAPI
|
|
97
|
+
*/
|
|
98
|
+
post: operations["import_comments_comment_import_post"];
|
|
99
|
+
delete?: never;
|
|
100
|
+
options?: never;
|
|
101
|
+
head?: never;
|
|
102
|
+
patch?: never;
|
|
103
|
+
trace?: never;
|
|
104
|
+
};
|
|
79
105
|
"/rating/lecturer": {
|
|
80
106
|
parameters: {
|
|
81
107
|
query?: never;
|
|
@@ -85,22 +111,28 @@ export interface paths {
|
|
|
85
111
|
};
|
|
86
112
|
/**
|
|
87
113
|
* Get Lecturers
|
|
88
|
-
* @description
|
|
89
|
-
*
|
|
90
|
-
* `limit` - максимальное количество возвращаемых преподавателей
|
|
114
|
+
* @description `limit` - максимальное количество возвращаемых преподавателей
|
|
91
115
|
*
|
|
92
116
|
* `offset` - нижняя граница получения преподавателей, т.е. если по дефолту первым возвращается преподаватель с условным номером N, то при наличии ненулевого offset будет возвращаться преподаватель с номером N + offset
|
|
93
117
|
*
|
|
94
|
-
* `order_by` - возможные значения `
|
|
95
|
-
* Если передано `'
|
|
118
|
+
* `order_by` - возможные значения `"mark_kindness", "mark_freebie", "mark_clarity", "mark_general", "last_name"`.
|
|
119
|
+
* Если передано `'last_name'` - возвращается список преподавателей отсортированных по алфавиту по фамилиям
|
|
120
|
+
* Если передано `'mark_...'` - возвращается список преподавателей отсортированных по конкретной оценке
|
|
96
121
|
*
|
|
97
122
|
* `info` - возможные значения `'comments'`, `'mark'`.
|
|
98
123
|
* Если передано `'comments'`, то возвращаются одобренные комментарии к преподавателю.
|
|
99
124
|
* Если передано `'mark'`, то возвращаются общие средние оценки, а также суммарная средняя оценка по всем одобренным комментариям.
|
|
100
125
|
*
|
|
101
126
|
* `subject`
|
|
102
|
-
* Если передано `subject` - возвращает всех преподавателей, для которых переданное значение совпадает с их
|
|
127
|
+
* Если передано `subject` - возвращает всех преподавателей, для которых переданное значение совпадает с одним из их предметов преподавания.
|
|
103
128
|
* Также возвращает всех преподавателей, у которых есть комментарий с совпадающим с данным subject.
|
|
129
|
+
*
|
|
130
|
+
* `name`
|
|
131
|
+
* Поле для ФИО. Если передано `name` - возвращает всех преподователей, для которых нашлись совпадения с переданной строкой
|
|
132
|
+
*
|
|
133
|
+
* `asc_order`
|
|
134
|
+
* Если передано true, сортировать в порядке возрастания
|
|
135
|
+
* Иначе - в порядке убывания
|
|
104
136
|
*/
|
|
105
137
|
get: operations["get_lecturers_lecturer_get"];
|
|
106
138
|
put?: never;
|
|
@@ -170,10 +202,12 @@ export interface components {
|
|
|
170
202
|
mark_clarity: number;
|
|
171
203
|
/** Mark Freebie */
|
|
172
204
|
mark_freebie: number;
|
|
205
|
+
/** Mark General */
|
|
206
|
+
mark_general: number;
|
|
173
207
|
/** Mark Kindness */
|
|
174
208
|
mark_kindness: number;
|
|
175
209
|
/** Subject */
|
|
176
|
-
subject
|
|
210
|
+
subject?: string | null;
|
|
177
211
|
/** Text */
|
|
178
212
|
text: string;
|
|
179
213
|
/**
|
|
@@ -181,6 +215,8 @@ export interface components {
|
|
|
181
215
|
* Format: date-time
|
|
182
216
|
*/
|
|
183
217
|
update_ts: string;
|
|
218
|
+
/** User Id */
|
|
219
|
+
user_id?: number | null;
|
|
184
220
|
/**
|
|
185
221
|
* Uuid
|
|
186
222
|
* Format: uuid
|
|
@@ -201,8 +237,44 @@ export interface components {
|
|
|
201
237
|
/** Total */
|
|
202
238
|
total: number;
|
|
203
239
|
};
|
|
240
|
+
/** CommentImport */
|
|
241
|
+
CommentImport: {
|
|
242
|
+
/** Create Ts */
|
|
243
|
+
create_ts?: string | null;
|
|
244
|
+
/**
|
|
245
|
+
* Is Anonymous
|
|
246
|
+
* @default true
|
|
247
|
+
*/
|
|
248
|
+
is_anonymous: boolean;
|
|
249
|
+
/** Lecturer Id */
|
|
250
|
+
lecturer_id: number;
|
|
251
|
+
/** Mark Clarity */
|
|
252
|
+
mark_clarity: number;
|
|
253
|
+
/** Mark Freebie */
|
|
254
|
+
mark_freebie: number;
|
|
255
|
+
/** Mark Kindness */
|
|
256
|
+
mark_kindness: number;
|
|
257
|
+
/** Subject */
|
|
258
|
+
subject?: string | null;
|
|
259
|
+
/** Text */
|
|
260
|
+
text: string;
|
|
261
|
+
/** Update Ts */
|
|
262
|
+
update_ts?: string | null;
|
|
263
|
+
};
|
|
264
|
+
/** CommentImportAll */
|
|
265
|
+
CommentImportAll: {
|
|
266
|
+
/** Comments */
|
|
267
|
+
comments: components["schemas"]["CommentImport"][];
|
|
268
|
+
};
|
|
204
269
|
/** CommentPost */
|
|
205
270
|
CommentPost: {
|
|
271
|
+
/** Create Ts */
|
|
272
|
+
create_ts?: string | null;
|
|
273
|
+
/**
|
|
274
|
+
* Is Anonymous
|
|
275
|
+
* @default true
|
|
276
|
+
*/
|
|
277
|
+
is_anonymous: boolean;
|
|
206
278
|
/** Mark Clarity */
|
|
207
279
|
mark_clarity: number;
|
|
208
280
|
/** Mark Freebie */
|
|
@@ -213,6 +285,8 @@ export interface components {
|
|
|
213
285
|
subject: string;
|
|
214
286
|
/** Text */
|
|
215
287
|
text: string;
|
|
288
|
+
/** Update Ts */
|
|
289
|
+
update_ts?: string | null;
|
|
216
290
|
};
|
|
217
291
|
/** HTTPValidationError */
|
|
218
292
|
HTTPValidationError: {
|
|
@@ -241,8 +315,8 @@ export interface components {
|
|
|
241
315
|
mark_kindness?: number | null;
|
|
242
316
|
/** Middle Name */
|
|
243
317
|
middle_name: string;
|
|
244
|
-
/**
|
|
245
|
-
|
|
318
|
+
/** Subjects */
|
|
319
|
+
subjects?: string[] | null;
|
|
246
320
|
/** Timetable Id */
|
|
247
321
|
timetable_id: number;
|
|
248
322
|
};
|
|
@@ -270,8 +344,6 @@ export interface components {
|
|
|
270
344
|
last_name?: string | null;
|
|
271
345
|
/** Middle Name */
|
|
272
346
|
middle_name?: string | null;
|
|
273
|
-
/** Subject */
|
|
274
|
-
subject?: string | null;
|
|
275
347
|
/** Timetable Id */
|
|
276
348
|
timetable_id?: number | null;
|
|
277
349
|
};
|
|
@@ -285,10 +357,8 @@ export interface components {
|
|
|
285
357
|
last_name: string;
|
|
286
358
|
/** Middle Name */
|
|
287
359
|
middle_name: string;
|
|
288
|
-
/** Subject */
|
|
289
|
-
subject?: string | null;
|
|
290
360
|
/** Timetable Id */
|
|
291
|
-
timetable_id
|
|
361
|
+
timetable_id?: number | null;
|
|
292
362
|
};
|
|
293
363
|
/** StatusResponseModel */
|
|
294
364
|
StatusResponseModel: {
|
|
@@ -325,6 +395,7 @@ export interface operations {
|
|
|
325
395
|
offset?: number;
|
|
326
396
|
order_by?: "create_ts"[];
|
|
327
397
|
unreviewed?: boolean;
|
|
398
|
+
user_id?: number | null;
|
|
328
399
|
};
|
|
329
400
|
header?: never;
|
|
330
401
|
path?: never;
|
|
@@ -482,13 +553,48 @@ export interface operations {
|
|
|
482
553
|
};
|
|
483
554
|
};
|
|
484
555
|
};
|
|
556
|
+
import_comments_comment_import_post: {
|
|
557
|
+
parameters: {
|
|
558
|
+
query?: never;
|
|
559
|
+
header?: never;
|
|
560
|
+
path?: never;
|
|
561
|
+
cookie?: never;
|
|
562
|
+
};
|
|
563
|
+
requestBody: {
|
|
564
|
+
content: {
|
|
565
|
+
"application/json": components["schemas"]["CommentImportAll"];
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
responses: {
|
|
569
|
+
/** @description Successful Response */
|
|
570
|
+
200: {
|
|
571
|
+
headers: {
|
|
572
|
+
[name: string]: unknown;
|
|
573
|
+
};
|
|
574
|
+
content: {
|
|
575
|
+
"application/json": components["schemas"]["CommentGetAll"];
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
/** @description Validation Error */
|
|
579
|
+
422: {
|
|
580
|
+
headers: {
|
|
581
|
+
[name: string]: unknown;
|
|
582
|
+
};
|
|
583
|
+
content: {
|
|
584
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
};
|
|
588
|
+
};
|
|
485
589
|
get_lecturers_lecturer_get: {
|
|
486
590
|
parameters: {
|
|
487
591
|
query?: {
|
|
592
|
+
asc_order?: boolean;
|
|
488
593
|
info?: ("comments" | "mark")[];
|
|
489
594
|
limit?: number;
|
|
595
|
+
name?: string;
|
|
490
596
|
offset?: number;
|
|
491
|
-
order_by?:
|
|
597
|
+
order_by?: "mark_kindness" | "mark_freebie" | "mark_clarity" | "mark_general" | "last_name";
|
|
492
598
|
subject?: string;
|
|
493
599
|
};
|
|
494
600
|
header?: never;
|
package/src/openapi/userdata.ts
CHANGED
|
@@ -21,6 +21,8 @@ export interface paths {
|
|
|
21
21
|
* Create Category
|
|
22
22
|
* @description Создать категорию пользовательских данных. Получить категорию можно будет со скоупами, имена которых в category_inp.scopes
|
|
23
23
|
* Ручка обновит документацию
|
|
24
|
+
*
|
|
25
|
+
* Scopes: `["userdata.category.create"]`
|
|
24
26
|
*/
|
|
25
27
|
post: operations["create_category_category_post"];
|
|
26
28
|
delete?: never;
|
|
@@ -45,6 +47,8 @@ export interface paths {
|
|
|
45
47
|
/**
|
|
46
48
|
* Create Param
|
|
47
49
|
* @description Создать поле внутри категории. Ответ на пользовательские данные будет такой {..., category: {...,param: '', ...}}
|
|
50
|
+
*
|
|
51
|
+
* Scopes: `["userdata.param.create"]`
|
|
48
52
|
*/
|
|
49
53
|
post: operations["create_param_category__category_id__param_post"];
|
|
50
54
|
delete?: never;
|
|
@@ -70,6 +74,8 @@ export interface paths {
|
|
|
70
74
|
/**
|
|
71
75
|
* Delete Param
|
|
72
76
|
* @description Удалить параметр внутри категории
|
|
77
|
+
*
|
|
78
|
+
* Scopes: `["userdata.param.delete"]`
|
|
73
79
|
*/
|
|
74
80
|
delete: operations["delete_param_category__category_id__param__id__delete"];
|
|
75
81
|
options?: never;
|
|
@@ -77,6 +83,8 @@ export interface paths {
|
|
|
77
83
|
/**
|
|
78
84
|
* Patch Param
|
|
79
85
|
* @description Обновить параметр внутри категории
|
|
86
|
+
*
|
|
87
|
+
* Scopes: `["userdata.param.update"]`
|
|
80
88
|
*/
|
|
81
89
|
patch: operations["patch_param_category__category_id__param__id__patch"];
|
|
82
90
|
trace?: never;
|
|
@@ -98,6 +106,8 @@ export interface paths {
|
|
|
98
106
|
/**
|
|
99
107
|
* Delete Category
|
|
100
108
|
* @description Удалить категорию
|
|
109
|
+
*
|
|
110
|
+
* Scopes: `["userdata.category.delete"]`
|
|
101
111
|
*/
|
|
102
112
|
delete: operations["delete_category_category__id__delete"];
|
|
103
113
|
options?: never;
|
|
@@ -105,6 +115,8 @@ export interface paths {
|
|
|
105
115
|
/**
|
|
106
116
|
* Patch Category
|
|
107
117
|
* @description Обновить категорию
|
|
118
|
+
*
|
|
119
|
+
* Scopes: `["userdata.category.update"]`
|
|
108
120
|
*/
|
|
109
121
|
patch: operations["patch_category_category__id__patch"];
|
|
110
122
|
trace?: never;
|
|
@@ -125,6 +137,8 @@ export interface paths {
|
|
|
125
137
|
/**
|
|
126
138
|
* Create Source
|
|
127
139
|
* @description Создать источник данных
|
|
140
|
+
*
|
|
141
|
+
* Scopes: `["userdata.source.create"]`
|
|
128
142
|
*/
|
|
129
143
|
post: operations["create_source_source_post"];
|
|
130
144
|
delete?: never;
|
|
@@ -150,6 +164,8 @@ export interface paths {
|
|
|
150
164
|
/**
|
|
151
165
|
* Delete Source
|
|
152
166
|
* @description Удалить источник данных
|
|
167
|
+
*
|
|
168
|
+
* Scopes: `["userdata.source.delete"]`
|
|
153
169
|
*/
|
|
154
170
|
delete: operations["delete_source_source__id__delete"];
|
|
155
171
|
options?: never;
|
|
@@ -157,10 +173,35 @@ export interface paths {
|
|
|
157
173
|
/**
|
|
158
174
|
* Patch Source
|
|
159
175
|
* @description Обновить источник данных
|
|
176
|
+
*
|
|
177
|
+
* Scopes: `["userdata.source.update"]`
|
|
160
178
|
*/
|
|
161
179
|
patch: operations["patch_source_source__id__patch"];
|
|
162
180
|
trace?: never;
|
|
163
181
|
};
|
|
182
|
+
"/userdata/user": {
|
|
183
|
+
parameters: {
|
|
184
|
+
query?: never;
|
|
185
|
+
header?: never;
|
|
186
|
+
path?: never;
|
|
187
|
+
cookie?: never;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Get Users Info
|
|
191
|
+
* @description Получить информацию о пользователях.
|
|
192
|
+
* :param users: список id юзеров, про которых нужно вернуть информацию
|
|
193
|
+
* :param categories: список id категорий, параметры которых нужно вернуть
|
|
194
|
+
* :return: список данных о пользователях и данных категориях
|
|
195
|
+
*/
|
|
196
|
+
get: operations["get_users_info_user_get"];
|
|
197
|
+
put?: never;
|
|
198
|
+
post?: never;
|
|
199
|
+
delete?: never;
|
|
200
|
+
options?: never;
|
|
201
|
+
head?: never;
|
|
202
|
+
patch?: never;
|
|
203
|
+
trace?: never;
|
|
204
|
+
};
|
|
164
205
|
"/userdata/user/{id}": {
|
|
165
206
|
parameters: {
|
|
166
207
|
query?: never;
|
|
@@ -189,7 +230,7 @@ export interface paths {
|
|
|
189
230
|
* Чтобы обновить от имени админиа, надо иметь скоуп `userdata.info.admin`
|
|
190
231
|
* Чтобы обновить неизменяемую информацию надо обладать скоупом `userdata.info.update`
|
|
191
232
|
* Для обновления своей информации(источник `user`) не нужны скоупы на обновление соответствующих категорий
|
|
192
|
-
* Для обновления чужой информации от имени админа(источник
|
|
233
|
+
* Для обновления чужой информации от имени админа(источник `admin`)
|
|
193
234
|
* нужны скоупы на обновление всех указанных в теле запроса категорий пользовательских данных данных
|
|
194
235
|
*/
|
|
195
236
|
post: operations["update_user_user__id__post"];
|
|
@@ -234,6 +275,17 @@ export interface components {
|
|
|
234
275
|
/** Update Scope */
|
|
235
276
|
update_scope?: string | null;
|
|
236
277
|
};
|
|
278
|
+
/** ExtendedUserInfo */
|
|
279
|
+
ExtendedUserInfo: {
|
|
280
|
+
/** Category */
|
|
281
|
+
category: string;
|
|
282
|
+
/** Param */
|
|
283
|
+
param: string;
|
|
284
|
+
/** User Id */
|
|
285
|
+
user_id: number;
|
|
286
|
+
/** Value */
|
|
287
|
+
value?: string | null;
|
|
288
|
+
};
|
|
237
289
|
/** HTTPValidationError */
|
|
238
290
|
HTTPValidationError: {
|
|
239
291
|
/** Detail */
|
|
@@ -252,6 +304,13 @@ export interface components {
|
|
|
252
304
|
/** Name */
|
|
253
305
|
name: string;
|
|
254
306
|
type: components["schemas"]["ViewType"];
|
|
307
|
+
/** Validation */
|
|
308
|
+
validation?: string | null;
|
|
309
|
+
/**
|
|
310
|
+
* Visible In User Response
|
|
311
|
+
* @default true
|
|
312
|
+
*/
|
|
313
|
+
visible_in_user_response: boolean;
|
|
255
314
|
};
|
|
256
315
|
/** ParamPatch */
|
|
257
316
|
ParamPatch: {
|
|
@@ -262,6 +321,13 @@ export interface components {
|
|
|
262
321
|
/** Name */
|
|
263
322
|
name?: string | null;
|
|
264
323
|
type?: components["schemas"]["ViewType"] | null;
|
|
324
|
+
/** Validation */
|
|
325
|
+
validation?: string | null;
|
|
326
|
+
/**
|
|
327
|
+
* Visible In User Response
|
|
328
|
+
* @default true
|
|
329
|
+
*/
|
|
330
|
+
visible_in_user_response: boolean;
|
|
265
331
|
};
|
|
266
332
|
/** ParamPost */
|
|
267
333
|
ParamPost: {
|
|
@@ -272,6 +338,13 @@ export interface components {
|
|
|
272
338
|
/** Name */
|
|
273
339
|
name: string;
|
|
274
340
|
type: components["schemas"]["ViewType"];
|
|
341
|
+
/** Validation */
|
|
342
|
+
validation?: string | null;
|
|
343
|
+
/**
|
|
344
|
+
* Visible In User Response
|
|
345
|
+
* @default true
|
|
346
|
+
*/
|
|
347
|
+
visible_in_user_response: boolean;
|
|
275
348
|
};
|
|
276
349
|
/** SourceGet */
|
|
277
350
|
SourceGet: {
|
|
@@ -326,6 +399,11 @@ export interface components {
|
|
|
326
399
|
/** Source */
|
|
327
400
|
source: string;
|
|
328
401
|
};
|
|
402
|
+
/** UsersInfoGet */
|
|
403
|
+
UsersInfoGet: {
|
|
404
|
+
/** Items */
|
|
405
|
+
items: components["schemas"]["ExtendedUserInfo"][];
|
|
406
|
+
};
|
|
329
407
|
/** ValidationError */
|
|
330
408
|
ValidationError: {
|
|
331
409
|
/** Location */
|
|
@@ -830,9 +908,44 @@ export interface operations {
|
|
|
830
908
|
};
|
|
831
909
|
};
|
|
832
910
|
};
|
|
911
|
+
get_users_info_user_get: {
|
|
912
|
+
parameters: {
|
|
913
|
+
query: {
|
|
914
|
+
additional_data?: number[];
|
|
915
|
+
categories: number[];
|
|
916
|
+
users: number[];
|
|
917
|
+
};
|
|
918
|
+
header?: never;
|
|
919
|
+
path?: never;
|
|
920
|
+
cookie?: never;
|
|
921
|
+
};
|
|
922
|
+
requestBody?: never;
|
|
923
|
+
responses: {
|
|
924
|
+
/** @description Successful Response */
|
|
925
|
+
200: {
|
|
926
|
+
headers: {
|
|
927
|
+
[name: string]: unknown;
|
|
928
|
+
};
|
|
929
|
+
content: {
|
|
930
|
+
"application/json": components["schemas"]["UsersInfoGet"];
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
/** @description Validation Error */
|
|
934
|
+
422: {
|
|
935
|
+
headers: {
|
|
936
|
+
[name: string]: unknown;
|
|
937
|
+
};
|
|
938
|
+
content: {
|
|
939
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
940
|
+
};
|
|
941
|
+
};
|
|
942
|
+
};
|
|
943
|
+
};
|
|
833
944
|
get_user_info_user__id__get: {
|
|
834
945
|
parameters: {
|
|
835
|
-
query?:
|
|
946
|
+
query?: {
|
|
947
|
+
additional_data?: number[];
|
|
948
|
+
};
|
|
836
949
|
header?: never;
|
|
837
950
|
path: {
|
|
838
951
|
id: number;
|