refactor(server): asset stats (#3253)

* refactor(server): asset stats

* chore: open api
This commit is contained in:
Jason Rasmussen
2023-07-14 09:30:17 -04:00
committed by GitHub
parent 05e1a6d949
commit f952bc0b64
29 changed files with 601 additions and 844 deletions

View File

@@ -984,38 +984,6 @@
]
}
},
"/asset/count-by-user-id": {
"get": {
"operationId": "getAssetCountByUserId",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssetCountByUserIdResponseDto"
}
}
}
}
},
"tags": [
"Asset"
],
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
]
}
},
"/asset/curated-locations": {
"get": {
"operationId": "getCuratedLocations",
@@ -1608,17 +1576,34 @@
]
}
},
"/asset/stat/archive": {
"/asset/statistics": {
"get": {
"operationId": "getArchivedAssetCountByUserId",
"parameters": [],
"operationId": "getAssetStats",
"parameters": [
{
"name": "isArchived",
"required": false,
"in": "query",
"schema": {
"type": "boolean"
}
},
{
"name": "isFavorite",
"required": false,
"in": "query",
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssetCountByUserIdResponseDto"
"$ref": "#/components/schemas/AssetStatsResponseDto"
}
}
}
@@ -4786,38 +4771,6 @@
"buckets"
]
},
"AssetCountByUserIdResponseDto": {
"type": "object",
"properties": {
"audio": {
"type": "integer",
"default": 0
},
"photos": {
"type": "integer",
"default": 0
},
"videos": {
"type": "integer",
"default": 0
},
"other": {
"type": "integer",
"default": 0
},
"total": {
"type": "integer",
"default": 0
}
},
"required": [
"audio",
"photos",
"videos",
"other",
"total"
]
},
"AssetFileUploadResponseDto": {
"type": "object",
"properties": {
@@ -4970,6 +4923,25 @@
"checksum"
]
},
"AssetStatsResponseDto": {
"type": "object",
"properties": {
"images": {
"type": "integer"
},
"videos": {
"type": "integer"
},
"total": {
"type": "integer"
}
},
"required": [
"images",
"videos",
"total"
]
},
"AssetTypeEnum": {
"type": "string",
"enum": [