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.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -1
  3. data/lib/openapi_client/api/admin_api.rb +452 -0
  4. data/lib/openapi_client/api/alerts_api.rb +322 -0
  5. data/lib/openapi_client/api/analytics_api.rb +208 -0
  6. data/lib/openapi_client/api/api_keys_api.rb +252 -0
  7. data/lib/openapi_client/api/audit_log_api.rb +140 -0
  8. data/lib/openapi_client/api/auth_api.rb +1080 -0
  9. data/lib/openapi_client/api/billing_api.rb +500 -0
  10. data/lib/openapi_client/api/contact_api.rb +88 -0
  11. data/lib/openapi_client/api/custom_domains_api.rb +253 -0
  12. data/lib/openapi_client/api/customer_portal_api.rb +700 -0
  13. data/lib/openapi_client/api/delivery_details_api.rb +146 -0
  14. data/lib/openapi_client/api/devices_api.rb +202 -0
  15. data/lib/openapi_client/api/embed_api.rb +128 -0
  16. data/lib/openapi_client/api/endpoints_api.rb +468 -0
  17. data/lib/openapi_client/api/events_api.rb +75 -0
  18. data/lib/openapi_client/api/health_api.rb +193 -0
  19. data/lib/openapi_client/api/inbound_api.rb +170 -0
  20. data/lib/openapi_client/api/notifications_api.rb +309 -0
  21. data/lib/openapi_client/api/o_auth_api.rb +181 -0
  22. data/lib/openapi_client/api/outbound_ips_api.rb +77 -0
  23. data/lib/openapi_client/api/playground_api.rb +143 -0
  24. data/lib/openapi_client/api/rate_limits_api.rb +252 -0
  25. data/lib/openapi_client/api/routing_api.rb +393 -0
  26. data/lib/openapi_client/api/schemas_api.rb +268 -0
  27. data/lib/openapi_client/api/search_api.rb +96 -0
  28. data/lib/openapi_client/api/simulator_api.rb +82 -0
  29. data/lib/openapi_client/api/sso_api.rb +241 -0
  30. data/lib/openapi_client/api/stats_api.rb +77 -0
  31. data/lib/openapi_client/api/stream_api.rb +88 -0
  32. data/lib/openapi_client/api/teams_api.rb +476 -0
  33. data/lib/openapi_client/api/templates_api.rb +213 -0
  34. data/lib/openapi_client/api/transforms_api.rb +368 -0
  35. data/lib/openapi_client/api/webhooks_api.rb +534 -0
  36. data/lib/openapi_client/api_client.rb +397 -0
  37. data/lib/openapi_client/api_error.rb +58 -0
  38. data/lib/openapi_client/api_model_base.rb +88 -0
  39. data/lib/openapi_client/configuration.rb +312 -0
  40. data/lib/openapi_client/models/admin_revenue_get200_response_inner.rb +165 -0
  41. data/lib/openapi_client/models/admin_sdk_update_post_request.rb +156 -0
  42. data/lib/openapi_client/models/admin_users_id_plan_put_request.rb +181 -0
  43. data/lib/openapi_client/models/admin_users_id_status_put_request.rb +147 -0
  44. data/lib/openapi_client/models/alert_rule.rb +237 -0
  45. data/lib/openapi_client/models/api_key_info.rb +185 -0
  46. data/lib/openapi_client/models/apply_template_request.rb +173 -0
  47. data/lib/openapi_client/models/apply_template_response.rb +156 -0
  48. data/lib/openapi_client/models/auth2fa_enable_post200_response.rb +156 -0
  49. data/lib/openapi_client/models/auth_login_post200_response.rb +104 -0
  50. data/lib/openapi_client/models/auth_response.rb +167 -0
  51. data/lib/openapi_client/models/batch_replay_request.rb +166 -0
  52. data/lib/openapi_client/models/batch_response.rb +160 -0
  53. data/lib/openapi_client/models/batch_response_errors_inner.rb +156 -0
  54. data/lib/openapi_client/models/batch_webhook_request.rb +166 -0
  55. data/lib/openapi_client/models/billing_portal_post200_response.rb +147 -0
  56. data/lib/openapi_client/models/change_password_request.rb +199 -0
  57. data/lib/openapi_client/models/change_role_request.rb +188 -0
  58. data/lib/openapi_client/models/confirm2fa_request.rb +182 -0
  59. data/lib/openapi_client/models/contact_request.rb +242 -0
  60. data/lib/openapi_client/models/contact_response.rb +156 -0
  61. data/lib/openapi_client/models/create_alert_request.rb +277 -0
  62. data/lib/openapi_client/models/create_api_key_response.rb +175 -0
  63. data/lib/openapi_client/models/create_endpoint_request.rb +288 -0
  64. data/lib/openapi_client/models/create_team_request.rb +164 -0
  65. data/lib/openapi_client/models/create_transform_rule_request.rb +216 -0
  66. data/lib/openapi_client/models/create_webhook_request.rb +201 -0
  67. data/lib/openapi_client/models/custom_domains_post_request.rb +147 -0
  68. data/lib/openapi_client/models/customer_response.rb +256 -0
  69. data/lib/openapi_client/models/delivery.rb +246 -0
  70. data/lib/openapi_client/models/delivery_attempt.rb +205 -0
  71. data/lib/openapi_client/models/delivery_list_response.rb +176 -0
  72. data/lib/openapi_client/models/delivery_trend_response.rb +158 -0
  73. data/lib/openapi_client/models/delivery_trend_response_buckets_inner.rb +174 -0
  74. data/lib/openapi_client/models/device_token_response.rb +174 -0
  75. data/lib/openapi_client/models/disable2fa_request.rb +164 -0
  76. data/lib/openapi_client/models/enable2fa_request.rb +164 -0
  77. data/lib/openapi_client/models/endpoint.rb +321 -0
  78. data/lib/openapi_client/models/endpoint_health.rb +183 -0
  79. data/lib/openapi_client/models/endpoints_endpoint_id_transforms_test_post_request.rb +156 -0
  80. data/lib/openapi_client/models/endpoints_id_rotate_secret_post200_response.rb +156 -0
  81. data/lib/openapi_client/models/error.rb +165 -0
  82. data/lib/openapi_client/models/forgot_password_request.rb +164 -0
  83. data/lib/openapi_client/models/invite_request.rb +207 -0
  84. data/lib/openapi_client/models/invoice_response.rb +183 -0
  85. data/lib/openapi_client/models/latency_trend_response.rb +167 -0
  86. data/lib/openapi_client/models/latency_trend_response_buckets_inner.rb +165 -0
  87. data/lib/openapi_client/models/login_request.rb +190 -0
  88. data/lib/openapi_client/models/notification.rb +193 -0
  89. data/lib/openapi_client/models/notification_list_response.rb +167 -0
  90. data/lib/openapi_client/models/notification_preferences.rb +201 -0
  91. data/lib/openapi_client/models/notifications_unread_count_get200_response.rb +147 -0
  92. data/lib/openapi_client/models/outbound_ips_response.rb +158 -0
  93. data/lib/openapi_client/models/paginated_users.rb +176 -0
  94. data/lib/openapi_client/models/playground_get200_response.rb +160 -0
  95. data/lib/openapi_client/models/portal_notifications_put200_response.rb +156 -0
  96. data/lib/openapi_client/models/portal_profile.rb +184 -0
  97. data/lib/openapi_client/models/refresh_token_request.rb +164 -0
  98. data/lib/openapi_client/models/register_device_request.rb +208 -0
  99. data/lib/openapi_client/models/register_request.rb +201 -0
  100. data/lib/openapi_client/models/register_schema_request.rb +191 -0
  101. data/lib/openapi_client/models/resend_verification_request.rb +164 -0
  102. data/lib/openapi_client/models/reset_password_request.rb +199 -0
  103. data/lib/openapi_client/models/retry_policy.rb +216 -0
  104. data/lib/openapi_client/models/routing_info.rb +193 -0
  105. data/lib/openapi_client/models/search_result.rb +158 -0
  106. data/lib/openapi_client/models/simulator_post_request.rb +165 -0
  107. data/lib/openapi_client/models/sso_config_post_request.rb +190 -0
  108. data/lib/openapi_client/models/stats_response.rb +210 -0
  109. data/lib/openapi_client/models/stream_params.rb +201 -0
  110. data/lib/openapi_client/models/subscription_response.rb +201 -0
  111. data/lib/openapi_client/models/success_rate_response.rb +183 -0
  112. data/lib/openapi_client/models/system_stats.rb +185 -0
  113. data/lib/openapi_client/models/system_stats_plan_breakdown_inner.rb +156 -0
  114. data/lib/openapi_client/models/system_status.rb +210 -0
  115. data/lib/openapi_client/models/system_status_components_inner.rb +184 -0
  116. data/lib/openapi_client/models/team.rb +165 -0
  117. data/lib/openapi_client/models/team_detail_response.rb +169 -0
  118. data/lib/openapi_client/models/team_invite.rb +174 -0
  119. data/lib/openapi_client/models/team_member.rb +193 -0
  120. data/lib/openapi_client/models/test_webhook_request.rb +199 -0
  121. data/lib/openapi_client/models/test_webhook_response.rb +174 -0
  122. data/lib/openapi_client/models/transform_rule.rb +201 -0
  123. data/lib/openapi_client/models/two_factor_required_response.rb +165 -0
  124. data/lib/openapi_client/models/update_endpoint_request.rb +278 -0
  125. data/lib/openapi_client/models/update_notification_preferences.rb +195 -0
  126. data/lib/openapi_client/models/update_profile_request.rb +190 -0
  127. data/lib/openapi_client/models/update_routing_request.rb +190 -0
  128. data/lib/openapi_client/models/upgrade_request.rb +209 -0
  129. data/lib/openapi_client/models/upgrade_response.rb +166 -0
  130. data/lib/openapi_client/models/usage_response.rb +201 -0
  131. data/lib/openapi_client/models/user_summary.rb +193 -0
  132. data/lib/openapi_client/models/validate_event_request.rb +164 -0
  133. data/lib/openapi_client/models/verify2fa_request.rb +208 -0
  134. data/lib/openapi_client/models/verify_email_request.rb +164 -0
  135. data/lib/openapi_client/models/webhook_template.rb +183 -0
  136. data/lib/openapi_client/version.rb +15 -0
  137. data/lib/openapi_client.rb +169 -0
  138. metadata +139 -10
  139. data/lib/hooksniff/client.rb +0 -213
  140. data/lib/hooksniff/errors.rb +0 -43
  141. data/lib/hooksniff/models.rb +0 -136
  142. data/lib/hooksniff/verification.rb +0 -134
  143. data/lib/hooksniff/version.rb +0 -5
  144. data/lib/hooksniff.rb +0 -19
@@ -0,0 +1,193 @@
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 HealthApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List endpoint health statuses
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [Array<EndpointHealth>]
25
+ def endpoint_health_get(opts = {})
26
+ data, _status_code, _headers = endpoint_health_get_with_http_info(opts)
27
+ data
28
+ end
29
+
30
+ # List endpoint health statuses
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(Array<EndpointHealth>, Integer, Hash)>] Array<EndpointHealth> data, response status code and response headers
33
+ def endpoint_health_get_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: HealthApi.endpoint_health_get ...'
36
+ end
37
+ # resource path
38
+ local_var_path = '/endpoint-health'
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<EndpointHealth>'
56
+
57
+ # auth_names
58
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
59
+
60
+ new_options = opts.merge(
61
+ :operation => :"HealthApi.endpoint_health_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: HealthApi#endpoint_health_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+
77
+ # Get specific endpoint health
78
+ # @param id [String]
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [EndpointHealth]
81
+ def endpoint_health_id_get(id, opts = {})
82
+ data, _status_code, _headers = endpoint_health_id_get_with_http_info(id, opts)
83
+ data
84
+ end
85
+
86
+ # Get specific endpoint health
87
+ # @param id [String]
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [Array<(EndpointHealth, Integer, Hash)>] EndpointHealth data, response status code and response headers
90
+ def endpoint_health_id_get_with_http_info(id, opts = {})
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug 'Calling API: HealthApi.endpoint_health_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 HealthApi.endpoint_health_id_get"
97
+ end
98
+ # resource path
99
+ local_var_path = '/endpoint-health/{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] || 'EndpointHealth'
117
+
118
+ # auth_names
119
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
120
+
121
+ new_options = opts.merge(
122
+ :operation => :"HealthApi.endpoint_health_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: HealthApi#endpoint_health_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
134
+ end
135
+ return data, status_code, headers
136
+ end
137
+
138
+ # System status (public)
139
+ # @param [Hash] opts the optional parameters
140
+ # @return [SystemStatus]
141
+ def status_get(opts = {})
142
+ data, _status_code, _headers = status_get_with_http_info(opts)
143
+ data
144
+ end
145
+
146
+ # System status (public)
147
+ # @param [Hash] opts the optional parameters
148
+ # @return [Array<(SystemStatus, Integer, Hash)>] SystemStatus data, response status code and response headers
149
+ def status_get_with_http_info(opts = {})
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug 'Calling API: HealthApi.status_get ...'
152
+ end
153
+ # resource path
154
+ local_var_path = '/status'
155
+
156
+ # query parameters
157
+ query_params = opts[:query_params] || {}
158
+
159
+ # header parameters
160
+ header_params = opts[:header_params] || {}
161
+ # HTTP header 'Accept' (if needed)
162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
163
+
164
+ # form parameters
165
+ form_params = opts[:form_params] || {}
166
+
167
+ # http body (model)
168
+ post_body = opts[:debug_body]
169
+
170
+ # return_type
171
+ return_type = opts[:debug_return_type] || 'SystemStatus'
172
+
173
+ # auth_names
174
+ auth_names = opts[:debug_auth_names] || []
175
+
176
+ new_options = opts.merge(
177
+ :operation => :"HealthApi.status_get",
178
+ :header_params => header_params,
179
+ :query_params => query_params,
180
+ :form_params => form_params,
181
+ :body => post_body,
182
+ :auth_names => auth_names,
183
+ :return_type => return_type
184
+ )
185
+
186
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
187
+ if @api_client.config.debugging
188
+ @api_client.config.logger.debug "API called: HealthApi#status_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
189
+ end
190
+ return data, status_code, headers
191
+ end
192
+ end
193
+ end
@@ -0,0 +1,170 @@
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 InboundApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Receive inbound webhook for a specific endpoint
23
+ # @param provider [String]
24
+ # @param endpoint_id [String]
25
+ # @param body [Object]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [nil]
28
+ def inbound_provider_endpoint_id_post(provider, endpoint_id, body, opts = {})
29
+ inbound_provider_endpoint_id_post_with_http_info(provider, endpoint_id, body, opts)
30
+ nil
31
+ end
32
+
33
+ # Receive inbound webhook for a specific endpoint
34
+ # @param provider [String]
35
+ # @param endpoint_id [String]
36
+ # @param body [Object]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def inbound_provider_endpoint_id_post_with_http_info(provider, endpoint_id, body, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: InboundApi.inbound_provider_endpoint_id_post ...'
42
+ end
43
+ # verify the required parameter 'provider' is set
44
+ if @api_client.config.client_side_validation && provider.nil?
45
+ fail ArgumentError, "Missing the required parameter 'provider' when calling InboundApi.inbound_provider_endpoint_id_post"
46
+ end
47
+ # verify the required parameter 'endpoint_id' is set
48
+ if @api_client.config.client_side_validation && endpoint_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling InboundApi.inbound_provider_endpoint_id_post"
50
+ end
51
+ # verify the required parameter 'body' is set
52
+ if @api_client.config.client_side_validation && body.nil?
53
+ fail ArgumentError, "Missing the required parameter 'body' when calling InboundApi.inbound_provider_endpoint_id_post"
54
+ end
55
+ # resource path
56
+ local_var_path = '/inbound/{provider}/{endpoint_id}'.sub('{provider}', CGI.escape(provider.to_s)).sub('{endpoint_id}', CGI.escape(endpoint_id.to_s))
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+
61
+ # header parameters
62
+ header_params = opts[:header_params] || {}
63
+ # HTTP header 'Content-Type'
64
+ content_type = @api_client.select_header_content_type(['application/json'])
65
+ if !content_type.nil?
66
+ header_params['Content-Type'] = content_type
67
+ end
68
+
69
+ # form parameters
70
+ form_params = opts[:form_params] || {}
71
+
72
+ # http body (model)
73
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
74
+
75
+ # return_type
76
+ return_type = opts[:debug_return_type]
77
+
78
+ # auth_names
79
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
80
+
81
+ new_options = opts.merge(
82
+ :operation => :"InboundApi.inbound_provider_endpoint_id_post",
83
+ :header_params => header_params,
84
+ :query_params => query_params,
85
+ :form_params => form_params,
86
+ :body => post_body,
87
+ :auth_names => auth_names,
88
+ :return_type => return_type
89
+ )
90
+
91
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug "API called: InboundApi#inbound_provider_endpoint_id_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
94
+ end
95
+ return data, status_code, headers
96
+ end
97
+
98
+ # Receive inbound webhook from a provider
99
+ # Accepts webhooks from external providers (Stripe, GitHub, etc.) and routes them to the customer's endpoints.
100
+ # @param provider [String]
101
+ # @param body [Object]
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [nil]
104
+ def inbound_provider_post(provider, body, opts = {})
105
+ inbound_provider_post_with_http_info(provider, body, opts)
106
+ nil
107
+ end
108
+
109
+ # Receive inbound webhook from a provider
110
+ # Accepts webhooks from external providers (Stripe, GitHub, etc.) and routes them to the customer&#39;s endpoints.
111
+ # @param provider [String]
112
+ # @param body [Object]
113
+ # @param [Hash] opts the optional parameters
114
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
115
+ def inbound_provider_post_with_http_info(provider, body, opts = {})
116
+ if @api_client.config.debugging
117
+ @api_client.config.logger.debug 'Calling API: InboundApi.inbound_provider_post ...'
118
+ end
119
+ # verify the required parameter 'provider' is set
120
+ if @api_client.config.client_side_validation && provider.nil?
121
+ fail ArgumentError, "Missing the required parameter 'provider' when calling InboundApi.inbound_provider_post"
122
+ end
123
+ # verify the required parameter 'body' is set
124
+ if @api_client.config.client_side_validation && body.nil?
125
+ fail ArgumentError, "Missing the required parameter 'body' when calling InboundApi.inbound_provider_post"
126
+ end
127
+ # resource path
128
+ local_var_path = '/inbound/{provider}'.sub('{provider}', CGI.escape(provider.to_s))
129
+
130
+ # query parameters
131
+ query_params = opts[:query_params] || {}
132
+
133
+ # header parameters
134
+ header_params = opts[:header_params] || {}
135
+ # HTTP header 'Content-Type'
136
+ content_type = @api_client.select_header_content_type(['application/json'])
137
+ if !content_type.nil?
138
+ header_params['Content-Type'] = content_type
139
+ end
140
+
141
+ # form parameters
142
+ form_params = opts[:form_params] || {}
143
+
144
+ # http body (model)
145
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
146
+
147
+ # return_type
148
+ return_type = opts[:debug_return_type]
149
+
150
+ # auth_names
151
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
152
+
153
+ new_options = opts.merge(
154
+ :operation => :"InboundApi.inbound_provider_post",
155
+ :header_params => header_params,
156
+ :query_params => query_params,
157
+ :form_params => form_params,
158
+ :body => post_body,
159
+ :auth_names => auth_names,
160
+ :return_type => return_type
161
+ )
162
+
163
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called: InboundApi#inbound_provider_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+ end
170
+ end
@@ -0,0 +1,309 @@
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 NotificationsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List notifications
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [Integer] :page
25
+ # @option opts [Integer] :per_page
26
+ # @return [NotificationListResponse]
27
+ def notifications_get(opts = {})
28
+ data, _status_code, _headers = notifications_get_with_http_info(opts)
29
+ data
30
+ end
31
+
32
+ # List notifications
33
+ # @param [Hash] opts the optional parameters
34
+ # @option opts [Integer] :page
35
+ # @option opts [Integer] :per_page
36
+ # @return [Array<(NotificationListResponse, Integer, Hash)>] NotificationListResponse data, response status code and response headers
37
+ def notifications_get_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_get ...'
40
+ end
41
+ # resource path
42
+ local_var_path = '/notifications'
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
47
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body]
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type] || 'NotificationListResponse'
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"NotificationsApi.notifications_get",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: NotificationsApi#notifications_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Delete notification
84
+ # @param id [String]
85
+ # @param [Hash] opts the optional parameters
86
+ # @return [nil]
87
+ def notifications_id_delete(id, opts = {})
88
+ notifications_id_delete_with_http_info(id, opts)
89
+ nil
90
+ end
91
+
92
+ # Delete notification
93
+ # @param id [String]
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
96
+ def notifications_id_delete_with_http_info(id, opts = {})
97
+ if @api_client.config.debugging
98
+ @api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_id_delete ...'
99
+ end
100
+ # verify the required parameter 'id' is set
101
+ if @api_client.config.client_side_validation && id.nil?
102
+ fail ArgumentError, "Missing the required parameter 'id' when calling NotificationsApi.notifications_id_delete"
103
+ end
104
+ # resource path
105
+ local_var_path = '/notifications/{id}'.sub('{id}', CGI.escape(id.to_s))
106
+
107
+ # query parameters
108
+ query_params = opts[:query_params] || {}
109
+
110
+ # header parameters
111
+ header_params = opts[:header_params] || {}
112
+
113
+ # form parameters
114
+ form_params = opts[:form_params] || {}
115
+
116
+ # http body (model)
117
+ post_body = opts[:debug_body]
118
+
119
+ # return_type
120
+ return_type = opts[:debug_return_type]
121
+
122
+ # auth_names
123
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
124
+
125
+ new_options = opts.merge(
126
+ :operation => :"NotificationsApi.notifications_id_delete",
127
+ :header_params => header_params,
128
+ :query_params => query_params,
129
+ :form_params => form_params,
130
+ :body => post_body,
131
+ :auth_names => auth_names,
132
+ :return_type => return_type
133
+ )
134
+
135
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
136
+ if @api_client.config.debugging
137
+ @api_client.config.logger.debug "API called: NotificationsApi#notifications_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
138
+ end
139
+ return data, status_code, headers
140
+ end
141
+
142
+ # Mark notification as read
143
+ # @param id [String]
144
+ # @param [Hash] opts the optional parameters
145
+ # @return [nil]
146
+ def notifications_id_read_put(id, opts = {})
147
+ notifications_id_read_put_with_http_info(id, opts)
148
+ nil
149
+ end
150
+
151
+ # Mark notification as read
152
+ # @param id [String]
153
+ # @param [Hash] opts the optional parameters
154
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
155
+ def notifications_id_read_put_with_http_info(id, opts = {})
156
+ if @api_client.config.debugging
157
+ @api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_id_read_put ...'
158
+ end
159
+ # verify the required parameter 'id' is set
160
+ if @api_client.config.client_side_validation && id.nil?
161
+ fail ArgumentError, "Missing the required parameter 'id' when calling NotificationsApi.notifications_id_read_put"
162
+ end
163
+ # resource path
164
+ local_var_path = '/notifications/{id}/read'.sub('{id}', CGI.escape(id.to_s))
165
+
166
+ # query parameters
167
+ query_params = opts[:query_params] || {}
168
+
169
+ # header parameters
170
+ header_params = opts[:header_params] || {}
171
+
172
+ # form parameters
173
+ form_params = opts[:form_params] || {}
174
+
175
+ # http body (model)
176
+ post_body = opts[:debug_body]
177
+
178
+ # return_type
179
+ return_type = opts[:debug_return_type]
180
+
181
+ # auth_names
182
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
183
+
184
+ new_options = opts.merge(
185
+ :operation => :"NotificationsApi.notifications_id_read_put",
186
+ :header_params => header_params,
187
+ :query_params => query_params,
188
+ :form_params => form_params,
189
+ :body => post_body,
190
+ :auth_names => auth_names,
191
+ :return_type => return_type
192
+ )
193
+
194
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: NotificationsApi#notifications_id_read_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ return data, status_code, headers
199
+ end
200
+
201
+ # Mark all notifications as read
202
+ # @param [Hash] opts the optional parameters
203
+ # @return [nil]
204
+ def notifications_read_all_put(opts = {})
205
+ notifications_read_all_put_with_http_info(opts)
206
+ nil
207
+ end
208
+
209
+ # Mark all notifications as read
210
+ # @param [Hash] opts the optional parameters
211
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
212
+ def notifications_read_all_put_with_http_info(opts = {})
213
+ if @api_client.config.debugging
214
+ @api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_read_all_put ...'
215
+ end
216
+ # resource path
217
+ local_var_path = '/notifications/read-all'
218
+
219
+ # query parameters
220
+ query_params = opts[:query_params] || {}
221
+
222
+ # header parameters
223
+ header_params = opts[:header_params] || {}
224
+
225
+ # form parameters
226
+ form_params = opts[:form_params] || {}
227
+
228
+ # http body (model)
229
+ post_body = opts[:debug_body]
230
+
231
+ # return_type
232
+ return_type = opts[:debug_return_type]
233
+
234
+ # auth_names
235
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
236
+
237
+ new_options = opts.merge(
238
+ :operation => :"NotificationsApi.notifications_read_all_put",
239
+ :header_params => header_params,
240
+ :query_params => query_params,
241
+ :form_params => form_params,
242
+ :body => post_body,
243
+ :auth_names => auth_names,
244
+ :return_type => return_type
245
+ )
246
+
247
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
248
+ if @api_client.config.debugging
249
+ @api_client.config.logger.debug "API called: NotificationsApi#notifications_read_all_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
250
+ end
251
+ return data, status_code, headers
252
+ end
253
+
254
+ # Get unread notification count
255
+ # @param [Hash] opts the optional parameters
256
+ # @return [NotificationsUnreadCountGet200Response]
257
+ def notifications_unread_count_get(opts = {})
258
+ data, _status_code, _headers = notifications_unread_count_get_with_http_info(opts)
259
+ data
260
+ end
261
+
262
+ # Get unread notification count
263
+ # @param [Hash] opts the optional parameters
264
+ # @return [Array<(NotificationsUnreadCountGet200Response, Integer, Hash)>] NotificationsUnreadCountGet200Response data, response status code and response headers
265
+ def notifications_unread_count_get_with_http_info(opts = {})
266
+ if @api_client.config.debugging
267
+ @api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_unread_count_get ...'
268
+ end
269
+ # resource path
270
+ local_var_path = '/notifications/unread-count'
271
+
272
+ # query parameters
273
+ query_params = opts[:query_params] || {}
274
+
275
+ # header parameters
276
+ header_params = opts[:header_params] || {}
277
+ # HTTP header 'Accept' (if needed)
278
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
279
+
280
+ # form parameters
281
+ form_params = opts[:form_params] || {}
282
+
283
+ # http body (model)
284
+ post_body = opts[:debug_body]
285
+
286
+ # return_type
287
+ return_type = opts[:debug_return_type] || 'NotificationsUnreadCountGet200Response'
288
+
289
+ # auth_names
290
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
291
+
292
+ new_options = opts.merge(
293
+ :operation => :"NotificationsApi.notifications_unread_count_get",
294
+ :header_params => header_params,
295
+ :query_params => query_params,
296
+ :form_params => form_params,
297
+ :body => post_body,
298
+ :auth_names => auth_names,
299
+ :return_type => return_type
300
+ )
301
+
302
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
303
+ if @api_client.config.debugging
304
+ @api_client.config.logger.debug "API called: NotificationsApi#notifications_unread_count_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
305
+ end
306
+ return data, status_code, headers
307
+ end
308
+ end
309
+ end