diff --git a/.konfig/changesets/cuddly-corners-cough.md b/.konfig/changesets/cuddly-corners-cough.md new file mode 100644 index 0000000..acf1dd6 --- /dev/null +++ b/.konfig/changesets/cuddly-corners-cough.md @@ -0,0 +1,5 @@ +--- +ruby: patch +--- + +Regenerate SDKs diff --git a/.konfig/changesets/fluffy-pandas-tickle.md b/.konfig/changesets/fluffy-pandas-tickle.md new file mode 100644 index 0000000..acf1dd6 --- /dev/null +++ b/.konfig/changesets/fluffy-pandas-tickle.md @@ -0,0 +1,5 @@ +--- +ruby: patch +--- + +Regenerate SDKs diff --git a/.konfig/progress.yaml b/.konfig/progress.yaml index 795f1c4..084d6d1 100644 --- a/.konfig/progress.yaml +++ b/.konfig/progress.yaml @@ -1,10 +1,66 @@ examples: {} examples_2: {} examples_3: + /api/v1/apps/openapi/send_email_to_client: + post: + '200': + application/json: {} + /api/v1/apps/openapi/spec/delete/{id}: + delete: + '200': + application/json: {} + /api/v1/apps/openapi/spec/status/{id}: + get: + '200': + application/json: {} /api/v1/connectedAccounts/{connectedAccountId}: delete: '200': application/json: {} + /api/v1/event_logs/get/events: + get: + '200': + application/json: {} + /api/v1/event_logs/get/webhook: + get: + '200': + application/json: {} + /api/v1/event_logs/set/webhook: + post: + '200': + application/json: {} + /api/v1/event_logs/webhook/secret/get: + get: + '200': + application/json: {} + /api/v1/event_logs/webhook/secret/refresh: + post: + '200': + application/json: {} + /api/v1/payment/checkout-session/{sessionId}/status: + get: + '200': + application/json: {} + /api/v1/payment/create-checkout-session: + post: + '200': + application/json: {} + /api/v1/payment/invoices: + get: + '200': + application/json: {} + /api/v1/payment/invoices/{invoiceId}: + get: + '200': + application/json: {} + /api/v1/payment/webhook: + post: + '200': + application/json: {} + /api/v2/actions/{actionId}/execute/get.inputs: + post: + '200': + application/json: {} ignoreObjectsWithNoProperties: true operationIds: /api/v1/actions: @@ -15,6 +71,10 @@ operationIds: get: ActionsControllerV1_get /api/v1/actions/{actionId}/execute: post: ActionsControllerV1_execute + /api/v1/analytics/: + get: Analytics_get + /api/v1/analytics/entities: + get: Analytics_getTopEntities /api/v1/api_keys: get: ApiKeys_list post: ApiKeys_generate @@ -26,14 +86,20 @@ operationIds: post: App_createCustomRepo /api/v1/apps/custom-repo/get-repo: get: App_getCustomRepo + /api/v1/apps/openapi/send_email_to_client: + post: Apps_sendEmailToClient /api/v1/apps/openapi/spec/add: post: App_addOpenApiSpec + /api/v1/apps/openapi/spec/delete/{id}: + delete: Apps_deleteOpenApiSpecTool /api/v1/apps/openapi/spec/delete/{name}: delete: App_deleteOpenApiSpecTool /api/v1/apps/openapi/spec/list: get: App_listOpenApiSpecs /api/v1/apps/openapi/spec/logs/{name}: get: App_getLogsByName + /api/v1/apps/openapi/spec/status/{id}: + get: Apps_getOpenApiSpecStatus /api/v1/apps/sync: post: App_syncCustomRepo /api/v1/apps/{appName}: @@ -74,6 +140,16 @@ operationIds: post: Connections_disable /api/v1/connectedAccounts/{connectedAccountId}/enable: post: Connections_enable + /api/v1/event_logs/get/events: + get: EventLogs_getEvents + /api/v1/event_logs/get/webhook: + get: EventLogs_getWebhook + /api/v1/event_logs/set/webhook: + post: EventLogs_updateWebhook + /api/v1/event_logs/webhook/secret/get: + get: EventLogs_getWebhookSecret + /api/v1/event_logs/webhook/secret/refresh: + post: EventLogs_refreshWebhookSecret /api/v1/integrations: get: AppConnector_listGlobalConnectors post: AppConnector_createIntegration @@ -89,6 +165,7 @@ operationIds: get: AppLogin_verifyOAuth2Login /api/v1/logs/: get: Logs_list + post: Logs_addNewLogs /api/v1/metadata: get: Metadata_getInfo post: Metadata_updateInfo @@ -96,6 +173,16 @@ operationIds: get: Metadata_getToggleInfo /api/v1/metadata/toggle/trigger: post: Metadata_toggleTriggerState + /api/v1/payment/checkout-session/{sessionId}/status: + get: Payment_getCheckoutSessionStatus + /api/v1/payment/create-checkout-session: + post: Payment_createCheckoutSession + /api/v1/payment/invoices: + get: Payment_getInvoices + /api/v1/payment/invoices/{invoiceId}: + get: Payment_getInvoice + /api/v1/payment/webhook: + post: Payment_handleStripeWebhook /api/v1/team/invite: post: Team_sendInvitation /api/v1/team/members: @@ -137,6 +224,8 @@ operationIds: get: ActionsControllerV2_getActionById /api/v2/actions/{actionId}/execute: post: ActionsControllerV2_execute + /api/v2/actions/{actionId}/execute/get.inputs: + post: Actions_getActionInputs /api/v2/triggers/{triggerName}: get: TriggerControllerV2_getTriggerInfo /v1/actions: @@ -162,12 +251,18 @@ operationIds: operationTags: {} renameTags: {} requestSchemaNames: + /api/v1/apps/openapi/send_email_to_client: + post: + application/json: AppsSendEmailToClientRequest /api/v1/client/auth/google_login: post: application/json: ClientAuthGoogleLoginRequest /api/v1/client/auth/pusher_auth: post: application/json: ClientAuthAuthenticateUserRequest + /api/v1/payment/webhook: + post: + application/json: PaymentHandleStripeWebhookRequest /api/v1/triggers/handle/{appName}/{clientId}: post: application/json: TriggersHandleTriggerRequest @@ -181,14 +276,66 @@ responseSchemaNames: '200': application/json: ApiKeysListResponse text/html; charset=utf-8: ApiKeysListResponse + /api/v1/apps/openapi/send_email_to_client: + post: + '200': + application/json: AppsSendEmailToClientResponse + /api/v1/apps/openapi/spec/delete/{id}: + delete: + '200': + application/json: AppsDeleteOpenApiSpecToolResponse /api/v1/apps/openapi/spec/list: get: '200': application/json: AppListOpenApiSpecsResponse + /api/v1/apps/openapi/spec/status/{id}: + get: + '200': + application/json: AppsGetOpenApiSpecStatusResponse /api/v1/connectedAccounts/{connectedAccountId}: delete: '200': application/json: ConnectionsDeleteResponse + /api/v1/event_logs/get/events: + get: + '200': + application/json: EventLogsGetEventsResponse + /api/v1/event_logs/get/webhook: + get: + '200': + application/json: EventLogsGetWebhookResponse + /api/v1/event_logs/set/webhook: + post: + '200': + application/json: EventLogsUpdateWebhookResponse + /api/v1/event_logs/webhook/secret/get: + get: + '200': + application/json: EventLogsGetWebhookSecretResponse + /api/v1/event_logs/webhook/secret/refresh: + post: + '200': + application/json: EventLogsRefreshWebhookSecretResponse + /api/v1/payment/checkout-session/{sessionId}/status: + get: + '200': + application/json: PaymentGetCheckoutSessionStatusResponse + /api/v1/payment/create-checkout-session: + post: + '200': + application/json: PaymentCreateCheckoutSessionResponse + /api/v1/payment/invoices: + get: + '200': + application/json: PaymentGetInvoicesResponse + /api/v1/payment/invoices/{invoiceId}: + get: + '200': + application/json: PaymentGetInvoiceResponse + /api/v1/payment/webhook: + post: + '200': + application/json: PaymentHandleStripeWebhookResponse /api/v1/team/members: get: '200': @@ -199,6 +346,10 @@ responseSchemaNames: '200': application/json: TriggersListResponse text/html; charset=utf-8: TriggersListResponse + /api/v2/actions/{actionId}/execute/get.inputs: + post: + '200': + application/json: ActionsGetActionInputsResponse /api/v2/triggers/{triggerName}: get: '200': @@ -207,6 +358,8 @@ responseSchemaNames: securityParameters: actions: query: false + adminToken: + query: false appNames: query: false apps: @@ -225,6 +378,8 @@ securityParameters: query: false email: query: false + endTime: + query: false endpoint: query: false entityId: @@ -239,12 +394,18 @@ securityParameters: query: false key: query: false + lastTimePeriod: + query: false limit: query: false + logsType: + query: false page: query: false pageSize: query: false + query: + query: false redirectUri: query: false search: @@ -257,6 +418,8 @@ securityParameters: query: false showEnabledOnly: query: false + startTime: + query: false status: query: false tags: diff --git a/STATISTICS.md b/STATISTICS.md index 0867553..afc9de9 100644 --- a/STATISTICS.md +++ b/STATISTICS.md @@ -2,5 +2,5 @@ | SDK Name | Lines of Code | | -------- | ------------- | -| ruby | 46029 | -| **Total** | 46029 | +| ruby | 55073 | +| **Total** | 55073 | diff --git a/composio.json b/composio.json index f16a339..99f7a7d 100644 --- a/composio.json +++ b/composio.json @@ -1,6 +1,74 @@ { "components": { "schemas": { + "MemberInfoResDTO": { + "properties": { + "id": { + "type": "string" + }, + "clientId": { + "type": "string" + }, + "email": { + "format": "email", + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + }, + "metadata": {}, + "createdAt": { + "oneOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + } + ] + }, + "updatedAt": { + "oneOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + } + ] + }, + "deletedAt": { + "oneOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + } + ] + } + }, + "type": "object", + "required": [ + "id", + "clientId", + "email", + "name", + "role", + "createdAt", + "updatedAt" + ], + "description": "Member information" + }, "MagicLinkResDTO": { "properties": { "status": { @@ -210,6 +278,14 @@ "verifyHost": { "type": "string", "description": "The host to verify the member" + }, + "role": { + "enum": [ + "admin", + "developer" + ], + "type": "string", + "description": "The role that will be assignied to the invited user" } }, "type": "object", @@ -238,6 +314,14 @@ "type": "string", "description": "The creation date of the member record" }, + "role": { + "enum": [ + "admin", + "developer" + ], + "type": "string", + "description": "The role that is assigned to the member" + }, "updatedAt": { "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", "type": "string", @@ -248,7 +332,29 @@ "required": [ "email", "id", - "name" + "name", + "role" + ] + }, + "UpdateMemberReqDTO": { + "properties": { + "memberId": { + "type": "string", + "description": "The uuid identifier for the member" + }, + "role": { + "enum": [ + "admin", + "developer" + ], + "type": "string", + "description": "The role that is assigned to the member" + } + }, + "type": "object", + "required": [ + "memberId", + "role" ] }, "GenerateAPIKeyReqDTO": { @@ -286,6 +392,19 @@ "key": { "type": "string", "description": "The generated API key" + }, + "isHidden": { + "type": "boolean", + "description": "Whether the API key is hidden" + }, + "lastUsed": { + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string", + "description": "The last used date of the API key" + }, + "member": { + "type": "object", + "description": "The member of the API key" } }, "type": "object", @@ -294,7 +413,9 @@ "name", "createdAt", "updatedAt", - "key" + "key", + "isHidden", + "member" ] }, "DeleteAPIKeyReqDTO": { @@ -439,30 +560,6 @@ "type": "string", "description": "Client identifier" }, - "openApiSpec": { - "type": "string", - "description": "OpenAPI specification in YAML format" - }, - "integrationYaml": { - "type": "string", - "description": "Integration details in YAML format" - }, - "enabled": { - "type": "boolean", - "description": "Whether the OpenAPI spec is enabled" - }, - "openAPISpecURL": { - "type": "string", - "description": "URL to the OpenAPI specification", - "format": "uri", - "nullable": true - }, - "integrationYAMLURL": { - "type": "string", - "description": "URL to the integration YAML", - "format": "uri", - "nullable": true - }, "lastSyncAt": { "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", "type": "string", @@ -481,14 +578,30 @@ "description": "Last update date and time", "format": "date-time" }, - "jobStatus": { + "status": { "enum": [ + "initialized", "running", - "success", - "failed" + "caching", + "cancelled", + "finished", + "exited" ], "type": "string", "description": "The job status of the app" + }, + "state": { + "enum": [ + "preprocess", + "validate", + "prepare", + "build", + "push", + "load", + "finish" + ], + "type": "string", + "description": "Current state of the app FSM" } }, "type": "object", @@ -496,9 +609,6 @@ "id", "name", "clientId", - "openApiSpec", - "integrationYaml", - "enabled", "lastSyncAt", "createdAt", "updatedAt" @@ -832,6 +942,9 @@ "type": "string", "description": "Unique identifier of the connector" }, + "member": { + "$ref": "#/components/schemas/MemberInfoResDTO" + }, "name": { "type": "string", "description": "Name of the connector" @@ -889,13 +1002,15 @@ "_count", "connections", "id", + "member", "name", "authScheme", "createdAt", "updatedAt", "enabled", "appId" - ] + ], + "description": "List of connectors" }, "GetConnectorListResDTO": { "properties": { @@ -903,8 +1018,7 @@ "items": { "type": "object" }, - "type": "array", - "description": "List of connectors" + "type": "array" }, "totalPages": { "type": "number", @@ -1007,6 +1121,12 @@ }, "authConfig": { "type": "object" + }, + "member": { + "items": { + "$ref": "#/components/schemas/MemberInfoResDTO" + }, + "type": "object" } }, "type": "object", @@ -1017,7 +1137,8 @@ "createdAt", "updatedAt", "appUniqueId", - "appName" + "appName", + "member" ] }, "GetConnectionsResult": { @@ -1129,6 +1250,17 @@ }, "type": "object" }, + "ActionGetNLAInputsReqDTO": { + "properties": { + "text": { + "type": "string" + } + }, + "type": "object", + "required": [ + "text" + ] + }, "ProxyExecutionReqDTO": { "properties": { "endpoint": { @@ -1431,6 +1563,12 @@ }, "authConfig": { "type": "object" + }, + "member": { + "items": { + "$ref": "#/components/schemas/MemberInfoResDTO" + }, + "type": "object" } }, "type": "object", @@ -1443,7 +1581,8 @@ "createdAt", "updatedAt", "appUniqueId", - "appName" + "appName", + "member" ] }, "ToggleConnectedAccountResponseDTO": { @@ -1542,6 +1681,9 @@ "appUniqueId": { "type": "string" }, + "memberInfo": { + "$ref": "#/components/schemas/MemberInfoResDTO" + }, "meta": { "$ref": "#/components/schemas/Meta" }, @@ -2774,7 +2916,7 @@ }, "entityId": { "type": "string", - "description": "Entity UUID" + "description": "Entity id" }, "limit": { "type": "number", @@ -2785,100 +2927,492 @@ "type": "string", "description": "Cursor for pagination" }, - "connectionId": { + "logsType": { "type": "string", - "description": "Connection ID of the log" + "description": "Type of the log" } }, "type": "object" - } - }, - "securitySchemes": { - "api_key": { - "type": "apiKey", - "in": "header", - "name": "x-api-key" - } - } - }, - "info": { - "title": "Composio OpenAPI", - "version": "1.0.0", - "description": "Generated with `routing-controllers-openapi`" - }, - "openapi": "3.0.0", - "paths": { - "/api/v1/client/auth/identify": { - "post": { - "operationId": "identifyClient", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IdentifyClientReqDTO" - } - } + }, + "IngestDataDTO": { + "properties": { + "connectionId": { + "type": "string", + "description": "Connection ID of the log" }, - "description": "IdentifyClientReqDTO", - "required": false - }, - "responses": { - "202": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IdentifyClientResDTO" - } - } - }, - "description": "" + "entityId": { + "type": "string", + "description": "Entity ID of the log" + }, + "providerName": { + "type": "string", + "description": "Provider name of the log" + }, + "actionName": { + "type": "string", + "description": "Action name of the log" + }, + "request": { + "type": "object" + }, + "response": { + "type": "object" + }, + "isError": { + "type": "boolean" } }, - "summary": "Identify client", - "tags": [ - "Auth" + "type": "object", + "required": [ + "providerName", + "actionName", + "request", + "response", + "isError" ] - } - }, - "/api/v1/api_keys": { - "post": { - "operationId": "generateAPIKey", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GenerateAPIKeyReqDTO" - } - } - }, - "description": "GenerateAPIKeyReqDTO", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIKeyResDTO" - } - } - }, - "description": "" + }, + "IngestDataResponseDTO": { + "properties": { + "isIngested": { + "type": "boolean" } }, - "summary": "Generate api key", - "tags": [ - "API-Keys" + "type": "object", + "required": [ + "isIngested" ] }, - "get": { - "operationId": "listAPIKeys", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { + "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" + ], + "description": "Action counts by app" + }, + "ActionByStatusDTO": { + "properties": { + "failed": { + "type": "number", + "description": "Count of failed actions" + }, + "success": { + "type": "number", + "description": "Count of successful actions" + } + }, + "type": "object", + "required": [ + "failed", + "success" + ], + "description": "Action counts by status" + }, + "ActionAnalyticsDTO": { + "properties": { + "date": { + "type": "string", + "description": "Date of the action", + "format": "date" + }, + "byApp": { + "$ref": "#/components/schemas/ActionByAppDTO" + }, + "byStatus": { + "$ref": "#/components/schemas/ActionByStatusDTO" + } + }, + "type": "object", + "required": [ + "date", + "byApp", + "byStatus" + ], + "description": "Comprehensive trigger analytics data, presenting a breakdown by day, status, and provider for all triggers" + }, + "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" + ], + "description": "Detailed integration analytics data, including a breakdown of connection count, trigger count, and request logs count for each integration" + }, + "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" + ], + "description": "Comprehensive app-level analytics data, providing a breakdown of connection count, trigger count, and request logs count for each app" + }, + "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" + ], + "description": "Connection counts by entity" + }, + "AnalyticsEntityDataDTO": { + "properties": { + "byConnections": { + "items": { + "$ref": "#/components/schemas/ClientUniqueUserIdCountDTO" + }, + "type": "array" + }, + "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" + ], + "description": "Entity-related analytics data, providing a breakdown by connections, actions, and triggers for each entity. This is include all entity info." + }, + "AnalyticsDataResDTO": { + "properties": { + "entity": { + "$ref": "#/components/schemas/AnalyticsEntityDataDTO" + }, + "actions": { + "items": { + "$ref": "#/components/schemas/ActionAnalyticsDTO" + }, + "type": "array" + }, + "trigger": { + "items": { + "$ref": "#/components/schemas/ActionAnalyticsDTO" + }, + "type": "array" + }, + "integrations": { + "items": { + "$ref": "#/components/schemas/IntegrationsWithCountsDTO" + }, + "type": "array" + }, + "app": { + "$ref": "#/components/schemas/AppNameCountDTO" + } + }, + "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" + ] + }, + "EntityQueryReqDTO": { + "properties": { + "query": { + "type": "string", + "description": "Query to get the data for" + } + }, + "type": "object" + }, + "WebhookReqDTO": { + "properties": { + "eventWebhookURL": { + "type": "string", + "description": "Event Webhook URL" + } + }, + "type": "object", + "required": [ + "eventWebhookURL" + ] + }, + "FetchQueryDTO": { + "properties": { + "startTime": { + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string", + "description": "Start time of the event in ISO 8601 format" + }, + "endTime": { + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string", + "description": "End time of the event in ISO 8601 format" + } + }, + "type": "object", + "required": [ + "startTime", + "endTime" + ] + }, + "WebhookSecretResDTO": { + "properties": { + "webhookSecret": { + "type": "string", + "description": "Webhook secret" + } + }, + "type": "object", + "required": [ + "webhookSecret" + ] + }, + "CreateCheckoutSessionReqDto": { + "properties": { + "plan": { + "enum": [ + "HOBBY", + "STARTER", + "GROWTH", + "ENTERPRISE" + ], + "type": "string" + } + }, + "type": "object", + "required": [ + "plan" + ] + } + }, + "securitySchemes": { + "api_key": { + "type": "apiKey", + "in": "header", + "name": "x-api-key" + } + } + }, + "info": { + "title": "Composio OpenAPI", + "version": "1.0.0", + "description": "Generated with `routing-controllers-openapi`" + }, + "openapi": "3.0.0", + "paths": { + "/api/v1/client/auth/identify": { + "post": { + "operationId": "identifyClient", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentifyClientReqDTO" + } + } + }, + "description": "IdentifyClientReqDTO", + "required": false + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentifyClientResDTO" + } + } + }, + "description": "" + } + }, + "summary": "Identify client", + "tags": [ + "Auth" + ] + } + }, + "/api/v1/api_keys": { + "post": { + "operationId": "generateAPIKey", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateAPIKeyReqDTO" + } + } + }, + "description": "GenerateAPIKeyReqDTO", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKeyResDTO" + } + } + }, + "description": "" + } + }, + "summary": "Generate api key", + "tags": [ + "API-Keys" + ] + }, + "get": { + "operationId": "listAPIKeys", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { "$ref": "#/components/schemas/APIKeyResDTO" }, "type": "array" @@ -2990,6 +3524,98 @@ ] } }, + "/api/v1/apps/openapi/spec/delete/{id}": { + "delete": { + "operationId": "deleteOpenAPISpecTool", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "pattern": "[^\\/#\\?]+?", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Delete open api spec tool", + "tags": [ + "Apps" + ] + } + }, + "/api/v1/apps/openapi/send_email_to_client": { + "post": { + "operationId": "AppController.sendEmailToClient", + "parameters": [ + { + "in": "query", + "name": "adminToken", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "", + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Send email to client", + "tags": [ + "Apps" + ] + } + }, + "/api/v1/apps/openapi/spec/status/{id}": { + "get": { + "operationId": "getOpenAPISpecStatus", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "pattern": "[^\\/#\\?]+?", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Get open api spec status", + "tags": [ + "Apps" + ] + } + }, "/api/v1/apps/{appName}": { "get": { "operationId": "getApp", @@ -3901,7 +4527,7 @@ "name": "entityId", "schema": { "type": "string", - "description": "Entity UUID" + "description": "Entity id" } }, { @@ -3923,10 +4549,10 @@ }, { "in": "query", - "name": "connectionId", + "name": "logsType", "schema": { "type": "string", - "description": "Connection ID of the log" + "description": "Type of the log" } } ], @@ -3935,18 +4561,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LogsResDTO" + "$ref": "#/components/schemas/LogsResDTO" + } + } + }, + "description": "" + } + }, + "summary": "Get logs", + "tags": [ + "Logs" + ], + "description": "List logs" + }, + "post": { + "operationId": "postLogs", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IngestDataDTO" + } + } + }, + "description": "IngestDataDTO", + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IngestDataResponseDTO" } } }, "description": "" } }, - "summary": "Get logs", + "summary": "Post logs", "tags": [ "Logs" ], - "description": "List logs" + "description": "Add new logs" } }, "/api/v2/actions/list/all": { @@ -4091,6 +4748,46 @@ "description": "Execute an action. Support both connected account and no auth auth." } }, + "/api/v2/actions/{actionId}/execute/get.inputs": { + "post": { + "operationId": "getActionInputsV2", + "parameters": [ + { + "in": "path", + "name": "actionId", + "required": true, + "schema": { + "pattern": "[^\\/#\\?]+?", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActionGetNLAInputsReqDTO" + } + } + }, + "description": "ActionGetNLAInputsReqDTO", + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Get action inputs", + "tags": [ + "Actions" + ], + "description": "Get the inputs for an action with NLA" + } + }, "/api/v2/actions/{actionId}": { "get": { "operationId": "getActionV2", @@ -4199,6 +4896,322 @@ ], "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/entities": { + "get": { + "operationId": "getTopEntities", + "parameters": [ + { + "in": "query", + "name": "query", + "schema": { + "type": "string", + "description": "Query to get the data for" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopEntitiesResDTO" + } + } + }, + "description": "" + } + }, + "summary": "Get top entities", + "tags": [ + "Analytics" + ] + } + }, + "/api/v1/event_logs/set/webhook": { + "post": { + "operationId": "updateWebhook", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookReqDTO" + } + } + }, + "description": "WebhookReqDTO", + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Update webhook", + "tags": [ + "Event Logs" + ] + } + }, + "/api/v1/event_logs/get/webhook": { + "get": { + "operationId": "getWebhook", + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Get webhook", + "tags": [ + "Event Logs" + ] + } + }, + "/api/v1/event_logs/get/events": { + "get": { + "operationId": "getEvents", + "parameters": [ + { + "in": "query", + "name": "startTime", + "required": true, + "schema": { + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string", + "description": "Start time of the event in ISO 8601 format" + } + }, + { + "in": "query", + "name": "endTime", + "required": true, + "schema": { + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string", + "description": "End time of the event in ISO 8601 format" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Get events", + "tags": [ + "Event Logs" + ], + "description": "Fetch events from database" + } + }, + "/api/v1/event_logs/webhook/secret/get": { + "get": { + "operationId": "getWebhookSecret", + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Get webhook secret", + "tags": [ + "Event Logs" + ] + } + }, + "/api/v1/event_logs/webhook/secret/refresh": { + "post": { + "operationId": "refreshWebhookSecret", + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Refresh webhook", + "tags": [ + "Event Logs" + ] + } + }, + "/api/v1/payment/create-checkout-session": { + "post": { + "operationId": "PaymentController.createCheckoutSession", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCheckoutSessionReqDto" + } + } + }, + "description": "CreateCheckoutSessionReqDto", + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Create checkout session", + "tags": [ + "Payment" + ] + } + }, + "/api/v1/payment/checkout-session/{sessionId}/status": { + "get": { + "operationId": "PaymentController.getCheckoutSessionStatus", + "parameters": [ + { + "in": "path", + "name": "sessionId", + "required": true, + "schema": { + "pattern": "[^\\/#\\?]+?", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Get checkout session status", + "tags": [ + "Payment" + ] + } + }, + "/api/v1/payment/invoices": { + "get": { + "operationId": "PaymentController.getInvoices", + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Get invoices", + "tags": [ + "Payment" + ] + } + }, + "/api/v1/payment/invoices/{invoiceId}": { + "get": { + "operationId": "PaymentController.getInvoice", + "parameters": [ + { + "in": "path", + "name": "invoiceId", + "required": true, + "schema": { + "pattern": "[^\\/#\\?]+?", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Get invoice", + "tags": [ + "Payment" + ] + } + }, + "/api/v1/payment/webhook": { + "post": { + "operationId": "PaymentController.handleStripeWebhook", + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "", + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "Successful response" + } + }, + "summary": "Handle stripe webhook", + "tags": [ + "Payment" + ] + } } }, "security": [ diff --git a/openapi-fixed.json b/openapi-fixed.json index 5f5bce2..e9d3948 100644 --- a/openapi-fixed.json +++ b/openapi-fixed.json @@ -3,7 +3,10 @@ "info": { "title": "Composio OpenAPI", "description": "Composio SDK: Equip your agent with high-quality tools and build your real-world usecase", - "version": "1.0.0" + "version": "1.0.0", + "x-konfig-ignore": { + "object-with-no-properties": true + } }, "servers": [ { @@ -14,6 +17,9 @@ { "name": "Triggers" }, + { + "name": "Apps" + }, { "name": "Connections" }, @@ -24,16 +30,22 @@ "name": "Actions" }, { - "name": "API-Keys" + "name": "Event Logs" }, { - "name": "Apps" + "name": "Payment" }, { - "name": "Auth" + "name": "API-Keys" }, { "name": "Logs" + }, + { + "name": "Analytics" + }, + { + "name": "Auth" } ], "paths": { @@ -213,6 +225,112 @@ } } }, + "/api/v1/apps/openapi/spec/delete/{id}": { + "delete": { + "tags": [ + "Apps" + ], + "summary": "Delete open api spec tool", + "operationId": "Apps_deleteOpenApiSpecTool", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "pattern": "[^\\/#\\?]+?", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppsDeleteOpenApiSpecToolResponse" + } + } + } + } + } + } + }, + "/api/v1/apps/openapi/send_email_to_client": { + "post": { + "tags": [ + "Apps" + ], + "summary": "Send email to client", + "operationId": "Apps_sendEmailToClient", + "parameters": [ + { + "in": "query", + "name": "adminToken", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppsSendEmailToClientRequest" + } + } + }, + "required": false + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppsSendEmailToClientResponse" + } + } + } + } + } + } + }, + "/api/v1/apps/openapi/spec/status/{id}": { + "get": { + "tags": [ + "Apps" + ], + "summary": "Get open api spec status", + "operationId": "Apps_getOpenApiSpecStatus", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "pattern": "[^\\/#\\?]+?", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppsGetOpenApiSpecStatusResponse" + } + } + } + } + } + } + }, "/api/v1/apps/{appName}": { "get": { "tags": [ @@ -1196,6 +1314,50 @@ } } }, + "/api/v2/actions/{actionId}/execute/get.inputs": { + "post": { + "tags": [ + "Actions" + ], + "summary": "Get action inputs", + "operationId": "Actions_getActionInputs", + "description": "Get the inputs for an action with NLA", + "parameters": [ + { + "in": "path", + "name": "actionId", + "required": true, + "schema": { + "pattern": "[^\\/#\\?]+?", + "type": "string" + } + } + ], + "requestBody": { + "description": "ActionGetNLAInputsReqDTO", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActionGetNLAInputsReqDTO" + } + } + }, + "required": false + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActionsGetActionInputsResponse" + } + } + } + } + } + } + }, "/api/v2/actions/{actionId}": { "get": { "tags": [ @@ -1302,104 +1464,19 @@ } } }, - "/api/v1/logs": { + "/api/v1/analytics/entities": { "get": { "tags": [ - "Logs" + "Analytics" ], - "summary": "Get logs", - "operationId": "Logs_list", - "description": "List logs", + "summary": "Get top entities", + "operationId": "Analytics_getTopEntities", "parameters": [ { "in": "query", - "name": "type", - "schema": { - "description": "Type of the log", - "enum": [ - "error", - "info", - "debug" - ], - "type": "string" - } - }, - { - "in": "query", - "name": "time", - "schema": { - "description": "Time interval for which data needs to be fetched", - "enum": [ - "5m", - "30m", - "6h", - "1d", - "1w", - "1month", - "1y" - ], - "type": "string" - } - }, - { - "in": "query", - "name": "status", - "schema": { - "description": "Status of the log", - "enum": [ - "all", - "success", - "error" - ], - "type": "string" - } - }, - { - "in": "query", - "name": "search", - "schema": { - "description": "Search term in the log", - "type": "string" - } - }, - { - "in": "query", - "name": "integrationId", - "schema": { - "description": "Integration UUID", - "type": "string" - } - }, - { - "in": "query", - "name": "entityId", - "schema": { - "description": "Entity UUID", - "type": "string" - } - }, - { - "in": "query", - "name": "limit", - "schema": { - "description": "Limit of the logs", - "type": "number", - "default": 10 - } - }, - { - "in": "query", - "name": "cursor", - "schema": { - "description": "Cursor for pagination", - "type": "string" - } - }, - { - "in": "query", - "name": "connectionId", + "name": "query", "schema": { - "description": "Connection ID of the log", + "description": "Query to get the data for", "type": "string" } } @@ -1410,32 +1487,575 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LogsResDTO" + "$ref": "#/components/schemas/TopEntitiesResDTO" } } } } } } - } - }, - "components": { - "schemas": { - "MagicLinkResDTO": { - "properties": { - "status": { - "type": "string" - } + }, + "/api/v1/event_logs/set/webhook": { + "post": { + "tags": [ + "Event Logs" + ], + "summary": "Update webhook", + "operationId": "EventLogs_updateWebhook", + "requestBody": { + "description": "WebhookReqDTO", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookReqDTO" + } + } + }, + "required": false }, - "type": "object", - "required": [ - "status" - ] - }, - "MagicLinkReqDTO": { - "properties": { - "email": { - "description": "The email of the user", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventLogsUpdateWebhookResponse" + } + } + } + } + } + } + }, + "/api/v1/event_logs/get/webhook": { + "get": { + "tags": [ + "Event Logs" + ], + "summary": "Get webhook", + "operationId": "EventLogs_getWebhook", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventLogsGetWebhookResponse" + } + } + } + } + } + } + }, + "/api/v1/event_logs/get/events": { + "get": { + "tags": [ + "Event Logs" + ], + "summary": "Get events", + "operationId": "EventLogs_getEvents", + "description": "Fetch events from database", + "parameters": [ + { + "in": "query", + "name": "startTime", + "required": true, + "schema": { + "description": "Start time of the event in ISO 8601 format", + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string" + } + }, + { + "in": "query", + "name": "endTime", + "required": true, + "schema": { + "description": "End time of the event in ISO 8601 format", + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventLogsGetEventsResponse" + } + } + } + } + } + } + }, + "/api/v1/event_logs/webhook/secret/get": { + "get": { + "tags": [ + "Event Logs" + ], + "summary": "Get webhook secret", + "operationId": "EventLogs_getWebhookSecret", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventLogsGetWebhookSecretResponse" + } + } + } + } + } + } + }, + "/api/v1/event_logs/webhook/secret/refresh": { + "post": { + "tags": [ + "Event Logs" + ], + "summary": "Refresh webhook", + "operationId": "EventLogs_refreshWebhookSecret", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventLogsRefreshWebhookSecretResponse" + } + } + } + } + } + } + }, + "/api/v1/payment/create-checkout-session": { + "post": { + "tags": [ + "Payment" + ], + "summary": "Create checkout session", + "operationId": "Payment_createCheckoutSession", + "requestBody": { + "description": "CreateCheckoutSessionReqDto", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCheckoutSessionReqDto" + } + } + }, + "required": false + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentCreateCheckoutSessionResponse" + } + } + } + } + } + } + }, + "/api/v1/payment/checkout-session/{sessionId}/status": { + "get": { + "tags": [ + "Payment" + ], + "summary": "Get checkout session status", + "operationId": "Payment_getCheckoutSessionStatus", + "parameters": [ + { + "in": "path", + "name": "sessionId", + "required": true, + "schema": { + "pattern": "[^\\/#\\?]+?", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentGetCheckoutSessionStatusResponse" + } + } + } + } + } + } + }, + "/api/v1/payment/invoices": { + "get": { + "tags": [ + "Payment" + ], + "summary": "Get invoices", + "operationId": "Payment_getInvoices", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentGetInvoicesResponse" + } + } + } + } + } + } + }, + "/api/v1/payment/invoices/{invoiceId}": { + "get": { + "tags": [ + "Payment" + ], + "summary": "Get invoice", + "operationId": "Payment_getInvoice", + "parameters": [ + { + "in": "path", + "name": "invoiceId", + "required": true, + "schema": { + "pattern": "[^\\/#\\?]+?", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentGetInvoiceResponse" + } + } + } + } + } + } + }, + "/api/v1/payment/webhook": { + "post": { + "tags": [ + "Payment" + ], + "summary": "Handle stripe webhook", + "operationId": "Payment_handleStripeWebhook", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentHandleStripeWebhookRequest" + } + } + }, + "required": false + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentHandleStripeWebhookResponse" + } + } + } + } + } + } + }, + "/api/v1/logs": { + "get": { + "tags": [ + "Logs" + ], + "summary": "Get logs", + "operationId": "Logs_list", + "description": "List logs", + "parameters": [ + { + "in": "query", + "name": "type", + "schema": { + "description": "Type of the log", + "enum": [ + "error", + "info", + "debug" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "time", + "schema": { + "description": "Time interval for which data needs to be fetched", + "enum": [ + "5m", + "30m", + "6h", + "1d", + "1w", + "1month", + "1y" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "status", + "schema": { + "description": "Status of the log", + "enum": [ + "all", + "success", + "error" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "search", + "schema": { + "description": "Search term in the log", + "type": "string" + } + }, + { + "in": "query", + "name": "integrationId", + "schema": { + "description": "Integration UUID", + "type": "string" + } + }, + { + "in": "query", + "name": "entityId", + "schema": { + "description": "Entity id", + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "description": "Limit of the logs", + "type": "number", + "default": 10 + } + }, + { + "in": "query", + "name": "cursor", + "schema": { + "description": "Cursor for pagination", + "type": "string" + } + }, + { + "in": "query", + "name": "logsType", + "schema": { + "description": "Type of the log", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LogsResDTO" + } + } + } + } + } + }, + "post": { + "tags": [ + "Logs" + ], + "summary": "Post logs", + "operationId": "Logs_addNewLogs", + "description": "Add new logs", + "requestBody": { + "description": "IngestDataDTO", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IngestDataDTO" + } + } + }, + "required": false + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IngestDataResponseDTO" + } + } + } + } + } + } + }, + "/api/v1/analytics": { + "get": { + "tags": [ + "Analytics" + ], + "summary": "Get analytics", + "operationId": "Analytics_get", + "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": { + "schemas": { + "MemberInfoResDTO": { + "description": "Member information", + "properties": { + "id": { + "type": "string" + }, + "clientId": { + "type": "string" + }, + "email": { + "format": "email", + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + }, + "metadata": { + }, + "createdAt": { + "oneOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + } + ] + }, + "updatedAt": { + "oneOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + } + ] + }, + "deletedAt": { + "oneOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + } + ] + } + }, + "type": "object", + "required": [ + "id", + "clientId", + "email", + "name", + "role", + "createdAt", + "updatedAt" + ] + }, + "MagicLinkResDTO": { + "properties": { + "status": { + "type": "string" + } + }, + "type": "object", + "required": [ + "status" + ] + }, + "MagicLinkReqDTO": { + "properties": { + "email": { + "description": "The email of the user", "format": "email", "type": "string" }, @@ -1630,6 +2250,14 @@ "verifyHost": { "description": "The host to verify the member", "type": "string" + }, + "role": { + "description": "The role that will be assignied to the invited user", + "enum": [ + "admin", + "developer" + ], + "type": "string" } }, "type": "object", @@ -1658,6 +2286,14 @@ "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", "type": "string" }, + "role": { + "description": "The role that is assigned to the member", + "enum": [ + "admin", + "developer" + ], + "type": "string" + }, "updatedAt": { "description": "The last update date of the member record", "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", @@ -1668,7 +2304,29 @@ "required": [ "email", "id", - "name" + "name", + "role" + ] + }, + "UpdateMemberReqDTO": { + "properties": { + "memberId": { + "description": "The uuid identifier for the member", + "type": "string" + }, + "role": { + "description": "The role that is assigned to the member", + "enum": [ + "admin", + "developer" + ], + "type": "string" + } + }, + "type": "object", + "required": [ + "memberId", + "role" ] }, "GenerateAPIKeyReqDTO": { @@ -1706,6 +2364,19 @@ "key": { "description": "The generated API key", "type": "string" + }, + "isHidden": { + "description": "Whether the API key is hidden", + "type": "boolean" + }, + "lastUsed": { + "description": "The last used date of the API key", + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string" + }, + "member": { + "description": "The member of the API key", + "type": "object" } }, "type": "object", @@ -1714,7 +2385,9 @@ "name", "createdAt", "updatedAt", - "key" + "key", + "isHidden", + "member" ] }, "DeleteAPIKeyReqDTO": { @@ -1859,30 +2532,6 @@ "description": "Client identifier", "type": "string" }, - "openApiSpec": { - "description": "OpenAPI specification in YAML format", - "type": "string" - }, - "integrationYaml": { - "description": "Integration details in YAML format", - "type": "string" - }, - "enabled": { - "description": "Whether the OpenAPI spec is enabled", - "type": "boolean" - }, - "openAPISpecURL": { - "description": "URL to the OpenAPI specification", - "type": "string", - "format": "uri", - "nullable": true - }, - "integrationYAMLURL": { - "description": "URL to the integration YAML", - "type": "string", - "format": "uri", - "nullable": true - }, "lastSyncAt": { "description": "Last synchronization date and time", "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", @@ -1901,12 +2550,28 @@ "type": "string", "format": "date-time" }, - "jobStatus": { + "status": { "description": "The job status of the app", "enum": [ + "initialized", "running", - "success", - "failed" + "caching", + "cancelled", + "finished", + "exited" + ], + "type": "string" + }, + "state": { + "description": "Current state of the app FSM", + "enum": [ + "preprocess", + "validate", + "prepare", + "build", + "push", + "load", + "finish" ], "type": "string" } @@ -1916,9 +2581,6 @@ "id", "name", "clientId", - "openApiSpec", - "integrationYaml", - "enabled", "lastSyncAt", "createdAt", "updatedAt" @@ -2232,6 +2894,7 @@ ] }, "ConnectorListItemDTO": { + "description": "List of connectors", "properties": { "appName": { "description": "Application name associated with the connector", @@ -2252,6 +2915,9 @@ "description": "Unique identifier of the connector", "type": "string" }, + "member": { + "$ref": "#/components/schemas/MemberInfoResDTO" + }, "name": { "description": "Name of the connector", "type": "string" @@ -2309,6 +2975,7 @@ "_count", "connections", "id", + "member", "name", "authScheme", "createdAt", @@ -2320,7 +2987,6 @@ "GetConnectorListResDTO": { "properties": { "items": { - "description": "List of connectors", "items": { "type": "object" }, @@ -2427,6 +3093,12 @@ }, "authConfig": { "type": "object" + }, + "member": { + "items": { + "$ref": "#/components/schemas/MemberInfoResDTO" + }, + "type": "object" } }, "type": "object", @@ -2437,7 +3109,8 @@ "createdAt", "updatedAt", "appUniqueId", - "appName" + "appName", + "member" ] }, "GetConnectionsResult": { @@ -2547,7 +3220,18 @@ "type": "string" } }, - "type": "object" + "type": "object" + }, + "ActionGetNLAInputsReqDTO": { + "properties": { + "text": { + "type": "string" + } + }, + "type": "object", + "required": [ + "text" + ] }, "ProxyExecutionReqDTO": { "properties": { @@ -2851,6 +3535,12 @@ }, "authConfig": { "type": "object" + }, + "member": { + "items": { + "$ref": "#/components/schemas/MemberInfoResDTO" + }, + "type": "object" } }, "type": "object", @@ -2863,7 +3553,8 @@ "createdAt", "updatedAt", "appUniqueId", - "appName" + "appName", + "member" ] }, "ToggleConnectedAccountResponseDTO": { @@ -2962,6 +3653,9 @@ "appUniqueId": { "type": "string" }, + "memberInfo": { + "$ref": "#/components/schemas/MemberInfoResDTO" + }, "meta": { "$ref": "#/components/schemas/Meta" }, @@ -3073,1144 +3767,1540 @@ "redirectUri": { "type": "string" }, - "userUuid": { + "userUuid": { + "type": "string" + } + }, + "type": "object", + "required": [ + "integrationId" + ] + }, + "InitiateConnectionResponse": { + "properties": { + "connectionStatus": { + "minLength": 1, + "type": "string" + }, + "connectedAccountId": { + "minLength": 1, + "type": "string" + }, + "redirectUrl": { + "type": "string" + } + }, + "type": "object", + "required": [ + "connectionStatus", + "connectedAccountId" + ] + }, + "OAuth2CallbackQueryDto": { + "properties": { + "state": { + "type": "string" + } + }, + "type": "object", + "required": [ + "state" + ] + }, + "RedirectUriDTO": { + "properties": { + "redirectUri": { + "type": "string" + } + }, + "type": "object" + }, + "ListTriggersQueryDTO": { + "properties": { + "appNames": { + "description": "Names of the apps", + "type": "string" + }, + "connectedAccountIds": { + "description": "IDs of the connected accounts", + "type": "string" + }, + "triggerIds": { + "description": "IDs of the triggers", + "type": "string" + }, + "showEnabledOnly": { + "description": "Show enabled only", + "type": "boolean" + } + }, + "type": "object" + }, + "GetActiveTriggersQueryDTO": { + "properties": { + "connectedAccountIds": { + "description": "IDs of the connected accounts", + "type": "string" + }, + "integrationIds": { + "description": "IDs of the integrations", + "type": "string" + }, + "triggerIds": { + "description": "IDs of the triggers", + "type": "string" + }, + "triggerNames": { + "description": "Names of the triggers", + "type": "string" + }, + "page": { + "description": "Page number", + "type": "number" + }, + "limit": { + "description": "Limit per page", + "type": "number" + }, + "showDisabled": { + "description": "Show disabled triggers", + "type": "boolean" + } + }, + "type": "object" + }, + "GetLogsQueryDTO": { + "properties": { + "connectionId": { + "description": "ID of the connection", + "type": "string" + }, + "integrationId": { + "description": "ID of the integration", + "type": "string" + }, + "page": { + "description": "Page number", + "type": "number" + }, + "limit": { + "description": "Limit per page", + "type": "number" + } + }, + "type": "object" + }, + "TriggerResDTO": { + "properties": { + "description": { + "description": "Trigger description", + "type": "string" + }, + "name": { + "description": "Trigger name", + "type": "string" + }, + "display_name": { + "description": "Trigger display name", + "type": "string" + }, + "enabled": { + "description": "Is trigger enabled", + "type": "boolean" + }, + "config": { + "description": "Trigger configuration", + "type": "object" + }, + "payload": { + "description": "Trigger payload", + "type": "object" + }, + "logo": { + "description": "Trigger logo URL", + "type": "string" + }, + "count": { + "description": "Trigger count", + "type": "number" + }, + "appKey": { + "description": "App key", + "type": "string" + }, + "appId": { + "description": "App ID", + "type": "string" + }, + "appName": { + "description": "App name", + "type": "string" + }, + "instructions": { + "description": "Trigger instructions", + "type": "string" + }, + "type": { + "description": "Trigger type", + "type": "string" + } + }, + "type": "object", + "required": [ + "name", + "display_name", + "appKey", + "appId", + "appName" + ] + }, + "SingleTriggerResDTO": { + "properties": { + "description": { + "description": "Trigger description", + "type": "string" + }, + "name": { + "description": "Trigger name", + "type": "string" + }, + "displayName": { + "description": "Trigger display name", + "type": "string" + }, + "type": { + "description": "Trigger type", + "type": "string" + }, + "appId": { + "description": "App ID", + "type": "string" + }, + "appName": { + "description": "App name", + "type": "string" + }, + "instructions": { + "description": "Trigger instructions", + "type": "string" + }, + "payload": { + "description": "Trigger payload", + "type": "object" + }, + "config": { + "description": "Trigger config", + "type": "object" + } + }, + "type": "object", + "required": [ + "name", + "displayName", + "description", + "type", + "appId", + "appName", + "payload", + "config" + ] + }, + "TriggerConfig": { + "description": "Trigger configuration", + "properties": { + "repo": { + "description": "Repository name", + "type": "string" + }, + "owner": { + "description": "Repository owner", "type": "string" } }, "type": "object", "required": [ - "integrationId" + "repo", + "owner" ] }, - "InitiateConnectionResponse": { + "ActiveTriggerInstance": { "properties": { - "connectionStatus": { - "minLength": 1, + "id": { + "description": "Trigger instance ID", "type": "string" }, - "connectedAccountId": { - "minLength": 1, + "connectionId": { + "description": "Connected account ID", "type": "string" }, - "redirectUrl": { + "triggerName": { + "description": "Trigger name", + "type": "string" + }, + "triggerData": { + "description": "Trigger data", "type": "string" + }, + "triggerConfig": { + "$ref": "#/components/schemas/TriggerConfig" + }, + "createdAt": { + "description": "Created at timestamp", + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "description": "Updated at timestamp", + "type": "string", + "format": "date-time" + }, + "disabledAt": { + "description": "Disabled at timestamp", + "type": "string", + "format": "date-time", + "nullable": true } }, "type": "object", "required": [ - "connectionStatus", - "connectedAccountId" + "connectionId", + "triggerName", + "triggerConfig", + "createdAt", + "updatedAt" ] }, - "OAuth2CallbackQueryDto": { + "PageInfoDTO": { "properties": { - "state": { - "type": "string" + "currentPage": { + "type": "number" + }, + "perPage": { + "type": "number" + }, + "totalPages": { + "type": "number" } }, "type": "object", "required": [ - "state" + "currentPage", + "perPage", + "totalPages" ] }, - "RedirectUriDTO": { + "ActiveTriggersResDTO": { "properties": { - "redirectUri": { - "type": "string" + "triggers": { + "items": { + "type": "object" + }, + "type": "array" + }, + "pageInfo": { + "items": { + "$ref": "#/components/schemas/PageInfoDTO" + }, + "type": "array" } }, - "type": "object" + "type": "object", + "required": [ + "triggers", + "pageInfo" + ] }, - "ListTriggersQueryDTO": { + "TriggerLogsResDTO": { "properties": { - "appNames": { - "description": "Names of the apps", - "type": "string" - }, - "connectedAccountIds": { - "description": "IDs of the connected accounts", - "type": "string" - }, - "triggerIds": { - "description": "IDs of the triggers", - "type": "string" + "data": { + "items": { + "$ref": "#/components/schemas/TriggerLogItemDTO" + }, + "type": "array" }, - "showEnabledOnly": { - "description": "Show enabled only", - "type": "boolean" + "pageInfo": { + "$ref": "#/components/schemas/PageInfoDTO" } }, - "type": "object" + "type": "object", + "required": [ + "data", + "pageInfo" + ] }, - "GetActiveTriggersQueryDTO": { + "TriggerLogItemDTO": { "properties": { - "connectedAccountIds": { - "description": "IDs of the connected accounts", + "clientId": { + "description": "Client ID", "type": "string" }, - "integrationIds": { - "description": "IDs of the integrations", + "connectionId": { + "description": "Connection ID", "type": "string" }, - "triggerIds": { - "description": "IDs of the triggers", - "type": "string" + "errorTrigger": { + "description": "Error trigger", + "type": "string", + "nullable": true }, - "triggerNames": { - "description": "Names of the triggers", - "type": "string" + "triggerClientError": { + "description": "Trigger client error", + "type": "string", + "nullable": true }, - "page": { - "description": "Page number", - "type": "number" + "triggerClientPayload": { + "description": "Trigger client payload", + "type": "string", + "nullable": true }, - "limit": { - "description": "Limit per page", - "type": "number" + "triggerProviderPayload": { + "description": "Trigger provider payload", + "type": "string", + "nullable": true }, - "showDisabled": { - "description": "Show disabled triggers", - "type": "boolean" - } - }, - "type": "object" - }, - "GetLogsQueryDTO": { - "properties": { - "connectionId": { - "description": "ID of the connection", - "type": "string" + "triggerName": { + "description": "Trigger name", + "type": "string", + "nullable": true }, - "integrationId": { - "description": "ID of the integration", + "id": { + "description": "Log ID", "type": "string" }, - "page": { - "description": "Page number", - "type": "number" + "appKey": { + "description": "App key", + "type": "string" }, - "limit": { - "description": "Limit per page", - "type": "number" + "createdAt": { + "description": "Created at timestamp", + "type": "string", + "format": "date-time" } }, - "type": "object" + "type": "object", + "required": [ + "clientId", + "connectionId", + "id", + "appKey", + "createdAt" + ] }, - "TriggerResDTO": { + "HandleTriggerParamsDTO": { "properties": { - "description": { - "description": "Trigger description", - "type": "string" - }, - "name": { - "description": "Trigger name", + "appName": { + "description": "The name of the app", "type": "string" }, - "display_name": { - "description": "Trigger display name", + "clientId": { + "description": "The client ID", "type": "string" - }, - "enabled": { - "description": "Is trigger enabled", - "type": "boolean" - }, - "config": { - "description": "Trigger configuration", - "type": "object" - }, - "payload": { - "description": "Trigger payload", + } + }, + "type": "object", + "required": [ + "appName", + "clientId" + ] + }, + "HandleTriggerBodyDTO": { + "properties": { + "body": { + "description": "The trigger payload", "type": "object" - }, - "logo": { - "description": "Trigger logo URL", - "type": "string" - }, - "count": { - "description": "Trigger count", - "type": "number" - }, - "appKey": { - "description": "App key", - "type": "string" - }, - "appId": { - "description": "App ID", + } + }, + "type": "object", + "required": [ + "body" + ] + }, + "EnableTriggerParamsDTO": { + "properties": { + "connectedAccountId": { + "description": "The connected account ID", "type": "string" }, - "appName": { - "description": "App name", + "triggerName": { + "description": "The trigger name", "type": "string" - }, - "instructions": { - "description": "Trigger instructions", + } + }, + "type": "object", + "required": [ + "connectedAccountId", + "triggerName" + ] + }, + "GetTriggerParamsDTO": { + "properties": { + "triggerId": { + "description": "The connected account ID", "type": "string" + } + }, + "type": "object", + "required": [ + "triggerId" + ] + }, + "EnableTriggerBodyDTO": { + "properties": { + "triggerConfig": { + "description": "The trigger configuration", + "type": "object" }, - "type": { - "description": "Trigger type", + "verifyHost": { + "description": "The verify host", "type": "string" } }, "type": "object", "required": [ - "name", - "display_name", - "appKey", - "appId", - "appName" + "triggerConfig" ] }, - "SingleTriggerResDTO": { + "SwitchTriggerStatusParamsDTO": { "properties": { - "description": { - "description": "Trigger description", - "type": "string" - }, - "name": { - "description": "Trigger name", + "triggerId": { + "description": "The trigger instance ID", "type": "string" - }, - "displayName": { - "description": "Trigger display name", + } + }, + "type": "object", + "required": [ + "triggerId" + ] + }, + "SwitchTriggerStatusBodyDTO": { + "properties": { + "enabled": { + "description": "The new enabled status of the trigger", + "type": "boolean" + } + }, + "type": "object", + "required": [ + "enabled" + ] + }, + "TriggerInstanceParamsDTO": { + "properties": { + "triggerInstanceId": { + "description": "The trigger instance ID", "type": "string" - }, - "type": { - "description": "Trigger type", + } + }, + "type": "object", + "required": [ + "triggerInstanceId" + ] + }, + "SetCallbackUrlBodyDTO": { + "properties": { + "callbackURL": { + "description": "The callback URL", "type": "string" - }, - "appId": { - "description": "App ID", + } + }, + "type": "object", + "required": [ + "callbackURL" + ] + }, + "TriggerResponseDTO": { + "properties": { + "status": { + "description": "The status of the operation", "type": "string" }, - "appName": { - "description": "App name", + "message": { + "description": "Optional message", "type": "string" }, - "instructions": { - "description": "Trigger instructions", + "triggerId": { + "description": "Optional trigger ID", "type": "string" - }, - "payload": { - "description": "Trigger payload", - "type": "object" - }, - "config": { - "description": "Trigger config", - "type": "object" } }, "type": "object", "required": [ - "name", - "displayName", - "description", - "type", - "appId", - "appName", - "payload", - "config" + "status" ] }, - "TriggerConfig": { - "description": "Trigger configuration", + "WebhookURLResponseDTO": { "properties": { - "repo": { - "description": "Repository name", + "status": { + "description": "The status of the operation", "type": "string" }, - "owner": { - "description": "Repository owner", + "callbackURL": { + "description": "The callback URL if found", "type": "string" } }, "type": "object", "required": [ - "repo", - "owner" + "status" ] }, - "ActiveTriggerInstance": { + "TriggerMetadataDTO": { + "description": "The trigger details if found", "properties": { "id": { - "description": "Trigger instance ID", + "description": "The unique identifier of the trigger", "type": "string" }, "connectionId": { - "description": "Connected account ID", + "description": "The connection identifier associated with the trigger", "type": "string" }, "triggerName": { - "description": "Trigger name", + "description": "The name of the trigger", "type": "string" }, "triggerData": { - "description": "Trigger data", + "description": "The data associated with the trigger", "type": "string" }, "triggerConfig": { - "$ref": "#/components/schemas/TriggerConfig" + "description": "The configuration of the trigger", + "type": "object" + }, + "state": { + "description": "The state of the trigger", + "type": "object" }, "createdAt": { - "description": "Created at timestamp", - "type": "string", - "format": "date-time" + "description": "The creation date of the trigger", + "type": "string" }, "updatedAt": { - "description": "Updated at timestamp", - "type": "string", - "format": "date-time" + "description": "The last update date of the trigger", + "type": "string" }, "disabledAt": { - "description": "Disabled at timestamp", - "type": "string", - "format": "date-time", - "nullable": true + "description": "The date when the trigger was disabled, if applicable", + "type": "string" + }, + "disabledReason": { + "description": "The reason why the trigger was disabled, if applicable", + "type": "string" } }, "type": "object", "required": [ + "id", "connectionId", "triggerName", + "triggerData", "triggerConfig", + "state", "createdAt", "updatedAt" ] }, - "PageInfoDTO": { + "GetTriggerResponseDTO": { "properties": { - "currentPage": { - "type": "number" - }, - "perPage": { - "type": "number" + "status": { + "description": "The status of the operation", + "type": "string" }, - "totalPages": { - "type": "number" + "trigger": { + "$ref": "#/components/schemas/TriggerMetadataDTO" } }, "type": "object", "required": [ - "currentPage", - "perPage", - "totalPages" + "status" ] }, - "ActiveTriggersResDTO": { + "GenerateCLISessionReqDTO": { "properties": { - "triggers": { - "items": { - "type": "object" - }, - "type": "array" - }, - "pageInfo": { - "items": { - "$ref": "#/components/schemas/PageInfoDTO" - }, - "type": "array" + "channel_name": { + "description": "The channel name for the CLI session", + "type": "string" } }, "type": "object", "required": [ - "triggers", - "pageInfo" + "channel_name" ] }, - "TriggerLogsResDTO": { + "GenerateCLISessionResDTO": { "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/TriggerLogItemDTO" - }, - "type": "array" + "key": { + "description": "The key for the CLI session", + "type": "string" + } + }, + "type": "object", + "required": [ + "key" + ] + }, + "GetCLISessionResDTO": { + "properties": { + "clientId": { + "description": "The client ID", + "type": "string" }, - "pageInfo": { - "$ref": "#/components/schemas/PageInfoDTO" + "cliCode": { + "description": "The CLI code", + "type": "string" } }, "type": "object", "required": [ - "data", - "pageInfo" + "clientId", + "cliCode" ] }, - "TriggerLogItemDTO": { + "VerifyCLICodeResDTO": { "properties": { "clientId": { - "description": "Client ID", - "type": "string" - }, - "connectionId": { - "description": "Connection ID", + "description": "The client ID", "type": "string" }, - "errorTrigger": { - "description": "Error trigger", - "type": "string", - "nullable": true - }, - "triggerClientError": { - "description": "Trigger client error", - "type": "string", - "nullable": true - }, - "triggerClientPayload": { - "description": "Trigger client payload", - "type": "string", - "nullable": true - }, - "triggerProviderPayload": { - "description": "Trigger provider payload", - "type": "string", - "nullable": true - }, - "triggerName": { - "description": "Trigger name", - "type": "string", - "nullable": true - }, - "id": { - "description": "Log ID", + "cliCode": { + "description": "The CLI code", "type": "string" }, - "appKey": { - "description": "App key", + "apiKey": { + "description": "The API key associated with the client", "type": "string" - }, - "createdAt": { - "description": "Created at timestamp", - "type": "string", - "format": "date-time" } }, "type": "object", "required": [ "clientId", - "connectionId", - "id", - "appKey", - "createdAt" + "cliCode", + "apiKey" ] }, - "HandleTriggerParamsDTO": { + "CLIQueryDTO": { "properties": { - "appName": { - "description": "The name of the app", + "key": { + "description": "Unique key for CLI session", "type": "string" }, - "clientId": { - "description": "The client ID", + "code": { + "description": "Code for CLI verification", "type": "string" } }, "type": "object", "required": [ - "appName", - "clientId" + "key" ] }, - "HandleTriggerBodyDTO": { + "MetadataReqDTO": { "properties": { - "body": { - "description": "The trigger payload", - "type": "object" + "email": { + "description": "The email associated with the metadata request", + "type": "string" + }, + "metadata": { + "description": "Additional metadata as a key-value pair" } }, "type": "object", "required": [ - "body" + "email" ] }, - "EnableTriggerParamsDTO": { + "TriggersEnabledToggleReqDTO": { "properties": { - "connectedAccountId": { - "description": "The connected account ID", - "type": "string" - }, - "triggerName": { - "description": "The trigger name", - "type": "string" + "enabled": { + "description": "Flag to enable or disable triggers", + "type": "boolean" } }, "type": "object", "required": [ - "connectedAccountId", - "triggerName" + "enabled" ] }, - "GetTriggerParamsDTO": { + "TriggersEnabledToggleResDTO": { "properties": { - "triggerId": { - "description": "The connected account ID", + "message": { + "description": "Message indicating the result of the toggle operation", "type": "string" } }, "type": "object", "required": [ - "triggerId" + "message" ] }, - "EnableTriggerBodyDTO": { + "TriggerToggleInfoResponseDTO": { "properties": { - "triggerConfig": { - "description": "The trigger configuration", - "type": "object" - }, - "verifyHost": { - "description": "The verify host", + "triggersEnabled": { + "description": "Indicates if triggers are enabled", + "type": "boolean" + } + }, + "type": "object", + "required": [ + "triggersEnabled" + ] + }, + "ToggleTriggerStateResponseDTO": { + "properties": { + "message": { "type": "string" } }, "type": "object", "required": [ - "triggerConfig" + "message" ] }, - "SwitchTriggerStatusParamsDTO": { + "MetadataQueryDTO": { "properties": { - "triggerId": { - "description": "The trigger instance ID", + "email": { + "description": "Email of the client", "type": "string" } }, "type": "object", "required": [ - "triggerId" + "email" ] }, - "SwitchTriggerStatusBodyDTO": { + "TriggerMetadata": { + "description": "Metadata associated with the trigger log", "properties": { - "enabled": { - "description": "The new enabled status of the trigger", - "type": "boolean" + "id": { + "description": "The unique id of the log", + "type": "string" + }, + "type": { + "description": "The type of the log", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "trigger" + ] + } + ] + }, + "createdAt": { + "description": "The date and time when the log was created", + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "description": "The date and time when the log was updated", + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string", + "format": "date-time" + }, + "provider": { + "description": "The provider of the log", + "type": "string" + }, + "clientId": { + "description": "The client uuid of the log", + "type": "string" + }, + "connectionId": { + "description": "The connection id of the log", + "type": "string" + }, + "triggerProviderPayload": { + "description": "The trigger provider payload of the log", + "type": "string" + }, + "triggerClientPayload": { + "type": "string" + }, + "triggerClientError": { + "description": "The trigger client error of the log", + "type": "string" + }, + "triggerName": { + "description": "The trigger name of the log", + "type": "string" + }, + "triggerClientResponse": { + "description": "The trigger client response of the log", + "type": "string" } }, "type": "object", "required": [ - "enabled" + "id", + "type", + "createdAt", + "updatedAt", + "provider", + "clientId", + "connectionId" ] }, - "TriggerInstanceParamsDTO": { + "ActionMetadata": { "properties": { - "triggerInstanceId": { - "description": "The trigger instance ID", + "id": { + "description": "The unique id of the log", + "type": "string" + }, + "request": { + "description": "The request sent to the provider", + "type": "string" + }, + "response": { + "description": "The response from the provider", + "type": "string" + }, + "errorRequest": { + "description": "The error request sent to the provider", + "type": "string" + }, + "type": { + "description": "The type of the log", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "action" + ] + } + ] + }, + "createdAt": { + "description": "The date and time when the log was created", + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "description": "The date and time when the log was updated", + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string", + "format": "date-time" + }, + "provider": { + "description": "The provider of the log", + "type": "string" + }, + "clientId": { + "description": "The client uuid of the log", + "type": "string" + }, + "connectionId": { + "description": "The connection id of the log", "type": "string" - } - }, - "type": "object", - "required": [ - "triggerInstanceId" - ] - }, - "SetCallbackUrlBodyDTO": { - "properties": { - "callbackURL": { - "description": "The callback URL", + }, + "actionName": { + "description": "The action name of the log", "type": "string" } }, "type": "object", "required": [ - "callbackURL" + "id", + "request", + "type", + "createdAt", + "updatedAt", + "provider", + "clientId", + "connectionId", + "actionName" ] }, - "TriggerResponseDTO": { + "TriggerLogData": { "properties": { - "status": { - "description": "The status of the operation", + "id": { + "description": "The unique identifier of the trigger log", "type": "string" }, - "message": { - "description": "Optional message", + "connectionId": { + "description": "The connection identifier associated with the trigger log", "type": "string" }, - "triggerId": { - "description": "Optional trigger ID", + "clientId": { + "description": "The client identifier associated with the trigger log", "type": "string" - } - }, - "type": "object", - "required": [ - "status" - ] - }, - "WebhookURLResponseDTO": { - "properties": { + }, "status": { - "description": "The status of the operation", + "description": "The status of the trigger log", "type": "string" }, - "callbackURL": { - "description": "The callback URL if found", + "appName": { + "description": "The name of the application associated with the trigger log", "type": "string" + }, + "createdAt": { + "description": "The creation date and time of the trigger log", + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string", + "format": "date-time" + }, + "type": { + "description": "The type of the log", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "trigger" + ] + } + ] + }, + "meta": { + "$ref": "#/components/schemas/TriggerMetadata" } }, "type": "object", "required": [ - "status" + "id", + "connectionId", + "clientId", + "status", + "appName", + "createdAt", + "type", + "meta" ] }, - "TriggerMetadataDTO": { - "description": "The trigger details if found", + "ActionLogData": { "properties": { "id": { - "description": "The unique identifier of the trigger", + "description": "The unique identifier of the action log", "type": "string" }, "connectionId": { - "description": "The connection identifier associated with the trigger", + "description": "The connection identifier associated with the action log", "type": "string" }, - "triggerName": { - "description": "The name of the trigger", + "clientId": { + "description": "The client identifier associated with the action log", "type": "string" }, - "triggerData": { - "description": "The data associated with the trigger", + "status": { + "description": "The status of the action log", "type": "string" }, - "triggerConfig": { - "description": "The configuration of the trigger", - "type": "object" - }, - "state": { - "description": "The state of the trigger", - "type": "object" - }, - "createdAt": { - "description": "The creation date of the trigger", + "appName": { + "description": "The name of the application associated with the action log", "type": "string" }, - "updatedAt": { - "description": "The last update date of the trigger", - "type": "string" + "createdAt": { + "description": "The creation date and time of the action log", + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", + "type": "string", + "format": "date-time" }, - "disabledAt": { - "description": "The date when the trigger was disabled, if applicable", - "type": "string" + "type": { + "description": "The type of the log", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "action" + ] + } + ] }, - "disabledReason": { - "description": "The reason why the trigger was disabled, if applicable", - "type": "string" + "meta": { + "$ref": "#/components/schemas/ActionMetadata" } }, "type": "object", "required": [ "id", "connectionId", - "triggerName", - "triggerData", - "triggerConfig", - "state", + "clientId", + "status", + "appName", "createdAt", - "updatedAt" + "type", + "meta" ] }, - "GetTriggerResponseDTO": { + "LogsResDTO": { "properties": { - "status": { - "description": "The status of the operation", + "nextCursor": { + "description": "The cursor to get the next page of logs", "type": "string" }, - "trigger": { - "$ref": "#/components/schemas/TriggerMetadataDTO" - } - }, - "type": "object", - "required": [ - "status" - ] - }, - "GenerateCLISessionReqDTO": { - "properties": { - "channel_name": { - "description": "The channel name for the CLI session", - "type": "string" + "data": { + "description": "Logs data", + "items": { + "type": "object" + }, + "type": "array" } }, "type": "object", "required": [ - "channel_name" + "data" ] }, - "GenerateCLISessionResDTO": { + "GetLogsDTO": { "properties": { - "key": { - "description": "The key for the CLI session", + "type": { + "description": "Type of the log", + "enum": [ + "error", + "info", + "debug" + ], "type": "string" - } - }, - "type": "object", - "required": [ - "key" - ] - }, - "GetCLISessionResDTO": { - "properties": { - "clientId": { - "description": "The client ID", + }, + "time": { + "description": "Time interval for which data needs to be fetched", + "enum": [ + "5m", + "30m", + "6h", + "1d", + "1w", + "1month", + "1y" + ], "type": "string" }, - "cliCode": { - "description": "The CLI code", + "status": { + "description": "Status of the log", + "enum": [ + "all", + "success", + "error" + ], "type": "string" - } - }, - "type": "object", - "required": [ - "clientId", - "cliCode" - ] - }, - "VerifyCLICodeResDTO": { - "properties": { - "clientId": { - "description": "The client ID", + }, + "search": { + "description": "Search term in the log", "type": "string" }, - "cliCode": { - "description": "The CLI code", + "integrationId": { + "description": "Integration UUID", "type": "string" }, - "apiKey": { - "description": "The API key associated with the client", + "entityId": { + "description": "Entity id", "type": "string" - } - }, - "type": "object", - "required": [ - "clientId", - "cliCode", - "apiKey" - ] - }, - "CLIQueryDTO": { - "properties": { - "key": { - "description": "Unique key for CLI session", + }, + "limit": { + "description": "Limit of the logs", + "type": "number", + "default": 10 + }, + "cursor": { + "description": "Cursor for pagination", "type": "string" }, - "code": { - "description": "Code for CLI verification", + "logsType": { + "description": "Type of the log", "type": "string" } }, - "type": "object", - "required": [ - "key" - ] + "type": "object" }, - "MetadataReqDTO": { + "IngestDataDTO": { "properties": { - "email": { - "description": "The email associated with the metadata request", + "connectionId": { + "description": "Connection ID of the log", "type": "string" }, - "metadata": { - "description": "Additional metadata as a key-value pair" + "entityId": { + "description": "Entity ID of the log", + "type": "string" + }, + "providerName": { + "description": "Provider name of the log", + "type": "string" + }, + "actionName": { + "description": "Action name of the log", + "type": "string" + }, + "request": { + "type": "object" + }, + "response": { + "type": "object" + }, + "isError": { + "type": "boolean" } }, "type": "object", "required": [ - "email" + "providerName", + "actionName", + "request", + "response", + "isError" ] }, - "TriggersEnabledToggleReqDTO": { + "IngestDataResponseDTO": { "properties": { - "enabled": { - "description": "Flag to enable or disable triggers", + "isIngested": { "type": "boolean" } }, "type": "object", "required": [ - "enabled" + "isIngested" ] }, - "TriggersEnabledToggleResDTO": { + "TimePeriodReqDTO": { "properties": { - "message": { - "description": "Message indicating the result of the toggle operation", + "lastTimePeriod": { + "description": "Time period to get the data for", + "enum": [ + "DAY", + "WEEK", + "MONTH", + "SIX_MONTH", + "YEAR", + "FIVE_YEAR" + ], "type": "string" } }, - "type": "object", - "required": [ - "message" - ] + "type": "object" }, - "TriggerToggleInfoResponseDTO": { + "ActionByAppDTO": { + "description": "Action counts by app", "properties": { - "triggersEnabled": { - "description": "Indicates if triggers are enabled", - "type": "boolean" + "appName": { + "description": "Name of the app", + "type": "string" + }, + "totalCount": { + "description": "Total count of actions for the app", + "type": "number" } }, "type": "object", "required": [ - "triggersEnabled" + "appName", + "totalCount" ] }, - "ToggleTriggerStateResponseDTO": { + "ActionByStatusDTO": { + "description": "Action counts by status", "properties": { - "message": { - "type": "string" + "failed": { + "description": "Count of failed actions", + "type": "number" + }, + "success": { + "description": "Count of successful actions", + "type": "number" } }, "type": "object", "required": [ - "message" + "failed", + "success" ] }, - "MetadataQueryDTO": { + "ActionAnalyticsDTO": { + "description": "Comprehensive trigger analytics data, presenting a breakdown by day, status, and provider for all triggers", "properties": { - "email": { - "description": "Email of the client", - "type": "string" + "date": { + "description": "Date of the action", + "type": "string", + "format": "date" + }, + "byApp": { + "$ref": "#/components/schemas/ActionByAppDTO" + }, + "byStatus": { + "$ref": "#/components/schemas/ActionByStatusDTO" } }, "type": "object", "required": [ - "email" + "date", + "byApp", + "byStatus" ] }, - "TriggerMetadata": { - "description": "Metadata associated with the trigger log", + "IntegrationsWithCountsDTO": { + "description": "Detailed integration analytics data, including a breakdown of connection count, trigger count, and request logs count for each integration", "properties": { "id": { - "description": "The unique id of the log", - "type": "string" - }, - "type": { - "description": "The type of the log", - "type": "string", - "oneOf": [ - { - "type": "string", - "enum": [ - "trigger" - ] - } - ] - }, - "createdAt": { - "description": "The date and time when the log was created", - "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "description": "The date and time when the log was updated", - "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", - "type": "string", - "format": "date-time" - }, - "provider": { - "description": "The provider of the log", + "description": "Unique identifier for the integration", "type": "string" }, - "clientId": { - "description": "The client uuid of the log", - "type": "string" - }, - "connectionId": { - "description": "The connection id of the log", - "type": "string" - }, - "triggerProviderPayload": { - "description": "The trigger provider payload of the log", + "appName": { + "description": "Name of the app", "type": "string" }, - "triggerClientPayload": { + "integrationName": { + "description": "Name of the integration", "type": "string" }, - "triggerClientError": { - "description": "The trigger client error of the log", - "type": "string" + "connectionCount": { + "description": "Count of connections for the integration", + "type": "number" }, - "triggerName": { - "description": "The trigger name of the log", - "type": "string" + "triggerCount": { + "description": "Count of triggers for the integration", + "type": "number" }, - "triggerClientResponse": { - "description": "The trigger client response of the log", - "type": "string" + "requestLogsCount": { + "description": "Count of request logs for the integration", + "type": "number" } }, "type": "object", "required": [ "id", - "type", - "createdAt", - "updatedAt", - "provider", - "clientId", - "connectionId" + "appName", + "integrationName", + "connectionCount", + "triggerCount", + "requestLogsCount" ] }, - "ActionMetadata": { + "AppNameCountDTO": { + "description": "Comprehensive app-level analytics data, providing a breakdown of connection count, trigger count, and request logs count for each app", "properties": { - "id": { - "description": "The unique id of the log", - "type": "string" - }, - "request": { - "description": "The request sent to the provider", - "type": "string" - }, - "response": { - "description": "The response from the provider", - "type": "string" - }, - "errorRequest": { - "description": "The error request sent to the provider", - "type": "string" - }, - "type": { - "description": "The type of the log", - "type": "string", - "oneOf": [ - { - "type": "string", - "enum": [ - "action" - ] - } - ] - }, - "createdAt": { - "description": "The date and time when the log was created", - "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "description": "The date and time when the log was updated", - "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", - "type": "string", - "format": "date-time" - }, - "provider": { - "description": "The provider of the log", + "appName": { + "description": "Name of the app", "type": "string" }, - "clientId": { - "description": "The client uuid of the log", - "type": "string" + "connectionCount": { + "description": "Count of connections for the app", + "type": "number" }, - "connectionId": { - "description": "The connection id of the log", - "type": "string" + "triggerCount": { + "description": "Count of triggers for the app", + "type": "number" }, - "actionName": { - "description": "The action name of the log", - "type": "string" + "requestLogsCount": { + "description": "Count of request logs for the app", + "type": "number" } }, "type": "object", "required": [ - "id", - "request", - "type", - "createdAt", - "updatedAt", - "provider", - "clientId", - "connectionId", - "actionName" + "appName", + "connectionCount", + "triggerCount", + "requestLogsCount" ] }, - "TriggerLogData": { + "AnalyticsDataReqDTO": { "properties": { - "id": { - "description": "The unique identifier of the trigger log", - "type": "string" - }, - "connectionId": { - "description": "The connection identifier associated with the trigger log", - "type": "string" - }, - "clientId": { - "description": "The client identifier associated with the trigger log", - "type": "string" - }, - "status": { - "description": "The status of the trigger log", + "lastTimePeriod": { + "description": "Time period to get the data for", + "enum": [ + "DAY", + "WEEK", + "MONTH", + "SIX_MONTH", + "YEAR", + "FIVE_YEAR" + ], "type": "string" - }, - "appName": { - "description": "The name of the application associated with the trigger log", + } + }, + "type": "object" + }, + "ClientUniqueUserIdCountDTO": { + "description": "Connection counts by entity", + "properties": { + "clientUniqueUserId": { + "description": "Client unique user id", "type": "string" }, - "createdAt": { - "description": "The creation date and time of the trigger log", - "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", - "type": "string", - "format": "date-time" - }, - "type": { - "description": "The type of the log", - "type": "string", - "oneOf": [ - { - "type": "string", - "enum": [ - "trigger" - ] - } - ] - }, - "meta": { - "$ref": "#/components/schemas/TriggerMetadata" + "count": { + "description": "Count of connections for the client unique user id", + "type": "number" } }, "type": "object", "required": [ - "id", - "connectionId", - "clientId", - "status", - "appName", - "createdAt", - "type", - "meta" + "clientUniqueUserId", + "count" ] }, - "ActionLogData": { + "AnalyticsEntityDataDTO": { + "description": "Entity-related analytics data, providing a breakdown by connections, actions, and triggers for each entity. This is include all entity info.", "properties": { - "id": { - "description": "The unique identifier of the action log", - "type": "string" - }, - "connectionId": { - "description": "The connection identifier associated with the action log", - "type": "string" + "byConnections": { + "items": { + "$ref": "#/components/schemas/ClientUniqueUserIdCountDTO" + }, + "type": "array" }, - "clientId": { - "description": "The client identifier associated with the action log", - "type": "string" + "byActions": { + "description": "Action counts by entity", + "items": { + "$ref": "#/components/schemas/ClientUniqueUserIdCountDTO" + }, + "type": "array" }, - "status": { - "description": "The status of the action log", - "type": "string" + "byTriggers": { + "description": "Trigger counts by entity", + "items": { + "$ref": "#/components/schemas/ClientUniqueUserIdCountDTO" + }, + "type": "array" + } + }, + "type": "object", + "required": [ + "byConnections", + "byActions", + "byTriggers" + ] + }, + "AnalyticsDataResDTO": { + "properties": { + "entity": { + "$ref": "#/components/schemas/AnalyticsEntityDataDTO" }, - "appName": { - "description": "The name of the application associated with the action log", - "type": "string" + "actions": { + "items": { + "$ref": "#/components/schemas/ActionAnalyticsDTO" + }, + "type": "array" }, - "createdAt": { - "description": "The creation date and time of the action log", - "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", - "type": "string", - "format": "date-time" + "trigger": { + "items": { + "$ref": "#/components/schemas/ActionAnalyticsDTO" + }, + "type": "array" }, - "type": { - "description": "The type of the log", - "type": "string", - "oneOf": [ - { - "type": "string", - "enum": [ - "action" - ] - } - ] + "integrations": { + "items": { + "$ref": "#/components/schemas/IntegrationsWithCountsDTO" + }, + "type": "array" }, - "meta": { - "$ref": "#/components/schemas/ActionMetadata" + "app": { + "$ref": "#/components/schemas/AppNameCountDTO" } }, "type": "object", "required": [ - "id", - "connectionId", - "clientId", - "status", - "appName", - "createdAt", - "type", - "meta" + "entity", + "actions", + "trigger", + "integrations", + "app" ] }, - "LogsResDTO": { + "TopEntitiesResDTO": { "properties": { - "nextCursor": { - "description": "The cursor to get the next page of logs", - "type": "string" - }, - "data": { - "description": "Logs data", + "entities": { + "description": "Top entities by connection count", "items": { - "type": "object" + "$ref": "#/components/schemas/TConnectionCountDTO" }, "type": "array" } }, "type": "object", "required": [ - "data" + "entities" ] }, - "GetLogsDTO": { + "TConnectionCountDTO": { "properties": { - "type": { - "description": "Type of the log", - "enum": [ - "error", - "info", - "debug" - ], - "type": "string" - }, - "time": { - "description": "Time interval for which data needs to be fetched", - "enum": [ - "5m", - "30m", - "6h", - "1d", - "1w", - "1month", - "1y" - ], + "clientUniqueUserId": { + "description": "Name of the entity", "type": "string" }, - "status": { - "description": "Status of the log", - "enum": [ - "all", - "success", - "error" - ], + "count": { + "description": "Count of connections for the entity", + "type": "number" + } + }, + "type": "object", + "required": [ + "clientUniqueUserId", + "count" + ] + }, + "EntityQueryReqDTO": { + "properties": { + "query": { + "description": "Query to get the data for", "type": "string" - }, - "search": { - "description": "Search term in the log", + } + }, + "type": "object" + }, + "WebhookReqDTO": { + "properties": { + "eventWebhookURL": { + "description": "Event Webhook URL", "type": "string" - }, - "integrationId": { - "description": "Integration UUID", + } + }, + "type": "object", + "required": [ + "eventWebhookURL" + ] + }, + "FetchQueryDTO": { + "properties": { + "startTime": { + "description": "Start time of the event in ISO 8601 format", + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", "type": "string" }, - "entityId": { - "description": "Entity UUID", + "endTime": { + "description": "End time of the event in ISO 8601 format", + "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?", "type": "string" - }, - "limit": { - "description": "Limit of the logs", - "type": "number", - "default": 10 - }, - "cursor": { - "description": "Cursor for pagination", + } + }, + "type": "object", + "required": [ + "startTime", + "endTime" + ] + }, + "WebhookSecretResDTO": { + "properties": { + "webhookSecret": { + "description": "Webhook secret", "type": "string" - }, - "connectionId": { - "description": "Connection ID of the log", + } + }, + "type": "object", + "required": [ + "webhookSecret" + ] + }, + "CreateCheckoutSessionReqDto": { + "properties": { + "plan": { + "enum": [ + "HOBBY", + "STARTER", + "GROWTH", + "ENTERPRISE" + ], "type": "string" } }, - "type": "object" + "type": "object", + "required": [ + "plan" + ] + }, + "AppsSendEmailToClientRequest": { + }, + "PaymentHandleStripeWebhookRequest": { }, "ApiKeysListResponse": { "items": { @@ -4224,17 +5314,115 @@ }, "type": "array" }, + "AppsDeleteOpenApiSpecToolResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, + "AppsSendEmailToClientResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, + "AppsGetOpenApiSpecStatusResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, "TriggersListResponse": { "items": { "$ref": "#/components/schemas/TriggerResDTO" }, "type": "array" }, + "ActionsGetActionInputsResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, "TriggerControllerV2GetTriggerInfoResponse": { "items": { "$ref": "#/components/schemas/SingleTriggerResDTO" }, "type": "array" + }, + "EventLogsUpdateWebhookResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, + "EventLogsGetWebhookResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, + "EventLogsGetEventsResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, + "EventLogsGetWebhookSecretResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, + "EventLogsRefreshWebhookSecretResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, + "PaymentCreateCheckoutSessionResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, + "PaymentGetCheckoutSessionStatusResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, + "PaymentGetInvoicesResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, + "PaymentGetInvoiceResponse": { + "type": "object", + "properties": { + }, + "example": { + } + }, + "PaymentHandleStripeWebhookResponse": { + "type": "object", + "properties": { + }, + "example": { + } } }, "securitySchemes": { diff --git a/ruby/.konfig/generate-id.txt b/ruby/.konfig/generate-id.txt index e0b08ae..9a89b7d 100644 --- a/ruby/.konfig/generate-id.txt +++ b/ruby/.konfig/generate-id.txt @@ -1 +1 @@ -7ebc57d0-525b-4876-910d-b090cba27424 \ No newline at end of file +82ebba47-4b30-44e4-a41c-9ef44ff53dff \ No newline at end of file diff --git a/ruby/.konfigignore b/ruby/.konfigignore index aeef1df..19fc17d 100644 --- a/ruby/.konfigignore +++ b/ruby/.konfigignore @@ -1 +1,3 @@ -spec/simple_test_spec.rb \ No newline at end of file +spec/simple_test_spec.rb +lib/composio/api/payment_api.rb +lib/composio/api/apps_api.rb \ No newline at end of file diff --git a/ruby/README.md b/ruby/README.md index b7140f8..0129941 100644 --- a/ruby/README.md +++ b/ruby/README.md @@ -25,10 +25,16 @@ Composio SDK: Equip your agent with high-quality tools and build your real-world * [`composio.actions.execute`](#composioactionsexecute) * [`composio.actions.execute_action_proxy`](#composioactionsexecute_action_proxy) * [`composio.actions.get_action_by_id`](#composioactionsget_action_by_id) + * [`composio.actions.get_action_inputs`](#composioactionsget_action_inputs) * [`composio.actions.get_all_actions_based_on_query`](#composioactionsget_all_actions_based_on_query) + * [`composio.analytics.get`](#composioanalyticsget) + * [`composio.analytics.get_top_entities`](#composioanalyticsget_top_entities) + * [`composio.apps.delete_open_api_spec_tool`](#composioappsdelete_open_api_spec_tool) * [`composio.apps.get_details`](#composioappsget_details) + * [`composio.apps.get_open_api_spec_status`](#composioappsget_open_api_spec_status) * [`composio.apps.list`](#composioappslist) * [`composio.apps.list_open_api_specs`](#composioappslist_open_api_specs) + * [`composio.apps.send_email_to_client`](#composioappssend_email_to_client) * [`composio.auth.identify_client_operation`](#composioauthidentify_client_operation) * [`composio.connections.delete`](#composioconnectionsdelete) * [`composio.connections.disable`](#composioconnectionsdisable) @@ -36,12 +42,23 @@ Composio SDK: Equip your agent with high-quality tools and build your real-world * [`composio.connections.get`](#composioconnectionsget) * [`composio.connections.initiate`](#composioconnectionsinitiate) * [`composio.connections.list`](#composioconnectionslist) + * [`composio.event_logs.get_events`](#composioevent_logsget_events) + * [`composio.event_logs.get_webhook`](#composioevent_logsget_webhook) + * [`composio.event_logs.get_webhook_secret`](#composioevent_logsget_webhook_secret) + * [`composio.event_logs.refresh_webhook_secret`](#composioevent_logsrefresh_webhook_secret) + * [`composio.event_logs.update_webhook`](#composioevent_logsupdate_webhook) * [`composio.integrations.create_integration`](#composiointegrationscreate_integration) * [`composio.integrations.delete_connector`](#composiointegrationsdelete_connector) * [`composio.integrations.get_connector_info`](#composiointegrationsget_connector_info) * [`composio.integrations.list_global_connectors`](#composiointegrationslist_global_connectors) * [`composio.integrations.update_integration`](#composiointegrationsupdate_integration) + * [`composio.logs.add_new_logs`](#composiologsadd_new_logs) * [`composio.logs.list`](#composiologslist) + * [`composio.payment.create_checkout_session`](#composiopaymentcreate_checkout_session) + * [`composio.payment.get_checkout_session_status`](#composiopaymentget_checkout_session_status) + * [`composio.payment.get_invoice`](#composiopaymentget_invoice) + * [`composio.payment.get_invoices`](#composiopaymentget_invoices) + * [`composio.payment.handle_stripe_webhook`](#composiopaymenthandle_stripe_webhook) * [`composio.triggers.delete_trigger_instance`](#composiotriggersdelete_trigger_instance) * [`composio.triggers.disable_trigger_instance`](#composiotriggersdisable_trigger_instance) * [`composio.triggers.enable`](#composiotriggersenable) @@ -278,6 +295,33 @@ p result --- +### `composio.actions.get_action_inputs` + +Get the inputs for an action with NLA + +#### 🛠️ Usage + +```ruby +result = composio.actions.get_action_inputs( + text: "string_example", + action_id: "'+j>6", +) +p result +``` + +#### ⚙️ Parameters + +##### text: `String` +##### action_id: `String` +#### 🌐 Endpoint + +`/api/v2/actions/{actionId}/execute/get.inputs` `POST` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + ### `composio.actions.get_all_actions_based_on_query` Retrieve a list of all actions based on query parameters. @@ -325,6 +369,89 @@ p result --- +### `composio.analytics.get` + +Get analytics + +#### 🛠️ Usage + +```ruby +result = composio.analytics.get( + last_time_period: "DAY", +) +p result +``` + +#### ⚙️ Parameters + +##### last_time_period: `String` +#### 🔄 Return + +[AnalyticsDataResDTO](./lib/composio/models/analytics_data_res_dto.rb) + +#### 🌐 Endpoint + +`/api/v1/analytics` `GET` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + +### `composio.analytics.get_top_entities` + +Get top entities + +#### 🛠️ Usage + +```ruby +result = composio.analytics.get_top_entities( + query: "string_example", +) +p result +``` + +#### ⚙️ Parameters + +##### query: `String` +#### 🔄 Return + +[TopEntitiesResDTO](./lib/composio/models/top_entities_res_dto.rb) + +#### 🌐 Endpoint + +`/api/v1/analytics/entities` `GET` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + +### `composio.apps.delete_open_api_spec_tool` + +Delete open api spec tool + +#### 🛠️ Usage + +```ruby +result = composio.apps.delete_open_api_spec_tool( + id: "'+j>6", +) +p result +``` + +#### ⚙️ Parameters + +##### id: `String` +#### 🌐 Endpoint + +`/api/v1/apps/openapi/spec/delete/{id}` `DELETE` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + ### `composio.apps.get_details` Get app details @@ -354,6 +481,31 @@ p result --- +### `composio.apps.get_open_api_spec_status` + +Get open api spec status + +#### 🛠️ Usage + +```ruby +result = composio.apps.get_open_api_spec_status( + id: "'+j>6", +) +p result +``` + +#### ⚙️ Parameters + +##### id: `String` +#### 🌐 Endpoint + +`/api/v1/apps/openapi/spec/status/{id}` `GET` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + ### `composio.apps.list` Retrieve a list of all applications based on query parameters. @@ -409,6 +561,32 @@ p result --- +### `composio.apps.send_email_to_client` + +Send email to client + +#### 🛠️ Usage + +```ruby +result = composio.apps.send_email_to_client( + admin_token: "string_example", + body: None, +) +p result +``` + +#### ⚙️ Parameters + +##### admin_token: `String` +#### 🌐 Endpoint + +`/api/v1/apps/openapi/send_email_to_client` `POST` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + ### `composio.auth.identify_client_operation` Identify client @@ -640,6 +818,120 @@ p result --- +### `composio.event_logs.get_events` + +Fetch events from database + +#### 🛠️ Usage + +```ruby +result = composio.event_logs.get_events( + start_time: "0480-02-18T20:01:32F21798096225500850762068629339333975650685", + end_time: "0480-02-18T20:01:32F21798096225500850762068629339333975650685", +) +p result +``` + +#### ⚙️ Parameters + +##### start_time: `String` +##### end_time: `String` +#### 🌐 Endpoint + +`/api/v1/event_logs/get/events` `GET` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + +### `composio.event_logs.get_webhook` + +Get webhook + +#### 🛠️ Usage + +```ruby +result = composio.event_logs.get_webhook +p result +``` + +#### 🌐 Endpoint + +`/api/v1/event_logs/get/webhook` `GET` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + +### `composio.event_logs.get_webhook_secret` + +Get webhook secret + +#### 🛠️ Usage + +```ruby +result = composio.event_logs.get_webhook_secret +p result +``` + +#### 🌐 Endpoint + +`/api/v1/event_logs/webhook/secret/get` `GET` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + +### `composio.event_logs.refresh_webhook_secret` + +Refresh webhook + +#### 🛠️ Usage + +```ruby +result = composio.event_logs.refresh_webhook_secret +p result +``` + +#### 🌐 Endpoint + +`/api/v1/event_logs/webhook/secret/refresh` `POST` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + +### `composio.event_logs.update_webhook` + +Update webhook + +#### 🛠️ Usage + +```ruby +result = composio.event_logs.update_webhook( + event_webhook_url: "string_example", +) +p result +``` + +#### ⚙️ Parameters + +##### eventWebhookURL: `String` +Event Webhook URL + +#### 🌐 Endpoint + +`/api/v1/event_logs/set/webhook` `POST` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + ### `composio.integrations.create_integration` Create connector @@ -807,6 +1099,55 @@ Flag to indicate if the connector is enabled --- +### `composio.logs.add_new_logs` + +Add new logs + +#### 🛠️ Usage + +```ruby +result = composio.logs.add_new_logs( + provider_name: "string_example", + action_name: "string_example", + request: {}, + response: {}, + is_error: true, + connection_id: "string_example", + entity_id: "string_example", +) +p result +``` + +#### ⚙️ Parameters + +##### providerName: `String` +Provider name of the log + +##### actionName: `String` +Action name of the log + +##### request: `Object` +##### response: `Object` +##### isError: `Boolean` +##### connectionId: `String` +Connection ID of the log + +##### entityId: `String` +Entity ID of the log + +#### 🔄 Return + +[IngestDataResponseDTO](./lib/composio/models/ingest_data_response_dto.rb) + +#### 🌐 Endpoint + +`/api/v1/logs` `POST` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + ### `composio.logs.list` List logs @@ -823,7 +1164,7 @@ result = composio.logs.list( entity_id: "string_example", limit: 10, cursor: "string_example", - connection_id: "string_example", + logs_type: "string_example", ) p result ``` @@ -838,7 +1179,7 @@ p result ##### entity_id: `String` ##### limit: `Float` ##### cursor: `String` -##### connection_id: `String` +##### logs_type: `String` #### 🔄 Return [LogsResDTO](./lib/composio/models/logs_res_dto.rb) @@ -852,6 +1193,123 @@ p result --- +### `composio.payment.create_checkout_session` + +Create checkout session + +#### 🛠️ Usage + +```ruby +result = composio.payment.create_checkout_session( + plan: "HOBBY", +) +p result +``` + +#### ⚙️ Parameters + +##### plan: [`Plan`](./lib/composio/models/plan.rb) +#### 🌐 Endpoint + +`/api/v1/payment/create-checkout-session` `POST` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + +### `composio.payment.get_checkout_session_status` + +Get checkout session status + +#### 🛠️ Usage + +```ruby +result = composio.payment.get_checkout_session_status( + session_id: "'+j>6", +) +p result +``` + +#### ⚙️ Parameters + +##### session_id: `String` +#### 🌐 Endpoint + +`/api/v1/payment/checkout-session/{sessionId}/status` `GET` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + +### `composio.payment.get_invoice` + +Get invoice + +#### 🛠️ Usage + +```ruby +result = composio.payment.get_invoice( + invoice_id: "'+j>6", +) +p result +``` + +#### ⚙️ Parameters + +##### invoice_id: `String` +#### 🌐 Endpoint + +`/api/v1/payment/invoices/{invoiceId}` `GET` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + +### `composio.payment.get_invoices` + +Get invoices + +#### 🛠️ Usage + +```ruby +result = composio.payment.get_invoices +p result +``` + +#### 🌐 Endpoint + +`/api/v1/payment/invoices` `GET` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + +### `composio.payment.handle_stripe_webhook` + +Handle stripe webhook + +#### 🛠️ Usage + +```ruby +result = composio.payment.handle_stripe_webhook( + body: None, +) +p result +``` + +#### 🌐 Endpoint + +`/api/v1/payment/webhook` `POST` + +[🔙 **Back to Table of Contents**](#table-of-contents) + +--- + + ### `composio.triggers.delete_trigger_instance` Deletes a specified trigger instance. diff --git a/ruby/lib/composio.rb b/ruby/lib/composio.rb index 8dbba3b..bfd6f3b 100644 --- a/ruby/lib/composio.rb +++ b/ruby/lib/composio.rb @@ -16,10 +16,14 @@ # Models require 'composio/models/api_key_res_dto' +require 'composio/models/action_analytics_dto' +require 'composio/models/action_by_app_dto' +require 'composio/models/action_by_status_dto' require 'composio/models/action_details' require 'composio/models/action_details_minimal' require 'composio/models/action_execution_req_dto' require 'composio/models/action_execution_res_dto' +require 'composio/models/action_get_nla_inputs_req_dto' require 'composio/models/action_log_data' require 'composio/models/action_metadata' require 'composio/models/action_metadata_type' @@ -33,20 +37,25 @@ require 'composio/models/add_repo_url_res_dto' require 'composio/models/add_tools_req_dto' require 'composio/models/add_tools_request_dto' +require 'composio/models/analytics_data_req_dto' +require 'composio/models/analytics_data_res_dto' +require 'composio/models/analytics_entity_data_dto' require 'composio/models/app_info_response_dto' require 'composio/models/app_list_res_dto' +require 'composio/models/app_name_count_dto' require 'composio/models/app_query_dto' require 'composio/models/auth_config_dto' require 'composio/models/cli_query_dto' +require 'composio/models/client_unique_user_id_count_dto' require 'composio/models/connected_account_response_dto' require 'composio/models/connection_params' require 'composio/models/connection_params_for_account' require 'composio/models/connection_params_headers' require 'composio/models/connection_with_app_data' -require 'composio/models/connection_with_app_data_created_at' require 'composio/models/connector_list_item_dto' require 'composio/models/connector_list_item_dto_created_at' require 'composio/models/connector_list_item_dto_updated_at' +require 'composio/models/create_checkout_session_req_dto' require 'composio/models/create_connector_payload_dto' require 'composio/models/create_connector_payload_dto_use_composio_auth' require 'composio/models/delete_api_key_req_dto' @@ -57,7 +66,9 @@ require 'composio/models/direct_execute_req_dto' require 'composio/models/enable_trigger_body_dto' require 'composio/models/enable_trigger_params_dto' +require 'composio/models/entity_query_req_dto' require 'composio/models/execute_action_res_dto' +require 'composio/models/fetch_query_dto' require 'composio/models/generate_api_key_req_dto' require 'composio/models/generate_cli_session_req_dto' require 'composio/models/generate_cli_session_res_dto' @@ -69,6 +80,7 @@ require 'composio/models/get_connector_info_res_dto' require 'composio/models/get_connector_list_res_dto' require 'composio/models/get_logs_dto' +require 'composio/models/get_logs_dto_status' require 'composio/models/get_logs_query_dto' require 'composio/models/get_trigger_params_dto' require 'composio/models/get_trigger_response_dto' @@ -76,16 +88,22 @@ require 'composio/models/handle_trigger_params_dto' require 'composio/models/identify_client_req_dto' require 'composio/models/identify_client_res_dto' +require 'composio/models/ingest_data_dto' +require 'composio/models/ingest_data_response_dto' require 'composio/models/initiate_connection_payload_dto' require 'composio/models/initiate_connection_response' +require 'composio/models/integrations_with_counts_dto' require 'composio/models/invite_member_req_dto' -require 'composio/models/job_status' +require 'composio/models/last_time_period' require 'composio/models/list_triggers_query_dto' require 'composio/models/logout_res_dto' require 'composio/models/logs_res_dto' require 'composio/models/magic_link_req_dto' require 'composio/models/magic_link_res_dto' +require 'composio/models/member_info_res_dto' +require 'composio/models/member_info_res_dto_created_at' require 'composio/models/member_res_dto' +require 'composio/models/member_res_dto_role' require 'composio/models/meta' require 'composio/models/meta_app' require 'composio/models/metadata_query_dto' @@ -96,18 +114,24 @@ require 'composio/models/page_info_dto' require 'composio/models/patch_connector_req_dto' require 'composio/models/patch_connector_res_dto' +require 'composio/models/plan' require 'composio/models/proxy_execution_req_dto' require 'composio/models/redirect_uri_dto' +require 'composio/models/role' require 'composio/models/set_callback_url_body_dto' require 'composio/models/single_app_info_res_dto' require 'composio/models/single_trigger_res_dto' +require 'composio/models/state' require 'composio/models/status' require 'composio/models/switch_trigger_status_body_dto' require 'composio/models/switch_trigger_status_params_dto' +require 'composio/models/t_connection_count_dto' require 'composio/models/time' +require 'composio/models/time_period_req_dto' require 'composio/models/toggle_connected_account_response_dto' require 'composio/models/toggle_trigger_state_response_dto' require 'composio/models/tools_execute_req_dto' +require 'composio/models/top_entities_res_dto' require 'composio/models/track_client_req_dto' require 'composio/models/track_client_res_dto' require 'composio/models/trigger_config' @@ -124,21 +148,28 @@ require 'composio/models/triggers_enabled_toggle_req_dto' require 'composio/models/triggers_enabled_toggle_res_dto' require 'composio/models/type' +require 'composio/models/update_member_req_dto' +require 'composio/models/update_member_req_dto_role' require 'composio/models/user_git_user_info' require 'composio/models/verify_cli_code_res_dto' require 'composio/models/verify_magic_link_data_dto' require 'composio/models/verify_magic_link_req_dto' require 'composio/models/verify_magic_link_res_dto' +require 'composio/models/webhook_req_dto' +require 'composio/models/webhook_secret_res_dto' require 'composio/models/webhook_url_response_dto' # APIs require 'composio/api/api_keys_api' require 'composio/api/actions_api' +require 'composio/api/analytics_api' require 'composio/api/apps_api' require 'composio/api/auth_api' require 'composio/api/connections_api' +require 'composio/api/event_logs_api' require 'composio/api/integrations_api' require 'composio/api/logs_api' +require 'composio/api/payment_api' require 'composio/api/triggers_api' module Composio @@ -183,22 +214,28 @@ def configure class Client attr_reader :api_keys attr_reader :actions + attr_reader :analytics attr_reader :apps attr_reader :auth attr_reader :connections + attr_reader :event_logs attr_reader :integrations attr_reader :logs + attr_reader :payment attr_reader :triggers def initialize(config = Configuration.default) @api_client = ApiClient::new(config) @api_keys = Composio::APIKeysApi.new(@api_client) @actions = Composio::ActionsApi.new(@api_client) + @analytics = Composio::AnalyticsApi.new(@api_client) @apps = Composio::AppsApi.new(@api_client) @auth = Composio::AuthApi.new(@api_client) @connections = Composio::ConnectionsApi.new(@api_client) + @event_logs = Composio::EventLogsApi.new(@api_client) @integrations = Composio::IntegrationsApi.new(@api_client) @logs = Composio::LogsApi.new(@api_client) + @payment = Composio::PaymentApi.new(@api_client) @triggers = Composio::TriggersApi.new(@api_client) end end diff --git a/ruby/lib/composio/api/actions_api.rb b/ruby/lib/composio/api/actions_api.rb index 5e2568f..09179ce 100644 --- a/ruby/lib/composio/api/actions_api.rb +++ b/ruby/lib/composio/api/actions_api.rb @@ -328,6 +328,113 @@ def get_action_by_id_with_http_info(action_id:, extra: {}) end + # Get action inputs + # + # Get the inputs for an action with NLA + # + # @param text [String] + # @param action_id [String] + # @param body [ActionGetNLAInputsReqDTO] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_action_inputs(text:, action_id:, extra: {}) + _body = {} + _body[:text] = text if text != SENTINEL + extra[:action_get_nla_inputs_req_dto] = _body if !_body.empty? + api_response = get_action_inputs_with_http_info_impl(action_id, extra) + api_response.data + end + + # Get action inputs + # + # Get the inputs for an action with NLA + # + # @param text [String] + # @param action_id [String] + # @param body [ActionGetNLAInputsReqDTO] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_action_inputs_with_http_info(text:, action_id:, extra: {}) + _body = {} + _body[:text] = text if text != SENTINEL + extra[:action_get_nla_inputs_req_dto] = _body if !_body.empty? + get_action_inputs_with_http_info_impl(action_id, extra) + end + + # Get action inputs + # Get the inputs for an action with NLA + # @param action_id [String] + # @param [Hash] opts the optional parameters + # @option opts [ActionGetNLAInputsReqDTO] :action_get_nla_inputs_req_dto ActionGetNLAInputsReqDTO + # @return [Object] + private def get_action_inputs_impl(action_id, opts = {}) + data, _status_code, _headers = get_action_inputs_with_http_info(action_id, opts) + data + end + + # Get action inputs + # Get the inputs for an action with NLA + # @param action_id [String] + # @param [Hash] opts the optional parameters + # @option opts [ActionGetNLAInputsReqDTO] :action_get_nla_inputs_req_dto ActionGetNLAInputsReqDTO + # @return [APIResponse] data is Object, status code, headers and response + private def get_action_inputs_with_http_info_impl(action_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsApi.get_action_inputs ...' + end + # verify the required parameter 'action_id' is set + if @api_client.config.client_side_validation && action_id.nil? + fail ArgumentError, "Missing the required parameter 'action_id' when calling ActionsApi.get_action_inputs" + end + pattern = Regexp.new(/[^\/#\?]+?/) + if @api_client.config.client_side_validation && action_id !~ pattern + fail ArgumentError, "invalid value for 'action_id' when calling ActionsApi.get_action_inputs, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/api/v2/actions/{actionId}/execute/get.inputs'.sub('{' + 'actionId' + '}', CGI.escape(action_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'action_get_nla_inputs_req_dto']) + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"ActionsApi.get_action_inputs", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionsApi#get_action_inputs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + # List actions minimal # # Retrieve a list of all actions based on query parameters. diff --git a/ruby/lib/composio/api/analytics_api.rb b/ruby/lib/composio/api/analytics_api.rb new file mode 100644 index 0000000..04322ba --- /dev/null +++ b/ruby/lib/composio/api/analytics_api.rb @@ -0,0 +1,181 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'cgi' + +module Composio + class AnalyticsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + + # Get analytics + # + # @param last_time_period [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get(last_time_period: SENTINEL, extra: {}) + extra[:last_time_period] = last_time_period if last_time_period != SENTINEL + api_response = get_with_http_info_impl(extra) + api_response.data + end + + # Get analytics + # + # @param last_time_period [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_with_http_info(last_time_period: SENTINEL, extra: {}) + extra[:last_time_period] = last_time_period if last_time_period != SENTINEL + get_with_http_info_impl(extra) + end + + # Get analytics + # @param [Hash] opts the optional parameters + # @option opts [String] :last_time_period + # @return [AnalyticsDataResDTO] + private def get_impl(opts = {}) + data, _status_code, _headers = get_with_http_info(opts) + data + end + + # Get analytics + # @param [Hash] opts the optional parameters + # @option opts [String] :last_time_period + # @return [APIResponse] data is AnalyticsDataResDTO, status code, headers and response + private def get_with_http_info_impl(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AnalyticsApi.get ...' + end + allowable_values = ["DAY", "WEEK", "MONTH", "SIX_MONTH", "YEAR", "FIVE_YEAR"] + if @api_client.config.client_side_validation && opts[:'last_time_period'] && !allowable_values.include?(opts[:'last_time_period']) + fail ArgumentError, "invalid value for \"last_time_period\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/api/v1/analytics' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'lastTimePeriod'] = opts[:'last_time_period'] if !opts[:'last_time_period'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'AnalyticsDataResDTO' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"AnalyticsApi.get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AnalyticsApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + + # Get top entities + # + # @param query [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_top_entities(query: SENTINEL, extra: {}) + extra[:query] = query if query != SENTINEL + api_response = get_top_entities_with_http_info_impl(extra) + api_response.data + end + + # Get top entities + # + # @param query [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_top_entities_with_http_info(query: SENTINEL, extra: {}) + extra[:query] = query if query != SENTINEL + get_top_entities_with_http_info_impl(extra) + end + + # Get top entities + # @param [Hash] opts the optional parameters + # @option opts [String] :query + # @return [TopEntitiesResDTO] + private def get_top_entities_impl(opts = {}) + data, _status_code, _headers = get_top_entities_with_http_info(opts) + data + end + + # Get top entities + # @param [Hash] opts the optional parameters + # @option opts [String] :query + # @return [APIResponse] data is TopEntitiesResDTO, status code, headers and response + private def get_top_entities_with_http_info_impl(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AnalyticsApi.get_top_entities ...' + end + # resource path + local_var_path = '/api/v1/analytics/entities' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TopEntitiesResDTO' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"AnalyticsApi.get_top_entities", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AnalyticsApi#get_top_entities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + end + + # top-level client access to avoid having the user to insantiate their own API instances + Analytics = AnalyticsApi::new +end diff --git a/ruby/lib/composio/api/apps_api.rb b/ruby/lib/composio/api/apps_api.rb index 59706eb..9a0f1fc 100644 --- a/ruby/lib/composio/api/apps_api.rb +++ b/ruby/lib/composio/api/apps_api.rb @@ -16,6 +16,90 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end + # Delete open api spec tool + # + # @param id [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def delete_open_api_spec_tool(id:, extra: {}) + api_response = delete_open_api_spec_tool_with_http_info_impl(id, extra) + api_response.data + end + + # Delete open api spec tool + # + # @param id [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def delete_open_api_spec_tool_with_http_info(id:, extra: {}) + delete_open_api_spec_tool_with_http_info_impl(id, extra) + end + + # Delete open api spec tool + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [Object] + private def delete_open_api_spec_tool_impl(id, opts = {}) + data, _status_code, _headers = delete_open_api_spec_tool_with_http_info(id, opts) + data + end + + # Delete open api spec tool + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [APIResponse] data is Object, status code, headers and response + private def delete_open_api_spec_tool_with_http_info_impl(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AppsApi.delete_open_api_spec_tool ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling AppsApi.delete_open_api_spec_tool" + end + pattern = Regexp.new(/[^\/#\?]+?/) + if @api_client.config.client_side_validation && id !~ pattern + fail ArgumentError, "invalid value for 'id' when calling AppsApi.delete_open_api_spec_tool, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/api/v1/apps/openapi/spec/delete/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"AppsApi.delete_open_api_spec_tool", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AppsApi#delete_open_api_spec_tool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + # Get app # # Get app details @@ -106,6 +190,90 @@ def get_details_with_http_info(app_name:, extra: {}) end + # Get open api spec status + # + # @param id [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_open_api_spec_status(id:, extra: {}) + api_response = get_open_api_spec_status_with_http_info_impl(id, extra) + api_response.data + end + + # Get open api spec status + # + # @param id [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_open_api_spec_status_with_http_info(id:, extra: {}) + get_open_api_spec_status_with_http_info_impl(id, extra) + end + + # Get open api spec status + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [Object] + private def get_open_api_spec_status_impl(id, opts = {}) + data, _status_code, _headers = get_open_api_spec_status_with_http_info(id, opts) + data + end + + # Get open api spec status + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [APIResponse] data is Object, status code, headers and response + private def get_open_api_spec_status_with_http_info_impl(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AppsApi.get_open_api_spec_status ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling AppsApi.get_open_api_spec_status" + end + pattern = Regexp.new(/[^\/#\?]+?/) + if @api_client.config.client_side_validation && id !~ pattern + fail ArgumentError, "invalid value for 'id' when calling AppsApi.get_open_api_spec_status, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/api/v1/apps/openapi/spec/status/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"AppsApi.get_open_api_spec_status", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AppsApi#get_open_api_spec_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + # Get apps # # Retrieve a list of all applications based on query parameters. @@ -266,6 +434,95 @@ def list_open_api_specs_with_http_info(extra: {}) end APIResponse::new(data, status_code, headers, response) end + + + # Send email to client + # + # @param admin_token [String] + # @param body [Object] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def send_email_to_client(admin_token: SENTINEL, body: SENTINEL, extra: {}) + extra[:body] = body if body != SENTINEL + extra[:admin_token] = admin_token if admin_token != SENTINEL + api_response = send_email_to_client_with_http_info_impl(extra) + api_response.data + end + + # Send email to client + # + # @param admin_token [String] + # @param body [Object] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def send_email_to_client_with_http_info(admin_token: SENTINEL, body: SENTINEL, extra: {}) + extra[:body] = body if body != SENTINEL + extra[:admin_token] = admin_token if admin_token != SENTINEL + send_email_to_client_with_http_info_impl(extra) + end + + # Send email to client + # @param [Hash] opts the optional parameters + # @option opts [String] :admin_token + # @option opts [Object] :body + # @return [Object] + private def send_email_to_client_impl(opts = {}) + data, _status_code, _headers = send_email_to_client_with_http_info(opts) + data + end + + # Send email to client + # @param [Hash] opts the optional parameters + # @option opts [String] :admin_token + # @option opts [Object] :body + # @return [APIResponse] data is Object, status code, headers and response + private def send_email_to_client_with_http_info_impl(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AppsApi.send_email_to_client ...' + end + # resource path + local_var_path = '/api/v1/apps/openapi/send_email_to_client' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'adminToken'] = opts[:'admin_token'] if !opts[:'admin_token'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"AppsApi.send_email_to_client", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AppsApi#send_email_to_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end end # top-level client access to avoid having the user to insantiate their own API instances diff --git a/ruby/lib/composio/api/event_logs_api.rb b/ruby/lib/composio/api/event_logs_api.rb new file mode 100644 index 0000000..f0496bb --- /dev/null +++ b/ruby/lib/composio/api/event_logs_api.rb @@ -0,0 +1,427 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'cgi' + +module Composio + class EventLogsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + + # Get events + # + # Fetch events from database + # + # @param start_time [String] + # @param end_time [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_events(start_time:, end_time:, extra: {}) + api_response = get_events_with_http_info_impl(start_time, end_time, extra) + api_response.data + end + + # Get events + # + # Fetch events from database + # + # @param start_time [String] + # @param end_time [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_events_with_http_info(start_time:, end_time:, extra: {}) + get_events_with_http_info_impl(start_time, end_time, extra) + end + + # Get events + # Fetch events from database + # @param start_time [String] + # @param end_time [String] + # @param [Hash] opts the optional parameters + # @return [Object] + private def get_events_impl(start_time, end_time, opts = {}) + data, _status_code, _headers = get_events_with_http_info(start_time, end_time, opts) + data + end + + # Get events + # Fetch events from database + # @param start_time [String] + # @param end_time [String] + # @param [Hash] opts the optional parameters + # @return [APIResponse] data is Object, status code, headers and response + private def get_events_with_http_info_impl(start_time, end_time, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EventLogsApi.get_events ...' + end + # verify the required parameter 'start_time' is set + if @api_client.config.client_side_validation && start_time.nil? + fail ArgumentError, "Missing the required parameter 'start_time' when calling EventLogsApi.get_events" + end + pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + if @api_client.config.client_side_validation && start_time !~ pattern + fail ArgumentError, "invalid value for 'start_time' when calling EventLogsApi.get_events, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'end_time' is set + if @api_client.config.client_side_validation && end_time.nil? + fail ArgumentError, "Missing the required parameter 'end_time' when calling EventLogsApi.get_events" + end + pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + if @api_client.config.client_side_validation && end_time !~ pattern + fail ArgumentError, "invalid value for 'end_time' when calling EventLogsApi.get_events, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/api/v1/event_logs/get/events' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'startTime'] = start_time + query_params[:'endTime'] = end_time + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"EventLogsApi.get_events", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: EventLogsApi#get_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + + # Get webhook + # + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_webhook(extra: {}) + api_response = get_webhook_with_http_info_impl(extra) + api_response.data + end + + # Get webhook + # + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_webhook_with_http_info(extra: {}) + get_webhook_with_http_info_impl(extra) + end + + # Get webhook + # @param [Hash] opts the optional parameters + # @return [Object] + private def get_webhook_impl(opts = {}) + data, _status_code, _headers = get_webhook_with_http_info(opts) + data + end + + # Get webhook + # @param [Hash] opts the optional parameters + # @return [APIResponse] data is Object, status code, headers and response + private def get_webhook_with_http_info_impl(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EventLogsApi.get_webhook ...' + end + # resource path + local_var_path = '/api/v1/event_logs/get/webhook' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"EventLogsApi.get_webhook", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: EventLogsApi#get_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + + # Get webhook secret + # + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_webhook_secret(extra: {}) + api_response = get_webhook_secret_with_http_info_impl(extra) + api_response.data + end + + # Get webhook secret + # + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_webhook_secret_with_http_info(extra: {}) + get_webhook_secret_with_http_info_impl(extra) + end + + # Get webhook secret + # @param [Hash] opts the optional parameters + # @return [Object] + private def get_webhook_secret_impl(opts = {}) + data, _status_code, _headers = get_webhook_secret_with_http_info(opts) + data + end + + # Get webhook secret + # @param [Hash] opts the optional parameters + # @return [APIResponse] data is Object, status code, headers and response + private def get_webhook_secret_with_http_info_impl(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EventLogsApi.get_webhook_secret ...' + end + # resource path + local_var_path = '/api/v1/event_logs/webhook/secret/get' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"EventLogsApi.get_webhook_secret", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: EventLogsApi#get_webhook_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + + # Refresh webhook + # + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def refresh_webhook_secret(extra: {}) + api_response = refresh_webhook_secret_with_http_info_impl(extra) + api_response.data + end + + # Refresh webhook + # + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def refresh_webhook_secret_with_http_info(extra: {}) + refresh_webhook_secret_with_http_info_impl(extra) + end + + # Refresh webhook + # @param [Hash] opts the optional parameters + # @return [Object] + private def refresh_webhook_secret_impl(opts = {}) + data, _status_code, _headers = refresh_webhook_secret_with_http_info(opts) + data + end + + # Refresh webhook + # @param [Hash] opts the optional parameters + # @return [APIResponse] data is Object, status code, headers and response + private def refresh_webhook_secret_with_http_info_impl(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EventLogsApi.refresh_webhook_secret ...' + end + # resource path + local_var_path = '/api/v1/event_logs/webhook/secret/refresh' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"EventLogsApi.refresh_webhook_secret", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: EventLogsApi#refresh_webhook_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + + # Update webhook + # + # @param event_webhook_url [String] Event Webhook URL + # @param body [WebhookReqDTO] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def update_webhook(event_webhook_url:, extra: {}) + _body = {} + _body[:eventWebhookURL] = event_webhook_url if event_webhook_url != SENTINEL + extra[:webhook_req_dto] = _body if !_body.empty? + api_response = update_webhook_with_http_info_impl(extra) + api_response.data + end + + # Update webhook + # + # @param event_webhook_url [String] Event Webhook URL + # @param body [WebhookReqDTO] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def update_webhook_with_http_info(event_webhook_url:, extra: {}) + _body = {} + _body[:eventWebhookURL] = event_webhook_url if event_webhook_url != SENTINEL + extra[:webhook_req_dto] = _body if !_body.empty? + update_webhook_with_http_info_impl(extra) + end + + # Update webhook + # @param [Hash] opts the optional parameters + # @option opts [WebhookReqDTO] :webhook_req_dto WebhookReqDTO + # @return [Object] + private def update_webhook_impl(opts = {}) + data, _status_code, _headers = update_webhook_with_http_info(opts) + data + end + + # Update webhook + # @param [Hash] opts the optional parameters + # @option opts [WebhookReqDTO] :webhook_req_dto WebhookReqDTO + # @return [APIResponse] data is Object, status code, headers and response + private def update_webhook_with_http_info_impl(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: EventLogsApi.update_webhook ...' + end + # resource path + local_var_path = '/api/v1/event_logs/set/webhook' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'webhook_req_dto']) + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"EventLogsApi.update_webhook", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: EventLogsApi#update_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + end + + # top-level client access to avoid having the user to insantiate their own API instances + EventLogs = EventLogsApi::new +end diff --git a/ruby/lib/composio/api/logs_api.rb b/ruby/lib/composio/api/logs_api.rb index 035aa3e..dd2fdb3 100644 --- a/ruby/lib/composio/api/logs_api.rb +++ b/ruby/lib/composio/api/logs_api.rb @@ -16,6 +16,124 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end + # Post logs + # + # Add new logs + # + # @param provider_name [String] Provider name of the log + # @param action_name [String] Action name of the log + # @param request [Object] + # @param response [Object] + # @param is_error [Boolean] + # @param connection_id [String] Connection ID of the log + # @param entity_id [String] Entity ID of the log + # @param body [IngestDataDTO] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def add_new_logs(provider_name:, action_name:, request:, response:, is_error:, connection_id: SENTINEL, entity_id: SENTINEL, extra: {}) + _body = {} + _body[:connectionId] = connection_id if connection_id != SENTINEL + _body[:entityId] = entity_id if entity_id != SENTINEL + _body[:providerName] = provider_name if provider_name != SENTINEL + _body[:actionName] = action_name if action_name != SENTINEL + _body[:request] = request if request != SENTINEL + _body[:response] = response if response != SENTINEL + _body[:isError] = is_error if is_error != SENTINEL + extra[:ingest_data_dto] = _body if !_body.empty? + api_response = add_new_logs_with_http_info_impl(extra) + api_response.data + end + + # Post logs + # + # Add new logs + # + # @param provider_name [String] Provider name of the log + # @param action_name [String] Action name of the log + # @param request [Object] + # @param response [Object] + # @param is_error [Boolean] + # @param connection_id [String] Connection ID of the log + # @param entity_id [String] Entity ID of the log + # @param body [IngestDataDTO] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def add_new_logs_with_http_info(provider_name:, action_name:, request:, response:, is_error:, connection_id: SENTINEL, entity_id: SENTINEL, extra: {}) + _body = {} + _body[:connectionId] = connection_id if connection_id != SENTINEL + _body[:entityId] = entity_id if entity_id != SENTINEL + _body[:providerName] = provider_name if provider_name != SENTINEL + _body[:actionName] = action_name if action_name != SENTINEL + _body[:request] = request if request != SENTINEL + _body[:response] = response if response != SENTINEL + _body[:isError] = is_error if is_error != SENTINEL + extra[:ingest_data_dto] = _body if !_body.empty? + add_new_logs_with_http_info_impl(extra) + end + + # Post logs + # Add new logs + # @param [Hash] opts the optional parameters + # @option opts [IngestDataDTO] :ingest_data_dto IngestDataDTO + # @return [IngestDataResponseDTO] + private def add_new_logs_impl(opts = {}) + data, _status_code, _headers = add_new_logs_with_http_info(opts) + data + end + + # Post logs + # Add new logs + # @param [Hash] opts the optional parameters + # @option opts [IngestDataDTO] :ingest_data_dto IngestDataDTO + # @return [APIResponse] data is IngestDataResponseDTO, status code, headers and response + private def add_new_logs_with_http_info_impl(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LogsApi.add_new_logs ...' + end + # resource path + local_var_path = '/api/v1/logs' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'ingest_data_dto']) + + # return_type + return_type = opts[:debug_return_type] || 'IngestDataResponseDTO' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"LogsApi.add_new_logs", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LogsApi#add_new_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + # Get logs # # List logs @@ -28,9 +146,9 @@ def initialize(api_client = ApiClient.default) # @param entity_id [String] # @param limit [Float] # @param cursor [String] - # @param connection_id [String] + # @param logs_type [String] # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name - def list(type: SENTINEL, time: SENTINEL, status: SENTINEL, search: SENTINEL, integration_id: SENTINEL, entity_id: SENTINEL, limit: 10, cursor: SENTINEL, connection_id: SENTINEL, extra: {}) + def list(type: SENTINEL, time: SENTINEL, status: SENTINEL, search: SENTINEL, integration_id: SENTINEL, entity_id: SENTINEL, limit: 10, cursor: SENTINEL, logs_type: SENTINEL, extra: {}) extra[:type] = type if type != SENTINEL extra[:time] = time if time != SENTINEL extra[:status] = status if status != SENTINEL @@ -39,7 +157,7 @@ def list(type: SENTINEL, time: SENTINEL, status: SENTINEL, search: SENTINEL, int extra[:entity_id] = entity_id if entity_id != SENTINEL extra[:limit] = limit if limit != SENTINEL extra[:cursor] = cursor if cursor != SENTINEL - extra[:connection_id] = connection_id if connection_id != SENTINEL + extra[:logs_type] = logs_type if logs_type != SENTINEL api_response = list_with_http_info_impl(extra) api_response.data end @@ -56,9 +174,9 @@ def list(type: SENTINEL, time: SENTINEL, status: SENTINEL, search: SENTINEL, int # @param entity_id [String] # @param limit [Float] # @param cursor [String] - # @param connection_id [String] + # @param logs_type [String] # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name - def list_with_http_info(type: SENTINEL, time: SENTINEL, status: SENTINEL, search: SENTINEL, integration_id: SENTINEL, entity_id: SENTINEL, limit: 10, cursor: SENTINEL, connection_id: SENTINEL, extra: {}) + def list_with_http_info(type: SENTINEL, time: SENTINEL, status: SENTINEL, search: SENTINEL, integration_id: SENTINEL, entity_id: SENTINEL, limit: 10, cursor: SENTINEL, logs_type: SENTINEL, extra: {}) extra[:type] = type if type != SENTINEL extra[:time] = time if time != SENTINEL extra[:status] = status if status != SENTINEL @@ -67,7 +185,7 @@ def list_with_http_info(type: SENTINEL, time: SENTINEL, status: SENTINEL, search extra[:entity_id] = entity_id if entity_id != SENTINEL extra[:limit] = limit if limit != SENTINEL extra[:cursor] = cursor if cursor != SENTINEL - extra[:connection_id] = connection_id if connection_id != SENTINEL + extra[:logs_type] = logs_type if logs_type != SENTINEL list_with_http_info_impl(extra) end @@ -82,7 +200,7 @@ def list_with_http_info(type: SENTINEL, time: SENTINEL, status: SENTINEL, search # @option opts [String] :entity_id # @option opts [Float] :limit (default to 10) # @option opts [String] :cursor - # @option opts [String] :connection_id + # @option opts [String] :logs_type # @return [LogsResDTO] private def list_impl(opts = {}) data, _status_code, _headers = list_with_http_info(opts) @@ -100,7 +218,7 @@ def list_with_http_info(type: SENTINEL, time: SENTINEL, status: SENTINEL, search # @option opts [String] :entity_id # @option opts [Float] :limit (default to 10) # @option opts [String] :cursor - # @option opts [String] :connection_id + # @option opts [String] :logs_type # @return [APIResponse] data is LogsResDTO, status code, headers and response private def list_with_http_info_impl(opts = {}) if @api_client.config.debugging @@ -131,7 +249,7 @@ def list_with_http_info(type: SENTINEL, time: SENTINEL, status: SENTINEL, search query_params[:'entityId'] = opts[:'entity_id'] if !opts[:'entity_id'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? - query_params[:'connectionId'] = opts[:'connection_id'] if !opts[:'connection_id'].nil? + query_params[:'logsType'] = opts[:'logs_type'] if !opts[:'logs_type'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/ruby/lib/composio/api/payment_api.rb b/ruby/lib/composio/api/payment_api.rb new file mode 100644 index 0000000..1c40f60 --- /dev/null +++ b/ruby/lib/composio/api/payment_api.rb @@ -0,0 +1,430 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'cgi' + +module Composio + class PaymentApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + + # Create checkout session + # + # @param plan [Plan] + # @param body [CreateCheckoutSessionReqDto] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def create_checkout_session(plan:, extra: {}) + _body = {} + _body[:plan] = plan if plan != SENTINEL + extra[:create_checkout_session_req_dto] = _body if !_body.empty? + api_response = create_checkout_session_with_http_info_impl(extra) + api_response.data + end + + # Create checkout session + # + # @param plan [Plan] + # @param body [CreateCheckoutSessionReqDto] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def create_checkout_session_with_http_info(plan:, extra: {}) + _body = {} + _body[:plan] = plan if plan != SENTINEL + extra[:create_checkout_session_req_dto] = _body if !_body.empty? + create_checkout_session_with_http_info_impl(extra) + end + + # Create checkout session + # @param [Hash] opts the optional parameters + # @option opts [CreateCheckoutSessionReqDto] :create_checkout_session_req_dto CreateCheckoutSessionReqDto + # @return [Object] + private def create_checkout_session_impl(opts = {}) + data, _status_code, _headers = create_checkout_session_with_http_info(opts) + data + end + + # Create checkout session + # @param [Hash] opts the optional parameters + # @option opts [CreateCheckoutSessionReqDto] :create_checkout_session_req_dto CreateCheckoutSessionReqDto + # @return [APIResponse] data is Object, status code, headers and response + private def create_checkout_session_with_http_info_impl(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PaymentApi.create_checkout_session ...' + end + # resource path + local_var_path = '/api/v1/payment/create-checkout-session' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_checkout_session_req_dto']) + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"PaymentApi.create_checkout_session", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PaymentApi#create_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + + # Get checkout session status + # + # @param session_id [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_checkout_session_status(session_id:, extra: {}) + api_response = get_checkout_session_status_with_http_info_impl(session_id, extra) + api_response.data + end + + # Get checkout session status + # + # @param session_id [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_checkout_session_status_with_http_info(session_id:, extra: {}) + get_checkout_session_status_with_http_info_impl(session_id, extra) + end + + # Get checkout session status + # @param session_id [String] + # @param [Hash] opts the optional parameters + # @return [Object] + private def get_checkout_session_status_impl(session_id, opts = {}) + data, _status_code, _headers = get_checkout_session_status_with_http_info(session_id, opts) + data + end + + # Get checkout session status + # @param session_id [String] + # @param [Hash] opts the optional parameters + # @return [APIResponse] data is Object, status code, headers and response + private def get_checkout_session_status_with_http_info_impl(session_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PaymentApi.get_checkout_session_status ...' + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling PaymentApi.get_checkout_session_status" + end + pattern = Regexp.new(/[^\/#\?]+?/) + if @api_client.config.client_side_validation && session_id !~ pattern + fail ArgumentError, "invalid value for 'session_id' when calling PaymentApi.get_checkout_session_status, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/api/v1/payment/checkout-session/{sessionId}/status'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"PaymentApi.get_checkout_session_status", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PaymentApi#get_checkout_session_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + + # Get invoice + # + # @param invoice_id [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_invoice(invoice_id:, extra: {}) + api_response = get_invoice_with_http_info_impl(invoice_id, extra) + api_response.data + end + + # Get invoice + # + # @param invoice_id [String] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_invoice_with_http_info(invoice_id:, extra: {}) + get_invoice_with_http_info_impl(invoice_id, extra) + end + + # Get invoice + # @param invoice_id [String] + # @param [Hash] opts the optional parameters + # @return [Object] + private def get_invoice_impl(invoice_id, opts = {}) + data, _status_code, _headers = get_invoice_with_http_info(invoice_id, opts) + data + end + + # Get invoice + # @param invoice_id [String] + # @param [Hash] opts the optional parameters + # @return [APIResponse] data is Object, status code, headers and response + private def get_invoice_with_http_info_impl(invoice_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PaymentApi.get_invoice ...' + end + # verify the required parameter 'invoice_id' is set + if @api_client.config.client_side_validation && invoice_id.nil? + fail ArgumentError, "Missing the required parameter 'invoice_id' when calling PaymentApi.get_invoice" + end + pattern = Regexp.new(/[^\/#\?]+?/) + if @api_client.config.client_side_validation && invoice_id !~ pattern + fail ArgumentError, "invalid value for 'invoice_id' when calling PaymentApi.get_invoice, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/api/v1/payment/invoices/{invoiceId}'.sub('{' + 'invoiceId' + '}', CGI.escape(invoice_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"PaymentApi.get_invoice", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PaymentApi#get_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + + # Get invoices + # + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_invoices(extra: {}) + api_response = get_invoices_with_http_info_impl(extra) + api_response.data + end + + # Get invoices + # + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def get_invoices_with_http_info(extra: {}) + get_invoices_with_http_info_impl(extra) + end + + # Get invoices + # @param [Hash] opts the optional parameters + # @return [Object] + private def get_invoices_impl(opts = {}) + data, _status_code, _headers = get_invoices_with_http_info(opts) + data + end + + # Get invoices + # @param [Hash] opts the optional parameters + # @return [APIResponse] data is Object, status code, headers and response + private def get_invoices_with_http_info_impl(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PaymentApi.get_invoices ...' + end + # resource path + local_var_path = '/api/v1/payment/invoices' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"PaymentApi.get_invoices", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PaymentApi#get_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + + + # Handle stripe webhook + # + # @param body [Object] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def handle_stripe_webhook(body: SENTINEL, extra: {}) + extra[:body] = body if body != SENTINEL + api_response = handle_stripe_webhook_with_http_info_impl(extra) + api_response.data + end + + # Handle stripe webhook + # + # @param body [Object] + # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name + def handle_stripe_webhook_with_http_info(body: SENTINEL, extra: {}) + extra[:body] = body if body != SENTINEL + handle_stripe_webhook_with_http_info_impl(extra) + end + + # Handle stripe webhook + # @param [Hash] opts the optional parameters + # @option opts [Object] :body + # @return [Object] + private def handle_stripe_webhook_impl(opts = {}) + data, _status_code, _headers = handle_stripe_webhook_with_http_info(opts) + data + end + + # Handle stripe webhook + # @param [Hash] opts the optional parameters + # @option opts [Object] :body + # @return [APIResponse] data is Object, status code, headers and response + private def handle_stripe_webhook_with_http_info_impl(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PaymentApi.handle_stripe_webhook ...' + end + # resource path + local_var_path = '/api/v1/payment/webhook' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) + + # return_type + return_type = opts[:debug_return_type] || 'Object' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key'] + + new_options = opts.merge( + :operation => :"PaymentApi.handle_stripe_webhook", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PaymentApi#handle_stripe_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + APIResponse::new(data, status_code, headers, response) + end + end + + # top-level client access to avoid having the user to insantiate their own API instances + Payment = PaymentApi::new +end diff --git a/ruby/lib/composio/models/action_analytics_dto.rb b/ruby/lib/composio/models/action_analytics_dto.rb new file mode 100644 index 0000000..d9a3339 --- /dev/null +++ b/ruby/lib/composio/models/action_analytics_dto.rb @@ -0,0 +1,250 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + # Comprehensive trigger analytics data, presenting a breakdown by day, status, and provider for all triggers + class ActionAnalyticsDTO + # Date of the action + attr_accessor :date + + attr_accessor :by_app + + attr_accessor :by_status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'date' => :'date', + :'by_app' => :'byApp', + :'by_status' => :'byStatus' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'date' => :'Date', + :'by_app' => :'ActionByAppDTO', + :'by_status' => :'ActionByStatusDTO' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::ActionAnalyticsDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::ActionAnalyticsDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.key?(:'by_app') + self.by_app = attributes[:'by_app'] + end + + if attributes.key?(:'by_status') + self.by_status = attributes[:'by_status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @date.nil? + invalid_properties.push('invalid value for "date", date cannot be nil.') + end + + if @by_app.nil? + invalid_properties.push('invalid value for "by_app", by_app cannot be nil.') + end + + if @by_status.nil? + invalid_properties.push('invalid value for "by_status", by_status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @date.nil? + return false if @by_app.nil? + return false if @by_status.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + date == o.date && + by_app == o.by_app && + by_status == o.by_status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [date, by_app, by_status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/action_by_app_dto.rb b/ruby/lib/composio/models/action_by_app_dto.rb new file mode 100644 index 0000000..a085f62 --- /dev/null +++ b/ruby/lib/composio/models/action_by_app_dto.rb @@ -0,0 +1,237 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + # Action counts by app + class ActionByAppDTO + # Name of the app + attr_accessor :app_name + + # Total count of actions for the app + attr_accessor :total_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_name' => :'appName', + :'total_count' => :'totalCount' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_name' => :'String', + :'total_count' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::ActionByAppDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::ActionByAppDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_name') + self.app_name = attributes[:'app_name'] + end + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_count'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @app_name.nil? + invalid_properties.push('invalid value for "app_name", app_name cannot be nil.') + end + + if @total_count.nil? + invalid_properties.push('invalid value for "total_count", total_count cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @app_name.nil? + return false if @total_count.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_name == o.app_name && + total_count == o.total_count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_name, total_count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/action_by_status_dto.rb b/ruby/lib/composio/models/action_by_status_dto.rb new file mode 100644 index 0000000..21b02c1 --- /dev/null +++ b/ruby/lib/composio/models/action_by_status_dto.rb @@ -0,0 +1,237 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + # Action counts by status + class ActionByStatusDTO + # Count of failed actions + attr_accessor :failed + + # Count of successful actions + attr_accessor :success + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'failed' => :'failed', + :'success' => :'success' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'failed' => :'Float', + :'success' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::ActionByStatusDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::ActionByStatusDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'failed') + self.failed = attributes[:'failed'] + end + + if attributes.key?(:'success') + self.success = attributes[:'success'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @failed.nil? + invalid_properties.push('invalid value for "failed", failed cannot be nil.') + end + + if @success.nil? + invalid_properties.push('invalid value for "success", success cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @failed.nil? + return false if @success.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + failed == o.failed && + success == o.success + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [failed, success].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/action_get_nla_inputs_req_dto.rb b/ruby/lib/composio/models/action_get_nla_inputs_req_dto.rb new file mode 100644 index 0000000..bd95e7d --- /dev/null +++ b/ruby/lib/composio/models/action_get_nla_inputs_req_dto.rb @@ -0,0 +1,220 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class ActionGetNLAInputsReqDTO + attr_accessor :text + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'text' => :'text' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'text' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::ActionGetNLAInputsReqDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::ActionGetNLAInputsReqDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'text') + self.text = attributes[:'text'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @text.nil? + invalid_properties.push('invalid value for "text", text cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @text.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + text == o.text + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [text].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/analytics_data_req_dto.rb b/ruby/lib/composio/models/analytics_data_req_dto.rb new file mode 100644 index 0000000..d5af8d8 --- /dev/null +++ b/ruby/lib/composio/models/analytics_data_req_dto.rb @@ -0,0 +1,250 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class AnalyticsDataReqDTO + # Time period to get the data for + attr_accessor :last_time_period + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'last_time_period' => :'lastTimePeriod' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'last_time_period' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::AnalyticsDataReqDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::AnalyticsDataReqDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'last_time_period') + self.last_time_period = attributes[:'last_time_period'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + last_time_period_validator = EnumAttributeValidator.new('String', ["DAY", "WEEK", "MONTH", "SIX_MONTH", "YEAR", "FIVE_YEAR"]) + return false unless last_time_period_validator.valid?(@last_time_period) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] last_time_period Object to be assigned + def last_time_period=(last_time_period) + validator = EnumAttributeValidator.new('String', ["DAY", "WEEK", "MONTH", "SIX_MONTH", "YEAR", "FIVE_YEAR"]) + unless validator.valid?(last_time_period) + fail ArgumentError, "invalid value for \"last_time_period\", must be one of #{validator.allowable_values}." + end + @last_time_period = last_time_period + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + last_time_period == o.last_time_period + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [last_time_period].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/analytics_data_res_dto.rb b/ruby/lib/composio/models/analytics_data_res_dto.rb new file mode 100644 index 0000000..ee398bf --- /dev/null +++ b/ruby/lib/composio/models/analytics_data_res_dto.rb @@ -0,0 +1,282 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class AnalyticsDataResDTO + attr_accessor :entity + + attr_accessor :actions + + attr_accessor :trigger + + attr_accessor :integrations + + attr_accessor :app + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entity' => :'entity', + :'actions' => :'actions', + :'trigger' => :'trigger', + :'integrations' => :'integrations', + :'app' => :'app' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'entity' => :'AnalyticsEntityDataDTO', + :'actions' => :'Array', + :'trigger' => :'Array', + :'integrations' => :'Array', + :'app' => :'AppNameCountDTO' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::AnalyticsDataResDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::AnalyticsDataResDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'entity') + self.entity = attributes[:'entity'] + end + + if attributes.key?(:'actions') + if (value = attributes[:'actions']).is_a?(Array) + self.actions = value + end + end + + if attributes.key?(:'trigger') + if (value = attributes[:'trigger']).is_a?(Array) + self.trigger = value + end + end + + if attributes.key?(:'integrations') + if (value = attributes[:'integrations']).is_a?(Array) + self.integrations = value + end + end + + if attributes.key?(:'app') + self.app = attributes[:'app'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @entity.nil? + invalid_properties.push('invalid value for "entity", entity cannot be nil.') + end + + if @actions.nil? + invalid_properties.push('invalid value for "actions", actions cannot be nil.') + end + + if @trigger.nil? + invalid_properties.push('invalid value for "trigger", trigger cannot be nil.') + end + + if @integrations.nil? + invalid_properties.push('invalid value for "integrations", integrations cannot be nil.') + end + + if @app.nil? + invalid_properties.push('invalid value for "app", app cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @entity.nil? + return false if @actions.nil? + return false if @trigger.nil? + return false if @integrations.nil? + return false if @app.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + entity == o.entity && + actions == o.actions && + trigger == o.trigger && + integrations == o.integrations && + app == o.app + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [entity, actions, trigger, integrations, app].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/analytics_entity_data_dto.rb b/ruby/lib/composio/models/analytics_entity_data_dto.rb new file mode 100644 index 0000000..23b4d8c --- /dev/null +++ b/ruby/lib/composio/models/analytics_entity_data_dto.rb @@ -0,0 +1,257 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + # Entity-related analytics data, providing a breakdown by connections, actions, and triggers for each entity. This is include all entity info. + class AnalyticsEntityDataDTO + attr_accessor :by_connections + + # Action counts by entity + attr_accessor :by_actions + + # Trigger counts by entity + attr_accessor :by_triggers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'by_connections' => :'byConnections', + :'by_actions' => :'byActions', + :'by_triggers' => :'byTriggers' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'by_connections' => :'Array', + :'by_actions' => :'Array', + :'by_triggers' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::AnalyticsEntityDataDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::AnalyticsEntityDataDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'by_connections') + if (value = attributes[:'by_connections']).is_a?(Array) + self.by_connections = value + end + end + + if attributes.key?(:'by_actions') + if (value = attributes[:'by_actions']).is_a?(Array) + self.by_actions = value + end + end + + if attributes.key?(:'by_triggers') + if (value = attributes[:'by_triggers']).is_a?(Array) + self.by_triggers = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @by_connections.nil? + invalid_properties.push('invalid value for "by_connections", by_connections cannot be nil.') + end + + if @by_actions.nil? + invalid_properties.push('invalid value for "by_actions", by_actions cannot be nil.') + end + + if @by_triggers.nil? + invalid_properties.push('invalid value for "by_triggers", by_triggers cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @by_connections.nil? + return false if @by_actions.nil? + return false if @by_triggers.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + by_connections == o.by_connections && + by_actions == o.by_actions && + by_triggers == o.by_triggers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [by_connections, by_actions, by_triggers].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/api_key_res_dto.rb b/ruby/lib/composio/models/api_key_res_dto.rb index 99ad6a8..6b757c2 100644 --- a/ruby/lib/composio/models/api_key_res_dto.rb +++ b/ruby/lib/composio/models/api_key_res_dto.rb @@ -26,6 +26,15 @@ class APIKeyResDTO # The generated API key attr_accessor :key + # Whether the API key is hidden + attr_accessor :is_hidden + + # The last used date of the API key + attr_accessor :last_used + + # The member of the API key + attr_accessor :member + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -33,7 +42,10 @@ def self.attribute_map :'name' => :'name', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', - :'key' => :'key' + :'key' => :'key', + :'is_hidden' => :'isHidden', + :'last_used' => :'lastUsed', + :'member' => :'member' } end @@ -49,7 +61,10 @@ def self.openapi_types :'name' => :'String', :'created_at' => :'String', :'updated_at' => :'String', - :'key' => :'String' + :'key' => :'String', + :'is_hidden' => :'Boolean', + :'last_used' => :'String', + :'member' => :'Object' } end @@ -93,6 +108,18 @@ def initialize(attributes = {}) if attributes.key?(:'key') self.key = attributes[:'key'] end + + if attributes.key?(:'is_hidden') + self.is_hidden = attributes[:'is_hidden'] + end + + if attributes.key?(:'last_used') + self.last_used = attributes[:'last_used'] + end + + if attributes.key?(:'member') + self.member = attributes[:'member'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -129,6 +156,19 @@ def list_invalid_properties invalid_properties.push('invalid value for "key", key cannot be nil.') end + if @is_hidden.nil? + invalid_properties.push('invalid value for "is_hidden", is_hidden cannot be nil.') + end + + pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + if !@last_used.nil? && @last_used !~ pattern + invalid_properties.push("invalid value for \"last_used\", must conform to the pattern #{pattern}.") + end + + if @member.nil? + invalid_properties.push('invalid value for "member", member cannot be nil.') + end + invalid_properties end @@ -142,6 +182,9 @@ def valid? return false if @updated_at.nil? return false if @updated_at !~ Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) return false if @key.nil? + return false if @is_hidden.nil? + return false if !@last_used.nil? && @last_used !~ Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + return false if @member.nil? true end @@ -175,6 +218,17 @@ def updated_at=(updated_at) @updated_at = updated_at end + # Custom attribute writer method with validation + # @param [Object] last_used Value to be assigned + def last_used=(last_used) + pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + if !last_used.nil? && last_used !~ pattern + fail ArgumentError, "invalid value for \"last_used\", must conform to the pattern #{pattern}." + end + + @last_used = last_used + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -184,7 +238,10 @@ def ==(o) name == o.name && created_at == o.created_at && updated_at == o.updated_at && - key == o.key + key == o.key && + is_hidden == o.is_hidden && + last_used == o.last_used && + member == o.member end # @see the `==` method @@ -196,7 +253,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, name, created_at, updated_at, key].hash + [id, name, created_at, updated_at, key, is_hidden, last_used, member].hash end # Builds the object from hash diff --git a/ruby/lib/composio/models/app_name_count_dto.rb b/ruby/lib/composio/models/app_name_count_dto.rb new file mode 100644 index 0000000..6f506cc --- /dev/null +++ b/ruby/lib/composio/models/app_name_count_dto.rb @@ -0,0 +1,267 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + # Comprehensive app-level analytics data, providing a breakdown of connection count, trigger count, and request logs count for each app + class AppNameCountDTO + # Name of the app + attr_accessor :app_name + + # Count of connections for the app + attr_accessor :connection_count + + # Count of triggers for the app + attr_accessor :trigger_count + + # Count of request logs for the app + attr_accessor :request_logs_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_name' => :'appName', + :'connection_count' => :'connectionCount', + :'trigger_count' => :'triggerCount', + :'request_logs_count' => :'requestLogsCount' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_name' => :'String', + :'connection_count' => :'Float', + :'trigger_count' => :'Float', + :'request_logs_count' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::AppNameCountDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::AppNameCountDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_name') + self.app_name = attributes[:'app_name'] + end + + if attributes.key?(:'connection_count') + self.connection_count = attributes[:'connection_count'] + end + + if attributes.key?(:'trigger_count') + self.trigger_count = attributes[:'trigger_count'] + end + + if attributes.key?(:'request_logs_count') + self.request_logs_count = attributes[:'request_logs_count'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @app_name.nil? + invalid_properties.push('invalid value for "app_name", app_name cannot be nil.') + end + + if @connection_count.nil? + invalid_properties.push('invalid value for "connection_count", connection_count cannot be nil.') + end + + if @trigger_count.nil? + invalid_properties.push('invalid value for "trigger_count", trigger_count cannot be nil.') + end + + if @request_logs_count.nil? + invalid_properties.push('invalid value for "request_logs_count", request_logs_count cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @app_name.nil? + return false if @connection_count.nil? + return false if @trigger_count.nil? + return false if @request_logs_count.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_name == o.app_name && + connection_count == o.connection_count && + trigger_count == o.trigger_count && + request_logs_count == o.request_logs_count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_name, connection_count, trigger_count, request_logs_count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/client_unique_user_id_count_dto.rb b/ruby/lib/composio/models/client_unique_user_id_count_dto.rb new file mode 100644 index 0000000..fa213a5 --- /dev/null +++ b/ruby/lib/composio/models/client_unique_user_id_count_dto.rb @@ -0,0 +1,237 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + # Connection counts by entity + class ClientUniqueUserIdCountDTO + # Client unique user id + attr_accessor :client_unique_user_id + + # Count of connections for the client unique user id + attr_accessor :count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_unique_user_id' => :'clientUniqueUserId', + :'count' => :'count' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_unique_user_id' => :'String', + :'count' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::ClientUniqueUserIdCountDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::ClientUniqueUserIdCountDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_unique_user_id') + self.client_unique_user_id = attributes[:'client_unique_user_id'] + end + + if attributes.key?(:'count') + self.count = attributes[:'count'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @client_unique_user_id.nil? + invalid_properties.push('invalid value for "client_unique_user_id", client_unique_user_id cannot be nil.') + end + + if @count.nil? + invalid_properties.push('invalid value for "count", count cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @client_unique_user_id.nil? + return false if @count.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_unique_user_id == o.client_unique_user_id && + count == o.count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_unique_user_id, count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/connected_account_response_dto.rb b/ruby/lib/composio/models/connected_account_response_dto.rb index 4a4d094..e04e400 100644 --- a/ruby/lib/composio/models/connected_account_response_dto.rb +++ b/ruby/lib/composio/models/connected_account_response_dto.rb @@ -15,6 +15,8 @@ class ConnectedAccountResponseDTO attr_accessor :app_unique_id + attr_accessor :member_info + attr_accessor :meta attr_accessor :is_disabled @@ -40,6 +42,7 @@ def self.attribute_map { :'integration_id' => :'integrationId', :'app_unique_id' => :'appUniqueId', + :'member_info' => :'memberInfo', :'meta' => :'meta', :'is_disabled' => :'isDisabled', :'id' => :'id', @@ -63,6 +66,7 @@ def self.openapi_types { :'integration_id' => :'String', :'app_unique_id' => :'String', + :'member_info' => :'MemberInfoResDTO', :'meta' => :'Meta', :'is_disabled' => :'Boolean', :'id' => :'String', @@ -105,6 +109,10 @@ def initialize(attributes = {}) self.app_unique_id = attributes[:'app_unique_id'] end + if attributes.key?(:'member_info') + self.member_info = attributes[:'member_info'] + end + if attributes.key?(:'meta') self.meta = attributes[:'meta'] end @@ -211,6 +219,7 @@ def ==(o) self.class == o.class && integration_id == o.integration_id && app_unique_id == o.app_unique_id && + member_info == o.member_info && meta == o.meta && is_disabled == o.is_disabled && id == o.id && @@ -232,7 +241,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [integration_id, app_unique_id, meta, is_disabled, id, client_unique_user_id, app_name, entity_id, status, enabled, created_at, updated_at].hash + [integration_id, app_unique_id, member_info, meta, is_disabled, id, client_unique_user_id, app_name, entity_id, status, enabled, created_at, updated_at].hash end # Builds the object from hash diff --git a/ruby/lib/composio/models/connection_params.rb b/ruby/lib/composio/models/connection_params.rb index 27687c6..07ce8c2 100644 --- a/ruby/lib/composio/models/connection_params.rb +++ b/ruby/lib/composio/models/connection_params.rb @@ -43,6 +43,8 @@ class ConnectionParams attr_accessor :auth_config + attr_accessor :member + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -61,7 +63,8 @@ def self.attribute_map :'app_unique_id' => :'appUniqueId', :'app_name' => :'appName', :'logo' => :'logo', - :'auth_config' => :'authConfig' + :'auth_config' => :'authConfig', + :'member' => :'member' } end @@ -83,12 +86,13 @@ def self.openapi_types :'data' => :'Object', :'deleted' => :'Boolean', :'enabled' => :'Boolean', - :'created_at' => :'ConnectionWithAppDataCreatedAt', - :'updated_at' => :'ConnectionWithAppDataCreatedAt', + :'created_at' => :'MemberInfoResDTOCreatedAt', + :'updated_at' => :'MemberInfoResDTOCreatedAt', :'app_unique_id' => :'String', :'app_name' => :'String', :'logo' => :'String', - :'auth_config' => :'Object' + :'auth_config' => :'Object', + :'member' => :'Array' } end @@ -176,6 +180,12 @@ def initialize(attributes = {}) if attributes.key?(:'auth_config') self.auth_config = attributes[:'auth_config'] end + + if attributes.key?(:'member') + if (value = attributes[:'member']).is_a?(Array) + self.member = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -218,6 +228,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "app_name", app_name cannot be nil.') end + if @member.nil? + invalid_properties.push('invalid value for "member", member cannot be nil.') + end + invalid_properties end @@ -233,6 +247,7 @@ def valid? return false if @updated_at.nil? return false if @app_unique_id.nil? return false if @app_name.nil? + return false if @member.nil? true end @@ -256,7 +271,8 @@ def ==(o) app_unique_id == o.app_unique_id && app_name == o.app_name && logo == o.logo && - auth_config == o.auth_config + auth_config == o.auth_config && + member == o.member end # @see the `==` method @@ -268,7 +284,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [integration_id, connection_params, is_disabled, invocation_count, id, client_unique_user_id, status, data, deleted, enabled, created_at, updated_at, app_unique_id, app_name, logo, auth_config].hash + [integration_id, connection_params, is_disabled, invocation_count, id, client_unique_user_id, status, data, deleted, enabled, created_at, updated_at, app_unique_id, app_name, logo, auth_config, member].hash end # Builds the object from hash diff --git a/ruby/lib/composio/models/connection_with_app_data.rb b/ruby/lib/composio/models/connection_with_app_data.rb index 3c89d62..068c973 100644 --- a/ruby/lib/composio/models/connection_with_app_data.rb +++ b/ruby/lib/composio/models/connection_with_app_data.rb @@ -37,6 +37,8 @@ class ConnectionWithAppData attr_accessor :auth_config + attr_accessor :member + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -52,7 +54,8 @@ def self.attribute_map :'app_unique_id' => :'appUniqueId', :'app_name' => :'appName', :'logo' => :'logo', - :'auth_config' => :'authConfig' + :'auth_config' => :'authConfig', + :'member' => :'member' } end @@ -71,12 +74,13 @@ def self.openapi_types :'data' => :'Object', :'deleted' => :'Boolean', :'enabled' => :'Boolean', - :'created_at' => :'ConnectionWithAppDataCreatedAt', - :'updated_at' => :'ConnectionWithAppDataCreatedAt', + :'created_at' => :'MemberInfoResDTOCreatedAt', + :'updated_at' => :'MemberInfoResDTOCreatedAt', :'app_unique_id' => :'String', :'app_name' => :'String', :'logo' => :'String', - :'auth_config' => :'Object' + :'auth_config' => :'Object', + :'member' => :'Array' } end @@ -152,6 +156,12 @@ def initialize(attributes = {}) if attributes.key?(:'auth_config') self.auth_config = attributes[:'auth_config'] end + + if attributes.key?(:'member') + if (value = attributes[:'member']).is_a?(Array) + self.member = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -186,6 +196,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "app_name", app_name cannot be nil.') end + if @member.nil? + invalid_properties.push('invalid value for "member", member cannot be nil.') + end + invalid_properties end @@ -199,6 +213,7 @@ def valid? return false if @updated_at.nil? return false if @app_unique_id.nil? return false if @app_name.nil? + return false if @member.nil? true end @@ -219,7 +234,8 @@ def ==(o) app_unique_id == o.app_unique_id && app_name == o.app_name && logo == o.logo && - auth_config == o.auth_config + auth_config == o.auth_config && + member == o.member end # @see the `==` method @@ -231,7 +247,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, integration_id, client_unique_user_id, status, data, deleted, enabled, created_at, updated_at, app_unique_id, app_name, logo, auth_config].hash + [id, integration_id, client_unique_user_id, status, data, deleted, enabled, created_at, updated_at, app_unique_id, app_name, logo, auth_config, member].hash end # Builds the object from hash diff --git a/ruby/lib/composio/models/connector_list_item_dto.rb b/ruby/lib/composio/models/connector_list_item_dto.rb index 7da59e8..6e47752 100644 --- a/ruby/lib/composio/models/connector_list_item_dto.rb +++ b/ruby/lib/composio/models/connector_list_item_dto.rb @@ -10,6 +10,7 @@ require 'time' module Composio + # List of connectors class ConnectorListItemDTO # Application name associated with the connector attr_accessor :app_name @@ -23,6 +24,8 @@ class ConnectorListItemDTO # Unique identifier of the connector attr_accessor :id + attr_accessor :member + # Name of the connector attr_accessor :name @@ -52,6 +55,7 @@ def self.attribute_map :'_count' => :'_count', :'connections' => :'connections', :'id' => :'id', + :'member' => :'member', :'name' => :'name', :'auth_scheme' => :'authScheme', :'created_at' => :'createdAt', @@ -75,6 +79,7 @@ def self.openapi_types :'_count' => :'Object', :'connections' => :'Array', :'id' => :'String', + :'member' => :'MemberInfoResDTO', :'name' => :'String', :'auth_scheme' => :'String', :'created_at' => :'ConnectorListItemDTOCreatedAt', @@ -125,6 +130,10 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end + if attributes.key?(:'member') + self.member = attributes[:'member'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -178,6 +187,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "id", id cannot be nil.') end + if @member.nil? + invalid_properties.push('invalid value for "member", member cannot be nil.') + end + if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end @@ -212,6 +225,7 @@ def valid? return false if @_count.nil? return false if @connections.nil? return false if @id.nil? + return false if @member.nil? return false if @name.nil? return false if @auth_scheme.nil? return false if @created_at.nil? @@ -230,6 +244,7 @@ def ==(o) _count == o._count && connections == o.connections && id == o.id && + member == o.member && name == o.name && auth_scheme == o.auth_scheme && created_at == o.created_at && @@ -249,7 +264,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [app_name, _count, connections, id, name, auth_scheme, created_at, updated_at, enabled, deleted, app_id, default_connector_id].hash + [app_name, _count, connections, id, member, name, auth_scheme, created_at, updated_at, enabled, deleted, app_id, default_connector_id].hash end # Builds the object from hash diff --git a/ruby/lib/composio/models/create_checkout_session_req_dto.rb b/ruby/lib/composio/models/create_checkout_session_req_dto.rb new file mode 100644 index 0000000..fa7d0ae --- /dev/null +++ b/ruby/lib/composio/models/create_checkout_session_req_dto.rb @@ -0,0 +1,220 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class CreateCheckoutSessionReqDto + attr_accessor :plan + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'plan' => :'plan' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'plan' => :'Plan' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::CreateCheckoutSessionReqDto` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::CreateCheckoutSessionReqDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'plan') + self.plan = attributes[:'plan'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @plan.nil? + invalid_properties.push('invalid value for "plan", plan cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @plan.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + plan == o.plan + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [plan].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/entity_query_req_dto.rb b/ruby/lib/composio/models/entity_query_req_dto.rb new file mode 100644 index 0000000..e731c37 --- /dev/null +++ b/ruby/lib/composio/models/entity_query_req_dto.rb @@ -0,0 +1,216 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class EntityQueryReqDTO + # Query to get the data for + attr_accessor :query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'query' => :'query' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'query' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::EntityQueryReqDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::EntityQueryReqDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + query == o.query + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [query].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/fetch_query_dto.rb b/ruby/lib/composio/models/fetch_query_dto.rb new file mode 100644 index 0000000..1f3ac62 --- /dev/null +++ b/ruby/lib/composio/models/fetch_query_dto.rb @@ -0,0 +1,278 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class FetchQueryDTO + # Start time of the event in ISO 8601 format + attr_accessor :start_time + + # End time of the event in ISO 8601 format + attr_accessor :end_time + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'start_time' => :'startTime', + :'end_time' => :'endTime' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'start_time' => :'String', + :'end_time' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::FetchQueryDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::FetchQueryDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'start_time') + self.start_time = attributes[:'start_time'] + end + + if attributes.key?(:'end_time') + self.end_time = attributes[:'end_time'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @start_time.nil? + invalid_properties.push('invalid value for "start_time", start_time cannot be nil.') + end + + pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + if @start_time !~ pattern + invalid_properties.push("invalid value for \"start_time\", must conform to the pattern #{pattern}.") + end + + if @end_time.nil? + invalid_properties.push('invalid value for "end_time", end_time cannot be nil.') + end + + pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + if @end_time !~ pattern + invalid_properties.push("invalid value for \"end_time\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @start_time.nil? + return false if @start_time !~ Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + return false if @end_time.nil? + return false if @end_time !~ Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + true + end + + # Custom attribute writer method with validation + # @param [Object] start_time Value to be assigned + def start_time=(start_time) + if start_time.nil? + fail ArgumentError, 'start_time cannot be nil' + end + + pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + if start_time !~ pattern + fail ArgumentError, "invalid value for \"start_time\", must conform to the pattern #{pattern}." + end + + @start_time = start_time + end + + # Custom attribute writer method with validation + # @param [Object] end_time Value to be assigned + def end_time=(end_time) + if end_time.nil? + fail ArgumentError, 'end_time cannot be nil' + end + + pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + if end_time !~ pattern + fail ArgumentError, "invalid value for \"end_time\", must conform to the pattern #{pattern}." + end + + @end_time = end_time + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + start_time == o.start_time && + end_time == o.end_time + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [start_time, end_time].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/get_connector_list_res_dto.rb b/ruby/lib/composio/models/get_connector_list_res_dto.rb index adc584f..0589458 100644 --- a/ruby/lib/composio/models/get_connector_list_res_dto.rb +++ b/ruby/lib/composio/models/get_connector_list_res_dto.rb @@ -11,7 +11,6 @@ module Composio class GetConnectorListResDTO - # List of connectors attr_accessor :items # Total number of pages available diff --git a/ruby/lib/composio/models/get_logs_dto.rb b/ruby/lib/composio/models/get_logs_dto.rb index 3952a05..d7f5aab 100644 --- a/ruby/lib/composio/models/get_logs_dto.rb +++ b/ruby/lib/composio/models/get_logs_dto.rb @@ -26,7 +26,7 @@ class GetLogsDTO # Integration UUID attr_accessor :integration_id - # Entity UUID + # Entity id attr_accessor :entity_id # Limit of the logs @@ -35,8 +35,8 @@ class GetLogsDTO # Cursor for pagination attr_accessor :cursor - # Connection ID of the log - attr_accessor :connection_id + # Type of the log + attr_accessor :logs_type # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map @@ -49,7 +49,7 @@ def self.attribute_map :'entity_id' => :'entityId', :'limit' => :'limit', :'cursor' => :'cursor', - :'connection_id' => :'connectionId' + :'logs_type' => :'logsType' } end @@ -63,13 +63,13 @@ def self.openapi_types { :'type' => :'Type', :'time' => :'Time', - :'status' => :'Status', + :'status' => :'GetLogsDtoStatus', :'search' => :'String', :'integration_id' => :'String', :'entity_id' => :'String', :'limit' => :'Float', :'cursor' => :'String', - :'connection_id' => :'String' + :'logs_type' => :'String' } end @@ -128,8 +128,8 @@ def initialize(attributes = {}) self.cursor = attributes[:'cursor'] end - if attributes.key?(:'connection_id') - self.connection_id = attributes[:'connection_id'] + if attributes.key?(:'logs_type') + self.logs_type = attributes[:'logs_type'] end end @@ -159,7 +159,7 @@ def ==(o) entity_id == o.entity_id && limit == o.limit && cursor == o.cursor && - connection_id == o.connection_id + logs_type == o.logs_type end # @see the `==` method @@ -171,7 +171,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, time, status, search, integration_id, entity_id, limit, cursor, connection_id].hash + [type, time, status, search, integration_id, entity_id, limit, cursor, logs_type].hash end # Builds the object from hash diff --git a/ruby/lib/composio/models/job_status.rb b/ruby/lib/composio/models/get_logs_dto_status.rb similarity index 72% rename from ruby/lib/composio/models/job_status.rb rename to ruby/lib/composio/models/get_logs_dto_status.rb index 7b0b621..220788b 100644 --- a/ruby/lib/composio/models/job_status.rb +++ b/ruby/lib/composio/models/get_logs_dto_status.rb @@ -10,13 +10,13 @@ require 'time' module Composio - class JobStatus - RUNNING = "running".freeze + class GetLogsDtoStatus + ALL = "all".freeze SUCCESS = "success".freeze - FAILED = "failed".freeze + ERROR = "error".freeze def self.all_vars - @all_vars ||= [RUNNING, SUCCESS, FAILED].freeze + @all_vars ||= [ALL, SUCCESS, ERROR].freeze end # Builds the enum from string @@ -30,8 +30,8 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - return value if JobStatus.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #JobStatus" + return value if GetLogsDtoStatus.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #GetLogsDtoStatus" end end end diff --git a/ruby/lib/composio/models/ingest_data_dto.rb b/ruby/lib/composio/models/ingest_data_dto.rb new file mode 100644 index 0000000..0191392 --- /dev/null +++ b/ruby/lib/composio/models/ingest_data_dto.rb @@ -0,0 +1,298 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class IngestDataDTO + # Connection ID of the log + attr_accessor :connection_id + + # Entity ID of the log + attr_accessor :entity_id + + # Provider name of the log + attr_accessor :provider_name + + # Action name of the log + attr_accessor :action_name + + attr_accessor :request + + attr_accessor :response + + attr_accessor :is_error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'connection_id' => :'connectionId', + :'entity_id' => :'entityId', + :'provider_name' => :'providerName', + :'action_name' => :'actionName', + :'request' => :'request', + :'response' => :'response', + :'is_error' => :'isError' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'connection_id' => :'String', + :'entity_id' => :'String', + :'provider_name' => :'String', + :'action_name' => :'String', + :'request' => :'Object', + :'response' => :'Object', + :'is_error' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::IngestDataDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::IngestDataDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'connection_id') + self.connection_id = attributes[:'connection_id'] + end + + if attributes.key?(:'entity_id') + self.entity_id = attributes[:'entity_id'] + end + + if attributes.key?(:'provider_name') + self.provider_name = attributes[:'provider_name'] + end + + if attributes.key?(:'action_name') + self.action_name = attributes[:'action_name'] + end + + if attributes.key?(:'request') + self.request = attributes[:'request'] + end + + if attributes.key?(:'response') + self.response = attributes[:'response'] + end + + if attributes.key?(:'is_error') + self.is_error = attributes[:'is_error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @provider_name.nil? + invalid_properties.push('invalid value for "provider_name", provider_name cannot be nil.') + end + + if @action_name.nil? + invalid_properties.push('invalid value for "action_name", action_name cannot be nil.') + end + + if @request.nil? + invalid_properties.push('invalid value for "request", request cannot be nil.') + end + + if @response.nil? + invalid_properties.push('invalid value for "response", response cannot be nil.') + end + + if @is_error.nil? + invalid_properties.push('invalid value for "is_error", is_error cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @provider_name.nil? + return false if @action_name.nil? + return false if @request.nil? + return false if @response.nil? + return false if @is_error.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + connection_id == o.connection_id && + entity_id == o.entity_id && + provider_name == o.provider_name && + action_name == o.action_name && + request == o.request && + response == o.response && + is_error == o.is_error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [connection_id, entity_id, provider_name, action_name, request, response, is_error].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/ingest_data_response_dto.rb b/ruby/lib/composio/models/ingest_data_response_dto.rb new file mode 100644 index 0000000..81315bc --- /dev/null +++ b/ruby/lib/composio/models/ingest_data_response_dto.rb @@ -0,0 +1,220 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class IngestDataResponseDTO + attr_accessor :is_ingested + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'is_ingested' => :'isIngested' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'is_ingested' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::IngestDataResponseDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::IngestDataResponseDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'is_ingested') + self.is_ingested = attributes[:'is_ingested'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @is_ingested.nil? + invalid_properties.push('invalid value for "is_ingested", is_ingested cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @is_ingested.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + is_ingested == o.is_ingested + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [is_ingested].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/integrations_with_counts_dto.rb b/ruby/lib/composio/models/integrations_with_counts_dto.rb new file mode 100644 index 0000000..799546c --- /dev/null +++ b/ruby/lib/composio/models/integrations_with_counts_dto.rb @@ -0,0 +1,297 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + # Detailed integration analytics data, including a breakdown of connection count, trigger count, and request logs count for each integration + class IntegrationsWithCountsDTO + # Unique identifier for the integration + attr_accessor :id + + # Name of the app + attr_accessor :app_name + + # Name of the integration + attr_accessor :integration_name + + # Count of connections for the integration + attr_accessor :connection_count + + # Count of triggers for the integration + attr_accessor :trigger_count + + # Count of request logs for the integration + attr_accessor :request_logs_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'app_name' => :'appName', + :'integration_name' => :'integrationName', + :'connection_count' => :'connectionCount', + :'trigger_count' => :'triggerCount', + :'request_logs_count' => :'requestLogsCount' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'app_name' => :'String', + :'integration_name' => :'String', + :'connection_count' => :'Float', + :'trigger_count' => :'Float', + :'request_logs_count' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::IntegrationsWithCountsDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::IntegrationsWithCountsDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'app_name') + self.app_name = attributes[:'app_name'] + end + + if attributes.key?(:'integration_name') + self.integration_name = attributes[:'integration_name'] + end + + if attributes.key?(:'connection_count') + self.connection_count = attributes[:'connection_count'] + end + + if attributes.key?(:'trigger_count') + self.trigger_count = attributes[:'trigger_count'] + end + + if attributes.key?(:'request_logs_count') + self.request_logs_count = attributes[:'request_logs_count'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @app_name.nil? + invalid_properties.push('invalid value for "app_name", app_name cannot be nil.') + end + + if @integration_name.nil? + invalid_properties.push('invalid value for "integration_name", integration_name cannot be nil.') + end + + if @connection_count.nil? + invalid_properties.push('invalid value for "connection_count", connection_count cannot be nil.') + end + + if @trigger_count.nil? + invalid_properties.push('invalid value for "trigger_count", trigger_count cannot be nil.') + end + + if @request_logs_count.nil? + invalid_properties.push('invalid value for "request_logs_count", request_logs_count cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @app_name.nil? + return false if @integration_name.nil? + return false if @connection_count.nil? + return false if @trigger_count.nil? + return false if @request_logs_count.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + app_name == o.app_name && + integration_name == o.integration_name && + connection_count == o.connection_count && + trigger_count == o.trigger_count && + request_logs_count == o.request_logs_count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, app_name, integration_name, connection_count, trigger_count, request_logs_count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/invite_member_req_dto.rb b/ruby/lib/composio/models/invite_member_req_dto.rb index f728dd8..a85b749 100644 --- a/ruby/lib/composio/models/invite_member_req_dto.rb +++ b/ruby/lib/composio/models/invite_member_req_dto.rb @@ -20,12 +20,16 @@ class InviteMemberReqDTO # The host to verify the member attr_accessor :verify_host + # The role that will be assignied to the invited user + attr_accessor :role + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'email' => :'email', :'name' => :'name', - :'verify_host' => :'verifyHost' + :'verify_host' => :'verifyHost', + :'role' => :'role' } end @@ -39,7 +43,8 @@ def self.openapi_types { :'email' => :'String', :'name' => :'String', - :'verify_host' => :'String' + :'verify_host' => :'String', + :'role' => :'Role' } end @@ -75,6 +80,10 @@ def initialize(attributes = {}) if attributes.key?(:'verify_host') self.verify_host = attributes[:'verify_host'] end + + if attributes.key?(:'role') + self.role = attributes[:'role'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -112,7 +121,8 @@ def ==(o) self.class == o.class && email == o.email && name == o.name && - verify_host == o.verify_host + verify_host == o.verify_host && + role == o.role end # @see the `==` method @@ -124,7 +134,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [email, name, verify_host].hash + [email, name, verify_host, role].hash end # Builds the object from hash diff --git a/ruby/lib/composio/models/last_time_period.rb b/ruby/lib/composio/models/last_time_period.rb new file mode 100644 index 0000000..1e060d6 --- /dev/null +++ b/ruby/lib/composio/models/last_time_period.rb @@ -0,0 +1,40 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class LastTimePeriod + DAY = "DAY".freeze + WEEK = "WEEK".freeze + MONTH = "MONTH".freeze + SIX_MONTH = "SIX_MONTH".freeze + YEAR = "YEAR".freeze + FIVE_YEAR = "FIVE_YEAR".freeze + + def self.all_vars + @all_vars ||= [DAY, WEEK, MONTH, SIX_MONTH, YEAR, FIVE_YEAR].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LastTimePeriod.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LastTimePeriod" + end + end +end diff --git a/ruby/lib/composio/models/member_info_res_dto.rb b/ruby/lib/composio/models/member_info_res_dto.rb new file mode 100644 index 0000000..7197fb6 --- /dev/null +++ b/ruby/lib/composio/models/member_info_res_dto.rb @@ -0,0 +1,324 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + # Member information + class MemberInfoResDTO + attr_accessor :id + + attr_accessor :client_id + + attr_accessor :email + + attr_accessor :name + + attr_accessor :role + + attr_accessor :metadata + + attr_accessor :created_at + + attr_accessor :updated_at + + attr_accessor :deleted_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'client_id' => :'clientId', + :'email' => :'email', + :'name' => :'name', + :'role' => :'role', + :'metadata' => :'metadata', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt', + :'deleted_at' => :'deletedAt' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'client_id' => :'String', + :'email' => :'String', + :'name' => :'String', + :'role' => :'String', + :'metadata' => :'Object', + :'created_at' => :'MemberInfoResDTOCreatedAt', + :'updated_at' => :'MemberInfoResDTOCreatedAt', + :'deleted_at' => :'MemberInfoResDTOCreatedAt' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'metadata', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::MemberInfoResDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::MemberInfoResDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'role') + self.role = attributes[:'role'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'deleted_at') + self.deleted_at = attributes[:'deleted_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @client_id.nil? + invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') + end + + if @email.nil? + invalid_properties.push('invalid value for "email", email cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @role.nil? + invalid_properties.push('invalid value for "role", role cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @client_id.nil? + return false if @email.nil? + return false if @name.nil? + return false if @role.nil? + return false if @created_at.nil? + return false if @updated_at.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + client_id == o.client_id && + email == o.email && + name == o.name && + role == o.role && + metadata == o.metadata && + created_at == o.created_at && + updated_at == o.updated_at && + deleted_at == o.deleted_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, client_id, email, name, role, metadata, created_at, updated_at, deleted_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/connection_with_app_data_created_at.rb b/ruby/lib/composio/models/member_info_res_dto_created_at.rb similarity index 98% rename from ruby/lib/composio/models/connection_with_app_data_created_at.rb rename to ruby/lib/composio/models/member_info_res_dto_created_at.rb index a807aed..c11cfea 100644 --- a/ruby/lib/composio/models/connection_with_app_data_created_at.rb +++ b/ruby/lib/composio/models/member_info_res_dto_created_at.rb @@ -10,7 +10,7 @@ require 'time' module Composio - module ConnectionWithAppDataCreatedAt + module MemberInfoResDTOCreatedAt class << self # List of class defined in oneOf (OpenAPI v3) def openapi_one_of diff --git a/ruby/lib/composio/models/member_res_dto.rb b/ruby/lib/composio/models/member_res_dto.rb index e31eef4..ae55ba7 100644 --- a/ruby/lib/composio/models/member_res_dto.rb +++ b/ruby/lib/composio/models/member_res_dto.rb @@ -23,6 +23,9 @@ class MemberResDTO # The creation date of the member record attr_accessor :created_at + # The role that is assigned to the member + attr_accessor :role + # The last update date of the member record attr_accessor :updated_at @@ -33,6 +36,7 @@ def self.attribute_map :'id' => :'id', :'name' => :'name', :'created_at' => :'createdAt', + :'role' => :'role', :'updated_at' => :'updatedAt' } end @@ -49,6 +53,7 @@ def self.openapi_types :'id' => :'String', :'name' => :'String', :'created_at' => :'String', + :'role' => :'MemberResDtoRole', :'updated_at' => :'String' } end @@ -90,6 +95,10 @@ def initialize(attributes = {}) self.created_at = attributes[:'created_at'] end + if attributes.key?(:'role') + self.role = attributes[:'role'] + end + if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end @@ -116,6 +125,10 @@ def list_invalid_properties invalid_properties.push("invalid value for \"created_at\", must conform to the pattern #{pattern}.") end + if @role.nil? + invalid_properties.push('invalid value for "role", role cannot be nil.') + end + pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) if !@updated_at.nil? && @updated_at !~ pattern invalid_properties.push("invalid value for \"updated_at\", must conform to the pattern #{pattern}.") @@ -131,6 +144,7 @@ def valid? return false if @id.nil? return false if @name.nil? return false if !@created_at.nil? && @created_at !~ Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) + return false if @role.nil? return false if !@updated_at.nil? && @updated_at !~ Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) true end @@ -166,6 +180,7 @@ def ==(o) id == o.id && name == o.name && created_at == o.created_at && + role == o.role && updated_at == o.updated_at end @@ -178,7 +193,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [email, id, name, created_at, updated_at].hash + [email, id, name, created_at, role, updated_at].hash end # Builds the object from hash diff --git a/ruby/lib/composio/models/member_res_dto_role.rb b/ruby/lib/composio/models/member_res_dto_role.rb new file mode 100644 index 0000000..bc5a5f4 --- /dev/null +++ b/ruby/lib/composio/models/member_res_dto_role.rb @@ -0,0 +1,36 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class MemberResDtoRole + ADMIN = "admin".freeze + DEVELOPER = "developer".freeze + + def self.all_vars + @all_vars ||= [ADMIN, DEVELOPER].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if MemberResDtoRole.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #MemberResDtoRole" + end + end +end diff --git a/ruby/lib/composio/models/open_api_spec_list_res_dto.rb b/ruby/lib/composio/models/open_api_spec_list_res_dto.rb index 58db75b..784e142 100644 --- a/ruby/lib/composio/models/open_api_spec_list_res_dto.rb +++ b/ruby/lib/composio/models/open_api_spec_list_res_dto.rb @@ -20,21 +20,6 @@ class OpenAPISpecListResDTO # Client identifier attr_accessor :client_id - # OpenAPI specification in YAML format - attr_accessor :open_api_spec - - # Integration details in YAML format - attr_accessor :integration_yaml - - # Whether the OpenAPI spec is enabled - attr_accessor :enabled - - # URL to the OpenAPI specification - attr_accessor :open_api_spec_url - - # URL to the integration YAML - attr_accessor :integration_yamlurl - # Last synchronization date and time attr_accessor :last_sync_at @@ -45,7 +30,10 @@ class OpenAPISpecListResDTO attr_accessor :updated_at # The job status of the app - attr_accessor :job_status + attr_accessor :status + + # Current state of the app FSM + attr_accessor :state # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map @@ -53,15 +41,11 @@ def self.attribute_map :'id' => :'id', :'name' => :'name', :'client_id' => :'clientId', - :'open_api_spec' => :'openApiSpec', - :'integration_yaml' => :'integrationYaml', - :'enabled' => :'enabled', - :'open_api_spec_url' => :'openAPISpecURL', - :'integration_yamlurl' => :'integrationYAMLURL', :'last_sync_at' => :'lastSyncAt', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', - :'job_status' => :'jobStatus' + :'status' => :'status', + :'state' => :'state' } end @@ -76,23 +60,17 @@ def self.openapi_types :'id' => :'String', :'name' => :'String', :'client_id' => :'String', - :'open_api_spec' => :'String', - :'integration_yaml' => :'String', - :'enabled' => :'Boolean', - :'open_api_spec_url' => :'String', - :'integration_yamlurl' => :'String', :'last_sync_at' => :'Time', :'created_at' => :'Time', :'updated_at' => :'Time', - :'job_status' => :'JobStatus' + :'status' => :'Status', + :'state' => :'State' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'open_api_spec_url', - :'integration_yamlurl', ]) end @@ -123,26 +101,6 @@ def initialize(attributes = {}) self.client_id = attributes[:'client_id'] end - if attributes.key?(:'open_api_spec') - self.open_api_spec = attributes[:'open_api_spec'] - end - - if attributes.key?(:'integration_yaml') - self.integration_yaml = attributes[:'integration_yaml'] - end - - if attributes.key?(:'enabled') - self.enabled = attributes[:'enabled'] - end - - if attributes.key?(:'open_api_spec_url') - self.open_api_spec_url = attributes[:'open_api_spec_url'] - end - - if attributes.key?(:'integration_yamlurl') - self.integration_yamlurl = attributes[:'integration_yamlurl'] - end - if attributes.key?(:'last_sync_at') self.last_sync_at = attributes[:'last_sync_at'] end @@ -155,8 +113,12 @@ def initialize(attributes = {}) self.updated_at = attributes[:'updated_at'] end - if attributes.key?(:'job_status') - self.job_status = attributes[:'job_status'] + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] end end @@ -176,18 +138,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') end - if @open_api_spec.nil? - invalid_properties.push('invalid value for "open_api_spec", open_api_spec cannot be nil.') - end - - if @integration_yaml.nil? - invalid_properties.push('invalid value for "integration_yaml", integration_yaml cannot be nil.') - end - - if @enabled.nil? - invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') - end - if @last_sync_at.nil? invalid_properties.push('invalid value for "last_sync_at", last_sync_at cannot be nil.') end @@ -224,9 +174,6 @@ def valid? return false if @id.nil? return false if @name.nil? return false if @client_id.nil? - return false if @open_api_spec.nil? - return false if @integration_yaml.nil? - return false if @enabled.nil? return false if @last_sync_at.nil? return false if @last_sync_at !~ Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/) return false if @created_at.nil? @@ -289,15 +236,11 @@ def ==(o) id == o.id && name == o.name && client_id == o.client_id && - open_api_spec == o.open_api_spec && - integration_yaml == o.integration_yaml && - enabled == o.enabled && - open_api_spec_url == o.open_api_spec_url && - integration_yamlurl == o.integration_yamlurl && last_sync_at == o.last_sync_at && created_at == o.created_at && updated_at == o.updated_at && - job_status == o.job_status + status == o.status && + state == o.state end # @see the `==` method @@ -309,7 +252,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, name, client_id, open_api_spec, integration_yaml, enabled, open_api_spec_url, integration_yamlurl, last_sync_at, created_at, updated_at, job_status].hash + [id, name, client_id, last_sync_at, created_at, updated_at, status, state].hash end # Builds the object from hash diff --git a/ruby/lib/composio/models/plan.rb b/ruby/lib/composio/models/plan.rb new file mode 100644 index 0000000..2efb7f9 --- /dev/null +++ b/ruby/lib/composio/models/plan.rb @@ -0,0 +1,38 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class Plan + HOBBY = "HOBBY".freeze + STARTER = "STARTER".freeze + GROWTH = "GROWTH".freeze + ENTERPRISE = "ENTERPRISE".freeze + + def self.all_vars + @all_vars ||= [HOBBY, STARTER, GROWTH, ENTERPRISE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if Plan.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Plan" + end + end +end diff --git a/ruby/lib/composio/models/role.rb b/ruby/lib/composio/models/role.rb new file mode 100644 index 0000000..d5fac46 --- /dev/null +++ b/ruby/lib/composio/models/role.rb @@ -0,0 +1,36 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class Role + ADMIN = "admin".freeze + DEVELOPER = "developer".freeze + + def self.all_vars + @all_vars ||= [ADMIN, DEVELOPER].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if Role.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #Role" + end + end +end diff --git a/ruby/lib/composio/models/state.rb b/ruby/lib/composio/models/state.rb new file mode 100644 index 0000000..298098a --- /dev/null +++ b/ruby/lib/composio/models/state.rb @@ -0,0 +1,41 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class State + PREPROCESS = "preprocess".freeze + VALIDATE = "validate".freeze + PREPARE = "prepare".freeze + BUILD = "build".freeze + PUSH = "push".freeze + LOAD = "load".freeze + FINISH = "finish".freeze + + def self.all_vars + @all_vars ||= [PREPROCESS, VALIDATE, PREPARE, BUILD, PUSH, LOAD, FINISH].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if State.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #State" + end + end +end diff --git a/ruby/lib/composio/models/status.rb b/ruby/lib/composio/models/status.rb index a0b778e..61ff5e5 100644 --- a/ruby/lib/composio/models/status.rb +++ b/ruby/lib/composio/models/status.rb @@ -11,12 +11,15 @@ module Composio class Status - ALL = "all".freeze - SUCCESS = "success".freeze - ERROR = "error".freeze + INITIALIZED = "initialized".freeze + RUNNING = "running".freeze + CACHING = "caching".freeze + CANCELLED = "cancelled".freeze + FINISHED = "finished".freeze + EXITED = "exited".freeze def self.all_vars - @all_vars ||= [ALL, SUCCESS, ERROR].freeze + @all_vars ||= [INITIALIZED, RUNNING, CACHING, CANCELLED, FINISHED, EXITED].freeze end # Builds the enum from string diff --git a/ruby/lib/composio/models/t_connection_count_dto.rb b/ruby/lib/composio/models/t_connection_count_dto.rb new file mode 100644 index 0000000..72a226e --- /dev/null +++ b/ruby/lib/composio/models/t_connection_count_dto.rb @@ -0,0 +1,236 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class TConnectionCountDTO + # Name of the entity + attr_accessor :client_unique_user_id + + # Count of connections for the entity + attr_accessor :count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_unique_user_id' => :'clientUniqueUserId', + :'count' => :'count' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_unique_user_id' => :'String', + :'count' => :'Float' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::TConnectionCountDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::TConnectionCountDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_unique_user_id') + self.client_unique_user_id = attributes[:'client_unique_user_id'] + end + + if attributes.key?(:'count') + self.count = attributes[:'count'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @client_unique_user_id.nil? + invalid_properties.push('invalid value for "client_unique_user_id", client_unique_user_id cannot be nil.') + end + + if @count.nil? + invalid_properties.push('invalid value for "count", count cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @client_unique_user_id.nil? + return false if @count.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_unique_user_id == o.client_unique_user_id && + count == o.count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_unique_user_id, count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/time_period_req_dto.rb b/ruby/lib/composio/models/time_period_req_dto.rb new file mode 100644 index 0000000..c51cbc6 --- /dev/null +++ b/ruby/lib/composio/models/time_period_req_dto.rb @@ -0,0 +1,216 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class TimePeriodReqDTO + # Time period to get the data for + attr_accessor :last_time_period + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'last_time_period' => :'lastTimePeriod' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'last_time_period' => :'LastTimePeriod' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::TimePeriodReqDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::TimePeriodReqDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'last_time_period') + self.last_time_period = attributes[:'last_time_period'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + last_time_period == o.last_time_period + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [last_time_period].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/top_entities_res_dto.rb b/ruby/lib/composio/models/top_entities_res_dto.rb new file mode 100644 index 0000000..6fde06f --- /dev/null +++ b/ruby/lib/composio/models/top_entities_res_dto.rb @@ -0,0 +1,223 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class TopEntitiesResDTO + # Top entities by connection count + attr_accessor :entities + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'entities' => :'entities' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'entities' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::TopEntitiesResDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::TopEntitiesResDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'entities') + if (value = attributes[:'entities']).is_a?(Array) + self.entities = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @entities.nil? + invalid_properties.push('invalid value for "entities", entities cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @entities.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + entities == o.entities + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [entities].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/update_member_req_dto.rb b/ruby/lib/composio/models/update_member_req_dto.rb new file mode 100644 index 0000000..02121c5 --- /dev/null +++ b/ruby/lib/composio/models/update_member_req_dto.rb @@ -0,0 +1,236 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class UpdateMemberReqDTO + # The uuid identifier for the member + attr_accessor :member_id + + # The role that is assigned to the member + attr_accessor :role + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'member_id' => :'memberId', + :'role' => :'role' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'member_id' => :'String', + :'role' => :'UpdateMemberReqDtoRole' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::UpdateMemberReqDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::UpdateMemberReqDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'member_id') + self.member_id = attributes[:'member_id'] + end + + if attributes.key?(:'role') + self.role = attributes[:'role'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @member_id.nil? + invalid_properties.push('invalid value for "member_id", member_id cannot be nil.') + end + + if @role.nil? + invalid_properties.push('invalid value for "role", role cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @member_id.nil? + return false if @role.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + member_id == o.member_id && + role == o.role + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [member_id, role].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/update_member_req_dto_role.rb b/ruby/lib/composio/models/update_member_req_dto_role.rb new file mode 100644 index 0000000..99c95a5 --- /dev/null +++ b/ruby/lib/composio/models/update_member_req_dto_role.rb @@ -0,0 +1,36 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class UpdateMemberReqDtoRole + ADMIN = "admin".freeze + DEVELOPER = "developer".freeze + + def self.all_vars + @all_vars ||= [ADMIN, DEVELOPER].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if UpdateMemberReqDtoRole.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #UpdateMemberReqDtoRole" + end + end +end diff --git a/ruby/lib/composio/models/webhook_req_dto.rb b/ruby/lib/composio/models/webhook_req_dto.rb new file mode 100644 index 0000000..0a30593 --- /dev/null +++ b/ruby/lib/composio/models/webhook_req_dto.rb @@ -0,0 +1,221 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class WebhookReqDTO + # Event Webhook URL + attr_accessor :event_webhook_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'event_webhook_url' => :'eventWebhookURL' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'event_webhook_url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::WebhookReqDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::WebhookReqDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'event_webhook_url') + self.event_webhook_url = attributes[:'event_webhook_url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @event_webhook_url.nil? + invalid_properties.push('invalid value for "event_webhook_url", event_webhook_url cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @event_webhook_url.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + event_webhook_url == o.event_webhook_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [event_webhook_url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/lib/composio/models/webhook_secret_res_dto.rb b/ruby/lib/composio/models/webhook_secret_res_dto.rb new file mode 100644 index 0000000..6fb6d74 --- /dev/null +++ b/ruby/lib/composio/models/webhook_secret_res_dto.rb @@ -0,0 +1,221 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'date' +require 'time' + +module Composio + class WebhookSecretResDTO + # Webhook secret + attr_accessor :webhook_secret + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'webhook_secret' => :'webhookSecret' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'webhook_secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::WebhookSecretResDTO` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::WebhookSecretResDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'webhook_secret') + self.webhook_secret = attributes[:'webhook_secret'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @webhook_secret.nil? + invalid_properties.push('invalid value for "webhook_secret", webhook_secret cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @webhook_secret.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + webhook_secret == o.webhook_secret + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [webhook_secret].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Composio.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/ruby/spec/api/actions_api_spec.rb b/ruby/spec/api/actions_api_spec.rb index d61ce7a..cc1000a 100644 --- a/ruby/spec/api/actions_api_spec.rb +++ b/ruby/spec/api/actions_api_spec.rb @@ -64,6 +64,19 @@ end end + # unit tests for get_action_inputs + # Get action inputs + # Get the inputs for an action with NLA + # @param action_id + # @param [Hash] opts the optional parameters + # @option opts [ActionGetNLAInputsReqDTO] :action_get_nla_inputs_req_dto ActionGetNLAInputsReqDTO + # @return [Object] + describe 'get_action_inputs test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for get_all_actions_based_on_query # List actions minimal # Retrieve a list of all actions based on query parameters. diff --git a/ruby/spec/api/analytics_api_spec.rb b/ruby/spec/api/analytics_api_spec.rb new file mode 100644 index 0000000..3c47e69 --- /dev/null +++ b/ruby/spec/api/analytics_api_spec.rb @@ -0,0 +1,51 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Composio::AnalyticsApi +describe 'AnalyticsApi' do + before do + # run before each test + @api_instance = Composio::AnalyticsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of AnalyticsApi' do + it 'should create an instance of AnalyticsApi' do + expect(@api_instance).to be_instance_of(Composio::AnalyticsApi) + end + end + + # unit tests for get + # Get analytics + # @param [Hash] opts the optional parameters + # @option opts [String] :last_time_period + # @return [AnalyticsDataResDTO] + describe 'get test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_top_entities + # Get top entities + # @param [Hash] opts the optional parameters + # @option opts [String] :query + # @return [TopEntitiesResDTO] + describe 'get_top_entities test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/api/apps_api_spec.rb b/ruby/spec/api/apps_api_spec.rb index 317f183..01778f6 100644 --- a/ruby/spec/api/apps_api_spec.rb +++ b/ruby/spec/api/apps_api_spec.rb @@ -26,6 +26,17 @@ end end + # unit tests for delete_open_api_spec_tool + # Delete open api spec tool + # @param id + # @param [Hash] opts the optional parameters + # @return [Object] + describe 'delete_open_api_spec_tool test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for get_details # Get app # Get app details @@ -38,6 +49,17 @@ end end + # unit tests for get_open_api_spec_status + # Get open api spec status + # @param id + # @param [Hash] opts the optional parameters + # @return [Object] + describe 'get_open_api_spec_status test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for list # Get apps # Retrieve a list of all applications based on query parameters. @@ -61,4 +83,16 @@ end end + # unit tests for send_email_to_client + # Send email to client + # @param [Hash] opts the optional parameters + # @option opts [String] :admin_token + # @option opts [Object] :body + # @return [Object] + describe 'send_email_to_client test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/ruby/spec/api/event_logs_api_spec.rb b/ruby/spec/api/event_logs_api_spec.rb new file mode 100644 index 0000000..40e3c5f --- /dev/null +++ b/ruby/spec/api/event_logs_api_spec.rb @@ -0,0 +1,83 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Composio::EventLogsApi +describe 'EventLogsApi' do + before do + # run before each test + @api_instance = Composio::EventLogsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of EventLogsApi' do + it 'should create an instance of EventLogsApi' do + expect(@api_instance).to be_instance_of(Composio::EventLogsApi) + end + end + + # unit tests for get_events + # Get events + # Fetch events from database + # @param start_time + # @param end_time + # @param [Hash] opts the optional parameters + # @return [Object] + describe 'get_events test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_webhook + # Get webhook + # @param [Hash] opts the optional parameters + # @return [Object] + describe 'get_webhook test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_webhook_secret + # Get webhook secret + # @param [Hash] opts the optional parameters + # @return [Object] + describe 'get_webhook_secret test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for refresh_webhook_secret + # Refresh webhook + # @param [Hash] opts the optional parameters + # @return [Object] + describe 'refresh_webhook_secret test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_webhook + # Update webhook + # @param [Hash] opts the optional parameters + # @option opts [WebhookReqDTO] :webhook_req_dto WebhookReqDTO + # @return [Object] + describe 'update_webhook test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/api/logs_api_spec.rb b/ruby/spec/api/logs_api_spec.rb index d129586..55ea81e 100644 --- a/ruby/spec/api/logs_api_spec.rb +++ b/ruby/spec/api/logs_api_spec.rb @@ -26,6 +26,18 @@ end end + # unit tests for add_new_logs + # Post logs + # Add new logs + # @param [Hash] opts the optional parameters + # @option opts [IngestDataDTO] :ingest_data_dto IngestDataDTO + # @return [IngestDataResponseDTO] + describe 'add_new_logs test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for list # Get logs # List logs @@ -38,7 +50,7 @@ # @option opts [String] :entity_id # @option opts [Float] :limit # @option opts [String] :cursor - # @option opts [String] :connection_id + # @option opts [String] :logs_type # @return [LogsResDTO] describe 'list test' do it 'should work' do diff --git a/ruby/spec/api/payment_api_spec.rb b/ruby/spec/api/payment_api_spec.rb new file mode 100644 index 0000000..d53386a --- /dev/null +++ b/ruby/spec/api/payment_api_spec.rb @@ -0,0 +1,83 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Composio::PaymentApi +describe 'PaymentApi' do + before do + # run before each test + @api_instance = Composio::PaymentApi.new + end + + after do + # run after each test + end + + describe 'test an instance of PaymentApi' do + it 'should create an instance of PaymentApi' do + expect(@api_instance).to be_instance_of(Composio::PaymentApi) + end + end + + # unit tests for create_checkout_session + # Create checkout session + # @param [Hash] opts the optional parameters + # @option opts [CreateCheckoutSessionReqDto] :create_checkout_session_req_dto CreateCheckoutSessionReqDto + # @return [Object] + describe 'create_checkout_session test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_checkout_session_status + # Get checkout session status + # @param session_id + # @param [Hash] opts the optional parameters + # @return [Object] + describe 'get_checkout_session_status test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_invoice + # Get invoice + # @param invoice_id + # @param [Hash] opts the optional parameters + # @return [Object] + describe 'get_invoice test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_invoices + # Get invoices + # @param [Hash] opts the optional parameters + # @return [Object] + describe 'get_invoices test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for handle_stripe_webhook + # Handle stripe webhook + # @param [Hash] opts the optional parameters + # @option opts [Object] :body + # @return [Object] + describe 'handle_stripe_webhook test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/action_analytics_dto_spec.rb b/ruby/spec/models/action_analytics_dto_spec.rb new file mode 100644 index 0000000..d01ee56 --- /dev/null +++ b/ruby/spec/models/action_analytics_dto_spec.rb @@ -0,0 +1,40 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::ActionAnalyticsDTO +describe Composio::ActionAnalyticsDTO do + let(:instance) { Composio::ActionAnalyticsDTO.new } + + describe 'test an instance of ActionAnalyticsDTO' do + it 'should create an instance of ActionAnalyticsDTO' do + expect(instance).to be_instance_of(Composio::ActionAnalyticsDTO) + end + end + describe 'test attribute "date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "by_app"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "by_status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/action_by_app_dto_spec.rb b/ruby/spec/models/action_by_app_dto_spec.rb new file mode 100644 index 0000000..64fc1c5 --- /dev/null +++ b/ruby/spec/models/action_by_app_dto_spec.rb @@ -0,0 +1,34 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::ActionByAppDTO +describe Composio::ActionByAppDTO do + let(:instance) { Composio::ActionByAppDTO.new } + + describe 'test an instance of ActionByAppDTO' do + it 'should create an instance of ActionByAppDTO' do + expect(instance).to be_instance_of(Composio::ActionByAppDTO) + end + end + describe 'test attribute "app_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "total_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/action_by_status_dto_spec.rb b/ruby/spec/models/action_by_status_dto_spec.rb new file mode 100644 index 0000000..cbe5b11 --- /dev/null +++ b/ruby/spec/models/action_by_status_dto_spec.rb @@ -0,0 +1,34 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::ActionByStatusDTO +describe Composio::ActionByStatusDTO do + let(:instance) { Composio::ActionByStatusDTO.new } + + describe 'test an instance of ActionByStatusDTO' do + it 'should create an instance of ActionByStatusDTO' do + expect(instance).to be_instance_of(Composio::ActionByStatusDTO) + end + end + describe 'test attribute "failed"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "success"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/action_get_nla_inputs_req_dto_spec.rb b/ruby/spec/models/action_get_nla_inputs_req_dto_spec.rb new file mode 100644 index 0000000..f854a38 --- /dev/null +++ b/ruby/spec/models/action_get_nla_inputs_req_dto_spec.rb @@ -0,0 +1,28 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::ActionGetNLAInputsReqDTO +describe Composio::ActionGetNLAInputsReqDTO do + let(:instance) { Composio::ActionGetNLAInputsReqDTO.new } + + describe 'test an instance of ActionGetNLAInputsReqDTO' do + it 'should create an instance of ActionGetNLAInputsReqDTO' do + expect(instance).to be_instance_of(Composio::ActionGetNLAInputsReqDTO) + end + end + describe 'test attribute "text"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/analytics_data_req_dto_spec.rb b/ruby/spec/models/analytics_data_req_dto_spec.rb new file mode 100644 index 0000000..735bd5e --- /dev/null +++ b/ruby/spec/models/analytics_data_req_dto_spec.rb @@ -0,0 +1,32 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::AnalyticsDataReqDTO +describe Composio::AnalyticsDataReqDTO do + let(:instance) { Composio::AnalyticsDataReqDTO.new } + + describe 'test an instance of AnalyticsDataReqDTO' do + it 'should create an instance of AnalyticsDataReqDTO' do + expect(instance).to be_instance_of(Composio::AnalyticsDataReqDTO) + end + end + describe 'test attribute "last_time_period"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DAY", "WEEK", "MONTH", "SIX_MONTH", "YEAR", "FIVE_YEAR"]) + # validator.allowable_values.each do |value| + # expect { instance.last_time_period = value }.not_to raise_error + # end + end + end + +end diff --git a/ruby/spec/models/analytics_data_res_dto_spec.rb b/ruby/spec/models/analytics_data_res_dto_spec.rb new file mode 100644 index 0000000..7c0834c --- /dev/null +++ b/ruby/spec/models/analytics_data_res_dto_spec.rb @@ -0,0 +1,52 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::AnalyticsDataResDTO +describe Composio::AnalyticsDataResDTO do + let(:instance) { Composio::AnalyticsDataResDTO.new } + + describe 'test an instance of AnalyticsDataResDTO' do + it 'should create an instance of AnalyticsDataResDTO' do + expect(instance).to be_instance_of(Composio::AnalyticsDataResDTO) + end + end + describe 'test attribute "entity"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "actions"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "trigger"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "integrations"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "app"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/analytics_entity_data_dto_spec.rb b/ruby/spec/models/analytics_entity_data_dto_spec.rb new file mode 100644 index 0000000..b000738 --- /dev/null +++ b/ruby/spec/models/analytics_entity_data_dto_spec.rb @@ -0,0 +1,40 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::AnalyticsEntityDataDTO +describe Composio::AnalyticsEntityDataDTO do + let(:instance) { Composio::AnalyticsEntityDataDTO.new } + + describe 'test an instance of AnalyticsEntityDataDTO' do + it 'should create an instance of AnalyticsEntityDataDTO' do + expect(instance).to be_instance_of(Composio::AnalyticsEntityDataDTO) + end + end + describe 'test attribute "by_connections"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "by_actions"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "by_triggers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/api_key_res_dto_spec.rb b/ruby/spec/models/api_key_res_dto_spec.rb index 94739a5..12cf112 100644 --- a/ruby/spec/models/api_key_res_dto_spec.rb +++ b/ruby/spec/models/api_key_res_dto_spec.rb @@ -49,4 +49,22 @@ end end + describe 'test attribute "is_hidden"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "last_used"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "member"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/ruby/spec/models/app_name_count_dto_spec.rb b/ruby/spec/models/app_name_count_dto_spec.rb new file mode 100644 index 0000000..fafa9e2 --- /dev/null +++ b/ruby/spec/models/app_name_count_dto_spec.rb @@ -0,0 +1,46 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::AppNameCountDTO +describe Composio::AppNameCountDTO do + let(:instance) { Composio::AppNameCountDTO.new } + + describe 'test an instance of AppNameCountDTO' do + it 'should create an instance of AppNameCountDTO' do + expect(instance).to be_instance_of(Composio::AppNameCountDTO) + end + end + describe 'test attribute "app_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "connection_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "trigger_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "request_logs_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/client_unique_user_id_count_dto_spec.rb b/ruby/spec/models/client_unique_user_id_count_dto_spec.rb new file mode 100644 index 0000000..b8f2815 --- /dev/null +++ b/ruby/spec/models/client_unique_user_id_count_dto_spec.rb @@ -0,0 +1,34 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::ClientUniqueUserIdCountDTO +describe Composio::ClientUniqueUserIdCountDTO do + let(:instance) { Composio::ClientUniqueUserIdCountDTO.new } + + describe 'test an instance of ClientUniqueUserIdCountDTO' do + it 'should create an instance of ClientUniqueUserIdCountDTO' do + expect(instance).to be_instance_of(Composio::ClientUniqueUserIdCountDTO) + end + end + describe 'test attribute "client_unique_user_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/connected_account_response_dto_spec.rb b/ruby/spec/models/connected_account_response_dto_spec.rb index 019dda9..f64a867 100644 --- a/ruby/spec/models/connected_account_response_dto_spec.rb +++ b/ruby/spec/models/connected_account_response_dto_spec.rb @@ -31,6 +31,12 @@ end end + describe 'test attribute "member_info"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "meta"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/ruby/spec/models/connection_params_spec.rb b/ruby/spec/models/connection_params_spec.rb index 751a8bd..fbc6cc4 100644 --- a/ruby/spec/models/connection_params_spec.rb +++ b/ruby/spec/models/connection_params_spec.rb @@ -115,4 +115,10 @@ end end + describe 'test attribute "member"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/ruby/spec/models/connection_with_app_data_spec.rb b/ruby/spec/models/connection_with_app_data_spec.rb index 5d36614..9b4467e 100644 --- a/ruby/spec/models/connection_with_app_data_spec.rb +++ b/ruby/spec/models/connection_with_app_data_spec.rb @@ -97,4 +97,10 @@ end end + describe 'test attribute "member"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/ruby/spec/models/connector_list_item_dto_spec.rb b/ruby/spec/models/connector_list_item_dto_spec.rb index a43b009..c53db19 100644 --- a/ruby/spec/models/connector_list_item_dto_spec.rb +++ b/ruby/spec/models/connector_list_item_dto_spec.rb @@ -43,6 +43,12 @@ end end + describe 'test attribute "member"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "name"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/ruby/spec/models/create_checkout_session_req_dto_spec.rb b/ruby/spec/models/create_checkout_session_req_dto_spec.rb new file mode 100644 index 0000000..1e87115 --- /dev/null +++ b/ruby/spec/models/create_checkout_session_req_dto_spec.rb @@ -0,0 +1,28 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::CreateCheckoutSessionReqDto +describe Composio::CreateCheckoutSessionReqDto do + let(:instance) { Composio::CreateCheckoutSessionReqDto.new } + + describe 'test an instance of CreateCheckoutSessionReqDto' do + it 'should create an instance of CreateCheckoutSessionReqDto' do + expect(instance).to be_instance_of(Composio::CreateCheckoutSessionReqDto) + end + end + describe 'test attribute "plan"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/entity_query_req_dto_spec.rb b/ruby/spec/models/entity_query_req_dto_spec.rb new file mode 100644 index 0000000..04bdc23 --- /dev/null +++ b/ruby/spec/models/entity_query_req_dto_spec.rb @@ -0,0 +1,28 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::EntityQueryReqDTO +describe Composio::EntityQueryReqDTO do + let(:instance) { Composio::EntityQueryReqDTO.new } + + describe 'test an instance of EntityQueryReqDTO' do + it 'should create an instance of EntityQueryReqDTO' do + expect(instance).to be_instance_of(Composio::EntityQueryReqDTO) + end + end + describe 'test attribute "query"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/fetch_query_dto_spec.rb b/ruby/spec/models/fetch_query_dto_spec.rb new file mode 100644 index 0000000..dda6154 --- /dev/null +++ b/ruby/spec/models/fetch_query_dto_spec.rb @@ -0,0 +1,34 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::FetchQueryDTO +describe Composio::FetchQueryDTO do + let(:instance) { Composio::FetchQueryDTO.new } + + describe 'test an instance of FetchQueryDTO' do + it 'should create an instance of FetchQueryDTO' do + expect(instance).to be_instance_of(Composio::FetchQueryDTO) + end + end + describe 'test attribute "start_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "end_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/get_logs_dto_spec.rb b/ruby/spec/models/get_logs_dto_spec.rb index ed294a0..640a966 100644 --- a/ruby/spec/models/get_logs_dto_spec.rb +++ b/ruby/spec/models/get_logs_dto_spec.rb @@ -67,7 +67,7 @@ end end - describe 'test attribute "connection_id"' do + describe 'test attribute "logs_type"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/ruby/spec/models/get_logs_dto_status_spec.rb b/ruby/spec/models/get_logs_dto_status_spec.rb new file mode 100644 index 0000000..4346850 --- /dev/null +++ b/ruby/spec/models/get_logs_dto_status_spec.rb @@ -0,0 +1,22 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::GetLogsDtoStatus +describe Composio::GetLogsDtoStatus do + let(:instance) { Composio::GetLogsDtoStatus.new } + + describe 'test an instance of GetLogsDtoStatus' do + it 'should create an instance of GetLogsDtoStatus' do + expect(instance).to be_instance_of(Composio::GetLogsDtoStatus) + end + end +end diff --git a/ruby/spec/models/ingest_data_dto_spec.rb b/ruby/spec/models/ingest_data_dto_spec.rb new file mode 100644 index 0000000..9761cb1 --- /dev/null +++ b/ruby/spec/models/ingest_data_dto_spec.rb @@ -0,0 +1,64 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::IngestDataDTO +describe Composio::IngestDataDTO do + let(:instance) { Composio::IngestDataDTO.new } + + describe 'test an instance of IngestDataDTO' do + it 'should create an instance of IngestDataDTO' do + expect(instance).to be_instance_of(Composio::IngestDataDTO) + end + end + describe 'test attribute "connection_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "entity_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "provider_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "action_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "request"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "response"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "is_error"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/ingest_data_response_dto_spec.rb b/ruby/spec/models/ingest_data_response_dto_spec.rb new file mode 100644 index 0000000..7735139 --- /dev/null +++ b/ruby/spec/models/ingest_data_response_dto_spec.rb @@ -0,0 +1,28 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::IngestDataResponseDTO +describe Composio::IngestDataResponseDTO do + let(:instance) { Composio::IngestDataResponseDTO.new } + + describe 'test an instance of IngestDataResponseDTO' do + it 'should create an instance of IngestDataResponseDTO' do + expect(instance).to be_instance_of(Composio::IngestDataResponseDTO) + end + end + describe 'test attribute "is_ingested"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/integrations_with_counts_dto_spec.rb b/ruby/spec/models/integrations_with_counts_dto_spec.rb new file mode 100644 index 0000000..c8756f7 --- /dev/null +++ b/ruby/spec/models/integrations_with_counts_dto_spec.rb @@ -0,0 +1,58 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::IntegrationsWithCountsDTO +describe Composio::IntegrationsWithCountsDTO do + let(:instance) { Composio::IntegrationsWithCountsDTO.new } + + describe 'test an instance of IntegrationsWithCountsDTO' do + it 'should create an instance of IntegrationsWithCountsDTO' do + expect(instance).to be_instance_of(Composio::IntegrationsWithCountsDTO) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "app_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "integration_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "connection_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "trigger_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "request_logs_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/invite_member_req_dto_spec.rb b/ruby/spec/models/invite_member_req_dto_spec.rb index 7ae1146..4c28a22 100644 --- a/ruby/spec/models/invite_member_req_dto_spec.rb +++ b/ruby/spec/models/invite_member_req_dto_spec.rb @@ -37,4 +37,10 @@ end end + describe 'test attribute "role"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + end diff --git a/ruby/spec/models/job_status_spec.rb b/ruby/spec/models/job_status_spec.rb deleted file mode 100644 index 1b114da..0000000 --- a/ruby/spec/models/job_status_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -=begin -#Composio OpenAPI - -#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase - -The version of the OpenAPI document: 1.0.0 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Composio::JobStatus -describe Composio::JobStatus do - let(:instance) { Composio::JobStatus.new } - - describe 'test an instance of JobStatus' do - it 'should create an instance of JobStatus' do - expect(instance).to be_instance_of(Composio::JobStatus) - end - end -end diff --git a/ruby/spec/models/last_time_period_spec.rb b/ruby/spec/models/last_time_period_spec.rb new file mode 100644 index 0000000..0268b19 --- /dev/null +++ b/ruby/spec/models/last_time_period_spec.rb @@ -0,0 +1,22 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::LastTimePeriod +describe Composio::LastTimePeriod do + let(:instance) { Composio::LastTimePeriod.new } + + describe 'test an instance of LastTimePeriod' do + it 'should create an instance of LastTimePeriod' do + expect(instance).to be_instance_of(Composio::LastTimePeriod) + end + end +end diff --git a/ruby/spec/models/connection_with_app_data_created_at_spec.rb b/ruby/spec/models/member_info_res_dto_created_at_spec.rb similarity index 80% rename from ruby/spec/models/connection_with_app_data_created_at_spec.rb rename to ruby/spec/models/member_info_res_dto_created_at_spec.rb index 5314587..ae56a86 100644 --- a/ruby/spec/models/connection_with_app_data_created_at_spec.rb +++ b/ruby/spec/models/member_info_res_dto_created_at_spec.rb @@ -10,8 +10,8 @@ require 'json' require 'date' -# Unit tests for Composio::ConnectionWithAppDataCreatedAt -describe Composio::ConnectionWithAppDataCreatedAt do +# Unit tests for Composio::MemberInfoResDTOCreatedAt +describe Composio::MemberInfoResDTOCreatedAt do describe '.openapi_one_of' do it 'lists the items referenced in the oneOf array' do expect(described_class.openapi_one_of).to_not be_empty diff --git a/ruby/spec/models/member_info_res_dto_spec.rb b/ruby/spec/models/member_info_res_dto_spec.rb new file mode 100644 index 0000000..90b152b --- /dev/null +++ b/ruby/spec/models/member_info_res_dto_spec.rb @@ -0,0 +1,76 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::MemberInfoResDTO +describe Composio::MemberInfoResDTO do + let(:instance) { Composio::MemberInfoResDTO.new } + + describe 'test an instance of MemberInfoResDTO' do + it 'should create an instance of MemberInfoResDTO' do + expect(instance).to be_instance_of(Composio::MemberInfoResDTO) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "client_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "role"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "deleted_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/member_res_dto_role_spec.rb b/ruby/spec/models/member_res_dto_role_spec.rb new file mode 100644 index 0000000..24d5993 --- /dev/null +++ b/ruby/spec/models/member_res_dto_role_spec.rb @@ -0,0 +1,22 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::MemberResDtoRole +describe Composio::MemberResDtoRole do + let(:instance) { Composio::MemberResDtoRole.new } + + describe 'test an instance of MemberResDtoRole' do + it 'should create an instance of MemberResDtoRole' do + expect(instance).to be_instance_of(Composio::MemberResDtoRole) + end + end +end diff --git a/ruby/spec/models/member_res_dto_spec.rb b/ruby/spec/models/member_res_dto_spec.rb index c63ac3c..440aec4 100644 --- a/ruby/spec/models/member_res_dto_spec.rb +++ b/ruby/spec/models/member_res_dto_spec.rb @@ -43,6 +43,12 @@ end end + describe 'test attribute "role"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "updated_at"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/ruby/spec/models/open_api_spec_list_res_dto_spec.rb b/ruby/spec/models/open_api_spec_list_res_dto_spec.rb index 9023501..cc4c814 100644 --- a/ruby/spec/models/open_api_spec_list_res_dto_spec.rb +++ b/ruby/spec/models/open_api_spec_list_res_dto_spec.rb @@ -37,55 +37,31 @@ end end - describe 'test attribute "open_api_spec"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "integration_yaml"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "enabled"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "open_api_spec_url"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "integration_yamlurl"' do + describe 'test attribute "last_sync_at"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "last_sync_at"' do + describe 'test attribute "created_at"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "created_at"' do + describe 'test attribute "updated_at"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "updated_at"' do + describe 'test attribute "status"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "job_status"' do + describe 'test attribute "state"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/ruby/spec/models/plan_spec.rb b/ruby/spec/models/plan_spec.rb new file mode 100644 index 0000000..f18f7ad --- /dev/null +++ b/ruby/spec/models/plan_spec.rb @@ -0,0 +1,22 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::Plan +describe Composio::Plan do + let(:instance) { Composio::Plan.new } + + describe 'test an instance of Plan' do + it 'should create an instance of Plan' do + expect(instance).to be_instance_of(Composio::Plan) + end + end +end diff --git a/ruby/spec/models/role_spec.rb b/ruby/spec/models/role_spec.rb new file mode 100644 index 0000000..19c1a90 --- /dev/null +++ b/ruby/spec/models/role_spec.rb @@ -0,0 +1,22 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::Role +describe Composio::Role do + let(:instance) { Composio::Role.new } + + describe 'test an instance of Role' do + it 'should create an instance of Role' do + expect(instance).to be_instance_of(Composio::Role) + end + end +end diff --git a/ruby/spec/models/state_spec.rb b/ruby/spec/models/state_spec.rb new file mode 100644 index 0000000..c6e6cde --- /dev/null +++ b/ruby/spec/models/state_spec.rb @@ -0,0 +1,22 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::State +describe Composio::State do + let(:instance) { Composio::State.new } + + describe 'test an instance of State' do + it 'should create an instance of State' do + expect(instance).to be_instance_of(Composio::State) + end + end +end diff --git a/ruby/spec/models/t_connection_count_dto_spec.rb b/ruby/spec/models/t_connection_count_dto_spec.rb new file mode 100644 index 0000000..72eb5fd --- /dev/null +++ b/ruby/spec/models/t_connection_count_dto_spec.rb @@ -0,0 +1,34 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::TConnectionCountDTO +describe Composio::TConnectionCountDTO do + let(:instance) { Composio::TConnectionCountDTO.new } + + describe 'test an instance of TConnectionCountDTO' do + it 'should create an instance of TConnectionCountDTO' do + expect(instance).to be_instance_of(Composio::TConnectionCountDTO) + end + end + describe 'test attribute "client_unique_user_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/time_period_req_dto_spec.rb b/ruby/spec/models/time_period_req_dto_spec.rb new file mode 100644 index 0000000..f5a2b2d --- /dev/null +++ b/ruby/spec/models/time_period_req_dto_spec.rb @@ -0,0 +1,28 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::TimePeriodReqDTO +describe Composio::TimePeriodReqDTO do + let(:instance) { Composio::TimePeriodReqDTO.new } + + describe 'test an instance of TimePeriodReqDTO' do + it 'should create an instance of TimePeriodReqDTO' do + expect(instance).to be_instance_of(Composio::TimePeriodReqDTO) + end + end + describe 'test attribute "last_time_period"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/top_entities_res_dto_spec.rb b/ruby/spec/models/top_entities_res_dto_spec.rb new file mode 100644 index 0000000..4dc5e27 --- /dev/null +++ b/ruby/spec/models/top_entities_res_dto_spec.rb @@ -0,0 +1,28 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::TopEntitiesResDTO +describe Composio::TopEntitiesResDTO do + let(:instance) { Composio::TopEntitiesResDTO.new } + + describe 'test an instance of TopEntitiesResDTO' do + it 'should create an instance of TopEntitiesResDTO' do + expect(instance).to be_instance_of(Composio::TopEntitiesResDTO) + end + end + describe 'test attribute "entities"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/update_member_req_dto_role_spec.rb b/ruby/spec/models/update_member_req_dto_role_spec.rb new file mode 100644 index 0000000..3f0186e --- /dev/null +++ b/ruby/spec/models/update_member_req_dto_role_spec.rb @@ -0,0 +1,22 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::UpdateMemberReqDtoRole +describe Composio::UpdateMemberReqDtoRole do + let(:instance) { Composio::UpdateMemberReqDtoRole.new } + + describe 'test an instance of UpdateMemberReqDtoRole' do + it 'should create an instance of UpdateMemberReqDtoRole' do + expect(instance).to be_instance_of(Composio::UpdateMemberReqDtoRole) + end + end +end diff --git a/ruby/spec/models/update_member_req_dto_spec.rb b/ruby/spec/models/update_member_req_dto_spec.rb new file mode 100644 index 0000000..c7a20c6 --- /dev/null +++ b/ruby/spec/models/update_member_req_dto_spec.rb @@ -0,0 +1,34 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::UpdateMemberReqDTO +describe Composio::UpdateMemberReqDTO do + let(:instance) { Composio::UpdateMemberReqDTO.new } + + describe 'test an instance of UpdateMemberReqDTO' do + it 'should create an instance of UpdateMemberReqDTO' do + expect(instance).to be_instance_of(Composio::UpdateMemberReqDTO) + end + end + describe 'test attribute "member_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "role"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/webhook_req_dto_spec.rb b/ruby/spec/models/webhook_req_dto_spec.rb new file mode 100644 index 0000000..99ee505 --- /dev/null +++ b/ruby/spec/models/webhook_req_dto_spec.rb @@ -0,0 +1,28 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::WebhookReqDTO +describe Composio::WebhookReqDTO do + let(:instance) { Composio::WebhookReqDTO.new } + + describe 'test an instance of WebhookReqDTO' do + it 'should create an instance of WebhookReqDTO' do + expect(instance).to be_instance_of(Composio::WebhookReqDTO) + end + end + describe 'test attribute "event_webhook_url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/ruby/spec/models/webhook_secret_res_dto_spec.rb b/ruby/spec/models/webhook_secret_res_dto_spec.rb new file mode 100644 index 0000000..bd19aa6 --- /dev/null +++ b/ruby/spec/models/webhook_secret_res_dto_spec.rb @@ -0,0 +1,28 @@ +=begin +#Composio OpenAPI + +#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase + +The version of the OpenAPI document: 1.0.0 +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Composio::WebhookSecretResDTO +describe Composio::WebhookSecretResDTO do + let(:instance) { Composio::WebhookSecretResDTO.new } + + describe 'test an instance of WebhookSecretResDTO' do + it 'should create an instance of WebhookSecretResDTO' do + expect(instance).to be_instance_of(Composio::WebhookSecretResDTO) + end + end + describe 'test attribute "webhook_secret"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end