hooksniff 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/openapi_client/api/admin_api.rb +452 -0
- data/lib/openapi_client/api/alerts_api.rb +322 -0
- data/lib/openapi_client/api/analytics_api.rb +208 -0
- data/lib/openapi_client/api/api_keys_api.rb +252 -0
- data/lib/openapi_client/api/audit_log_api.rb +140 -0
- data/lib/openapi_client/api/auth_api.rb +1080 -0
- data/lib/openapi_client/api/billing_api.rb +500 -0
- data/lib/openapi_client/api/contact_api.rb +88 -0
- data/lib/openapi_client/api/custom_domains_api.rb +253 -0
- data/lib/openapi_client/api/customer_portal_api.rb +700 -0
- data/lib/openapi_client/api/delivery_details_api.rb +146 -0
- data/lib/openapi_client/api/devices_api.rb +202 -0
- data/lib/openapi_client/api/embed_api.rb +128 -0
- data/lib/openapi_client/api/endpoints_api.rb +468 -0
- data/lib/openapi_client/api/events_api.rb +75 -0
- data/lib/openapi_client/api/health_api.rb +193 -0
- data/lib/openapi_client/api/inbound_api.rb +170 -0
- data/lib/openapi_client/api/notifications_api.rb +309 -0
- data/lib/openapi_client/api/o_auth_api.rb +181 -0
- data/lib/openapi_client/api/outbound_ips_api.rb +77 -0
- data/lib/openapi_client/api/playground_api.rb +143 -0
- data/lib/openapi_client/api/rate_limits_api.rb +252 -0
- data/lib/openapi_client/api/routing_api.rb +393 -0
- data/lib/openapi_client/api/schemas_api.rb +268 -0
- data/lib/openapi_client/api/search_api.rb +96 -0
- data/lib/openapi_client/api/simulator_api.rb +82 -0
- data/lib/openapi_client/api/sso_api.rb +241 -0
- data/lib/openapi_client/api/stats_api.rb +77 -0
- data/lib/openapi_client/api/stream_api.rb +88 -0
- data/lib/openapi_client/api/teams_api.rb +476 -0
- data/lib/openapi_client/api/templates_api.rb +213 -0
- data/lib/openapi_client/api/transforms_api.rb +368 -0
- data/lib/openapi_client/api/webhooks_api.rb +534 -0
- data/lib/openapi_client/api_client.rb +397 -0
- data/lib/openapi_client/api_error.rb +58 -0
- data/lib/openapi_client/api_model_base.rb +88 -0
- data/lib/openapi_client/configuration.rb +312 -0
- data/lib/openapi_client/models/admin_revenue_get200_response_inner.rb +165 -0
- data/lib/openapi_client/models/admin_sdk_update_post_request.rb +156 -0
- data/lib/openapi_client/models/admin_users_id_plan_put_request.rb +181 -0
- data/lib/openapi_client/models/admin_users_id_status_put_request.rb +147 -0
- data/lib/openapi_client/models/alert_rule.rb +237 -0
- data/lib/openapi_client/models/api_key_info.rb +185 -0
- data/lib/openapi_client/models/apply_template_request.rb +173 -0
- data/lib/openapi_client/models/apply_template_response.rb +156 -0
- data/lib/openapi_client/models/auth2fa_enable_post200_response.rb +156 -0
- data/lib/openapi_client/models/auth_login_post200_response.rb +104 -0
- data/lib/openapi_client/models/auth_response.rb +167 -0
- data/lib/openapi_client/models/batch_replay_request.rb +166 -0
- data/lib/openapi_client/models/batch_response.rb +160 -0
- data/lib/openapi_client/models/batch_response_errors_inner.rb +156 -0
- data/lib/openapi_client/models/batch_webhook_request.rb +166 -0
- data/lib/openapi_client/models/billing_portal_post200_response.rb +147 -0
- data/lib/openapi_client/models/change_password_request.rb +199 -0
- data/lib/openapi_client/models/change_role_request.rb +188 -0
- data/lib/openapi_client/models/confirm2fa_request.rb +182 -0
- data/lib/openapi_client/models/contact_request.rb +242 -0
- data/lib/openapi_client/models/contact_response.rb +156 -0
- data/lib/openapi_client/models/create_alert_request.rb +277 -0
- data/lib/openapi_client/models/create_api_key_response.rb +175 -0
- data/lib/openapi_client/models/create_endpoint_request.rb +288 -0
- data/lib/openapi_client/models/create_team_request.rb +164 -0
- data/lib/openapi_client/models/create_transform_rule_request.rb +216 -0
- data/lib/openapi_client/models/create_webhook_request.rb +201 -0
- data/lib/openapi_client/models/custom_domains_post_request.rb +147 -0
- data/lib/openapi_client/models/customer_response.rb +256 -0
- data/lib/openapi_client/models/delivery.rb +246 -0
- data/lib/openapi_client/models/delivery_attempt.rb +205 -0
- data/lib/openapi_client/models/delivery_list_response.rb +176 -0
- data/lib/openapi_client/models/delivery_trend_response.rb +158 -0
- data/lib/openapi_client/models/delivery_trend_response_buckets_inner.rb +174 -0
- data/lib/openapi_client/models/device_token_response.rb +174 -0
- data/lib/openapi_client/models/disable2fa_request.rb +164 -0
- data/lib/openapi_client/models/enable2fa_request.rb +164 -0
- data/lib/openapi_client/models/endpoint.rb +321 -0
- data/lib/openapi_client/models/endpoint_health.rb +183 -0
- data/lib/openapi_client/models/endpoints_endpoint_id_transforms_test_post_request.rb +156 -0
- data/lib/openapi_client/models/endpoints_id_rotate_secret_post200_response.rb +156 -0
- data/lib/openapi_client/models/error.rb +165 -0
- data/lib/openapi_client/models/forgot_password_request.rb +164 -0
- data/lib/openapi_client/models/invite_request.rb +207 -0
- data/lib/openapi_client/models/invoice_response.rb +183 -0
- data/lib/openapi_client/models/latency_trend_response.rb +167 -0
- data/lib/openapi_client/models/latency_trend_response_buckets_inner.rb +165 -0
- data/lib/openapi_client/models/login_request.rb +190 -0
- data/lib/openapi_client/models/notification.rb +193 -0
- data/lib/openapi_client/models/notification_list_response.rb +167 -0
- data/lib/openapi_client/models/notification_preferences.rb +201 -0
- data/lib/openapi_client/models/notifications_unread_count_get200_response.rb +147 -0
- data/lib/openapi_client/models/outbound_ips_response.rb +158 -0
- data/lib/openapi_client/models/paginated_users.rb +176 -0
- data/lib/openapi_client/models/playground_get200_response.rb +160 -0
- data/lib/openapi_client/models/portal_notifications_put200_response.rb +156 -0
- data/lib/openapi_client/models/portal_profile.rb +184 -0
- data/lib/openapi_client/models/refresh_token_request.rb +164 -0
- data/lib/openapi_client/models/register_device_request.rb +208 -0
- data/lib/openapi_client/models/register_request.rb +201 -0
- data/lib/openapi_client/models/register_schema_request.rb +191 -0
- data/lib/openapi_client/models/resend_verification_request.rb +164 -0
- data/lib/openapi_client/models/reset_password_request.rb +199 -0
- data/lib/openapi_client/models/retry_policy.rb +216 -0
- data/lib/openapi_client/models/routing_info.rb +193 -0
- data/lib/openapi_client/models/search_result.rb +158 -0
- data/lib/openapi_client/models/simulator_post_request.rb +165 -0
- data/lib/openapi_client/models/sso_config_post_request.rb +190 -0
- data/lib/openapi_client/models/stats_response.rb +210 -0
- data/lib/openapi_client/models/stream_params.rb +201 -0
- data/lib/openapi_client/models/subscription_response.rb +201 -0
- data/lib/openapi_client/models/success_rate_response.rb +183 -0
- data/lib/openapi_client/models/system_stats.rb +185 -0
- data/lib/openapi_client/models/system_stats_plan_breakdown_inner.rb +156 -0
- data/lib/openapi_client/models/system_status.rb +210 -0
- data/lib/openapi_client/models/system_status_components_inner.rb +184 -0
- data/lib/openapi_client/models/team.rb +165 -0
- data/lib/openapi_client/models/team_detail_response.rb +169 -0
- data/lib/openapi_client/models/team_invite.rb +174 -0
- data/lib/openapi_client/models/team_member.rb +193 -0
- data/lib/openapi_client/models/test_webhook_request.rb +199 -0
- data/lib/openapi_client/models/test_webhook_response.rb +174 -0
- data/lib/openapi_client/models/transform_rule.rb +201 -0
- data/lib/openapi_client/models/two_factor_required_response.rb +165 -0
- data/lib/openapi_client/models/update_endpoint_request.rb +278 -0
- data/lib/openapi_client/models/update_notification_preferences.rb +195 -0
- data/lib/openapi_client/models/update_profile_request.rb +190 -0
- data/lib/openapi_client/models/update_routing_request.rb +190 -0
- data/lib/openapi_client/models/upgrade_request.rb +209 -0
- data/lib/openapi_client/models/upgrade_response.rb +166 -0
- data/lib/openapi_client/models/usage_response.rb +201 -0
- data/lib/openapi_client/models/user_summary.rb +193 -0
- data/lib/openapi_client/models/validate_event_request.rb +164 -0
- data/lib/openapi_client/models/verify2fa_request.rb +208 -0
- data/lib/openapi_client/models/verify_email_request.rb +164 -0
- data/lib/openapi_client/models/webhook_template.rb +183 -0
- data/lib/openapi_client/version.rb +15 -0
- data/lib/openapi_client.rb +169 -0
- metadata +139 -10
- data/lib/hooksniff/client.rb +0 -213
- data/lib/hooksniff/errors.rb +0 -43
- data/lib/hooksniff/models.rb +0 -136
- data/lib/hooksniff/verification.rb +0 -134
- data/lib/hooksniff/version.rb +0 -5
- data/lib/hooksniff.rb +0 -19
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#HookSniff API
|
|
3
|
+
|
|
4
|
+
#Webhook delivery, monitoring, and management API. All endpoints under `/v1` require authentication via `Authorization: Bearer <api_key>` header unless marked as **Public**.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@hooksniff.vercel.app
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module OpenapiClient
|
|
16
|
+
class AlertsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List alert rules
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [Array<AlertRule>]
|
|
25
|
+
def alerts_get(opts = {})
|
|
26
|
+
data, _status_code, _headers = alerts_get_with_http_info(opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# List alert rules
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [Array<(Array<AlertRule>, Integer, Hash)>] Array<AlertRule> data, response status code and response headers
|
|
33
|
+
def alerts_get_with_http_info(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: AlertsApi.alerts_get ...'
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/alerts'
|
|
39
|
+
|
|
40
|
+
# query parameters
|
|
41
|
+
query_params = opts[:query_params] || {}
|
|
42
|
+
|
|
43
|
+
# header parameters
|
|
44
|
+
header_params = opts[:header_params] || {}
|
|
45
|
+
# HTTP header 'Accept' (if needed)
|
|
46
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
47
|
+
|
|
48
|
+
# form parameters
|
|
49
|
+
form_params = opts[:form_params] || {}
|
|
50
|
+
|
|
51
|
+
# http body (model)
|
|
52
|
+
post_body = opts[:debug_body]
|
|
53
|
+
|
|
54
|
+
# return_type
|
|
55
|
+
return_type = opts[:debug_return_type] || 'Array<AlertRule>'
|
|
56
|
+
|
|
57
|
+
# auth_names
|
|
58
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
59
|
+
|
|
60
|
+
new_options = opts.merge(
|
|
61
|
+
:operation => :"AlertsApi.alerts_get",
|
|
62
|
+
:header_params => header_params,
|
|
63
|
+
:query_params => query_params,
|
|
64
|
+
:form_params => form_params,
|
|
65
|
+
:body => post_body,
|
|
66
|
+
:auth_names => auth_names,
|
|
67
|
+
:return_type => return_type
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: AlertsApi#alerts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Delete alert rule
|
|
78
|
+
# @param id [String]
|
|
79
|
+
# @param [Hash] opts the optional parameters
|
|
80
|
+
# @return [nil]
|
|
81
|
+
def alerts_id_delete(id, opts = {})
|
|
82
|
+
alerts_id_delete_with_http_info(id, opts)
|
|
83
|
+
nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Delete alert rule
|
|
87
|
+
# @param id [String]
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
90
|
+
def alerts_id_delete_with_http_info(id, opts = {})
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug 'Calling API: AlertsApi.alerts_id_delete ...'
|
|
93
|
+
end
|
|
94
|
+
# verify the required parameter 'id' is set
|
|
95
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
96
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AlertsApi.alerts_id_delete"
|
|
97
|
+
end
|
|
98
|
+
# resource path
|
|
99
|
+
local_var_path = '/alerts/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
100
|
+
|
|
101
|
+
# query parameters
|
|
102
|
+
query_params = opts[:query_params] || {}
|
|
103
|
+
|
|
104
|
+
# header parameters
|
|
105
|
+
header_params = opts[:header_params] || {}
|
|
106
|
+
|
|
107
|
+
# form parameters
|
|
108
|
+
form_params = opts[:form_params] || {}
|
|
109
|
+
|
|
110
|
+
# http body (model)
|
|
111
|
+
post_body = opts[:debug_body]
|
|
112
|
+
|
|
113
|
+
# return_type
|
|
114
|
+
return_type = opts[:debug_return_type]
|
|
115
|
+
|
|
116
|
+
# auth_names
|
|
117
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
118
|
+
|
|
119
|
+
new_options = opts.merge(
|
|
120
|
+
:operation => :"AlertsApi.alerts_id_delete",
|
|
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 = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
130
|
+
if @api_client.config.debugging
|
|
131
|
+
@api_client.config.logger.debug "API called: AlertsApi#alerts_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
132
|
+
end
|
|
133
|
+
return data, status_code, headers
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Get alert rule
|
|
137
|
+
# @param id [String]
|
|
138
|
+
# @param [Hash] opts the optional parameters
|
|
139
|
+
# @return [AlertRule]
|
|
140
|
+
def alerts_id_get(id, opts = {})
|
|
141
|
+
data, _status_code, _headers = alerts_id_get_with_http_info(id, opts)
|
|
142
|
+
data
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Get alert rule
|
|
146
|
+
# @param id [String]
|
|
147
|
+
# @param [Hash] opts the optional parameters
|
|
148
|
+
# @return [Array<(AlertRule, Integer, Hash)>] AlertRule data, response status code and response headers
|
|
149
|
+
def alerts_id_get_with_http_info(id, opts = {})
|
|
150
|
+
if @api_client.config.debugging
|
|
151
|
+
@api_client.config.logger.debug 'Calling API: AlertsApi.alerts_id_get ...'
|
|
152
|
+
end
|
|
153
|
+
# verify the required parameter 'id' is set
|
|
154
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
155
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AlertsApi.alerts_id_get"
|
|
156
|
+
end
|
|
157
|
+
# resource path
|
|
158
|
+
local_var_path = '/alerts/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
159
|
+
|
|
160
|
+
# query parameters
|
|
161
|
+
query_params = opts[:query_params] || {}
|
|
162
|
+
|
|
163
|
+
# header parameters
|
|
164
|
+
header_params = opts[:header_params] || {}
|
|
165
|
+
# HTTP header 'Accept' (if needed)
|
|
166
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
167
|
+
|
|
168
|
+
# form parameters
|
|
169
|
+
form_params = opts[:form_params] || {}
|
|
170
|
+
|
|
171
|
+
# http body (model)
|
|
172
|
+
post_body = opts[:debug_body]
|
|
173
|
+
|
|
174
|
+
# return_type
|
|
175
|
+
return_type = opts[:debug_return_type] || 'AlertRule'
|
|
176
|
+
|
|
177
|
+
# auth_names
|
|
178
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
179
|
+
|
|
180
|
+
new_options = opts.merge(
|
|
181
|
+
:operation => :"AlertsApi.alerts_id_get",
|
|
182
|
+
:header_params => header_params,
|
|
183
|
+
:query_params => query_params,
|
|
184
|
+
:form_params => form_params,
|
|
185
|
+
:body => post_body,
|
|
186
|
+
:auth_names => auth_names,
|
|
187
|
+
:return_type => return_type
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
191
|
+
if @api_client.config.debugging
|
|
192
|
+
@api_client.config.logger.debug "API called: AlertsApi#alerts_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
193
|
+
end
|
|
194
|
+
return data, status_code, headers
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Test an alert rule
|
|
198
|
+
# @param id [String]
|
|
199
|
+
# @param [Hash] opts the optional parameters
|
|
200
|
+
# @return [nil]
|
|
201
|
+
def alerts_id_test_post(id, opts = {})
|
|
202
|
+
alerts_id_test_post_with_http_info(id, opts)
|
|
203
|
+
nil
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Test an alert rule
|
|
207
|
+
# @param id [String]
|
|
208
|
+
# @param [Hash] opts the optional parameters
|
|
209
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
210
|
+
def alerts_id_test_post_with_http_info(id, opts = {})
|
|
211
|
+
if @api_client.config.debugging
|
|
212
|
+
@api_client.config.logger.debug 'Calling API: AlertsApi.alerts_id_test_post ...'
|
|
213
|
+
end
|
|
214
|
+
# verify the required parameter 'id' is set
|
|
215
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
216
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AlertsApi.alerts_id_test_post"
|
|
217
|
+
end
|
|
218
|
+
# resource path
|
|
219
|
+
local_var_path = '/alerts/{id}/test'.sub('{id}', CGI.escape(id.to_s))
|
|
220
|
+
|
|
221
|
+
# query parameters
|
|
222
|
+
query_params = opts[:query_params] || {}
|
|
223
|
+
|
|
224
|
+
# header parameters
|
|
225
|
+
header_params = opts[:header_params] || {}
|
|
226
|
+
|
|
227
|
+
# form parameters
|
|
228
|
+
form_params = opts[:form_params] || {}
|
|
229
|
+
|
|
230
|
+
# http body (model)
|
|
231
|
+
post_body = opts[:debug_body]
|
|
232
|
+
|
|
233
|
+
# return_type
|
|
234
|
+
return_type = opts[:debug_return_type]
|
|
235
|
+
|
|
236
|
+
# auth_names
|
|
237
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
238
|
+
|
|
239
|
+
new_options = opts.merge(
|
|
240
|
+
:operation => :"AlertsApi.alerts_id_test_post",
|
|
241
|
+
:header_params => header_params,
|
|
242
|
+
:query_params => query_params,
|
|
243
|
+
:form_params => form_params,
|
|
244
|
+
:body => post_body,
|
|
245
|
+
:auth_names => auth_names,
|
|
246
|
+
:return_type => return_type
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
250
|
+
if @api_client.config.debugging
|
|
251
|
+
@api_client.config.logger.debug "API called: AlertsApi#alerts_id_test_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
252
|
+
end
|
|
253
|
+
return data, status_code, headers
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Create alert rule
|
|
257
|
+
# @param create_alert_request [CreateAlertRequest]
|
|
258
|
+
# @param [Hash] opts the optional parameters
|
|
259
|
+
# @return [AlertRule]
|
|
260
|
+
def alerts_post(create_alert_request, opts = {})
|
|
261
|
+
data, _status_code, _headers = alerts_post_with_http_info(create_alert_request, opts)
|
|
262
|
+
data
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Create alert rule
|
|
266
|
+
# @param create_alert_request [CreateAlertRequest]
|
|
267
|
+
# @param [Hash] opts the optional parameters
|
|
268
|
+
# @return [Array<(AlertRule, Integer, Hash)>] AlertRule data, response status code and response headers
|
|
269
|
+
def alerts_post_with_http_info(create_alert_request, opts = {})
|
|
270
|
+
if @api_client.config.debugging
|
|
271
|
+
@api_client.config.logger.debug 'Calling API: AlertsApi.alerts_post ...'
|
|
272
|
+
end
|
|
273
|
+
# verify the required parameter 'create_alert_request' is set
|
|
274
|
+
if @api_client.config.client_side_validation && create_alert_request.nil?
|
|
275
|
+
fail ArgumentError, "Missing the required parameter 'create_alert_request' when calling AlertsApi.alerts_post"
|
|
276
|
+
end
|
|
277
|
+
# resource path
|
|
278
|
+
local_var_path = '/alerts'
|
|
279
|
+
|
|
280
|
+
# query parameters
|
|
281
|
+
query_params = opts[:query_params] || {}
|
|
282
|
+
|
|
283
|
+
# header parameters
|
|
284
|
+
header_params = opts[:header_params] || {}
|
|
285
|
+
# HTTP header 'Accept' (if needed)
|
|
286
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
287
|
+
# HTTP header 'Content-Type'
|
|
288
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
289
|
+
if !content_type.nil?
|
|
290
|
+
header_params['Content-Type'] = content_type
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# form parameters
|
|
294
|
+
form_params = opts[:form_params] || {}
|
|
295
|
+
|
|
296
|
+
# http body (model)
|
|
297
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_alert_request)
|
|
298
|
+
|
|
299
|
+
# return_type
|
|
300
|
+
return_type = opts[:debug_return_type] || 'AlertRule'
|
|
301
|
+
|
|
302
|
+
# auth_names
|
|
303
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
304
|
+
|
|
305
|
+
new_options = opts.merge(
|
|
306
|
+
:operation => :"AlertsApi.alerts_post",
|
|
307
|
+
:header_params => header_params,
|
|
308
|
+
:query_params => query_params,
|
|
309
|
+
:form_params => form_params,
|
|
310
|
+
:body => post_body,
|
|
311
|
+
:auth_names => auth_names,
|
|
312
|
+
:return_type => return_type
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
316
|
+
if @api_client.config.debugging
|
|
317
|
+
@api_client.config.logger.debug "API called: AlertsApi#alerts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
318
|
+
end
|
|
319
|
+
return data, status_code, headers
|
|
320
|
+
end
|
|
321
|
+
end
|
|
322
|
+
end
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#HookSniff API
|
|
3
|
+
|
|
4
|
+
#Webhook delivery, monitoring, and management API. All endpoints under `/v1` require authentication via `Authorization: Bearer <api_key>` header unless marked as **Public**.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@hooksniff.vercel.app
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module OpenapiClient
|
|
16
|
+
class AnalyticsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Delivery trend over time
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @option opts [String] :range (default to '24h')
|
|
25
|
+
# @return [DeliveryTrendResponse]
|
|
26
|
+
def analytics_deliveries_get(opts = {})
|
|
27
|
+
data, _status_code, _headers = analytics_deliveries_get_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Delivery trend over time
|
|
32
|
+
# @param [Hash] opts the optional parameters
|
|
33
|
+
# @option opts [String] :range (default to '24h')
|
|
34
|
+
# @return [Array<(DeliveryTrendResponse, Integer, Hash)>] DeliveryTrendResponse data, response status code and response headers
|
|
35
|
+
def analytics_deliveries_get_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.analytics_deliveries_get ...'
|
|
38
|
+
end
|
|
39
|
+
allowable_values = ["24h", "7d", "30d"]
|
|
40
|
+
if @api_client.config.client_side_validation && opts[:'range'] && !allowable_values.include?(opts[:'range'])
|
|
41
|
+
fail ArgumentError, "invalid value for \"range\", must be one of #{allowable_values}"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/analytics/deliveries'
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
query_params[:'range'] = opts[:'range'] if !opts[:'range'].nil?
|
|
49
|
+
|
|
50
|
+
# header parameters
|
|
51
|
+
header_params = opts[:header_params] || {}
|
|
52
|
+
# HTTP header 'Accept' (if needed)
|
|
53
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
54
|
+
|
|
55
|
+
# form parameters
|
|
56
|
+
form_params = opts[:form_params] || {}
|
|
57
|
+
|
|
58
|
+
# http body (model)
|
|
59
|
+
post_body = opts[:debug_body]
|
|
60
|
+
|
|
61
|
+
# return_type
|
|
62
|
+
return_type = opts[:debug_return_type] || 'DeliveryTrendResponse'
|
|
63
|
+
|
|
64
|
+
# auth_names
|
|
65
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
66
|
+
|
|
67
|
+
new_options = opts.merge(
|
|
68
|
+
:operation => :"AnalyticsApi.analytics_deliveries_get",
|
|
69
|
+
:header_params => header_params,
|
|
70
|
+
:query_params => query_params,
|
|
71
|
+
:form_params => form_params,
|
|
72
|
+
:body => post_body,
|
|
73
|
+
:auth_names => auth_names,
|
|
74
|
+
:return_type => return_type
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
78
|
+
if @api_client.config.debugging
|
|
79
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#analytics_deliveries_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
80
|
+
end
|
|
81
|
+
return data, status_code, headers
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Latency trend over time
|
|
85
|
+
# @param [Hash] opts the optional parameters
|
|
86
|
+
# @option opts [String] :range (default to '24h')
|
|
87
|
+
# @return [LatencyTrendResponse]
|
|
88
|
+
def analytics_latency_get(opts = {})
|
|
89
|
+
data, _status_code, _headers = analytics_latency_get_with_http_info(opts)
|
|
90
|
+
data
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Latency trend over time
|
|
94
|
+
# @param [Hash] opts the optional parameters
|
|
95
|
+
# @option opts [String] :range (default to '24h')
|
|
96
|
+
# @return [Array<(LatencyTrendResponse, Integer, Hash)>] LatencyTrendResponse data, response status code and response headers
|
|
97
|
+
def analytics_latency_get_with_http_info(opts = {})
|
|
98
|
+
if @api_client.config.debugging
|
|
99
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.analytics_latency_get ...'
|
|
100
|
+
end
|
|
101
|
+
allowable_values = ["24h", "7d", "30d"]
|
|
102
|
+
if @api_client.config.client_side_validation && opts[:'range'] && !allowable_values.include?(opts[:'range'])
|
|
103
|
+
fail ArgumentError, "invalid value for \"range\", must be one of #{allowable_values}"
|
|
104
|
+
end
|
|
105
|
+
# resource path
|
|
106
|
+
local_var_path = '/analytics/latency'
|
|
107
|
+
|
|
108
|
+
# query parameters
|
|
109
|
+
query_params = opts[:query_params] || {}
|
|
110
|
+
query_params[:'range'] = opts[:'range'] if !opts[:'range'].nil?
|
|
111
|
+
|
|
112
|
+
# header parameters
|
|
113
|
+
header_params = opts[:header_params] || {}
|
|
114
|
+
# HTTP header 'Accept' (if needed)
|
|
115
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
116
|
+
|
|
117
|
+
# form parameters
|
|
118
|
+
form_params = opts[:form_params] || {}
|
|
119
|
+
|
|
120
|
+
# http body (model)
|
|
121
|
+
post_body = opts[:debug_body]
|
|
122
|
+
|
|
123
|
+
# return_type
|
|
124
|
+
return_type = opts[:debug_return_type] || 'LatencyTrendResponse'
|
|
125
|
+
|
|
126
|
+
# auth_names
|
|
127
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
128
|
+
|
|
129
|
+
new_options = opts.merge(
|
|
130
|
+
:operation => :"AnalyticsApi.analytics_latency_get",
|
|
131
|
+
:header_params => header_params,
|
|
132
|
+
:query_params => query_params,
|
|
133
|
+
:form_params => form_params,
|
|
134
|
+
:body => post_body,
|
|
135
|
+
:auth_names => auth_names,
|
|
136
|
+
:return_type => return_type
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
140
|
+
if @api_client.config.debugging
|
|
141
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#analytics_latency_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
142
|
+
end
|
|
143
|
+
return data, status_code, headers
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Success rate metrics
|
|
147
|
+
# @param [Hash] opts the optional parameters
|
|
148
|
+
# @option opts [String] :range (default to '24h')
|
|
149
|
+
# @return [SuccessRateResponse]
|
|
150
|
+
def analytics_success_rate_get(opts = {})
|
|
151
|
+
data, _status_code, _headers = analytics_success_rate_get_with_http_info(opts)
|
|
152
|
+
data
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Success rate metrics
|
|
156
|
+
# @param [Hash] opts the optional parameters
|
|
157
|
+
# @option opts [String] :range (default to '24h')
|
|
158
|
+
# @return [Array<(SuccessRateResponse, Integer, Hash)>] SuccessRateResponse data, response status code and response headers
|
|
159
|
+
def analytics_success_rate_get_with_http_info(opts = {})
|
|
160
|
+
if @api_client.config.debugging
|
|
161
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.analytics_success_rate_get ...'
|
|
162
|
+
end
|
|
163
|
+
allowable_values = ["24h", "7d", "30d"]
|
|
164
|
+
if @api_client.config.client_side_validation && opts[:'range'] && !allowable_values.include?(opts[:'range'])
|
|
165
|
+
fail ArgumentError, "invalid value for \"range\", must be one of #{allowable_values}"
|
|
166
|
+
end
|
|
167
|
+
# resource path
|
|
168
|
+
local_var_path = '/analytics/success-rate'
|
|
169
|
+
|
|
170
|
+
# query parameters
|
|
171
|
+
query_params = opts[:query_params] || {}
|
|
172
|
+
query_params[:'range'] = opts[:'range'] if !opts[:'range'].nil?
|
|
173
|
+
|
|
174
|
+
# header parameters
|
|
175
|
+
header_params = opts[:header_params] || {}
|
|
176
|
+
# HTTP header 'Accept' (if needed)
|
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
178
|
+
|
|
179
|
+
# form parameters
|
|
180
|
+
form_params = opts[:form_params] || {}
|
|
181
|
+
|
|
182
|
+
# http body (model)
|
|
183
|
+
post_body = opts[:debug_body]
|
|
184
|
+
|
|
185
|
+
# return_type
|
|
186
|
+
return_type = opts[:debug_return_type] || 'SuccessRateResponse'
|
|
187
|
+
|
|
188
|
+
# auth_names
|
|
189
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
190
|
+
|
|
191
|
+
new_options = opts.merge(
|
|
192
|
+
:operation => :"AnalyticsApi.analytics_success_rate_get",
|
|
193
|
+
:header_params => header_params,
|
|
194
|
+
:query_params => query_params,
|
|
195
|
+
:form_params => form_params,
|
|
196
|
+
:body => post_body,
|
|
197
|
+
:auth_names => auth_names,
|
|
198
|
+
:return_type => return_type
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
202
|
+
if @api_client.config.debugging
|
|
203
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#analytics_success_rate_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
204
|
+
end
|
|
205
|
+
return data, status_code, headers
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
end
|