svix 1.12.0 → 1.13.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 -1
- data/lib/svix/api/event_type_api.rb +2 -2
- data/lib/svix/api_client.rb +2 -2
- data/lib/svix/models/event_type_import_open_api_in.rb +18 -9
- data/lib/svix/models/template_in.rb +10 -1
- data/lib/svix/models/template_patch.rb +10 -1
- data/lib/svix/models/template_update.rb +10 -1
- data/lib/svix/models/transformation_template_kind.rb +1 -0
- data/lib/svix/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17b5d97f7e6c49e08bdd186ffc37d7df93e1ef4fee429a9ce546ea0fb3b0da18
|
4
|
+
data.tar.gz: aa249d2de965495213c584a96cae7400028dbd20b81920906aa2b5efb50dffaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b3f7094ea9ed99dc168a1f23934c6a5ced2f36c08c032d90f573402603ac5d2f56b2c6d9841982eda6759baf42d7f8d08c4028686fe96bec3c0a8434e457857
|
7
|
+
data.tar.gz: 50c97cbb777efc0b1aa5d3eb6fd94d367ab1db413643e4ed3d9e108abe2b88f8748cf49beea6a358c5b32b2e214020cf871559b9919d89837f86ad35500deb3d
|
data/Gemfile.lock
CHANGED
@@ -304,7 +304,7 @@ module Svix
|
|
304
304
|
|
305
305
|
# Event Type Import From Openapi
|
306
306
|
# Given an OpenAPI spec, create new or update existing event types. If an existing `archived` event type is updated, it will be unarchvied. The importer will convert all webhooks found in the either the `webhooks` or `x-webhooks` top-level.
|
307
|
-
# @param event_type_import_open_api_in [EventTypeImportOpenApiIn]
|
307
|
+
# @param event_type_import_open_api_in [EventTypeImportOpenApiIn] Import a list of event types from webhooks defined in an OpenAPI spec. The OpenAPI spec can be specified as either `spec` given the spec as a JSON object, or as `specRaw` (a `string`) which will be parsed as YAML or JSON by the server. Sending neither or both is invalid, resulting in a `400` **Bad Request**.
|
308
308
|
# @param [Hash] opts the optional parameters
|
309
309
|
# @option opts [String] :idempotency_key The request's idempotency key
|
310
310
|
# @return [EventTypeImportOpenApiOut]
|
@@ -315,7 +315,7 @@ module Svix
|
|
315
315
|
|
316
316
|
# Event Type Import From Openapi
|
317
317
|
# Given an OpenAPI spec, create new or update existing event types. If an existing `archived` event type is updated, it will be unarchvied. The importer will convert all webhooks found in the either the `webhooks` or `x-webhooks` top-level.
|
318
|
-
# @param event_type_import_open_api_in [EventTypeImportOpenApiIn]
|
318
|
+
# @param event_type_import_open_api_in [EventTypeImportOpenApiIn] Import a list of event types from webhooks defined in an OpenAPI spec. The OpenAPI spec can be specified as either `spec` given the spec as a JSON object, or as `specRaw` (a `string`) which will be parsed as YAML or JSON by the server. Sending neither or both is invalid, resulting in a `400` **Bad Request**.
|
319
319
|
# @param [Hash] opts the optional parameters
|
320
320
|
# @option opts [String] :idempotency_key The request's idempotency key
|
321
321
|
# @return [Array<(EventTypeImportOpenApiOut, Integer, Hash)>] EventTypeImportOpenApiOut data, response status code and response headers
|
data/lib/svix/api_client.rb
CHANGED
@@ -53,11 +53,11 @@ module Svix
|
|
53
53
|
request = build_request(http_method, path, opts)
|
54
54
|
response = request.run
|
55
55
|
|
56
|
-
# retry
|
56
|
+
# retry on 5XX and general network errors
|
57
57
|
sleep_time = 0.05
|
58
58
|
retry_count = 0
|
59
59
|
(0..1).each do |n|
|
60
|
-
break if response.success? || response.code < 500
|
60
|
+
break if response.success? || (response.code < 500 && response.code > 0)
|
61
61
|
retry_count += 1
|
62
62
|
sleep(sleep_time)
|
63
63
|
sleep_time = sleep_time * 2
|
@@ -14,13 +14,19 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Svix
|
17
|
+
# Import a list of event types from webhooks defined in an OpenAPI spec. The OpenAPI spec can be specified as either `spec` given the spec as a JSON object, or as `specRaw` (a `string`) which will be parsed as YAML or JSON by the server. Sending neither or both is invalid, resulting in a `400` **Bad Request**.
|
17
18
|
class EventTypeImportOpenApiIn
|
19
|
+
# A pre-parsed JSON spec.
|
18
20
|
attr_accessor :spec
|
19
21
|
|
22
|
+
# A string, parsed by the server as YAML or JSON.
|
23
|
+
attr_accessor :spec_raw
|
24
|
+
|
20
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
26
|
def self.attribute_map
|
22
27
|
{
|
23
|
-
:'spec' => :'spec'
|
28
|
+
:'spec' => :'spec',
|
29
|
+
:'spec_raw' => :'specRaw'
|
24
30
|
}
|
25
31
|
end
|
26
32
|
|
@@ -32,13 +38,16 @@ module Svix
|
|
32
38
|
# Attribute type mapping.
|
33
39
|
def self.openapi_types
|
34
40
|
{
|
35
|
-
:'spec' => :'Hash<String, Object>'
|
41
|
+
:'spec' => :'Hash<String, Object>',
|
42
|
+
:'spec_raw' => :'String'
|
36
43
|
}
|
37
44
|
end
|
38
45
|
|
39
46
|
# List of attributes with nullable: true
|
40
47
|
def self.openapi_nullable
|
41
48
|
Set.new([
|
49
|
+
:'spec',
|
50
|
+
:'spec_raw'
|
42
51
|
])
|
43
52
|
end
|
44
53
|
|
@@ -62,23 +71,22 @@ module Svix
|
|
62
71
|
self.spec = value
|
63
72
|
end
|
64
73
|
end
|
74
|
+
|
75
|
+
if attributes.key?(:'spec_raw')
|
76
|
+
self.spec_raw = attributes[:'spec_raw']
|
77
|
+
end
|
65
78
|
end
|
66
79
|
|
67
80
|
# Show invalid properties with the reasons. Usually used together with valid?
|
68
81
|
# @return Array for valid properties with the reasons
|
69
82
|
def list_invalid_properties
|
70
83
|
invalid_properties = Array.new
|
71
|
-
if @spec.nil?
|
72
|
-
invalid_properties.push('invalid value for "spec", spec cannot be nil.')
|
73
|
-
end
|
74
|
-
|
75
84
|
invalid_properties
|
76
85
|
end
|
77
86
|
|
78
87
|
# Check to see if the all the properties in the model are valid
|
79
88
|
# @return true if the model is valid
|
80
89
|
def valid?
|
81
|
-
return false if @spec.nil?
|
82
90
|
true
|
83
91
|
end
|
84
92
|
|
@@ -87,7 +95,8 @@ module Svix
|
|
87
95
|
def ==(o)
|
88
96
|
return true if self.equal?(o)
|
89
97
|
self.class == o.class &&
|
90
|
-
spec == o.spec
|
98
|
+
spec == o.spec &&
|
99
|
+
spec_raw == o.spec_raw
|
91
100
|
end
|
92
101
|
|
93
102
|
# @see the `==` method
|
@@ -99,7 +108,7 @@ module Svix
|
|
99
108
|
# Calculates hash code according to all attributes.
|
100
109
|
# @return [Integer] Hash code
|
101
110
|
def hash
|
102
|
-
[spec].hash
|
111
|
+
[spec, spec_raw].hash
|
103
112
|
end
|
104
113
|
|
105
114
|
# Builds the object from hash
|
@@ -25,6 +25,8 @@ module Svix
|
|
25
25
|
|
26
26
|
attr_accessor :instructions_link
|
27
27
|
|
28
|
+
attr_accessor :kind
|
29
|
+
|
28
30
|
attr_accessor :logo
|
29
31
|
|
30
32
|
attr_accessor :name
|
@@ -39,6 +41,7 @@ module Svix
|
|
39
41
|
:'filter_types' => :'filterTypes',
|
40
42
|
:'instructions' => :'instructions',
|
41
43
|
:'instructions_link' => :'instructionsLink',
|
44
|
+
:'kind' => :'kind',
|
42
45
|
:'logo' => :'logo',
|
43
46
|
:'name' => :'name',
|
44
47
|
:'transformation' => :'transformation'
|
@@ -58,6 +61,7 @@ module Svix
|
|
58
61
|
:'filter_types' => :'Array<String>',
|
59
62
|
:'instructions' => :'String',
|
60
63
|
:'instructions_link' => :'String',
|
64
|
+
:'kind' => :'TransformationTemplateKind',
|
61
65
|
:'logo' => :'String',
|
62
66
|
:'name' => :'String',
|
63
67
|
:'transformation' => :'String'
|
@@ -116,6 +120,10 @@ module Svix
|
|
116
120
|
self.instructions_link = 'null'
|
117
121
|
end
|
118
122
|
|
123
|
+
if attributes.key?(:'kind')
|
124
|
+
self.kind = attributes[:'kind']
|
125
|
+
end
|
126
|
+
|
119
127
|
if attributes.key?(:'logo')
|
120
128
|
self.logo = attributes[:'logo']
|
121
129
|
end
|
@@ -236,6 +244,7 @@ module Svix
|
|
236
244
|
filter_types == o.filter_types &&
|
237
245
|
instructions == o.instructions &&
|
238
246
|
instructions_link == o.instructions_link &&
|
247
|
+
kind == o.kind &&
|
239
248
|
logo == o.logo &&
|
240
249
|
name == o.name &&
|
241
250
|
transformation == o.transformation
|
@@ -250,7 +259,7 @@ module Svix
|
|
250
259
|
# Calculates hash code according to all attributes.
|
251
260
|
# @return [Integer] Hash code
|
252
261
|
def hash
|
253
|
-
[description, feature_flag, filter_types, instructions, instructions_link, logo, name, transformation].hash
|
262
|
+
[description, feature_flag, filter_types, instructions, instructions_link, kind, logo, name, transformation].hash
|
254
263
|
end
|
255
264
|
|
256
265
|
# Builds the object from hash
|
@@ -25,6 +25,8 @@ module Svix
|
|
25
25
|
|
26
26
|
attr_accessor :instructions_link
|
27
27
|
|
28
|
+
attr_accessor :kind
|
29
|
+
|
28
30
|
attr_accessor :logo
|
29
31
|
|
30
32
|
attr_accessor :name
|
@@ -39,6 +41,7 @@ module Svix
|
|
39
41
|
:'filter_types' => :'filterTypes',
|
40
42
|
:'instructions' => :'instructions',
|
41
43
|
:'instructions_link' => :'instructionsLink',
|
44
|
+
:'kind' => :'kind',
|
42
45
|
:'logo' => :'logo',
|
43
46
|
:'name' => :'name',
|
44
47
|
:'transformation' => :'transformation'
|
@@ -58,6 +61,7 @@ module Svix
|
|
58
61
|
:'filter_types' => :'Array<String>',
|
59
62
|
:'instructions' => :'String',
|
60
63
|
:'instructions_link' => :'String',
|
64
|
+
:'kind' => :'TransformationTemplateKind',
|
61
65
|
:'logo' => :'String',
|
62
66
|
:'name' => :'String',
|
63
67
|
:'transformation' => :'String'
|
@@ -110,6 +114,10 @@ module Svix
|
|
110
114
|
self.instructions_link = attributes[:'instructions_link']
|
111
115
|
end
|
112
116
|
|
117
|
+
if attributes.key?(:'kind')
|
118
|
+
self.kind = attributes[:'kind']
|
119
|
+
end
|
120
|
+
|
113
121
|
if attributes.key?(:'logo')
|
114
122
|
self.logo = attributes[:'logo']
|
115
123
|
end
|
@@ -211,6 +219,7 @@ module Svix
|
|
211
219
|
filter_types == o.filter_types &&
|
212
220
|
instructions == o.instructions &&
|
213
221
|
instructions_link == o.instructions_link &&
|
222
|
+
kind == o.kind &&
|
214
223
|
logo == o.logo &&
|
215
224
|
name == o.name &&
|
216
225
|
transformation == o.transformation
|
@@ -225,7 +234,7 @@ module Svix
|
|
225
234
|
# Calculates hash code according to all attributes.
|
226
235
|
# @return [Integer] Hash code
|
227
236
|
def hash
|
228
|
-
[description, feature_flag, filter_types, instructions, instructions_link, logo, name, transformation].hash
|
237
|
+
[description, feature_flag, filter_types, instructions, instructions_link, kind, logo, name, transformation].hash
|
229
238
|
end
|
230
239
|
|
231
240
|
# Builds the object from hash
|
@@ -25,6 +25,8 @@ module Svix
|
|
25
25
|
|
26
26
|
attr_accessor :instructions_link
|
27
27
|
|
28
|
+
attr_accessor :kind
|
29
|
+
|
28
30
|
attr_accessor :logo
|
29
31
|
|
30
32
|
attr_accessor :name
|
@@ -39,6 +41,7 @@ module Svix
|
|
39
41
|
:'filter_types' => :'filterTypes',
|
40
42
|
:'instructions' => :'instructions',
|
41
43
|
:'instructions_link' => :'instructionsLink',
|
44
|
+
:'kind' => :'kind',
|
42
45
|
:'logo' => :'logo',
|
43
46
|
:'name' => :'name',
|
44
47
|
:'transformation' => :'transformation'
|
@@ -58,6 +61,7 @@ module Svix
|
|
58
61
|
:'filter_types' => :'Array<String>',
|
59
62
|
:'instructions' => :'String',
|
60
63
|
:'instructions_link' => :'String',
|
64
|
+
:'kind' => :'TransformationTemplateKind',
|
61
65
|
:'logo' => :'String',
|
62
66
|
:'name' => :'String',
|
63
67
|
:'transformation' => :'String'
|
@@ -114,6 +118,10 @@ module Svix
|
|
114
118
|
self.instructions_link = attributes[:'instructions_link']
|
115
119
|
end
|
116
120
|
|
121
|
+
if attributes.key?(:'kind')
|
122
|
+
self.kind = attributes[:'kind']
|
123
|
+
end
|
124
|
+
|
117
125
|
if attributes.key?(:'logo')
|
118
126
|
self.logo = attributes[:'logo']
|
119
127
|
end
|
@@ -231,6 +239,7 @@ module Svix
|
|
231
239
|
filter_types == o.filter_types &&
|
232
240
|
instructions == o.instructions &&
|
233
241
|
instructions_link == o.instructions_link &&
|
242
|
+
kind == o.kind &&
|
234
243
|
logo == o.logo &&
|
235
244
|
name == o.name &&
|
236
245
|
transformation == o.transformation
|
@@ -245,7 +254,7 @@ module Svix
|
|
245
254
|
# Calculates hash code according to all attributes.
|
246
255
|
# @return [Integer] Hash code
|
247
256
|
def hash
|
248
|
-
[description, feature_flag, filter_types, instructions, instructions_link, logo, name, transformation].hash
|
257
|
+
[description, feature_flag, filter_types, instructions, instructions_link, kind, logo, name, transformation].hash
|
249
258
|
end
|
250
259
|
|
251
260
|
# Builds the object from hash
|
data/lib/svix/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Svix
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|