@hubex/mcp 0.9.20260922 → 0.9.20260925

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.
@@ -2,29 +2,80 @@
2
2
  "openapi": "3.0.1",
3
3
  "info": {
4
4
  "title": "API for CM in HubEx",
5
- "description": "Service offers application programming interface for ....",
5
+ "description": "Service offers application programming interface for client mobile geolocation and tracking data.",
6
6
  "contact": {
7
7
  "name": "SmartService Backend Team",
8
8
  "email": "fmbackend@melston.ru"
9
9
  },
10
10
  "version": "v1.0.0.0"
11
11
  },
12
+ "servers": [
13
+ {
14
+ "url": "/CM"
15
+ }
16
+ ],
12
17
  "paths": {
13
18
  "/Clients/locations": {
14
19
  "post": {
15
20
  "tags": [
16
21
  "Clients"
17
22
  ],
18
- "summary": "Сохраняет данные о местоположении",
19
- "description": "<br />* Выполнение данного метода резрешино от **анонимного пользователя**.",
23
+ "summary": "Сохранение данных о местоположении клиента",
24
+ "description": "## Пример запроса:\r\n`POST /Clients/locations`\r\n \r\nЗаголовки:\r\n- `X-CLIENT-IDENTIFIER` — уникальный идентификатор клиента (устройства), обязателен.\r\n- `X-Client-Utc-Offset` — смещение часового пояса клиента в минутах от UTC, необязателен (по умолчанию `0`).\r\n- `X-Application-ID` — идентификатор приложения-источника запроса (enum 1..6), необязателен.\r\n \r\n```json\r\n[\r\n {\r\n \"coordinate\": \"55.75:37.62\",\r\n \"clientTimestamp\": \"2026-08-17T08:30:00Z\",\r\n \"altitude\": 150.5,\r\n \"bearing\": 90.0,\r\n \"accuracy\": 10.0,\r\n \"speed\": 5.2\r\n }\r\n]\r\n```\r\n \r\nАльтернативный формат координат через объект `coords`:\r\n```json\r\n[\r\n {\r\n \"coords\": {\r\n \"latitude\": 55.75,\r\n \"longitude\": 37.62,\r\n \"altitude\": 150.5,\r\n \"accuracy\": 10.0,\r\n \"speed\": 5.2,\r\n \"bearing\": 90.0\r\n },\r\n \"timestamp\": \"2026-08-17T08:30:00Z\"\r\n }\r\n]\r\n```\r\n \r\n## Пример успешного ответа (200):\r\n```json\r\n{\r\n \"clientId\": \"device-uuid-12345\",\r\n \"clientOffset\": 180\r\n}\r\n```\r\n \r\n## Негативные сценарии:\r\n- 404 Not Found: не передан обязательный заголовок `X-CLIENT-IDENTIFIER`.\r\n- 409 Conflict: пустое или отсутствующее тело запроса.\r\n- 409 Conflict: отсутствуют или некорректны координаты (`coordinate` / `coords`).\r\n- 409 Conflict: `clientTimestamp` раньше 2018-10-01.",
25
+ "parameters": [
26
+ {
27
+ "name": "X-CLIENT-IDENTIFIER",
28
+ "in": "header",
29
+ "description": "Уникальный идентификатор клиента (устройства)",
30
+ "required": true,
31
+ "schema": {
32
+ "type": "string"
33
+ }
34
+ },
35
+ {
36
+ "name": "X-Client-Utc-Offset",
37
+ "in": "header",
38
+ "description": "Смещение часового пояса клиента в минутах от UTC",
39
+ "schema": {
40
+ "type": "integer",
41
+ "format": "int32"
42
+ }
43
+ },
44
+ {
45
+ "name": "X-Application-ID",
46
+ "in": "header",
47
+ "description": "Идентификатор приложения. EngineerMobile - 1, CustomerMobile - 2, MainWeb - 3, AdminWeb - 4, Api - 5, PlateWeb - 6",
48
+ "schema": {
49
+ "enum": [
50
+ 1,
51
+ 2,
52
+ 3,
53
+ 4,
54
+ 5,
55
+ 6
56
+ ],
57
+ "type": "integer",
58
+ "format": "int32",
59
+ "default": 3,
60
+ "x-enumNames": [
61
+ "EngineerMobile",
62
+ "CustomerMobile",
63
+ "MainWeb",
64
+ "AdminWeb",
65
+ "Api",
66
+ "PlateWeb"
67
+ ]
68
+ }
69
+ }
70
+ ],
20
71
  "requestBody": {
21
- "description": "Геоданные",
72
+ "description": "Коллекция геоданных для сохранения.",
22
73
  "content": {
23
74
  "application/json-patch+json": {
24
75
  "schema": {
25
76
  "type": "array",
26
77
  "items": {
27
- "$ref": "#/components/schemas/HubEx.Service.CM.Api.Data.Clients.PostData"
78
+ "$ref": "#/components/schemas/DataClientsPostData"
28
79
  }
29
80
  }
30
81
  },
@@ -32,7 +83,7 @@
32
83
  "schema": {
33
84
  "type": "array",
34
85
  "items": {
35
- "$ref": "#/components/schemas/HubEx.Service.CM.Api.Data.Clients.PostData"
86
+ "$ref": "#/components/schemas/DataClientsPostData"
36
87
  }
37
88
  }
38
89
  },
@@ -40,7 +91,7 @@
40
91
  "schema": {
41
92
  "type": "array",
42
93
  "items": {
43
- "$ref": "#/components/schemas/HubEx.Service.CM.Api.Data.Clients.PostData"
94
+ "$ref": "#/components/schemas/DataClientsPostData"
44
95
  }
45
96
  }
46
97
  },
@@ -48,7 +99,7 @@
48
99
  "schema": {
49
100
  "type": "array",
50
101
  "items": {
51
- "$ref": "#/components/schemas/HubEx.Service.CM.Api.Data.Clients.PostData"
102
+ "$ref": "#/components/schemas/DataClientsPostData"
52
103
  }
53
104
  }
54
105
  }
@@ -56,10 +107,56 @@
56
107
  },
57
108
  "responses": {
58
109
  "200": {
59
- "description": "OK"
110
+ "description": "Геоданные успешно сохранены.",
111
+ "content": {
112
+ "text/plain": {
113
+ "schema": {
114
+ "$ref": "#/components/schemas/ResultsClientsLocationPostResult"
115
+ }
116
+ },
117
+ "application/json": {
118
+ "schema": {
119
+ "$ref": "#/components/schemas/ResultsClientsLocationPostResult"
120
+ }
121
+ },
122
+ "text/json": {
123
+ "schema": {
124
+ "$ref": "#/components/schemas/ResultsClientsLocationPostResult"
125
+ }
126
+ }
127
+ }
60
128
  },
61
129
  "404": {
62
- "description": "Not Found"
130
+ "description": "Не передан обязательный заголовок X-CLIENT-IDENTIFIER."
131
+ },
132
+ "409": {
133
+ "description": "Ошибка валидации входных данных. Тело ошибки: SmartService.Common.ExceptionHandling.Models.ErrorModel[].",
134
+ "content": {
135
+ "text/plain": {
136
+ "schema": {
137
+ "type": "array",
138
+ "items": {
139
+ "$ref": "#/components/schemas/ExceptionHandlingModelsErrorModel"
140
+ }
141
+ }
142
+ },
143
+ "application/json": {
144
+ "schema": {
145
+ "type": "array",
146
+ "items": {
147
+ "$ref": "#/components/schemas/ExceptionHandlingModelsErrorModel"
148
+ }
149
+ }
150
+ },
151
+ "text/json": {
152
+ "schema": {
153
+ "type": "array",
154
+ "items": {
155
+ "$ref": "#/components/schemas/ExceptionHandlingModelsErrorModel"
156
+ }
157
+ }
158
+ }
159
+ }
63
160
  }
64
161
  }
65
162
  }
@@ -67,96 +164,164 @@
67
164
  },
68
165
  "components": {
69
166
  "schemas": {
70
- "HubEx.Service.CM.Api.Data.Clients.CoordinateData": {
167
+ "DataClientsCoordinateData": {
71
168
  "type": "object",
72
169
  "properties": {
73
170
  "altitude": {
74
171
  "type": "number",
75
- "description": "Высота",
172
+ "description": "Высота над уровнем моря, метры",
76
173
  "format": "float",
77
- "nullable": true
174
+ "nullable": true,
175
+ "example": 150.5
78
176
  },
79
177
  "bearing": {
80
178
  "type": "number",
81
- "description": "Азимут",
179
+ "description": "Азимут (направление движения), градусы",
82
180
  "format": "float",
83
- "nullable": true
181
+ "nullable": true,
182
+ "example": 90
84
183
  },
85
184
  "accuracy": {
86
185
  "type": "number",
87
- "description": "Точность",
186
+ "description": "Точность определения координат, метры",
88
187
  "format": "float",
89
- "nullable": true
188
+ "nullable": true,
189
+ "example": 10
90
190
  },
91
191
  "speed": {
92
192
  "type": "number",
93
- "description": "Скорость",
193
+ "description": "Скорость движения, м/с",
94
194
  "format": "float",
95
- "nullable": true
195
+ "nullable": true,
196
+ "example": 5.2
96
197
  },
97
198
  "latitude": {
98
199
  "type": "number",
99
200
  "description": "Широта",
100
- "format": "double"
201
+ "format": "double",
202
+ "example": 55.75
101
203
  },
102
204
  "longitude": {
103
205
  "type": "number",
104
206
  "description": "Долгота",
105
- "format": "double"
207
+ "format": "double",
208
+ "example": 37.62
106
209
  }
107
210
  },
108
211
  "additionalProperties": false,
109
- "description": "Гео данные"
212
+ "description": "Координаты и дополнительные параметры местоположения"
110
213
  },
111
- "HubEx.Service.CM.Api.Data.Clients.PostData": {
214
+ "DataClientsPostData": {
112
215
  "type": "object",
113
216
  "properties": {
114
217
  "coordinate": {
115
218
  "type": "string",
116
219
  "description": "Координаты в формате \"широта:долгота\"",
117
- "nullable": true
220
+ "nullable": true,
221
+ "example": "55.75:37.62"
118
222
  },
119
223
  "clientTimestamp": {
120
224
  "type": "string",
121
- "description": "Дата события UTC",
122
- "format": "date-time"
225
+ "description": "Дата и время события в UTC",
226
+ "format": "date-time",
227
+ "example": "2026-08-17T08:30:00Z"
123
228
  },
124
229
  "timestamp": {
125
230
  "type": "string",
126
- "description": "Дата события UTC",
127
- "format": "date-time"
231
+ "description": "Дата и время события в UTC (альтернативное поле, используется если не задано ClientTimestamp)",
232
+ "format": "date-time",
233
+ "example": "2026-08-17T08:30:00Z"
128
234
  },
129
235
  "altitude": {
130
236
  "type": "number",
131
- "description": "Высота",
237
+ "description": "Высота над уровнем моря, метры",
132
238
  "format": "float",
133
- "nullable": true
239
+ "nullable": true,
240
+ "example": 150.5
134
241
  },
135
242
  "bearing": {
136
243
  "type": "number",
137
- "description": "Азимут",
244
+ "description": "Азимут (направление движения), градусы",
138
245
  "format": "float",
139
- "nullable": true
246
+ "nullable": true,
247
+ "example": 90
140
248
  },
141
249
  "accuracy": {
142
250
  "type": "number",
143
- "description": "Точность",
251
+ "description": "Точность определения координат, метры",
144
252
  "format": "float",
145
- "nullable": true
253
+ "nullable": true,
254
+ "example": 10
146
255
  },
147
256
  "speed": {
148
257
  "type": "number",
149
- "description": "Скорость",
258
+ "description": "Скорость движения, м/с",
150
259
  "format": "float",
151
- "nullable": true
260
+ "nullable": true,
261
+ "example": 5.2
152
262
  },
153
263
  "coords": {
154
- "$ref": "#/components/schemas/HubEx.Service.CM.Api.Data.Clients.CoordinateData"
264
+ "$ref": "#/components/schemas/DataClientsCoordinateData"
155
265
  }
156
266
  },
157
267
  "additionalProperties": false,
158
- "description": "Гео данные"
268
+ "description": "Геоданные точки местоположения клиента"
269
+ },
270
+ "ExceptionHandlingModelsErrorModel": {
271
+ "type": "object",
272
+ "properties": {
273
+ "traceIdentifier": {
274
+ "type": "string",
275
+ "nullable": true
276
+ },
277
+ "code": {
278
+ "type": "string",
279
+ "nullable": true
280
+ },
281
+ "message": {
282
+ "type": "string",
283
+ "nullable": true
284
+ },
285
+ "arguments": {
286
+ "type": "object",
287
+ "additionalProperties": {
288
+ "type": "string",
289
+ "nullable": true
290
+ },
291
+ "nullable": true
292
+ }
293
+ },
294
+ "additionalProperties": false
295
+ },
296
+ "ResultsClientsLocationPostResult": {
297
+ "type": "object",
298
+ "properties": {
299
+ "clientId": {
300
+ "type": "string",
301
+ "description": "Уникальный идентификатор клиента (устройства)",
302
+ "nullable": true,
303
+ "example": "device-uuid-12345"
304
+ },
305
+ "clientOffset": {
306
+ "type": "integer",
307
+ "description": "Смещение часового пояса клиента в минутах от UTC",
308
+ "format": "int32",
309
+ "example": 180
310
+ }
311
+ },
312
+ "additionalProperties": false,
313
+ "description": "Результат сохранения геоданных клиента"
159
314
  }
160
315
  }
161
- }
316
+ },
317
+ "tags": [
318
+ {
319
+ "name": "Clients",
320
+ "description": "Контроллер работы с API-клиентами (устройствами)"
321
+ },
322
+ {
323
+ "name": "Clients",
324
+ "description": "Контроллер работы с API-клиентами (устройствами)"
325
+ }
326
+ ]
162
327
  }