svix 1.24.0 → 1.25.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/Gemfile.lock +2 -2
- data/lib/svix/api/endpoint_api.rb +277 -2
- data/lib/svix/api/message_api.rb +218 -2
- data/lib/svix/api/streams_api.rb +185 -0
- data/lib/svix/api/transformation_template_api.rb +195 -24
- data/lib/svix/models/auth_token_out.rb +272 -0
- data/lib/svix/models/create_message_token_in.rb +250 -0
- data/lib/svix/models/create_stream_in.rb +225 -0
- data/lib/svix/models/endpoint_created_event_data.rb +1 -0
- data/lib/svix/models/endpoint_deleted_event_data.rb +1 -0
- data/lib/svix/models/endpoint_mtls_config_in.rb +15 -19
- data/lib/svix/models/endpoint_oauth_config_in.rb +13 -2
- data/lib/svix/models/endpoint_updated_event_data.rb +1 -0
- data/lib/svix/models/environment_settings_out.rb +15 -4
- data/lib/svix/models/event_in.rb +223 -0
- data/lib/svix/models/event_out.rb +223 -0
- data/lib/svix/models/event_type_from_open_api.rb +280 -0
- data/lib/svix/models/event_type_import_open_api_in.rb +13 -1
- data/lib/svix/models/event_type_import_open_api_out_data.rb +16 -4
- data/lib/svix/models/hubspot_oauth_config_in.rb +223 -0
- data/lib/svix/models/{oauth_payload_out.rb → incoming_webhook_payload_out.rb} +3 -3
- data/lib/svix/models/kafka_security_protocol_type.rb +38 -0
- data/lib/svix/models/list_response_event_out.rb +259 -0
- data/lib/svix/models/list_response_sink_out.rb +259 -0
- data/lib/svix/models/message_subscriber_auth_token_out.rb +237 -0
- data/lib/svix/models/{oauth_payload_in.rb → o_auth_payload_in.rb} +3 -3
- data/lib/svix/models/o_auth_payload_out.rb +239 -0
- data/lib/svix/models/{oauth2_grant_type.rb → oauth2_grant_type_in.rb} +4 -3
- data/lib/svix/models/settings_in.rb +15 -4
- data/lib/svix/models/settings_out.rb +15 -4
- data/lib/svix/models/sink_in.rb +107 -0
- data/lib/svix/models/sink_in_one_of.rb +285 -0
- data/lib/svix/models/sink_in_one_of1.rb +313 -0
- data/lib/svix/models/sink_in_one_of2.rb +321 -0
- data/lib/svix/models/sink_in_one_of3.rb +271 -0
- data/lib/svix/models/sink_out.rb +107 -0
- data/lib/svix/version.rb +1 -1
- metadata +24 -5
@@ -0,0 +1,185 @@
|
|
1
|
+
=begin
|
2
|
+
#Svix API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.1.1
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Svix
|
16
|
+
class StreamsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Append To Stream
|
23
|
+
# Creates streaming events.
|
24
|
+
# @param app_id [String] The app's ID or UID
|
25
|
+
# @param create_stream_in [CreateStreamIn]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
28
|
+
# @return [nil]
|
29
|
+
def append_to_stream(app_id, create_stream_in, opts = {})
|
30
|
+
append_to_stream_with_http_info(app_id, create_stream_in, opts)
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
|
34
|
+
# Append To Stream
|
35
|
+
# Creates streaming events.
|
36
|
+
# @param app_id [String] The app's ID or UID
|
37
|
+
# @param create_stream_in [CreateStreamIn]
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
40
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
41
|
+
def append_to_stream_with_http_info(app_id, create_stream_in, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: StreamsApi.append_to_stream ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'app_id' is set
|
46
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling StreamsApi.append_to_stream"
|
48
|
+
end
|
49
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
50
|
+
fail ArgumentError, 'invalid value for "app_id" when calling StreamsApi.append_to_stream, the character length must be smaller than or equal to 256.'
|
51
|
+
end
|
52
|
+
|
53
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
54
|
+
fail ArgumentError, 'invalid value for "app_id" when calling StreamsApi.append_to_stream, the character length must be great than or equal to 1.'
|
55
|
+
end
|
56
|
+
|
57
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
58
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
59
|
+
fail ArgumentError, "invalid value for 'app_id' when calling StreamsApi.append_to_stream, must conform to the pattern #{pattern}."
|
60
|
+
end
|
61
|
+
|
62
|
+
# verify the required parameter 'create_stream_in' is set
|
63
|
+
if @api_client.config.client_side_validation && create_stream_in.nil?
|
64
|
+
fail ArgumentError, "Missing the required parameter 'create_stream_in' when calling StreamsApi.append_to_stream"
|
65
|
+
end
|
66
|
+
# resource path
|
67
|
+
local_var_path = '/api/v1/app/{app_id}/stream'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
68
|
+
|
69
|
+
# query parameters
|
70
|
+
query_params = opts[:query_params] || {}
|
71
|
+
|
72
|
+
# header parameters
|
73
|
+
header_params = opts[:header_params] || {}
|
74
|
+
# HTTP header 'Accept' (if needed)
|
75
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
76
|
+
# HTTP header 'Content-Type'
|
77
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
78
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
79
|
+
|
80
|
+
# form parameters
|
81
|
+
form_params = opts[:form_params] || {}
|
82
|
+
|
83
|
+
# http body (model)
|
84
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_stream_in)
|
85
|
+
|
86
|
+
# return_type
|
87
|
+
return_type = opts[:debug_return_type]
|
88
|
+
|
89
|
+
# auth_names
|
90
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
91
|
+
|
92
|
+
new_options = opts.merge(
|
93
|
+
:operation => :"StreamsApi.append_to_stream",
|
94
|
+
:header_params => header_params,
|
95
|
+
:query_params => query_params,
|
96
|
+
:form_params => form_params,
|
97
|
+
:body => post_body,
|
98
|
+
:auth_names => auth_names,
|
99
|
+
:return_type => return_type
|
100
|
+
)
|
101
|
+
|
102
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
103
|
+
if @api_client.config.debugging
|
104
|
+
@api_client.config.logger.debug "API called: StreamsApi#append_to_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
105
|
+
end
|
106
|
+
return data, status_code, headers
|
107
|
+
end
|
108
|
+
|
109
|
+
# List Stream
|
110
|
+
# List streaming events.
|
111
|
+
# @param app_id [String] The app's ID or UID
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @return [ListResponseEventOut]
|
114
|
+
def list_stream(app_id, opts = {})
|
115
|
+
data, _status_code, _headers = list_stream_with_http_info(app_id, opts)
|
116
|
+
data
|
117
|
+
end
|
118
|
+
|
119
|
+
# List Stream
|
120
|
+
# List streaming events.
|
121
|
+
# @param app_id [String] The app's ID or UID
|
122
|
+
# @param [Hash] opts the optional parameters
|
123
|
+
# @return [Array<(ListResponseEventOut, Integer, Hash)>] ListResponseEventOut data, response status code and response headers
|
124
|
+
def list_stream_with_http_info(app_id, opts = {})
|
125
|
+
if @api_client.config.debugging
|
126
|
+
@api_client.config.logger.debug 'Calling API: StreamsApi.list_stream ...'
|
127
|
+
end
|
128
|
+
# verify the required parameter 'app_id' is set
|
129
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
130
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling StreamsApi.list_stream"
|
131
|
+
end
|
132
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
133
|
+
fail ArgumentError, 'invalid value for "app_id" when calling StreamsApi.list_stream, the character length must be smaller than or equal to 256.'
|
134
|
+
end
|
135
|
+
|
136
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
137
|
+
fail ArgumentError, 'invalid value for "app_id" when calling StreamsApi.list_stream, the character length must be great than or equal to 1.'
|
138
|
+
end
|
139
|
+
|
140
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
141
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
142
|
+
fail ArgumentError, "invalid value for 'app_id' when calling StreamsApi.list_stream, must conform to the pattern #{pattern}."
|
143
|
+
end
|
144
|
+
|
145
|
+
# resource path
|
146
|
+
local_var_path = '/api/v1/app/{app_id}/stream'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
147
|
+
|
148
|
+
# query parameters
|
149
|
+
query_params = opts[:query_params] || {}
|
150
|
+
|
151
|
+
# header parameters
|
152
|
+
header_params = opts[:header_params] || {}
|
153
|
+
# HTTP header 'Accept' (if needed)
|
154
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
155
|
+
|
156
|
+
# form parameters
|
157
|
+
form_params = opts[:form_params] || {}
|
158
|
+
|
159
|
+
# http body (model)
|
160
|
+
post_body = opts[:debug_body]
|
161
|
+
|
162
|
+
# return_type
|
163
|
+
return_type = opts[:debug_return_type] || 'ListResponseEventOut'
|
164
|
+
|
165
|
+
# auth_names
|
166
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
167
|
+
|
168
|
+
new_options = opts.merge(
|
169
|
+
:operation => :"StreamsApi.list_stream",
|
170
|
+
:header_params => header_params,
|
171
|
+
:query_params => query_params,
|
172
|
+
:form_params => form_params,
|
173
|
+
:body => post_body,
|
174
|
+
:auth_names => auth_names,
|
175
|
+
:return_type => return_type
|
176
|
+
)
|
177
|
+
|
178
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
179
|
+
if @api_client.config.debugging
|
180
|
+
@api_client.config.logger.debug "API called: StreamsApi#list_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
181
|
+
end
|
182
|
+
return data, status_code, headers
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
@@ -19,6 +19,109 @@ module Svix
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Update Hubspot Oauth Config
|
23
|
+
# Create/update endpoint Hubsport OAuth configuration Specific private endpoint just for us, to avoid exposing the Hubspot secret to the client.
|
24
|
+
# @param app_id [String] The app's ID or UID
|
25
|
+
# @param endpoint_id [String] The ep's ID or UID
|
26
|
+
# @param hubspot_oauth_config_in [HubspotOauthConfigIn]
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @return [nil]
|
29
|
+
def v1_endpoint_update_hubspot_oauth_config(app_id, endpoint_id, hubspot_oauth_config_in, opts = {})
|
30
|
+
v1_endpoint_update_hubspot_oauth_config_with_http_info(app_id, endpoint_id, hubspot_oauth_config_in, opts)
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
|
34
|
+
# Update Hubspot Oauth Config
|
35
|
+
# Create/update endpoint Hubsport OAuth configuration Specific private endpoint just for us, to avoid exposing the Hubspot secret to the client.
|
36
|
+
# @param app_id [String] The app's ID or UID
|
37
|
+
# @param endpoint_id [String] The ep's ID or UID
|
38
|
+
# @param hubspot_oauth_config_in [HubspotOauthConfigIn]
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
41
|
+
def v1_endpoint_update_hubspot_oauth_config_with_http_info(app_id, endpoint_id, hubspot_oauth_config_in, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'app_id' is set
|
46
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config"
|
48
|
+
end
|
49
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
50
|
+
fail ArgumentError, 'invalid value for "app_id" when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, the character length must be smaller than or equal to 256.'
|
51
|
+
end
|
52
|
+
|
53
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
54
|
+
fail ArgumentError, 'invalid value for "app_id" when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, the character length must be great than or equal to 1.'
|
55
|
+
end
|
56
|
+
|
57
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
58
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
59
|
+
fail ArgumentError, "invalid value for 'app_id' when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, must conform to the pattern #{pattern}."
|
60
|
+
end
|
61
|
+
|
62
|
+
# verify the required parameter 'endpoint_id' is set
|
63
|
+
if @api_client.config.client_side_validation && endpoint_id.nil?
|
64
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config"
|
65
|
+
end
|
66
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
|
67
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, the character length must be smaller than or equal to 256.'
|
68
|
+
end
|
69
|
+
|
70
|
+
if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
|
71
|
+
fail ArgumentError, 'invalid value for "endpoint_id" when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, the character length must be great than or equal to 1.'
|
72
|
+
end
|
73
|
+
|
74
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
75
|
+
if @api_client.config.client_side_validation && endpoint_id !~ pattern
|
76
|
+
fail ArgumentError, "invalid value for 'endpoint_id' when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, must conform to the pattern #{pattern}."
|
77
|
+
end
|
78
|
+
|
79
|
+
# verify the required parameter 'hubspot_oauth_config_in' is set
|
80
|
+
if @api_client.config.client_side_validation && hubspot_oauth_config_in.nil?
|
81
|
+
fail ArgumentError, "Missing the required parameter 'hubspot_oauth_config_in' when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config"
|
82
|
+
end
|
83
|
+
# resource path
|
84
|
+
local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation-template/oauth/hubspot'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
85
|
+
|
86
|
+
# query parameters
|
87
|
+
query_params = opts[:query_params] || {}
|
88
|
+
|
89
|
+
# header parameters
|
90
|
+
header_params = opts[:header_params] || {}
|
91
|
+
# HTTP header 'Accept' (if needed)
|
92
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
93
|
+
# HTTP header 'Content-Type'
|
94
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
95
|
+
|
96
|
+
# form parameters
|
97
|
+
form_params = opts[:form_params] || {}
|
98
|
+
|
99
|
+
# http body (model)
|
100
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(hubspot_oauth_config_in)
|
101
|
+
|
102
|
+
# return_type
|
103
|
+
return_type = opts[:debug_return_type]
|
104
|
+
|
105
|
+
# auth_names
|
106
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
107
|
+
|
108
|
+
new_options = opts.merge(
|
109
|
+
:operation => :"TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config",
|
110
|
+
:header_params => header_params,
|
111
|
+
:query_params => query_params,
|
112
|
+
:form_params => form_params,
|
113
|
+
:body => post_body,
|
114
|
+
:auth_names => auth_names,
|
115
|
+
:return_type => return_type
|
116
|
+
)
|
117
|
+
|
118
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
119
|
+
if @api_client.config.debugging
|
120
|
+
@api_client.config.logger.debug "API called: TransformationTemplateApi#v1_endpoint_update_hubspot_oauth_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
121
|
+
end
|
122
|
+
return data, status_code, headers
|
123
|
+
end
|
124
|
+
|
22
125
|
# Create Transformation Template
|
23
126
|
# Create a new transformation template
|
24
127
|
# @param template_in [TemplateIn]
|
@@ -357,28 +460,28 @@ module Svix
|
|
357
460
|
|
358
461
|
# Authorize Discord
|
359
462
|
# Get Discord Incoming webhook URL
|
360
|
-
# @param
|
463
|
+
# @param o_auth_payload_in [OAuthPayloadIn]
|
361
464
|
# @param [Hash] opts the optional parameters
|
362
465
|
# @option opts [String] :idempotency_key The request's idempotency key
|
363
|
-
# @return [
|
364
|
-
def v1_transformation_template_oauth_discord(
|
365
|
-
data, _status_code, _headers = v1_transformation_template_oauth_discord_with_http_info(
|
466
|
+
# @return [IncomingWebhookPayloadOut]
|
467
|
+
def v1_transformation_template_oauth_discord(o_auth_payload_in, opts = {})
|
468
|
+
data, _status_code, _headers = v1_transformation_template_oauth_discord_with_http_info(o_auth_payload_in, opts)
|
366
469
|
data
|
367
470
|
end
|
368
471
|
|
369
472
|
# Authorize Discord
|
370
473
|
# Get Discord Incoming webhook URL
|
371
|
-
# @param
|
474
|
+
# @param o_auth_payload_in [OAuthPayloadIn]
|
372
475
|
# @param [Hash] opts the optional parameters
|
373
476
|
# @option opts [String] :idempotency_key The request's idempotency key
|
374
|
-
# @return [Array<(
|
375
|
-
def v1_transformation_template_oauth_discord_with_http_info(
|
477
|
+
# @return [Array<(IncomingWebhookPayloadOut, Integer, Hash)>] IncomingWebhookPayloadOut data, response status code and response headers
|
478
|
+
def v1_transformation_template_oauth_discord_with_http_info(o_auth_payload_in, opts = {})
|
376
479
|
if @api_client.config.debugging
|
377
480
|
@api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_oauth_discord ...'
|
378
481
|
end
|
379
|
-
# verify the required parameter '
|
380
|
-
if @api_client.config.client_side_validation &&
|
381
|
-
fail ArgumentError, "Missing the required parameter '
|
482
|
+
# verify the required parameter 'o_auth_payload_in' is set
|
483
|
+
if @api_client.config.client_side_validation && o_auth_payload_in.nil?
|
484
|
+
fail ArgumentError, "Missing the required parameter 'o_auth_payload_in' when calling TransformationTemplateApi.v1_transformation_template_oauth_discord"
|
382
485
|
end
|
383
486
|
# resource path
|
384
487
|
local_var_path = '/api/v1/transformation-template/oauth/discord'
|
@@ -398,10 +501,10 @@ module Svix
|
|
398
501
|
form_params = opts[:form_params] || {}
|
399
502
|
|
400
503
|
# http body (model)
|
401
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
504
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth_payload_in)
|
402
505
|
|
403
506
|
# return_type
|
404
|
-
return_type = opts[:debug_return_type] || '
|
507
|
+
return_type = opts[:debug_return_type] || 'IncomingWebhookPayloadOut'
|
405
508
|
|
406
509
|
# auth_names
|
407
510
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
@@ -423,30 +526,98 @@ module Svix
|
|
423
526
|
return data, status_code, headers
|
424
527
|
end
|
425
528
|
|
529
|
+
# Authorize Hubspot
|
530
|
+
# Get Hubspot access token using authorization code
|
531
|
+
# @param o_auth_payload_in [OAuthPayloadIn]
|
532
|
+
# @param [Hash] opts the optional parameters
|
533
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
534
|
+
# @return [OAuthPayloadOut]
|
535
|
+
def v1_transformation_template_oauth_hubspot(o_auth_payload_in, opts = {})
|
536
|
+
data, _status_code, _headers = v1_transformation_template_oauth_hubspot_with_http_info(o_auth_payload_in, opts)
|
537
|
+
data
|
538
|
+
end
|
539
|
+
|
540
|
+
# Authorize Hubspot
|
541
|
+
# Get Hubspot access token using authorization code
|
542
|
+
# @param o_auth_payload_in [OAuthPayloadIn]
|
543
|
+
# @param [Hash] opts the optional parameters
|
544
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
545
|
+
# @return [Array<(OAuthPayloadOut, Integer, Hash)>] OAuthPayloadOut data, response status code and response headers
|
546
|
+
def v1_transformation_template_oauth_hubspot_with_http_info(o_auth_payload_in, opts = {})
|
547
|
+
if @api_client.config.debugging
|
548
|
+
@api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_oauth_hubspot ...'
|
549
|
+
end
|
550
|
+
# verify the required parameter 'o_auth_payload_in' is set
|
551
|
+
if @api_client.config.client_side_validation && o_auth_payload_in.nil?
|
552
|
+
fail ArgumentError, "Missing the required parameter 'o_auth_payload_in' when calling TransformationTemplateApi.v1_transformation_template_oauth_hubspot"
|
553
|
+
end
|
554
|
+
# resource path
|
555
|
+
local_var_path = '/api/v1/transformation-template/oauth/hubspot'
|
556
|
+
|
557
|
+
# query parameters
|
558
|
+
query_params = opts[:query_params] || {}
|
559
|
+
|
560
|
+
# header parameters
|
561
|
+
header_params = opts[:header_params] || {}
|
562
|
+
# HTTP header 'Accept' (if needed)
|
563
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
564
|
+
# HTTP header 'Content-Type'
|
565
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
566
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
567
|
+
|
568
|
+
# form parameters
|
569
|
+
form_params = opts[:form_params] || {}
|
570
|
+
|
571
|
+
# http body (model)
|
572
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth_payload_in)
|
573
|
+
|
574
|
+
# return_type
|
575
|
+
return_type = opts[:debug_return_type] || 'OAuthPayloadOut'
|
576
|
+
|
577
|
+
# auth_names
|
578
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
579
|
+
|
580
|
+
new_options = opts.merge(
|
581
|
+
:operation => :"TransformationTemplateApi.v1_transformation_template_oauth_hubspot",
|
582
|
+
:header_params => header_params,
|
583
|
+
:query_params => query_params,
|
584
|
+
:form_params => form_params,
|
585
|
+
:body => post_body,
|
586
|
+
:auth_names => auth_names,
|
587
|
+
:return_type => return_type
|
588
|
+
)
|
589
|
+
|
590
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
591
|
+
if @api_client.config.debugging
|
592
|
+
@api_client.config.logger.debug "API called: TransformationTemplateApi#v1_transformation_template_oauth_hubspot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
593
|
+
end
|
594
|
+
return data, status_code, headers
|
595
|
+
end
|
596
|
+
|
426
597
|
# Authorize Slack
|
427
598
|
# Get Slack Incoming webhook URL
|
428
|
-
# @param
|
599
|
+
# @param o_auth_payload_in [OAuthPayloadIn]
|
429
600
|
# @param [Hash] opts the optional parameters
|
430
601
|
# @option opts [String] :idempotency_key The request's idempotency key
|
431
|
-
# @return [
|
432
|
-
def v1_transformation_template_oauth_slack(
|
433
|
-
data, _status_code, _headers = v1_transformation_template_oauth_slack_with_http_info(
|
602
|
+
# @return [IncomingWebhookPayloadOut]
|
603
|
+
def v1_transformation_template_oauth_slack(o_auth_payload_in, opts = {})
|
604
|
+
data, _status_code, _headers = v1_transformation_template_oauth_slack_with_http_info(o_auth_payload_in, opts)
|
434
605
|
data
|
435
606
|
end
|
436
607
|
|
437
608
|
# Authorize Slack
|
438
609
|
# Get Slack Incoming webhook URL
|
439
|
-
# @param
|
610
|
+
# @param o_auth_payload_in [OAuthPayloadIn]
|
440
611
|
# @param [Hash] opts the optional parameters
|
441
612
|
# @option opts [String] :idempotency_key The request's idempotency key
|
442
|
-
# @return [Array<(
|
443
|
-
def v1_transformation_template_oauth_slack_with_http_info(
|
613
|
+
# @return [Array<(IncomingWebhookPayloadOut, Integer, Hash)>] IncomingWebhookPayloadOut data, response status code and response headers
|
614
|
+
def v1_transformation_template_oauth_slack_with_http_info(o_auth_payload_in, opts = {})
|
444
615
|
if @api_client.config.debugging
|
445
616
|
@api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_oauth_slack ...'
|
446
617
|
end
|
447
|
-
# verify the required parameter '
|
448
|
-
if @api_client.config.client_side_validation &&
|
449
|
-
fail ArgumentError, "Missing the required parameter '
|
618
|
+
# verify the required parameter 'o_auth_payload_in' is set
|
619
|
+
if @api_client.config.client_side_validation && o_auth_payload_in.nil?
|
620
|
+
fail ArgumentError, "Missing the required parameter 'o_auth_payload_in' when calling TransformationTemplateApi.v1_transformation_template_oauth_slack"
|
450
621
|
end
|
451
622
|
# resource path
|
452
623
|
local_var_path = '/api/v1/transformation-template/oauth/slack'
|
@@ -466,10 +637,10 @@ module Svix
|
|
466
637
|
form_params = opts[:form_params] || {}
|
467
638
|
|
468
639
|
# http body (model)
|
469
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
640
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth_payload_in)
|
470
641
|
|
471
642
|
# return_type
|
472
|
-
return_type = opts[:debug_return_type] || '
|
643
|
+
return_type = opts[:debug_return_type] || 'IncomingWebhookPayloadOut'
|
473
644
|
|
474
645
|
# auth_names
|
475
646
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|