2
0

🚸 (results) Add time filter to results table as…

This commit is contained in:
Baptiste Arnaud
2024-02-06 17:48:31 +01:00
parent 3e2533b934
commit 066fabce06
20 changed files with 376 additions and 67 deletions

View File

@ -2900,6 +2900,131 @@
}
}
},
"/v1/typebots/{typebotId}/analytics/stats": {
"get": {
"operationId": "analytics-getStats",
"summary": "Get results stats",
"tags": [
"Analytics"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "typebotId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "timeFilter",
"schema": {
"type": "string",
"enum": [
"today",
"last7Days",
"last30Days",
"yearToDate",
"allTime"
],
"default": "today"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"stats": {
"type": "object",
"properties": {
"totalViews": {
"type": "number"
},
"totalStarts": {
"type": "number"
},
"totalCompleted": {
"type": "number"
}
},
"required": [
"totalViews",
"totalStarts",
"totalCompleted"
]
}
},
"required": [
"stats"
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/v1/workspaces": {
"get": {
"operationId": "workspace-listWorkspaces",
@ -10851,6 +10976,21 @@
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "timeFilter",
"schema": {
"type": "string",
"enum": [
"today",
"last7Days",
"last30Days",
"yearToDate",
"allTime"
],
"default": "today"
}
}
],
"responses": {