svix 1.81.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: 051160cba42acfdc5b30ef98c0ffaa5ec738ed1d6b8ddfdbc6b0448fb4411a04
4
- data.tar.gz: 6fb0b8d98ad4717ee732e94a7f57cce8516dd18fd7d362093d2a417d1a8cb409
3
+ metadata.gz: fe562cc25a4c9a3553dd79de320a14ccc190310af38d14fc8837748b92c2e8c0
4
+ data.tar.gz: 30b61396d159559ee109f4b1620336583d02867d65e7045a89802498f8ccbfdb
5
5
  SHA512:
6
- metadata.gz: fdcb028e60226867537c3d3727c18e1e9a949da61b8fc372f21eb5d8d093e01a7425d0c06b1fbc83928ecb1aed9942647216ebd56e7ad76faad6366500c610af
7
- data.tar.gz: 9a75010b1f2f37279d569da2f74f22560d1679430294888ead8389117738c83cc43a12d624c188edb6fc8e5844a2c81c6cf175845f746512621e3516578fadb5
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.81.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"]
@@ -17,7 +17,8 @@ module Svix
17
17
  query_params: {
18
18
  "limit" => options["limit"],
19
19
  "iterator" => options["iterator"],
20
- "order" => options["order"]
20
+ "order" => options["order"],
21
+ "product_type" => options["product_type"]
21
22
  }
22
23
  )
23
24
  ListResponseConnectorOut.deserialize(res)
@@ -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
  #
@@ -11,7 +11,10 @@ module Svix
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 ||= [
17
20
  "allowed_event_types",
@@ -21,7 +24,9 @@ module Svix
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
 
@@ -50,7 +55,12 @@ module Svix
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
 
@@ -63,7 +73,9 @@ module Svix
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,
@@ -16,7 +16,10 @@ 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 ||= [
@@ -30,7 +33,9 @@ module Svix
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
@@ -63,7 +68,9 @@ module Svix
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
@@ -80,7 +87,9 @@ module Svix
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,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,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,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.81.0"
4
+ VERSION = "1.82.0"
5
5
  end
data/lib/svix.rb CHANGED
@@ -62,6 +62,7 @@ require "svix/models/connector_in"
62
62
  require "svix/models/connector_kind"
63
63
  require "svix/models/connector_out"
64
64
  require "svix/models/connector_patch"
65
+ require "svix/models/connector_product"
65
66
  require "svix/models/connector_update"
66
67
  require "svix/models/create_stream_events_in"
67
68
  require "svix/models/create_stream_events_out"
@@ -116,6 +117,7 @@ require "svix/models/github_config"
116
117
  require "svix/models/github_config_out"
117
118
  require "svix/models/google_cloud_storage_config"
118
119
  require "svix/models/google_cloud_storage_patch_config"
120
+ require "svix/models/http_attempt_times"
119
121
  require "svix/models/http_patch_config"
120
122
  require "svix/models/http_sink_headers_patch_in"
121
123
  require "svix/models/hubspot_config"
@@ -165,6 +167,8 @@ require "svix/models/message_attempt_exhausted_event_data"
165
167
  require "svix/models/message_attempt_failed_data"
166
168
  require "svix/models/message_attempt_failing_event"
167
169
  require "svix/models/message_attempt_failing_event_data"
170
+ require "svix/models/message_attempt_log"
171
+ require "svix/models/message_attempt_log_event"
168
172
  require "svix/models/message_attempt_out"
169
173
  require "svix/models/message_attempt_recovered_event"
170
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.81.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-28 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
@@ -120,6 +120,7 @@ files:
120
120
  - lib/svix/models/connector_kind.rb
121
121
  - lib/svix/models/connector_out.rb
122
122
  - lib/svix/models/connector_patch.rb
123
+ - lib/svix/models/connector_product.rb
123
124
  - lib/svix/models/connector_update.rb
124
125
  - lib/svix/models/create_stream_events_in.rb
125
126
  - lib/svix/models/create_stream_events_out.rb
@@ -174,6 +175,7 @@ files:
174
175
  - lib/svix/models/github_config_out.rb
175
176
  - lib/svix/models/google_cloud_storage_config.rb
176
177
  - lib/svix/models/google_cloud_storage_patch_config.rb
178
+ - lib/svix/models/http_attempt_times.rb
177
179
  - lib/svix/models/http_patch_config.rb
178
180
  - lib/svix/models/http_sink_headers_patch_in.rb
179
181
  - lib/svix/models/hubspot_config.rb
@@ -223,6 +225,8 @@ files:
223
225
  - lib/svix/models/message_attempt_failed_data.rb
224
226
  - lib/svix/models/message_attempt_failing_event.rb
225
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
226
230
  - lib/svix/models/message_attempt_out.rb
227
231
  - lib/svix/models/message_attempt_recovered_event.rb
228
232
  - lib/svix/models/message_attempt_recovered_event_data.rb