add positions

This commit is contained in:
2024-05-18 12:36:31 +07:00
parent 0960f3e9dc
commit afd5536246
10 changed files with 1146 additions and 213 deletions
+154 -5
View File
@@ -32,10 +32,52 @@
"CRM"
]
}
},
"/positions/{id}": {
"get": {
"operationId": "CRM_GetPositions",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/crmPositionsRsp"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
}
],
"tags": [
"CRM"
]
}
}
},
"definitions": {
"CatalogRspCategory": {
"crmCatalogRsp": {
"type": "object",
"properties": {
"categories": {
"type": "array",
"items": {
"$ref": "#/definitions/crmCategory"
}
}
}
},
"crmCategory": {
"type": "object",
"properties": {
"id": {
@@ -51,18 +93,125 @@
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/CatalogRspCategory"
"$ref": "#/definitions/crmCategory"
}
}
}
},
"crmCatalogRsp": {
"crmCharacteristic": {
"type": "object",
"properties": {
"categories": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"crmGroupedProduct": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"uri": {
"type": "string"
},
"image": {
"type": "string"
}
}
},
"crmPositionsRsp": {
"type": "object",
"properties": {
"products": {
"type": "array",
"items": {
"$ref": "#/definitions/CatalogRspCategory"
"$ref": "#/definitions/crmProduct"
}
}
}
},
"crmProduct": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
},
"article": {
"type": "string"
},
"name": {
"type": "string"
},
"uri": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"type": "string"
}
},
"description": {
"type": "string"
},
"grouped_products": {
"type": "array",
"items": {
"$ref": "#/definitions/crmGroupedProduct"
}
},
"unit": {
"type": "string"
},
"inventory": {
"type": "number",
"format": "double"
},
"variants": {
"type": "array",
"items": {
"$ref": "#/definitions/crmVariant"
}
},
"characteristics": {
"type": "array",
"items": {
"$ref": "#/definitions/crmCharacteristic"
}
},
"category": {
"type": "string",
"format": "int64"
}
}
},
"crmProperty": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"crmVariant": {
"type": "object",
"properties": {
"price": {
"type": "string",
"format": "int64"
},
"properties": {
"type": "array",
"items": {
"$ref": "#/definitions/crmProperty"
}
}
}