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,578 @@
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 IntegrationsApi
13
+ attr_accessor :api_client
14
+
15
+ def initialize(api_client = ApiClient.default)
16
+ @api_client = api_client
17
+ end
18
+
19
+ # Create connector
20
+ #
21
+ # @param name [String] Name of the connector
22
+ # @param app_id [String] Application ID
23
+ # @param auth_scheme [String] Authentication scheme
24
+ # @param auth_config [AuthConfigDTO]
25
+ # @param use_composio_auth [CreateConnectorPayloadDTOUseComposioAuth]
26
+ # @param force_new_integration [Boolean] Flag to force new integration
27
+ # @param body [CreateConnectorPayloadDTO]
28
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
29
+ def create_integration(name:, app_id:, auth_scheme: SENTINEL, auth_config: SENTINEL, use_composio_auth: SENTINEL, force_new_integration: SENTINEL, extra: {})
30
+ _body = {}
31
+ _body[:name] = name if name != SENTINEL
32
+ _body[:authScheme] = auth_scheme if auth_scheme != SENTINEL
33
+ _body[:authConfig] = auth_config if auth_config != SENTINEL
34
+ _body[:useComposioAuth] = use_composio_auth if use_composio_auth != SENTINEL
35
+ _body[:appId] = app_id if app_id != SENTINEL
36
+ _body[:forceNewIntegration] = force_new_integration if force_new_integration != SENTINEL
37
+ extra[:create_connector_payload_dto] = _body if !_body.empty?
38
+ api_response = create_integration_with_http_info_impl(extra)
39
+ api_response.data
40
+ end
41
+
42
+ # Create connector
43
+ #
44
+ # @param name [String] Name of the connector
45
+ # @param app_id [String] Application ID
46
+ # @param auth_scheme [String] Authentication scheme
47
+ # @param auth_config [AuthConfigDTO]
48
+ # @param use_composio_auth [CreateConnectorPayloadDTOUseComposioAuth]
49
+ # @param force_new_integration [Boolean] Flag to force new integration
50
+ # @param body [CreateConnectorPayloadDTO]
51
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
52
+ def create_integration_with_http_info(name:, app_id:, auth_scheme: SENTINEL, auth_config: SENTINEL, use_composio_auth: SENTINEL, force_new_integration: SENTINEL, extra: {})
53
+ _body = {}
54
+ _body[:name] = name if name != SENTINEL
55
+ _body[:authScheme] = auth_scheme if auth_scheme != SENTINEL
56
+ _body[:authConfig] = auth_config if auth_config != SENTINEL
57
+ _body[:useComposioAuth] = use_composio_auth if use_composio_auth != SENTINEL
58
+ _body[:appId] = app_id if app_id != SENTINEL
59
+ _body[:forceNewIntegration] = force_new_integration if force_new_integration != SENTINEL
60
+ extra[:create_connector_payload_dto] = _body if !_body.empty?
61
+ create_integration_with_http_info_impl(extra)
62
+ end
63
+
64
+ # Create connector
65
+ # @param [Hash] opts the optional parameters
66
+ # @option opts [CreateConnectorPayloadDTO] :create_connector_payload_dto CreateConnectorPayloadDTO
67
+ # @return [GetConnectorInfoResDTO]
68
+ private def create_integration_impl(opts = {})
69
+ data, _status_code, _headers = create_integration_with_http_info(opts)
70
+ data
71
+ end
72
+
73
+ # Create connector
74
+ # @param [Hash] opts the optional parameters
75
+ # @option opts [CreateConnectorPayloadDTO] :create_connector_payload_dto CreateConnectorPayloadDTO
76
+ # @return [APIResponse] data is GetConnectorInfoResDTO, status code, headers and response
77
+ private def create_integration_with_http_info_impl(opts = {})
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug 'Calling API: IntegrationsApi.create_integration ...'
80
+ end
81
+ # resource path
82
+ local_var_path = '/api/v1/integrations'
83
+
84
+ # query parameters
85
+ query_params = opts[:query_params] || {}
86
+
87
+ # header parameters
88
+ header_params = opts[:header_params] || {}
89
+ # HTTP header 'Accept' (if needed)
90
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
91
+ # HTTP header 'Content-Type'
92
+ content_type = @api_client.select_header_content_type(['application/json'])
93
+ if !content_type.nil?
94
+ header_params['Content-Type'] = content_type
95
+ end
96
+
97
+ # form parameters
98
+ form_params = opts[:form_params] || {}
99
+
100
+ # http body (model)
101
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_connector_payload_dto'])
102
+
103
+ # return_type
104
+ return_type = opts[:debug_return_type] || 'GetConnectorInfoResDTO'
105
+
106
+ # auth_names
107
+ auth_names = opts[:debug_auth_names] || ['api_key']
108
+
109
+ new_options = opts.merge(
110
+ :operation => :"IntegrationsApi.create_integration",
111
+ :header_params => header_params,
112
+ :query_params => query_params,
113
+ :form_params => form_params,
114
+ :body => post_body,
115
+ :auth_names => auth_names,
116
+ :return_type => return_type
117
+ )
118
+
119
+ data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
120
+ if @api_client.config.debugging
121
+ @api_client.config.logger.debug "API called: IntegrationsApi#create_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
122
+ end
123
+ APIResponse::new(data, status_code, headers, response)
124
+ end
125
+
126
+
127
+ # Delete connector
128
+ #
129
+ # @param integration_id [String]
130
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
131
+ def delete_connector(integration_id:, extra: {})
132
+ api_response = delete_connector_with_http_info_impl(integration_id, extra)
133
+ api_response.data
134
+ end
135
+
136
+ # Delete connector
137
+ #
138
+ # @param integration_id [String]
139
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
140
+ def delete_connector_with_http_info(integration_id:, extra: {})
141
+ delete_connector_with_http_info_impl(integration_id, extra)
142
+ end
143
+
144
+ # Delete connector
145
+ # @param integration_id [String]
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [DeleteRowAPIDTO]
148
+ private def delete_connector_impl(integration_id, opts = {})
149
+ data, _status_code, _headers = delete_connector_with_http_info(integration_id, opts)
150
+ data
151
+ end
152
+
153
+ # Delete connector
154
+ # @param integration_id [String]
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [APIResponse] data is DeleteRowAPIDTO, status code, headers and response
157
+ private def delete_connector_with_http_info_impl(integration_id, opts = {})
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug 'Calling API: IntegrationsApi.delete_connector ...'
160
+ end
161
+ # verify the required parameter 'integration_id' is set
162
+ if @api_client.config.client_side_validation && integration_id.nil?
163
+ fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.delete_connector"
164
+ end
165
+ pattern = Regexp.new(/[^\/#\?]+?/)
166
+ if @api_client.config.client_side_validation && integration_id !~ pattern
167
+ fail ArgumentError, "invalid value for 'integration_id' when calling IntegrationsApi.delete_connector, must conform to the pattern #{pattern}."
168
+ end
169
+
170
+ # resource path
171
+ local_var_path = '/api/v1/integrations/{integrationId}'.sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))
172
+
173
+ # query parameters
174
+ query_params = opts[:query_params] || {}
175
+
176
+ # header parameters
177
+ header_params = opts[:header_params] || {}
178
+ # HTTP header 'Accept' (if needed)
179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
180
+
181
+ # form parameters
182
+ form_params = opts[:form_params] || {}
183
+
184
+ # http body (model)
185
+ post_body = opts[:debug_body]
186
+
187
+ # return_type
188
+ return_type = opts[:debug_return_type] || 'DeleteRowAPIDTO'
189
+
190
+ # auth_names
191
+ auth_names = opts[:debug_auth_names] || ['api_key']
192
+
193
+ new_options = opts.merge(
194
+ :operation => :"IntegrationsApi.delete_connector",
195
+ :header_params => header_params,
196
+ :query_params => query_params,
197
+ :form_params => form_params,
198
+ :body => post_body,
199
+ :auth_names => auth_names,
200
+ :return_type => return_type
201
+ )
202
+
203
+ data, status_code, headers, response = @api_client.call_api(:DELETE, local_var_path, new_options)
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "API called: IntegrationsApi#delete_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
+ end
207
+ APIResponse::new(data, status_code, headers, response)
208
+ end
209
+
210
+
211
+ # Get connector info
212
+ #
213
+ # @param integration_id [String]
214
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
215
+ def get_connector_info(integration_id:, extra: {})
216
+ api_response = get_connector_info_with_http_info_impl(integration_id, extra)
217
+ api_response.data
218
+ end
219
+
220
+ # Get connector info
221
+ #
222
+ # @param integration_id [String]
223
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
224
+ def get_connector_info_with_http_info(integration_id:, extra: {})
225
+ get_connector_info_with_http_info_impl(integration_id, extra)
226
+ end
227
+
228
+ # Get connector info
229
+ # @param integration_id [String]
230
+ # @param [Hash] opts the optional parameters
231
+ # @return [GetConnectorInfoResDTO]
232
+ private def get_connector_info_impl(integration_id, opts = {})
233
+ data, _status_code, _headers = get_connector_info_with_http_info(integration_id, opts)
234
+ data
235
+ end
236
+
237
+ # Get connector info
238
+ # @param integration_id [String]
239
+ # @param [Hash] opts the optional parameters
240
+ # @return [APIResponse] data is GetConnectorInfoResDTO, status code, headers and response
241
+ private def get_connector_info_with_http_info_impl(integration_id, opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: IntegrationsApi.get_connector_info ...'
244
+ end
245
+ # verify the required parameter 'integration_id' is set
246
+ if @api_client.config.client_side_validation && integration_id.nil?
247
+ fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.get_connector_info"
248
+ end
249
+ pattern = Regexp.new(/[^\/#\?]+?/)
250
+ if @api_client.config.client_side_validation && integration_id !~ pattern
251
+ fail ArgumentError, "invalid value for 'integration_id' when calling IntegrationsApi.get_connector_info, must conform to the pattern #{pattern}."
252
+ end
253
+
254
+ # resource path
255
+ local_var_path = '/api/v1/integrations/{integrationId}'.sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))
256
+
257
+ # query parameters
258
+ query_params = opts[:query_params] || {}
259
+
260
+ # header parameters
261
+ header_params = opts[:header_params] || {}
262
+ # HTTP header 'Accept' (if needed)
263
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
264
+
265
+ # form parameters
266
+ form_params = opts[:form_params] || {}
267
+
268
+ # http body (model)
269
+ post_body = opts[:debug_body]
270
+
271
+ # return_type
272
+ return_type = opts[:debug_return_type] || 'GetConnectorInfoResDTO'
273
+
274
+ # auth_names
275
+ auth_names = opts[:debug_auth_names] || ['api_key']
276
+
277
+ new_options = opts.merge(
278
+ :operation => :"IntegrationsApi.get_connector_info",
279
+ :header_params => header_params,
280
+ :query_params => query_params,
281
+ :form_params => form_params,
282
+ :body => post_body,
283
+ :auth_names => auth_names,
284
+ :return_type => return_type
285
+ )
286
+
287
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug "API called: IntegrationsApi#get_connector_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
290
+ end
291
+ APIResponse::new(data, status_code, headers, response)
292
+ end
293
+
294
+
295
+ # List global connectors
296
+ #
297
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
298
+ def list_global_connectors(extra: {})
299
+ api_response = list_global_connectors_with_http_info_impl(extra)
300
+ api_response.data
301
+ end
302
+
303
+ # List global connectors
304
+ #
305
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
306
+ def list_global_connectors_with_http_info(extra: {})
307
+ list_global_connectors_with_http_info_impl(extra)
308
+ end
309
+
310
+ # List global connectors
311
+ # @param [Hash] opts the optional parameters
312
+ # @return [GetConnectorListResDTO]
313
+ private def list_global_connectors_impl(opts = {})
314
+ data, _status_code, _headers = list_global_connectors_with_http_info(opts)
315
+ data
316
+ end
317
+
318
+ # List global connectors
319
+ # @param [Hash] opts the optional parameters
320
+ # @return [APIResponse] data is GetConnectorListResDTO, status code, headers and response
321
+ private def list_global_connectors_with_http_info_impl(opts = {})
322
+ if @api_client.config.debugging
323
+ @api_client.config.logger.debug 'Calling API: IntegrationsApi.list_global_connectors ...'
324
+ end
325
+ # resource path
326
+ local_var_path = '/api/v1/integrations'
327
+
328
+ # query parameters
329
+ query_params = opts[:query_params] || {}
330
+
331
+ # header parameters
332
+ header_params = opts[:header_params] || {}
333
+ # HTTP header 'Accept' (if needed)
334
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
335
+
336
+ # form parameters
337
+ form_params = opts[:form_params] || {}
338
+
339
+ # http body (model)
340
+ post_body = opts[:debug_body]
341
+
342
+ # return_type
343
+ return_type = opts[:debug_return_type] || 'GetConnectorListResDTO'
344
+
345
+ # auth_names
346
+ auth_names = opts[:debug_auth_names] || ['api_key']
347
+
348
+ new_options = opts.merge(
349
+ :operation => :"IntegrationsApi.list_global_connectors",
350
+ :header_params => header_params,
351
+ :query_params => query_params,
352
+ :form_params => form_params,
353
+ :body => post_body,
354
+ :auth_names => auth_names,
355
+ :return_type => return_type
356
+ )
357
+
358
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
359
+ if @api_client.config.debugging
360
+ @api_client.config.logger.debug "API called: IntegrationsApi#list_global_connectors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
361
+ end
362
+ APIResponse::new(data, status_code, headers, response)
363
+ end
364
+
365
+
366
+ # Patch connector
367
+ #
368
+ # @param integration_id [String]
369
+ # @param auth_config [Object] Authentication configuration for the connector
370
+ # @param enabled [Boolean] Flag to indicate if the connector is enabled
371
+ # @param body [PatchConnectorReqDTO]
372
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
373
+ def update_integration(integration_id:, auth_config: SENTINEL, enabled: SENTINEL, extra: {})
374
+ _body = {}
375
+ _body[:authConfig] = auth_config if auth_config != SENTINEL
376
+ _body[:enabled] = enabled if enabled != SENTINEL
377
+ extra[:patch_connector_req_dto] = _body if !_body.empty?
378
+ api_response = update_integration_with_http_info_impl(integration_id, extra)
379
+ api_response.data
380
+ end
381
+
382
+ # Patch connector
383
+ #
384
+ # @param integration_id [String]
385
+ # @param auth_config [Object] Authentication configuration for the connector
386
+ # @param enabled [Boolean] Flag to indicate if the connector is enabled
387
+ # @param body [PatchConnectorReqDTO]
388
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
389
+ def update_integration_with_http_info(integration_id:, auth_config: SENTINEL, enabled: SENTINEL, extra: {})
390
+ _body = {}
391
+ _body[:authConfig] = auth_config if auth_config != SENTINEL
392
+ _body[:enabled] = enabled if enabled != SENTINEL
393
+ extra[:patch_connector_req_dto] = _body if !_body.empty?
394
+ update_integration_with_http_info_impl(integration_id, extra)
395
+ end
396
+
397
+ # Patch connector
398
+ # @param integration_id [String]
399
+ # @param [Hash] opts the optional parameters
400
+ # @option opts [PatchConnectorReqDTO] :patch_connector_req_dto PatchConnectorReqDTO
401
+ # @return [PatchConnectorResDTO]
402
+ private def update_integration_impl(integration_id, opts = {})
403
+ data, _status_code, _headers = update_integration_with_http_info(integration_id, opts)
404
+ data
405
+ end
406
+
407
+ # Patch connector
408
+ # @param integration_id [String]
409
+ # @param [Hash] opts the optional parameters
410
+ # @option opts [PatchConnectorReqDTO] :patch_connector_req_dto PatchConnectorReqDTO
411
+ # @return [APIResponse] data is PatchConnectorResDTO, status code, headers and response
412
+ private def update_integration_with_http_info_impl(integration_id, opts = {})
413
+ if @api_client.config.debugging
414
+ @api_client.config.logger.debug 'Calling API: IntegrationsApi.update_integration ...'
415
+ end
416
+ # verify the required parameter 'integration_id' is set
417
+ if @api_client.config.client_side_validation && integration_id.nil?
418
+ fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.update_integration"
419
+ end
420
+ pattern = Regexp.new(/[^\/#\?]+?/)
421
+ if @api_client.config.client_side_validation && integration_id !~ pattern
422
+ fail ArgumentError, "invalid value for 'integration_id' when calling IntegrationsApi.update_integration, must conform to the pattern #{pattern}."
423
+ end
424
+
425
+ # resource path
426
+ local_var_path = '/api/v1/integrations/{integrationId}'.sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))
427
+
428
+ # query parameters
429
+ query_params = opts[:query_params] || {}
430
+
431
+ # header parameters
432
+ header_params = opts[:header_params] || {}
433
+ # HTTP header 'Accept' (if needed)
434
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
435
+ # HTTP header 'Content-Type'
436
+ content_type = @api_client.select_header_content_type(['application/json'])
437
+ if !content_type.nil?
438
+ header_params['Content-Type'] = content_type
439
+ end
440
+
441
+ # form parameters
442
+ form_params = opts[:form_params] || {}
443
+
444
+ # http body (model)
445
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patch_connector_req_dto'])
446
+
447
+ # return_type
448
+ return_type = opts[:debug_return_type] || 'PatchConnectorResDTO'
449
+
450
+ # auth_names
451
+ auth_names = opts[:debug_auth_names] || ['api_key']
452
+
453
+ new_options = opts.merge(
454
+ :operation => :"IntegrationsApi.update_integration",
455
+ :header_params => header_params,
456
+ :query_params => query_params,
457
+ :form_params => form_params,
458
+ :body => post_body,
459
+ :auth_names => auth_names,
460
+ :return_type => return_type
461
+ )
462
+
463
+ data, status_code, headers, response = @api_client.call_api(:PATCH, local_var_path, new_options)
464
+ if @api_client.config.debugging
465
+ @api_client.config.logger.debug "API called: IntegrationsApi#update_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
466
+ end
467
+ APIResponse::new(data, status_code, headers, response)
468
+ end
469
+
470
+
471
+ # Patch post connector
472
+ #
473
+ # @param integration_id [String]
474
+ # @param auth_config [Object] Authentication configuration for the connector
475
+ # @param enabled [Boolean] Flag to indicate if the connector is enabled
476
+ # @param body [PatchConnectorReqDTO]
477
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
478
+ def update_status(integration_id:, auth_config: SENTINEL, enabled: SENTINEL, extra: {})
479
+ _body = {}
480
+ _body[:authConfig] = auth_config if auth_config != SENTINEL
481
+ _body[:enabled] = enabled if enabled != SENTINEL
482
+ extra[:patch_connector_req_dto] = _body if !_body.empty?
483
+ api_response = update_status_with_http_info_impl(integration_id, extra)
484
+ api_response.data
485
+ end
486
+
487
+ # Patch post connector
488
+ #
489
+ # @param integration_id [String]
490
+ # @param auth_config [Object] Authentication configuration for the connector
491
+ # @param enabled [Boolean] Flag to indicate if the connector is enabled
492
+ # @param body [PatchConnectorReqDTO]
493
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
494
+ def update_status_with_http_info(integration_id:, auth_config: SENTINEL, enabled: SENTINEL, extra: {})
495
+ _body = {}
496
+ _body[:authConfig] = auth_config if auth_config != SENTINEL
497
+ _body[:enabled] = enabled if enabled != SENTINEL
498
+ extra[:patch_connector_req_dto] = _body if !_body.empty?
499
+ update_status_with_http_info_impl(integration_id, extra)
500
+ end
501
+
502
+ # Patch post connector
503
+ # @param integration_id [String]
504
+ # @param [Hash] opts the optional parameters
505
+ # @option opts [PatchConnectorReqDTO] :patch_connector_req_dto PatchConnectorReqDTO
506
+ # @return [PatchConnectorResDTO]
507
+ private def update_status_impl(integration_id, opts = {})
508
+ data, _status_code, _headers = update_status_with_http_info(integration_id, opts)
509
+ data
510
+ end
511
+
512
+ # Patch post connector
513
+ # @param integration_id [String]
514
+ # @param [Hash] opts the optional parameters
515
+ # @option opts [PatchConnectorReqDTO] :patch_connector_req_dto PatchConnectorReqDTO
516
+ # @return [APIResponse] data is PatchConnectorResDTO, status code, headers and response
517
+ private def update_status_with_http_info_impl(integration_id, opts = {})
518
+ if @api_client.config.debugging
519
+ @api_client.config.logger.debug 'Calling API: IntegrationsApi.update_status ...'
520
+ end
521
+ # verify the required parameter 'integration_id' is set
522
+ if @api_client.config.client_side_validation && integration_id.nil?
523
+ fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.update_status"
524
+ end
525
+ pattern = Regexp.new(/[^\/#\?]+?/)
526
+ if @api_client.config.client_side_validation && integration_id !~ pattern
527
+ fail ArgumentError, "invalid value for 'integration_id' when calling IntegrationsApi.update_status, must conform to the pattern #{pattern}."
528
+ end
529
+
530
+ # resource path
531
+ local_var_path = '/api/v1/integrations/{integrationId}/status'.sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))
532
+
533
+ # query parameters
534
+ query_params = opts[:query_params] || {}
535
+
536
+ # header parameters
537
+ header_params = opts[:header_params] || {}
538
+ # HTTP header 'Accept' (if needed)
539
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
540
+ # HTTP header 'Content-Type'
541
+ content_type = @api_client.select_header_content_type(['application/json'])
542
+ if !content_type.nil?
543
+ header_params['Content-Type'] = content_type
544
+ end
545
+
546
+ # form parameters
547
+ form_params = opts[:form_params] || {}
548
+
549
+ # http body (model)
550
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patch_connector_req_dto'])
551
+
552
+ # return_type
553
+ return_type = opts[:debug_return_type] || 'PatchConnectorResDTO'
554
+
555
+ # auth_names
556
+ auth_names = opts[:debug_auth_names] || ['api_key']
557
+
558
+ new_options = opts.merge(
559
+ :operation => :"IntegrationsApi.update_status",
560
+ :header_params => header_params,
561
+ :query_params => query_params,
562
+ :form_params => form_params,
563
+ :body => post_body,
564
+ :auth_names => auth_names,
565
+ :return_type => return_type
566
+ )
567
+
568
+ data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
569
+ if @api_client.config.debugging
570
+ @api_client.config.logger.debug "API called: IntegrationsApi#update_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
571
+ end
572
+ APIResponse::new(data, status_code, headers, response)
573
+ end
574
+ end
575
+
576
+ # top-level client access to avoid having the user to insantiate their own API instances
577
+ Integrations = IntegrationsApi::new
578
+ end