@hubex/mcp 0.2.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.
Files changed (92) hide show
  1. package/.env.example +54 -0
  2. package/CONNECTING.md +260 -0
  3. package/README.md +266 -0
  4. package/dist/auth.js +226 -0
  5. package/dist/config.js +120 -0
  6. package/dist/generated/manifest.js +3643 -0
  7. package/dist/guides/field-notes.json +27 -0
  8. package/dist/guides/loader.js +32 -0
  9. package/dist/guides/service-map.js +6 -0
  10. package/dist/http.js +93 -0
  11. package/dist/index/store.js +134 -0
  12. package/dist/index/types.js +1 -0
  13. package/dist/index.js +20 -0
  14. package/dist/paths.js +20 -0
  15. package/dist/pii/fields.js +100 -0
  16. package/dist/pii/mask.js +50 -0
  17. package/dist/pii/strategies.js +88 -0
  18. package/dist/schema/build-index.js +67 -0
  19. package/dist/schema/deref.js +87 -0
  20. package/dist/schema/describe.js +65 -0
  21. package/dist/server.js +62 -0
  22. package/dist/token-prompt.js +41 -0
  23. package/dist/tools/curated.js +151 -0
  24. package/dist/tools/discovery.js +187 -0
  25. package/dist/tools/guides.js +126 -0
  26. package/dist/tools/registry.js +37 -0
  27. package/dist/tools/request.js +170 -0
  28. package/dist/tools/types.js +1 -0
  29. package/docs/guides/assets.md +334 -0
  30. package/docs/guides/attributes.md +125 -0
  31. package/docs/guides/checklisttemplates.md +154 -0
  32. package/docs/guides/companies.md +57 -0
  33. package/docs/guides/dictionaries.md +64 -0
  34. package/docs/guides/lifecycle.md +263 -0
  35. package/docs/guides/materials.md +135 -0
  36. package/docs/guides/notifications.md +184 -0
  37. package/docs/guides/roles.md +125 -0
  38. package/docs/guides/sla.md +130 -0
  39. package/docs/guides/start.md +67 -0
  40. package/docs/guides/taskchecklists.md +149 -0
  41. package/docs/guides/taskcreate.md +260 -0
  42. package/docs/guides/taskedit.md +277 -0
  43. package/docs/guides/tasktypes.md +156 -0
  44. package/docs/guides/users.md +71 -0
  45. package/generated/index.dev.json +18776 -0
  46. package/generated/index.prod.json +18858 -0
  47. package/package.json +48 -0
  48. package/swagger/dev/ADM.json +27777 -0
  49. package/swagger/dev/AUTH.json +1739 -0
  50. package/swagger/dev/AUTHN.json +1250 -0
  51. package/swagger/dev/AUTHZ.json +1404 -0
  52. package/swagger/dev/CM.json +309 -0
  53. package/swagger/dev/COMMON.json +6543 -0
  54. package/swagger/dev/ES.json +28029 -0
  55. package/swagger/dev/EXPORT.json +4575 -0
  56. package/swagger/dev/IMPORT.json +1479 -0
  57. package/swagger/dev/LIC.json +224 -0
  58. package/swagger/dev/MSG.json +7883 -0
  59. package/swagger/dev/NEWS.json +348 -0
  60. package/swagger/dev/PA.json +5981 -0
  61. package/swagger/dev/PMP.json +3196 -0
  62. package/swagger/dev/PROXY.json +416 -0
  63. package/swagger/dev/REPORT.json +3921 -0
  64. package/swagger/dev/SC.json +3771 -0
  65. package/swagger/dev/SLA.json +2837 -0
  66. package/swagger/dev/TSTG.json +4981 -0
  67. package/swagger/dev/UI.json +4720 -0
  68. package/swagger/dev/WH.json +16796 -0
  69. package/swagger/dev/WORK.json +36024 -0
  70. package/swagger/dev/WSP.json +1612 -0
  71. package/swagger/prod/ADM.json +27777 -0
  72. package/swagger/prod/AUTH.json +1308 -0
  73. package/swagger/prod/AUTHN.json +2710 -0
  74. package/swagger/prod/AUTHZ.json +896 -0
  75. package/swagger/prod/CM.json +162 -0
  76. package/swagger/prod/COMMON.json +4910 -0
  77. package/swagger/prod/ES.json +28029 -0
  78. package/swagger/prod/EXPORT.json +3091 -0
  79. package/swagger/prod/LIC.json +123 -0
  80. package/swagger/prod/MSG.json +6239 -0
  81. package/swagger/prod/NEWS.json +295 -0
  82. package/swagger/prod/PA.json +5123 -0
  83. package/swagger/prod/PMP.json +2978 -0
  84. package/swagger/prod/PROXY.json +250 -0
  85. package/swagger/prod/REPORT.json +3729 -0
  86. package/swagger/prod/SC.json +3771 -0
  87. package/swagger/prod/SLA.json +2201 -0
  88. package/swagger/prod/TSTG.json +4220 -0
  89. package/swagger/prod/UI.json +3879 -0
  90. package/swagger/prod/WH.json +16730 -0
  91. package/swagger/prod/WORK.json +35994 -0
  92. package/swagger/prod/WSP.json +1468 -0
@@ -0,0 +1,1739 @@
1
+ {
2
+ "openapi": "3.0.1",
3
+ "info": {
4
+ "title": "Authenticatin and authorization API for HubEx",
5
+ "description": "Performs all of the operations, necessary to authenticate and authorize a user as a valid tenant member. Offers an API for registering, verifying e-mail, changing password, etc.",
6
+ "contact": {
7
+ "name": "SmartService Backend Team",
8
+ "email": "fmbackend@melston.ru"
9
+ },
10
+ "version": "v1.0.0.0"
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "/AUTH"
15
+ }
16
+ ],
17
+ "paths": {
18
+ "/Accounts/this/applications": {
19
+ "get": {
20
+ "tags": [
21
+ "Accounts"
22
+ ],
23
+ "summary": "Приложения учетной записи",
24
+ "description": "Поддерживает ограничение результата через заголовок `Range`.\r\n \r\n## Пример запроса:\r\n```text\r\nGET /Accounts/this/applications\r\nAuthorization: Bearer <access-token>\r\nRange: Offset=0; Fetch=25\r\n```\r\n \r\n## Пример успешного ответа (200):\r\n```json\r\n[\r\n {\r\n \"client\": {\r\n \"id\": 1,\r\n \"uniqueClientIdentifier\": \"abc-123-def-456\",\r\n \"agent\": \"Android 14\",\r\n \"clientType\": { \"id\": 1, \"name\": \"Mobile\" }\r\n },\r\n \"application\": {\r\n \"id\": 2,\r\n \"name\": \"HubEx Mobile\",\r\n \"version\": \"3.5.0\"\r\n },\r\n \"pushToken\": \"fcm-token-xyz\",\r\n \"timestamp\": \"2026-08-21T08:00:00Z\"\r\n }\r\n]\r\n```\r\n \r\n## Пример успешного ответа (206):\r\nТело ответа имеет тот же формат, что и для `200`, но содержит только часть диапазона. Заголовок `Content-Range` указывает общее количество.\r\n \r\n## Негативные сценарии:\r\n- 204 NoContent: приложения не найдены.\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `AccountClientApplicationList`.",
25
+ "parameters": [
26
+ {
27
+ "name": "X-Application-ID",
28
+ "in": "header",
29
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
30
+ "schema": {
31
+ "enum": [
32
+ 1,
33
+ 2,
34
+ 3,
35
+ 4,
36
+ 5,
37
+ 6
38
+ ],
39
+ "type": "integer",
40
+ "format": "int32",
41
+ "default": 3,
42
+ "x-enumNames": [
43
+ "EngineerMobile",
44
+ "CustomerMobile",
45
+ "MainWeb",
46
+ "AdminWeb",
47
+ "Api",
48
+ "PlateWeb"
49
+ ]
50
+ }
51
+ }
52
+ ],
53
+ "responses": {
54
+ "200": {
55
+ "description": "Список приложений успешно получен.",
56
+ "content": {
57
+ "text/plain": {
58
+ "schema": {
59
+ "type": "array",
60
+ "items": {
61
+ "$ref": "#/components/schemas/ApplicationListResult"
62
+ }
63
+ }
64
+ },
65
+ "application/json": {
66
+ "schema": {
67
+ "type": "array",
68
+ "items": {
69
+ "$ref": "#/components/schemas/ApplicationListResult"
70
+ }
71
+ }
72
+ },
73
+ "text/json": {
74
+ "schema": {
75
+ "type": "array",
76
+ "items": {
77
+ "$ref": "#/components/schemas/ApplicationListResult"
78
+ }
79
+ }
80
+ }
81
+ }
82
+ },
83
+ "206": {
84
+ "description": "Возвращена часть списка в пределах запрошенного диапазона.",
85
+ "content": {
86
+ "text/plain": {
87
+ "schema": {
88
+ "type": "array",
89
+ "items": {
90
+ "$ref": "#/components/schemas/ApplicationListResult"
91
+ }
92
+ }
93
+ },
94
+ "application/json": {
95
+ "schema": {
96
+ "type": "array",
97
+ "items": {
98
+ "$ref": "#/components/schemas/ApplicationListResult"
99
+ }
100
+ }
101
+ },
102
+ "text/json": {
103
+ "schema": {
104
+ "type": "array",
105
+ "items": {
106
+ "$ref": "#/components/schemas/ApplicationListResult"
107
+ }
108
+ }
109
+ }
110
+ }
111
+ },
112
+ "204": {
113
+ "description": "Приложения не найдены."
114
+ },
115
+ "401": {
116
+ "description": "Отсутствует или некорректен Bearer-токен."
117
+ },
118
+ "403": {
119
+ "description": "Недостаточно прав для просмотра приложений."
120
+ }
121
+ },
122
+ "security": [
123
+ {
124
+ "Bearer": [ ]
125
+ }
126
+ ]
127
+ },
128
+ "put": {
129
+ "tags": [
130
+ "Accounts"
131
+ ],
132
+ "summary": "Актуализация данных о приложениях текущей учетной записи",
133
+ "description": "## Пример запроса:\r\n```json\r\nPUT /Accounts/this/applications\r\nAuthorization: Bearer <access-token>\r\n \r\n{\r\n \"clientTypeID\": 1,\r\n \"agent\": \"Android 14\",\r\n \"applicationVersion\": \"3.5.0\",\r\n \"pushToken\": \"fcm-token-xyz\"\r\n}\r\n```\r\n \r\n## Пример успешного ответа (202):\r\nТело ответа пустое.\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: отсутствует идентификатор учётной записи и участника тенанта в токене.",
134
+ "parameters": [
135
+ {
136
+ "name": "X-Application-ID",
137
+ "in": "header",
138
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
139
+ "schema": {
140
+ "enum": [
141
+ 1,
142
+ 2,
143
+ 3,
144
+ 4,
145
+ 5,
146
+ 6
147
+ ],
148
+ "type": "integer",
149
+ "format": "int32",
150
+ "default": 3,
151
+ "x-enumNames": [
152
+ "EngineerMobile",
153
+ "CustomerMobile",
154
+ "MainWeb",
155
+ "AdminWeb",
156
+ "Api",
157
+ "PlateWeb"
158
+ ]
159
+ }
160
+ }
161
+ ],
162
+ "requestBody": {
163
+ "description": "Данные приложения для актуализации.",
164
+ "content": {
165
+ "application/json-patch+json": {
166
+ "schema": {
167
+ "$ref": "#/components/schemas/AUTHACAMergeData"
168
+ }
169
+ },
170
+ "application/json": {
171
+ "schema": {
172
+ "$ref": "#/components/schemas/AUTHACAMergeData"
173
+ }
174
+ },
175
+ "text/json": {
176
+ "schema": {
177
+ "$ref": "#/components/schemas/AUTHACAMergeData"
178
+ }
179
+ },
180
+ "application/*+json": {
181
+ "schema": {
182
+ "$ref": "#/components/schemas/AUTHACAMergeData"
183
+ }
184
+ }
185
+ }
186
+ },
187
+ "responses": {
188
+ "202": {
189
+ "description": "Данные приложения приняты к обработке."
190
+ },
191
+ "401": {
192
+ "description": "Не удалось определить учётную запись из токена."
193
+ },
194
+ "403": {
195
+ "description": "Forbidden"
196
+ }
197
+ },
198
+ "security": [
199
+ {
200
+ "Bearer": [ ]
201
+ }
202
+ ]
203
+ },
204
+ "delete": {
205
+ "tags": [
206
+ "Accounts"
207
+ ],
208
+ "summary": "Отвязка приложения и устройства от текущей учетной записи",
209
+ "description": "## Пример запроса:\r\n```json\r\nDELETE /Accounts/this/applications\r\nAuthorization: Bearer <access-token>\r\n \r\n{\r\n \"uniqueClientIdentifier\": \"abc-123-def-456\",\r\n \"applicationID\": 2\r\n}\r\n```\r\n \r\n## Пример успешного ответа (202):\r\nТело ответа пустое.\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: отсутствует идентификатор учётной записи и участника тенанта в токене.",
210
+ "parameters": [
211
+ {
212
+ "name": "X-Application-ID",
213
+ "in": "header",
214
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
215
+ "schema": {
216
+ "enum": [
217
+ 1,
218
+ 2,
219
+ 3,
220
+ 4,
221
+ 5,
222
+ 6
223
+ ],
224
+ "type": "integer",
225
+ "format": "int32",
226
+ "default": 3,
227
+ "x-enumNames": [
228
+ "EngineerMobile",
229
+ "CustomerMobile",
230
+ "MainWeb",
231
+ "AdminWeb",
232
+ "Api",
233
+ "PlateWeb"
234
+ ]
235
+ }
236
+ }
237
+ ],
238
+ "requestBody": {
239
+ "description": "Данные приложения для отвязки.",
240
+ "content": {
241
+ "application/json-patch+json": {
242
+ "schema": {
243
+ "$ref": "#/components/schemas/AUTHACARemoveData"
244
+ }
245
+ },
246
+ "application/json": {
247
+ "schema": {
248
+ "$ref": "#/components/schemas/AUTHACARemoveData"
249
+ }
250
+ },
251
+ "text/json": {
252
+ "schema": {
253
+ "$ref": "#/components/schemas/AUTHACARemoveData"
254
+ }
255
+ },
256
+ "application/*+json": {
257
+ "schema": {
258
+ "$ref": "#/components/schemas/AUTHACARemoveData"
259
+ }
260
+ }
261
+ }
262
+ },
263
+ "responses": {
264
+ "202": {
265
+ "description": "Запрос на отвязку принят."
266
+ },
267
+ "401": {
268
+ "description": "Не удалось определить учётную запись из токена."
269
+ },
270
+ "403": {
271
+ "description": "Forbidden"
272
+ }
273
+ },
274
+ "security": [
275
+ {
276
+ "Bearer": [ ]
277
+ }
278
+ ]
279
+ }
280
+ },
281
+ "/Accounts/logout": {
282
+ "post": {
283
+ "tags": [
284
+ "Accounts"
285
+ ],
286
+ "summary": "Выход из системы. Метод можно вызывать с просроченным токеном.",
287
+ "description": "## Пример запроса:\r\n```json\r\nPOST /Accounts/logout\r\nAuthorization: Bearer <access-token>\r\n \r\n{\r\n \"uniqueClientIdentifier\": \"abc-123-def-456\",\r\n \"applicationID\": 2\r\n}\r\n```\r\n \r\n## Пример успешного ответа (200):\r\nТело ответа пустое.\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: токен не содержит идентификатор учётной записи или участника тенанта.\r\n- 409 Conflict: отсутствует или некорректен заголовок Authorization, либо тело запроса не указано.",
288
+ "parameters": [
289
+ {
290
+ "name": "X-Application-ID",
291
+ "in": "header",
292
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
293
+ "schema": {
294
+ "enum": [
295
+ 1,
296
+ 2,
297
+ 3,
298
+ 4,
299
+ 5,
300
+ 6
301
+ ],
302
+ "type": "integer",
303
+ "format": "int32",
304
+ "default": 3,
305
+ "x-enumNames": [
306
+ "EngineerMobile",
307
+ "CustomerMobile",
308
+ "MainWeb",
309
+ "AdminWeb",
310
+ "Api",
311
+ "PlateWeb"
312
+ ]
313
+ }
314
+ }
315
+ ],
316
+ "requestBody": {
317
+ "description": "Данные клиентского приложения для выхода.",
318
+ "content": {
319
+ "application/json-patch+json": {
320
+ "schema": {
321
+ "$ref": "#/components/schemas/BaseLogoutData"
322
+ }
323
+ },
324
+ "application/json": {
325
+ "schema": {
326
+ "$ref": "#/components/schemas/BaseLogoutData"
327
+ }
328
+ },
329
+ "text/json": {
330
+ "schema": {
331
+ "$ref": "#/components/schemas/BaseLogoutData"
332
+ }
333
+ },
334
+ "application/*+json": {
335
+ "schema": {
336
+ "$ref": "#/components/schemas/BaseLogoutData"
337
+ }
338
+ }
339
+ }
340
+ },
341
+ "responses": {
342
+ "200": {
343
+ "description": "Выход выполнен успешно."
344
+ },
345
+ "401": {
346
+ "description": "Не удалось определить учётную запись или участника тенанта из токена."
347
+ },
348
+ "409": {
349
+ "description": "Некорректный Authorization или тело запроса."
350
+ }
351
+ }
352
+ }
353
+ },
354
+ "/Accounts/register": {
355
+ "post": {
356
+ "tags": [
357
+ "Accounts"
358
+ ],
359
+ "summary": "Создаёт аккаунт с указанной электронной почтой (если ещё не создан),\r\nблокирует его по причине непройденной верификации почты и отправляет\r\nнотификацию для отправки письма или SMS со ссылкой для верификации.",
360
+ "description": "## Пример запроса:\r\n```json\r\nPOST /Accounts/register\r\nAuthorization: Bearer <access-token>\r\n \r\n{\r\n \"email\": \"user%40example.com\"\r\n}\r\n```\r\n \r\n## Пример успешного ответа (200) — существующая учётная запись:\r\n```json\r\n{\r\n \"id\": 1001,\r\n \"verificationRequestValidTill\": \"2026-08-21T12:00:00Z\",\r\n \"isEmailVerified\": false,\r\n \"isMobilePhoneVerified\": false,\r\n \"isPasswordDefined\": false,\r\n \"isNewAccount\": false\r\n}\r\n```\r\n \r\n## Пример успешного ответа (202) — новая учётная запись (email или SMS):\r\n```json\r\n{\r\n \"id\": 1001,\r\n \"verificationRequestValidTill\": \"2026-08-21T12:00:00Z\",\r\n \"isEmailVerified\": false,\r\n \"isMobilePhoneVerified\": false,\r\n \"isPasswordDefined\": false,\r\n \"isNewAccount\": true\r\n}\r\n```\r\nОтправляется уведомление для верификации (письмо или SMS).\r\n \r\n## Пример успешного ответа (202) — новая учётная запись (domainLogin):\r\nТело ответа аналогично примеру выше с `\"isNewAccount\": true`. Уведомление **не отправляется**.\r\n \r\n## Негативные сценарии:\r\n- 409 Conflict: тело запроса не указано, ошибки валидации, не указаны email/телефон/domainLogin или указаны некорректные данные.",
361
+ "parameters": [
362
+ {
363
+ "name": "X-Application-ID",
364
+ "in": "header",
365
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
366
+ "schema": {
367
+ "enum": [
368
+ 1,
369
+ 2,
370
+ 3,
371
+ 4,
372
+ 5,
373
+ 6
374
+ ],
375
+ "type": "integer",
376
+ "format": "int32",
377
+ "default": 3,
378
+ "x-enumNames": [
379
+ "EngineerMobile",
380
+ "CustomerMobile",
381
+ "MainWeb",
382
+ "AdminWeb",
383
+ "Api",
384
+ "PlateWeb"
385
+ ]
386
+ }
387
+ }
388
+ ],
389
+ "requestBody": {
390
+ "description": "Данные для регистрации учётной записи.",
391
+ "content": {
392
+ "application/json-patch+json": {
393
+ "schema": {
394
+ "$ref": "#/components/schemas/CreateData"
395
+ }
396
+ },
397
+ "application/json": {
398
+ "schema": {
399
+ "$ref": "#/components/schemas/CreateData"
400
+ }
401
+ },
402
+ "text/json": {
403
+ "schema": {
404
+ "$ref": "#/components/schemas/CreateData"
405
+ }
406
+ },
407
+ "application/*+json": {
408
+ "schema": {
409
+ "$ref": "#/components/schemas/CreateData"
410
+ }
411
+ }
412
+ }
413
+ },
414
+ "responses": {
415
+ "200": {
416
+ "description": "Учётная запись уже существует.",
417
+ "content": {
418
+ "text/plain": {
419
+ "schema": {
420
+ "$ref": "#/components/schemas/AccountAddResultEntity"
421
+ }
422
+ },
423
+ "application/json": {
424
+ "schema": {
425
+ "$ref": "#/components/schemas/AccountAddResultEntity"
426
+ }
427
+ },
428
+ "text/json": {
429
+ "schema": {
430
+ "$ref": "#/components/schemas/AccountAddResultEntity"
431
+ }
432
+ }
433
+ }
434
+ },
435
+ "202": {
436
+ "description": "Новая учётная запись создана. Для email/SMS отправлено уведомление; для domainLogin уведомление не отправляется.",
437
+ "content": {
438
+ "text/plain": {
439
+ "schema": {
440
+ "$ref": "#/components/schemas/AccountAddResultEntity"
441
+ }
442
+ },
443
+ "application/json": {
444
+ "schema": {
445
+ "$ref": "#/components/schemas/AccountAddResultEntity"
446
+ }
447
+ },
448
+ "text/json": {
449
+ "schema": {
450
+ "$ref": "#/components/schemas/AccountAddResultEntity"
451
+ }
452
+ }
453
+ }
454
+ },
455
+ "409": {
456
+ "description": "Тело запроса не указано, ошибки валидации или некорректные входные данные."
457
+ }
458
+ }
459
+ }
460
+ },
461
+ "/Accounts": {
462
+ "get": {
463
+ "tags": [
464
+ "Accounts"
465
+ ],
466
+ "summary": "Возвращает данные учетной записи по учетным данным",
467
+ "description": "## Пример запроса:\r\n`GET /Accounts?credential=user@example.com`\r\n \r\n## Пример успешного ответа (200):\r\n```json\r\n{\r\n \"id\": 1001,\r\n \"credential\": \"user@example.com\",\r\n \"ban\": {\r\n \"dateTill\": \"2026-08-22T00:00:00Z\",\r\n \"banReason\": { \"id\": 1, \"name\": \"Email not verified\" }\r\n },\r\n \"isAnonymous\": false,\r\n \"isCrossTenantAdmin\": false,\r\n \"domainLogin\": null,\r\n \"socialProfiles\": [\r\n {\r\n \"id\": 1,\r\n \"name\": \"Google\",\r\n \"dateFrom\": \"2025-01-01T00:00:00Z\",\r\n \"dateTill\": \"2099-12-31T23:59:59Z\"\r\n }\r\n ]\r\n}\r\n```\r\n \r\n## Негативные сценарии:\r\n- 204 NoContent: учётная запись по указанным credential не найдена.\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `AccountGet`.",
468
+ "parameters": [
469
+ {
470
+ "name": "credential",
471
+ "in": "query",
472
+ "description": "Адрес эл.почты, телефон, логин или логин домена для аккаунта.",
473
+ "schema": {
474
+ "type": "string"
475
+ }
476
+ },
477
+ {
478
+ "name": "X-Application-ID",
479
+ "in": "header",
480
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
481
+ "schema": {
482
+ "enum": [
483
+ 1,
484
+ 2,
485
+ 3,
486
+ 4,
487
+ 5,
488
+ 6
489
+ ],
490
+ "type": "integer",
491
+ "format": "int32",
492
+ "default": 3,
493
+ "x-enumNames": [
494
+ "EngineerMobile",
495
+ "CustomerMobile",
496
+ "MainWeb",
497
+ "AdminWeb",
498
+ "Api",
499
+ "PlateWeb"
500
+ ]
501
+ }
502
+ }
503
+ ],
504
+ "responses": {
505
+ "200": {
506
+ "description": "Учётная запись найдена.",
507
+ "content": {
508
+ "text/plain": {
509
+ "schema": {
510
+ "$ref": "#/components/schemas/GetResult"
511
+ }
512
+ },
513
+ "application/json": {
514
+ "schema": {
515
+ "$ref": "#/components/schemas/GetResult"
516
+ }
517
+ },
518
+ "text/json": {
519
+ "schema": {
520
+ "$ref": "#/components/schemas/GetResult"
521
+ }
522
+ }
523
+ }
524
+ },
525
+ "204": {
526
+ "description": "Учётная запись не найдена."
527
+ },
528
+ "401": {
529
+ "description": "Отсутствует или некорректен Bearer-токен."
530
+ },
531
+ "403": {
532
+ "description": "Недостаточно прав для просмотра учётной записи."
533
+ }
534
+ },
535
+ "security": [
536
+ {
537
+ "Bearer": [ ]
538
+ }
539
+ ]
540
+ },
541
+ "head": {
542
+ "tags": [
543
+ "Accounts"
544
+ ],
545
+ "summary": "Проверяет присутствие учетной записи по указанным полномочиям",
546
+ "description": "## Пример запроса:\r\n`HEAD /Accounts?credential=user@example.com`\r\n \r\n## Пример успешного ответа (200):\r\nТело ответа пустое. Заголовок `Content-Range` не используется.\r\n \r\n## Негативные сценарии:\r\n- 409 Conflict: параметр `credential` не указан.\r\n- 404 Not Found: учётная запись не найдена или не прошла верификацию (кроме случая `NotVerifiedException`, который возвращает 200).",
547
+ "parameters": [
548
+ {
549
+ "name": "credential",
550
+ "in": "query",
551
+ "description": "Адрес эл.почты, телефон или логин.",
552
+ "schema": {
553
+ "type": "string"
554
+ }
555
+ },
556
+ {
557
+ "name": "X-Application-ID",
558
+ "in": "header",
559
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
560
+ "schema": {
561
+ "enum": [
562
+ 1,
563
+ 2,
564
+ 3,
565
+ 4,
566
+ 5,
567
+ 6
568
+ ],
569
+ "type": "integer",
570
+ "format": "int32",
571
+ "default": 3,
572
+ "x-enumNames": [
573
+ "EngineerMobile",
574
+ "CustomerMobile",
575
+ "MainWeb",
576
+ "AdminWeb",
577
+ "Api",
578
+ "PlateWeb"
579
+ ]
580
+ }
581
+ }
582
+ ],
583
+ "responses": {
584
+ "200": {
585
+ "description": "Учётная запись существует или ожидает верификации."
586
+ },
587
+ "409": {
588
+ "description": "Параметр credential не указан."
589
+ },
590
+ "404": {
591
+ "description": "Учётная запись не найдена."
592
+ }
593
+ }
594
+ }
595
+ },
596
+ "/Accounts/this/notifications": {
597
+ "get": {
598
+ "tags": [
599
+ "Accounts"
600
+ ],
601
+ "summary": "Список уведомлений из лога",
602
+ "description": "Поддерживает ограничение результата через заголовок `Range`.\r\n \r\n## Пример запроса:\r\n```text\r\nGET /Accounts/this/notifications\r\nAuthorization: Bearer <access-token>\r\nRange: Offset=0; Fetch=25\r\n```\r\n \r\n## Пример успешного ответа (200):\r\n```json\r\n[\r\n {\r\n \"notificationID\": 501,\r\n \"providerID\": 1,\r\n \"subject\": \"Подтверждение адреса электронной почты\",\r\n \"content\": \"Для подтверждения перейдите по ссылке...\",\r\n \"sent\": \"2026-08-21T08:01:00Z\"\r\n }\r\n]\r\n```\r\n \r\n## Пример успешного ответа (206):\r\nТело ответа имеет тот же формат, что и для `200`, но содержит только часть диапазона. Заголовок `Content-Range` указывает общее количество.\r\n \r\n## Негативные сценарии:\r\n- 204 NoContent: уведомления не найдены.\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `NotificationLogList`.",
603
+ "parameters": [
604
+ {
605
+ "name": "X-Application-ID",
606
+ "in": "header",
607
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
608
+ "schema": {
609
+ "enum": [
610
+ 1,
611
+ 2,
612
+ 3,
613
+ 4,
614
+ 5,
615
+ 6
616
+ ],
617
+ "type": "integer",
618
+ "format": "int32",
619
+ "default": 3,
620
+ "x-enumNames": [
621
+ "EngineerMobile",
622
+ "CustomerMobile",
623
+ "MainWeb",
624
+ "AdminWeb",
625
+ "Api",
626
+ "PlateWeb"
627
+ ]
628
+ }
629
+ }
630
+ ],
631
+ "responses": {
632
+ "200": {
633
+ "description": "Список уведомлений успешно получен.",
634
+ "content": {
635
+ "text/plain": {
636
+ "schema": {
637
+ "type": "array",
638
+ "items": {
639
+ "$ref": "#/components/schemas/ListResult"
640
+ }
641
+ }
642
+ },
643
+ "application/json": {
644
+ "schema": {
645
+ "type": "array",
646
+ "items": {
647
+ "$ref": "#/components/schemas/ListResult"
648
+ }
649
+ }
650
+ },
651
+ "text/json": {
652
+ "schema": {
653
+ "type": "array",
654
+ "items": {
655
+ "$ref": "#/components/schemas/ListResult"
656
+ }
657
+ }
658
+ }
659
+ }
660
+ },
661
+ "206": {
662
+ "description": "Возвращена часть списка в пределах запрошенного диапазона.",
663
+ "content": {
664
+ "text/plain": {
665
+ "schema": {
666
+ "type": "array",
667
+ "items": {
668
+ "$ref": "#/components/schemas/ListResult"
669
+ }
670
+ }
671
+ },
672
+ "application/json": {
673
+ "schema": {
674
+ "type": "array",
675
+ "items": {
676
+ "$ref": "#/components/schemas/ListResult"
677
+ }
678
+ }
679
+ },
680
+ "text/json": {
681
+ "schema": {
682
+ "type": "array",
683
+ "items": {
684
+ "$ref": "#/components/schemas/ListResult"
685
+ }
686
+ }
687
+ }
688
+ }
689
+ },
690
+ "204": {
691
+ "description": "Уведомления не найдены."
692
+ },
693
+ "401": {
694
+ "description": "Отсутствует или некорректен Bearer-токен."
695
+ },
696
+ "403": {
697
+ "description": "Недостаточно прав для просмотра лога уведомлений."
698
+ }
699
+ },
700
+ "security": [
701
+ {
702
+ "Bearer": [ ]
703
+ }
704
+ ]
705
+ }
706
+ },
707
+ "/Messages/verifyEmail": {
708
+ "post": {
709
+ "tags": [
710
+ "Messages"
711
+ ],
712
+ "summary": "Отправляет письмо проверки почты на указанный адрес эл. почты (если не был указан, то на адрес уч.записи)",
713
+ "description": "## Пример запроса:\r\n```json\r\nPOST /Messages/verifyEmail\r\nAuthorization: Bearer <access-token>\r\n \r\n{\r\n \"email\": \"user%40example.com\"\r\n}\r\n```\r\n \r\n## Пример успешного ответа (202):\r\n```json\r\n{\r\n \"id\": 1001,\r\n \"isEmailVerified\": false,\r\n \"isPhoneVerified\": false,\r\n \"verificationRequestValidTill\": \"2026-08-21T12:00:00Z\",\r\n \"isPasswordDefined\": false,\r\n \"isNewAccount\": false,\r\n \"verificationCodeRepeatTimeout\": 60\r\n}\r\n```\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: не указан идентификатор учётной записи (ни в токене, ни в теле запроса).\r\n- 204 NoContent: учётная запись не найдена.\r\n- 409 Conflict: указан некорректный адрес электронной почты.",
714
+ "parameters": [
715
+ {
716
+ "name": "X-Application-ID",
717
+ "in": "header",
718
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
719
+ "schema": {
720
+ "enum": [
721
+ 1,
722
+ 2,
723
+ 3,
724
+ 4,
725
+ 5,
726
+ 6
727
+ ],
728
+ "type": "integer",
729
+ "format": "int32",
730
+ "default": 3,
731
+ "x-enumNames": [
732
+ "EngineerMobile",
733
+ "CustomerMobile",
734
+ "MainWeb",
735
+ "AdminWeb",
736
+ "Api",
737
+ "PlateWeb"
738
+ ]
739
+ }
740
+ }
741
+ ],
742
+ "requestBody": {
743
+ "description": "Данные для отправки письма верификации.",
744
+ "content": {
745
+ "application/json-patch+json": {
746
+ "schema": {
747
+ "$ref": "#/components/schemas/VerifyEmailData"
748
+ }
749
+ },
750
+ "application/json": {
751
+ "schema": {
752
+ "$ref": "#/components/schemas/VerifyEmailData"
753
+ }
754
+ },
755
+ "text/json": {
756
+ "schema": {
757
+ "$ref": "#/components/schemas/VerifyEmailData"
758
+ }
759
+ },
760
+ "application/*+json": {
761
+ "schema": {
762
+ "$ref": "#/components/schemas/VerifyEmailData"
763
+ }
764
+ }
765
+ }
766
+ },
767
+ "responses": {
768
+ "202": {
769
+ "description": "Письмо верификации отправлено.",
770
+ "content": {
771
+ "text/plain": {
772
+ "schema": {
773
+ "$ref": "#/components/schemas/VerificationResult"
774
+ }
775
+ },
776
+ "application/json": {
777
+ "schema": {
778
+ "$ref": "#/components/schemas/VerificationResult"
779
+ }
780
+ },
781
+ "text/json": {
782
+ "schema": {
783
+ "$ref": "#/components/schemas/VerificationResult"
784
+ }
785
+ }
786
+ }
787
+ },
788
+ "401": {
789
+ "description": "Не указан идентификатор учётной записи."
790
+ },
791
+ "204": {
792
+ "description": "Учётная запись не найдена."
793
+ },
794
+ "409": {
795
+ "description": "Некорректный адрес электронной почты."
796
+ }
797
+ }
798
+ }
799
+ },
800
+ "/Messages/verifyPhone": {
801
+ "post": {
802
+ "tags": [
803
+ "Messages"
804
+ ],
805
+ "summary": "Отправляет SMS проверки номера телефона на указанный телефон (если не был указан, то на телефон учетной записи)",
806
+ "description": "## Пример запроса:\r\n```json\r\nPOST /Messages/verifyPhone\r\nAuthorization: Bearer <access-token>\r\n \r\n{\r\n \"phone\": \"+79001234567\"\r\n}\r\n```\r\n \r\n## Пример успешного ответа (202):\r\n```json\r\n{\r\n \"id\": 1001,\r\n \"isEmailVerified\": false,\r\n \"isPhoneVerified\": false,\r\n \"verificationRequestValidTill\": \"2026-08-21T12:00:00Z\",\r\n \"isPasswordDefined\": false,\r\n \"isNewAccount\": false,\r\n \"verificationCodeRepeatTimeout\": 60\r\n}\r\n```\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: не указан идентификатор учётной записи (ни в токене, ни в теле запроса).\r\n- 204 NoContent: учётная запись не найдена.\r\n- 409 Conflict: указан некорректный номер телефона.",
807
+ "parameters": [
808
+ {
809
+ "name": "X-Application-ID",
810
+ "in": "header",
811
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
812
+ "schema": {
813
+ "enum": [
814
+ 1,
815
+ 2,
816
+ 3,
817
+ 4,
818
+ 5,
819
+ 6
820
+ ],
821
+ "type": "integer",
822
+ "format": "int32",
823
+ "default": 3,
824
+ "x-enumNames": [
825
+ "EngineerMobile",
826
+ "CustomerMobile",
827
+ "MainWeb",
828
+ "AdminWeb",
829
+ "Api",
830
+ "PlateWeb"
831
+ ]
832
+ }
833
+ }
834
+ ],
835
+ "requestBody": {
836
+ "description": "Данные для отправки SMS верификации.",
837
+ "content": {
838
+ "application/json-patch+json": {
839
+ "schema": {
840
+ "$ref": "#/components/schemas/VerifyPhoneData"
841
+ }
842
+ },
843
+ "application/json": {
844
+ "schema": {
845
+ "$ref": "#/components/schemas/VerifyPhoneData"
846
+ }
847
+ },
848
+ "text/json": {
849
+ "schema": {
850
+ "$ref": "#/components/schemas/VerifyPhoneData"
851
+ }
852
+ },
853
+ "application/*+json": {
854
+ "schema": {
855
+ "$ref": "#/components/schemas/VerifyPhoneData"
856
+ }
857
+ }
858
+ }
859
+ },
860
+ "responses": {
861
+ "202": {
862
+ "description": "SMS верификации отправлено.",
863
+ "content": {
864
+ "text/plain": {
865
+ "schema": {
866
+ "$ref": "#/components/schemas/VerificationResult"
867
+ }
868
+ },
869
+ "application/json": {
870
+ "schema": {
871
+ "$ref": "#/components/schemas/VerificationResult"
872
+ }
873
+ },
874
+ "text/json": {
875
+ "schema": {
876
+ "$ref": "#/components/schemas/VerificationResult"
877
+ }
878
+ }
879
+ }
880
+ },
881
+ "401": {
882
+ "description": "Не указан идентификатор учётной записи."
883
+ },
884
+ "204": {
885
+ "description": "Учётная запись не найдена."
886
+ },
887
+ "409": {
888
+ "description": "Некорректный номер телефона."
889
+ }
890
+ }
891
+ }
892
+ },
893
+ "/Messages/requestPasswordChange": {
894
+ "post": {
895
+ "tags": [
896
+ "Messages"
897
+ ],
898
+ "summary": "Отправляет запрос на изменение пароля на указанный адрес эл. почты; для аутентифицированного пользователя — на адрес эл. почты уч.записи",
899
+ "description": "## Пример запроса:\r\n```json\r\nPOST /Messages/requestPasswordChange\r\n \r\n{\r\n \"credentials\": \"user%40example.com\"\r\n}\r\n```\r\n \r\n## Пример успешного ответа (202):\r\n```json\r\n{\r\n \"id\": 1001,\r\n \"isEmailVerified\": true,\r\n \"isPhoneVerified\": false,\r\n \"verificationRequestValidTill\": \"2026-08-21T12:00:00Z\",\r\n \"isPasswordDefined\": true,\r\n \"isNewAccount\": false,\r\n \"verificationCodeRepeatTimeout\": 60\r\n}\r\n```\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: учётная запись не найдена.\r\n- 409 Conflict: указаны некорректные credentials или восстановление недоступно для указанного типа учётных данных.",
900
+ "parameters": [
901
+ {
902
+ "name": "X-Application-ID",
903
+ "in": "header",
904
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
905
+ "schema": {
906
+ "enum": [
907
+ 1,
908
+ 2,
909
+ 3,
910
+ 4,
911
+ 5,
912
+ 6
913
+ ],
914
+ "type": "integer",
915
+ "format": "int32",
916
+ "default": 3,
917
+ "x-enumNames": [
918
+ "EngineerMobile",
919
+ "CustomerMobile",
920
+ "MainWeb",
921
+ "AdminWeb",
922
+ "Api",
923
+ "PlateWeb"
924
+ ]
925
+ }
926
+ }
927
+ ],
928
+ "requestBody": {
929
+ "description": "Учётные данные для запроса смены пароля.",
930
+ "content": {
931
+ "application/json-patch+json": {
932
+ "schema": {
933
+ "$ref": "#/components/schemas/RequestPasswordChangeData"
934
+ }
935
+ },
936
+ "application/json": {
937
+ "schema": {
938
+ "$ref": "#/components/schemas/RequestPasswordChangeData"
939
+ }
940
+ },
941
+ "text/json": {
942
+ "schema": {
943
+ "$ref": "#/components/schemas/RequestPasswordChangeData"
944
+ }
945
+ },
946
+ "application/*+json": {
947
+ "schema": {
948
+ "$ref": "#/components/schemas/RequestPasswordChangeData"
949
+ }
950
+ }
951
+ }
952
+ },
953
+ "responses": {
954
+ "202": {
955
+ "description": "Запрос на смену пароля отправлен.",
956
+ "content": {
957
+ "text/plain": {
958
+ "schema": {
959
+ "$ref": "#/components/schemas/VerificationResult"
960
+ }
961
+ },
962
+ "application/json": {
963
+ "schema": {
964
+ "$ref": "#/components/schemas/VerificationResult"
965
+ }
966
+ },
967
+ "text/json": {
968
+ "schema": {
969
+ "$ref": "#/components/schemas/VerificationResult"
970
+ }
971
+ }
972
+ }
973
+ },
974
+ "401": {
975
+ "description": "Учётная запись не найдена."
976
+ },
977
+ "409": {
978
+ "description": "Некорректные credentials или недоступный способ восстановления."
979
+ }
980
+ }
981
+ }
982
+ },
983
+ "/Passwords/change": {
984
+ "post": {
985
+ "tags": [
986
+ "Passwords"
987
+ ],
988
+ "summary": "Изменяет пароль учётной записи.",
989
+ "description": "## Пример запроса (по SMS-коду):\r\n```json\r\nPOST /Passwords/change\r\n \r\n{\r\n \"password\": \"MyNewP%40ssw0rd\",\r\n \"code\": \"123456\",\r\n \"mobilePhone\": \"+79001234567\"\r\n}\r\n```\r\n \r\n## Пример запроса (по текущему паролю):\r\n```json\r\nPOST /Passwords/change\r\nAuthorization: Bearer <access-token>\r\n \r\n{\r\n \"password\": \"MyNewP%40ssw0rd\",\r\n \"currentPassword\": \"OldP%40ssw0rd\"\r\n}\r\n```\r\n \r\n## Пример запроса (по хэшу из e-mail):\r\n```json\r\nPOST /Passwords/change\r\n \r\n{\r\n \"password\": \"MyNewP%40ssw0rd\",\r\n \"codeHash\": \"a1b2c3d4e5f6\"\r\n}\r\n```\r\n \r\n## Пример успешного ответа (202):\r\nТело ответа пустое.\r\n \r\n## Негативные сценарии:\r\n- 403 Forbidden: указан `currentPassword`, но пользователь не аутентифицирован.\r\n- 409 Conflict: неверный текущий пароль или некорректный верификационный код.",
990
+ "parameters": [
991
+ {
992
+ "name": "X-Application-ID",
993
+ "in": "header",
994
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
995
+ "schema": {
996
+ "enum": [
997
+ 1,
998
+ 2,
999
+ 3,
1000
+ 4,
1001
+ 5,
1002
+ 6
1003
+ ],
1004
+ "type": "integer",
1005
+ "format": "int32",
1006
+ "default": 3,
1007
+ "x-enumNames": [
1008
+ "EngineerMobile",
1009
+ "CustomerMobile",
1010
+ "MainWeb",
1011
+ "AdminWeb",
1012
+ "Api",
1013
+ "PlateWeb"
1014
+ ]
1015
+ }
1016
+ }
1017
+ ],
1018
+ "requestBody": {
1019
+ "description": "Объект, содержащий данные, необходимые для установки пароля.",
1020
+ "content": {
1021
+ "application/json-patch+json": {
1022
+ "schema": {
1023
+ "$ref": "#/components/schemas/PasswordSetData"
1024
+ }
1025
+ },
1026
+ "application/json": {
1027
+ "schema": {
1028
+ "$ref": "#/components/schemas/PasswordSetData"
1029
+ }
1030
+ },
1031
+ "text/json": {
1032
+ "schema": {
1033
+ "$ref": "#/components/schemas/PasswordSetData"
1034
+ }
1035
+ },
1036
+ "application/*+json": {
1037
+ "schema": {
1038
+ "$ref": "#/components/schemas/PasswordSetData"
1039
+ }
1040
+ }
1041
+ }
1042
+ },
1043
+ "responses": {
1044
+ "202": {
1045
+ "description": "Пароль успешно изменён."
1046
+ },
1047
+ "403": {
1048
+ "description": "Смена по текущему паролю без аутентификации запрещена."
1049
+ },
1050
+ "409": {
1051
+ "description": "Конфликт при проверке пароля или верификационного кода."
1052
+ }
1053
+ }
1054
+ }
1055
+ },
1056
+ "/VerificationCodes/check": {
1057
+ "post": {
1058
+ "tags": [
1059
+ "VerificationCodes"
1060
+ ],
1061
+ "summary": "Проверяет верификационный код.",
1062
+ "description": "Заголовок `Authorization` **не обязателен**. Для проверки по SMS достаточно тела запроса с `code` и `mobilePhone`.\r\n \r\n## Пример запроса (по хэшу из e-mail):\r\n```json\r\nPOST /VerificationCodes/check\r\n \r\n{\r\n \"codeHash\": \"a1b2c3d4e5f6\"\r\n}\r\n```\r\n \r\n## Пример запроса (по SMS-коду):\r\n```json\r\nPOST /VerificationCodes/check\r\n \r\n{\r\n \"code\": \"123456\",\r\n \"mobilePhone\": \"+79001234567\"\r\n}\r\n```\r\n \r\n## Пример успешного ответа (200):\r\n```json\r\n{\r\n \"accountID\": 1001,\r\n \"oneTimeLoginToken\": \"olt-abc123xyz\",\r\n \"verificationCodeRepeatTimeout\": 60\r\n}\r\n```\r\n \r\n## Негативные сценарии:\r\n- 409 Conflict: тело запроса не указано, ошибки валидации, верификационный код не найден или недействителен.",
1063
+ "parameters": [
1064
+ {
1065
+ "name": "X-Application-ID",
1066
+ "in": "header",
1067
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
1068
+ "schema": {
1069
+ "enum": [
1070
+ 1,
1071
+ 2,
1072
+ 3,
1073
+ 4,
1074
+ 5,
1075
+ 6
1076
+ ],
1077
+ "type": "integer",
1078
+ "format": "int32",
1079
+ "default": 3,
1080
+ "x-enumNames": [
1081
+ "EngineerMobile",
1082
+ "CustomerMobile",
1083
+ "MainWeb",
1084
+ "AdminWeb",
1085
+ "Api",
1086
+ "PlateWeb"
1087
+ ]
1088
+ }
1089
+ }
1090
+ ],
1091
+ "requestBody": {
1092
+ "description": "Объект, содержащий хэш верификационного кода или код из SMS.",
1093
+ "content": {
1094
+ "application/json-patch+json": {
1095
+ "schema": {
1096
+ "$ref": "#/components/schemas/CheckData"
1097
+ }
1098
+ },
1099
+ "application/json": {
1100
+ "schema": {
1101
+ "$ref": "#/components/schemas/CheckData"
1102
+ }
1103
+ },
1104
+ "text/json": {
1105
+ "schema": {
1106
+ "$ref": "#/components/schemas/CheckData"
1107
+ }
1108
+ },
1109
+ "application/*+json": {
1110
+ "schema": {
1111
+ "$ref": "#/components/schemas/CheckData"
1112
+ }
1113
+ }
1114
+ }
1115
+ },
1116
+ "responses": {
1117
+ "200": {
1118
+ "description": "Верификационный код подтверждён.",
1119
+ "content": {
1120
+ "text/plain": {
1121
+ "schema": {
1122
+ "$ref": "#/components/schemas/CheckResult"
1123
+ }
1124
+ },
1125
+ "application/json": {
1126
+ "schema": {
1127
+ "$ref": "#/components/schemas/CheckResult"
1128
+ }
1129
+ },
1130
+ "text/json": {
1131
+ "schema": {
1132
+ "$ref": "#/components/schemas/CheckResult"
1133
+ }
1134
+ }
1135
+ }
1136
+ },
1137
+ "409": {
1138
+ "description": "Верификационный код недействителен или входные данные некорректны."
1139
+ }
1140
+ }
1141
+ }
1142
+ }
1143
+ },
1144
+ "components": {
1145
+ "schemas": {
1146
+ "AUTHACAMergeData": {
1147
+ "required": [
1148
+ "applicationID",
1149
+ "clientTypeID",
1150
+ "uniqueClientIdentifier"
1151
+ ],
1152
+ "type": "object",
1153
+ "properties": {
1154
+ "uniqueClientIdentifier": {
1155
+ "minLength": 1,
1156
+ "type": "string"
1157
+ },
1158
+ "applicationID": {
1159
+ "type": "integer",
1160
+ "format": "int32"
1161
+ },
1162
+ "clientTypeID": {
1163
+ "type": "integer",
1164
+ "format": "int32"
1165
+ },
1166
+ "agent": {
1167
+ "type": "string",
1168
+ "nullable": true
1169
+ },
1170
+ "applicationVersion": {
1171
+ "type": "string",
1172
+ "nullable": true
1173
+ },
1174
+ "pushToken": {
1175
+ "type": "string",
1176
+ "nullable": true
1177
+ }
1178
+ },
1179
+ "additionalProperties": false
1180
+ },
1181
+ "AUTHACARemoveData": {
1182
+ "required": [
1183
+ "applicationID",
1184
+ "uniqueClientIdentifier"
1185
+ ],
1186
+ "type": "object",
1187
+ "properties": {
1188
+ "uniqueClientIdentifier": {
1189
+ "minLength": 1,
1190
+ "type": "string"
1191
+ },
1192
+ "applicationID": {
1193
+ "type": "integer",
1194
+ "format": "int32"
1195
+ }
1196
+ },
1197
+ "additionalProperties": false
1198
+ },
1199
+ "AccountAddResultEntity": {
1200
+ "type": "object",
1201
+ "properties": {
1202
+ "id": {
1203
+ "type": "integer",
1204
+ "format": "int32"
1205
+ },
1206
+ "verificationRequestValidTill": {
1207
+ "type": "string",
1208
+ "format": "date-time",
1209
+ "nullable": true
1210
+ },
1211
+ "isEmailVerified": {
1212
+ "type": "boolean"
1213
+ },
1214
+ "isMobilePhoneVerified": {
1215
+ "type": "boolean"
1216
+ },
1217
+ "isPasswordDefined": {
1218
+ "type": "boolean"
1219
+ },
1220
+ "isNewAccount": {
1221
+ "type": "boolean"
1222
+ }
1223
+ },
1224
+ "additionalProperties": false
1225
+ },
1226
+ "ApplicationListResult": {
1227
+ "type": "object",
1228
+ "properties": {
1229
+ "client": {
1230
+ "$ref": "#/components/schemas/ClientResult"
1231
+ },
1232
+ "application": {
1233
+ "$ref": "#/components/schemas/ApplicationResult"
1234
+ },
1235
+ "pushToken": {
1236
+ "type": "string",
1237
+ "description": "Токен push-уведомлений",
1238
+ "nullable": true,
1239
+ "example": "fcm-token-xyz"
1240
+ },
1241
+ "timestamp": {
1242
+ "type": "string",
1243
+ "description": "Метка времени актуальности данных",
1244
+ "format": "date-time",
1245
+ "example": "2026-08-21T08:00:00Z"
1246
+ }
1247
+ },
1248
+ "additionalProperties": false,
1249
+ "description": "Приложение учетной записи"
1250
+ },
1251
+ "ApplicationResult": {
1252
+ "type": "object",
1253
+ "properties": {
1254
+ "id": {
1255
+ "type": "integer",
1256
+ "format": "int32"
1257
+ },
1258
+ "name": {
1259
+ "type": "string",
1260
+ "nullable": true
1261
+ },
1262
+ "version": {
1263
+ "type": "string",
1264
+ "description": "Версия",
1265
+ "nullable": true,
1266
+ "example": "3.5.0"
1267
+ }
1268
+ },
1269
+ "additionalProperties": false,
1270
+ "description": "Данные приложения"
1271
+ },
1272
+ "BanResult": {
1273
+ "type": "object",
1274
+ "properties": {
1275
+ "dateTill": {
1276
+ "type": "string",
1277
+ "description": "Срок действия бана",
1278
+ "format": "date-time",
1279
+ "example": "2026-08-22T00:00:00Z"
1280
+ },
1281
+ "banReason": {
1282
+ "$ref": "#/components/schemas/IdNameResultOfByte"
1283
+ }
1284
+ },
1285
+ "additionalProperties": false,
1286
+ "description": "Данные блокировки пользователя"
1287
+ },
1288
+ "BaseLogoutData": {
1289
+ "required": [
1290
+ "applicationID",
1291
+ "uniqueClientIdentifier"
1292
+ ],
1293
+ "type": "object",
1294
+ "properties": {
1295
+ "uniqueClientIdentifier": {
1296
+ "minLength": 1,
1297
+ "type": "string"
1298
+ },
1299
+ "applicationID": {
1300
+ "type": "integer",
1301
+ "format": "int32"
1302
+ }
1303
+ },
1304
+ "additionalProperties": false
1305
+ },
1306
+ "CheckData": {
1307
+ "type": "object",
1308
+ "properties": {
1309
+ "codeHash": {
1310
+ "type": "string",
1311
+ "description": "Хэш верификационного кода. Отправляется по элетронной почте. Если поле заполнено, все остольные поля будут проигнорированы.",
1312
+ "nullable": true,
1313
+ "example": "a1b2c3d4e5f6"
1314
+ },
1315
+ "code": {
1316
+ "type": "string",
1317
+ "description": "Верификационный код из SMS.",
1318
+ "nullable": true,
1319
+ "example": "123456"
1320
+ },
1321
+ "mobilePhone": {
1322
+ "type": "string",
1323
+ "description": "Номер мобильного телефона, на котрый был отправлен код подтверждения.",
1324
+ "nullable": true,
1325
+ "example": "+79001234567"
1326
+ },
1327
+ "email": {
1328
+ "type": "string",
1329
+ "description": "Адрес электронной почты, на который был отправлен код подтверждения.",
1330
+ "nullable": true,
1331
+ "example": "user@example.com"
1332
+ }
1333
+ },
1334
+ "additionalProperties": false,
1335
+ "description": "Данные для валидации верификационного кода"
1336
+ },
1337
+ "CheckResult": {
1338
+ "type": "object",
1339
+ "properties": {
1340
+ "accountID": {
1341
+ "type": "integer",
1342
+ "description": "Идентификатор учетной записи",
1343
+ "format": "int32",
1344
+ "example": 1001
1345
+ },
1346
+ "oneTimeLoginToken": {
1347
+ "type": "string",
1348
+ "description": "Токен для единоразовой авторизации в тенанте",
1349
+ "nullable": true,
1350
+ "example": "olt-abc123xyz"
1351
+ },
1352
+ "verificationCodeRepeatTimeout": {
1353
+ "type": "integer",
1354
+ "description": "Количество секунд через сколько можно повторить запрос на верификацию",
1355
+ "format": "int32",
1356
+ "example": 60
1357
+ }
1358
+ },
1359
+ "additionalProperties": false,
1360
+ "description": "Результат проверки верификационного кода"
1361
+ },
1362
+ "ClientResult": {
1363
+ "type": "object",
1364
+ "properties": {
1365
+ "id": {
1366
+ "type": "integer",
1367
+ "description": "Идентификатор",
1368
+ "format": "int32",
1369
+ "example": 1
1370
+ },
1371
+ "uniqueClientIdentifier": {
1372
+ "type": "string",
1373
+ "description": "UniqueClientIdentifier",
1374
+ "nullable": true,
1375
+ "example": "abc-123-def-456"
1376
+ },
1377
+ "agent": {
1378
+ "type": "string",
1379
+ "description": "Операционная система",
1380
+ "nullable": true,
1381
+ "example": "Android 14"
1382
+ },
1383
+ "clientType": {
1384
+ "$ref": "#/components/schemas/IdNameResultOfByte"
1385
+ }
1386
+ },
1387
+ "additionalProperties": false,
1388
+ "description": "Данные устройства"
1389
+ },
1390
+ "CreateData": {
1391
+ "type": "object",
1392
+ "properties": {
1393
+ "email": {
1394
+ "type": "string",
1395
+ "description": "Адрес эл.почты (UrlEncoded)",
1396
+ "nullable": true,
1397
+ "example": "user%40example.com"
1398
+ },
1399
+ "mobilePhone": {
1400
+ "type": "string",
1401
+ "description": "Номер мобильного телефона",
1402
+ "nullable": true,
1403
+ "example": "+79001234567"
1404
+ },
1405
+ "domainLogin": {
1406
+ "type": "string",
1407
+ "description": "Логин домена аккаунта пользователя",
1408
+ "nullable": true,
1409
+ "example": "DOMAIN\\user"
1410
+ }
1411
+ },
1412
+ "additionalProperties": false,
1413
+ "description": "Базовые данные"
1414
+ },
1415
+ "GetResult": {
1416
+ "type": "object",
1417
+ "properties": {
1418
+ "id": {
1419
+ "type": "integer",
1420
+ "description": "Идентификатор учетной записи",
1421
+ "format": "int32",
1422
+ "example": 1001
1423
+ },
1424
+ "credential": {
1425
+ "type": "string",
1426
+ "description": "Учетные данные",
1427
+ "nullable": true,
1428
+ "example": "user@example.com"
1429
+ },
1430
+ "ban": {
1431
+ "$ref": "#/components/schemas/BanResult"
1432
+ },
1433
+ "isAnonymous": {
1434
+ "type": "boolean",
1435
+ "description": "Признак, указывающий на то, что под данной учетной запись имеется возможность входа без указания пароля",
1436
+ "example": false
1437
+ },
1438
+ "isCrossTenantAdmin": {
1439
+ "type": "boolean",
1440
+ "description": "Признак, указывающий на то, что учетная запись используется для администирования тенантов",
1441
+ "example": false
1442
+ },
1443
+ "domainLogin": {
1444
+ "type": "string",
1445
+ "description": "Логин домена аккаунта пользователя",
1446
+ "nullable": true,
1447
+ "example": "DOMAIN\\user"
1448
+ },
1449
+ "socialProfiles": {
1450
+ "type": "array",
1451
+ "items": {
1452
+ "$ref": "#/components/schemas/SocialProfileResult"
1453
+ },
1454
+ "description": "Связь с социальными профилями",
1455
+ "nullable": true
1456
+ }
1457
+ },
1458
+ "additionalProperties": false,
1459
+ "description": "Результат поиска учетной записи"
1460
+ },
1461
+ "IdNameResultOfByte": {
1462
+ "type": "object",
1463
+ "properties": {
1464
+ "id": {
1465
+ "type": "integer",
1466
+ "format": "int32"
1467
+ },
1468
+ "name": {
1469
+ "type": "string",
1470
+ "nullable": true
1471
+ }
1472
+ },
1473
+ "additionalProperties": false
1474
+ },
1475
+ "ListResult": {
1476
+ "type": "object",
1477
+ "properties": {
1478
+ "notificationID": {
1479
+ "type": "integer",
1480
+ "description": "дентификатор уведомления",
1481
+ "format": "int32",
1482
+ "example": 501
1483
+ },
1484
+ "providerID": {
1485
+ "type": "integer",
1486
+ "description": "Идентификатор метода отсылки уведомления",
1487
+ "format": "int32",
1488
+ "example": 1
1489
+ },
1490
+ "subject": {
1491
+ "type": "string",
1492
+ "description": "Тема уведомления",
1493
+ "nullable": true,
1494
+ "example": "Подтверждение адреса электронной почты"
1495
+ },
1496
+ "content": {
1497
+ "type": "string",
1498
+ "description": "Содержимое уведомления",
1499
+ "nullable": true,
1500
+ "example": "Для подтверждения перейдите по ссылке..."
1501
+ },
1502
+ "created": {
1503
+ "type": "string",
1504
+ "description": "Дата и время создания уведомления",
1505
+ "format": "date-time",
1506
+ "nullable": true,
1507
+ "example": "2026-08-21T08:00:00Z"
1508
+ },
1509
+ "sent": {
1510
+ "type": "string",
1511
+ "description": "Дата и время отправки уведомления",
1512
+ "format": "date-time",
1513
+ "nullable": true,
1514
+ "example": "2026-08-21T08:01:00Z"
1515
+ }
1516
+ },
1517
+ "additionalProperties": false,
1518
+ "description": "Записи из лога уведомлений"
1519
+ },
1520
+ "PasswordSetData": {
1521
+ "required": [
1522
+ "password"
1523
+ ],
1524
+ "type": "object",
1525
+ "properties": {
1526
+ "codeHash": {
1527
+ "type": "string",
1528
+ "description": "Хэш верификационного кода. Отправляется по элетронной почте. Если поле заполнено, все остольные поля будут проигнорированы.",
1529
+ "nullable": true,
1530
+ "example": "a1b2c3d4e5f6"
1531
+ },
1532
+ "code": {
1533
+ "type": "string",
1534
+ "description": "Верификационный код из SMS.",
1535
+ "nullable": true,
1536
+ "example": "123456"
1537
+ },
1538
+ "mobilePhone": {
1539
+ "type": "string",
1540
+ "description": "Номер мобильного телефона, на котрый был отправлен код подтверждения.",
1541
+ "nullable": true,
1542
+ "example": "+79001234567"
1543
+ },
1544
+ "email": {
1545
+ "type": "string",
1546
+ "description": "Адрес электронной почты, на который был отправлен код подтверждения.",
1547
+ "nullable": true,
1548
+ "example": "user@example.com"
1549
+ },
1550
+ "password": {
1551
+ "minLength": 1,
1552
+ "type": "string",
1553
+ "description": "Новый пароль (UrlEncoded)",
1554
+ "example": "MyNewP%40ssw0rd"
1555
+ },
1556
+ "currentPassword": {
1557
+ "type": "string",
1558
+ "description": "Текущий пароль пользователя (для смены пароля без верификации через SMS или Email)",
1559
+ "nullable": true,
1560
+ "example": "OldP%40ssw0rd"
1561
+ }
1562
+ },
1563
+ "additionalProperties": false,
1564
+ "description": "Данные дял смены пароля"
1565
+ },
1566
+ "RequestPasswordChangeData": {
1567
+ "required": [
1568
+ "credentials"
1569
+ ],
1570
+ "type": "object",
1571
+ "properties": {
1572
+ "credentials": {
1573
+ "minLength": 1,
1574
+ "type": "string",
1575
+ "description": "Адрес эл.почты, номер телефона или логин, для которых необходима смена пароля (UriEncoded)",
1576
+ "example": "user%40example.com"
1577
+ }
1578
+ },
1579
+ "additionalProperties": false,
1580
+ "description": "Данные для смены пароля"
1581
+ },
1582
+ "SocialProfileResult": {
1583
+ "type": "object",
1584
+ "properties": {
1585
+ "id": {
1586
+ "type": "integer",
1587
+ "format": "int32"
1588
+ },
1589
+ "name": {
1590
+ "type": "string",
1591
+ "nullable": true
1592
+ },
1593
+ "dateFrom": {
1594
+ "type": "string",
1595
+ "description": "Дата начала использования соц.сети для аутентификации",
1596
+ "format": "date-time",
1597
+ "example": "2025-01-01T00:00:00Z"
1598
+ },
1599
+ "dateTill": {
1600
+ "type": "string",
1601
+ "description": "Дата окончания использования соц.сети для аутентификации",
1602
+ "format": "date-time",
1603
+ "example": "2099-12-31T23:59:59Z"
1604
+ }
1605
+ },
1606
+ "additionalProperties": false,
1607
+ "description": "Данные социального профиля"
1608
+ },
1609
+ "VerificationResult": {
1610
+ "type": "object",
1611
+ "properties": {
1612
+ "id": {
1613
+ "type": "integer",
1614
+ "description": "Идентификатор уч.записи",
1615
+ "format": "int32",
1616
+ "example": 1001
1617
+ },
1618
+ "isEmailVerified": {
1619
+ "type": "boolean",
1620
+ "description": "Признак пройденной проверки адреса эл.почты",
1621
+ "example": false
1622
+ },
1623
+ "isPhoneVerified": {
1624
+ "type": "boolean",
1625
+ "description": "Признак пройденной проверки телефона",
1626
+ "example": false
1627
+ },
1628
+ "verificationRequestValidTill": {
1629
+ "type": "string",
1630
+ "description": "Срок действия запроса на верификацию",
1631
+ "format": "date-time",
1632
+ "nullable": true,
1633
+ "example": "2026-08-21T12:00:00Z"
1634
+ },
1635
+ "isPasswordDefined": {
1636
+ "type": "boolean",
1637
+ "description": "Признак наличия пароля",
1638
+ "example": false
1639
+ },
1640
+ "isNewAccount": {
1641
+ "type": "boolean",
1642
+ "description": "Признак новой уч.записи",
1643
+ "example": true
1644
+ },
1645
+ "verificationCodeRepeatTimeout": {
1646
+ "type": "integer",
1647
+ "description": "Количество секунд через сколько можно повторить запрос на верификацию",
1648
+ "format": "int32",
1649
+ "example": 60
1650
+ }
1651
+ },
1652
+ "additionalProperties": false,
1653
+ "description": "Результат проверки"
1654
+ },
1655
+ "VerifyEmailData": {
1656
+ "type": "object",
1657
+ "properties": {
1658
+ "accountID": {
1659
+ "type": "integer",
1660
+ "description": "Идентификатор уч.записи, которя запросила провекру почты (указывается только для неаутентифицированного пользователя)",
1661
+ "format": "int32",
1662
+ "nullable": true,
1663
+ "example": 1001
1664
+ },
1665
+ "email": {
1666
+ "type": "string",
1667
+ "description": "Адрес эл.почты, который необходимо верифицировать (если не указан, то будет проверен основной адрес уч.записи)",
1668
+ "nullable": true,
1669
+ "example": "user%40example.com"
1670
+ }
1671
+ },
1672
+ "additionalProperties": false,
1673
+ "description": "Данные для проверки эл.почты"
1674
+ },
1675
+ "VerifyPhoneData": {
1676
+ "type": "object",
1677
+ "properties": {
1678
+ "accountID": {
1679
+ "type": "integer",
1680
+ "description": "Идентификатор уч.записи, которя запросила провекру телефона (указывается только для неаутентифицированного пользователя)",
1681
+ "format": "int32",
1682
+ "nullable": true,
1683
+ "example": 1001
1684
+ },
1685
+ "phone": {
1686
+ "type": "string",
1687
+ "description": "Телефон, который необходимо верифицировать (если не указан, то будет проверен основной телефон уч.записи)",
1688
+ "nullable": true,
1689
+ "example": "+79001234567"
1690
+ }
1691
+ },
1692
+ "additionalProperties": false,
1693
+ "description": "Данные для проверки эл.почты"
1694
+ }
1695
+ },
1696
+ "securitySchemes": {
1697
+ "Bearer": {
1698
+ "type": "http",
1699
+ "description": "Введите токен для авторизации",
1700
+ "scheme": "Bearer",
1701
+ "bearerFormat": "JWT"
1702
+ }
1703
+ }
1704
+ },
1705
+ "tags": [
1706
+ {
1707
+ "name": "Accounts",
1708
+ "description": "Контроллер для аутентификации и авторизации учетных записей"
1709
+ },
1710
+ {
1711
+ "name": "Messages",
1712
+ "description": "Контроллер управления сообщениями"
1713
+ },
1714
+ {
1715
+ "name": "Passwords",
1716
+ "description": "Контроллер управления паролями"
1717
+ },
1718
+ {
1719
+ "name": "VerificationCodes",
1720
+ "description": "Контроллер управления прговерочными кодами"
1721
+ },
1722
+ {
1723
+ "name": "Accounts",
1724
+ "description": "Контроллер для аутентификации и авторизации учетных записей"
1725
+ },
1726
+ {
1727
+ "name": "Messages",
1728
+ "description": "Контроллер управления сообщениями"
1729
+ },
1730
+ {
1731
+ "name": "Passwords",
1732
+ "description": "Контроллер управления паролями"
1733
+ },
1734
+ {
1735
+ "name": "VerificationCodes",
1736
+ "description": "Контроллер управления прговерочными кодами"
1737
+ }
1738
+ ]
1739
+ }