composio 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +462 -4
- data/lib/composio/api/actions_api.rb +107 -0
- data/lib/composio/api/analytics_api.rb +181 -0
- data/lib/composio/api/apps_api.rb +257 -0
- data/lib/composio/api/event_logs_api.rb +427 -0
- data/lib/composio/api/logs_api.rb +127 -9
- data/lib/composio/api/payment_api.rb +430 -0
- data/lib/composio/models/action_analytics_dto.rb +250 -0
- data/lib/composio/models/action_by_app_dto.rb +237 -0
- data/lib/composio/models/action_by_status_dto.rb +237 -0
- data/lib/composio/models/action_get_nla_inputs_req_dto.rb +220 -0
- data/lib/composio/models/analytics_data_req_dto.rb +250 -0
- data/lib/composio/models/analytics_data_res_dto.rb +282 -0
- data/lib/composio/models/analytics_entity_data_dto.rb +257 -0
- data/lib/composio/models/api_key_res_dto.rb +61 -4
- data/lib/composio/models/app_name_count_dto.rb +267 -0
- data/lib/composio/models/client_unique_user_id_count_dto.rb +237 -0
- data/lib/composio/models/connected_account_response_dto.rb +38 -1
- data/lib/composio/models/connection_params.rb +22 -6
- data/lib/composio/models/connection_with_app_data.rb +22 -6
- data/lib/composio/models/connector_list_item_dto.rb +16 -1
- data/lib/composio/models/create_checkout_session_req_dto.rb +220 -0
- data/lib/composio/models/entity_query_req_dto.rb +216 -0
- data/lib/composio/models/fetch_query_dto.rb +278 -0
- data/lib/composio/models/get_connector_list_res_dto.rb +0 -1
- data/lib/composio/models/get_logs_dto.rb +10 -10
- data/lib/composio/models/{job_status.rb → get_logs_dto_status.rb} +6 -6
- data/lib/composio/models/ingest_data_dto.rb +298 -0
- data/lib/composio/models/ingest_data_response_dto.rb +220 -0
- data/lib/composio/models/integrations_with_counts_dto.rb +297 -0
- data/lib/composio/models/invite_member_req_dto.rb +14 -4
- data/lib/composio/models/last_time_period.rb +40 -0
- data/lib/composio/models/member_info_res_dto.rb +324 -0
- data/lib/composio/models/{connection_with_app_data_created_at.rb → member_info_res_dto_created_at.rb} +1 -1
- data/lib/composio/models/member_res_dto.rb +16 -1
- data/lib/composio/models/member_res_dto_role.rb +36 -0
- data/lib/composio/models/open_api_spec_list_res_dto.rb +17 -74
- data/lib/composio/models/plan.rb +38 -0
- data/lib/composio/models/role.rb +36 -0
- data/lib/composio/models/state.rb +41 -0
- data/lib/composio/models/status.rb +7 -4
- data/lib/composio/models/t_connection_count_dto.rb +236 -0
- data/lib/composio/models/time_period_req_dto.rb +216 -0
- data/lib/composio/models/top_entities_res_dto.rb +223 -0
- data/lib/composio/models/update_member_req_dto.rb +236 -0
- data/lib/composio/models/update_member_req_dto_role.rb +36 -0
- data/lib/composio/models/webhook_req_dto.rb +221 -0
- data/lib/composio/models/webhook_secret_res_dto.rb +221 -0
- data/lib/composio/version.rb +1 -1
- data/lib/composio.rb +39 -2
- data/spec/api/actions_api_spec.rb +13 -0
- data/spec/api/analytics_api_spec.rb +51 -0
- data/spec/api/apps_api_spec.rb +34 -0
- data/spec/api/event_logs_api_spec.rb +83 -0
- data/spec/api/logs_api_spec.rb +13 -1
- data/spec/api/payment_api_spec.rb +83 -0
- data/spec/models/action_analytics_dto_spec.rb +40 -0
- data/spec/models/action_by_app_dto_spec.rb +34 -0
- data/spec/models/action_by_status_dto_spec.rb +34 -0
- data/spec/models/action_get_nla_inputs_req_dto_spec.rb +28 -0
- data/spec/models/analytics_data_req_dto_spec.rb +32 -0
- data/spec/models/analytics_data_res_dto_spec.rb +52 -0
- data/spec/models/analytics_entity_data_dto_spec.rb +40 -0
- data/spec/models/api_key_res_dto_spec.rb +18 -0
- data/spec/models/app_name_count_dto_spec.rb +46 -0
- data/spec/models/client_unique_user_id_count_dto_spec.rb +34 -0
- data/spec/models/connected_account_response_dto_spec.rb +18 -0
- data/spec/models/connection_params_spec.rb +6 -0
- data/spec/models/connection_with_app_data_spec.rb +6 -0
- data/spec/models/connector_list_item_dto_spec.rb +6 -0
- data/spec/models/create_checkout_session_req_dto_spec.rb +28 -0
- data/spec/models/entity_query_req_dto_spec.rb +28 -0
- data/spec/models/fetch_query_dto_spec.rb +34 -0
- data/spec/models/get_logs_dto_spec.rb +1 -1
- data/spec/models/get_logs_dto_status_spec.rb +22 -0
- data/spec/models/ingest_data_dto_spec.rb +64 -0
- data/spec/models/ingest_data_response_dto_spec.rb +28 -0
- data/spec/models/integrations_with_counts_dto_spec.rb +58 -0
- data/spec/models/invite_member_req_dto_spec.rb +6 -0
- data/spec/models/last_time_period_spec.rb +22 -0
- data/spec/models/{connection_with_app_data_created_at_spec.rb → member_info_res_dto_created_at_spec.rb} +2 -2
- data/spec/models/member_info_res_dto_spec.rb +76 -0
- data/spec/models/member_res_dto_role_spec.rb +22 -0
- data/spec/models/member_res_dto_spec.rb +6 -0
- data/spec/models/open_api_spec_list_res_dto_spec.rb +5 -29
- data/spec/models/plan_spec.rb +22 -0
- data/spec/models/role_spec.rb +22 -0
- data/spec/models/state_spec.rb +22 -0
- data/spec/models/t_connection_count_dto_spec.rb +34 -0
- data/spec/models/time_period_req_dto_spec.rb +28 -0
- data/spec/models/top_entities_res_dto_spec.rb +28 -0
- data/spec/models/update_member_req_dto_role_spec.rb +22 -0
- data/spec/models/update_member_req_dto_spec.rb +34 -0
- data/spec/models/webhook_req_dto_spec.rb +28 -0
- data/spec/models/webhook_secret_res_dto_spec.rb +28 -0
- metadata +201 -108
- data/spec/models/job_status_spec.rb +0 -22
@@ -0,0 +1,427 @@
|
|
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 EventLogsApi
|
13
|
+
attr_accessor :api_client
|
14
|
+
|
15
|
+
def initialize(api_client = ApiClient.default)
|
16
|
+
@api_client = api_client
|
17
|
+
end
|
18
|
+
|
19
|
+
# Get events
|
20
|
+
#
|
21
|
+
# Fetch events from database
|
22
|
+
#
|
23
|
+
# @param start_time [String]
|
24
|
+
# @param end_time [String]
|
25
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
26
|
+
def get_events(start_time:, end_time:, extra: {})
|
27
|
+
api_response = get_events_with_http_info_impl(start_time, end_time, extra)
|
28
|
+
api_response.data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Get events
|
32
|
+
#
|
33
|
+
# Fetch events from database
|
34
|
+
#
|
35
|
+
# @param start_time [String]
|
36
|
+
# @param end_time [String]
|
37
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
38
|
+
def get_events_with_http_info(start_time:, end_time:, extra: {})
|
39
|
+
get_events_with_http_info_impl(start_time, end_time, extra)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Get events
|
43
|
+
# Fetch events from database
|
44
|
+
# @param start_time [String]
|
45
|
+
# @param end_time [String]
|
46
|
+
# @param [Hash] opts the optional parameters
|
47
|
+
# @return [Object]
|
48
|
+
private def get_events_impl(start_time, end_time, opts = {})
|
49
|
+
data, _status_code, _headers = get_events_with_http_info(start_time, end_time, opts)
|
50
|
+
data
|
51
|
+
end
|
52
|
+
|
53
|
+
# Get events
|
54
|
+
# Fetch events from database
|
55
|
+
# @param start_time [String]
|
56
|
+
# @param end_time [String]
|
57
|
+
# @param [Hash] opts the optional parameters
|
58
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
59
|
+
private def get_events_with_http_info_impl(start_time, end_time, opts = {})
|
60
|
+
if @api_client.config.debugging
|
61
|
+
@api_client.config.logger.debug 'Calling API: EventLogsApi.get_events ...'
|
62
|
+
end
|
63
|
+
# verify the required parameter 'start_time' is set
|
64
|
+
if @api_client.config.client_side_validation && start_time.nil?
|
65
|
+
fail ArgumentError, "Missing the required parameter 'start_time' when calling EventLogsApi.get_events"
|
66
|
+
end
|
67
|
+
pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/)
|
68
|
+
if @api_client.config.client_side_validation && start_time !~ pattern
|
69
|
+
fail ArgumentError, "invalid value for 'start_time' when calling EventLogsApi.get_events, must conform to the pattern #{pattern}."
|
70
|
+
end
|
71
|
+
|
72
|
+
# verify the required parameter 'end_time' is set
|
73
|
+
if @api_client.config.client_side_validation && end_time.nil?
|
74
|
+
fail ArgumentError, "Missing the required parameter 'end_time' when calling EventLogsApi.get_events"
|
75
|
+
end
|
76
|
+
pattern = Regexp.new(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?/)
|
77
|
+
if @api_client.config.client_side_validation && end_time !~ pattern
|
78
|
+
fail ArgumentError, "invalid value for 'end_time' when calling EventLogsApi.get_events, must conform to the pattern #{pattern}."
|
79
|
+
end
|
80
|
+
|
81
|
+
# resource path
|
82
|
+
local_var_path = '/api/v1/event_logs/get/events'
|
83
|
+
|
84
|
+
# query parameters
|
85
|
+
query_params = opts[:query_params] || {}
|
86
|
+
query_params[:'startTime'] = start_time
|
87
|
+
query_params[:'endTime'] = end_time
|
88
|
+
|
89
|
+
# header parameters
|
90
|
+
header_params = opts[:header_params] || {}
|
91
|
+
# HTTP header 'Accept' (if needed)
|
92
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
93
|
+
|
94
|
+
# form parameters
|
95
|
+
form_params = opts[:form_params] || {}
|
96
|
+
|
97
|
+
# http body (model)
|
98
|
+
post_body = opts[:debug_body]
|
99
|
+
|
100
|
+
# return_type
|
101
|
+
return_type = opts[:debug_return_type] || 'Object'
|
102
|
+
|
103
|
+
# auth_names
|
104
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
105
|
+
|
106
|
+
new_options = opts.merge(
|
107
|
+
:operation => :"EventLogsApi.get_events",
|
108
|
+
:header_params => header_params,
|
109
|
+
:query_params => query_params,
|
110
|
+
:form_params => form_params,
|
111
|
+
:body => post_body,
|
112
|
+
:auth_names => auth_names,
|
113
|
+
:return_type => return_type
|
114
|
+
)
|
115
|
+
|
116
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
117
|
+
if @api_client.config.debugging
|
118
|
+
@api_client.config.logger.debug "API called: EventLogsApi#get_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
119
|
+
end
|
120
|
+
APIResponse::new(data, status_code, headers, response)
|
121
|
+
end
|
122
|
+
|
123
|
+
|
124
|
+
# Get webhook
|
125
|
+
#
|
126
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
127
|
+
def get_webhook(extra: {})
|
128
|
+
api_response = get_webhook_with_http_info_impl(extra)
|
129
|
+
api_response.data
|
130
|
+
end
|
131
|
+
|
132
|
+
# Get webhook
|
133
|
+
#
|
134
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
135
|
+
def get_webhook_with_http_info(extra: {})
|
136
|
+
get_webhook_with_http_info_impl(extra)
|
137
|
+
end
|
138
|
+
|
139
|
+
# Get webhook
|
140
|
+
# @param [Hash] opts the optional parameters
|
141
|
+
# @return [Object]
|
142
|
+
private def get_webhook_impl(opts = {})
|
143
|
+
data, _status_code, _headers = get_webhook_with_http_info(opts)
|
144
|
+
data
|
145
|
+
end
|
146
|
+
|
147
|
+
# Get webhook
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
150
|
+
private def get_webhook_with_http_info_impl(opts = {})
|
151
|
+
if @api_client.config.debugging
|
152
|
+
@api_client.config.logger.debug 'Calling API: EventLogsApi.get_webhook ...'
|
153
|
+
end
|
154
|
+
# resource path
|
155
|
+
local_var_path = '/api/v1/event_logs/get/webhook'
|
156
|
+
|
157
|
+
# query parameters
|
158
|
+
query_params = opts[:query_params] || {}
|
159
|
+
|
160
|
+
# header parameters
|
161
|
+
header_params = opts[:header_params] || {}
|
162
|
+
# HTTP header 'Accept' (if needed)
|
163
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
164
|
+
|
165
|
+
# form parameters
|
166
|
+
form_params = opts[:form_params] || {}
|
167
|
+
|
168
|
+
# http body (model)
|
169
|
+
post_body = opts[:debug_body]
|
170
|
+
|
171
|
+
# return_type
|
172
|
+
return_type = opts[:debug_return_type] || 'Object'
|
173
|
+
|
174
|
+
# auth_names
|
175
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
176
|
+
|
177
|
+
new_options = opts.merge(
|
178
|
+
:operation => :"EventLogsApi.get_webhook",
|
179
|
+
:header_params => header_params,
|
180
|
+
:query_params => query_params,
|
181
|
+
:form_params => form_params,
|
182
|
+
:body => post_body,
|
183
|
+
:auth_names => auth_names,
|
184
|
+
:return_type => return_type
|
185
|
+
)
|
186
|
+
|
187
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug "API called: EventLogsApi#get_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
190
|
+
end
|
191
|
+
APIResponse::new(data, status_code, headers, response)
|
192
|
+
end
|
193
|
+
|
194
|
+
|
195
|
+
# Get webhook secret
|
196
|
+
#
|
197
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
198
|
+
def get_webhook_secret(extra: {})
|
199
|
+
api_response = get_webhook_secret_with_http_info_impl(extra)
|
200
|
+
api_response.data
|
201
|
+
end
|
202
|
+
|
203
|
+
# Get webhook secret
|
204
|
+
#
|
205
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
206
|
+
def get_webhook_secret_with_http_info(extra: {})
|
207
|
+
get_webhook_secret_with_http_info_impl(extra)
|
208
|
+
end
|
209
|
+
|
210
|
+
# Get webhook secret
|
211
|
+
# @param [Hash] opts the optional parameters
|
212
|
+
# @return [Object]
|
213
|
+
private def get_webhook_secret_impl(opts = {})
|
214
|
+
data, _status_code, _headers = get_webhook_secret_with_http_info(opts)
|
215
|
+
data
|
216
|
+
end
|
217
|
+
|
218
|
+
# Get webhook secret
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
221
|
+
private def get_webhook_secret_with_http_info_impl(opts = {})
|
222
|
+
if @api_client.config.debugging
|
223
|
+
@api_client.config.logger.debug 'Calling API: EventLogsApi.get_webhook_secret ...'
|
224
|
+
end
|
225
|
+
# resource path
|
226
|
+
local_var_path = '/api/v1/event_logs/webhook/secret/get'
|
227
|
+
|
228
|
+
# query parameters
|
229
|
+
query_params = opts[:query_params] || {}
|
230
|
+
|
231
|
+
# header parameters
|
232
|
+
header_params = opts[:header_params] || {}
|
233
|
+
# HTTP header 'Accept' (if needed)
|
234
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
235
|
+
|
236
|
+
# form parameters
|
237
|
+
form_params = opts[:form_params] || {}
|
238
|
+
|
239
|
+
# http body (model)
|
240
|
+
post_body = opts[:debug_body]
|
241
|
+
|
242
|
+
# return_type
|
243
|
+
return_type = opts[:debug_return_type] || 'Object'
|
244
|
+
|
245
|
+
# auth_names
|
246
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
247
|
+
|
248
|
+
new_options = opts.merge(
|
249
|
+
:operation => :"EventLogsApi.get_webhook_secret",
|
250
|
+
:header_params => header_params,
|
251
|
+
:query_params => query_params,
|
252
|
+
:form_params => form_params,
|
253
|
+
:body => post_body,
|
254
|
+
:auth_names => auth_names,
|
255
|
+
:return_type => return_type
|
256
|
+
)
|
257
|
+
|
258
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
259
|
+
if @api_client.config.debugging
|
260
|
+
@api_client.config.logger.debug "API called: EventLogsApi#get_webhook_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
261
|
+
end
|
262
|
+
APIResponse::new(data, status_code, headers, response)
|
263
|
+
end
|
264
|
+
|
265
|
+
|
266
|
+
# Refresh webhook
|
267
|
+
#
|
268
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
269
|
+
def refresh_webhook_secret(extra: {})
|
270
|
+
api_response = refresh_webhook_secret_with_http_info_impl(extra)
|
271
|
+
api_response.data
|
272
|
+
end
|
273
|
+
|
274
|
+
# Refresh webhook
|
275
|
+
#
|
276
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
277
|
+
def refresh_webhook_secret_with_http_info(extra: {})
|
278
|
+
refresh_webhook_secret_with_http_info_impl(extra)
|
279
|
+
end
|
280
|
+
|
281
|
+
# Refresh webhook
|
282
|
+
# @param [Hash] opts the optional parameters
|
283
|
+
# @return [Object]
|
284
|
+
private def refresh_webhook_secret_impl(opts = {})
|
285
|
+
data, _status_code, _headers = refresh_webhook_secret_with_http_info(opts)
|
286
|
+
data
|
287
|
+
end
|
288
|
+
|
289
|
+
# Refresh webhook
|
290
|
+
# @param [Hash] opts the optional parameters
|
291
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
292
|
+
private def refresh_webhook_secret_with_http_info_impl(opts = {})
|
293
|
+
if @api_client.config.debugging
|
294
|
+
@api_client.config.logger.debug 'Calling API: EventLogsApi.refresh_webhook_secret ...'
|
295
|
+
end
|
296
|
+
# resource path
|
297
|
+
local_var_path = '/api/v1/event_logs/webhook/secret/refresh'
|
298
|
+
|
299
|
+
# query parameters
|
300
|
+
query_params = opts[:query_params] || {}
|
301
|
+
|
302
|
+
# header parameters
|
303
|
+
header_params = opts[:header_params] || {}
|
304
|
+
# HTTP header 'Accept' (if needed)
|
305
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
306
|
+
|
307
|
+
# form parameters
|
308
|
+
form_params = opts[:form_params] || {}
|
309
|
+
|
310
|
+
# http body (model)
|
311
|
+
post_body = opts[:debug_body]
|
312
|
+
|
313
|
+
# return_type
|
314
|
+
return_type = opts[:debug_return_type] || 'Object'
|
315
|
+
|
316
|
+
# auth_names
|
317
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
318
|
+
|
319
|
+
new_options = opts.merge(
|
320
|
+
:operation => :"EventLogsApi.refresh_webhook_secret",
|
321
|
+
:header_params => header_params,
|
322
|
+
:query_params => query_params,
|
323
|
+
:form_params => form_params,
|
324
|
+
:body => post_body,
|
325
|
+
:auth_names => auth_names,
|
326
|
+
:return_type => return_type
|
327
|
+
)
|
328
|
+
|
329
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
330
|
+
if @api_client.config.debugging
|
331
|
+
@api_client.config.logger.debug "API called: EventLogsApi#refresh_webhook_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
332
|
+
end
|
333
|
+
APIResponse::new(data, status_code, headers, response)
|
334
|
+
end
|
335
|
+
|
336
|
+
|
337
|
+
# Update webhook
|
338
|
+
#
|
339
|
+
# @param event_webhook_url [String] Event Webhook URL
|
340
|
+
# @param body [WebhookReqDTO]
|
341
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
342
|
+
def update_webhook(event_webhook_url:, extra: {})
|
343
|
+
_body = {}
|
344
|
+
_body[:eventWebhookURL] = event_webhook_url if event_webhook_url != SENTINEL
|
345
|
+
extra[:webhook_req_dto] = _body if !_body.empty?
|
346
|
+
api_response = update_webhook_with_http_info_impl(extra)
|
347
|
+
api_response.data
|
348
|
+
end
|
349
|
+
|
350
|
+
# Update webhook
|
351
|
+
#
|
352
|
+
# @param event_webhook_url [String] Event Webhook URL
|
353
|
+
# @param body [WebhookReqDTO]
|
354
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
355
|
+
def update_webhook_with_http_info(event_webhook_url:, extra: {})
|
356
|
+
_body = {}
|
357
|
+
_body[:eventWebhookURL] = event_webhook_url if event_webhook_url != SENTINEL
|
358
|
+
extra[:webhook_req_dto] = _body if !_body.empty?
|
359
|
+
update_webhook_with_http_info_impl(extra)
|
360
|
+
end
|
361
|
+
|
362
|
+
# Update webhook
|
363
|
+
# @param [Hash] opts the optional parameters
|
364
|
+
# @option opts [WebhookReqDTO] :webhook_req_dto WebhookReqDTO
|
365
|
+
# @return [Object]
|
366
|
+
private def update_webhook_impl(opts = {})
|
367
|
+
data, _status_code, _headers = update_webhook_with_http_info(opts)
|
368
|
+
data
|
369
|
+
end
|
370
|
+
|
371
|
+
# Update webhook
|
372
|
+
# @param [Hash] opts the optional parameters
|
373
|
+
# @option opts [WebhookReqDTO] :webhook_req_dto WebhookReqDTO
|
374
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
375
|
+
private def update_webhook_with_http_info_impl(opts = {})
|
376
|
+
if @api_client.config.debugging
|
377
|
+
@api_client.config.logger.debug 'Calling API: EventLogsApi.update_webhook ...'
|
378
|
+
end
|
379
|
+
# resource path
|
380
|
+
local_var_path = '/api/v1/event_logs/set/webhook'
|
381
|
+
|
382
|
+
# query parameters
|
383
|
+
query_params = opts[:query_params] || {}
|
384
|
+
|
385
|
+
# header parameters
|
386
|
+
header_params = opts[:header_params] || {}
|
387
|
+
# HTTP header 'Accept' (if needed)
|
388
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
389
|
+
# HTTP header 'Content-Type'
|
390
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
391
|
+
if !content_type.nil?
|
392
|
+
header_params['Content-Type'] = content_type
|
393
|
+
end
|
394
|
+
|
395
|
+
# form parameters
|
396
|
+
form_params = opts[:form_params] || {}
|
397
|
+
|
398
|
+
# http body (model)
|
399
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'webhook_req_dto'])
|
400
|
+
|
401
|
+
# return_type
|
402
|
+
return_type = opts[:debug_return_type] || 'Object'
|
403
|
+
|
404
|
+
# auth_names
|
405
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
406
|
+
|
407
|
+
new_options = opts.merge(
|
408
|
+
:operation => :"EventLogsApi.update_webhook",
|
409
|
+
:header_params => header_params,
|
410
|
+
:query_params => query_params,
|
411
|
+
:form_params => form_params,
|
412
|
+
:body => post_body,
|
413
|
+
:auth_names => auth_names,
|
414
|
+
:return_type => return_type
|
415
|
+
)
|
416
|
+
|
417
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
418
|
+
if @api_client.config.debugging
|
419
|
+
@api_client.config.logger.debug "API called: EventLogsApi#update_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
420
|
+
end
|
421
|
+
APIResponse::new(data, status_code, headers, response)
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
# top-level client access to avoid having the user to insantiate their own API instances
|
426
|
+
EventLogs = EventLogsApi::new
|
427
|
+
end
|
@@ -16,6 +16,124 @@ module Composio
|
|
16
16
|
@api_client = api_client
|
17
17
|
end
|
18
18
|
|
19
|
+
# Post logs
|
20
|
+
#
|
21
|
+
# Add new logs
|
22
|
+
#
|
23
|
+
# @param provider_name [String] Provider name of the log
|
24
|
+
# @param action_name [String] Action name of the log
|
25
|
+
# @param request [Object]
|
26
|
+
# @param response [Object]
|
27
|
+
# @param is_error [Boolean]
|
28
|
+
# @param connection_id [String] Connection ID of the log
|
29
|
+
# @param entity_id [String] Entity ID of the log
|
30
|
+
# @param body [IngestDataDTO]
|
31
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
32
|
+
def add_new_logs(provider_name:, action_name:, request:, response:, is_error:, connection_id: SENTINEL, entity_id: SENTINEL, extra: {})
|
33
|
+
_body = {}
|
34
|
+
_body[:connectionId] = connection_id if connection_id != SENTINEL
|
35
|
+
_body[:entityId] = entity_id if entity_id != SENTINEL
|
36
|
+
_body[:providerName] = provider_name if provider_name != SENTINEL
|
37
|
+
_body[:actionName] = action_name if action_name != SENTINEL
|
38
|
+
_body[:request] = request if request != SENTINEL
|
39
|
+
_body[:response] = response if response != SENTINEL
|
40
|
+
_body[:isError] = is_error if is_error != SENTINEL
|
41
|
+
extra[:ingest_data_dto] = _body if !_body.empty?
|
42
|
+
api_response = add_new_logs_with_http_info_impl(extra)
|
43
|
+
api_response.data
|
44
|
+
end
|
45
|
+
|
46
|
+
# Post logs
|
47
|
+
#
|
48
|
+
# Add new logs
|
49
|
+
#
|
50
|
+
# @param provider_name [String] Provider name of the log
|
51
|
+
# @param action_name [String] Action name of the log
|
52
|
+
# @param request [Object]
|
53
|
+
# @param response [Object]
|
54
|
+
# @param is_error [Boolean]
|
55
|
+
# @param connection_id [String] Connection ID of the log
|
56
|
+
# @param entity_id [String] Entity ID of the log
|
57
|
+
# @param body [IngestDataDTO]
|
58
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
59
|
+
def add_new_logs_with_http_info(provider_name:, action_name:, request:, response:, is_error:, connection_id: SENTINEL, entity_id: SENTINEL, extra: {})
|
60
|
+
_body = {}
|
61
|
+
_body[:connectionId] = connection_id if connection_id != SENTINEL
|
62
|
+
_body[:entityId] = entity_id if entity_id != SENTINEL
|
63
|
+
_body[:providerName] = provider_name if provider_name != SENTINEL
|
64
|
+
_body[:actionName] = action_name if action_name != SENTINEL
|
65
|
+
_body[:request] = request if request != SENTINEL
|
66
|
+
_body[:response] = response if response != SENTINEL
|
67
|
+
_body[:isError] = is_error if is_error != SENTINEL
|
68
|
+
extra[:ingest_data_dto] = _body if !_body.empty?
|
69
|
+
add_new_logs_with_http_info_impl(extra)
|
70
|
+
end
|
71
|
+
|
72
|
+
# Post logs
|
73
|
+
# Add new logs
|
74
|
+
# @param [Hash] opts the optional parameters
|
75
|
+
# @option opts [IngestDataDTO] :ingest_data_dto IngestDataDTO
|
76
|
+
# @return [IngestDataResponseDTO]
|
77
|
+
private def add_new_logs_impl(opts = {})
|
78
|
+
data, _status_code, _headers = add_new_logs_with_http_info(opts)
|
79
|
+
data
|
80
|
+
end
|
81
|
+
|
82
|
+
# Post logs
|
83
|
+
# Add new logs
|
84
|
+
# @param [Hash] opts the optional parameters
|
85
|
+
# @option opts [IngestDataDTO] :ingest_data_dto IngestDataDTO
|
86
|
+
# @return [APIResponse] data is IngestDataResponseDTO, status code, headers and response
|
87
|
+
private def add_new_logs_with_http_info_impl(opts = {})
|
88
|
+
if @api_client.config.debugging
|
89
|
+
@api_client.config.logger.debug 'Calling API: LogsApi.add_new_logs ...'
|
90
|
+
end
|
91
|
+
# resource path
|
92
|
+
local_var_path = '/api/v1/logs'
|
93
|
+
|
94
|
+
# query parameters
|
95
|
+
query_params = opts[:query_params] || {}
|
96
|
+
|
97
|
+
# header parameters
|
98
|
+
header_params = opts[:header_params] || {}
|
99
|
+
# HTTP header 'Accept' (if needed)
|
100
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
101
|
+
# HTTP header 'Content-Type'
|
102
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
103
|
+
if !content_type.nil?
|
104
|
+
header_params['Content-Type'] = content_type
|
105
|
+
end
|
106
|
+
|
107
|
+
# form parameters
|
108
|
+
form_params = opts[:form_params] || {}
|
109
|
+
|
110
|
+
# http body (model)
|
111
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'ingest_data_dto'])
|
112
|
+
|
113
|
+
# return_type
|
114
|
+
return_type = opts[:debug_return_type] || 'IngestDataResponseDTO'
|
115
|
+
|
116
|
+
# auth_names
|
117
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
118
|
+
|
119
|
+
new_options = opts.merge(
|
120
|
+
:operation => :"LogsApi.add_new_logs",
|
121
|
+
:header_params => header_params,
|
122
|
+
:query_params => query_params,
|
123
|
+
:form_params => form_params,
|
124
|
+
:body => post_body,
|
125
|
+
:auth_names => auth_names,
|
126
|
+
:return_type => return_type
|
127
|
+
)
|
128
|
+
|
129
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
130
|
+
if @api_client.config.debugging
|
131
|
+
@api_client.config.logger.debug "API called: LogsApi#add_new_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
132
|
+
end
|
133
|
+
APIResponse::new(data, status_code, headers, response)
|
134
|
+
end
|
135
|
+
|
136
|
+
|
19
137
|
# Get logs
|
20
138
|
#
|
21
139
|
# List logs
|
@@ -28,9 +146,9 @@ module Composio
|
|
28
146
|
# @param entity_id [String]
|
29
147
|
# @param limit [Float]
|
30
148
|
# @param cursor [String]
|
31
|
-
# @param
|
149
|
+
# @param logs_type [String]
|
32
150
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
33
|
-
def list(type: SENTINEL, time: SENTINEL, status: SENTINEL, search: SENTINEL, integration_id: SENTINEL, entity_id: SENTINEL, limit: 10, cursor: SENTINEL,
|
151
|
+
def list(type: SENTINEL, time: SENTINEL, status: SENTINEL, search: SENTINEL, integration_id: SENTINEL, entity_id: SENTINEL, limit: 10, cursor: SENTINEL, logs_type: SENTINEL, extra: {})
|
34
152
|
extra[:type] = type if type != SENTINEL
|
35
153
|
extra[:time] = time if time != SENTINEL
|
36
154
|
extra[:status] = status if status != SENTINEL
|
@@ -39,7 +157,7 @@ module Composio
|
|
39
157
|
extra[:entity_id] = entity_id if entity_id != SENTINEL
|
40
158
|
extra[:limit] = limit if limit != SENTINEL
|
41
159
|
extra[:cursor] = cursor if cursor != SENTINEL
|
42
|
-
extra[:
|
160
|
+
extra[:logs_type] = logs_type if logs_type != SENTINEL
|
43
161
|
api_response = list_with_http_info_impl(extra)
|
44
162
|
api_response.data
|
45
163
|
end
|
@@ -56,9 +174,9 @@ module Composio
|
|
56
174
|
# @param entity_id [String]
|
57
175
|
# @param limit [Float]
|
58
176
|
# @param cursor [String]
|
59
|
-
# @param
|
177
|
+
# @param logs_type [String]
|
60
178
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
61
|
-
def list_with_http_info(type: SENTINEL, time: SENTINEL, status: SENTINEL, search: SENTINEL, integration_id: SENTINEL, entity_id: SENTINEL, limit: 10, cursor: SENTINEL,
|
179
|
+
def list_with_http_info(type: SENTINEL, time: SENTINEL, status: SENTINEL, search: SENTINEL, integration_id: SENTINEL, entity_id: SENTINEL, limit: 10, cursor: SENTINEL, logs_type: SENTINEL, extra: {})
|
62
180
|
extra[:type] = type if type != SENTINEL
|
63
181
|
extra[:time] = time if time != SENTINEL
|
64
182
|
extra[:status] = status if status != SENTINEL
|
@@ -67,7 +185,7 @@ module Composio
|
|
67
185
|
extra[:entity_id] = entity_id if entity_id != SENTINEL
|
68
186
|
extra[:limit] = limit if limit != SENTINEL
|
69
187
|
extra[:cursor] = cursor if cursor != SENTINEL
|
70
|
-
extra[:
|
188
|
+
extra[:logs_type] = logs_type if logs_type != SENTINEL
|
71
189
|
list_with_http_info_impl(extra)
|
72
190
|
end
|
73
191
|
|
@@ -82,7 +200,7 @@ module Composio
|
|
82
200
|
# @option opts [String] :entity_id
|
83
201
|
# @option opts [Float] :limit (default to 10)
|
84
202
|
# @option opts [String] :cursor
|
85
|
-
# @option opts [String] :
|
203
|
+
# @option opts [String] :logs_type
|
86
204
|
# @return [LogsResDTO]
|
87
205
|
private def list_impl(opts = {})
|
88
206
|
data, _status_code, _headers = list_with_http_info(opts)
|
@@ -100,7 +218,7 @@ module Composio
|
|
100
218
|
# @option opts [String] :entity_id
|
101
219
|
# @option opts [Float] :limit (default to 10)
|
102
220
|
# @option opts [String] :cursor
|
103
|
-
# @option opts [String] :
|
221
|
+
# @option opts [String] :logs_type
|
104
222
|
# @return [APIResponse] data is LogsResDTO, status code, headers and response
|
105
223
|
private def list_with_http_info_impl(opts = {})
|
106
224
|
if @api_client.config.debugging
|
@@ -131,7 +249,7 @@ module Composio
|
|
131
249
|
query_params[:'entityId'] = opts[:'entity_id'] if !opts[:'entity_id'].nil?
|
132
250
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
133
251
|
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
134
|
-
query_params[:'
|
252
|
+
query_params[:'logsType'] = opts[:'logs_type'] if !opts[:'logs_type'].nil?
|
135
253
|
|
136
254
|
# header parameters
|
137
255
|
header_params = opts[:header_params] || {}
|