composio 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (270) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +11 -0
  3. data/Gemfile.lock +93 -0
  4. data/README.md +1779 -0
  5. data/Rakefile +10 -0
  6. data/composio.gemspec +39 -0
  7. data/header.png +0 -0
  8. data/lib/composio/api/actions_api.rb +1062 -0
  9. data/lib/composio/api/api_keys_api.rb +268 -0
  10. data/lib/composio/api/apps_api.rb +266 -0
  11. data/lib/composio/api/auth_api.rb +370 -0
  12. data/lib/composio/api/cli_api.rb +266 -0
  13. data/lib/composio/api/connections_api.rb +591 -0
  14. data/lib/composio/api/integrations_api.rb +578 -0
  15. data/lib/composio/api/logs_api.rb +166 -0
  16. data/lib/composio/api/metadata_api.rb +180 -0
  17. data/lib/composio/api/team_api.rb +188 -0
  18. data/lib/composio/api/triggers_api.rb +1222 -0
  19. data/lib/composio/api_client.rb +436 -0
  20. data/lib/composio/api_client_custom.rb +14 -0
  21. data/lib/composio/api_error.rb +53 -0
  22. data/lib/composio/configuration.rb +330 -0
  23. data/lib/composio/models/action_details.rb +357 -0
  24. data/lib/composio/models/action_details_minimal.rb +329 -0
  25. data/lib/composio/models/action_execution_req_dto.rb +260 -0
  26. data/lib/composio/models/action_execution_res_dto.rb +238 -0
  27. data/lib/composio/models/action_log_data.rb +345 -0
  28. data/lib/composio/models/action_metadata.rb +402 -0
  29. data/lib/composio/models/action_metadata_type.rb +101 -0
  30. data/lib/composio/models/actions_controller_v1.rb +222 -0
  31. data/lib/composio/models/actions_list_response_dto.rb +250 -0
  32. data/lib/composio/models/actions_minimal_list_response_dto.rb +250 -0
  33. data/lib/composio/models/actions_query_dto.rb +300 -0
  34. data/lib/composio/models/active_trigger_instance.rb +311 -0
  35. data/lib/composio/models/active_triggers_res_dto.rb +238 -0
  36. data/lib/composio/models/add_repo_url_req_dto.rb +221 -0
  37. data/lib/composio/models/add_repo_url_res_dto.rb +221 -0
  38. data/lib/composio/models/add_tools_req_dto.rb +251 -0
  39. data/lib/composio/models/add_tools_request_dto.rb +251 -0
  40. data/lib/composio/models/api_key_res_dto.rb +323 -0
  41. data/lib/composio/models/app_info_response_dto.rb +323 -0
  42. data/lib/composio/models/app_list_res_dto.rb +238 -0
  43. data/lib/composio/models/app_query_dto.rb +216 -0
  44. data/lib/composio/models/auth_config_dto.rb +229 -0
  45. data/lib/composio/models/cli_query_dto.rb +231 -0
  46. data/lib/composio/models/connected_account_response_dto.rb +331 -0
  47. data/lib/composio/models/connection_params.rb +395 -0
  48. data/lib/composio/models/connection_params_for_account.rb +323 -0
  49. data/lib/composio/models/connection_params_headers.rb +224 -0
  50. data/lib/composio/models/connection_with_app_data.rb +358 -0
  51. data/lib/composio/models/connection_with_app_data_created_at.rb +101 -0
  52. data/lib/composio/models/connector_list_item_dto.rb +376 -0
  53. data/lib/composio/models/connector_list_item_dto_created_at.rb +102 -0
  54. data/lib/composio/models/connector_list_item_dto_updated_at.rb +102 -0
  55. data/lib/composio/models/create_connector_payload_dto.rb +274 -0
  56. data/lib/composio/models/create_connector_payload_dto_use_composio_auth.rb +226 -0
  57. data/lib/composio/models/delete_api_key_req_dto.rb +221 -0
  58. data/lib/composio/models/delete_api_key_response_dto.rb +221 -0
  59. data/lib/composio/models/delete_row_apidto.rb +236 -0
  60. data/lib/composio/models/delete_tools_req_dto.rb +221 -0
  61. data/lib/composio/models/delete_tools_res_dto.rb +221 -0
  62. data/lib/composio/models/direct_execute_req_dto.rb +262 -0
  63. data/lib/composio/models/enable_trigger_body_dto.rb +221 -0
  64. data/lib/composio/models/enable_trigger_params_dto.rb +236 -0
  65. data/lib/composio/models/execute_action_res_dto.rb +236 -0
  66. data/lib/composio/models/generate_api_key_req_dto.rb +221 -0
  67. data/lib/composio/models/generate_cli_session_req_dto.rb +221 -0
  68. data/lib/composio/models/generate_cli_session_res_dto.rb +221 -0
  69. data/lib/composio/models/get_active_triggers_query_dto.rb +276 -0
  70. data/lib/composio/models/get_cli_session_res_dto.rb +236 -0
  71. data/lib/composio/models/get_connections_query_dto.rb +287 -0
  72. data/lib/composio/models/get_connections_response_dto.rb +250 -0
  73. data/lib/composio/models/get_connections_result.rb +236 -0
  74. data/lib/composio/models/get_connector_info_res_dto.rb +417 -0
  75. data/lib/composio/models/get_connector_list_res_dto.rb +253 -0
  76. data/lib/composio/models/get_logs_dto.rb +288 -0
  77. data/lib/composio/models/get_logs_query_dto.rb +246 -0
  78. data/lib/composio/models/get_trigger_params_dto.rb +221 -0
  79. data/lib/composio/models/get_trigger_response_dto.rb +230 -0
  80. data/lib/composio/models/handle_trigger_body_dto.rb +221 -0
  81. data/lib/composio/models/handle_trigger_params_dto.rb +236 -0
  82. data/lib/composio/models/identify_client_req_dto.rb +231 -0
  83. data/lib/composio/models/identify_client_res_dto.rb +251 -0
  84. data/lib/composio/models/initiate_connection_payload_dto.rb +281 -0
  85. data/lib/composio/models/initiate_connection_response.rb +272 -0
  86. data/lib/composio/models/invite_member_req_dto.rb +251 -0
  87. data/lib/composio/models/job_status.rb +37 -0
  88. data/lib/composio/models/list_triggers_query_dto.rb +246 -0
  89. data/lib/composio/models/logout_res_dto.rb +221 -0
  90. data/lib/composio/models/logs_res_dto.rb +233 -0
  91. data/lib/composio/models/magic_link_req_dto.rb +236 -0
  92. data/lib/composio/models/magic_link_res_dto.rb +220 -0
  93. data/lib/composio/models/member_res_dto.rb +305 -0
  94. data/lib/composio/models/meta.rb +220 -0
  95. data/lib/composio/models/meta_app.rb +220 -0
  96. data/lib/composio/models/metadata_query_dto.rb +221 -0
  97. data/lib/composio/models/metadata_req_dto.rb +232 -0
  98. data/lib/composio/models/o_auth2_callback_query_dto.rb +220 -0
  99. data/lib/composio/models/open_api_spec_list_res_dto.rb +436 -0
  100. data/lib/composio/models/page_info.rb +338 -0
  101. data/lib/composio/models/page_info_dto.rb +248 -0
  102. data/lib/composio/models/patch_connector_req_dto.rb +226 -0
  103. data/lib/composio/models/patch_connector_res_dto.rb +221 -0
  104. data/lib/composio/models/proxy_execution_req_dto.rb +234 -0
  105. data/lib/composio/models/redirect_uri_dto.rb +215 -0
  106. data/lib/composio/models/set_callback_url_body_dto.rb +221 -0
  107. data/lib/composio/models/single_app_info_res_dto.rb +394 -0
  108. data/lib/composio/models/single_trigger_res_dto.rb +336 -0
  109. data/lib/composio/models/status.rb +37 -0
  110. data/lib/composio/models/switch_trigger_status_body_dto.rb +221 -0
  111. data/lib/composio/models/switch_trigger_status_params_dto.rb +221 -0
  112. data/lib/composio/models/time.rb +41 -0
  113. data/lib/composio/models/toggle_connected_account_response_dto.rb +220 -0
  114. data/lib/composio/models/toggle_trigger_state_response_dto.rb +220 -0
  115. data/lib/composio/models/tools_execute_req_dto.rb +275 -0
  116. data/lib/composio/models/track_client_req_dto.rb +240 -0
  117. data/lib/composio/models/track_client_res_dto.rb +221 -0
  118. data/lib/composio/models/trigger_config.rb +237 -0
  119. data/lib/composio/models/trigger_instance_params_dto.rb +221 -0
  120. data/lib/composio/models/trigger_log_data.rb +345 -0
  121. data/lib/composio/models/trigger_log_item_dto.rb +336 -0
  122. data/lib/composio/models/trigger_logs_res_dto.rb +236 -0
  123. data/lib/composio/models/trigger_metadata.rb +402 -0
  124. data/lib/composio/models/trigger_metadata_dto.rb +347 -0
  125. data/lib/composio/models/trigger_metadata_type.rb +101 -0
  126. data/lib/composio/models/trigger_res_dto.rb +361 -0
  127. data/lib/composio/models/trigger_response_dto.rb +241 -0
  128. data/lib/composio/models/trigger_toggle_info_response_dto.rb +221 -0
  129. data/lib/composio/models/triggers_enabled_toggle_req_dto.rb +221 -0
  130. data/lib/composio/models/triggers_enabled_toggle_res_dto.rb +221 -0
  131. data/lib/composio/models/type.rb +37 -0
  132. data/lib/composio/models/user_git_user_info.rb +230 -0
  133. data/lib/composio/models/verify_cli_code_res_dto.rb +251 -0
  134. data/lib/composio/models/verify_magic_link_data_dto.rb +263 -0
  135. data/lib/composio/models/verify_magic_link_req_dto.rb +221 -0
  136. data/lib/composio/models/verify_magic_link_res_dto.rb +230 -0
  137. data/lib/composio/models/webhook_url_response_dto.rb +231 -0
  138. data/lib/composio/version.rb +11 -0
  139. data/lib/composio.rb +214 -0
  140. data/spec/api/actions_api_spec.rb +164 -0
  141. data/spec/api/api_keys_api_spec.rb +61 -0
  142. data/spec/api/apps_api_spec.rb +63 -0
  143. data/spec/api/auth_api_spec.rb +73 -0
  144. data/spec/api/cli_api_spec.rb +63 -0
  145. data/spec/api/connections_api_spec.rb +103 -0
  146. data/spec/api/integrations_api_spec.rb +96 -0
  147. data/spec/api/logs_api_spec.rb +48 -0
  148. data/spec/api/metadata_api_spec.rb +50 -0
  149. data/spec/api/team_api_spec.rb +50 -0
  150. data/spec/api/triggers_api_spec.rb +188 -0
  151. data/spec/api_client_spec.rb +191 -0
  152. data/spec/configuration_spec.rb +38 -0
  153. data/spec/models/action_details_minimal_spec.rb +76 -0
  154. data/spec/models/action_details_spec.rb +88 -0
  155. data/spec/models/action_execution_req_dto_spec.rb +58 -0
  156. data/spec/models/action_execution_res_dto_spec.rb +40 -0
  157. data/spec/models/action_log_data_spec.rb +70 -0
  158. data/spec/models/action_metadata_spec.rb +88 -0
  159. data/spec/models/action_metadata_type_spec.rb +25 -0
  160. data/spec/models/actions_controller_v1_spec.rb +28 -0
  161. data/spec/models/actions_list_response_dto_spec.rb +40 -0
  162. data/spec/models/actions_minimal_list_response_dto_spec.rb +40 -0
  163. data/spec/models/actions_query_dto_spec.rb +82 -0
  164. data/spec/models/active_trigger_instance_spec.rb +70 -0
  165. data/spec/models/active_triggers_res_dto_spec.rb +34 -0
  166. data/spec/models/add_repo_url_req_dto_spec.rb +28 -0
  167. data/spec/models/add_repo_url_res_dto_spec.rb +28 -0
  168. data/spec/models/add_tools_req_dto_spec.rb +40 -0
  169. data/spec/models/add_tools_request_dto_spec.rb +40 -0
  170. data/spec/models/api_key_res_dto_spec.rb +52 -0
  171. data/spec/models/app_info_response_dto_spec.rb +70 -0
  172. data/spec/models/app_list_res_dto_spec.rb +34 -0
  173. data/spec/models/app_query_dto_spec.rb +28 -0
  174. data/spec/models/auth_config_dto_spec.rb +34 -0
  175. data/spec/models/cli_query_dto_spec.rb +34 -0
  176. data/spec/models/connected_account_response_dto_spec.rb +82 -0
  177. data/spec/models/connection_params_for_account_spec.rb +100 -0
  178. data/spec/models/connection_params_headers_spec.rb +34 -0
  179. data/spec/models/connection_params_spec.rb +118 -0
  180. data/spec/models/connection_with_app_data_created_at_spec.rb +25 -0
  181. data/spec/models/connection_with_app_data_spec.rb +100 -0
  182. data/spec/models/connector_list_item_dto_created_at_spec.rb +25 -0
  183. data/spec/models/connector_list_item_dto_spec.rb +94 -0
  184. data/spec/models/connector_list_item_dto_updated_at_spec.rb +25 -0
  185. data/spec/models/create_connector_payload_dto_spec.rb +58 -0
  186. data/spec/models/create_connector_payload_dto_use_composio_auth_spec.rb +22 -0
  187. data/spec/models/delete_api_key_req_dto_spec.rb +28 -0
  188. data/spec/models/delete_api_key_response_dto_spec.rb +28 -0
  189. data/spec/models/delete_row_apidto_spec.rb +34 -0
  190. data/spec/models/delete_tools_req_dto_spec.rb +28 -0
  191. data/spec/models/delete_tools_res_dto_spec.rb +28 -0
  192. data/spec/models/direct_execute_req_dto_spec.rb +46 -0
  193. data/spec/models/enable_trigger_body_dto_spec.rb +28 -0
  194. data/spec/models/enable_trigger_params_dto_spec.rb +34 -0
  195. data/spec/models/execute_action_res_dto_spec.rb +34 -0
  196. data/spec/models/generate_api_key_req_dto_spec.rb +28 -0
  197. data/spec/models/generate_cli_session_req_dto_spec.rb +28 -0
  198. data/spec/models/generate_cli_session_res_dto_spec.rb +28 -0
  199. data/spec/models/get_active_triggers_query_dto_spec.rb +64 -0
  200. data/spec/models/get_cli_session_res_dto_spec.rb +34 -0
  201. data/spec/models/get_connections_query_dto_spec.rb +76 -0
  202. data/spec/models/get_connections_response_dto_spec.rb +40 -0
  203. data/spec/models/get_connections_result_spec.rb +34 -0
  204. data/spec/models/get_connector_info_res_dto_spec.rb +106 -0
  205. data/spec/models/get_connector_list_res_dto_spec.rb +40 -0
  206. data/spec/models/get_logs_dto_spec.rb +70 -0
  207. data/spec/models/get_logs_query_dto_spec.rb +46 -0
  208. data/spec/models/get_trigger_params_dto_spec.rb +28 -0
  209. data/spec/models/get_trigger_response_dto_spec.rb +34 -0
  210. data/spec/models/handle_trigger_body_dto_spec.rb +28 -0
  211. data/spec/models/handle_trigger_params_dto_spec.rb +34 -0
  212. data/spec/models/identify_client_req_dto_spec.rb +34 -0
  213. data/spec/models/identify_client_res_dto_spec.rb +40 -0
  214. data/spec/models/initiate_connection_payload_dto_spec.rb +46 -0
  215. data/spec/models/initiate_connection_response_spec.rb +34 -0
  216. data/spec/models/invite_member_req_dto_spec.rb +40 -0
  217. data/spec/models/job_status_spec.rb +22 -0
  218. data/spec/models/list_triggers_query_dto_spec.rb +46 -0
  219. data/spec/models/logout_res_dto_spec.rb +28 -0
  220. data/spec/models/logs_res_dto_spec.rb +34 -0
  221. data/spec/models/magic_link_req_dto_spec.rb +34 -0
  222. data/spec/models/magic_link_res_dto_spec.rb +28 -0
  223. data/spec/models/member_res_dto_spec.rb +52 -0
  224. data/spec/models/meta_app_spec.rb +28 -0
  225. data/spec/models/meta_spec.rb +28 -0
  226. data/spec/models/metadata_query_dto_spec.rb +28 -0
  227. data/spec/models/metadata_req_dto_spec.rb +34 -0
  228. data/spec/models/o_auth2_callback_query_dto_spec.rb +28 -0
  229. data/spec/models/open_api_spec_list_res_dto_spec.rb +94 -0
  230. data/spec/models/page_info_dto_spec.rb +40 -0
  231. data/spec/models/page_info_spec.rb +46 -0
  232. data/spec/models/patch_connector_req_dto_spec.rb +34 -0
  233. data/spec/models/patch_connector_res_dto_spec.rb +28 -0
  234. data/spec/models/proxy_execution_req_dto_spec.rb +34 -0
  235. data/spec/models/redirect_uri_dto_spec.rb +28 -0
  236. data/spec/models/set_callback_url_body_dto_spec.rb +28 -0
  237. data/spec/models/single_app_info_res_dto_spec.rb +118 -0
  238. data/spec/models/single_trigger_res_dto_spec.rb +76 -0
  239. data/spec/models/status_spec.rb +22 -0
  240. data/spec/models/switch_trigger_status_body_dto_spec.rb +28 -0
  241. data/spec/models/switch_trigger_status_params_dto_spec.rb +28 -0
  242. data/spec/models/time_spec.rb +22 -0
  243. data/spec/models/toggle_connected_account_response_dto_spec.rb +28 -0
  244. data/spec/models/toggle_trigger_state_response_dto_spec.rb +28 -0
  245. data/spec/models/tools_execute_req_dto_spec.rb +58 -0
  246. data/spec/models/track_client_req_dto_spec.rb +40 -0
  247. data/spec/models/track_client_res_dto_spec.rb +28 -0
  248. data/spec/models/trigger_config_spec.rb +34 -0
  249. data/spec/models/trigger_instance_params_dto_spec.rb +28 -0
  250. data/spec/models/trigger_log_data_spec.rb +70 -0
  251. data/spec/models/trigger_log_item_dto_spec.rb +82 -0
  252. data/spec/models/trigger_logs_res_dto_spec.rb +34 -0
  253. data/spec/models/trigger_metadata_dto_spec.rb +82 -0
  254. data/spec/models/trigger_metadata_spec.rb +94 -0
  255. data/spec/models/trigger_metadata_type_spec.rb +25 -0
  256. data/spec/models/trigger_res_dto_spec.rb +100 -0
  257. data/spec/models/trigger_response_dto_spec.rb +40 -0
  258. data/spec/models/trigger_toggle_info_response_dto_spec.rb +28 -0
  259. data/spec/models/triggers_enabled_toggle_req_dto_spec.rb +28 -0
  260. data/spec/models/triggers_enabled_toggle_res_dto_spec.rb +28 -0
  261. data/spec/models/type_spec.rb +22 -0
  262. data/spec/models/user_git_user_info_spec.rb +34 -0
  263. data/spec/models/verify_cli_code_res_dto_spec.rb +40 -0
  264. data/spec/models/verify_magic_link_data_dto_spec.rb +46 -0
  265. data/spec/models/verify_magic_link_req_dto_spec.rb +28 -0
  266. data/spec/models/verify_magic_link_res_dto_spec.rb +34 -0
  267. data/spec/models/webhook_url_response_dto_spec.rb +34 -0
  268. data/spec/simple_test_spec.rb +52 -0
  269. data/spec/spec_helper.rb +107 -0
  270. metadata +504 -0
@@ -0,0 +1,231 @@
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 WebhookURLResponseDTO
14
+ # The status of the operation
15
+ attr_accessor :status
16
+
17
+ # The callback URL if found
18
+ attr_accessor :callback_url
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'status' => :'status',
24
+ :'callback_url' => :'callbackURL'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'status' => :'String',
37
+ :'callback_url' => :'String'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.openapi_nullable
43
+ Set.new([
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::WebhookURLResponseDTO` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::WebhookURLResponseDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'status')
63
+ self.status = attributes[:'status']
64
+ end
65
+
66
+ if attributes.key?(:'callback_url')
67
+ self.callback_url = attributes[:'callback_url']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ invalid_properties = Array.new
75
+ if @status.nil?
76
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
77
+ end
78
+
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ return false if @status.nil?
86
+ true
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ status == o.status &&
95
+ callback_url == o.callback_url
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Integer] Hash code
106
+ def hash
107
+ [status, callback_url].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def self.build_from_hash(attributes)
114
+ new.build_from_hash(attributes)
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ self.class.openapi_types.each_pair do |key, type|
124
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
125
+ self.send("#{key}=", nil)
126
+ elsif type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
130
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
131
+ end
132
+ elsif !attributes[self.class.attribute_map[key]].nil?
133
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
134
+ end
135
+ end
136
+
137
+ self
138
+ end
139
+
140
+ # Deserializes the data based on type
141
+ # @param string type Data type
142
+ # @param string value Value to be deserialized
143
+ # @return [Object] Deserialized data
144
+ def _deserialize(type, value)
145
+ case type.to_sym
146
+ when :Time
147
+ Time.parse(value)
148
+ when :Date
149
+ Date.parse(value)
150
+ when :String
151
+ value.to_s
152
+ when :Integer
153
+ value.to_i
154
+ when :Float
155
+ value.to_f
156
+ when :Boolean
157
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
+ true
159
+ else
160
+ false
161
+ end
162
+ when :Object
163
+ # generic object (usually a Hash), return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else # model
177
+ # models (e.g. Pet) or oneOf
178
+ klass = Composio.const_get(type)
179
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ if value.nil?
202
+ is_nullable = self.class.openapi_nullable.include?(attr)
203
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
204
+ end
205
+
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ # Outputs non-array value in the form of hash
212
+ # For object, use to_hash. Otherwise, just return the value
213
+ # @param [Object] value Any valid value
214
+ # @return [Hash] Returns the value in the form of hash
215
+ def _to_hash(value)
216
+ if value.is_a?(Array)
217
+ value.compact.map { |v| _to_hash(v) }
218
+ elsif value.is_a?(Hash)
219
+ {}.tap do |hash|
220
+ value.each { |k, v| hash[k] = _to_hash(v) }
221
+ end
222
+ elsif value.respond_to? :to_hash
223
+ value.to_hash
224
+ else
225
+ value
226
+ end
227
+ end
228
+
229
+ end
230
+
231
+ end
@@ -0,0 +1,11 @@
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
+ module Composio
10
+ VERSION = '0.1.0'
11
+ end
data/lib/composio.rb ADDED
@@ -0,0 +1,214 @@
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 'forwardable'
10
+
11
+ # Common files
12
+ require 'composio/api_client'
13
+ require 'composio/api_error'
14
+ require 'composio/version'
15
+ require 'composio/configuration'
16
+
17
+ # Models
18
+ require 'composio/models/api_key_res_dto'
19
+ require 'composio/models/action_details'
20
+ require 'composio/models/action_details_minimal'
21
+ require 'composio/models/action_execution_req_dto'
22
+ require 'composio/models/action_execution_res_dto'
23
+ require 'composio/models/action_log_data'
24
+ require 'composio/models/action_metadata'
25
+ require 'composio/models/action_metadata_type'
26
+ require 'composio/models/actions_controller_v1'
27
+ require 'composio/models/actions_list_response_dto'
28
+ require 'composio/models/actions_minimal_list_response_dto'
29
+ require 'composio/models/actions_query_dto'
30
+ require 'composio/models/active_trigger_instance'
31
+ require 'composio/models/active_triggers_res_dto'
32
+ require 'composio/models/add_repo_url_req_dto'
33
+ require 'composio/models/add_repo_url_res_dto'
34
+ require 'composio/models/add_tools_req_dto'
35
+ require 'composio/models/add_tools_request_dto'
36
+ require 'composio/models/app_info_response_dto'
37
+ require 'composio/models/app_list_res_dto'
38
+ require 'composio/models/app_query_dto'
39
+ require 'composio/models/auth_config_dto'
40
+ require 'composio/models/cli_query_dto'
41
+ require 'composio/models/connected_account_response_dto'
42
+ require 'composio/models/connection_params'
43
+ require 'composio/models/connection_params_for_account'
44
+ require 'composio/models/connection_params_headers'
45
+ require 'composio/models/connection_with_app_data'
46
+ require 'composio/models/connection_with_app_data_created_at'
47
+ require 'composio/models/connector_list_item_dto'
48
+ require 'composio/models/connector_list_item_dto_created_at'
49
+ require 'composio/models/connector_list_item_dto_updated_at'
50
+ require 'composio/models/create_connector_payload_dto'
51
+ require 'composio/models/create_connector_payload_dto_use_composio_auth'
52
+ require 'composio/models/delete_api_key_req_dto'
53
+ require 'composio/models/delete_api_key_response_dto'
54
+ require 'composio/models/delete_row_apidto'
55
+ require 'composio/models/delete_tools_req_dto'
56
+ require 'composio/models/delete_tools_res_dto'
57
+ require 'composio/models/direct_execute_req_dto'
58
+ require 'composio/models/enable_trigger_body_dto'
59
+ require 'composio/models/enable_trigger_params_dto'
60
+ require 'composio/models/execute_action_res_dto'
61
+ require 'composio/models/generate_api_key_req_dto'
62
+ require 'composio/models/generate_cli_session_req_dto'
63
+ require 'composio/models/generate_cli_session_res_dto'
64
+ require 'composio/models/get_active_triggers_query_dto'
65
+ require 'composio/models/get_cli_session_res_dto'
66
+ require 'composio/models/get_connections_query_dto'
67
+ require 'composio/models/get_connections_response_dto'
68
+ require 'composio/models/get_connections_result'
69
+ require 'composio/models/get_connector_info_res_dto'
70
+ require 'composio/models/get_connector_list_res_dto'
71
+ require 'composio/models/get_logs_dto'
72
+ require 'composio/models/get_logs_query_dto'
73
+ require 'composio/models/get_trigger_params_dto'
74
+ require 'composio/models/get_trigger_response_dto'
75
+ require 'composio/models/handle_trigger_body_dto'
76
+ require 'composio/models/handle_trigger_params_dto'
77
+ require 'composio/models/identify_client_req_dto'
78
+ require 'composio/models/identify_client_res_dto'
79
+ require 'composio/models/initiate_connection_payload_dto'
80
+ require 'composio/models/initiate_connection_response'
81
+ require 'composio/models/invite_member_req_dto'
82
+ require 'composio/models/job_status'
83
+ require 'composio/models/list_triggers_query_dto'
84
+ require 'composio/models/logout_res_dto'
85
+ require 'composio/models/logs_res_dto'
86
+ require 'composio/models/magic_link_req_dto'
87
+ require 'composio/models/magic_link_res_dto'
88
+ require 'composio/models/member_res_dto'
89
+ require 'composio/models/meta'
90
+ require 'composio/models/meta_app'
91
+ require 'composio/models/metadata_query_dto'
92
+ require 'composio/models/metadata_req_dto'
93
+ require 'composio/models/o_auth2_callback_query_dto'
94
+ require 'composio/models/open_api_spec_list_res_dto'
95
+ require 'composio/models/page_info'
96
+ require 'composio/models/page_info_dto'
97
+ require 'composio/models/patch_connector_req_dto'
98
+ require 'composio/models/patch_connector_res_dto'
99
+ require 'composio/models/proxy_execution_req_dto'
100
+ require 'composio/models/redirect_uri_dto'
101
+ require 'composio/models/set_callback_url_body_dto'
102
+ require 'composio/models/single_app_info_res_dto'
103
+ require 'composio/models/single_trigger_res_dto'
104
+ require 'composio/models/status'
105
+ require 'composio/models/switch_trigger_status_body_dto'
106
+ require 'composio/models/switch_trigger_status_params_dto'
107
+ require 'composio/models/time'
108
+ require 'composio/models/toggle_connected_account_response_dto'
109
+ require 'composio/models/toggle_trigger_state_response_dto'
110
+ require 'composio/models/tools_execute_req_dto'
111
+ require 'composio/models/track_client_req_dto'
112
+ require 'composio/models/track_client_res_dto'
113
+ require 'composio/models/trigger_config'
114
+ require 'composio/models/trigger_instance_params_dto'
115
+ require 'composio/models/trigger_log_data'
116
+ require 'composio/models/trigger_log_item_dto'
117
+ require 'composio/models/trigger_logs_res_dto'
118
+ require 'composio/models/trigger_metadata'
119
+ require 'composio/models/trigger_metadata_dto'
120
+ require 'composio/models/trigger_metadata_type'
121
+ require 'composio/models/trigger_res_dto'
122
+ require 'composio/models/trigger_response_dto'
123
+ require 'composio/models/trigger_toggle_info_response_dto'
124
+ require 'composio/models/triggers_enabled_toggle_req_dto'
125
+ require 'composio/models/triggers_enabled_toggle_res_dto'
126
+ require 'composio/models/type'
127
+ require 'composio/models/user_git_user_info'
128
+ require 'composio/models/verify_cli_code_res_dto'
129
+ require 'composio/models/verify_magic_link_data_dto'
130
+ require 'composio/models/verify_magic_link_req_dto'
131
+ require 'composio/models/verify_magic_link_res_dto'
132
+ require 'composio/models/webhook_url_response_dto'
133
+
134
+ # APIs
135
+ require 'composio/api/api_keys_api'
136
+ require 'composio/api/actions_api'
137
+ require 'composio/api/apps_api'
138
+ require 'composio/api/auth_api'
139
+ require 'composio/api/cli_api'
140
+ require 'composio/api/connections_api'
141
+ require 'composio/api/integrations_api'
142
+ require 'composio/api/logs_api'
143
+ require 'composio/api/metadata_api'
144
+ require 'composio/api/team_api'
145
+ require 'composio/api/triggers_api'
146
+
147
+ module Composio
148
+ @config = Configuration.default
149
+ SENTINEL = Object.new
150
+ class << self
151
+
152
+ private def is_sentinel(value)
153
+ value == SENTINEL
154
+ end
155
+
156
+ def host
157
+ @config.host
158
+ end
159
+
160
+ def host=(value)
161
+ @config.host = value
162
+ end
163
+ # api key from OpenAPI spec
164
+ def api_key
165
+ @config.api_key
166
+ end
167
+
168
+ def api_key=(value)
169
+ @config.api_key = value
170
+ end
171
+
172
+ # Customize default settings for the SDK using block.
173
+ # Composio.configure do |config|
174
+ # config.host = "http://example.com"
175
+ # end
176
+ # If no block given, return the default Configuration object.
177
+ def configure
178
+ if block_given?
179
+ yield(Configuration.default)
180
+ else
181
+ Configuration.default
182
+ end
183
+ end
184
+ end
185
+
186
+ class Client
187
+ attr_reader :api_keys
188
+ attr_reader :actions
189
+ attr_reader :apps
190
+ attr_reader :auth
191
+ attr_reader :cli
192
+ attr_reader :connections
193
+ attr_reader :integrations
194
+ attr_reader :logs
195
+ attr_reader :metadata
196
+ attr_reader :team
197
+ attr_reader :triggers
198
+
199
+ def initialize(config = Configuration.default)
200
+ @api_client = ApiClient::new(config)
201
+ @api_keys = Composio::APIKeysApi.new(@api_client)
202
+ @actions = Composio::ActionsApi.new(@api_client)
203
+ @apps = Composio::AppsApi.new(@api_client)
204
+ @auth = Composio::AuthApi.new(@api_client)
205
+ @cli = Composio::CLIApi.new(@api_client)
206
+ @connections = Composio::ConnectionsApi.new(@api_client)
207
+ @integrations = Composio::IntegrationsApi.new(@api_client)
208
+ @logs = Composio::LogsApi.new(@api_client)
209
+ @metadata = Composio::MetadataApi.new(@api_client)
210
+ @team = Composio::TeamApi.new(@api_client)
211
+ @triggers = Composio::TriggersApi.new(@api_client)
212
+ end
213
+ end
214
+ end
@@ -0,0 +1,164 @@
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 'spec_helper'
10
+ require 'json'
11
+
12
+ # Unit tests for Composio::ActionsApi
13
+ describe 'ActionsApi' do
14
+ before do
15
+ # run before each test
16
+ @api_instance = Composio::ActionsApi.new
17
+ end
18
+
19
+ after do
20
+ # run after each test
21
+ end
22
+
23
+ describe 'test an instance of ActionsApi' do
24
+ it 'should create an instance of ActionsApi' do
25
+ expect(@api_instance).to be_instance_of(Composio::ActionsApi)
26
+ end
27
+ end
28
+
29
+ # unit tests for execute
30
+ # Execute action
31
+ # @param action_id
32
+ # @param [Hash] opts the optional parameters
33
+ # @option opts [ActionExecutionReqDTO] :action_execution_req_dto ActionExecutionReqDTO
34
+ # @return [ActionExecutionResDto]
35
+ describe 'execute test' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ # unit tests for execute_0
42
+ # Execute action
43
+ # Execute an action. Support both connected account and no auth auth.
44
+ # @param action_id
45
+ # @param [Hash] opts the optional parameters
46
+ # @option opts [ActionExecutionReqDTO] :action_execution_req_dto ActionExecutionReqDTO
47
+ # @return [ActionExecutionResDto]
48
+ describe 'execute_0 test' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ end
52
+ end
53
+
54
+ # unit tests for execute_action_proxy
55
+ # Execute action proxy
56
+ # Execute an action with direct auth.
57
+ # @param endpoint
58
+ # @param connected_account_id
59
+ # @param [Hash] opts the optional parameters
60
+ # @return [ActionExecutionResDto]
61
+ describe 'execute_action_proxy test' do
62
+ it 'should work' do
63
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
64
+ end
65
+ end
66
+
67
+ # unit tests for execute_proxy
68
+ # Execute action proxy
69
+ # @param endpoint
70
+ # @param connected_account_id
71
+ # @param [Hash] opts the optional parameters
72
+ # @return [ExecuteActionResDTO]
73
+ describe 'execute_proxy test' do
74
+ it 'should work' do
75
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
76
+ end
77
+ end
78
+
79
+ # unit tests for get
80
+ # Get action
81
+ # @param action_id
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [ActionDetails]
84
+ describe 'get test' do
85
+ it 'should work' do
86
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
87
+ end
88
+ end
89
+
90
+ # unit tests for get_action_by_id
91
+ # Get action
92
+ # Get action details
93
+ # @param action_id
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [ActionDetails]
96
+ describe 'get_action_by_id test' do
97
+ it 'should work' do
98
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
99
+ end
100
+ end
101
+
102
+ # unit tests for get_all_actions_based_on_query
103
+ # List actions minimal
104
+ # Retrieve a list of all actions based on query parameters.
105
+ # @param [Hash] opts the optional parameters
106
+ # @option opts [String] :app_names
107
+ # @option opts [String] :use_case
108
+ # @option opts [Boolean] :show_enabled_only
109
+ # @option opts [Float] :limit
110
+ # @option opts [String] :apps
111
+ # @option opts [String] :actions
112
+ # @option opts [String] :tags
113
+ # @option opts [Float] :usecase_limit
114
+ # @option opts [Boolean] :filter_important_actions
115
+ # @option opts [Boolean] :show_all
116
+ # @return [ActionsListResponseDTO]
117
+ describe 'get_all_actions_based_on_query test' do
118
+ it 'should work' do
119
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
120
+ end
121
+ end
122
+
123
+ # unit tests for list
124
+ # List actions
125
+ # @param [Hash] opts the optional parameters
126
+ # @option opts [String] :app_names
127
+ # @option opts [String] :use_case
128
+ # @option opts [Boolean] :show_enabled_only
129
+ # @option opts [Float] :limit
130
+ # @option opts [String] :apps
131
+ # @option opts [String] :actions
132
+ # @option opts [String] :tags
133
+ # @option opts [Float] :usecase_limit
134
+ # @option opts [Boolean] :filter_important_actions
135
+ # @option opts [Boolean] :show_all
136
+ # @return [ActionsListResponseDTO]
137
+ describe 'list test' do
138
+ it 'should work' do
139
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
140
+ end
141
+ end
142
+
143
+ # unit tests for list_0
144
+ # List actions
145
+ # Retrieve a list of all actions based on query parameters.
146
+ # @param [Hash] opts the optional parameters
147
+ # @option opts [String] :app_names
148
+ # @option opts [String] :use_case
149
+ # @option opts [Boolean] :show_enabled_only
150
+ # @option opts [Float] :limit
151
+ # @option opts [String] :apps
152
+ # @option opts [String] :actions
153
+ # @option opts [String] :tags
154
+ # @option opts [Float] :usecase_limit
155
+ # @option opts [Boolean] :filter_important_actions
156
+ # @option opts [Boolean] :show_all
157
+ # @return [ActionsListResponseDTO]
158
+ describe 'list_0 test' do
159
+ it 'should work' do
160
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
161
+ end
162
+ end
163
+
164
+ end
@@ -0,0 +1,61 @@
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 'spec_helper'
10
+ require 'json'
11
+
12
+ # Unit tests for Composio::APIKeysApi
13
+ describe 'APIKeysApi' do
14
+ before do
15
+ # run before each test
16
+ @api_instance = Composio::APIKeysApi.new
17
+ end
18
+
19
+ after do
20
+ # run after each test
21
+ end
22
+
23
+ describe 'test an instance of APIKeysApi' do
24
+ it 'should create an instance of APIKeysApi' do
25
+ expect(@api_instance).to be_instance_of(Composio::APIKeysApi)
26
+ end
27
+ end
28
+
29
+ # unit tests for generate
30
+ # Generate api key
31
+ # @param generate_api_key_req_dto GenerateAPIKeyReqDTO
32
+ # @param [Hash] opts the optional parameters
33
+ # @return [APIKeyResDTO]
34
+ describe 'generate test' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ # unit tests for list
41
+ # List api keys
42
+ # @param [Hash] opts the optional parameters
43
+ # @return [Array<APIKeyResDTO>]
44
+ describe 'list test' do
45
+ it 'should work' do
46
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
47
+ end
48
+ end
49
+
50
+ # unit tests for remove
51
+ # Delete api key
52
+ # @param id
53
+ # @param [Hash] opts the optional parameters
54
+ # @return [DeleteAPIKeyResponseDTO]
55
+ describe 'remove test' do
56
+ it 'should work' do
57
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ end
59
+ end
60
+
61
+ end