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,476 @@
|
|
|
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 TeamsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List teams
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [Array<Team>]
|
|
25
|
+
def teams_get(opts = {})
|
|
26
|
+
data, _status_code, _headers = teams_get_with_http_info(opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# List teams
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [Array<(Array<Team>, Integer, Hash)>] Array<Team> data, response status code and response headers
|
|
33
|
+
def teams_get_with_http_info(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_get ...'
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/teams'
|
|
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<Team>'
|
|
56
|
+
|
|
57
|
+
# auth_names
|
|
58
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
59
|
+
|
|
60
|
+
new_options = opts.merge(
|
|
61
|
+
:operation => :"TeamsApi.teams_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: TeamsApi#teams_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Get team details
|
|
78
|
+
# @param id [String]
|
|
79
|
+
# @param [Hash] opts the optional parameters
|
|
80
|
+
# @return [TeamDetailResponse]
|
|
81
|
+
def teams_id_get(id, opts = {})
|
|
82
|
+
data, _status_code, _headers = teams_id_get_with_http_info(id, opts)
|
|
83
|
+
data
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Get team details
|
|
87
|
+
# @param id [String]
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [Array<(TeamDetailResponse, Integer, Hash)>] TeamDetailResponse data, response status code and response headers
|
|
90
|
+
def teams_id_get_with_http_info(id, opts = {})
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_id_get ...'
|
|
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 TeamsApi.teams_id_get"
|
|
97
|
+
end
|
|
98
|
+
# resource path
|
|
99
|
+
local_var_path = '/teams/{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
|
+
# HTTP header 'Accept' (if needed)
|
|
107
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
108
|
+
|
|
109
|
+
# form parameters
|
|
110
|
+
form_params = opts[:form_params] || {}
|
|
111
|
+
|
|
112
|
+
# http body (model)
|
|
113
|
+
post_body = opts[:debug_body]
|
|
114
|
+
|
|
115
|
+
# return_type
|
|
116
|
+
return_type = opts[:debug_return_type] || 'TeamDetailResponse'
|
|
117
|
+
|
|
118
|
+
# auth_names
|
|
119
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
120
|
+
|
|
121
|
+
new_options = opts.merge(
|
|
122
|
+
:operation => :"TeamsApi.teams_id_get",
|
|
123
|
+
:header_params => header_params,
|
|
124
|
+
:query_params => query_params,
|
|
125
|
+
:form_params => form_params,
|
|
126
|
+
:body => post_body,
|
|
127
|
+
:auth_names => auth_names,
|
|
128
|
+
:return_type => return_type
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
132
|
+
if @api_client.config.debugging
|
|
133
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
134
|
+
end
|
|
135
|
+
return data, status_code, headers
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Invite a member to the team
|
|
139
|
+
# @param id [String]
|
|
140
|
+
# @param invite_request [InviteRequest]
|
|
141
|
+
# @param [Hash] opts the optional parameters
|
|
142
|
+
# @return [nil]
|
|
143
|
+
def teams_id_invite_post(id, invite_request, opts = {})
|
|
144
|
+
teams_id_invite_post_with_http_info(id, invite_request, opts)
|
|
145
|
+
nil
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Invite a member to the team
|
|
149
|
+
# @param id [String]
|
|
150
|
+
# @param invite_request [InviteRequest]
|
|
151
|
+
# @param [Hash] opts the optional parameters
|
|
152
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
153
|
+
def teams_id_invite_post_with_http_info(id, invite_request, opts = {})
|
|
154
|
+
if @api_client.config.debugging
|
|
155
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_id_invite_post ...'
|
|
156
|
+
end
|
|
157
|
+
# verify the required parameter 'id' is set
|
|
158
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
159
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.teams_id_invite_post"
|
|
160
|
+
end
|
|
161
|
+
# verify the required parameter 'invite_request' is set
|
|
162
|
+
if @api_client.config.client_side_validation && invite_request.nil?
|
|
163
|
+
fail ArgumentError, "Missing the required parameter 'invite_request' when calling TeamsApi.teams_id_invite_post"
|
|
164
|
+
end
|
|
165
|
+
# resource path
|
|
166
|
+
local_var_path = '/teams/{id}/invite'.sub('{id}', CGI.escape(id.to_s))
|
|
167
|
+
|
|
168
|
+
# query parameters
|
|
169
|
+
query_params = opts[:query_params] || {}
|
|
170
|
+
|
|
171
|
+
# header parameters
|
|
172
|
+
header_params = opts[:header_params] || {}
|
|
173
|
+
# HTTP header 'Content-Type'
|
|
174
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
175
|
+
if !content_type.nil?
|
|
176
|
+
header_params['Content-Type'] = content_type
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# form parameters
|
|
180
|
+
form_params = opts[:form_params] || {}
|
|
181
|
+
|
|
182
|
+
# http body (model)
|
|
183
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(invite_request)
|
|
184
|
+
|
|
185
|
+
# return_type
|
|
186
|
+
return_type = opts[:debug_return_type]
|
|
187
|
+
|
|
188
|
+
# auth_names
|
|
189
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
190
|
+
|
|
191
|
+
new_options = opts.merge(
|
|
192
|
+
:operation => :"TeamsApi.teams_id_invite_post",
|
|
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(:POST, local_var_path, new_options)
|
|
202
|
+
if @api_client.config.debugging
|
|
203
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_id_invite_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
204
|
+
end
|
|
205
|
+
return data, status_code, headers
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# List team members
|
|
209
|
+
# @param id [String]
|
|
210
|
+
# @param [Hash] opts the optional parameters
|
|
211
|
+
# @return [Array<TeamMember>]
|
|
212
|
+
def teams_id_members_get(id, opts = {})
|
|
213
|
+
data, _status_code, _headers = teams_id_members_get_with_http_info(id, opts)
|
|
214
|
+
data
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# List team members
|
|
218
|
+
# @param id [String]
|
|
219
|
+
# @param [Hash] opts the optional parameters
|
|
220
|
+
# @return [Array<(Array<TeamMember>, Integer, Hash)>] Array<TeamMember> data, response status code and response headers
|
|
221
|
+
def teams_id_members_get_with_http_info(id, opts = {})
|
|
222
|
+
if @api_client.config.debugging
|
|
223
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_id_members_get ...'
|
|
224
|
+
end
|
|
225
|
+
# verify the required parameter 'id' is set
|
|
226
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
227
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.teams_id_members_get"
|
|
228
|
+
end
|
|
229
|
+
# resource path
|
|
230
|
+
local_var_path = '/teams/{id}/members'.sub('{id}', CGI.escape(id.to_s))
|
|
231
|
+
|
|
232
|
+
# query parameters
|
|
233
|
+
query_params = opts[:query_params] || {}
|
|
234
|
+
|
|
235
|
+
# header parameters
|
|
236
|
+
header_params = opts[:header_params] || {}
|
|
237
|
+
# HTTP header 'Accept' (if needed)
|
|
238
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
239
|
+
|
|
240
|
+
# form parameters
|
|
241
|
+
form_params = opts[:form_params] || {}
|
|
242
|
+
|
|
243
|
+
# http body (model)
|
|
244
|
+
post_body = opts[:debug_body]
|
|
245
|
+
|
|
246
|
+
# return_type
|
|
247
|
+
return_type = opts[:debug_return_type] || 'Array<TeamMember>'
|
|
248
|
+
|
|
249
|
+
# auth_names
|
|
250
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
251
|
+
|
|
252
|
+
new_options = opts.merge(
|
|
253
|
+
:operation => :"TeamsApi.teams_id_members_get",
|
|
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(:GET, local_var_path, new_options)
|
|
263
|
+
if @api_client.config.debugging
|
|
264
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_id_members_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
265
|
+
end
|
|
266
|
+
return data, status_code, headers
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Remove member from team
|
|
270
|
+
# @param id [String]
|
|
271
|
+
# @param uid [String]
|
|
272
|
+
# @param [Hash] opts the optional parameters
|
|
273
|
+
# @return [nil]
|
|
274
|
+
def teams_id_members_uid_delete(id, uid, opts = {})
|
|
275
|
+
teams_id_members_uid_delete_with_http_info(id, uid, opts)
|
|
276
|
+
nil
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Remove member from team
|
|
280
|
+
# @param id [String]
|
|
281
|
+
# @param uid [String]
|
|
282
|
+
# @param [Hash] opts the optional parameters
|
|
283
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
284
|
+
def teams_id_members_uid_delete_with_http_info(id, uid, opts = {})
|
|
285
|
+
if @api_client.config.debugging
|
|
286
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_id_members_uid_delete ...'
|
|
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 TeamsApi.teams_id_members_uid_delete"
|
|
291
|
+
end
|
|
292
|
+
# verify the required parameter 'uid' is set
|
|
293
|
+
if @api_client.config.client_side_validation && uid.nil?
|
|
294
|
+
fail ArgumentError, "Missing the required parameter 'uid' when calling TeamsApi.teams_id_members_uid_delete"
|
|
295
|
+
end
|
|
296
|
+
# resource path
|
|
297
|
+
local_var_path = '/teams/{id}/members/{uid}'.sub('{id}', CGI.escape(id.to_s)).sub('{uid}', CGI.escape(uid.to_s))
|
|
298
|
+
|
|
299
|
+
# query parameters
|
|
300
|
+
query_params = opts[:query_params] || {}
|
|
301
|
+
|
|
302
|
+
# header parameters
|
|
303
|
+
header_params = opts[:header_params] || {}
|
|
304
|
+
|
|
305
|
+
# form parameters
|
|
306
|
+
form_params = opts[:form_params] || {}
|
|
307
|
+
|
|
308
|
+
# http body (model)
|
|
309
|
+
post_body = opts[:debug_body]
|
|
310
|
+
|
|
311
|
+
# return_type
|
|
312
|
+
return_type = opts[:debug_return_type]
|
|
313
|
+
|
|
314
|
+
# auth_names
|
|
315
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
316
|
+
|
|
317
|
+
new_options = opts.merge(
|
|
318
|
+
:operation => :"TeamsApi.teams_id_members_uid_delete",
|
|
319
|
+
:header_params => header_params,
|
|
320
|
+
:query_params => query_params,
|
|
321
|
+
:form_params => form_params,
|
|
322
|
+
:body => post_body,
|
|
323
|
+
:auth_names => auth_names,
|
|
324
|
+
:return_type => return_type
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
328
|
+
if @api_client.config.debugging
|
|
329
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_id_members_uid_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
330
|
+
end
|
|
331
|
+
return data, status_code, headers
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Change member role
|
|
335
|
+
# @param id [String]
|
|
336
|
+
# @param uid [String]
|
|
337
|
+
# @param change_role_request [ChangeRoleRequest]
|
|
338
|
+
# @param [Hash] opts the optional parameters
|
|
339
|
+
# @return [nil]
|
|
340
|
+
def teams_id_members_uid_role_put(id, uid, change_role_request, opts = {})
|
|
341
|
+
teams_id_members_uid_role_put_with_http_info(id, uid, change_role_request, opts)
|
|
342
|
+
nil
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# Change member role
|
|
346
|
+
# @param id [String]
|
|
347
|
+
# @param uid [String]
|
|
348
|
+
# @param change_role_request [ChangeRoleRequest]
|
|
349
|
+
# @param [Hash] opts the optional parameters
|
|
350
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
351
|
+
def teams_id_members_uid_role_put_with_http_info(id, uid, change_role_request, opts = {})
|
|
352
|
+
if @api_client.config.debugging
|
|
353
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_id_members_uid_role_put ...'
|
|
354
|
+
end
|
|
355
|
+
# verify the required parameter 'id' is set
|
|
356
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
357
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.teams_id_members_uid_role_put"
|
|
358
|
+
end
|
|
359
|
+
# verify the required parameter 'uid' is set
|
|
360
|
+
if @api_client.config.client_side_validation && uid.nil?
|
|
361
|
+
fail ArgumentError, "Missing the required parameter 'uid' when calling TeamsApi.teams_id_members_uid_role_put"
|
|
362
|
+
end
|
|
363
|
+
# verify the required parameter 'change_role_request' is set
|
|
364
|
+
if @api_client.config.client_side_validation && change_role_request.nil?
|
|
365
|
+
fail ArgumentError, "Missing the required parameter 'change_role_request' when calling TeamsApi.teams_id_members_uid_role_put"
|
|
366
|
+
end
|
|
367
|
+
# resource path
|
|
368
|
+
local_var_path = '/teams/{id}/members/{uid}/role'.sub('{id}', CGI.escape(id.to_s)).sub('{uid}', CGI.escape(uid.to_s))
|
|
369
|
+
|
|
370
|
+
# query parameters
|
|
371
|
+
query_params = opts[:query_params] || {}
|
|
372
|
+
|
|
373
|
+
# header parameters
|
|
374
|
+
header_params = opts[:header_params] || {}
|
|
375
|
+
# HTTP header 'Content-Type'
|
|
376
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
377
|
+
if !content_type.nil?
|
|
378
|
+
header_params['Content-Type'] = content_type
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# form parameters
|
|
382
|
+
form_params = opts[:form_params] || {}
|
|
383
|
+
|
|
384
|
+
# http body (model)
|
|
385
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(change_role_request)
|
|
386
|
+
|
|
387
|
+
# return_type
|
|
388
|
+
return_type = opts[:debug_return_type]
|
|
389
|
+
|
|
390
|
+
# auth_names
|
|
391
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
392
|
+
|
|
393
|
+
new_options = opts.merge(
|
|
394
|
+
:operation => :"TeamsApi.teams_id_members_uid_role_put",
|
|
395
|
+
:header_params => header_params,
|
|
396
|
+
:query_params => query_params,
|
|
397
|
+
:form_params => form_params,
|
|
398
|
+
:body => post_body,
|
|
399
|
+
:auth_names => auth_names,
|
|
400
|
+
:return_type => return_type
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
404
|
+
if @api_client.config.debugging
|
|
405
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_id_members_uid_role_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
406
|
+
end
|
|
407
|
+
return data, status_code, headers
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
# Create a team
|
|
411
|
+
# @param create_team_request [CreateTeamRequest]
|
|
412
|
+
# @param [Hash] opts the optional parameters
|
|
413
|
+
# @return [Team]
|
|
414
|
+
def teams_post(create_team_request, opts = {})
|
|
415
|
+
data, _status_code, _headers = teams_post_with_http_info(create_team_request, opts)
|
|
416
|
+
data
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
# Create a team
|
|
420
|
+
# @param create_team_request [CreateTeamRequest]
|
|
421
|
+
# @param [Hash] opts the optional parameters
|
|
422
|
+
# @return [Array<(Team, Integer, Hash)>] Team data, response status code and response headers
|
|
423
|
+
def teams_post_with_http_info(create_team_request, opts = {})
|
|
424
|
+
if @api_client.config.debugging
|
|
425
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_post ...'
|
|
426
|
+
end
|
|
427
|
+
# verify the required parameter 'create_team_request' is set
|
|
428
|
+
if @api_client.config.client_side_validation && create_team_request.nil?
|
|
429
|
+
fail ArgumentError, "Missing the required parameter 'create_team_request' when calling TeamsApi.teams_post"
|
|
430
|
+
end
|
|
431
|
+
# resource path
|
|
432
|
+
local_var_path = '/teams'
|
|
433
|
+
|
|
434
|
+
# query parameters
|
|
435
|
+
query_params = opts[:query_params] || {}
|
|
436
|
+
|
|
437
|
+
# header parameters
|
|
438
|
+
header_params = opts[:header_params] || {}
|
|
439
|
+
# HTTP header 'Accept' (if needed)
|
|
440
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
441
|
+
# HTTP header 'Content-Type'
|
|
442
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
443
|
+
if !content_type.nil?
|
|
444
|
+
header_params['Content-Type'] = content_type
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
# form parameters
|
|
448
|
+
form_params = opts[:form_params] || {}
|
|
449
|
+
|
|
450
|
+
# http body (model)
|
|
451
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_team_request)
|
|
452
|
+
|
|
453
|
+
# return_type
|
|
454
|
+
return_type = opts[:debug_return_type] || 'Team'
|
|
455
|
+
|
|
456
|
+
# auth_names
|
|
457
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
458
|
+
|
|
459
|
+
new_options = opts.merge(
|
|
460
|
+
:operation => :"TeamsApi.teams_post",
|
|
461
|
+
:header_params => header_params,
|
|
462
|
+
:query_params => query_params,
|
|
463
|
+
:form_params => form_params,
|
|
464
|
+
:body => post_body,
|
|
465
|
+
:auth_names => auth_names,
|
|
466
|
+
:return_type => return_type
|
|
467
|
+
)
|
|
468
|
+
|
|
469
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
470
|
+
if @api_client.config.debugging
|
|
471
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
472
|
+
end
|
|
473
|
+
return data, status_code, headers
|
|
474
|
+
end
|
|
475
|
+
end
|
|
476
|
+
end
|
|
@@ -0,0 +1,213 @@
|
|
|
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 TemplatesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List available templates
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @option opts [String] :category
|
|
25
|
+
# @return [Array<WebhookTemplate>]
|
|
26
|
+
def templates_get(opts = {})
|
|
27
|
+
data, _status_code, _headers = templates_get_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# List available templates
|
|
32
|
+
# @param [Hash] opts the optional parameters
|
|
33
|
+
# @option opts [String] :category
|
|
34
|
+
# @return [Array<(Array<WebhookTemplate>, Integer, Hash)>] Array<WebhookTemplate> data, response status code and response headers
|
|
35
|
+
def templates_get_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.templates_get ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/templates'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
|
|
45
|
+
|
|
46
|
+
# header parameters
|
|
47
|
+
header_params = opts[:header_params] || {}
|
|
48
|
+
# HTTP header 'Accept' (if needed)
|
|
49
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
50
|
+
|
|
51
|
+
# form parameters
|
|
52
|
+
form_params = opts[:form_params] || {}
|
|
53
|
+
|
|
54
|
+
# http body (model)
|
|
55
|
+
post_body = opts[:debug_body]
|
|
56
|
+
|
|
57
|
+
# return_type
|
|
58
|
+
return_type = opts[:debug_return_type] || 'Array<WebhookTemplate>'
|
|
59
|
+
|
|
60
|
+
# auth_names
|
|
61
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
62
|
+
|
|
63
|
+
new_options = opts.merge(
|
|
64
|
+
:operation => :"TemplatesApi.templates_get",
|
|
65
|
+
:header_params => header_params,
|
|
66
|
+
:query_params => query_params,
|
|
67
|
+
:form_params => form_params,
|
|
68
|
+
:body => post_body,
|
|
69
|
+
:auth_names => auth_names,
|
|
70
|
+
:return_type => return_type
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
74
|
+
if @api_client.config.debugging
|
|
75
|
+
@api_client.config.logger.debug "API called: TemplatesApi#templates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
76
|
+
end
|
|
77
|
+
return data, status_code, headers
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Apply template to an endpoint
|
|
81
|
+
# @param id [String]
|
|
82
|
+
# @param apply_template_request [ApplyTemplateRequest]
|
|
83
|
+
# @param [Hash] opts the optional parameters
|
|
84
|
+
# @return [ApplyTemplateResponse]
|
|
85
|
+
def templates_id_apply_post(id, apply_template_request, opts = {})
|
|
86
|
+
data, _status_code, _headers = templates_id_apply_post_with_http_info(id, apply_template_request, opts)
|
|
87
|
+
data
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Apply template to an endpoint
|
|
91
|
+
# @param id [String]
|
|
92
|
+
# @param apply_template_request [ApplyTemplateRequest]
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [Array<(ApplyTemplateResponse, Integer, Hash)>] ApplyTemplateResponse data, response status code and response headers
|
|
95
|
+
def templates_id_apply_post_with_http_info(id, apply_template_request, opts = {})
|
|
96
|
+
if @api_client.config.debugging
|
|
97
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.templates_id_apply_post ...'
|
|
98
|
+
end
|
|
99
|
+
# verify the required parameter 'id' is set
|
|
100
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
101
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TemplatesApi.templates_id_apply_post"
|
|
102
|
+
end
|
|
103
|
+
# verify the required parameter 'apply_template_request' is set
|
|
104
|
+
if @api_client.config.client_side_validation && apply_template_request.nil?
|
|
105
|
+
fail ArgumentError, "Missing the required parameter 'apply_template_request' when calling TemplatesApi.templates_id_apply_post"
|
|
106
|
+
end
|
|
107
|
+
# resource path
|
|
108
|
+
local_var_path = '/templates/{id}/apply'.sub('{id}', CGI.escape(id.to_s))
|
|
109
|
+
|
|
110
|
+
# query parameters
|
|
111
|
+
query_params = opts[:query_params] || {}
|
|
112
|
+
|
|
113
|
+
# header parameters
|
|
114
|
+
header_params = opts[:header_params] || {}
|
|
115
|
+
# HTTP header 'Accept' (if needed)
|
|
116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
117
|
+
# HTTP header 'Content-Type'
|
|
118
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
119
|
+
if !content_type.nil?
|
|
120
|
+
header_params['Content-Type'] = content_type
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# form parameters
|
|
124
|
+
form_params = opts[:form_params] || {}
|
|
125
|
+
|
|
126
|
+
# http body (model)
|
|
127
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(apply_template_request)
|
|
128
|
+
|
|
129
|
+
# return_type
|
|
130
|
+
return_type = opts[:debug_return_type] || 'ApplyTemplateResponse'
|
|
131
|
+
|
|
132
|
+
# auth_names
|
|
133
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
134
|
+
|
|
135
|
+
new_options = opts.merge(
|
|
136
|
+
:operation => :"TemplatesApi.templates_id_apply_post",
|
|
137
|
+
:header_params => header_params,
|
|
138
|
+
:query_params => query_params,
|
|
139
|
+
:form_params => form_params,
|
|
140
|
+
:body => post_body,
|
|
141
|
+
:auth_names => auth_names,
|
|
142
|
+
:return_type => return_type
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
146
|
+
if @api_client.config.debugging
|
|
147
|
+
@api_client.config.logger.debug "API called: TemplatesApi#templates_id_apply_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
148
|
+
end
|
|
149
|
+
return data, status_code, headers
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Get template by ID
|
|
153
|
+
# @param id [String]
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @return [WebhookTemplate]
|
|
156
|
+
def templates_id_get(id, opts = {})
|
|
157
|
+
data, _status_code, _headers = templates_id_get_with_http_info(id, opts)
|
|
158
|
+
data
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Get template by ID
|
|
162
|
+
# @param id [String]
|
|
163
|
+
# @param [Hash] opts the optional parameters
|
|
164
|
+
# @return [Array<(WebhookTemplate, Integer, Hash)>] WebhookTemplate data, response status code and response headers
|
|
165
|
+
def templates_id_get_with_http_info(id, opts = {})
|
|
166
|
+
if @api_client.config.debugging
|
|
167
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.templates_id_get ...'
|
|
168
|
+
end
|
|
169
|
+
# verify the required parameter 'id' is set
|
|
170
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
171
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TemplatesApi.templates_id_get"
|
|
172
|
+
end
|
|
173
|
+
# resource path
|
|
174
|
+
local_var_path = '/templates/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
175
|
+
|
|
176
|
+
# query parameters
|
|
177
|
+
query_params = opts[:query_params] || {}
|
|
178
|
+
|
|
179
|
+
# header parameters
|
|
180
|
+
header_params = opts[:header_params] || {}
|
|
181
|
+
# HTTP header 'Accept' (if needed)
|
|
182
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
183
|
+
|
|
184
|
+
# form parameters
|
|
185
|
+
form_params = opts[:form_params] || {}
|
|
186
|
+
|
|
187
|
+
# http body (model)
|
|
188
|
+
post_body = opts[:debug_body]
|
|
189
|
+
|
|
190
|
+
# return_type
|
|
191
|
+
return_type = opts[:debug_return_type] || 'WebhookTemplate'
|
|
192
|
+
|
|
193
|
+
# auth_names
|
|
194
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
195
|
+
|
|
196
|
+
new_options = opts.merge(
|
|
197
|
+
:operation => :"TemplatesApi.templates_id_get",
|
|
198
|
+
:header_params => header_params,
|
|
199
|
+
:query_params => query_params,
|
|
200
|
+
:form_params => form_params,
|
|
201
|
+
:body => post_body,
|
|
202
|
+
:auth_names => auth_names,
|
|
203
|
+
:return_type => return_type
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
207
|
+
if @api_client.config.debugging
|
|
208
|
+
@api_client.config.logger.debug "API called: TemplatesApi#templates_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
209
|
+
end
|
|
210
|
+
return data, status_code, headers
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
end
|