composio 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +93 -0
- data/README.md +1779 -0
- data/Rakefile +10 -0
- data/composio.gemspec +39 -0
- data/header.png +0 -0
- data/lib/composio/api/actions_api.rb +1062 -0
- data/lib/composio/api/api_keys_api.rb +268 -0
- data/lib/composio/api/apps_api.rb +266 -0
- data/lib/composio/api/auth_api.rb +370 -0
- data/lib/composio/api/cli_api.rb +266 -0
- data/lib/composio/api/connections_api.rb +591 -0
- data/lib/composio/api/integrations_api.rb +578 -0
- data/lib/composio/api/logs_api.rb +166 -0
- data/lib/composio/api/metadata_api.rb +180 -0
- data/lib/composio/api/team_api.rb +188 -0
- data/lib/composio/api/triggers_api.rb +1222 -0
- data/lib/composio/api_client.rb +436 -0
- data/lib/composio/api_client_custom.rb +14 -0
- data/lib/composio/api_error.rb +53 -0
- data/lib/composio/configuration.rb +330 -0
- data/lib/composio/models/action_details.rb +357 -0
- data/lib/composio/models/action_details_minimal.rb +329 -0
- data/lib/composio/models/action_execution_req_dto.rb +260 -0
- data/lib/composio/models/action_execution_res_dto.rb +238 -0
- data/lib/composio/models/action_log_data.rb +345 -0
- data/lib/composio/models/action_metadata.rb +402 -0
- data/lib/composio/models/action_metadata_type.rb +101 -0
- data/lib/composio/models/actions_controller_v1.rb +222 -0
- data/lib/composio/models/actions_list_response_dto.rb +250 -0
- data/lib/composio/models/actions_minimal_list_response_dto.rb +250 -0
- data/lib/composio/models/actions_query_dto.rb +300 -0
- data/lib/composio/models/active_trigger_instance.rb +311 -0
- data/lib/composio/models/active_triggers_res_dto.rb +238 -0
- data/lib/composio/models/add_repo_url_req_dto.rb +221 -0
- data/lib/composio/models/add_repo_url_res_dto.rb +221 -0
- data/lib/composio/models/add_tools_req_dto.rb +251 -0
- data/lib/composio/models/add_tools_request_dto.rb +251 -0
- data/lib/composio/models/api_key_res_dto.rb +323 -0
- data/lib/composio/models/app_info_response_dto.rb +323 -0
- data/lib/composio/models/app_list_res_dto.rb +238 -0
- data/lib/composio/models/app_query_dto.rb +216 -0
- data/lib/composio/models/auth_config_dto.rb +229 -0
- data/lib/composio/models/cli_query_dto.rb +231 -0
- data/lib/composio/models/connected_account_response_dto.rb +331 -0
- data/lib/composio/models/connection_params.rb +395 -0
- data/lib/composio/models/connection_params_for_account.rb +323 -0
- data/lib/composio/models/connection_params_headers.rb +224 -0
- data/lib/composio/models/connection_with_app_data.rb +358 -0
- data/lib/composio/models/connection_with_app_data_created_at.rb +101 -0
- data/lib/composio/models/connector_list_item_dto.rb +376 -0
- data/lib/composio/models/connector_list_item_dto_created_at.rb +102 -0
- data/lib/composio/models/connector_list_item_dto_updated_at.rb +102 -0
- data/lib/composio/models/create_connector_payload_dto.rb +274 -0
- data/lib/composio/models/create_connector_payload_dto_use_composio_auth.rb +226 -0
- data/lib/composio/models/delete_api_key_req_dto.rb +221 -0
- data/lib/composio/models/delete_api_key_response_dto.rb +221 -0
- data/lib/composio/models/delete_row_apidto.rb +236 -0
- data/lib/composio/models/delete_tools_req_dto.rb +221 -0
- data/lib/composio/models/delete_tools_res_dto.rb +221 -0
- data/lib/composio/models/direct_execute_req_dto.rb +262 -0
- data/lib/composio/models/enable_trigger_body_dto.rb +221 -0
- data/lib/composio/models/enable_trigger_params_dto.rb +236 -0
- data/lib/composio/models/execute_action_res_dto.rb +236 -0
- data/lib/composio/models/generate_api_key_req_dto.rb +221 -0
- data/lib/composio/models/generate_cli_session_req_dto.rb +221 -0
- data/lib/composio/models/generate_cli_session_res_dto.rb +221 -0
- data/lib/composio/models/get_active_triggers_query_dto.rb +276 -0
- data/lib/composio/models/get_cli_session_res_dto.rb +236 -0
- data/lib/composio/models/get_connections_query_dto.rb +287 -0
- data/lib/composio/models/get_connections_response_dto.rb +250 -0
- data/lib/composio/models/get_connections_result.rb +236 -0
- data/lib/composio/models/get_connector_info_res_dto.rb +417 -0
- data/lib/composio/models/get_connector_list_res_dto.rb +253 -0
- data/lib/composio/models/get_logs_dto.rb +288 -0
- data/lib/composio/models/get_logs_query_dto.rb +246 -0
- data/lib/composio/models/get_trigger_params_dto.rb +221 -0
- data/lib/composio/models/get_trigger_response_dto.rb +230 -0
- data/lib/composio/models/handle_trigger_body_dto.rb +221 -0
- data/lib/composio/models/handle_trigger_params_dto.rb +236 -0
- data/lib/composio/models/identify_client_req_dto.rb +231 -0
- data/lib/composio/models/identify_client_res_dto.rb +251 -0
- data/lib/composio/models/initiate_connection_payload_dto.rb +281 -0
- data/lib/composio/models/initiate_connection_response.rb +272 -0
- data/lib/composio/models/invite_member_req_dto.rb +251 -0
- data/lib/composio/models/job_status.rb +37 -0
- data/lib/composio/models/list_triggers_query_dto.rb +246 -0
- data/lib/composio/models/logout_res_dto.rb +221 -0
- data/lib/composio/models/logs_res_dto.rb +233 -0
- data/lib/composio/models/magic_link_req_dto.rb +236 -0
- data/lib/composio/models/magic_link_res_dto.rb +220 -0
- data/lib/composio/models/member_res_dto.rb +305 -0
- data/lib/composio/models/meta.rb +220 -0
- data/lib/composio/models/meta_app.rb +220 -0
- data/lib/composio/models/metadata_query_dto.rb +221 -0
- data/lib/composio/models/metadata_req_dto.rb +232 -0
- data/lib/composio/models/o_auth2_callback_query_dto.rb +220 -0
- data/lib/composio/models/open_api_spec_list_res_dto.rb +436 -0
- data/lib/composio/models/page_info.rb +338 -0
- data/lib/composio/models/page_info_dto.rb +248 -0
- data/lib/composio/models/patch_connector_req_dto.rb +226 -0
- data/lib/composio/models/patch_connector_res_dto.rb +221 -0
- data/lib/composio/models/proxy_execution_req_dto.rb +234 -0
- data/lib/composio/models/redirect_uri_dto.rb +215 -0
- data/lib/composio/models/set_callback_url_body_dto.rb +221 -0
- data/lib/composio/models/single_app_info_res_dto.rb +394 -0
- data/lib/composio/models/single_trigger_res_dto.rb +336 -0
- data/lib/composio/models/status.rb +37 -0
- data/lib/composio/models/switch_trigger_status_body_dto.rb +221 -0
- data/lib/composio/models/switch_trigger_status_params_dto.rb +221 -0
- data/lib/composio/models/time.rb +41 -0
- data/lib/composio/models/toggle_connected_account_response_dto.rb +220 -0
- data/lib/composio/models/toggle_trigger_state_response_dto.rb +220 -0
- data/lib/composio/models/tools_execute_req_dto.rb +275 -0
- data/lib/composio/models/track_client_req_dto.rb +240 -0
- data/lib/composio/models/track_client_res_dto.rb +221 -0
- data/lib/composio/models/trigger_config.rb +237 -0
- data/lib/composio/models/trigger_instance_params_dto.rb +221 -0
- data/lib/composio/models/trigger_log_data.rb +345 -0
- data/lib/composio/models/trigger_log_item_dto.rb +336 -0
- data/lib/composio/models/trigger_logs_res_dto.rb +236 -0
- data/lib/composio/models/trigger_metadata.rb +402 -0
- data/lib/composio/models/trigger_metadata_dto.rb +347 -0
- data/lib/composio/models/trigger_metadata_type.rb +101 -0
- data/lib/composio/models/trigger_res_dto.rb +361 -0
- data/lib/composio/models/trigger_response_dto.rb +241 -0
- data/lib/composio/models/trigger_toggle_info_response_dto.rb +221 -0
- data/lib/composio/models/triggers_enabled_toggle_req_dto.rb +221 -0
- data/lib/composio/models/triggers_enabled_toggle_res_dto.rb +221 -0
- data/lib/composio/models/type.rb +37 -0
- data/lib/composio/models/user_git_user_info.rb +230 -0
- data/lib/composio/models/verify_cli_code_res_dto.rb +251 -0
- data/lib/composio/models/verify_magic_link_data_dto.rb +263 -0
- data/lib/composio/models/verify_magic_link_req_dto.rb +221 -0
- data/lib/composio/models/verify_magic_link_res_dto.rb +230 -0
- data/lib/composio/models/webhook_url_response_dto.rb +231 -0
- data/lib/composio/version.rb +11 -0
- data/lib/composio.rb +214 -0
- data/spec/api/actions_api_spec.rb +164 -0
- data/spec/api/api_keys_api_spec.rb +61 -0
- data/spec/api/apps_api_spec.rb +63 -0
- data/spec/api/auth_api_spec.rb +73 -0
- data/spec/api/cli_api_spec.rb +63 -0
- data/spec/api/connections_api_spec.rb +103 -0
- data/spec/api/integrations_api_spec.rb +96 -0
- data/spec/api/logs_api_spec.rb +48 -0
- data/spec/api/metadata_api_spec.rb +50 -0
- data/spec/api/team_api_spec.rb +50 -0
- data/spec/api/triggers_api_spec.rb +188 -0
- data/spec/api_client_spec.rb +191 -0
- data/spec/configuration_spec.rb +38 -0
- data/spec/models/action_details_minimal_spec.rb +76 -0
- data/spec/models/action_details_spec.rb +88 -0
- data/spec/models/action_execution_req_dto_spec.rb +58 -0
- data/spec/models/action_execution_res_dto_spec.rb +40 -0
- data/spec/models/action_log_data_spec.rb +70 -0
- data/spec/models/action_metadata_spec.rb +88 -0
- data/spec/models/action_metadata_type_spec.rb +25 -0
- data/spec/models/actions_controller_v1_spec.rb +28 -0
- data/spec/models/actions_list_response_dto_spec.rb +40 -0
- data/spec/models/actions_minimal_list_response_dto_spec.rb +40 -0
- data/spec/models/actions_query_dto_spec.rb +82 -0
- data/spec/models/active_trigger_instance_spec.rb +70 -0
- data/spec/models/active_triggers_res_dto_spec.rb +34 -0
- data/spec/models/add_repo_url_req_dto_spec.rb +28 -0
- data/spec/models/add_repo_url_res_dto_spec.rb +28 -0
- data/spec/models/add_tools_req_dto_spec.rb +40 -0
- data/spec/models/add_tools_request_dto_spec.rb +40 -0
- data/spec/models/api_key_res_dto_spec.rb +52 -0
- data/spec/models/app_info_response_dto_spec.rb +70 -0
- data/spec/models/app_list_res_dto_spec.rb +34 -0
- data/spec/models/app_query_dto_spec.rb +28 -0
- data/spec/models/auth_config_dto_spec.rb +34 -0
- data/spec/models/cli_query_dto_spec.rb +34 -0
- data/spec/models/connected_account_response_dto_spec.rb +82 -0
- data/spec/models/connection_params_for_account_spec.rb +100 -0
- data/spec/models/connection_params_headers_spec.rb +34 -0
- data/spec/models/connection_params_spec.rb +118 -0
- data/spec/models/connection_with_app_data_created_at_spec.rb +25 -0
- data/spec/models/connection_with_app_data_spec.rb +100 -0
- data/spec/models/connector_list_item_dto_created_at_spec.rb +25 -0
- data/spec/models/connector_list_item_dto_spec.rb +94 -0
- data/spec/models/connector_list_item_dto_updated_at_spec.rb +25 -0
- data/spec/models/create_connector_payload_dto_spec.rb +58 -0
- data/spec/models/create_connector_payload_dto_use_composio_auth_spec.rb +22 -0
- data/spec/models/delete_api_key_req_dto_spec.rb +28 -0
- data/spec/models/delete_api_key_response_dto_spec.rb +28 -0
- data/spec/models/delete_row_apidto_spec.rb +34 -0
- data/spec/models/delete_tools_req_dto_spec.rb +28 -0
- data/spec/models/delete_tools_res_dto_spec.rb +28 -0
- data/spec/models/direct_execute_req_dto_spec.rb +46 -0
- data/spec/models/enable_trigger_body_dto_spec.rb +28 -0
- data/spec/models/enable_trigger_params_dto_spec.rb +34 -0
- data/spec/models/execute_action_res_dto_spec.rb +34 -0
- data/spec/models/generate_api_key_req_dto_spec.rb +28 -0
- data/spec/models/generate_cli_session_req_dto_spec.rb +28 -0
- data/spec/models/generate_cli_session_res_dto_spec.rb +28 -0
- data/spec/models/get_active_triggers_query_dto_spec.rb +64 -0
- data/spec/models/get_cli_session_res_dto_spec.rb +34 -0
- data/spec/models/get_connections_query_dto_spec.rb +76 -0
- data/spec/models/get_connections_response_dto_spec.rb +40 -0
- data/spec/models/get_connections_result_spec.rb +34 -0
- data/spec/models/get_connector_info_res_dto_spec.rb +106 -0
- data/spec/models/get_connector_list_res_dto_spec.rb +40 -0
- data/spec/models/get_logs_dto_spec.rb +70 -0
- data/spec/models/get_logs_query_dto_spec.rb +46 -0
- data/spec/models/get_trigger_params_dto_spec.rb +28 -0
- data/spec/models/get_trigger_response_dto_spec.rb +34 -0
- data/spec/models/handle_trigger_body_dto_spec.rb +28 -0
- data/spec/models/handle_trigger_params_dto_spec.rb +34 -0
- data/spec/models/identify_client_req_dto_spec.rb +34 -0
- data/spec/models/identify_client_res_dto_spec.rb +40 -0
- data/spec/models/initiate_connection_payload_dto_spec.rb +46 -0
- data/spec/models/initiate_connection_response_spec.rb +34 -0
- data/spec/models/invite_member_req_dto_spec.rb +40 -0
- data/spec/models/job_status_spec.rb +22 -0
- data/spec/models/list_triggers_query_dto_spec.rb +46 -0
- data/spec/models/logout_res_dto_spec.rb +28 -0
- data/spec/models/logs_res_dto_spec.rb +34 -0
- data/spec/models/magic_link_req_dto_spec.rb +34 -0
- data/spec/models/magic_link_res_dto_spec.rb +28 -0
- data/spec/models/member_res_dto_spec.rb +52 -0
- data/spec/models/meta_app_spec.rb +28 -0
- data/spec/models/meta_spec.rb +28 -0
- data/spec/models/metadata_query_dto_spec.rb +28 -0
- data/spec/models/metadata_req_dto_spec.rb +34 -0
- data/spec/models/o_auth2_callback_query_dto_spec.rb +28 -0
- data/spec/models/open_api_spec_list_res_dto_spec.rb +94 -0
- data/spec/models/page_info_dto_spec.rb +40 -0
- data/spec/models/page_info_spec.rb +46 -0
- data/spec/models/patch_connector_req_dto_spec.rb +34 -0
- data/spec/models/patch_connector_res_dto_spec.rb +28 -0
- data/spec/models/proxy_execution_req_dto_spec.rb +34 -0
- data/spec/models/redirect_uri_dto_spec.rb +28 -0
- data/spec/models/set_callback_url_body_dto_spec.rb +28 -0
- data/spec/models/single_app_info_res_dto_spec.rb +118 -0
- data/spec/models/single_trigger_res_dto_spec.rb +76 -0
- data/spec/models/status_spec.rb +22 -0
- data/spec/models/switch_trigger_status_body_dto_spec.rb +28 -0
- data/spec/models/switch_trigger_status_params_dto_spec.rb +28 -0
- data/spec/models/time_spec.rb +22 -0
- data/spec/models/toggle_connected_account_response_dto_spec.rb +28 -0
- data/spec/models/toggle_trigger_state_response_dto_spec.rb +28 -0
- data/spec/models/tools_execute_req_dto_spec.rb +58 -0
- data/spec/models/track_client_req_dto_spec.rb +40 -0
- data/spec/models/track_client_res_dto_spec.rb +28 -0
- data/spec/models/trigger_config_spec.rb +34 -0
- data/spec/models/trigger_instance_params_dto_spec.rb +28 -0
- data/spec/models/trigger_log_data_spec.rb +70 -0
- data/spec/models/trigger_log_item_dto_spec.rb +82 -0
- data/spec/models/trigger_logs_res_dto_spec.rb +34 -0
- data/spec/models/trigger_metadata_dto_spec.rb +82 -0
- data/spec/models/trigger_metadata_spec.rb +94 -0
- data/spec/models/trigger_metadata_type_spec.rb +25 -0
- data/spec/models/trigger_res_dto_spec.rb +100 -0
- data/spec/models/trigger_response_dto_spec.rb +40 -0
- data/spec/models/trigger_toggle_info_response_dto_spec.rb +28 -0
- data/spec/models/triggers_enabled_toggle_req_dto_spec.rb +28 -0
- data/spec/models/triggers_enabled_toggle_res_dto_spec.rb +28 -0
- data/spec/models/type_spec.rb +22 -0
- data/spec/models/user_git_user_info_spec.rb +34 -0
- data/spec/models/verify_cli_code_res_dto_spec.rb +40 -0
- data/spec/models/verify_magic_link_data_dto_spec.rb +46 -0
- data/spec/models/verify_magic_link_req_dto_spec.rb +28 -0
- data/spec/models/verify_magic_link_res_dto_spec.rb +34 -0
- data/spec/models/webhook_url_response_dto_spec.rb +34 -0
- data/spec/simple_test_spec.rb +52 -0
- data/spec/spec_helper.rb +107 -0
- metadata +504 -0
@@ -0,0 +1,268 @@
|
|
1
|
+
=begin
|
2
|
+
#Composio OpenAPI
|
3
|
+
|
4
|
+
#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'cgi'
|
10
|
+
|
11
|
+
module Composio
|
12
|
+
class APIKeysApi
|
13
|
+
attr_accessor :api_client
|
14
|
+
|
15
|
+
def initialize(api_client = ApiClient.default)
|
16
|
+
@api_client = api_client
|
17
|
+
end
|
18
|
+
|
19
|
+
# Generate api key
|
20
|
+
#
|
21
|
+
# @param name [String] The name of the API key to be generated
|
22
|
+
# @param body [GenerateAPIKeyReqDTO]
|
23
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
24
|
+
def generate(name:, extra: {})
|
25
|
+
_body = {}
|
26
|
+
_body[:name] = name if name != SENTINEL
|
27
|
+
generate_api_key_req_dto = _body
|
28
|
+
api_response = generate_with_http_info_impl(generate_api_key_req_dto, extra)
|
29
|
+
api_response.data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Generate api key
|
33
|
+
#
|
34
|
+
# @param name [String] The name of the API key to be generated
|
35
|
+
# @param body [GenerateAPIKeyReqDTO]
|
36
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
37
|
+
def generate_with_http_info(name:, extra: {})
|
38
|
+
_body = {}
|
39
|
+
_body[:name] = name if name != SENTINEL
|
40
|
+
generate_api_key_req_dto = _body
|
41
|
+
generate_with_http_info_impl(generate_api_key_req_dto, extra)
|
42
|
+
end
|
43
|
+
|
44
|
+
# Generate api key
|
45
|
+
# @param generate_api_key_req_dto [GenerateAPIKeyReqDTO] GenerateAPIKeyReqDTO
|
46
|
+
# @param [Hash] opts the optional parameters
|
47
|
+
# @return [APIKeyResDTO]
|
48
|
+
private def generate_impl(generate_api_key_req_dto, opts = {})
|
49
|
+
data, _status_code, _headers = generate_with_http_info(generate_api_key_req_dto, opts)
|
50
|
+
data
|
51
|
+
end
|
52
|
+
|
53
|
+
# Generate api key
|
54
|
+
# @param generate_api_key_req_dto [GenerateAPIKeyReqDTO] GenerateAPIKeyReqDTO
|
55
|
+
# @param [Hash] opts the optional parameters
|
56
|
+
# @return [APIResponse] data is APIKeyResDTO, status code, headers and response
|
57
|
+
private def generate_with_http_info_impl(generate_api_key_req_dto, opts = {})
|
58
|
+
if @api_client.config.debugging
|
59
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.generate ...'
|
60
|
+
end
|
61
|
+
# verify the required parameter 'generate_api_key_req_dto' is set
|
62
|
+
if @api_client.config.client_side_validation && generate_api_key_req_dto.nil?
|
63
|
+
fail ArgumentError, "Missing the required parameter 'generate_api_key_req_dto' when calling APIKeysApi.generate"
|
64
|
+
end
|
65
|
+
# resource path
|
66
|
+
local_var_path = '/api/v1/api_keys'
|
67
|
+
|
68
|
+
# query parameters
|
69
|
+
query_params = opts[:query_params] || {}
|
70
|
+
|
71
|
+
# header parameters
|
72
|
+
header_params = opts[:header_params] || {}
|
73
|
+
# HTTP header 'Accept' (if needed)
|
74
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
75
|
+
# HTTP header 'Content-Type'
|
76
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
77
|
+
if !content_type.nil?
|
78
|
+
header_params['Content-Type'] = content_type
|
79
|
+
end
|
80
|
+
|
81
|
+
# form parameters
|
82
|
+
form_params = opts[:form_params] || {}
|
83
|
+
|
84
|
+
# http body (model)
|
85
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_api_key_req_dto)
|
86
|
+
|
87
|
+
# return_type
|
88
|
+
return_type = opts[:debug_return_type] || 'APIKeyResDTO'
|
89
|
+
|
90
|
+
# auth_names
|
91
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
92
|
+
|
93
|
+
new_options = opts.merge(
|
94
|
+
:operation => :"APIKeysApi.generate",
|
95
|
+
:header_params => header_params,
|
96
|
+
:query_params => query_params,
|
97
|
+
:form_params => form_params,
|
98
|
+
:body => post_body,
|
99
|
+
:auth_names => auth_names,
|
100
|
+
:return_type => return_type
|
101
|
+
)
|
102
|
+
|
103
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug "API called: APIKeysApi#generate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
106
|
+
end
|
107
|
+
APIResponse::new(data, status_code, headers, response)
|
108
|
+
end
|
109
|
+
|
110
|
+
|
111
|
+
# List api keys
|
112
|
+
#
|
113
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
114
|
+
def list(extra: {})
|
115
|
+
api_response = list_with_http_info_impl(extra)
|
116
|
+
api_response.data
|
117
|
+
end
|
118
|
+
|
119
|
+
# List api keys
|
120
|
+
#
|
121
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
122
|
+
def list_with_http_info(extra: {})
|
123
|
+
list_with_http_info_impl(extra)
|
124
|
+
end
|
125
|
+
|
126
|
+
# List api keys
|
127
|
+
# @param [Hash] opts the optional parameters
|
128
|
+
# @return [Array<APIKeyResDTO>]
|
129
|
+
private def list_impl(opts = {})
|
130
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
131
|
+
data
|
132
|
+
end
|
133
|
+
|
134
|
+
# List api keys
|
135
|
+
# @param [Hash] opts the optional parameters
|
136
|
+
# @return [APIResponse] data is Array<APIKeyResDTO>, status code, headers and response
|
137
|
+
private def list_with_http_info_impl(opts = {})
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.list ...'
|
140
|
+
end
|
141
|
+
# resource path
|
142
|
+
local_var_path = '/api/v1/api_keys'
|
143
|
+
|
144
|
+
# query parameters
|
145
|
+
query_params = opts[:query_params] || {}
|
146
|
+
|
147
|
+
# header parameters
|
148
|
+
header_params = opts[:header_params] || {}
|
149
|
+
# HTTP header 'Accept' (if needed)
|
150
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
151
|
+
|
152
|
+
# form parameters
|
153
|
+
form_params = opts[:form_params] || {}
|
154
|
+
|
155
|
+
# http body (model)
|
156
|
+
post_body = opts[:debug_body]
|
157
|
+
|
158
|
+
# return_type
|
159
|
+
return_type = opts[:debug_return_type] || 'Array<APIKeyResDTO>'
|
160
|
+
|
161
|
+
# auth_names
|
162
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
163
|
+
|
164
|
+
new_options = opts.merge(
|
165
|
+
:operation => :"APIKeysApi.list",
|
166
|
+
:header_params => header_params,
|
167
|
+
:query_params => query_params,
|
168
|
+
:form_params => form_params,
|
169
|
+
:body => post_body,
|
170
|
+
:auth_names => auth_names,
|
171
|
+
:return_type => return_type
|
172
|
+
)
|
173
|
+
|
174
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
175
|
+
if @api_client.config.debugging
|
176
|
+
@api_client.config.logger.debug "API called: APIKeysApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
177
|
+
end
|
178
|
+
APIResponse::new(data, status_code, headers, response)
|
179
|
+
end
|
180
|
+
|
181
|
+
|
182
|
+
# Delete api key
|
183
|
+
#
|
184
|
+
# @param id [String]
|
185
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
186
|
+
def remove(id:, extra: {})
|
187
|
+
api_response = remove_with_http_info_impl(id, extra)
|
188
|
+
api_response.data
|
189
|
+
end
|
190
|
+
|
191
|
+
# Delete api key
|
192
|
+
#
|
193
|
+
# @param id [String]
|
194
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
195
|
+
def remove_with_http_info(id:, extra: {})
|
196
|
+
remove_with_http_info_impl(id, extra)
|
197
|
+
end
|
198
|
+
|
199
|
+
# Delete api key
|
200
|
+
# @param id [String]
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @return [DeleteAPIKeyResponseDTO]
|
203
|
+
private def remove_impl(id, opts = {})
|
204
|
+
data, _status_code, _headers = remove_with_http_info(id, opts)
|
205
|
+
data
|
206
|
+
end
|
207
|
+
|
208
|
+
# Delete api key
|
209
|
+
# @param id [String]
|
210
|
+
# @param [Hash] opts the optional parameters
|
211
|
+
# @return [APIResponse] data is DeleteAPIKeyResponseDTO, status code, headers and response
|
212
|
+
private def remove_with_http_info_impl(id, opts = {})
|
213
|
+
if @api_client.config.debugging
|
214
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.remove ...'
|
215
|
+
end
|
216
|
+
# verify the required parameter 'id' is set
|
217
|
+
if @api_client.config.client_side_validation && id.nil?
|
218
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling APIKeysApi.remove"
|
219
|
+
end
|
220
|
+
pattern = Regexp.new(/[^\/#\?]+?/)
|
221
|
+
if @api_client.config.client_side_validation && id !~ pattern
|
222
|
+
fail ArgumentError, "invalid value for 'id' when calling APIKeysApi.remove, must conform to the pattern #{pattern}."
|
223
|
+
end
|
224
|
+
|
225
|
+
# resource path
|
226
|
+
local_var_path = '/api/v1/api_keys/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
227
|
+
|
228
|
+
# query parameters
|
229
|
+
query_params = opts[:query_params] || {}
|
230
|
+
|
231
|
+
# header parameters
|
232
|
+
header_params = opts[:header_params] || {}
|
233
|
+
# HTTP header 'Accept' (if needed)
|
234
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
235
|
+
|
236
|
+
# form parameters
|
237
|
+
form_params = opts[:form_params] || {}
|
238
|
+
|
239
|
+
# http body (model)
|
240
|
+
post_body = opts[:debug_body]
|
241
|
+
|
242
|
+
# return_type
|
243
|
+
return_type = opts[:debug_return_type] || 'DeleteAPIKeyResponseDTO'
|
244
|
+
|
245
|
+
# auth_names
|
246
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
247
|
+
|
248
|
+
new_options = opts.merge(
|
249
|
+
:operation => :"APIKeysApi.remove",
|
250
|
+
:header_params => header_params,
|
251
|
+
:query_params => query_params,
|
252
|
+
:form_params => form_params,
|
253
|
+
:body => post_body,
|
254
|
+
:auth_names => auth_names,
|
255
|
+
:return_type => return_type
|
256
|
+
)
|
257
|
+
|
258
|
+
data, status_code, headers, response = @api_client.call_api(:DELETE, local_var_path, new_options)
|
259
|
+
if @api_client.config.debugging
|
260
|
+
@api_client.config.logger.debug "API called: APIKeysApi#remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
261
|
+
end
|
262
|
+
APIResponse::new(data, status_code, headers, response)
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
# top-level client access to avoid having the user to insantiate their own API instances
|
267
|
+
APIKeys = APIKeysApi::new
|
268
|
+
end
|
@@ -0,0 +1,266 @@
|
|
1
|
+
=begin
|
2
|
+
#Composio OpenAPI
|
3
|
+
|
4
|
+
#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'cgi'
|
10
|
+
|
11
|
+
module Composio
|
12
|
+
class AppsApi
|
13
|
+
attr_accessor :api_client
|
14
|
+
|
15
|
+
def initialize(api_client = ApiClient.default)
|
16
|
+
@api_client = api_client
|
17
|
+
end
|
18
|
+
|
19
|
+
# Get app
|
20
|
+
#
|
21
|
+
# Get app details
|
22
|
+
#
|
23
|
+
# @param app_name [String]
|
24
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
25
|
+
def get_details(app_name:, extra: {})
|
26
|
+
api_response = get_details_with_http_info_impl(app_name, extra)
|
27
|
+
api_response.data
|
28
|
+
end
|
29
|
+
|
30
|
+
# Get app
|
31
|
+
#
|
32
|
+
# Get app details
|
33
|
+
#
|
34
|
+
# @param app_name [String]
|
35
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
36
|
+
def get_details_with_http_info(app_name:, extra: {})
|
37
|
+
get_details_with_http_info_impl(app_name, extra)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Get app
|
41
|
+
# Get app details
|
42
|
+
# @param app_name [String]
|
43
|
+
# @param [Hash] opts the optional parameters
|
44
|
+
# @return [SingleAppInfoResDTO]
|
45
|
+
private def get_details_impl(app_name, opts = {})
|
46
|
+
data, _status_code, _headers = get_details_with_http_info(app_name, opts)
|
47
|
+
data
|
48
|
+
end
|
49
|
+
|
50
|
+
# Get app
|
51
|
+
# Get app details
|
52
|
+
# @param app_name [String]
|
53
|
+
# @param [Hash] opts the optional parameters
|
54
|
+
# @return [APIResponse] data is SingleAppInfoResDTO, status code, headers and response
|
55
|
+
private def get_details_with_http_info_impl(app_name, opts = {})
|
56
|
+
if @api_client.config.debugging
|
57
|
+
@api_client.config.logger.debug 'Calling API: AppsApi.get_details ...'
|
58
|
+
end
|
59
|
+
# verify the required parameter 'app_name' is set
|
60
|
+
if @api_client.config.client_side_validation && app_name.nil?
|
61
|
+
fail ArgumentError, "Missing the required parameter 'app_name' when calling AppsApi.get_details"
|
62
|
+
end
|
63
|
+
pattern = Regexp.new(/[^\/#\?]+?/)
|
64
|
+
if @api_client.config.client_side_validation && app_name !~ pattern
|
65
|
+
fail ArgumentError, "invalid value for 'app_name' when calling AppsApi.get_details, must conform to the pattern #{pattern}."
|
66
|
+
end
|
67
|
+
|
68
|
+
# resource path
|
69
|
+
local_var_path = '/api/v1/apps/{appName}'.sub('{' + 'appName' + '}', CGI.escape(app_name.to_s))
|
70
|
+
|
71
|
+
# query parameters
|
72
|
+
query_params = opts[:query_params] || {}
|
73
|
+
|
74
|
+
# header parameters
|
75
|
+
header_params = opts[:header_params] || {}
|
76
|
+
# HTTP header 'Accept' (if needed)
|
77
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
78
|
+
|
79
|
+
# form parameters
|
80
|
+
form_params = opts[:form_params] || {}
|
81
|
+
|
82
|
+
# http body (model)
|
83
|
+
post_body = opts[:debug_body]
|
84
|
+
|
85
|
+
# return_type
|
86
|
+
return_type = opts[:debug_return_type] || 'SingleAppInfoResDTO'
|
87
|
+
|
88
|
+
# auth_names
|
89
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
90
|
+
|
91
|
+
new_options = opts.merge(
|
92
|
+
:operation => :"AppsApi.get_details",
|
93
|
+
:header_params => header_params,
|
94
|
+
:query_params => query_params,
|
95
|
+
:form_params => form_params,
|
96
|
+
:body => post_body,
|
97
|
+
:auth_names => auth_names,
|
98
|
+
:return_type => return_type
|
99
|
+
)
|
100
|
+
|
101
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug "API called: AppsApi#get_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
104
|
+
end
|
105
|
+
APIResponse::new(data, status_code, headers, response)
|
106
|
+
end
|
107
|
+
|
108
|
+
|
109
|
+
# Get apps
|
110
|
+
#
|
111
|
+
# Retrieve a list of all applications based on query parameters.
|
112
|
+
#
|
113
|
+
# @param category [String]
|
114
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
115
|
+
def list(category: SENTINEL, extra: {})
|
116
|
+
extra[:category] = category if category != SENTINEL
|
117
|
+
api_response = list_with_http_info_impl(extra)
|
118
|
+
api_response.data
|
119
|
+
end
|
120
|
+
|
121
|
+
# Get apps
|
122
|
+
#
|
123
|
+
# Retrieve a list of all applications based on query parameters.
|
124
|
+
#
|
125
|
+
# @param category [String]
|
126
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
127
|
+
def list_with_http_info(category: SENTINEL, extra: {})
|
128
|
+
extra[:category] = category if category != SENTINEL
|
129
|
+
list_with_http_info_impl(extra)
|
130
|
+
end
|
131
|
+
|
132
|
+
# Get apps
|
133
|
+
# Retrieve a list of all applications based on query parameters.
|
134
|
+
# @param [Hash] opts the optional parameters
|
135
|
+
# @option opts [String] :category
|
136
|
+
# @return [AppListResDTO]
|
137
|
+
private def list_impl(opts = {})
|
138
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
139
|
+
data
|
140
|
+
end
|
141
|
+
|
142
|
+
# Get apps
|
143
|
+
# Retrieve a list of all applications based on query parameters.
|
144
|
+
# @param [Hash] opts the optional parameters
|
145
|
+
# @option opts [String] :category
|
146
|
+
# @return [APIResponse] data is AppListResDTO, status code, headers and response
|
147
|
+
private def list_with_http_info_impl(opts = {})
|
148
|
+
if @api_client.config.debugging
|
149
|
+
@api_client.config.logger.debug 'Calling API: AppsApi.list ...'
|
150
|
+
end
|
151
|
+
# resource path
|
152
|
+
local_var_path = '/api/v1/apps'
|
153
|
+
|
154
|
+
# query parameters
|
155
|
+
query_params = opts[:query_params] || {}
|
156
|
+
query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
|
157
|
+
|
158
|
+
# header parameters
|
159
|
+
header_params = opts[:header_params] || {}
|
160
|
+
# HTTP header 'Accept' (if needed)
|
161
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
162
|
+
|
163
|
+
# form parameters
|
164
|
+
form_params = opts[:form_params] || {}
|
165
|
+
|
166
|
+
# http body (model)
|
167
|
+
post_body = opts[:debug_body]
|
168
|
+
|
169
|
+
# return_type
|
170
|
+
return_type = opts[:debug_return_type] || 'AppListResDTO'
|
171
|
+
|
172
|
+
# auth_names
|
173
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
174
|
+
|
175
|
+
new_options = opts.merge(
|
176
|
+
:operation => :"AppsApi.list",
|
177
|
+
:header_params => header_params,
|
178
|
+
:query_params => query_params,
|
179
|
+
:form_params => form_params,
|
180
|
+
:body => post_body,
|
181
|
+
:auth_names => auth_names,
|
182
|
+
:return_type => return_type
|
183
|
+
)
|
184
|
+
|
185
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
186
|
+
if @api_client.config.debugging
|
187
|
+
@api_client.config.logger.debug "API called: AppsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
188
|
+
end
|
189
|
+
APIResponse::new(data, status_code, headers, response)
|
190
|
+
end
|
191
|
+
|
192
|
+
|
193
|
+
# Get opena api specs
|
194
|
+
#
|
195
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
196
|
+
def list_open_api_specs(extra: {})
|
197
|
+
api_response = list_open_api_specs_with_http_info_impl(extra)
|
198
|
+
api_response.data
|
199
|
+
end
|
200
|
+
|
201
|
+
# Get opena api specs
|
202
|
+
#
|
203
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
204
|
+
def list_open_api_specs_with_http_info(extra: {})
|
205
|
+
list_open_api_specs_with_http_info_impl(extra)
|
206
|
+
end
|
207
|
+
|
208
|
+
# Get opena api specs
|
209
|
+
# @param [Hash] opts the optional parameters
|
210
|
+
# @return [Array<AppListResDTO>]
|
211
|
+
private def list_open_api_specs_impl(opts = {})
|
212
|
+
data, _status_code, _headers = list_open_api_specs_with_http_info(opts)
|
213
|
+
data
|
214
|
+
end
|
215
|
+
|
216
|
+
# Get opena api specs
|
217
|
+
# @param [Hash] opts the optional parameters
|
218
|
+
# @return [APIResponse] data is Array<AppListResDTO>, status code, headers and response
|
219
|
+
private def list_open_api_specs_with_http_info_impl(opts = {})
|
220
|
+
if @api_client.config.debugging
|
221
|
+
@api_client.config.logger.debug 'Calling API: AppsApi.list_open_api_specs ...'
|
222
|
+
end
|
223
|
+
# resource path
|
224
|
+
local_var_path = '/api/v1/apps/openapi/spec/list'
|
225
|
+
|
226
|
+
# query parameters
|
227
|
+
query_params = opts[:query_params] || {}
|
228
|
+
|
229
|
+
# header parameters
|
230
|
+
header_params = opts[:header_params] || {}
|
231
|
+
# HTTP header 'Accept' (if needed)
|
232
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
233
|
+
|
234
|
+
# form parameters
|
235
|
+
form_params = opts[:form_params] || {}
|
236
|
+
|
237
|
+
# http body (model)
|
238
|
+
post_body = opts[:debug_body]
|
239
|
+
|
240
|
+
# return_type
|
241
|
+
return_type = opts[:debug_return_type] || 'Array<AppListResDTO>'
|
242
|
+
|
243
|
+
# auth_names
|
244
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
245
|
+
|
246
|
+
new_options = opts.merge(
|
247
|
+
:operation => :"AppsApi.list_open_api_specs",
|
248
|
+
:header_params => header_params,
|
249
|
+
:query_params => query_params,
|
250
|
+
:form_params => form_params,
|
251
|
+
:body => post_body,
|
252
|
+
:auth_names => auth_names,
|
253
|
+
:return_type => return_type
|
254
|
+
)
|
255
|
+
|
256
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
257
|
+
if @api_client.config.debugging
|
258
|
+
@api_client.config.logger.debug "API called: AppsApi#list_open_api_specs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
259
|
+
end
|
260
|
+
APIResponse::new(data, status_code, headers, response)
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
# top-level client access to avoid having the user to insantiate their own API instances
|
265
|
+
Apps = AppsApi::new
|
266
|
+
end
|