2024-05-17 22:34:55 +00:00
|
|
|
{
|
|
|
|
"swagger": "2.0",
|
|
|
|
"info": {
|
|
|
|
"title": "main.proto",
|
|
|
|
"version": "version not set"
|
|
|
|
},
|
2024-05-21 21:13:01 +00:00
|
|
|
"tags": [
|
|
|
|
{
|
|
|
|
"name": "CRM"
|
|
|
|
}
|
|
|
|
],
|
2024-05-17 22:34:55 +00:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"paths": {
|
2024-05-18 06:16:57 +00:00
|
|
|
"/breadcrumbs/{id}": {
|
|
|
|
"get": {
|
|
|
|
"operationId": "CRM_GetBreadcrumbs",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "A successful response.",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/crmBreadcrumbsRsp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "An unexpected error response.",
|
|
|
|
"schema": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"$ref": "#/definitions/rpcStatus"
|
2024-05-18 06:16:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true,
|
|
|
|
"type": "string",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"CRM"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2024-05-17 22:34:55 +00:00
|
|
|
"/catalog": {
|
|
|
|
"get": {
|
|
|
|
"operationId": "CRM_GetCatalog",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "A successful response.",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/crmCatalogRsp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "An unexpected error response.",
|
|
|
|
"schema": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"$ref": "#/definitions/rpcStatus"
|
2024-05-17 22:34:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"tags": [
|
|
|
|
"CRM"
|
|
|
|
]
|
|
|
|
}
|
2024-05-18 05:36:31 +00:00
|
|
|
},
|
2024-05-22 18:40:59 +00:00
|
|
|
"/orders": {
|
|
|
|
"post": {
|
|
|
|
"operationId": "CRM_Order",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "A successful response.",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/crmOrderRsp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "An unexpected error response.",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/rpcStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "order",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/crabscrmOrder"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "name",
|
|
|
|
"in": "query",
|
|
|
|
"required": false,
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "phone",
|
|
|
|
"in": "query",
|
|
|
|
"required": false,
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"CRM"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2024-05-18 05:36:31 +00:00
|
|
|
"/positions/{id}": {
|
|
|
|
"get": {
|
|
|
|
"operationId": "CRM_GetPositions",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "A successful response.",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/crmPositionsRsp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "An unexpected error response.",
|
|
|
|
"schema": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"$ref": "#/definitions/rpcStatus"
|
2024-05-18 05:36:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true,
|
|
|
|
"type": "string",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"CRM"
|
|
|
|
]
|
|
|
|
}
|
2024-05-18 05:58:50 +00:00
|
|
|
},
|
|
|
|
"/products/{id}": {
|
|
|
|
"get": {
|
|
|
|
"operationId": "CRM_GetProduct",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "A successful response.",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/crmProductRsp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "An unexpected error response.",
|
|
|
|
"schema": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"$ref": "#/definitions/rpcStatus"
|
2024-05-18 05:58:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true,
|
|
|
|
"type": "string",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"CRM"
|
|
|
|
]
|
|
|
|
}
|
2024-05-17 22:34:55 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"definitions": {
|
2024-05-22 18:40:59 +00:00
|
|
|
"crabscrmOrder": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"items": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "object",
|
|
|
|
"$ref": "#/definitions/crmOrderItem"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-18 06:16:57 +00:00
|
|
|
"crmBreadcrumbsRsp": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"categories": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"type": "object",
|
2024-05-18 06:16:57 +00:00
|
|
|
"$ref": "#/definitions/crmCategory"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-18 05:36:31 +00:00
|
|
|
"crmCatalogRsp": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"categories": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"type": "object",
|
2024-05-18 05:36:31 +00:00
|
|
|
"$ref": "#/definitions/crmCategory"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"crmCategory": {
|
2024-05-17 22:34:55 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"id": {
|
|
|
|
"type": "string",
|
|
|
|
"format": "int64"
|
|
|
|
},
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"uri": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"children": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"type": "object",
|
2024-05-18 05:36:31 +00:00
|
|
|
"$ref": "#/definitions/crmCategory"
|
2024-05-17 22:34:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-18 05:36:31 +00:00
|
|
|
"crmCharacteristic": {
|
2024-05-17 22:34:55 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-05-18 05:36:31 +00:00
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"value": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"crmGroupedProduct": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"uri": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"image": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-22 18:40:59 +00:00
|
|
|
"crmOrderItem": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"productId": {
|
|
|
|
"type": "string",
|
|
|
|
"format": "int64"
|
|
|
|
},
|
|
|
|
"count": {
|
|
|
|
"type": "string",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"crmOrderRsp": {
|
|
|
|
"type": "object"
|
|
|
|
},
|
2024-05-18 05:36:31 +00:00
|
|
|
"crmPositionsRsp": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"products": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"type": "object",
|
2024-05-18 05:36:31 +00:00
|
|
|
"$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"
|
|
|
|
},
|
2024-05-21 21:13:01 +00:00
|
|
|
"groupedProducts": {
|
2024-05-18 05:36:31 +00:00
|
|
|
"type": "array",
|
|
|
|
"items": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"type": "object",
|
2024-05-18 05:36:31 +00:00
|
|
|
"$ref": "#/definitions/crmGroupedProduct"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"unit": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"inventory": {
|
|
|
|
"type": "number",
|
|
|
|
"format": "double"
|
|
|
|
},
|
|
|
|
"variants": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"type": "object",
|
2024-05-18 05:36:31 +00:00
|
|
|
"$ref": "#/definitions/crmVariant"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"characteristics": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"type": "object",
|
2024-05-18 05:36:31 +00:00
|
|
|
"$ref": "#/definitions/crmCharacteristic"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"category": {
|
|
|
|
"type": "string",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-18 05:58:50 +00:00
|
|
|
"crmProductRsp": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"product": {
|
|
|
|
"$ref": "#/definitions/crmProduct"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-18 05:36:31 +00:00
|
|
|
"crmProperty": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"value": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"crmVariant": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"price": {
|
|
|
|
"type": "string",
|
|
|
|
"format": "int64"
|
|
|
|
},
|
|
|
|
"properties": {
|
2024-05-17 22:34:55 +00:00
|
|
|
"type": "array",
|
|
|
|
"items": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"type": "object",
|
2024-05-18 05:36:31 +00:00
|
|
|
"$ref": "#/definitions/crmProperty"
|
2024-05-17 22:34:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"protobufAny": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"@type": {
|
2024-05-17 22:34:55 +00:00
|
|
|
"type": "string"
|
|
|
|
}
|
2024-05-21 21:13:01 +00:00
|
|
|
},
|
|
|
|
"additionalProperties": {}
|
2024-05-17 22:34:55 +00:00
|
|
|
},
|
2024-05-21 21:13:01 +00:00
|
|
|
"rpcStatus": {
|
2024-05-17 22:34:55 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"code": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int32"
|
|
|
|
},
|
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"details": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
2024-05-21 21:13:01 +00:00
|
|
|
"type": "object",
|
2024-05-17 22:34:55 +00:00
|
|
|
"$ref": "#/definitions/protobufAny"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|