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,345 @@
|
|
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 'date'
|
10
|
+
require 'time'
|
11
|
+
|
12
|
+
module Composio
|
13
|
+
class TriggerLogData
|
14
|
+
# The unique identifier of the trigger log
|
15
|
+
attr_accessor :id
|
16
|
+
|
17
|
+
# The connection identifier associated with the trigger log
|
18
|
+
attr_accessor :connection_id
|
19
|
+
|
20
|
+
# The client identifier associated with the trigger log
|
21
|
+
attr_accessor :client_id
|
22
|
+
|
23
|
+
# The status of the trigger log
|
24
|
+
attr_accessor :status
|
25
|
+
|
26
|
+
# The name of the application associated with the trigger log
|
27
|
+
attr_accessor :app_name
|
28
|
+
|
29
|
+
# The creation date and time of the trigger log
|
30
|
+
attr_accessor :created_at
|
31
|
+
|
32
|
+
attr_accessor :type
|
33
|
+
|
34
|
+
attr_accessor :meta
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'id' => :'id',
|
40
|
+
:'connection_id' => :'connectionId',
|
41
|
+
:'client_id' => :'clientId',
|
42
|
+
:'status' => :'status',
|
43
|
+
:'app_name' => :'appName',
|
44
|
+
:'created_at' => :'createdAt',
|
45
|
+
:'type' => :'type',
|
46
|
+
:'meta' => :'meta'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Returns all the JSON keys this model knows about
|
51
|
+
def self.acceptable_attributes
|
52
|
+
attribute_map.values
|
53
|
+
end
|
54
|
+
|
55
|
+
# Attribute type mapping.
|
56
|
+
def self.openapi_types
|
57
|
+
{
|
58
|
+
:'id' => :'String',
|
59
|
+
:'connection_id' => :'String',
|
60
|
+
:'client_id' => :'String',
|
61
|
+
:'status' => :'String',
|
62
|
+
:'app_name' => :'String',
|
63
|
+
:'created_at' => :'Time',
|
64
|
+
:'type' => :'TriggerMetadataType',
|
65
|
+
:'meta' => :'TriggerMetadata'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# List of attributes with nullable: true
|
70
|
+
def self.openapi_nullable
|
71
|
+
Set.new([
|
72
|
+
])
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
77
|
+
def initialize(attributes = {})
|
78
|
+
if (!attributes.is_a?(Hash))
|
79
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::TriggerLogData` initialize method"
|
80
|
+
end
|
81
|
+
|
82
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
83
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
84
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::TriggerLogData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
86
|
+
end
|
87
|
+
h[k.to_sym] = v
|
88
|
+
}
|
89
|
+
|
90
|
+
if attributes.key?(:'id')
|
91
|
+
self.id = attributes[:'id']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'connection_id')
|
95
|
+
self.connection_id = attributes[:'connection_id']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'client_id')
|
99
|
+
self.client_id = attributes[:'client_id']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'status')
|
103
|
+
self.status = attributes[:'status']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'app_name')
|
107
|
+
self.app_name = attributes[:'app_name']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'created_at')
|
111
|
+
self.created_at = attributes[:'created_at']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'type')
|
115
|
+
self.type = attributes[:'type']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'meta')
|
119
|
+
self.meta = attributes[:'meta']
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
124
|
+
# @return Array for valid properties with the reasons
|
125
|
+
def list_invalid_properties
|
126
|
+
invalid_properties = Array.new
|
127
|
+
if @id.nil?
|
128
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
129
|
+
end
|
130
|
+
|
131
|
+
if @connection_id.nil?
|
132
|
+
invalid_properties.push('invalid value for "connection_id", connection_id cannot be nil.')
|
133
|
+
end
|
134
|
+
|
135
|
+
if @client_id.nil?
|
136
|
+
invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
|
137
|
+
end
|
138
|
+
|
139
|
+
if @status.nil?
|
140
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
141
|
+
end
|
142
|
+
|
143
|
+
if @app_name.nil?
|
144
|
+
invalid_properties.push('invalid value for "app_name", app_name cannot be nil.')
|
145
|
+
end
|
146
|
+
|
147
|
+
if @created_at.nil?
|
148
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
149
|
+
end
|
150
|
+
|
151
|
+
pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/)
|
152
|
+
if @created_at !~ pattern
|
153
|
+
invalid_properties.push("invalid value for \"created_at\", must conform to the pattern #{pattern}.")
|
154
|
+
end
|
155
|
+
|
156
|
+
if @type.nil?
|
157
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
158
|
+
end
|
159
|
+
|
160
|
+
if @meta.nil?
|
161
|
+
invalid_properties.push('invalid value for "meta", meta cannot be nil.')
|
162
|
+
end
|
163
|
+
|
164
|
+
invalid_properties
|
165
|
+
end
|
166
|
+
|
167
|
+
# Check to see if the all the properties in the model are valid
|
168
|
+
# @return true if the model is valid
|
169
|
+
def valid?
|
170
|
+
return false if @id.nil?
|
171
|
+
return false if @connection_id.nil?
|
172
|
+
return false if @client_id.nil?
|
173
|
+
return false if @status.nil?
|
174
|
+
return false if @app_name.nil?
|
175
|
+
return false if @created_at.nil?
|
176
|
+
return false if @created_at !~ Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/)
|
177
|
+
return false if @type.nil?
|
178
|
+
return false if @meta.nil?
|
179
|
+
true
|
180
|
+
end
|
181
|
+
|
182
|
+
# Custom attribute writer method with validation
|
183
|
+
# @param [Object] created_at Value to be assigned
|
184
|
+
def created_at=(created_at)
|
185
|
+
if created_at.nil?
|
186
|
+
fail ArgumentError, 'created_at cannot be nil'
|
187
|
+
end
|
188
|
+
|
189
|
+
pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/)
|
190
|
+
if created_at !~ pattern
|
191
|
+
fail ArgumentError, "invalid value for \"created_at\", must conform to the pattern #{pattern}."
|
192
|
+
end
|
193
|
+
|
194
|
+
@created_at = created_at
|
195
|
+
end
|
196
|
+
|
197
|
+
# Checks equality by comparing each attribute.
|
198
|
+
# @param [Object] Object to be compared
|
199
|
+
def ==(o)
|
200
|
+
return true if self.equal?(o)
|
201
|
+
self.class == o.class &&
|
202
|
+
id == o.id &&
|
203
|
+
connection_id == o.connection_id &&
|
204
|
+
client_id == o.client_id &&
|
205
|
+
status == o.status &&
|
206
|
+
app_name == o.app_name &&
|
207
|
+
created_at == o.created_at &&
|
208
|
+
type == o.type &&
|
209
|
+
meta == o.meta
|
210
|
+
end
|
211
|
+
|
212
|
+
# @see the `==` method
|
213
|
+
# @param [Object] Object to be compared
|
214
|
+
def eql?(o)
|
215
|
+
self == o
|
216
|
+
end
|
217
|
+
|
218
|
+
# Calculates hash code according to all attributes.
|
219
|
+
# @return [Integer] Hash code
|
220
|
+
def hash
|
221
|
+
[id, connection_id, client_id, status, app_name, created_at, type, meta].hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Builds the object from hash
|
225
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
226
|
+
# @return [Object] Returns the model itself
|
227
|
+
def self.build_from_hash(attributes)
|
228
|
+
new.build_from_hash(attributes)
|
229
|
+
end
|
230
|
+
|
231
|
+
# Builds the object from hash
|
232
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
233
|
+
# @return [Object] Returns the model itself
|
234
|
+
def build_from_hash(attributes)
|
235
|
+
return nil unless attributes.is_a?(Hash)
|
236
|
+
attributes = attributes.transform_keys(&:to_sym)
|
237
|
+
self.class.openapi_types.each_pair do |key, type|
|
238
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
239
|
+
self.send("#{key}=", nil)
|
240
|
+
elsif type =~ /\AArray<(.*)>/i
|
241
|
+
# check to ensure the input is an array given that the attribute
|
242
|
+
# is documented as an array but the input is not
|
243
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
244
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
245
|
+
end
|
246
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
247
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
self
|
252
|
+
end
|
253
|
+
|
254
|
+
# Deserializes the data based on type
|
255
|
+
# @param string type Data type
|
256
|
+
# @param string value Value to be deserialized
|
257
|
+
# @return [Object] Deserialized data
|
258
|
+
def _deserialize(type, value)
|
259
|
+
case type.to_sym
|
260
|
+
when :Time
|
261
|
+
Time.parse(value)
|
262
|
+
when :Date
|
263
|
+
Date.parse(value)
|
264
|
+
when :String
|
265
|
+
value.to_s
|
266
|
+
when :Integer
|
267
|
+
value.to_i
|
268
|
+
when :Float
|
269
|
+
value.to_f
|
270
|
+
when :Boolean
|
271
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
272
|
+
true
|
273
|
+
else
|
274
|
+
false
|
275
|
+
end
|
276
|
+
when :Object
|
277
|
+
# generic object (usually a Hash), return directly
|
278
|
+
value
|
279
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
280
|
+
inner_type = Regexp.last_match[:inner_type]
|
281
|
+
value.map { |v| _deserialize(inner_type, v) }
|
282
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
283
|
+
k_type = Regexp.last_match[:k_type]
|
284
|
+
v_type = Regexp.last_match[:v_type]
|
285
|
+
{}.tap do |hash|
|
286
|
+
value.each do |k, v|
|
287
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
288
|
+
end
|
289
|
+
end
|
290
|
+
else # model
|
291
|
+
# models (e.g. Pet) or oneOf
|
292
|
+
klass = Composio.const_get(type)
|
293
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
# Returns the string representation of the object
|
298
|
+
# @return [String] String presentation of the object
|
299
|
+
def to_s
|
300
|
+
to_hash.to_s
|
301
|
+
end
|
302
|
+
|
303
|
+
# to_body is an alias to to_hash (backward compatibility)
|
304
|
+
# @return [Hash] Returns the object in the form of hash
|
305
|
+
def to_body
|
306
|
+
to_hash
|
307
|
+
end
|
308
|
+
|
309
|
+
# Returns the object in the form of hash
|
310
|
+
# @return [Hash] Returns the object in the form of hash
|
311
|
+
def to_hash
|
312
|
+
hash = {}
|
313
|
+
self.class.attribute_map.each_pair do |attr, param|
|
314
|
+
value = self.send(attr)
|
315
|
+
if value.nil?
|
316
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
317
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
318
|
+
end
|
319
|
+
|
320
|
+
hash[param] = _to_hash(value)
|
321
|
+
end
|
322
|
+
hash
|
323
|
+
end
|
324
|
+
|
325
|
+
# Outputs non-array value in the form of hash
|
326
|
+
# For object, use to_hash. Otherwise, just return the value
|
327
|
+
# @param [Object] value Any valid value
|
328
|
+
# @return [Hash] Returns the value in the form of hash
|
329
|
+
def _to_hash(value)
|
330
|
+
if value.is_a?(Array)
|
331
|
+
value.compact.map { |v| _to_hash(v) }
|
332
|
+
elsif value.is_a?(Hash)
|
333
|
+
{}.tap do |hash|
|
334
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
335
|
+
end
|
336
|
+
elsif value.respond_to? :to_hash
|
337
|
+
value.to_hash
|
338
|
+
else
|
339
|
+
value
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
end
|
344
|
+
|
345
|
+
end
|
@@ -0,0 +1,336 @@
|
|
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 'date'
|
10
|
+
require 'time'
|
11
|
+
|
12
|
+
module Composio
|
13
|
+
class TriggerLogItemDTO
|
14
|
+
# Client ID
|
15
|
+
attr_accessor :client_id
|
16
|
+
|
17
|
+
# Connection ID
|
18
|
+
attr_accessor :connection_id
|
19
|
+
|
20
|
+
# Error trigger
|
21
|
+
attr_accessor :error_trigger
|
22
|
+
|
23
|
+
# Trigger client error
|
24
|
+
attr_accessor :trigger_client_error
|
25
|
+
|
26
|
+
# Trigger client payload
|
27
|
+
attr_accessor :trigger_client_payload
|
28
|
+
|
29
|
+
# Trigger provider payload
|
30
|
+
attr_accessor :trigger_provider_payload
|
31
|
+
|
32
|
+
# Trigger name
|
33
|
+
attr_accessor :trigger_name
|
34
|
+
|
35
|
+
# Log ID
|
36
|
+
attr_accessor :id
|
37
|
+
|
38
|
+
# App key
|
39
|
+
attr_accessor :app_key
|
40
|
+
|
41
|
+
# Created at timestamp
|
42
|
+
attr_accessor :created_at
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'client_id' => :'clientId',
|
48
|
+
:'connection_id' => :'connectionId',
|
49
|
+
:'error_trigger' => :'errorTrigger',
|
50
|
+
:'trigger_client_error' => :'triggerClientError',
|
51
|
+
:'trigger_client_payload' => :'triggerClientPayload',
|
52
|
+
:'trigger_provider_payload' => :'triggerProviderPayload',
|
53
|
+
:'trigger_name' => :'triggerName',
|
54
|
+
:'id' => :'id',
|
55
|
+
:'app_key' => :'appKey',
|
56
|
+
:'created_at' => :'createdAt'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Returns all the JSON keys this model knows about
|
61
|
+
def self.acceptable_attributes
|
62
|
+
attribute_map.values
|
63
|
+
end
|
64
|
+
|
65
|
+
# Attribute type mapping.
|
66
|
+
def self.openapi_types
|
67
|
+
{
|
68
|
+
:'client_id' => :'String',
|
69
|
+
:'connection_id' => :'String',
|
70
|
+
:'error_trigger' => :'String',
|
71
|
+
:'trigger_client_error' => :'String',
|
72
|
+
:'trigger_client_payload' => :'String',
|
73
|
+
:'trigger_provider_payload' => :'String',
|
74
|
+
:'trigger_name' => :'String',
|
75
|
+
:'id' => :'String',
|
76
|
+
:'app_key' => :'String',
|
77
|
+
:'created_at' => :'Time'
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# List of attributes with nullable: true
|
82
|
+
def self.openapi_nullable
|
83
|
+
Set.new([
|
84
|
+
:'error_trigger',
|
85
|
+
:'trigger_client_error',
|
86
|
+
:'trigger_client_payload',
|
87
|
+
:'trigger_provider_payload',
|
88
|
+
:'trigger_name',
|
89
|
+
])
|
90
|
+
end
|
91
|
+
|
92
|
+
# Initializes the object
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
94
|
+
def initialize(attributes = {})
|
95
|
+
if (!attributes.is_a?(Hash))
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::TriggerLogItemDTO` initialize method"
|
97
|
+
end
|
98
|
+
|
99
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
100
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
101
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
102
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::TriggerLogItemDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
103
|
+
end
|
104
|
+
h[k.to_sym] = v
|
105
|
+
}
|
106
|
+
|
107
|
+
if attributes.key?(:'client_id')
|
108
|
+
self.client_id = attributes[:'client_id']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'connection_id')
|
112
|
+
self.connection_id = attributes[:'connection_id']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'error_trigger')
|
116
|
+
self.error_trigger = attributes[:'error_trigger']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'trigger_client_error')
|
120
|
+
self.trigger_client_error = attributes[:'trigger_client_error']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'trigger_client_payload')
|
124
|
+
self.trigger_client_payload = attributes[:'trigger_client_payload']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'trigger_provider_payload')
|
128
|
+
self.trigger_provider_payload = attributes[:'trigger_provider_payload']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'trigger_name')
|
132
|
+
self.trigger_name = attributes[:'trigger_name']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'id')
|
136
|
+
self.id = attributes[:'id']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'app_key')
|
140
|
+
self.app_key = attributes[:'app_key']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.key?(:'created_at')
|
144
|
+
self.created_at = attributes[:'created_at']
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
149
|
+
# @return Array for valid properties with the reasons
|
150
|
+
def list_invalid_properties
|
151
|
+
invalid_properties = Array.new
|
152
|
+
if @client_id.nil?
|
153
|
+
invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
|
154
|
+
end
|
155
|
+
|
156
|
+
if @connection_id.nil?
|
157
|
+
invalid_properties.push('invalid value for "connection_id", connection_id cannot be nil.')
|
158
|
+
end
|
159
|
+
|
160
|
+
if @id.nil?
|
161
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
162
|
+
end
|
163
|
+
|
164
|
+
if @app_key.nil?
|
165
|
+
invalid_properties.push('invalid value for "app_key", app_key cannot be nil.')
|
166
|
+
end
|
167
|
+
|
168
|
+
if @created_at.nil?
|
169
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
170
|
+
end
|
171
|
+
|
172
|
+
invalid_properties
|
173
|
+
end
|
174
|
+
|
175
|
+
# Check to see if the all the properties in the model are valid
|
176
|
+
# @return true if the model is valid
|
177
|
+
def valid?
|
178
|
+
return false if @client_id.nil?
|
179
|
+
return false if @connection_id.nil?
|
180
|
+
return false if @id.nil?
|
181
|
+
return false if @app_key.nil?
|
182
|
+
return false if @created_at.nil?
|
183
|
+
true
|
184
|
+
end
|
185
|
+
|
186
|
+
# Checks equality by comparing each attribute.
|
187
|
+
# @param [Object] Object to be compared
|
188
|
+
def ==(o)
|
189
|
+
return true if self.equal?(o)
|
190
|
+
self.class == o.class &&
|
191
|
+
client_id == o.client_id &&
|
192
|
+
connection_id == o.connection_id &&
|
193
|
+
error_trigger == o.error_trigger &&
|
194
|
+
trigger_client_error == o.trigger_client_error &&
|
195
|
+
trigger_client_payload == o.trigger_client_payload &&
|
196
|
+
trigger_provider_payload == o.trigger_provider_payload &&
|
197
|
+
trigger_name == o.trigger_name &&
|
198
|
+
id == o.id &&
|
199
|
+
app_key == o.app_key &&
|
200
|
+
created_at == o.created_at
|
201
|
+
end
|
202
|
+
|
203
|
+
# @see the `==` method
|
204
|
+
# @param [Object] Object to be compared
|
205
|
+
def eql?(o)
|
206
|
+
self == o
|
207
|
+
end
|
208
|
+
|
209
|
+
# Calculates hash code according to all attributes.
|
210
|
+
# @return [Integer] Hash code
|
211
|
+
def hash
|
212
|
+
[client_id, connection_id, error_trigger, trigger_client_error, trigger_client_payload, trigger_provider_payload, trigger_name, id, app_key, created_at].hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Builds the object from hash
|
216
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
217
|
+
# @return [Object] Returns the model itself
|
218
|
+
def self.build_from_hash(attributes)
|
219
|
+
new.build_from_hash(attributes)
|
220
|
+
end
|
221
|
+
|
222
|
+
# Builds the object from hash
|
223
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
224
|
+
# @return [Object] Returns the model itself
|
225
|
+
def build_from_hash(attributes)
|
226
|
+
return nil unless attributes.is_a?(Hash)
|
227
|
+
attributes = attributes.transform_keys(&:to_sym)
|
228
|
+
self.class.openapi_types.each_pair do |key, type|
|
229
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
230
|
+
self.send("#{key}=", nil)
|
231
|
+
elsif type =~ /\AArray<(.*)>/i
|
232
|
+
# check to ensure the input is an array given that the attribute
|
233
|
+
# is documented as an array but the input is not
|
234
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
235
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
236
|
+
end
|
237
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
238
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
self
|
243
|
+
end
|
244
|
+
|
245
|
+
# Deserializes the data based on type
|
246
|
+
# @param string type Data type
|
247
|
+
# @param string value Value to be deserialized
|
248
|
+
# @return [Object] Deserialized data
|
249
|
+
def _deserialize(type, value)
|
250
|
+
case type.to_sym
|
251
|
+
when :Time
|
252
|
+
Time.parse(value)
|
253
|
+
when :Date
|
254
|
+
Date.parse(value)
|
255
|
+
when :String
|
256
|
+
value.to_s
|
257
|
+
when :Integer
|
258
|
+
value.to_i
|
259
|
+
when :Float
|
260
|
+
value.to_f
|
261
|
+
when :Boolean
|
262
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
263
|
+
true
|
264
|
+
else
|
265
|
+
false
|
266
|
+
end
|
267
|
+
when :Object
|
268
|
+
# generic object (usually a Hash), return directly
|
269
|
+
value
|
270
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
271
|
+
inner_type = Regexp.last_match[:inner_type]
|
272
|
+
value.map { |v| _deserialize(inner_type, v) }
|
273
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
274
|
+
k_type = Regexp.last_match[:k_type]
|
275
|
+
v_type = Regexp.last_match[:v_type]
|
276
|
+
{}.tap do |hash|
|
277
|
+
value.each do |k, v|
|
278
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
279
|
+
end
|
280
|
+
end
|
281
|
+
else # model
|
282
|
+
# models (e.g. Pet) or oneOf
|
283
|
+
klass = Composio.const_get(type)
|
284
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
# Returns the string representation of the object
|
289
|
+
# @return [String] String presentation of the object
|
290
|
+
def to_s
|
291
|
+
to_hash.to_s
|
292
|
+
end
|
293
|
+
|
294
|
+
# to_body is an alias to to_hash (backward compatibility)
|
295
|
+
# @return [Hash] Returns the object in the form of hash
|
296
|
+
def to_body
|
297
|
+
to_hash
|
298
|
+
end
|
299
|
+
|
300
|
+
# Returns the object in the form of hash
|
301
|
+
# @return [Hash] Returns the object in the form of hash
|
302
|
+
def to_hash
|
303
|
+
hash = {}
|
304
|
+
self.class.attribute_map.each_pair do |attr, param|
|
305
|
+
value = self.send(attr)
|
306
|
+
if value.nil?
|
307
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
308
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
309
|
+
end
|
310
|
+
|
311
|
+
hash[param] = _to_hash(value)
|
312
|
+
end
|
313
|
+
hash
|
314
|
+
end
|
315
|
+
|
316
|
+
# Outputs non-array value in the form of hash
|
317
|
+
# For object, use to_hash. Otherwise, just return the value
|
318
|
+
# @param [Object] value Any valid value
|
319
|
+
# @return [Hash] Returns the value in the form of hash
|
320
|
+
def _to_hash(value)
|
321
|
+
if value.is_a?(Array)
|
322
|
+
value.compact.map { |v| _to_hash(v) }
|
323
|
+
elsif value.is_a?(Hash)
|
324
|
+
{}.tap do |hash|
|
325
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
326
|
+
end
|
327
|
+
elsif value.respond_to? :to_hash
|
328
|
+
value.to_hash
|
329
|
+
else
|
330
|
+
value
|
331
|
+
end
|
332
|
+
end
|
333
|
+
|
334
|
+
end
|
335
|
+
|
336
|
+
end
|