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,468 @@
|
|
|
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 EndpointsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List all endpoints
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [Array<Endpoint>]
|
|
25
|
+
def endpoints_get(opts = {})
|
|
26
|
+
data, _status_code, _headers = endpoints_get_with_http_info(opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# List all endpoints
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [Array<(Array<Endpoint>, Integer, Hash)>] Array<Endpoint> data, response status code and response headers
|
|
33
|
+
def endpoints_get_with_http_info(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: EndpointsApi.endpoints_get ...'
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/endpoints'
|
|
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<Endpoint>'
|
|
56
|
+
|
|
57
|
+
# auth_names
|
|
58
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
59
|
+
|
|
60
|
+
new_options = opts.merge(
|
|
61
|
+
:operation => :"EndpointsApi.endpoints_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: EndpointsApi#endpoints_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Delete endpoint
|
|
78
|
+
# @param id [String]
|
|
79
|
+
# @param [Hash] opts the optional parameters
|
|
80
|
+
# @return [nil]
|
|
81
|
+
def endpoints_id_delete(id, opts = {})
|
|
82
|
+
endpoints_id_delete_with_http_info(id, opts)
|
|
83
|
+
nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Delete endpoint
|
|
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 endpoints_id_delete_with_http_info(id, opts = {})
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug 'Calling API: EndpointsApi.endpoints_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 EndpointsApi.endpoints_id_delete"
|
|
97
|
+
end
|
|
98
|
+
# resource path
|
|
99
|
+
local_var_path = '/endpoints/{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 => :"EndpointsApi.endpoints_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: EndpointsApi#endpoints_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
132
|
+
end
|
|
133
|
+
return data, status_code, headers
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Get endpoint by ID
|
|
137
|
+
# @param id [String]
|
|
138
|
+
# @param [Hash] opts the optional parameters
|
|
139
|
+
# @return [Endpoint]
|
|
140
|
+
def endpoints_id_get(id, opts = {})
|
|
141
|
+
data, _status_code, _headers = endpoints_id_get_with_http_info(id, opts)
|
|
142
|
+
data
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Get endpoint by ID
|
|
146
|
+
# @param id [String]
|
|
147
|
+
# @param [Hash] opts the optional parameters
|
|
148
|
+
# @return [Array<(Endpoint, Integer, Hash)>] Endpoint data, response status code and response headers
|
|
149
|
+
def endpoints_id_get_with_http_info(id, opts = {})
|
|
150
|
+
if @api_client.config.debugging
|
|
151
|
+
@api_client.config.logger.debug 'Calling API: EndpointsApi.endpoints_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 EndpointsApi.endpoints_id_get"
|
|
156
|
+
end
|
|
157
|
+
# resource path
|
|
158
|
+
local_var_path = '/endpoints/{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] || 'Endpoint'
|
|
176
|
+
|
|
177
|
+
# auth_names
|
|
178
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
179
|
+
|
|
180
|
+
new_options = opts.merge(
|
|
181
|
+
:operation => :"EndpointsApi.endpoints_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: EndpointsApi#endpoints_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
193
|
+
end
|
|
194
|
+
return data, status_code, headers
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Update endpoint
|
|
198
|
+
# @param id [String]
|
|
199
|
+
# @param update_endpoint_request [UpdateEndpointRequest]
|
|
200
|
+
# @param [Hash] opts the optional parameters
|
|
201
|
+
# @return [Endpoint]
|
|
202
|
+
def endpoints_id_put(id, update_endpoint_request, opts = {})
|
|
203
|
+
data, _status_code, _headers = endpoints_id_put_with_http_info(id, update_endpoint_request, opts)
|
|
204
|
+
data
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Update endpoint
|
|
208
|
+
# @param id [String]
|
|
209
|
+
# @param update_endpoint_request [UpdateEndpointRequest]
|
|
210
|
+
# @param [Hash] opts the optional parameters
|
|
211
|
+
# @return [Array<(Endpoint, Integer, Hash)>] Endpoint data, response status code and response headers
|
|
212
|
+
def endpoints_id_put_with_http_info(id, update_endpoint_request, opts = {})
|
|
213
|
+
if @api_client.config.debugging
|
|
214
|
+
@api_client.config.logger.debug 'Calling API: EndpointsApi.endpoints_id_put ...'
|
|
215
|
+
end
|
|
216
|
+
# verify the required parameter 'id' is set
|
|
217
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
218
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling EndpointsApi.endpoints_id_put"
|
|
219
|
+
end
|
|
220
|
+
# verify the required parameter 'update_endpoint_request' is set
|
|
221
|
+
if @api_client.config.client_side_validation && update_endpoint_request.nil?
|
|
222
|
+
fail ArgumentError, "Missing the required parameter 'update_endpoint_request' when calling EndpointsApi.endpoints_id_put"
|
|
223
|
+
end
|
|
224
|
+
# resource path
|
|
225
|
+
local_var_path = '/endpoints/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
226
|
+
|
|
227
|
+
# query parameters
|
|
228
|
+
query_params = opts[:query_params] || {}
|
|
229
|
+
|
|
230
|
+
# header parameters
|
|
231
|
+
header_params = opts[:header_params] || {}
|
|
232
|
+
# HTTP header 'Accept' (if needed)
|
|
233
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
234
|
+
# HTTP header 'Content-Type'
|
|
235
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
236
|
+
if !content_type.nil?
|
|
237
|
+
header_params['Content-Type'] = content_type
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# form parameters
|
|
241
|
+
form_params = opts[:form_params] || {}
|
|
242
|
+
|
|
243
|
+
# http body (model)
|
|
244
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_endpoint_request)
|
|
245
|
+
|
|
246
|
+
# return_type
|
|
247
|
+
return_type = opts[:debug_return_type] || 'Endpoint'
|
|
248
|
+
|
|
249
|
+
# auth_names
|
|
250
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
251
|
+
|
|
252
|
+
new_options = opts.merge(
|
|
253
|
+
:operation => :"EndpointsApi.endpoints_id_put",
|
|
254
|
+
:header_params => header_params,
|
|
255
|
+
:query_params => query_params,
|
|
256
|
+
:form_params => form_params,
|
|
257
|
+
:body => post_body,
|
|
258
|
+
:auth_names => auth_names,
|
|
259
|
+
:return_type => return_type
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
263
|
+
if @api_client.config.debugging
|
|
264
|
+
@api_client.config.logger.debug "API called: EndpointsApi#endpoints_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
265
|
+
end
|
|
266
|
+
return data, status_code, headers
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Update retry policy for an endpoint
|
|
270
|
+
# @param id [String]
|
|
271
|
+
# @param retry_policy [RetryPolicy]
|
|
272
|
+
# @param [Hash] opts the optional parameters
|
|
273
|
+
# @return [Endpoint]
|
|
274
|
+
def endpoints_id_retry_policy_put(id, retry_policy, opts = {})
|
|
275
|
+
data, _status_code, _headers = endpoints_id_retry_policy_put_with_http_info(id, retry_policy, opts)
|
|
276
|
+
data
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Update retry policy for an endpoint
|
|
280
|
+
# @param id [String]
|
|
281
|
+
# @param retry_policy [RetryPolicy]
|
|
282
|
+
# @param [Hash] opts the optional parameters
|
|
283
|
+
# @return [Array<(Endpoint, Integer, Hash)>] Endpoint data, response status code and response headers
|
|
284
|
+
def endpoints_id_retry_policy_put_with_http_info(id, retry_policy, opts = {})
|
|
285
|
+
if @api_client.config.debugging
|
|
286
|
+
@api_client.config.logger.debug 'Calling API: EndpointsApi.endpoints_id_retry_policy_put ...'
|
|
287
|
+
end
|
|
288
|
+
# verify the required parameter 'id' is set
|
|
289
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
290
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling EndpointsApi.endpoints_id_retry_policy_put"
|
|
291
|
+
end
|
|
292
|
+
# verify the required parameter 'retry_policy' is set
|
|
293
|
+
if @api_client.config.client_side_validation && retry_policy.nil?
|
|
294
|
+
fail ArgumentError, "Missing the required parameter 'retry_policy' when calling EndpointsApi.endpoints_id_retry_policy_put"
|
|
295
|
+
end
|
|
296
|
+
# resource path
|
|
297
|
+
local_var_path = '/endpoints/{id}/retry-policy'.sub('{id}', CGI.escape(id.to_s))
|
|
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']) unless header_params['Accept']
|
|
306
|
+
# HTTP header 'Content-Type'
|
|
307
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
308
|
+
if !content_type.nil?
|
|
309
|
+
header_params['Content-Type'] = content_type
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# form parameters
|
|
313
|
+
form_params = opts[:form_params] || {}
|
|
314
|
+
|
|
315
|
+
# http body (model)
|
|
316
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(retry_policy)
|
|
317
|
+
|
|
318
|
+
# return_type
|
|
319
|
+
return_type = opts[:debug_return_type] || 'Endpoint'
|
|
320
|
+
|
|
321
|
+
# auth_names
|
|
322
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
323
|
+
|
|
324
|
+
new_options = opts.merge(
|
|
325
|
+
:operation => :"EndpointsApi.endpoints_id_retry_policy_put",
|
|
326
|
+
:header_params => header_params,
|
|
327
|
+
:query_params => query_params,
|
|
328
|
+
:form_params => form_params,
|
|
329
|
+
:body => post_body,
|
|
330
|
+
:auth_names => auth_names,
|
|
331
|
+
:return_type => return_type
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
335
|
+
if @api_client.config.debugging
|
|
336
|
+
@api_client.config.logger.debug "API called: EndpointsApi#endpoints_id_retry_policy_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
337
|
+
end
|
|
338
|
+
return data, status_code, headers
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
# Rotate endpoint signing secret
|
|
342
|
+
# @param id [String]
|
|
343
|
+
# @param [Hash] opts the optional parameters
|
|
344
|
+
# @return [EndpointsIdRotateSecretPost200Response]
|
|
345
|
+
def endpoints_id_rotate_secret_post(id, opts = {})
|
|
346
|
+
data, _status_code, _headers = endpoints_id_rotate_secret_post_with_http_info(id, opts)
|
|
347
|
+
data
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Rotate endpoint signing secret
|
|
351
|
+
# @param id [String]
|
|
352
|
+
# @param [Hash] opts the optional parameters
|
|
353
|
+
# @return [Array<(EndpointsIdRotateSecretPost200Response, Integer, Hash)>] EndpointsIdRotateSecretPost200Response data, response status code and response headers
|
|
354
|
+
def endpoints_id_rotate_secret_post_with_http_info(id, opts = {})
|
|
355
|
+
if @api_client.config.debugging
|
|
356
|
+
@api_client.config.logger.debug 'Calling API: EndpointsApi.endpoints_id_rotate_secret_post ...'
|
|
357
|
+
end
|
|
358
|
+
# verify the required parameter 'id' is set
|
|
359
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
360
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling EndpointsApi.endpoints_id_rotate_secret_post"
|
|
361
|
+
end
|
|
362
|
+
# resource path
|
|
363
|
+
local_var_path = '/endpoints/{id}/rotate-secret'.sub('{id}', CGI.escape(id.to_s))
|
|
364
|
+
|
|
365
|
+
# query parameters
|
|
366
|
+
query_params = opts[:query_params] || {}
|
|
367
|
+
|
|
368
|
+
# header parameters
|
|
369
|
+
header_params = opts[:header_params] || {}
|
|
370
|
+
# HTTP header 'Accept' (if needed)
|
|
371
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
372
|
+
|
|
373
|
+
# form parameters
|
|
374
|
+
form_params = opts[:form_params] || {}
|
|
375
|
+
|
|
376
|
+
# http body (model)
|
|
377
|
+
post_body = opts[:debug_body]
|
|
378
|
+
|
|
379
|
+
# return_type
|
|
380
|
+
return_type = opts[:debug_return_type] || 'EndpointsIdRotateSecretPost200Response'
|
|
381
|
+
|
|
382
|
+
# auth_names
|
|
383
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
384
|
+
|
|
385
|
+
new_options = opts.merge(
|
|
386
|
+
:operation => :"EndpointsApi.endpoints_id_rotate_secret_post",
|
|
387
|
+
:header_params => header_params,
|
|
388
|
+
:query_params => query_params,
|
|
389
|
+
:form_params => form_params,
|
|
390
|
+
:body => post_body,
|
|
391
|
+
:auth_names => auth_names,
|
|
392
|
+
:return_type => return_type
|
|
393
|
+
)
|
|
394
|
+
|
|
395
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
396
|
+
if @api_client.config.debugging
|
|
397
|
+
@api_client.config.logger.debug "API called: EndpointsApi#endpoints_id_rotate_secret_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
398
|
+
end
|
|
399
|
+
return data, status_code, headers
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
# Create a new endpoint
|
|
403
|
+
# @param create_endpoint_request [CreateEndpointRequest]
|
|
404
|
+
# @param [Hash] opts the optional parameters
|
|
405
|
+
# @return [Endpoint]
|
|
406
|
+
def endpoints_post(create_endpoint_request, opts = {})
|
|
407
|
+
data, _status_code, _headers = endpoints_post_with_http_info(create_endpoint_request, opts)
|
|
408
|
+
data
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# Create a new endpoint
|
|
412
|
+
# @param create_endpoint_request [CreateEndpointRequest]
|
|
413
|
+
# @param [Hash] opts the optional parameters
|
|
414
|
+
# @return [Array<(Endpoint, Integer, Hash)>] Endpoint data, response status code and response headers
|
|
415
|
+
def endpoints_post_with_http_info(create_endpoint_request, opts = {})
|
|
416
|
+
if @api_client.config.debugging
|
|
417
|
+
@api_client.config.logger.debug 'Calling API: EndpointsApi.endpoints_post ...'
|
|
418
|
+
end
|
|
419
|
+
# verify the required parameter 'create_endpoint_request' is set
|
|
420
|
+
if @api_client.config.client_side_validation && create_endpoint_request.nil?
|
|
421
|
+
fail ArgumentError, "Missing the required parameter 'create_endpoint_request' when calling EndpointsApi.endpoints_post"
|
|
422
|
+
end
|
|
423
|
+
# resource path
|
|
424
|
+
local_var_path = '/endpoints'
|
|
425
|
+
|
|
426
|
+
# query parameters
|
|
427
|
+
query_params = opts[:query_params] || {}
|
|
428
|
+
|
|
429
|
+
# header parameters
|
|
430
|
+
header_params = opts[:header_params] || {}
|
|
431
|
+
# HTTP header 'Accept' (if needed)
|
|
432
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
433
|
+
# HTTP header 'Content-Type'
|
|
434
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
435
|
+
if !content_type.nil?
|
|
436
|
+
header_params['Content-Type'] = content_type
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
# form parameters
|
|
440
|
+
form_params = opts[:form_params] || {}
|
|
441
|
+
|
|
442
|
+
# http body (model)
|
|
443
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_endpoint_request)
|
|
444
|
+
|
|
445
|
+
# return_type
|
|
446
|
+
return_type = opts[:debug_return_type] || 'Endpoint'
|
|
447
|
+
|
|
448
|
+
# auth_names
|
|
449
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
450
|
+
|
|
451
|
+
new_options = opts.merge(
|
|
452
|
+
:operation => :"EndpointsApi.endpoints_post",
|
|
453
|
+
:header_params => header_params,
|
|
454
|
+
:query_params => query_params,
|
|
455
|
+
:form_params => form_params,
|
|
456
|
+
:body => post_body,
|
|
457
|
+
:auth_names => auth_names,
|
|
458
|
+
:return_type => return_type
|
|
459
|
+
)
|
|
460
|
+
|
|
461
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
462
|
+
if @api_client.config.debugging
|
|
463
|
+
@api_client.config.logger.debug "API called: EndpointsApi#endpoints_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
464
|
+
end
|
|
465
|
+
return data, status_code, headers
|
|
466
|
+
end
|
|
467
|
+
end
|
|
468
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
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 EventsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List event types
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [nil]
|
|
25
|
+
def events_get(opts = {})
|
|
26
|
+
events_get_with_http_info(opts)
|
|
27
|
+
nil
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# List event types
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
33
|
+
def events_get_with_http_info(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.events_get ...'
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/events'
|
|
39
|
+
|
|
40
|
+
# query parameters
|
|
41
|
+
query_params = opts[:query_params] || {}
|
|
42
|
+
|
|
43
|
+
# header parameters
|
|
44
|
+
header_params = opts[:header_params] || {}
|
|
45
|
+
|
|
46
|
+
# form parameters
|
|
47
|
+
form_params = opts[:form_params] || {}
|
|
48
|
+
|
|
49
|
+
# http body (model)
|
|
50
|
+
post_body = opts[:debug_body]
|
|
51
|
+
|
|
52
|
+
# return_type
|
|
53
|
+
return_type = opts[:debug_return_type]
|
|
54
|
+
|
|
55
|
+
# auth_names
|
|
56
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
57
|
+
|
|
58
|
+
new_options = opts.merge(
|
|
59
|
+
:operation => :"EventsApi.events_get",
|
|
60
|
+
:header_params => header_params,
|
|
61
|
+
:query_params => query_params,
|
|
62
|
+
:form_params => form_params,
|
|
63
|
+
:body => post_body,
|
|
64
|
+
:auth_names => auth_names,
|
|
65
|
+
:return_type => return_type
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
69
|
+
if @api_client.config.debugging
|
|
70
|
+
@api_client.config.logger.debug "API called: EventsApi#events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
71
|
+
end
|
|
72
|
+
return data, status_code, headers
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|