From 683cbd4a898ead825d37e2e76fd208a5758e449c Mon Sep 17 00:00:00 2001 From: "konfig-bot[bot]" <121480725+konfig-bot[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:31:03 +0000 Subject: [PATCH 1/2] Update OpenAPI Specification (composio.json) --- composio.json | 336 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 336 insertions(+) diff --git a/composio.json b/composio.json index f16a339..de63905 100644 --- a/composio.json +++ b/composio.json @@ -2791,6 +2791,282 @@ } }, "type": "object" + }, + "TimePeriodReqDTO": { + "properties": { + "lastTimePeriod": { + "enum": [ + "DAY", + "WEEK", + "MONTH", + "SIX_MONTH", + "YEAR", + "FIVE_YEAR" + ], + "type": "string", + "description": "Time period to get the data for" + } + }, + "type": "object" + }, + "ActionByAppDTO": { + "properties": { + "appName": { + "type": "string", + "description": "Name of the app" + }, + "totalCount": { + "type": "number", + "description": "Total count of actions for the app" + } + }, + "type": "object", + "required": [ + "appName", + "totalCount" + ] + }, + "ActionByStatusDTO": { + "properties": { + "failed": { + "type": "number", + "description": "Count of failed actions" + }, + "success": { + "type": "number", + "description": "Count of successful actions" + } + }, + "type": "object", + "required": [ + "failed", + "success" + ] + }, + "ActionAnalyticsDTO": { + "properties": { + "date": { + "type": "string", + "description": "Date of the action", + "format": "date" + }, + "byApp": { + "$ref": "#/components/schemas/ActionByAppDTO", + "description": "Action counts by app" + }, + "byStatus": { + "$ref": "#/components/schemas/ActionByStatusDTO", + "description": "Action counts by status" + } + }, + "type": "object", + "required": [ + "date", + "byApp", + "byStatus" + ] + }, + "IntegrationsWithCountsDTO": { + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the integration" + }, + "appName": { + "type": "string", + "description": "Name of the app" + }, + "integrationName": { + "type": "string", + "description": "Name of the integration" + }, + "connectionCount": { + "type": "number", + "description": "Count of connections for the integration" + }, + "triggerCount": { + "type": "number", + "description": "Count of triggers for the integration" + }, + "requestLogsCount": { + "type": "number", + "description": "Count of request logs for the integration" + } + }, + "type": "object", + "required": [ + "id", + "appName", + "integrationName", + "connectionCount", + "triggerCount", + "requestLogsCount" + ] + }, + "AppNameCountDTO": { + "properties": { + "appName": { + "type": "string", + "description": "Name of the app" + }, + "connectionCount": { + "type": "number", + "description": "Count of connections for the app" + }, + "triggerCount": { + "type": "number", + "description": "Count of triggers for the app" + }, + "requestLogsCount": { + "type": "number", + "description": "Count of request logs for the app" + } + }, + "type": "object", + "required": [ + "appName", + "connectionCount", + "triggerCount", + "requestLogsCount" + ] + }, + "AnalyticsDataReqDTO": { + "properties": { + "lastTimePeriod": { + "enum": [ + "DAY", + "WEEK", + "MONTH", + "SIX_MONTH", + "YEAR", + "FIVE_YEAR" + ], + "type": "string", + "description": "Time period to get the data for" + } + }, + "type": "object" + }, + "ClientUniqueUserIdCountDTO": { + "properties": { + "clientUniqueUserId": { + "type": "string", + "description": "Client unique user id" + }, + "count": { + "type": "number", + "description": "Count of connections for the client unique user id" + } + }, + "type": "object", + "required": [ + "clientUniqueUserId", + "count" + ] + }, + "AnalyticsEntityDataDTO": { + "properties": { + "byConnections": { + "items": { + "$ref": "#/components/schemas/ClientUniqueUserIdCountDTO" + }, + "type": "array", + "description": "Connection counts by entity" + }, + "byActions": { + "items": { + "$ref": "#/components/schemas/ClientUniqueUserIdCountDTO" + }, + "type": "array", + "description": "Action counts by entity" + }, + "byTriggers": { + "items": { + "$ref": "#/components/schemas/ClientUniqueUserIdCountDTO" + }, + "type": "array", + "description": "Trigger counts by entity" + } + }, + "type": "object", + "required": [ + "byConnections", + "byActions", + "byTriggers" + ] + }, + "AnalyticsDataResDTO": { + "properties": { + "entity": { + "$ref": "#/components/schemas/AnalyticsEntityDataDTO", + "description": "Entity-related analytics data, providing a breakdown by connections, actions, and triggers for each entity. This is include all entity info." + }, + "actions": { + "items": { + "$ref": "#/components/schemas/ActionAnalyticsDTO" + }, + "type": "array", + "description": "Detailed action analytics data, offering a breakdown by day, status, and provider for all actions" + }, + "trigger": { + "items": { + "$ref": "#/components/schemas/ActionAnalyticsDTO" + }, + "type": "array", + "description": "Comprehensive trigger analytics data, presenting a breakdown by day, status, and provider for all triggers" + }, + "integrations": { + "items": { + "$ref": "#/components/schemas/IntegrationsWithCountsDTO" + }, + "type": "array", + "description": "Detailed integration analytics data, including a breakdown of connection count, trigger count, and request logs count for each integration" + }, + "app": { + "$ref": "#/components/schemas/AppNameCountDTO", + "description": "Comprehensive app-level analytics data, providing a breakdown of connection count, trigger count, and request logs count for each app" + } + }, + "type": "object", + "required": [ + "entity", + "actions", + "trigger", + "integrations", + "app" + ] + }, + "TopEntitiesResDTO": { + "properties": { + "entities": { + "items": { + "$ref": "#/components/schemas/TConnectionCountDTO" + }, + "type": "array", + "description": "Top entities by connection count" + } + }, + "type": "object", + "required": [ + "entities" + ] + }, + "TConnectionCountDTO": { + "properties": { + "clientUniqueUserId": { + "type": "string", + "description": "Name of the entity" + }, + "count": { + "type": "number", + "description": "Count of connections for the entity" + } + }, + "type": "object", + "required": [ + "clientUniqueUserId", + "count" + ] } }, "securitySchemes": { @@ -4199,6 +4475,66 @@ ], "description": "Get Trigger Info" } + }, + "/api/v1/analytics/": { + "get": { + "operationId": "getAnalytics", + "parameters": [ + { + "in": "query", + "name": "lastTimePeriod", + "schema": { + "enum": [ + "DAY", + "WEEK", + "MONTH", + "SIX_MONTH", + "YEAR", + "FIVE_YEAR" + ], + "type": "string", + "description": "Time period to get the data for" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnalyticsDataResDTO" + } + } + }, + "description": "" + } + }, + "summary": "Get analytics", + "tags": [ + "Analytics" + ] + } + }, + "/api/v1/analytics/top-entities": { + "get": { + "operationId": "getTopEntities", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopEntitiesResDTO" + } + } + }, + "description": "" + } + }, + "summary": "Get top entities", + "tags": [ + "Analytics" + ] + } } }, "security": [ From 60504ce5f746d3ebd87217b9b2d85c43df06ed41 Mon Sep 17 00:00:00 2001 From: dphuang2 Date: Thu, 19 Sep 2024 08:13:22 -0700 Subject: [PATCH 2/2] add operation IDs --- .konfig/progress.yaml | 6 + openapi-fixed.json | 339 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 345 insertions(+) diff --git a/.konfig/progress.yaml b/.konfig/progress.yaml index 795f1c4..c24858c 100644 --- a/.konfig/progress.yaml +++ b/.konfig/progress.yaml @@ -15,6 +15,10 @@ operationIds: get: ActionsControllerV1_get /api/v1/actions/{actionId}/execute: post: ActionsControllerV1_execute + /api/v1/analytics/: + get: Analytics_getData + /api/v1/analytics/top-entities: + get: Analytics_getTopEntities /api/v1/api_keys: get: ApiKeys_list post: ApiKeys_generate @@ -239,6 +243,8 @@ securityParameters: query: false key: query: false + lastTimePeriod: + query: false limit: query: false page: diff --git a/openapi-fixed.json b/openapi-fixed.json index 5f5bce2..2b74f0e 100644 --- a/openapi-fixed.json +++ b/openapi-fixed.json @@ -29,6 +29,9 @@ { "name": "Apps" }, + { + "name": "Analytics" + }, { "name": "Auth" }, @@ -1302,6 +1305,27 @@ } } }, + "/api/v1/analytics/top-entities": { + "get": { + "tags": [ + "Analytics" + ], + "summary": "Get top entities", + "operationId": "Analytics_getTopEntities", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopEntitiesResDTO" + } + } + } + } + } + } + }, "/api/v1/logs": { "get": { "tags": [ @@ -1417,6 +1441,45 @@ } } } + }, + "/api/v1/analytics": { + "get": { + "tags": [ + "Analytics" + ], + "summary": "Get analytics", + "operationId": "Analytics_getData", + "parameters": [ + { + "in": "query", + "name": "lastTimePeriod", + "schema": { + "description": "Time period to get the data for", + "enum": [ + "DAY", + "WEEK", + "MONTH", + "SIX_MONTH", + "YEAR", + "FIVE_YEAR" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnalyticsDataResDTO" + } + } + } + } + } + } } }, "components": { @@ -4212,6 +4275,282 @@ }, "type": "object" }, + "TimePeriodReqDTO": { + "properties": { + "lastTimePeriod": { + "description": "Time period to get the data for", + "enum": [ + "DAY", + "WEEK", + "MONTH", + "SIX_MONTH", + "YEAR", + "FIVE_YEAR" + ], + "type": "string" + } + }, + "type": "object" + }, + "ActionByAppDTO": { + "properties": { + "appName": { + "description": "Name of the app", + "type": "string" + }, + "totalCount": { + "description": "Total count of actions for the app", + "type": "number" + } + }, + "type": "object", + "required": [ + "appName", + "totalCount" + ] + }, + "ActionByStatusDTO": { + "properties": { + "failed": { + "description": "Count of failed actions", + "type": "number" + }, + "success": { + "description": "Count of successful actions", + "type": "number" + } + }, + "type": "object", + "required": [ + "failed", + "success" + ] + }, + "ActionAnalyticsDTO": { + "properties": { + "date": { + "description": "Date of the action", + "type": "string", + "format": "date" + }, + "byApp": { + "description": "Action counts by app", + "$ref": "#/components/schemas/ActionByAppDTO" + }, + "byStatus": { + "description": "Action counts by status", + "$ref": "#/components/schemas/ActionByStatusDTO" + } + }, + "type": "object", + "required": [ + "date", + "byApp", + "byStatus" + ] + }, + "IntegrationsWithCountsDTO": { + "properties": { + "id": { + "description": "Unique identifier for the integration", + "type": "string" + }, + "appName": { + "description": "Name of the app", + "type": "string" + }, + "integrationName": { + "description": "Name of the integration", + "type": "string" + }, + "connectionCount": { + "description": "Count of connections for the integration", + "type": "number" + }, + "triggerCount": { + "description": "Count of triggers for the integration", + "type": "number" + }, + "requestLogsCount": { + "description": "Count of request logs for the integration", + "type": "number" + } + }, + "type": "object", + "required": [ + "id", + "appName", + "integrationName", + "connectionCount", + "triggerCount", + "requestLogsCount" + ] + }, + "AppNameCountDTO": { + "properties": { + "appName": { + "description": "Name of the app", + "type": "string" + }, + "connectionCount": { + "description": "Count of connections for the app", + "type": "number" + }, + "triggerCount": { + "description": "Count of triggers for the app", + "type": "number" + }, + "requestLogsCount": { + "description": "Count of request logs for the app", + "type": "number" + } + }, + "type": "object", + "required": [ + "appName", + "connectionCount", + "triggerCount", + "requestLogsCount" + ] + }, + "AnalyticsDataReqDTO": { + "properties": { + "lastTimePeriod": { + "description": "Time period to get the data for", + "enum": [ + "DAY", + "WEEK", + "MONTH", + "SIX_MONTH", + "YEAR", + "FIVE_YEAR" + ], + "type": "string" + } + }, + "type": "object" + }, + "ClientUniqueUserIdCountDTO": { + "properties": { + "clientUniqueUserId": { + "description": "Client unique user id", + "type": "string" + }, + "count": { + "description": "Count of connections for the client unique user id", + "type": "number" + } + }, + "type": "object", + "required": [ + "clientUniqueUserId", + "count" + ] + }, + "AnalyticsEntityDataDTO": { + "properties": { + "byConnections": { + "description": "Connection counts by entity", + "items": { + "$ref": "#/components/schemas/ClientUniqueUserIdCountDTO" + }, + "type": "array" + }, + "byActions": { + "description": "Action counts by entity", + "items": { + "$ref": "#/components/schemas/ClientUniqueUserIdCountDTO" + }, + "type": "array" + }, + "byTriggers": { + "description": "Trigger counts by entity", + "items": { + "$ref": "#/components/schemas/ClientUniqueUserIdCountDTO" + }, + "type": "array" + } + }, + "type": "object", + "required": [ + "byConnections", + "byActions", + "byTriggers" + ] + }, + "AnalyticsDataResDTO": { + "properties": { + "entity": { + "description": "Entity-related analytics data, providing a breakdown by connections, actions, and triggers for each entity. This is include all entity info.", + "$ref": "#/components/schemas/AnalyticsEntityDataDTO" + }, + "actions": { + "description": "Detailed action analytics data, offering a breakdown by day, status, and provider for all actions", + "items": { + "$ref": "#/components/schemas/ActionAnalyticsDTO" + }, + "type": "array" + }, + "trigger": { + "description": "Comprehensive trigger analytics data, presenting a breakdown by day, status, and provider for all triggers", + "items": { + "$ref": "#/components/schemas/ActionAnalyticsDTO" + }, + "type": "array" + }, + "integrations": { + "description": "Detailed integration analytics data, including a breakdown of connection count, trigger count, and request logs count for each integration", + "items": { + "$ref": "#/components/schemas/IntegrationsWithCountsDTO" + }, + "type": "array" + }, + "app": { + "description": "Comprehensive app-level analytics data, providing a breakdown of connection count, trigger count, and request logs count for each app", + "$ref": "#/components/schemas/AppNameCountDTO" + } + }, + "type": "object", + "required": [ + "entity", + "actions", + "trigger", + "integrations", + "app" + ] + }, + "TopEntitiesResDTO": { + "properties": { + "entities": { + "description": "Top entities by connection count", + "items": { + "$ref": "#/components/schemas/TConnectionCountDTO" + }, + "type": "array" + } + }, + "type": "object", + "required": [ + "entities" + ] + }, + "TConnectionCountDTO": { + "properties": { + "clientUniqueUserId": { + "description": "Name of the entity", + "type": "string" + }, + "count": { + "description": "Count of connections for the entity", + "type": "number" + } + }, + "type": "object", + "required": [ + "clientUniqueUserId", + "count" + ] + }, "ApiKeysListResponse": { "items": { "$ref": "#/components/schemas/APIKeyResDTO"