svix 1.20.0 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -2
- data/lib/svix/api/application_api.rb +8 -8
- data/lib/svix/api/authentication_api.rb +5 -5
- data/lib/svix/api/background_tasks_api.rb +2 -2
- data/lib/svix/api/broadcast_api.rb +1 -1
- data/lib/svix/api/endpoint_api.rb +18 -18
- data/lib/svix/api/environment_api.rb +3 -3
- data/lib/svix/api/environment_settings_api.rb +1 -1
- data/lib/svix/api/event_type_api.rb +13 -13
- data/lib/svix/api/events_api.rb +99 -0
- data/lib/svix/api/health_api.rb +1 -1
- data/lib/svix/api/inbound_api.rb +2 -2
- data/lib/svix/api/integration_api.rb +10 -7
- data/lib/svix/api/message_api.rb +7 -7
- data/lib/svix/api/message_attempt_api.rb +10 -10
- data/lib/svix/api/statistics_api.rb +4 -4
- data/lib/svix/api/transformation_template_api.rb +2 -2
- data/lib/svix/models/app_portal_access_in.rb +16 -5
- data/lib/svix/models/client_secret_jwt_params_in.rb +272 -0
- data/lib/svix/models/custom_color_palette.rb +9 -0
- data/lib/svix/models/endpoint_oauth_config_in.rb +284 -0
- data/lib/svix/models/environment_settings_out.rb +16 -4
- data/lib/svix/models/oauth2_auth_method_in.rb +38 -0
- data/lib/svix/models/oauth2_grant_type.rb +36 -0
- data/lib/svix/models/oauth_jws_signing_algorithm.rb +36 -0
- data/lib/svix/models/settings_in.rb +16 -4
- data/lib/svix/models/settings_out.rb +16 -4
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +3 -0
- data/svix.gemspec +0 -1
- metadata +8 -16
@@ -64,7 +64,7 @@ module Svix
|
|
64
64
|
fail ArgumentError, "Missing the required parameter 'integration_in' when calling IntegrationApi.v1_integration_create"
|
65
65
|
end
|
66
66
|
# resource path
|
67
|
-
local_var_path = '/api/v1/app/{app_id}/integration
|
67
|
+
local_var_path = '/api/v1/app/{app_id}/integration'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
68
68
|
|
69
69
|
# query parameters
|
70
70
|
query_params = opts[:query_params] || {}
|
@@ -149,7 +149,7 @@ module Svix
|
|
149
149
|
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_delete"
|
150
150
|
end
|
151
151
|
# resource path
|
152
|
-
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}
|
152
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
|
153
153
|
|
154
154
|
# query parameters
|
155
155
|
query_params = opts[:query_params] || {}
|
@@ -231,7 +231,7 @@ module Svix
|
|
231
231
|
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_get"
|
232
232
|
end
|
233
233
|
# resource path
|
234
|
-
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}
|
234
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
|
235
235
|
|
236
236
|
# query parameters
|
237
237
|
query_params = opts[:query_params] || {}
|
@@ -313,7 +313,7 @@ module Svix
|
|
313
313
|
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_get_key"
|
314
314
|
end
|
315
315
|
# resource path
|
316
|
-
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key
|
316
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
|
317
317
|
|
318
318
|
# query parameters
|
319
319
|
query_params = opts[:query_params] || {}
|
@@ -358,6 +358,7 @@ module Svix
|
|
358
358
|
# @param [Hash] opts the optional parameters
|
359
359
|
# @option opts [Integer] :limit Limit the number of returned items
|
360
360
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
361
|
+
# @option opts [Ordering] :order The sorting order of the returned items
|
361
362
|
# @return [ListResponseIntegrationOut]
|
362
363
|
def v1_integration_list(app_id, opts = {})
|
363
364
|
data, _status_code, _headers = v1_integration_list_with_http_info(app_id, opts)
|
@@ -370,6 +371,7 @@ module Svix
|
|
370
371
|
# @param [Hash] opts the optional parameters
|
371
372
|
# @option opts [Integer] :limit Limit the number of returned items
|
372
373
|
# @option opts [String] :iterator The iterator returned from a prior invocation
|
374
|
+
# @option opts [Ordering] :order The sorting order of the returned items
|
373
375
|
# @return [Array<(ListResponseIntegrationOut, Integer, Hash)>] ListResponseIntegrationOut data, response status code and response headers
|
374
376
|
def v1_integration_list_with_http_info(app_id, opts = {})
|
375
377
|
if @api_client.config.debugging
|
@@ -401,12 +403,13 @@ module Svix
|
|
401
403
|
end
|
402
404
|
|
403
405
|
# resource path
|
404
|
-
local_var_path = '/api/v1/app/{app_id}/integration
|
406
|
+
local_var_path = '/api/v1/app/{app_id}/integration'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
405
407
|
|
406
408
|
# query parameters
|
407
409
|
query_params = opts[:query_params] || {}
|
408
410
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
409
411
|
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
412
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
410
413
|
|
411
414
|
# header parameters
|
412
415
|
header_params = opts[:header_params] || {}
|
@@ -487,7 +490,7 @@ module Svix
|
|
487
490
|
fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_rotate_key"
|
488
491
|
end
|
489
492
|
# resource path
|
490
|
-
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/rotate
|
493
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/rotate'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
|
491
494
|
|
492
495
|
# query parameters
|
493
496
|
query_params = opts[:query_params] || {}
|
@@ -576,7 +579,7 @@ module Svix
|
|
576
579
|
fail ArgumentError, "Missing the required parameter 'integration_update' when calling IntegrationApi.v1_integration_update"
|
577
580
|
end
|
578
581
|
# resource path
|
579
|
-
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}
|
582
|
+
local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
|
580
583
|
|
581
584
|
# query parameters
|
582
585
|
query_params = opts[:query_params] || {}
|
data/lib/svix/api/message_api.rb
CHANGED
@@ -83,7 +83,7 @@ module Svix
|
|
83
83
|
fail ArgumentError, "Missing the required parameter 'message_in' when calling MessageApi.create_message_attempt_for_endpoint"
|
84
84
|
end
|
85
85
|
# resource path
|
86
|
-
local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt
|
86
|
+
local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
87
87
|
|
88
88
|
# query parameters
|
89
89
|
query_params = opts[:query_params] || {}
|
@@ -172,7 +172,7 @@ module Svix
|
|
172
172
|
fail ArgumentError, "Missing the required parameter 'message_in' when calling MessageApi.v1_message_create"
|
173
173
|
end
|
174
174
|
# resource path
|
175
|
-
local_var_path = '/api/v1/app/{app_id}/msg
|
175
|
+
local_var_path = '/api/v1/app/{app_id}/msg'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
176
176
|
|
177
177
|
# query parameters
|
178
178
|
query_params = opts[:query_params] || {}
|
@@ -271,7 +271,7 @@ module Svix
|
|
271
271
|
end
|
272
272
|
|
273
273
|
# resource path
|
274
|
-
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/content
|
274
|
+
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/content'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
|
275
275
|
|
276
276
|
# query parameters
|
277
277
|
query_params = opts[:query_params] || {}
|
@@ -368,7 +368,7 @@ module Svix
|
|
368
368
|
end
|
369
369
|
|
370
370
|
# resource path
|
371
|
-
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}
|
371
|
+
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
|
372
372
|
|
373
373
|
# query parameters
|
374
374
|
query_params = opts[:query_params] || {}
|
@@ -464,7 +464,7 @@ module Svix
|
|
464
464
|
end
|
465
465
|
|
466
466
|
# resource path
|
467
|
-
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/raw
|
467
|
+
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/raw'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
|
468
468
|
|
469
469
|
# query parameters
|
470
470
|
query_params = opts[:query_params] || {}
|
@@ -582,7 +582,7 @@ module Svix
|
|
582
582
|
end
|
583
583
|
|
584
584
|
# resource path
|
585
|
-
local_var_path = '/api/v1/app/{app_id}/msg
|
585
|
+
local_var_path = '/api/v1/app/{app_id}/msg'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
586
586
|
|
587
587
|
# query parameters
|
588
588
|
query_params = opts[:query_params] || {}
|
@@ -682,7 +682,7 @@ module Svix
|
|
682
682
|
end
|
683
683
|
|
684
684
|
# resource path
|
685
|
-
local_var_path = '/api/v1/app/{app_id}/events
|
685
|
+
local_var_path = '/api/v1/app/{app_id}/events'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
686
686
|
|
687
687
|
# query parameters
|
688
688
|
query_params = opts[:query_params] || {}
|
@@ -81,7 +81,7 @@ module Svix
|
|
81
81
|
fail ArgumentError, "Missing the required parameter 'attempt_id' when calling MessageAttemptApi.v1_message_attempt_expunge_content"
|
82
82
|
end
|
83
83
|
# resource path
|
84
|
-
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content
|
84
|
+
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s)).sub('{' + 'attempt_id' + '}', CGI.escape(attempt_id.to_s))
|
85
85
|
|
86
86
|
# query parameters
|
87
87
|
query_params = opts[:query_params] || {}
|
@@ -182,7 +182,7 @@ module Svix
|
|
182
182
|
fail ArgumentError, "Missing the required parameter 'attempt_id' when calling MessageAttemptApi.v1_message_attempt_get"
|
183
183
|
end
|
184
184
|
# resource path
|
185
|
-
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}
|
185
|
+
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s)).sub('{' + 'attempt_id' + '}', CGI.escape(attempt_id.to_s))
|
186
186
|
|
187
187
|
# query parameters
|
188
188
|
query_params = opts[:query_params] || {}
|
@@ -283,7 +283,7 @@ module Svix
|
|
283
283
|
fail ArgumentError, "Missing the required parameter 'attempt_id' when calling MessageAttemptApi.v1_message_attempt_get_headers"
|
284
284
|
end
|
285
285
|
# resource path
|
286
|
-
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers
|
286
|
+
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s)).sub('{' + 'attempt_id' + '}', CGI.escape(attempt_id.to_s))
|
287
287
|
|
288
288
|
# query parameters
|
289
289
|
query_params = opts[:query_params] || {}
|
@@ -390,7 +390,7 @@ module Svix
|
|
390
390
|
end
|
391
391
|
|
392
392
|
# resource path
|
393
|
-
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/endpoint
|
393
|
+
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/endpoint'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
|
394
394
|
|
395
395
|
# query parameters
|
396
396
|
query_params = opts[:query_params] || {}
|
@@ -531,7 +531,7 @@ module Svix
|
|
531
531
|
end
|
532
532
|
|
533
533
|
# resource path
|
534
|
-
local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg
|
534
|
+
local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
535
535
|
|
536
536
|
# query parameters
|
537
537
|
query_params = opts[:query_params] || {}
|
@@ -683,7 +683,7 @@ module Svix
|
|
683
683
|
end
|
684
684
|
|
685
685
|
# resource path
|
686
|
-
local_var_path = '/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}
|
686
|
+
local_var_path = '/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
687
687
|
|
688
688
|
# query parameters
|
689
689
|
query_params = opts[:query_params] || {}
|
@@ -850,7 +850,7 @@ module Svix
|
|
850
850
|
end
|
851
851
|
|
852
852
|
# resource path
|
853
|
-
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt
|
853
|
+
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
854
854
|
|
855
855
|
# query parameters
|
856
856
|
query_params = opts[:query_params] || {}
|
@@ -1014,7 +1014,7 @@ module Svix
|
|
1014
1014
|
end
|
1015
1015
|
|
1016
1016
|
# resource path
|
1017
|
-
local_var_path = '/api/v1/app/{app_id}/attempt/msg/{msg_id}
|
1017
|
+
local_var_path = '/api/v1/app/{app_id}/attempt/msg/{msg_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
|
1018
1018
|
|
1019
1019
|
# query parameters
|
1020
1020
|
query_params = opts[:query_params] || {}
|
@@ -1179,7 +1179,7 @@ module Svix
|
|
1179
1179
|
end
|
1180
1180
|
|
1181
1181
|
# resource path
|
1182
|
-
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/attempt
|
1182
|
+
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/attempt'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
|
1183
1183
|
|
1184
1184
|
# query parameters
|
1185
1185
|
query_params = opts[:query_params] || {}
|
@@ -1305,7 +1305,7 @@ module Svix
|
|
1305
1305
|
end
|
1306
1306
|
|
1307
1307
|
# resource path
|
1308
|
-
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend
|
1308
|
+
local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
1309
1309
|
|
1310
1310
|
# query parameters
|
1311
1311
|
query_params = opts[:query_params] || {}
|
@@ -45,7 +45,7 @@ module Svix
|
|
45
45
|
fail ArgumentError, "Missing the required parameter 'app_usage_stats_in' when calling StatisticsApi.v1_statistics_aggregate_app_stats"
|
46
46
|
end
|
47
47
|
# resource path
|
48
|
-
local_var_path = '/api/v1/stats/usage/app
|
48
|
+
local_var_path = '/api/v1/stats/usage/app'
|
49
49
|
|
50
50
|
# query parameters
|
51
51
|
query_params = opts[:query_params] || {}
|
@@ -105,7 +105,7 @@ module Svix
|
|
105
105
|
@api_client.config.logger.debug 'Calling API: StatisticsApi.v1_statistics_aggregate_event_types ...'
|
106
106
|
end
|
107
107
|
# resource path
|
108
|
-
local_var_path = '/api/v1/stats/usage/event-types
|
108
|
+
local_var_path = '/api/v1/stats/usage/event-types'
|
109
109
|
|
110
110
|
# query parameters
|
111
111
|
query_params = opts[:query_params] || {}
|
@@ -185,7 +185,7 @@ module Svix
|
|
185
185
|
end
|
186
186
|
|
187
187
|
# resource path
|
188
|
-
local_var_path = '/api/v1/stats/app/{app_id}/attempt
|
188
|
+
local_var_path = '/api/v1/stats/app/{app_id}/attempt'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
189
189
|
|
190
190
|
# query parameters
|
191
191
|
query_params = opts[:query_params] || {}
|
@@ -286,7 +286,7 @@ module Svix
|
|
286
286
|
end
|
287
287
|
|
288
288
|
# resource path
|
289
|
-
local_var_path = '/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt
|
289
|
+
local_var_path = '/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
|
290
290
|
|
291
291
|
# query parameters
|
292
292
|
query_params = opts[:query_params] || {}
|
@@ -45,7 +45,7 @@ module Svix
|
|
45
45
|
fail ArgumentError, "Missing the required parameter 'template_in' when calling TransformationTemplateApi.v1_transformation_template_create"
|
46
46
|
end
|
47
47
|
# resource path
|
48
|
-
local_var_path = '/api/v1/transformation-template
|
48
|
+
local_var_path = '/api/v1/transformation-template'
|
49
49
|
|
50
50
|
# query parameters
|
51
51
|
query_params = opts[:query_params] || {}
|
@@ -313,7 +313,7 @@ module Svix
|
|
313
313
|
end
|
314
314
|
|
315
315
|
# resource path
|
316
|
-
local_var_path = '/api/v1/transformation-template
|
316
|
+
local_var_path = '/api/v1/transformation-template'
|
317
317
|
|
318
318
|
# query parameters
|
319
319
|
query_params = opts[:query_params] || {}
|
@@ -15,17 +15,21 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Svix
|
17
17
|
class AppPortalAccessIn
|
18
|
-
# How long the token will be valid for, in seconds.
|
18
|
+
# How long the token will be valid for, in seconds. Valid values are between 1 hour and 7 days. The default is 7 days.
|
19
19
|
attr_accessor :expiry
|
20
20
|
|
21
21
|
# The set of feature flags the created token will have access to.
|
22
22
|
attr_accessor :feature_flags
|
23
23
|
|
24
|
+
# Whether the app portal should be in read-only mode.
|
25
|
+
attr_accessor :read_only
|
26
|
+
|
24
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
28
|
def self.attribute_map
|
26
29
|
{
|
27
30
|
:'expiry' => :'expiry',
|
28
|
-
:'feature_flags' => :'featureFlags'
|
31
|
+
:'feature_flags' => :'featureFlags',
|
32
|
+
:'read_only' => :'readOnly'
|
29
33
|
}
|
30
34
|
end
|
31
35
|
|
@@ -38,7 +42,8 @@ module Svix
|
|
38
42
|
def self.openapi_types
|
39
43
|
{
|
40
44
|
:'expiry' => :'Integer',
|
41
|
-
:'feature_flags' => :'Array<String>'
|
45
|
+
:'feature_flags' => :'Array<String>',
|
46
|
+
:'read_only' => :'Boolean'
|
42
47
|
}
|
43
48
|
end
|
44
49
|
|
@@ -46,6 +51,7 @@ module Svix
|
|
46
51
|
def self.openapi_nullable
|
47
52
|
Set.new([
|
48
53
|
:'expiry',
|
54
|
+
:'read_only'
|
49
55
|
])
|
50
56
|
end
|
51
57
|
|
@@ -75,6 +81,10 @@ module Svix
|
|
75
81
|
self.feature_flags = value
|
76
82
|
end
|
77
83
|
end
|
84
|
+
|
85
|
+
if attributes.key?(:'read_only')
|
86
|
+
self.read_only = attributes[:'read_only']
|
87
|
+
end
|
78
88
|
end
|
79
89
|
|
80
90
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -126,7 +136,8 @@ module Svix
|
|
126
136
|
return true if self.equal?(o)
|
127
137
|
self.class == o.class &&
|
128
138
|
expiry == o.expiry &&
|
129
|
-
feature_flags == o.feature_flags
|
139
|
+
feature_flags == o.feature_flags &&
|
140
|
+
read_only == o.read_only
|
130
141
|
end
|
131
142
|
|
132
143
|
# @see the `==` method
|
@@ -138,7 +149,7 @@ module Svix
|
|
138
149
|
# Calculates hash code according to all attributes.
|
139
150
|
# @return [Integer] Hash code
|
140
151
|
def hash
|
141
|
-
[expiry, feature_flags].hash
|
152
|
+
[expiry, feature_flags, read_only].hash
|
142
153
|
end
|
143
154
|
|
144
155
|
# Builds the object from hash
|
@@ -0,0 +1,272 @@
|
|
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 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Svix
|
17
|
+
class ClientSecretJwtParamsIn
|
18
|
+
attr_accessor :secret_base64
|
19
|
+
|
20
|
+
attr_accessor :secret_id
|
21
|
+
|
22
|
+
attr_accessor :signing_algorithm
|
23
|
+
|
24
|
+
attr_accessor :token_expiry_secs
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'secret_base64' => :'secretBase64',
|
30
|
+
:'secret_id' => :'secretId',
|
31
|
+
:'signing_algorithm' => :'signingAlgorithm',
|
32
|
+
:'token_expiry_secs' => :'tokenExpirySecs'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'secret_base64' => :'String',
|
45
|
+
:'secret_id' => :'String',
|
46
|
+
:'signing_algorithm' => :'OauthJwsSigningAlgorithm',
|
47
|
+
:'token_expiry_secs' => :'Integer'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
:'secret_id',
|
55
|
+
:'token_expiry_secs'
|
56
|
+
])
|
57
|
+
end
|
58
|
+
|
59
|
+
# Initializes the object
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
61
|
+
def initialize(attributes = {})
|
62
|
+
if (!attributes.is_a?(Hash))
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::ClientSecretJwtParamsIn` initialize method"
|
64
|
+
end
|
65
|
+
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
68
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::ClientSecretJwtParamsIn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
70
|
+
end
|
71
|
+
h[k.to_sym] = v
|
72
|
+
}
|
73
|
+
|
74
|
+
if attributes.key?(:'secret_base64')
|
75
|
+
self.secret_base64 = attributes[:'secret_base64']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'secret_id')
|
79
|
+
self.secret_id = attributes[:'secret_id']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'signing_algorithm')
|
83
|
+
self.signing_algorithm = attributes[:'signing_algorithm']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'token_expiry_secs')
|
87
|
+
self.token_expiry_secs = attributes[:'token_expiry_secs']
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
92
|
+
# @return Array for valid properties with the reasons
|
93
|
+
def list_invalid_properties
|
94
|
+
invalid_properties = Array.new
|
95
|
+
if @secret_base64.nil?
|
96
|
+
invalid_properties.push('invalid value for "secret_base64", secret_base64 cannot be nil.')
|
97
|
+
end
|
98
|
+
|
99
|
+
if @signing_algorithm.nil?
|
100
|
+
invalid_properties.push('invalid value for "signing_algorithm", signing_algorithm cannot be nil.')
|
101
|
+
end
|
102
|
+
|
103
|
+
if !@token_expiry_secs.nil? && @token_expiry_secs < 0
|
104
|
+
invalid_properties.push('invalid value for "token_expiry_secs", must be greater than or equal to 0.')
|
105
|
+
end
|
106
|
+
|
107
|
+
invalid_properties
|
108
|
+
end
|
109
|
+
|
110
|
+
# Check to see if the all the properties in the model are valid
|
111
|
+
# @return true if the model is valid
|
112
|
+
def valid?
|
113
|
+
return false if @secret_base64.nil?
|
114
|
+
return false if @signing_algorithm.nil?
|
115
|
+
return false if !@token_expiry_secs.nil? && @token_expiry_secs < 0
|
116
|
+
true
|
117
|
+
end
|
118
|
+
|
119
|
+
# Custom attribute writer method with validation
|
120
|
+
# @param [Object] token_expiry_secs Value to be assigned
|
121
|
+
def token_expiry_secs=(token_expiry_secs)
|
122
|
+
if !token_expiry_secs.nil? && token_expiry_secs < 0
|
123
|
+
fail ArgumentError, 'invalid value for "token_expiry_secs", must be greater than or equal to 0.'
|
124
|
+
end
|
125
|
+
|
126
|
+
@token_expiry_secs = token_expiry_secs
|
127
|
+
end
|
128
|
+
|
129
|
+
# Checks equality by comparing each attribute.
|
130
|
+
# @param [Object] Object to be compared
|
131
|
+
def ==(o)
|
132
|
+
return true if self.equal?(o)
|
133
|
+
self.class == o.class &&
|
134
|
+
secret_base64 == o.secret_base64 &&
|
135
|
+
secret_id == o.secret_id &&
|
136
|
+
signing_algorithm == o.signing_algorithm &&
|
137
|
+
token_expiry_secs == o.token_expiry_secs
|
138
|
+
end
|
139
|
+
|
140
|
+
# @see the `==` method
|
141
|
+
# @param [Object] Object to be compared
|
142
|
+
def eql?(o)
|
143
|
+
self == o
|
144
|
+
end
|
145
|
+
|
146
|
+
# Calculates hash code according to all attributes.
|
147
|
+
# @return [Integer] Hash code
|
148
|
+
def hash
|
149
|
+
[secret_base64, secret_id, signing_algorithm, token_expiry_secs].hash
|
150
|
+
end
|
151
|
+
|
152
|
+
# Builds the object from hash
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
+
# @return [Object] Returns the model itself
|
155
|
+
def self.build_from_hash(attributes)
|
156
|
+
new.build_from_hash(attributes)
|
157
|
+
end
|
158
|
+
|
159
|
+
# Builds the object from hash
|
160
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
161
|
+
# @return [Object] Returns the model itself
|
162
|
+
def build_from_hash(attributes)
|
163
|
+
return nil unless attributes.is_a?(Hash)
|
164
|
+
self.class.openapi_types.each_pair do |key, type|
|
165
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
166
|
+
self.send("#{key}=", nil)
|
167
|
+
elsif type =~ /\AArray<(.*)>/i
|
168
|
+
# check to ensure the input is an array given that the attribute
|
169
|
+
# is documented as an array but the input is not
|
170
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
171
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
172
|
+
end
|
173
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
174
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
self
|
179
|
+
end
|
180
|
+
|
181
|
+
# Deserializes the data based on type
|
182
|
+
# @param string type Data type
|
183
|
+
# @param string value Value to be deserialized
|
184
|
+
# @return [Object] Deserialized data
|
185
|
+
def _deserialize(type, value)
|
186
|
+
case type.to_sym
|
187
|
+
when :Time
|
188
|
+
Time.parse(value)
|
189
|
+
when :Date
|
190
|
+
Date.parse(value)
|
191
|
+
when :String
|
192
|
+
value.to_s
|
193
|
+
when :Integer
|
194
|
+
value.to_i
|
195
|
+
when :Float
|
196
|
+
value.to_f
|
197
|
+
when :Boolean
|
198
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
199
|
+
true
|
200
|
+
else
|
201
|
+
false
|
202
|
+
end
|
203
|
+
when :Object
|
204
|
+
# generic object (usually a Hash), return directly
|
205
|
+
value
|
206
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
207
|
+
inner_type = Regexp.last_match[:inner_type]
|
208
|
+
value.map { |v| _deserialize(inner_type, v) }
|
209
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
210
|
+
k_type = Regexp.last_match[:k_type]
|
211
|
+
v_type = Regexp.last_match[:v_type]
|
212
|
+
{}.tap do |hash|
|
213
|
+
value.each do |k, v|
|
214
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
else # model
|
218
|
+
# models (e.g. Pet) or oneOf
|
219
|
+
klass = Svix.const_get(type)
|
220
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
# Returns the string representation of the object
|
225
|
+
# @return [String] String presentation of the object
|
226
|
+
def to_s
|
227
|
+
to_hash.to_s
|
228
|
+
end
|
229
|
+
|
230
|
+
# to_body is an alias to to_hash (backward compatibility)
|
231
|
+
# @return [Hash] Returns the object in the form of hash
|
232
|
+
def to_body
|
233
|
+
to_hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Returns the object in the form of hash
|
237
|
+
# @return [Hash] Returns the object in the form of hash
|
238
|
+
def to_hash
|
239
|
+
hash = {}
|
240
|
+
self.class.attribute_map.each_pair do |attr, param|
|
241
|
+
value = self.send(attr)
|
242
|
+
if value.nil?
|
243
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
244
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
245
|
+
end
|
246
|
+
|
247
|
+
hash[param] = _to_hash(value)
|
248
|
+
end
|
249
|
+
hash
|
250
|
+
end
|
251
|
+
|
252
|
+
# Outputs non-array value in the form of hash
|
253
|
+
# For object, use to_hash. Otherwise, just return the value
|
254
|
+
# @param [Object] value Any valid value
|
255
|
+
# @return [Hash] Returns the value in the form of hash
|
256
|
+
def _to_hash(value)
|
257
|
+
if value.is_a?(Array)
|
258
|
+
value.compact.map { |v| _to_hash(v) }
|
259
|
+
elsif value.is_a?(Hash)
|
260
|
+
{}.tap do |hash|
|
261
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
262
|
+
end
|
263
|
+
elsif value.respond_to? :to_hash
|
264
|
+
value.to_hash
|
265
|
+
else
|
266
|
+
value
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
end
|
271
|
+
|
272
|
+
end
|
@@ -71,6 +71,15 @@ module Svix
|
|
71
71
|
# List of attributes with nullable: true
|
72
72
|
def self.openapi_nullable
|
73
73
|
Set.new([
|
74
|
+
:'background_hover',
|
75
|
+
:'background_primary',
|
76
|
+
:'background_secondary',
|
77
|
+
:'button_primary',
|
78
|
+
:'interactive_accent',
|
79
|
+
:'navigation_accent',
|
80
|
+
:'primary',
|
81
|
+
:'text_danger',
|
82
|
+
:'text_primary'
|
74
83
|
])
|
75
84
|
end
|
76
85
|
|