@hubex/mcp 0.13.0 → 0.14.20261120
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/dist/auth.js +8 -2
- package/dist/batch/items.js +1 -1
- package/docs/guides/batch.md +1 -1
- package/generated/index.dev.json +275 -0
- package/generated/index.prod.json +15 -13
- package/package.json +1 -1
- package/swagger/dev/ADM.json +23 -0
- package/swagger/dev/MAX.json +1472 -0
- package/swagger/dev/ONBRD.json +1303 -0
- package/swagger/dev/TSTG.json +124 -0
- package/swagger/prod/WH.json +179 -113
package/swagger/prod/WH.json
CHANGED
|
@@ -4826,12 +4826,13 @@
|
|
|
4826
4826
|
"tags": [
|
|
4827
4827
|
"Materials"
|
|
4828
4828
|
],
|
|
4829
|
-
"summary": "
|
|
4830
|
-
"description": "
|
|
4829
|
+
"summary": "Получение списка материалов",
|
|
4830
|
+
"description": "## Пример запроса:\r\n`GET /Materials?hideZeroStock=true&searchText=кронштейн`\r\n \r\n## Пример успешного ответа (200):\r\n```json\r\n[\r\n {\r\n \"id\": 110,\r\n \"name\": \"Комплект кронштейнов Г550*450\",\r\n \"erpID\": \"110\",\r\n \"description\": null,\r\n \"materialIsMarkable\": false,\r\n \"vendorCode\": null,\r\n \"cost\": 120,\r\n \"currency\": {\r\n \"id\": 1,\r\n \"asciiCode\": \"RUB\",\r\n \"shortName\": \"руб.\"\r\n },\r\n \"warehouse\": {\r\n \"id\": 1,\r\n \"name\": \"Основной склад\",\r\n \"erpID\": \"WH-01\",\r\n \"location\": null\r\n },\r\n \"importQuantity\": 10,\r\n \"actualQuantity\": 10,\r\n \"measurementUnit\": {\r\n \"id\": 796,\r\n \"name\": \"шт\"\r\n },\r\n \"task\": null,\r\n \"taken\": null,\r\n \"takenBy\": null,\r\n \"sortOrder\": 1\r\n }\r\n]\r\n```\r\n## Негативные сценарии:\r\n- 204 NoContent: материалы по заданным фильтрам не найдены.\r\n- 206 PartialContent: возвращена часть списка (задан Range).\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `MaterialListForTenantMember`.",
|
|
4831
4831
|
"parameters": [
|
|
4832
4832
|
{
|
|
4833
4833
|
"name": "searchText",
|
|
4834
4834
|
"in": "query",
|
|
4835
|
+
"description": "Текстовый поиск по наименованию или ErpID материала/склада.",
|
|
4835
4836
|
"schema": {
|
|
4836
4837
|
"type": "string"
|
|
4837
4838
|
}
|
|
@@ -4914,6 +4915,14 @@
|
|
|
4914
4915
|
"format": "int32"
|
|
4915
4916
|
}
|
|
4916
4917
|
},
|
|
4918
|
+
{
|
|
4919
|
+
"name": "hideZeroStock",
|
|
4920
|
+
"in": "query",
|
|
4921
|
+
"description": "Признак скрытия материалов с остатком ≤ 0",
|
|
4922
|
+
"schema": {
|
|
4923
|
+
"type": "boolean"
|
|
4924
|
+
}
|
|
4925
|
+
},
|
|
4917
4926
|
{
|
|
4918
4927
|
"name": "X-Application-ID",
|
|
4919
4928
|
"in": "header",
|
|
@@ -4943,7 +4952,7 @@
|
|
|
4943
4952
|
],
|
|
4944
4953
|
"responses": {
|
|
4945
4954
|
"200": {
|
|
4946
|
-
"description": "
|
|
4955
|
+
"description": "Список материалов.",
|
|
4947
4956
|
"content": {
|
|
4948
4957
|
"text/plain": {
|
|
4949
4958
|
"schema": {
|
|
@@ -4971,22 +4980,43 @@
|
|
|
4971
4980
|
}
|
|
4972
4981
|
}
|
|
4973
4982
|
},
|
|
4974
|
-
"
|
|
4975
|
-
"description": "
|
|
4976
|
-
},
|
|
4977
|
-
"403": {
|
|
4978
|
-
"description": "Forbidden"
|
|
4983
|
+
"204": {
|
|
4984
|
+
"description": "Материалы по заданным фильтрам не найдены."
|
|
4979
4985
|
},
|
|
4980
4986
|
"206": {
|
|
4981
|
-
"description": "
|
|
4982
|
-
"
|
|
4983
|
-
"
|
|
4984
|
-
"description": "items=FROM-TILL/OF , где FROM - начальный элемент (включая), TILL - конечный элемент (включая) OF - общее количество элементов",
|
|
4987
|
+
"description": "Часть списка материалов (по Range).",
|
|
4988
|
+
"content": {
|
|
4989
|
+
"text/plain": {
|
|
4985
4990
|
"schema": {
|
|
4986
|
-
"type": "
|
|
4991
|
+
"type": "array",
|
|
4992
|
+
"items": {
|
|
4993
|
+
"$ref": "#/components/schemas/ResultsMaterialsListResult"
|
|
4994
|
+
}
|
|
4995
|
+
}
|
|
4996
|
+
},
|
|
4997
|
+
"application/json": {
|
|
4998
|
+
"schema": {
|
|
4999
|
+
"type": "array",
|
|
5000
|
+
"items": {
|
|
5001
|
+
"$ref": "#/components/schemas/ResultsMaterialsListResult"
|
|
5002
|
+
}
|
|
5003
|
+
}
|
|
5004
|
+
},
|
|
5005
|
+
"text/json": {
|
|
5006
|
+
"schema": {
|
|
5007
|
+
"type": "array",
|
|
5008
|
+
"items": {
|
|
5009
|
+
"$ref": "#/components/schemas/ResultsMaterialsListResult"
|
|
5010
|
+
}
|
|
4987
5011
|
}
|
|
4988
5012
|
}
|
|
4989
5013
|
}
|
|
5014
|
+
},
|
|
5015
|
+
"401": {
|
|
5016
|
+
"description": "Отсутствует или некорректен Bearer-токен."
|
|
5017
|
+
},
|
|
5018
|
+
"403": {
|
|
5019
|
+
"description": "Недостаточно прав для чтения материалов."
|
|
4990
5020
|
}
|
|
4991
5021
|
},
|
|
4992
5022
|
"security": [
|
|
@@ -4999,12 +5029,13 @@
|
|
|
4999
5029
|
"tags": [
|
|
5000
5030
|
"Materials"
|
|
5001
5031
|
],
|
|
5002
|
-
"summary": "
|
|
5003
|
-
"description": "
|
|
5032
|
+
"summary": "Получение общего количества материалов",
|
|
5033
|
+
"description": "## Пример запроса:\r\n`HEAD /Materials?isDeleted=false&searchText=кронштейн`\r\n \r\n## Пример успешного ответа (200):\r\nПустое тело. Общее количество передаётся в заголовке `Content-Range`.\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `MaterialList`.",
|
|
5004
5034
|
"parameters": [
|
|
5005
5035
|
{
|
|
5006
5036
|
"name": "searchText",
|
|
5007
5037
|
"in": "query",
|
|
5038
|
+
"description": "Текстовый поиск по наименованию или ErpID материала.",
|
|
5008
5039
|
"schema": {
|
|
5009
5040
|
"type": "string"
|
|
5010
5041
|
}
|
|
@@ -5070,39 +5101,13 @@
|
|
|
5070
5101
|
],
|
|
5071
5102
|
"responses": {
|
|
5072
5103
|
"200": {
|
|
5073
|
-
"description": "
|
|
5074
|
-
"content": {
|
|
5075
|
-
"text/plain": {
|
|
5076
|
-
"schema": {
|
|
5077
|
-
"type": "object",
|
|
5078
|
-
"additionalProperties": {
|
|
5079
|
-
"$ref": "#/components/schemas/ResultsMaterialsMaterialListResult"
|
|
5080
|
-
}
|
|
5081
|
-
}
|
|
5082
|
-
},
|
|
5083
|
-
"application/json": {
|
|
5084
|
-
"schema": {
|
|
5085
|
-
"type": "object",
|
|
5086
|
-
"additionalProperties": {
|
|
5087
|
-
"$ref": "#/components/schemas/ResultsMaterialsMaterialListResult"
|
|
5088
|
-
}
|
|
5089
|
-
}
|
|
5090
|
-
},
|
|
5091
|
-
"text/json": {
|
|
5092
|
-
"schema": {
|
|
5093
|
-
"type": "object",
|
|
5094
|
-
"additionalProperties": {
|
|
5095
|
-
"$ref": "#/components/schemas/ResultsMaterialsMaterialListResult"
|
|
5096
|
-
}
|
|
5097
|
-
}
|
|
5098
|
-
}
|
|
5099
|
-
}
|
|
5104
|
+
"description": "Общее количество материалов в заголовке Content-Range."
|
|
5100
5105
|
},
|
|
5101
5106
|
"401": {
|
|
5102
|
-
"description": "
|
|
5107
|
+
"description": "Отсутствует или некорректен Bearer-токен."
|
|
5103
5108
|
},
|
|
5104
5109
|
"403": {
|
|
5105
|
-
"description": "
|
|
5110
|
+
"description": "Недостаточно прав для чтения материалов."
|
|
5106
5111
|
},
|
|
5107
5112
|
"206": {
|
|
5108
5113
|
"description": "PartialContent",
|
|
@@ -5126,7 +5131,8 @@
|
|
|
5126
5131
|
"tags": [
|
|
5127
5132
|
"Materials"
|
|
5128
5133
|
],
|
|
5129
|
-
"summary": "
|
|
5134
|
+
"summary": "Создание материалов",
|
|
5135
|
+
"description": "## Пример запроса:\r\n`POST /Materials`\r\n```json\r\n[\r\n {\r\n \"name\": \"Комплект кронштейнов Г550*450\",\r\n \"erpID\": \"110\",\r\n \"vendorCode\": null,\r\n \"description\": \"Кронштейн для оборудования\",\r\n \"measurementUnitID\": 796,\r\n \"costCurrencyID\": 1,\r\n \"cost\": 120,\r\n \"purchaseCostCurrencyID\": 1,\r\n \"purchaseCost\": 150,\r\n \"isMarkable\": false\r\n }\r\n]\r\n```\r\n \r\n## Пример успешного ответа (201):\r\n```json\r\n[110]\r\n```\r\n## Негативные сценарии:\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `MaterialAdd`.",
|
|
5130
5136
|
"parameters": [
|
|
5131
5137
|
{
|
|
5132
5138
|
"name": "X-Application-ID",
|
|
@@ -5156,7 +5162,7 @@
|
|
|
5156
5162
|
}
|
|
5157
5163
|
],
|
|
5158
5164
|
"requestBody": {
|
|
5159
|
-
"description": "",
|
|
5165
|
+
"description": "Список данных создаваемых материалов.",
|
|
5160
5166
|
"content": {
|
|
5161
5167
|
"application/json-patch+json": {
|
|
5162
5168
|
"schema": {
|
|
@@ -5194,7 +5200,7 @@
|
|
|
5194
5200
|
},
|
|
5195
5201
|
"responses": {
|
|
5196
5202
|
"201": {
|
|
5197
|
-
"description": "
|
|
5203
|
+
"description": "Материалы успешно созданы.",
|
|
5198
5204
|
"content": {
|
|
5199
5205
|
"text/plain": {
|
|
5200
5206
|
"schema": {
|
|
@@ -5226,10 +5232,10 @@
|
|
|
5226
5232
|
}
|
|
5227
5233
|
},
|
|
5228
5234
|
"401": {
|
|
5229
|
-
"description": "
|
|
5235
|
+
"description": "Отсутствует или некорректен Bearer-токен."
|
|
5230
5236
|
},
|
|
5231
5237
|
"403": {
|
|
5232
|
-
"description": "
|
|
5238
|
+
"description": "Недостаточно прав для создания материалов."
|
|
5233
5239
|
}
|
|
5234
5240
|
},
|
|
5235
5241
|
"security": [
|
|
@@ -5242,7 +5248,8 @@
|
|
|
5242
5248
|
"tags": [
|
|
5243
5249
|
"Materials"
|
|
5244
5250
|
],
|
|
5245
|
-
"summary": "
|
|
5251
|
+
"summary": "Изменение материалов",
|
|
5252
|
+
"description": "## Пример запроса:\r\n`PUT /Materials`\r\n```json\r\n[\r\n {\r\n \"id\": 110,\r\n \"name\": \"Комплект кронштейнов Г550*450\",\r\n \"erpID\": \"110\",\r\n \"vendorCode\": null,\r\n \"description\": \"Кронштейн для оборудования\",\r\n \"measurementUnitID\": 796,\r\n \"costCurrencyID\": 1,\r\n \"cost\": 120,\r\n \"purchaseCostCurrencyID\": 1,\r\n \"purchaseCost\": 150,\r\n \"isMarkable\": false\r\n }\r\n]\r\n```\r\n \r\n## Пример успешного ответа (202):\r\nПустое тело.\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `MaterialUpdate`.",
|
|
5246
5253
|
"parameters": [
|
|
5247
5254
|
{
|
|
5248
5255
|
"name": "X-Application-ID",
|
|
@@ -5272,7 +5279,7 @@
|
|
|
5272
5279
|
}
|
|
5273
5280
|
],
|
|
5274
5281
|
"requestBody": {
|
|
5275
|
-
"description": "",
|
|
5282
|
+
"description": "Список данных изменяемых материалов.",
|
|
5276
5283
|
"content": {
|
|
5277
5284
|
"application/json-patch+json": {
|
|
5278
5285
|
"schema": {
|
|
@@ -5310,13 +5317,13 @@
|
|
|
5310
5317
|
},
|
|
5311
5318
|
"responses": {
|
|
5312
5319
|
"202": {
|
|
5313
|
-
"description": "
|
|
5320
|
+
"description": "Материалы успешно изменены."
|
|
5314
5321
|
},
|
|
5315
5322
|
"401": {
|
|
5316
|
-
"description": "
|
|
5323
|
+
"description": "Отсутствует или некорректен Bearer-токен."
|
|
5317
5324
|
},
|
|
5318
5325
|
"403": {
|
|
5319
|
-
"description": "
|
|
5326
|
+
"description": "Недостаточно прав для изменения материалов."
|
|
5320
5327
|
}
|
|
5321
5328
|
},
|
|
5322
5329
|
"security": [
|
|
@@ -5329,7 +5336,8 @@
|
|
|
5329
5336
|
"tags": [
|
|
5330
5337
|
"Materials"
|
|
5331
5338
|
],
|
|
5332
|
-
"summary": "
|
|
5339
|
+
"summary": "Удаление материалов",
|
|
5340
|
+
"description": "## Пример запроса:\r\n`DELETE /Materials`\r\n```json\r\n[110, 111]\r\n```\r\n \r\n## Пример успешного ответа (202):\r\nПустое тело.\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `MaterialDelete`.",
|
|
5333
5341
|
"parameters": [
|
|
5334
5342
|
{
|
|
5335
5343
|
"name": "X-Application-ID",
|
|
@@ -5359,7 +5367,7 @@
|
|
|
5359
5367
|
}
|
|
5360
5368
|
],
|
|
5361
5369
|
"requestBody": {
|
|
5362
|
-
"description": "Список идентификаторов удаляемых
|
|
5370
|
+
"description": "Список идентификаторов удаляемых материалов.",
|
|
5363
5371
|
"content": {
|
|
5364
5372
|
"application/json-patch+json": {
|
|
5365
5373
|
"schema": {
|
|
@@ -5401,13 +5409,13 @@
|
|
|
5401
5409
|
},
|
|
5402
5410
|
"responses": {
|
|
5403
5411
|
"202": {
|
|
5404
|
-
"description": "
|
|
5412
|
+
"description": "Материалы успешно удалены."
|
|
5405
5413
|
},
|
|
5406
5414
|
"401": {
|
|
5407
|
-
"description": "
|
|
5415
|
+
"description": "Отсутствует или некорректен Bearer-токен."
|
|
5408
5416
|
},
|
|
5409
5417
|
"403": {
|
|
5410
|
-
"description": "
|
|
5418
|
+
"description": "Недостаточно прав для удаления материалов."
|
|
5411
5419
|
}
|
|
5412
5420
|
},
|
|
5413
5421
|
"security": [
|
|
@@ -5422,12 +5430,13 @@
|
|
|
5422
5430
|
"tags": [
|
|
5423
5431
|
"Materials"
|
|
5424
5432
|
],
|
|
5425
|
-
"summary": "
|
|
5426
|
-
"description": "
|
|
5433
|
+
"summary": "Получение списка материалов",
|
|
5434
|
+
"description": "## Пример запроса:\r\n`GET /Materials/required?hideZeroStock=true&warehouseID=1`\r\n \r\n## Пример успешного ответа (200):\r\n```json\r\n[\r\n {\r\n \"id\": 110,\r\n \"name\": \"Комплект кронштейнов Г550*450\",\r\n \"erpID\": \"110\",\r\n \"description\": null,\r\n \"materialIsMarkable\": false,\r\n \"vendorCode\": null,\r\n \"cost\": 120,\r\n \"currency\": {\r\n \"id\": 1,\r\n \"asciiCode\": \"RUB\",\r\n \"shortName\": \"руб.\"\r\n },\r\n \"warehouse\": {\r\n \"id\": 1,\r\n \"name\": \"Основной склад\",\r\n \"erpID\": \"WH-01\",\r\n \"location\": null\r\n },\r\n \"importQuantity\": 10,\r\n \"actualQuantity\": 10,\r\n \"measurementUnit\": {\r\n \"id\": 796,\r\n \"name\": \"шт\"\r\n },\r\n \"sortOrder\": 1\r\n }\r\n]\r\n```\r\n## Негативные сценарии:\r\n- 204 NoContent: материалы по заданным фильтрам не найдены.\r\n- 206 PartialContent: возвращена часть списка (задан Range).\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `MaterialRequiredListForTenantMember`.",
|
|
5427
5435
|
"parameters": [
|
|
5428
5436
|
{
|
|
5429
5437
|
"name": "searchText",
|
|
5430
5438
|
"in": "query",
|
|
5439
|
+
"description": "Текстовый поиск по наименованию или ErpID материала/склада.",
|
|
5431
5440
|
"schema": {
|
|
5432
5441
|
"type": "string"
|
|
5433
5442
|
}
|
|
@@ -5509,6 +5518,14 @@
|
|
|
5509
5518
|
"format": "date-time"
|
|
5510
5519
|
}
|
|
5511
5520
|
},
|
|
5521
|
+
{
|
|
5522
|
+
"name": "hideZeroStock",
|
|
5523
|
+
"in": "query",
|
|
5524
|
+
"description": "Признак скрытия материалов с остатком ≤ 0",
|
|
5525
|
+
"schema": {
|
|
5526
|
+
"type": "boolean"
|
|
5527
|
+
}
|
|
5528
|
+
},
|
|
5512
5529
|
{
|
|
5513
5530
|
"name": "X-Application-ID",
|
|
5514
5531
|
"in": "header",
|
|
@@ -5538,7 +5555,7 @@
|
|
|
5538
5555
|
],
|
|
5539
5556
|
"responses": {
|
|
5540
5557
|
"200": {
|
|
5541
|
-
"description": "
|
|
5558
|
+
"description": "Список материалов.",
|
|
5542
5559
|
"content": {
|
|
5543
5560
|
"text/plain": {
|
|
5544
5561
|
"schema": {
|
|
@@ -5566,22 +5583,43 @@
|
|
|
5566
5583
|
}
|
|
5567
5584
|
}
|
|
5568
5585
|
},
|
|
5569
|
-
"
|
|
5570
|
-
"description": "
|
|
5571
|
-
},
|
|
5572
|
-
"403": {
|
|
5573
|
-
"description": "Forbidden"
|
|
5586
|
+
"204": {
|
|
5587
|
+
"description": "Материалы по заданным фильтрам не найдены."
|
|
5574
5588
|
},
|
|
5575
5589
|
"206": {
|
|
5576
|
-
"description": "
|
|
5577
|
-
"
|
|
5578
|
-
"
|
|
5579
|
-
"description": "items=FROM-TILL/OF , где FROM - начальный элемент (включая), TILL - конечный элемент (включая) OF - общее количество элементов",
|
|
5590
|
+
"description": "Часть списка материалов (по Range).",
|
|
5591
|
+
"content": {
|
|
5592
|
+
"text/plain": {
|
|
5580
5593
|
"schema": {
|
|
5581
|
-
"type": "
|
|
5594
|
+
"type": "array",
|
|
5595
|
+
"items": {
|
|
5596
|
+
"$ref": "#/components/schemas/ResultsMaterialsListRequiredResult"
|
|
5597
|
+
}
|
|
5598
|
+
}
|
|
5599
|
+
},
|
|
5600
|
+
"application/json": {
|
|
5601
|
+
"schema": {
|
|
5602
|
+
"type": "array",
|
|
5603
|
+
"items": {
|
|
5604
|
+
"$ref": "#/components/schemas/ResultsMaterialsListRequiredResult"
|
|
5605
|
+
}
|
|
5606
|
+
}
|
|
5607
|
+
},
|
|
5608
|
+
"text/json": {
|
|
5609
|
+
"schema": {
|
|
5610
|
+
"type": "array",
|
|
5611
|
+
"items": {
|
|
5612
|
+
"$ref": "#/components/schemas/ResultsMaterialsListRequiredResult"
|
|
5613
|
+
}
|
|
5582
5614
|
}
|
|
5583
5615
|
}
|
|
5584
5616
|
}
|
|
5617
|
+
},
|
|
5618
|
+
"401": {
|
|
5619
|
+
"description": "Отсутствует или некорректен Bearer-токен."
|
|
5620
|
+
},
|
|
5621
|
+
"403": {
|
|
5622
|
+
"description": "Недостаточно прав для чтения материалов."
|
|
5585
5623
|
}
|
|
5586
5624
|
},
|
|
5587
5625
|
"security": [
|
|
@@ -5596,7 +5634,8 @@
|
|
|
5596
5634
|
"tags": [
|
|
5597
5635
|
"Materials"
|
|
5598
5636
|
],
|
|
5599
|
-
"summary": "
|
|
5637
|
+
"summary": "Получение детальной информации о материале",
|
|
5638
|
+
"description": "## Пример запроса:\r\n`GET /Materials/110`\r\n \r\n## Пример успешного ответа (200):\r\n```json\r\n{\r\n \"id\": 110,\r\n \"name\": \"Комплект кронштейнов Г550*450\",\r\n \"erpID\": \"110\",\r\n \"vendorCode\": null,\r\n \"description\": \"Кронштейн для оборудования\",\r\n \"isMarkable\": false,\r\n \"measurementUnitID\": 796,\r\n \"cost\": 120,\r\n \"costCurrencyID\": 1,\r\n \"purchaseCost\": 150,\r\n \"purchaseCostCurrencyID\": 1,\r\n \"deleted\": null,\r\n \"measurementUnit\": {\r\n \"id\": 796,\r\n \"abbreviation\": \"шт\",\r\n \"designation\": \"шт\",\r\n \"name\": \"Штука\"\r\n },\r\n \"costCurrency\": {\r\n \"id\": 1,\r\n \"asciiCode\": \"RUB\",\r\n \"shortName\": \"руб.\"\r\n },\r\n \"purchaseCostCurrency\": {\r\n \"id\": 1,\r\n \"asciiCode\": \"RUB\",\r\n \"shortName\": \"руб.\"\r\n }\r\n}\r\n```\r\n## Негативные сценарии:\r\n- 204 NoContent: материал с указанным `id` не найден.\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `MaterialGet`.",
|
|
5600
5639
|
"parameters": [
|
|
5601
5640
|
{
|
|
5602
5641
|
"name": "id",
|
|
@@ -5637,7 +5676,7 @@
|
|
|
5637
5676
|
],
|
|
5638
5677
|
"responses": {
|
|
5639
5678
|
"200": {
|
|
5640
|
-
"description": "
|
|
5679
|
+
"description": "Детальная информация о материале.",
|
|
5641
5680
|
"content": {
|
|
5642
5681
|
"text/plain": {
|
|
5643
5682
|
"schema": {
|
|
@@ -5656,11 +5695,14 @@
|
|
|
5656
5695
|
}
|
|
5657
5696
|
}
|
|
5658
5697
|
},
|
|
5698
|
+
"204": {
|
|
5699
|
+
"description": "Материал с указанным идентификатором не найден."
|
|
5700
|
+
},
|
|
5659
5701
|
"401": {
|
|
5660
|
-
"description": "
|
|
5702
|
+
"description": "Отсутствует или некорректен Bearer-токен."
|
|
5661
5703
|
},
|
|
5662
5704
|
"403": {
|
|
5663
|
-
"description": "
|
|
5705
|
+
"description": "Недостаточно прав для чтения материалов."
|
|
5664
5706
|
}
|
|
5665
5707
|
},
|
|
5666
5708
|
"security": [
|
|
@@ -5673,7 +5715,8 @@
|
|
|
5673
5715
|
"tags": [
|
|
5674
5716
|
"Materials"
|
|
5675
5717
|
],
|
|
5676
|
-
"summary": "
|
|
5718
|
+
"summary": "Удаление материала",
|
|
5719
|
+
"description": "## Пример запроса:\r\n`DELETE /Materials/110`\r\n \r\n## Пример успешного ответа (202):\r\nПустое тело.\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `MaterialDelete`.\r\n- 409 Conflict: материал нельзя удалить.",
|
|
5677
5720
|
"parameters": [
|
|
5678
5721
|
{
|
|
5679
5722
|
"name": "id",
|
|
@@ -5714,10 +5757,16 @@
|
|
|
5714
5757
|
],
|
|
5715
5758
|
"responses": {
|
|
5716
5759
|
"202": {
|
|
5717
|
-
"description": "
|
|
5760
|
+
"description": "Материал успешно удалён."
|
|
5761
|
+
},
|
|
5762
|
+
"401": {
|
|
5763
|
+
"description": "Отсутствует или некорректен Bearer-токен."
|
|
5764
|
+
},
|
|
5765
|
+
"403": {
|
|
5766
|
+
"description": "Недостаточно прав для удаления материалов."
|
|
5718
5767
|
},
|
|
5719
5768
|
"409": {
|
|
5720
|
-
"description": "
|
|
5769
|
+
"description": "Конфликт при удалении материала.",
|
|
5721
5770
|
"content": {
|
|
5722
5771
|
"text/plain": {
|
|
5723
5772
|
"schema": {
|
|
@@ -5744,12 +5793,6 @@
|
|
|
5744
5793
|
}
|
|
5745
5794
|
}
|
|
5746
5795
|
}
|
|
5747
|
-
},
|
|
5748
|
-
"401": {
|
|
5749
|
-
"description": "Unauthorized"
|
|
5750
|
-
},
|
|
5751
|
-
"403": {
|
|
5752
|
-
"description": "Forbidden"
|
|
5753
5796
|
}
|
|
5754
5797
|
},
|
|
5755
5798
|
"security": [
|
|
@@ -5764,12 +5807,13 @@
|
|
|
5764
5807
|
"tags": [
|
|
5765
5808
|
"Materials"
|
|
5766
5809
|
],
|
|
5767
|
-
"summary": "
|
|
5768
|
-
"description": "
|
|
5810
|
+
"summary": "Получение списка материалов (v2)",
|
|
5811
|
+
"description": "## Пример запроса:\r\n`GET /Materials/v2?isDeleted=false&isMarkable=true&searchText=кронштейн`\r\n \r\n## Пример успешного ответа (200):\r\n```json\r\n{\r\n \"110\": {\r\n \"id\": 110,\r\n \"name\": \"Комплект кронштейнов Г550*450\",\r\n \"erpID\": \"110\",\r\n \"vendorCode\": null,\r\n \"description\": \"Кронштейн для оборудования\",\r\n \"isMarkable\": false,\r\n \"measurementUnitID\": 796,\r\n \"cost\": 120,\r\n \"costCurrencyID\": 1,\r\n \"purchaseCost\": 150,\r\n \"purchaseCostCurrencyID\": 1,\r\n \"deleted\": null,\r\n \"measurementUnit\": {\r\n \"id\": 796,\r\n \"abbreviation\": \"шт\",\r\n \"designation\": \"шт\",\r\n \"name\": \"Штука\"\r\n },\r\n \"costCurrency\": {\r\n \"id\": 1,\r\n \"asciiCode\": \"RUB\",\r\n \"shortName\": \"руб.\"\r\n },\r\n \"purchaseCostCurrency\": {\r\n \"id\": 1,\r\n \"asciiCode\": \"RUB\",\r\n \"shortName\": \"руб.\"\r\n },\r\n \"sortOrder\": 1\r\n }\r\n}\r\n```\r\n## Негативные сценарии:\r\n- 204 NoContent: материалы по заданным фильтрам не найдены.\r\n- 206 PartialContent: возвращена часть списка (задан Range).\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `MaterialList`.",
|
|
5769
5812
|
"parameters": [
|
|
5770
5813
|
{
|
|
5771
5814
|
"name": "searchText",
|
|
5772
5815
|
"in": "query",
|
|
5816
|
+
"description": "Текстовый поиск по наименованию или ErpID материала.",
|
|
5773
5817
|
"schema": {
|
|
5774
5818
|
"type": "string"
|
|
5775
5819
|
}
|
|
@@ -5843,7 +5887,7 @@
|
|
|
5843
5887
|
],
|
|
5844
5888
|
"responses": {
|
|
5845
5889
|
"200": {
|
|
5846
|
-
"description": "
|
|
5890
|
+
"description": "Список материалов.",
|
|
5847
5891
|
"content": {
|
|
5848
5892
|
"text/plain": {
|
|
5849
5893
|
"schema": {
|
|
@@ -5871,22 +5915,43 @@
|
|
|
5871
5915
|
}
|
|
5872
5916
|
}
|
|
5873
5917
|
},
|
|
5874
|
-
"
|
|
5875
|
-
"description": "
|
|
5876
|
-
},
|
|
5877
|
-
"403": {
|
|
5878
|
-
"description": "Forbidden"
|
|
5918
|
+
"204": {
|
|
5919
|
+
"description": "Материалы по заданным фильтрам не найдены."
|
|
5879
5920
|
},
|
|
5880
5921
|
"206": {
|
|
5881
|
-
"description": "
|
|
5882
|
-
"
|
|
5883
|
-
"
|
|
5884
|
-
"description": "items=FROM-TILL/OF , где FROM - начальный элемент (включая), TILL - конечный элемент (включая) OF - общее количество элементов",
|
|
5922
|
+
"description": "Часть списка материалов (по Range).",
|
|
5923
|
+
"content": {
|
|
5924
|
+
"text/plain": {
|
|
5885
5925
|
"schema": {
|
|
5886
|
-
"type": "
|
|
5926
|
+
"type": "object",
|
|
5927
|
+
"additionalProperties": {
|
|
5928
|
+
"$ref": "#/components/schemas/ResultsMaterialsMaterialListResult"
|
|
5929
|
+
}
|
|
5930
|
+
}
|
|
5931
|
+
},
|
|
5932
|
+
"application/json": {
|
|
5933
|
+
"schema": {
|
|
5934
|
+
"type": "object",
|
|
5935
|
+
"additionalProperties": {
|
|
5936
|
+
"$ref": "#/components/schemas/ResultsMaterialsMaterialListResult"
|
|
5937
|
+
}
|
|
5938
|
+
}
|
|
5939
|
+
},
|
|
5940
|
+
"text/json": {
|
|
5941
|
+
"schema": {
|
|
5942
|
+
"type": "object",
|
|
5943
|
+
"additionalProperties": {
|
|
5944
|
+
"$ref": "#/components/schemas/ResultsMaterialsMaterialListResult"
|
|
5945
|
+
}
|
|
5887
5946
|
}
|
|
5888
5947
|
}
|
|
5889
5948
|
}
|
|
5949
|
+
},
|
|
5950
|
+
"401": {
|
|
5951
|
+
"description": "Отсутствует или некорректен Bearer-токен."
|
|
5952
|
+
},
|
|
5953
|
+
"403": {
|
|
5954
|
+
"description": "Недостаточно прав для чтения материалов."
|
|
5890
5955
|
}
|
|
5891
5956
|
},
|
|
5892
5957
|
"security": [
|
|
@@ -5901,7 +5966,8 @@
|
|
|
5901
5966
|
"tags": [
|
|
5902
5967
|
"Materials"
|
|
5903
5968
|
],
|
|
5904
|
-
"summary": "
|
|
5969
|
+
"summary": "Восстановление материалов из удалённых",
|
|
5970
|
+
"description": "## Пример запроса:\r\n`PUT /Materials/restore`\r\n```json\r\n[110, 111]\r\n```\r\n \r\n## Пример успешного ответа (202):\r\nПустое тело.\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `MaterialRestore`.",
|
|
5905
5971
|
"parameters": [
|
|
5906
5972
|
{
|
|
5907
5973
|
"name": "X-Application-ID",
|
|
@@ -5931,7 +5997,7 @@
|
|
|
5931
5997
|
}
|
|
5932
5998
|
],
|
|
5933
5999
|
"requestBody": {
|
|
5934
|
-
"description": "Список идентификаторов восстанавливаемых
|
|
6000
|
+
"description": "Список идентификаторов восстанавливаемых материалов.",
|
|
5935
6001
|
"content": {
|
|
5936
6002
|
"application/json-patch+json": {
|
|
5937
6003
|
"schema": {
|
|
@@ -5973,13 +6039,13 @@
|
|
|
5973
6039
|
},
|
|
5974
6040
|
"responses": {
|
|
5975
6041
|
"202": {
|
|
5976
|
-
"description": "
|
|
6042
|
+
"description": "Материалы успешно восстановлены."
|
|
5977
6043
|
},
|
|
5978
6044
|
"401": {
|
|
5979
|
-
"description": "
|
|
6045
|
+
"description": "Отсутствует или некорректен Bearer-токен."
|
|
5980
6046
|
},
|
|
5981
6047
|
"403": {
|
|
5982
|
-
"description": "
|
|
6048
|
+
"description": "Недостаточно прав для восстановления материалов."
|
|
5983
6049
|
}
|
|
5984
6050
|
},
|
|
5985
6051
|
"security": [
|
|
@@ -5994,8 +6060,8 @@
|
|
|
5994
6060
|
"tags": [
|
|
5995
6061
|
"Materials"
|
|
5996
6062
|
],
|
|
5997
|
-
"summary": "
|
|
5998
|
-
"description": "
|
|
6063
|
+
"summary": "Восстановление материала из удалённых",
|
|
6064
|
+
"description": "## Пример запроса:\r\n`PUT /Materials/110/restore`\r\n \r\n## Пример успешного ответа (202):\r\nПустое тело.\r\n \r\n## Негативные сценарии:\r\n- 401 Unauthorized: отсутствует или некорректен Bearer-токен.\r\n- 403 Forbidden: недостаточно прав `MaterialRestore`.\r\n- 409 Conflict: материал нельзя восстановить.",
|
|
5999
6065
|
"parameters": [
|
|
6000
6066
|
{
|
|
6001
6067
|
"name": "id",
|
|
@@ -6060,10 +6126,16 @@
|
|
|
6060
6126
|
],
|
|
6061
6127
|
"responses": {
|
|
6062
6128
|
"202": {
|
|
6063
|
-
"description": "
|
|
6129
|
+
"description": "Материал успешно восстановлен."
|
|
6130
|
+
},
|
|
6131
|
+
"401": {
|
|
6132
|
+
"description": "Отсутствует или некорректен Bearer-токен."
|
|
6133
|
+
},
|
|
6134
|
+
"403": {
|
|
6135
|
+
"description": "Недостаточно прав для восстановления материалов."
|
|
6064
6136
|
},
|
|
6065
6137
|
"409": {
|
|
6066
|
-
"description": "
|
|
6138
|
+
"description": "Конфликт при восстановлении материала.",
|
|
6067
6139
|
"content": {
|
|
6068
6140
|
"text/plain": {
|
|
6069
6141
|
"schema": {
|
|
@@ -6091,12 +6163,6 @@
|
|
|
6091
6163
|
}
|
|
6092
6164
|
}
|
|
6093
6165
|
},
|
|
6094
|
-
"401": {
|
|
6095
|
-
"description": "Unauthorized"
|
|
6096
|
-
},
|
|
6097
|
-
"403": {
|
|
6098
|
-
"description": "Forbidden"
|
|
6099
|
-
},
|
|
6100
6166
|
"206": {
|
|
6101
6167
|
"description": "PartialContent",
|
|
6102
6168
|
"headers": {
|