svix 1.80.0 → 1.82.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76941399e0442d23f8953689a24958c037acd0e235d3e1aa1c64a05ea53c6a76
4
- data.tar.gz: 6168803d28d8ac2dfe9a70ed1988080668de14ef511cc2664c9421d528e70c3f
3
+ metadata.gz: fe562cc25a4c9a3553dd79de320a14ccc190310af38d14fc8837748b92c2e8c0
4
+ data.tar.gz: 30b61396d159559ee109f4b1620336583d02867d65e7045a89802498f8ccbfdb
5
5
  SHA512:
6
- metadata.gz: 4d36caf2e0eed20106412025f2c339e626d5c890a7909257b070edfbb3f7ca6db60b17148da5674562cec65ba5ab01d79bd8635b5d178b182675e7c964bad638
7
- data.tar.gz: 6982a6d8be530f2d5a4d930a7ab2657df9da77e6cd97a66280211f8e3e24c3119bfa79e6d732e3018a47221a57cfa328652d3e2accb950da0edb160e2c72110a
6
+ metadata.gz: 1f85892f3c759484a6d20d0b184d145a0c22674bc2124e584dc873a307c0496f075482f1a152157965d28dd5913340cfb7589acbf9f958e3075a7717376ce8e8
7
+ data.tar.gz: 2e2b4dec66a38f191611c02e06752a1e394178f0fd1bb042d91c04dfe11d5d4c1e29c3532ef42b982002ae74d7dc26ee64d6e0761a772f943e0fd4f0d9613ebf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (1.80.0)
4
+ svix (1.82.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -15,6 +15,8 @@ module Svix
15
15
  "GET",
16
16
  "/api/v1/app",
17
17
  query_params: {
18
+ "exclude_apps_with_no_endpoints" => options["exclude_apps_with_no_endpoints"],
19
+ "exclude_apps_with_disabled_endpoints" => options["exclude_apps_with_disabled_endpoints"],
18
20
  "limit" => options["limit"],
19
21
  "iterator" => options["iterator"],
20
22
  "order" => options["order"]
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+
4
+ require "net/http"
5
+
6
+ module Svix
7
+ class Connector
8
+ def initialize(client)
9
+ @client = client
10
+ end
11
+
12
+ def list(options = {})
13
+ options = options.transform_keys(&:to_s)
14
+ res = @client.execute_request(
15
+ "GET",
16
+ "/api/v1/connector",
17
+ query_params: {
18
+ "limit" => options["limit"],
19
+ "iterator" => options["iterator"],
20
+ "order" => options["order"],
21
+ "product_type" => options["product_type"]
22
+ }
23
+ )
24
+ ListResponseConnectorOut.deserialize(res)
25
+ end
26
+
27
+ def create(connector_in, options = {})
28
+ options = options.transform_keys(&:to_s)
29
+ res = @client.execute_request(
30
+ "POST",
31
+ "/api/v1/connector",
32
+ headers: {
33
+ "idempotency-key" => options["idempotency-key"]
34
+ },
35
+ body: connector_in
36
+ )
37
+ ConnectorOut.deserialize(res)
38
+ end
39
+
40
+ def get(connector_id)
41
+ res = @client.execute_request(
42
+ "GET",
43
+ "/api/v1/connector/#{connector_id}"
44
+ )
45
+ ConnectorOut.deserialize(res)
46
+ end
47
+
48
+ def update(connector_id, connector_update)
49
+ res = @client.execute_request(
50
+ "PUT",
51
+ "/api/v1/connector/#{connector_id}",
52
+ body: connector_update
53
+ )
54
+ ConnectorOut.deserialize(res)
55
+ end
56
+
57
+ def delete(connector_id)
58
+ @client.execute_request(
59
+ "DELETE",
60
+ "/api/v1/connector/#{connector_id}"
61
+ )
62
+ end
63
+
64
+ def patch(connector_id, connector_patch)
65
+ res = @client.execute_request(
66
+ "PATCH",
67
+ "/api/v1/connector/#{connector_id}",
68
+ body: connector_patch
69
+ )
70
+ ConnectorOut.deserialize(res)
71
+ end
72
+
73
+ end
74
+ end
@@ -103,13 +103,14 @@ module Svix
103
103
 
104
104
  def resend(app_id, msg_id, endpoint_id, options = {})
105
105
  options = options.transform_keys(&:to_s)
106
- @client.execute_request(
106
+ res = @client.execute_request(
107
107
  "POST",
108
108
  "/api/v1/app/#{app_id}/msg/#{msg_id}/endpoint/#{endpoint_id}/resend",
109
109
  headers: {
110
110
  "idempotency-key" => options["idempotency-key"]
111
111
  }
112
112
  )
113
+ EmptyResponse.deserialize(res)
113
114
  end
114
115
 
115
116
  end
@@ -23,6 +23,8 @@ module Svix
23
23
  # - `CreateAttempts`: Allows user to replay missing messages and send example messages.
24
24
  #
25
25
  # - `ManageEndpoint`: Allows user to read/modify any field or configuration of an endpoint (including secrets)
26
+ #
27
+ # By default, the token will get all capabilities if the capabilities are not explicitly specified.
26
28
  attr_accessor :capabilities
27
29
  # How long the token will be valid for, in seconds.
28
30
  #
@@ -4,24 +4,29 @@ require "json"
4
4
 
5
5
  module Svix
6
6
  class ConnectorIn
7
+ attr_accessor :allowed_event_types
7
8
  attr_accessor :description
8
9
  attr_accessor :feature_flags
9
- attr_accessor :filter_types
10
10
  attr_accessor :instructions
11
11
  attr_accessor :kind
12
12
  attr_accessor :logo
13
13
  attr_accessor :name
14
+ attr_accessor :product_type
14
15
  attr_accessor :transformation
16
+ # The Connector's UID.
17
+ attr_accessor :uid
15
18
 
16
19
  ALL_FIELD ||= [
20
+ "allowed_event_types",
17
21
  "description",
18
22
  "feature_flags",
19
- "filter_types",
20
23
  "instructions",
21
24
  "kind",
22
25
  "logo",
23
26
  "name",
24
- "transformation"
27
+ "product_type",
28
+ "transformation",
29
+ "uid"
25
30
  ].freeze
26
31
  private_constant :ALL_FIELD
27
32
 
@@ -43,27 +48,34 @@ module Svix
43
48
  def self.deserialize(attributes = {})
44
49
  attributes = attributes.transform_keys(&:to_s)
45
50
  attrs = Hash.new
51
+ attrs["allowed_event_types"] = attributes["allowedEventTypes"]
46
52
  attrs["description"] = attributes["description"]
47
53
  attrs["feature_flags"] = attributes["featureFlags"]
48
- attrs["filter_types"] = attributes["filterTypes"]
49
54
  attrs["instructions"] = attributes["instructions"]
50
55
  attrs["kind"] = Svix::ConnectorKind.deserialize(attributes["kind"]) if attributes["kind"]
51
56
  attrs["logo"] = attributes["logo"]
52
57
  attrs["name"] = attributes["name"]
58
+ if attributes["productType"]
59
+ attrs["product_type"] = Svix::ConnectorProduct.deserialize(attributes["productType"])
60
+ end
61
+
53
62
  attrs["transformation"] = attributes["transformation"]
63
+ attrs["uid"] = attributes["uid"]
54
64
  new(attrs)
55
65
  end
56
66
 
57
67
  def serialize
58
68
  out = Hash.new
69
+ out["allowedEventTypes"] = Svix::serialize_primitive(@allowed_event_types) if @allowed_event_types
59
70
  out["description"] = Svix::serialize_primitive(@description) if @description
60
71
  out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags
61
- out["filterTypes"] = Svix::serialize_primitive(@filter_types) if @filter_types
62
72
  out["instructions"] = Svix::serialize_primitive(@instructions) if @instructions
63
73
  out["kind"] = Svix::serialize_schema_ref(@kind) if @kind
64
74
  out["logo"] = Svix::serialize_primitive(@logo) if @logo
65
75
  out["name"] = Svix::serialize_primitive(@name) if @name
76
+ out["productType"] = Svix::serialize_schema_ref(@product_type) if @product_type
66
77
  out["transformation"] = Svix::serialize_primitive(@transformation) if @transformation
78
+ out["uid"] = Svix::serialize_primitive(@uid) if @uid
67
79
  out
68
80
  end
69
81
 
@@ -10,6 +10,7 @@ module Svix
10
10
  HUBSPOT = "Hubspot".freeze
11
11
  INNGEST = "Inngest".freeze
12
12
  LOOPS = "Loops".freeze
13
+ OTEL = "Otel".freeze
13
14
  RESEND = "Resend".freeze
14
15
  SALESFORCE = "Salesforce".freeze
15
16
  SEGMENT = "Segment".freeze
@@ -30,6 +31,7 @@ module Svix
30
31
  HUBSPOT,
31
32
  INNGEST,
32
33
  LOOPS,
34
+ OTEL,
33
35
  RESEND,
34
36
  SALESFORCE,
35
37
  SEGMENT,
@@ -4,10 +4,10 @@ require "json"
4
4
 
5
5
  module Svix
6
6
  class ConnectorOut
7
+ attr_accessor :allowed_event_types
7
8
  attr_accessor :created_at
8
9
  attr_accessor :description
9
10
  attr_accessor :feature_flags
10
- attr_accessor :filter_types
11
11
  # The Connector's ID.
12
12
  attr_accessor :id
13
13
  attr_accessor :instructions
@@ -16,21 +16,26 @@ module Svix
16
16
  attr_accessor :name
17
17
  # The Environment's ID.
18
18
  attr_accessor :org_id
19
+ attr_accessor :product_type
19
20
  attr_accessor :transformation
21
+ # The Connector's UID.
22
+ attr_accessor :uid
20
23
  attr_accessor :updated_at
21
24
 
22
25
  ALL_FIELD ||= [
26
+ "allowed_event_types",
23
27
  "created_at",
24
28
  "description",
25
29
  "feature_flags",
26
- "filter_types",
27
30
  "id",
28
31
  "instructions",
29
32
  "kind",
30
33
  "logo",
31
34
  "name",
32
35
  "org_id",
36
+ "product_type",
33
37
  "transformation",
38
+ "uid",
34
39
  "updated_at"
35
40
  ].freeze
36
41
  private_constant :ALL_FIELD
@@ -53,34 +58,38 @@ module Svix
53
58
  def self.deserialize(attributes = {})
54
59
  attributes = attributes.transform_keys(&:to_s)
55
60
  attrs = Hash.new
61
+ attrs["allowed_event_types"] = attributes["allowedEventTypes"]
56
62
  attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
57
63
  attrs["description"] = attributes["description"]
58
64
  attrs["feature_flags"] = attributes["featureFlags"]
59
- attrs["filter_types"] = attributes["filterTypes"]
60
65
  attrs["id"] = attributes["id"]
61
66
  attrs["instructions"] = attributes["instructions"]
62
67
  attrs["kind"] = Svix::ConnectorKind.deserialize(attributes["kind"])
63
68
  attrs["logo"] = attributes["logo"]
64
69
  attrs["name"] = attributes["name"]
65
70
  attrs["org_id"] = attributes["orgId"]
71
+ attrs["product_type"] = Svix::ConnectorProduct.deserialize(attributes["productType"])
66
72
  attrs["transformation"] = attributes["transformation"]
73
+ attrs["uid"] = attributes["uid"]
67
74
  attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
68
75
  new(attrs)
69
76
  end
70
77
 
71
78
  def serialize
72
79
  out = Hash.new
80
+ out["allowedEventTypes"] = Svix::serialize_primitive(@allowed_event_types) if @allowed_event_types
73
81
  out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
74
82
  out["description"] = Svix::serialize_primitive(@description) if @description
75
83
  out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags
76
- out["filterTypes"] = Svix::serialize_primitive(@filter_types) if @filter_types
77
84
  out["id"] = Svix::serialize_primitive(@id) if @id
78
85
  out["instructions"] = Svix::serialize_primitive(@instructions) if @instructions
79
86
  out["kind"] = Svix::serialize_schema_ref(@kind) if @kind
80
87
  out["logo"] = Svix::serialize_primitive(@logo) if @logo
81
88
  out["name"] = Svix::serialize_primitive(@name) if @name
82
89
  out["orgId"] = Svix::serialize_primitive(@org_id) if @org_id
90
+ out["productType"] = Svix::serialize_schema_ref(@product_type) if @product_type
83
91
  out["transformation"] = Svix::serialize_primitive(@transformation) if @transformation
92
+ out["uid"] = Svix::serialize_primitive(@uid) if @uid
84
93
  out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
85
94
  out
86
95
  end
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class ConnectorPatch
7
+ attr_accessor :allowed_event_types
8
+ attr_accessor :description
9
+ attr_accessor :feature_flags
10
+ attr_accessor :instructions
11
+ attr_accessor :kind
12
+ attr_accessor :logo
13
+ attr_accessor :name
14
+ attr_accessor :transformation
15
+
16
+ ALL_FIELD ||= [
17
+ "allowed_event_types",
18
+ "description",
19
+ "feature_flags",
20
+ "instructions",
21
+ "kind",
22
+ "logo",
23
+ "name",
24
+ "transformation"
25
+ ].freeze
26
+ private_constant :ALL_FIELD
27
+
28
+ def initialize(attributes = {})
29
+ unless attributes.is_a?(Hash)
30
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ConnectorPatch` new method")
31
+ end
32
+
33
+ attributes.each do |k, v|
34
+ unless ALL_FIELD.include?(k.to_s)
35
+ fail(ArgumentError, "The field #{k} is not part of Svix::ConnectorPatch")
36
+ end
37
+
38
+ instance_variable_set("@#{k}", v)
39
+ instance_variable_set("@__#{k}_is_defined", true)
40
+ end
41
+ end
42
+
43
+ def self.deserialize(attributes = {})
44
+ attributes = attributes.transform_keys(&:to_s)
45
+ attrs = Hash.new
46
+ attrs["allowed_event_types"] = attributes["allowedEventTypes"]
47
+ attrs["description"] = attributes["description"]
48
+ attrs["feature_flags"] = attributes["featureFlags"]
49
+ attrs["instructions"] = attributes["instructions"]
50
+ attrs["kind"] = Svix::ConnectorKind.deserialize(attributes["kind"]) if attributes["kind"]
51
+ attrs["logo"] = attributes["logo"]
52
+ attrs["name"] = attributes["name"]
53
+ attrs["transformation"] = attributes["transformation"]
54
+ new(attrs)
55
+ end
56
+
57
+ def serialize
58
+ out = Hash.new
59
+ out["allowedEventTypes"] = Svix::serialize_primitive(@allowed_event_types) if @__allowed_event_types_is_defined
60
+ out["description"] = Svix::serialize_primitive(@description) if @description
61
+ out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @__feature_flags_is_defined
62
+ out["instructions"] = Svix::serialize_primitive(@instructions) if @instructions
63
+ out["kind"] = Svix::serialize_schema_ref(@kind) if @kind
64
+ out["logo"] = Svix::serialize_primitive(@logo) if @__logo_is_defined
65
+ out["name"] = Svix::serialize_primitive(@name) if @name
66
+ out["transformation"] = Svix::serialize_primitive(@transformation) if @transformation
67
+ out
68
+ end
69
+
70
+ # Serializes the object to a json string
71
+ # @return String
72
+ def to_json
73
+ JSON.dump(serialize)
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ module Svix
4
+ class ConnectorProduct
5
+ DISPATCH = "Dispatch".freeze
6
+ STREAM = "Stream".freeze
7
+
8
+ def self.all_vars
9
+ @all_vars ||= [DISPATCH, STREAM].freeze
10
+ end
11
+
12
+ def initialize(value)
13
+ unless ConnectorProduct.all_vars.include?(value)
14
+ raise "Invalid ENUM value '#{value}' for class #ConnectorProduct"
15
+ end
16
+
17
+ @value = value
18
+ end
19
+
20
+ def self.deserialize(value)
21
+ return value if ConnectorProduct.all_vars.include?(value)
22
+ raise "Invalid ENUM value '#{value}' for class #ConnectorProduct"
23
+ end
24
+
25
+ def serialize
26
+ @value
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class ConnectorUpdate
7
+ attr_accessor :allowed_event_types
8
+ attr_accessor :description
9
+ attr_accessor :feature_flags
10
+ attr_accessor :instructions
11
+ attr_accessor :kind
12
+ attr_accessor :logo
13
+ attr_accessor :name
14
+ attr_accessor :transformation
15
+
16
+ ALL_FIELD ||= [
17
+ "allowed_event_types",
18
+ "description",
19
+ "feature_flags",
20
+ "instructions",
21
+ "kind",
22
+ "logo",
23
+ "name",
24
+ "transformation"
25
+ ].freeze
26
+ private_constant :ALL_FIELD
27
+
28
+ def initialize(attributes = {})
29
+ unless attributes.is_a?(Hash)
30
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ConnectorUpdate` new method")
31
+ end
32
+
33
+ attributes.each do |k, v|
34
+ unless ALL_FIELD.include?(k.to_s)
35
+ fail(ArgumentError, "The field #{k} is not part of Svix::ConnectorUpdate")
36
+ end
37
+
38
+ instance_variable_set("@#{k}", v)
39
+ instance_variable_set("@__#{k}_is_defined", true)
40
+ end
41
+ end
42
+
43
+ def self.deserialize(attributes = {})
44
+ attributes = attributes.transform_keys(&:to_s)
45
+ attrs = Hash.new
46
+ attrs["allowed_event_types"] = attributes["allowedEventTypes"]
47
+ attrs["description"] = attributes["description"]
48
+ attrs["feature_flags"] = attributes["featureFlags"]
49
+ attrs["instructions"] = attributes["instructions"]
50
+ attrs["kind"] = Svix::ConnectorKind.deserialize(attributes["kind"]) if attributes["kind"]
51
+ attrs["logo"] = attributes["logo"]
52
+ attrs["name"] = attributes["name"]
53
+ attrs["transformation"] = attributes["transformation"]
54
+ new(attrs)
55
+ end
56
+
57
+ def serialize
58
+ out = Hash.new
59
+ out["allowedEventTypes"] = Svix::serialize_primitive(@allowed_event_types) if @allowed_event_types
60
+ out["description"] = Svix::serialize_primitive(@description) if @description
61
+ out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags
62
+ out["instructions"] = Svix::serialize_primitive(@instructions) if @instructions
63
+ out["kind"] = Svix::serialize_schema_ref(@kind) if @kind
64
+ out["logo"] = Svix::serialize_primitive(@logo) if @logo
65
+ out["name"] = Svix::serialize_primitive(@name) if @name
66
+ out["transformation"] = Svix::serialize_primitive(@transformation) if @transformation
67
+ out
68
+ end
69
+
70
+ # Serializes the object to a json string
71
+ # @return String
72
+ def to_json
73
+ JSON.dump(serialize)
74
+ end
75
+ end
76
+ end
@@ -4,13 +4,13 @@ require "json"
4
4
 
5
5
  module Svix
6
6
  class EnvironmentOut
7
+ attr_accessor :connectors
7
8
  attr_accessor :created_at
8
9
  attr_accessor :event_types
9
10
  attr_accessor :settings
10
- attr_accessor :transformation_templates
11
11
  attr_accessor :version
12
12
 
13
- ALL_FIELD ||= ["created_at", "event_types", "settings", "transformation_templates", "version"].freeze
13
+ ALL_FIELD ||= ["connectors", "created_at", "event_types", "settings", "version"].freeze
14
14
  private_constant :ALL_FIELD
15
15
 
16
16
  def initialize(attributes = {})
@@ -31,22 +31,20 @@ module Svix
31
31
  def self.deserialize(attributes = {})
32
32
  attributes = attributes.transform_keys(&:to_s)
33
33
  attrs = Hash.new
34
+ attrs["connectors"] = attributes["connectors"].map { |v| Svix::ConnectorOut.deserialize(v) }
34
35
  attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
35
36
  attrs["event_types"] = attributes["eventTypes"].map { |v| Svix::EventTypeOut.deserialize(v) }
36
37
  attrs["settings"] = attributes["settings"]
37
- attrs["transformation_templates"] = attributes["transformationTemplates"].map { |v|
38
- Svix::ConnectorOut.deserialize(v)
39
- }
40
38
  attrs["version"] = attributes["version"]
41
39
  new(attrs)
42
40
  end
43
41
 
44
42
  def serialize
45
43
  out = Hash.new
44
+ out["connectors"] = @connectors.map { |v| v.serialize } if @connectors
46
45
  out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
47
46
  out["eventTypes"] = @event_types.map { |v| v.serialize } if @event_types
48
47
  out["settings"] = Svix::serialize_primitive(@settings) if @settings
49
- out["transformationTemplates"] = @transformation_templates.map { |v| v.serialize } if @transformation_templates
50
48
  out["version"] = Svix::serialize_primitive(@version) if @version
51
49
  out
52
50
  end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class HttpAttemptTimes
7
+ attr_accessor :end
8
+ attr_accessor :start
9
+
10
+ ALL_FIELD ||= ["end", "start"].freeze
11
+ private_constant :ALL_FIELD
12
+
13
+ def initialize(attributes = {})
14
+ unless attributes.is_a?(Hash)
15
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::HttpAttemptTimes` new method")
16
+ end
17
+
18
+ attributes.each do |k, v|
19
+ unless ALL_FIELD.include?(k.to_s)
20
+ fail(ArgumentError, "The field #{k} is not part of Svix::HttpAttemptTimes")
21
+ end
22
+
23
+ instance_variable_set("@#{k}", v)
24
+ instance_variable_set("@__#{k}_is_defined", true)
25
+ end
26
+ end
27
+
28
+ def self.deserialize(attributes = {})
29
+ attributes = attributes.transform_keys(&:to_s)
30
+ attrs = Hash.new
31
+ attrs["end"] = DateTime.rfc3339(attributes["end"]).to_time
32
+ attrs["start"] = DateTime.rfc3339(attributes["start"]).to_time
33
+ new(attrs)
34
+ end
35
+
36
+ def serialize
37
+ out = Hash.new
38
+ out["end"] = Svix::serialize_primitive(@end) if @end
39
+ out["start"] = Svix::serialize_primitive(@start) if @start
40
+ out
41
+ end
42
+
43
+ # Serializes the object to a json string
44
+ # @return String
45
+ def to_json
46
+ JSON.dump(serialize)
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class ListResponseConnectorOut
7
+ attr_accessor :data
8
+ attr_accessor :done
9
+ attr_accessor :iterator
10
+ attr_accessor :prev_iterator
11
+
12
+ ALL_FIELD ||= ["data", "done", "iterator", "prev_iterator"].freeze
13
+ private_constant :ALL_FIELD
14
+
15
+ def initialize(attributes = {})
16
+ unless attributes.is_a?(Hash)
17
+ fail(
18
+ ArgumentError,
19
+ "The input argument (attributes) must be a hash in `Svix::ListResponseConnectorOut` new method"
20
+ )
21
+ end
22
+
23
+ attributes.each do |k, v|
24
+ unless ALL_FIELD.include?(k.to_s)
25
+ fail(ArgumentError, "The field #{k} is not part of Svix::ListResponseConnectorOut")
26
+ end
27
+
28
+ instance_variable_set("@#{k}", v)
29
+ instance_variable_set("@__#{k}_is_defined", true)
30
+ end
31
+ end
32
+
33
+ def self.deserialize(attributes = {})
34
+ attributes = attributes.transform_keys(&:to_s)
35
+ attrs = Hash.new
36
+ attrs["data"] = attributes["data"].map { |v| Svix::ConnectorOut.deserialize(v) }
37
+ attrs["done"] = attributes["done"]
38
+ attrs["iterator"] = attributes["iterator"]
39
+ attrs["prev_iterator"] = attributes["prevIterator"]
40
+ new(attrs)
41
+ end
42
+
43
+ def serialize
44
+ out = Hash.new
45
+ out["data"] = @data.map { |v| v.serialize } if @data
46
+ out["done"] = Svix::serialize_primitive(@done) if @done
47
+ out["iterator"] = Svix::serialize_primitive(@iterator) if @iterator
48
+ out["prevIterator"] = Svix::serialize_primitive(@prev_iterator) if @prev_iterator
49
+ out
50
+ end
51
+
52
+ # Serializes the object to a json string
53
+ # @return String
54
+ def to_json
55
+ JSON.dump(serialize)
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,112 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class MessageAttemptLog
7
+ # The Application's ID.
8
+ attr_accessor :app_id
9
+ # The Application's UID.
10
+ attr_accessor :app_uid
11
+ attr_accessor :attempt_count
12
+ attr_accessor :attempt_end
13
+ # The MessageAttempt's ID.
14
+ attr_accessor :attempt_id
15
+ attr_accessor :attempt_start
16
+ # The Endpoint's ID.
17
+ attr_accessor :endpoint_id
18
+ # The event type's name
19
+ attr_accessor :event_type
20
+ attr_accessor :http_times
21
+ attr_accessor :msg_created
22
+ # The Message's UID.
23
+ attr_accessor :msg_event_id
24
+ # The Message's ID.
25
+ attr_accessor :msg_id
26
+ # The Environment's ID.
27
+ attr_accessor :org_id
28
+ attr_accessor :response_status_code
29
+ attr_accessor :status
30
+
31
+ ALL_FIELD ||= [
32
+ "app_id",
33
+ "app_uid",
34
+ "attempt_count",
35
+ "attempt_end",
36
+ "attempt_id",
37
+ "attempt_start",
38
+ "endpoint_id",
39
+ "event_type",
40
+ "http_times",
41
+ "msg_created",
42
+ "msg_event_id",
43
+ "msg_id",
44
+ "org_id",
45
+ "response_status_code",
46
+ "status"
47
+ ].freeze
48
+ private_constant :ALL_FIELD
49
+
50
+ def initialize(attributes = {})
51
+ unless attributes.is_a?(Hash)
52
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::MessageAttemptLog` new method")
53
+ end
54
+
55
+ attributes.each do |k, v|
56
+ unless ALL_FIELD.include?(k.to_s)
57
+ fail(ArgumentError, "The field #{k} is not part of Svix::MessageAttemptLog")
58
+ end
59
+
60
+ instance_variable_set("@#{k}", v)
61
+ instance_variable_set("@__#{k}_is_defined", true)
62
+ end
63
+ end
64
+
65
+ def self.deserialize(attributes = {})
66
+ attributes = attributes.transform_keys(&:to_s)
67
+ attrs = Hash.new
68
+ attrs["app_id"] = attributes["appId"]
69
+ attrs["app_uid"] = attributes["appUid"]
70
+ attrs["attempt_count"] = attributes["attemptCount"]
71
+ attrs["attempt_end"] = DateTime.rfc3339(attributes["attemptEnd"]).to_time
72
+ attrs["attempt_id"] = attributes["attemptId"]
73
+ attrs["attempt_start"] = DateTime.rfc3339(attributes["attemptStart"]).to_time
74
+ attrs["endpoint_id"] = attributes["endpointId"]
75
+ attrs["event_type"] = attributes["eventType"]
76
+ attrs["http_times"] = Svix::HttpAttemptTimes.deserialize(attributes["httpTimes"]) if attributes["httpTimes"]
77
+ attrs["msg_created"] = DateTime.rfc3339(attributes["msgCreated"]).to_time
78
+ attrs["msg_event_id"] = attributes["msgEventId"]
79
+ attrs["msg_id"] = attributes["msgId"]
80
+ attrs["org_id"] = attributes["orgId"]
81
+ attrs["response_status_code"] = attributes["responseStatusCode"]
82
+ attrs["status"] = Svix::MessageStatus.deserialize(attributes["status"])
83
+ new(attrs)
84
+ end
85
+
86
+ def serialize
87
+ out = Hash.new
88
+ out["appId"] = Svix::serialize_primitive(@app_id) if @app_id
89
+ out["appUid"] = Svix::serialize_primitive(@app_uid) if @app_uid
90
+ out["attemptCount"] = Svix::serialize_primitive(@attempt_count) if @attempt_count
91
+ out["attemptEnd"] = Svix::serialize_primitive(@attempt_end) if @attempt_end
92
+ out["attemptId"] = Svix::serialize_primitive(@attempt_id) if @attempt_id
93
+ out["attemptStart"] = Svix::serialize_primitive(@attempt_start) if @attempt_start
94
+ out["endpointId"] = Svix::serialize_primitive(@endpoint_id) if @endpoint_id
95
+ out["eventType"] = Svix::serialize_primitive(@event_type) if @event_type
96
+ out["httpTimes"] = Svix::serialize_schema_ref(@http_times) if @http_times
97
+ out["msgCreated"] = Svix::serialize_primitive(@msg_created) if @msg_created
98
+ out["msgEventId"] = Svix::serialize_primitive(@msg_event_id) if @msg_event_id
99
+ out["msgId"] = Svix::serialize_primitive(@msg_id) if @msg_id
100
+ out["orgId"] = Svix::serialize_primitive(@org_id) if @org_id
101
+ out["responseStatusCode"] = Svix::serialize_primitive(@response_status_code) if @response_status_code
102
+ out["status"] = Svix::serialize_schema_ref(@status) if @status
103
+ out
104
+ end
105
+
106
+ # Serializes the object to a json string
107
+ # @return String
108
+ def to_json
109
+ JSON.dump(serialize)
110
+ end
111
+ end
112
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ # Sent after message attempts are made. Contains metadata about message attempts and their results. In order to reduce the frequency of webhooks, these are sent in batches periodically.
7
+ class MessageAttemptLogEvent
8
+ attr_accessor :data
9
+ attr_accessor :type
10
+
11
+ ALL_FIELD ||= ["data", "type"].freeze
12
+ private_constant :ALL_FIELD
13
+
14
+ def initialize(attributes = {})
15
+ unless attributes.is_a?(Hash)
16
+ fail(
17
+ ArgumentError,
18
+ "The input argument (attributes) must be a hash in `Svix::MessageAttemptLogEvent` new method"
19
+ )
20
+ end
21
+
22
+ attributes.each do |k, v|
23
+ unless ALL_FIELD.include?(k.to_s)
24
+ fail(ArgumentError, "The field #{k} is not part of Svix::MessageAttemptLogEvent")
25
+ end
26
+
27
+ instance_variable_set("@#{k}", v)
28
+ instance_variable_set("@__#{k}_is_defined", true)
29
+ end
30
+ end
31
+
32
+ def self.deserialize(attributes = {})
33
+ attributes = attributes.transform_keys(&:to_s)
34
+ attrs = Hash.new
35
+ attrs["data"] = attributes["data"].map { |v| Svix::MessageAttemptLog.deserialize(v) }
36
+ attrs["type"] = attributes["type"]
37
+ new(attrs)
38
+ end
39
+
40
+ def serialize
41
+ out = Hash.new
42
+ out["data"] = @data.map { |v| v.serialize } if @data
43
+ out["type"] = Svix::serialize_primitive(@type) if @type
44
+ out
45
+ end
46
+
47
+ # Serializes the object to a json string
48
+ # @return String
49
+ def to_json
50
+ JSON.dump(serialize)
51
+ end
52
+ end
53
+ end
data/lib/svix/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- VERSION = "1.80.0"
4
+ VERSION = "1.82.0"
5
5
  end
data/lib/svix.rb CHANGED
@@ -11,6 +11,7 @@ require "logger"
11
11
  require "svix/api/application"
12
12
  require "svix/api/authentication"
13
13
  require "svix/api/background_task"
14
+ require "svix/api/connector"
14
15
  require "svix/api/endpoint"
15
16
  require "svix/api/environment"
16
17
  require "svix/api/event_type"
@@ -60,6 +61,9 @@ require "svix/models/checkbook_config_out"
60
61
  require "svix/models/connector_in"
61
62
  require "svix/models/connector_kind"
62
63
  require "svix/models/connector_out"
64
+ require "svix/models/connector_patch"
65
+ require "svix/models/connector_product"
66
+ require "svix/models/connector_update"
63
67
  require "svix/models/create_stream_events_in"
64
68
  require "svix/models/create_stream_events_out"
65
69
  require "svix/models/cron_config"
@@ -113,6 +117,7 @@ require "svix/models/github_config"
113
117
  require "svix/models/github_config_out"
114
118
  require "svix/models/google_cloud_storage_config"
115
119
  require "svix/models/google_cloud_storage_patch_config"
120
+ require "svix/models/http_attempt_times"
116
121
  require "svix/models/http_patch_config"
117
122
  require "svix/models/http_sink_headers_patch_in"
118
123
  require "svix/models/hubspot_config"
@@ -143,6 +148,7 @@ require "svix/models/integration_out"
143
148
  require "svix/models/integration_update"
144
149
  require "svix/models/list_response_application_out"
145
150
  require "svix/models/list_response_background_task_out"
151
+ require "svix/models/list_response_connector_out"
146
152
  require "svix/models/list_response_endpoint_message_out"
147
153
  require "svix/models/list_response_endpoint_out"
148
154
  require "svix/models/list_response_event_type_out"
@@ -161,6 +167,8 @@ require "svix/models/message_attempt_exhausted_event_data"
161
167
  require "svix/models/message_attempt_failed_data"
162
168
  require "svix/models/message_attempt_failing_event"
163
169
  require "svix/models/message_attempt_failing_event_data"
170
+ require "svix/models/message_attempt_log"
171
+ require "svix/models/message_attempt_log_event"
164
172
  require "svix/models/message_attempt_out"
165
173
  require "svix/models/message_attempt_recovered_event"
166
174
  require "svix/models/message_attempt_recovered_event_data"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.80.0
4
+ version: 1.82.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-10-24 00:00:00.000000000 Z
10
+ date: 2025-12-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rake
@@ -66,6 +66,7 @@ files:
66
66
  - lib/svix/api/application.rb
67
67
  - lib/svix/api/authentication.rb
68
68
  - lib/svix/api/background_task.rb
69
+ - lib/svix/api/connector.rb
69
70
  - lib/svix/api/endpoint.rb
70
71
  - lib/svix/api/environment.rb
71
72
  - lib/svix/api/event_type.rb
@@ -118,6 +119,9 @@ files:
118
119
  - lib/svix/models/connector_in.rb
119
120
  - lib/svix/models/connector_kind.rb
120
121
  - lib/svix/models/connector_out.rb
122
+ - lib/svix/models/connector_patch.rb
123
+ - lib/svix/models/connector_product.rb
124
+ - lib/svix/models/connector_update.rb
121
125
  - lib/svix/models/create_stream_events_in.rb
122
126
  - lib/svix/models/create_stream_events_out.rb
123
127
  - lib/svix/models/cron_config.rb
@@ -171,6 +175,7 @@ files:
171
175
  - lib/svix/models/github_config_out.rb
172
176
  - lib/svix/models/google_cloud_storage_config.rb
173
177
  - lib/svix/models/google_cloud_storage_patch_config.rb
178
+ - lib/svix/models/http_attempt_times.rb
174
179
  - lib/svix/models/http_patch_config.rb
175
180
  - lib/svix/models/http_sink_headers_patch_in.rb
176
181
  - lib/svix/models/hubspot_config.rb
@@ -201,6 +206,7 @@ files:
201
206
  - lib/svix/models/integration_update.rb
202
207
  - lib/svix/models/list_response_application_out.rb
203
208
  - lib/svix/models/list_response_background_task_out.rb
209
+ - lib/svix/models/list_response_connector_out.rb
204
210
  - lib/svix/models/list_response_endpoint_message_out.rb
205
211
  - lib/svix/models/list_response_endpoint_out.rb
206
212
  - lib/svix/models/list_response_event_type_out.rb
@@ -219,6 +225,8 @@ files:
219
225
  - lib/svix/models/message_attempt_failed_data.rb
220
226
  - lib/svix/models/message_attempt_failing_event.rb
221
227
  - lib/svix/models/message_attempt_failing_event_data.rb
228
+ - lib/svix/models/message_attempt_log.rb
229
+ - lib/svix/models/message_attempt_log_event.rb
222
230
  - lib/svix/models/message_attempt_out.rb
223
231
  - lib/svix/models/message_attempt_recovered_event.rb
224
232
  - lib/svix/models/message_attempt_recovered_event_data.rb