svix 1.75.0 → 1.75.1

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: ed8454956512da28a6f0ba94aa29aed62e216dc638807ba5f778b50ab98a6450
4
- data.tar.gz: fba4d196c8be52675f7f36bca7fddb9d01463bbdff82d98ce1008c0f68ae6f5c
3
+ metadata.gz: 8cb0c28e108cf0ba0d9ae19cfb3aa595e8e43b5040b14173f1446687a5c1da17
4
+ data.tar.gz: b36ab7b2b1d0ceef7b959b88b53f07818742781d1c345d6ffb435e921154b76e
5
5
  SHA512:
6
- metadata.gz: 354a26132e88ebd3a4095573db18f4328e8744c6f07cea02b077ebc9a1f9ef58c7accaf9b40ae0c6118eb871208406415469b3a1bd67c3626c99a51145391be8
7
- data.tar.gz: bc34ad6096ccfccfaeefd8bbdfebb83da25bd88266eba5c7f6b0b815c9e980a00a7e5f3983609698110af2abd15b424b0db789559bc3efadb07c5e8030890283
6
+ metadata.gz: 2b4f1bbca4662e9a8ae8ca9309c595cbecce58d05d141f11a38afc03dbb5f62e1ff9b96f2400acdfc414b6bfc86df1e6284ddbebdf91fab3f471aceabfbb59c7
7
+ data.tar.gz: a0671fa3db29242d953b2b71afc8e30b052b10a04ea7ea8caa8e837bd4fe6b3dc59befa564318634a42309e86a27d5a795c715a670116ba5024f37a8873ba5e0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (1.75.0)
4
+ svix (1.75.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -96,5 +96,21 @@ module Svix
96
96
  )
97
97
  end
98
98
 
99
+ def get_transformation(source_id, endpoint_id)
100
+ res = @client.execute_request(
101
+ "GET",
102
+ "/ingest/api/v1/source/#{source_id}/endpoint/#{endpoint_id}/transformation"
103
+ )
104
+ IngestEndpointTransformationOut.deserialize(res)
105
+ end
106
+
107
+ def set_transformation(source_id, endpoint_id, ingest_endpoint_transformation_patch)
108
+ @client.execute_request(
109
+ "PATCH",
110
+ "/ingest/api/v1/source/#{source_id}/endpoint/#{endpoint_id}/transformation",
111
+ body: ingest_endpoint_transformation_patch
112
+ )
113
+ end
114
+
99
115
  end
100
116
  end
@@ -8,6 +8,22 @@ module Svix
8
8
  #
9
9
  # If the application id or uid that is used in the path already exists, this argument is ignored.
10
10
  attr_accessor :application
11
+ # Custom capabilities attached to the token, You can combine as many capabilities as necessary.
12
+ #
13
+ # The `ViewBase` capability is always required
14
+ #
15
+ # - `ViewBase`: Basic read only permissions, does not allow the user to see the endpoint secret.
16
+ #
17
+ # - `ViewEndpointSecret`: Allows user to view the endpoint secret.
18
+ #
19
+ # - `ManageEndpointSecret`: Allows user to rotate and view the endpoint secret.
20
+ #
21
+ # - `ManageTransformations`: Allows user to modify the endpoint transformations.
22
+ #
23
+ # - `CreateAttempts`: Allows user to replay missing messages and send example messages.
24
+ #
25
+ # - `ManageEndpoint`: Allows user to read/modify any field or configuration of an endpoint (including secrets)
26
+ attr_accessor :capabilities
11
27
  # How long the token will be valid for, in seconds.
12
28
  #
13
29
  # Valid values are between 1 hour and 7 days. The default is 7 days.
@@ -21,7 +37,7 @@ module Svix
21
37
  # When expiring tokens with "Expire All", you can include the session ID to only expire tokens that were created with that session ID.
22
38
  attr_accessor :session_id
23
39
 
24
- ALL_FIELD ||= ["application", "expiry", "feature_flags", "read_only", "session_id"].freeze
40
+ ALL_FIELD ||= ["application", "capabilities", "expiry", "feature_flags", "read_only", "session_id"].freeze
25
41
  private_constant :ALL_FIELD
26
42
 
27
43
  def initialize(attributes = {})
@@ -43,6 +59,10 @@ module Svix
43
59
  attributes = attributes.transform_keys(&:to_s)
44
60
  attrs = Hash.new
45
61
  attrs["application"] = Svix::ApplicationIn.deserialize(attributes["application"]) if attributes["application"]
62
+ if attributes["capabilities"]
63
+ attrs["capabilities"] = attributes["capabilities"].map { |v| Svix::AppPortalCapability.deserialize(v) }
64
+ end
65
+
46
66
  attrs["expiry"] = attributes["expiry"]
47
67
  attrs["feature_flags"] = attributes["featureFlags"]
48
68
  attrs["read_only"] = attributes["readOnly"]
@@ -53,6 +73,7 @@ module Svix
53
73
  def serialize
54
74
  out = Hash.new
55
75
  out["application"] = Svix::serialize_schema_ref(@application) if @application
76
+ out["capabilities"] = @capabilities.map { |v| v.serialize } if @capabilities
56
77
  out["expiry"] = Svix::serialize_primitive(@expiry) if @expiry
57
78
  out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags
58
79
  out["readOnly"] = Svix::serialize_primitive(@read_only) if @read_only
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ module Svix
4
+ class AppPortalCapability
5
+ VIEW_BASE = "ViewBase".freeze
6
+ VIEW_ENDPOINT_SECRET = "ViewEndpointSecret".freeze
7
+ MANAGE_ENDPOINT_SECRET = "ManageEndpointSecret".freeze
8
+ MANAGE_TRANSFORMATIONS = "ManageTransformations".freeze
9
+ CREATE_ATTEMPTS = "CreateAttempts".freeze
10
+ MANAGE_ENDPOINT = "ManageEndpoint".freeze
11
+
12
+ def self.all_vars
13
+ @all_vars ||= [
14
+ VIEW_BASE,
15
+ VIEW_ENDPOINT_SECRET,
16
+ MANAGE_ENDPOINT_SECRET,
17
+ MANAGE_TRANSFORMATIONS,
18
+ CREATE_ATTEMPTS,
19
+ MANAGE_ENDPOINT
20
+ ].freeze
21
+ end
22
+
23
+ def initialize(value)
24
+ unless AppPortalCapability.all_vars.include?(value)
25
+ raise "Invalid ENUM value '#{value}' for class #AppPortalCapability"
26
+ end
27
+
28
+ @value = value
29
+ end
30
+
31
+ def self.deserialize(value)
32
+ return value if AppPortalCapability.all_vars.include?(value)
33
+ raise "Invalid ENUM value '#{value}' for class #AppPortalCapability"
34
+ end
35
+
36
+ def serialize
37
+ @value
38
+ end
39
+ end
40
+ end
@@ -4,9 +4,11 @@ require "json"
4
4
 
5
5
  module Svix
6
6
  class EndpointHeadersPatchIn
7
+ # A list of headers be be removed
8
+ attr_accessor :delete_headers
7
9
  attr_accessor :headers
8
10
 
9
- ALL_FIELD ||= ["headers"].freeze
11
+ ALL_FIELD ||= ["delete_headers", "headers"].freeze
10
12
  private_constant :ALL_FIELD
11
13
 
12
14
  def initialize(attributes = {})
@@ -30,12 +32,14 @@ module Svix
30
32
  def self.deserialize(attributes = {})
31
33
  attributes = attributes.transform_keys(&:to_s)
32
34
  attrs = Hash.new
35
+ attrs["delete_headers"] = attributes["deleteHeaders"]
33
36
  attrs["headers"] = attributes["headers"]
34
37
  new(attrs)
35
38
  end
36
39
 
37
40
  def serialize
38
41
  out = Hash.new
42
+ out["deleteHeaders"] = Svix::serialize_primitive(@delete_headers) if @delete_headers
39
43
  out["headers"] = Svix::serialize_primitive(@headers) if @headers
40
44
  out
41
45
  end
@@ -16,10 +16,22 @@ module Svix
16
16
  attr_accessor :next_attempt
17
17
  attr_accessor :payload
18
18
  attr_accessor :status
19
+ attr_accessor :status_text
19
20
  attr_accessor :tags
20
21
  attr_accessor :timestamp
21
22
 
22
- ALL_FIELD ||= ["channels", "event_id", "event_type", "id", "next_attempt", "payload", "status", "tags", "timestamp"].freeze
23
+ ALL_FIELD ||= [
24
+ "channels",
25
+ "event_id",
26
+ "event_type",
27
+ "id",
28
+ "next_attempt",
29
+ "payload",
30
+ "status",
31
+ "status_text",
32
+ "tags",
33
+ "timestamp"
34
+ ].freeze
23
35
  private_constant :ALL_FIELD
24
36
 
25
37
  def initialize(attributes = {})
@@ -47,6 +59,7 @@ module Svix
47
59
  attrs["next_attempt"] = DateTime.rfc3339(attributes["nextAttempt"]).to_time if attributes["nextAttempt"]
48
60
  attrs["payload"] = attributes["payload"]
49
61
  attrs["status"] = Svix::MessageStatus.deserialize(attributes["status"])
62
+ attrs["status_text"] = Svix::MessageStatusText.deserialize(attributes["statusText"])
50
63
  attrs["tags"] = attributes["tags"]
51
64
  attrs["timestamp"] = DateTime.rfc3339(attributes["timestamp"]).to_time
52
65
  new(attrs)
@@ -61,6 +74,7 @@ module Svix
61
74
  out["nextAttempt"] = Svix::serialize_primitive(@next_attempt) if @next_attempt
62
75
  out["payload"] = Svix::serialize_primitive(@payload) if @payload
63
76
  out["status"] = Svix::serialize_schema_ref(@status) if @status
77
+ out["statusText"] = Svix::serialize_schema_ref(@status_text) if @status_text
64
78
  out["tags"] = Svix::serialize_primitive(@tags) if @tags
65
79
  out["timestamp"] = Svix::serialize_primitive(@timestamp) if @timestamp
66
80
  out
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class IngestEndpointTransformationOut
7
+ attr_accessor :code
8
+ attr_accessor :enabled
9
+
10
+ ALL_FIELD ||= ["code", "enabled"].freeze
11
+ private_constant :ALL_FIELD
12
+
13
+ def initialize(attributes = {})
14
+ unless attributes.is_a?(Hash)
15
+ fail(
16
+ ArgumentError,
17
+ "The input argument (attributes) must be a hash in `Svix::IngestEndpointTransformationOut` new method"
18
+ )
19
+ end
20
+
21
+ attributes.each do |k, v|
22
+ unless ALL_FIELD.include?(k.to_s)
23
+ fail(ArgumentError, "The field #{k} is not part of Svix::IngestEndpointTransformationOut")
24
+ end
25
+
26
+ instance_variable_set("@#{k}", v)
27
+ instance_variable_set("@__#{k}_is_defined", true)
28
+ end
29
+ end
30
+
31
+ def self.deserialize(attributes = {})
32
+ attributes = attributes.transform_keys(&:to_s)
33
+ attrs = Hash.new
34
+ attrs["code"] = attributes["code"]
35
+ attrs["enabled"] = attributes["enabled"]
36
+ new(attrs)
37
+ end
38
+
39
+ def serialize
40
+ out = Hash.new
41
+ out["code"] = Svix::serialize_primitive(@code) if @code
42
+ out["enabled"] = Svix::serialize_primitive(@enabled) if @enabled
43
+ out
44
+ end
45
+
46
+ # Serializes the object to a json string
47
+ # @return String
48
+ def to_json
49
+ JSON.dump(serialize)
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class IngestEndpointTransformationPatch
7
+ attr_accessor :code
8
+ attr_accessor :enabled
9
+
10
+ ALL_FIELD ||= ["code", "enabled"].freeze
11
+ private_constant :ALL_FIELD
12
+
13
+ def initialize(attributes = {})
14
+ unless attributes.is_a?(Hash)
15
+ fail(
16
+ ArgumentError,
17
+ "The input argument (attributes) must be a hash in `Svix::IngestEndpointTransformationPatch` new method"
18
+ )
19
+ end
20
+
21
+ attributes.each do |k, v|
22
+ unless ALL_FIELD.include?(k.to_s)
23
+ fail(ArgumentError, "The field #{k} is not part of Svix::IngestEndpointTransformationPatch")
24
+ end
25
+
26
+ instance_variable_set("@#{k}", v)
27
+ instance_variable_set("@__#{k}_is_defined", true)
28
+ end
29
+ end
30
+
31
+ def self.deserialize(attributes = {})
32
+ attributes = attributes.transform_keys(&:to_s)
33
+ attrs = Hash.new
34
+ attrs["code"] = attributes["code"]
35
+ attrs["enabled"] = attributes["enabled"]
36
+ new(attrs)
37
+ end
38
+
39
+ def serialize
40
+ out = Hash.new
41
+ out["code"] = Svix::serialize_primitive(@code) if @__code_is_defined
42
+ out["enabled"] = Svix::serialize_primitive(@enabled) if @enabled
43
+ out
44
+ end
45
+
46
+ # Serializes the object to a json string
47
+ # @return String
48
+ def to_json
49
+ JSON.dump(serialize)
50
+ end
51
+ end
52
+ end
@@ -16,6 +16,7 @@ module Svix
16
16
  attr_accessor :response_duration_ms
17
17
  attr_accessor :response_status_code
18
18
  attr_accessor :status
19
+ attr_accessor :status_text
19
20
  attr_accessor :timestamp
20
21
  attr_accessor :trigger_type
21
22
  attr_accessor :url
@@ -29,6 +30,7 @@ module Svix
29
30
  "response_duration_ms",
30
31
  "response_status_code",
31
32
  "status",
33
+ "status_text",
32
34
  "timestamp",
33
35
  "trigger_type",
34
36
  "url"
@@ -61,6 +63,7 @@ module Svix
61
63
  attrs["response_duration_ms"] = attributes["responseDurationMs"]
62
64
  attrs["response_status_code"] = attributes["responseStatusCode"]
63
65
  attrs["status"] = Svix::MessageStatus.deserialize(attributes["status"])
66
+ attrs["status_text"] = Svix::MessageStatusText.deserialize(attributes["statusText"])
64
67
  attrs["timestamp"] = DateTime.rfc3339(attributes["timestamp"]).to_time
65
68
  attrs["trigger_type"] = Svix::MessageAttemptTriggerType.deserialize(attributes["triggerType"])
66
69
  attrs["url"] = attributes["url"]
@@ -77,6 +80,7 @@ module Svix
77
80
  out["responseDurationMs"] = Svix::serialize_primitive(@response_duration_ms) if @response_duration_ms
78
81
  out["responseStatusCode"] = Svix::serialize_primitive(@response_status_code) if @response_status_code
79
82
  out["status"] = Svix::serialize_schema_ref(@status) if @status
83
+ out["statusText"] = Svix::serialize_schema_ref(@status_text) if @status_text
80
84
  out["timestamp"] = Svix::serialize_primitive(@timestamp) if @timestamp
81
85
  out["triggerType"] = Svix::serialize_schema_ref(@trigger_type) if @trigger_type
82
86
  out["url"] = Svix::serialize_primitive(@url) if @url
@@ -16,6 +16,7 @@ module Svix
16
16
  attr_accessor :next_attempt
17
17
  attr_accessor :rate_limit
18
18
  attr_accessor :status
19
+ attr_accessor :status_text
19
20
  # Optional unique identifier for the endpoint.
20
21
  attr_accessor :uid
21
22
  attr_accessor :updated_at
@@ -32,6 +33,7 @@ module Svix
32
33
  "next_attempt",
33
34
  "rate_limit",
34
35
  "status",
36
+ "status_text",
35
37
  "uid",
36
38
  "updated_at",
37
39
  "url",
@@ -66,6 +68,7 @@ module Svix
66
68
  attrs["next_attempt"] = DateTime.rfc3339(attributes["nextAttempt"]).to_time if attributes["nextAttempt"]
67
69
  attrs["rate_limit"] = attributes["rateLimit"]
68
70
  attrs["status"] = Svix::MessageStatus.deserialize(attributes["status"])
71
+ attrs["status_text"] = Svix::MessageStatusText.deserialize(attributes["statusText"])
69
72
  attrs["uid"] = attributes["uid"]
70
73
  attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
71
74
  attrs["url"] = attributes["url"]
@@ -84,6 +87,7 @@ module Svix
84
87
  out["nextAttempt"] = Svix::serialize_primitive(@next_attempt) if @next_attempt
85
88
  out["rateLimit"] = Svix::serialize_primitive(@rate_limit) if @rate_limit
86
89
  out["status"] = Svix::serialize_schema_ref(@status) if @status
90
+ out["statusText"] = Svix::serialize_schema_ref(@status_text) if @status_text
87
91
  out["uid"] = Svix::serialize_primitive(@uid) if @uid
88
92
  out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
89
93
  out["url"] = Svix::serialize_primitive(@url) if @url
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ module Svix
4
+ class MessageStatusText
5
+ SUCCESS = "success".freeze
6
+ PENDING = "pending".freeze
7
+ FAIL = "fail".freeze
8
+ SENDING = "sending".freeze
9
+
10
+ def self.all_vars
11
+ @all_vars ||= [SUCCESS, PENDING, FAIL, SENDING].freeze
12
+ end
13
+
14
+ def initialize(value)
15
+ unless MessageStatusText.all_vars.include?(value)
16
+ raise "Invalid ENUM value '#{value}' for class #MessageStatusText"
17
+ end
18
+
19
+ @value = value
20
+ end
21
+
22
+ def self.deserialize(value)
23
+ return value if MessageStatusText.all_vars.include?(value)
24
+ raise "Invalid ENUM value '#{value}' for class #MessageStatusText"
25
+ end
26
+
27
+ def serialize
28
+ @value
29
+ end
30
+ end
31
+ 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.75.0"
4
+ VERSION = "1.75.1"
5
5
  end
data/lib/svix.rb CHANGED
@@ -34,6 +34,7 @@ require "svix/models/airwallex_config"
34
34
  require "svix/models/airwallex_config_out"
35
35
  require "svix/models/app_portal_access_in"
36
36
  require "svix/models/app_portal_access_out"
37
+ require "svix/models/app_portal_capability"
37
38
  require "svix/models/app_usage_stats_in"
38
39
  require "svix/models/app_usage_stats_out"
39
40
  require "svix/models/application_in"
@@ -103,6 +104,8 @@ require "svix/models/ingest_endpoint_in"
103
104
  require "svix/models/ingest_endpoint_out"
104
105
  require "svix/models/ingest_endpoint_secret_in"
105
106
  require "svix/models/ingest_endpoint_secret_out"
107
+ require "svix/models/ingest_endpoint_transformation_out"
108
+ require "svix/models/ingest_endpoint_transformation_patch"
106
109
  require "svix/models/ingest_endpoint_update"
107
110
  require "svix/models/ingest_source_consumer_portal_access_in"
108
111
  require "svix/models/ingest_source_in"
@@ -136,6 +139,7 @@ require "svix/models/message_endpoint_out"
136
139
  require "svix/models/message_in"
137
140
  require "svix/models/message_out"
138
141
  require "svix/models/message_status"
142
+ require "svix/models/message_status_text"
139
143
  require "svix/models/operational_webhook_endpoint_headers_in"
140
144
  require "svix/models/operational_webhook_endpoint_headers_out"
141
145
  require "svix/models/operational_webhook_endpoint_in"
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.75.0
4
+ version: 1.75.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-08-26 00:00:00.000000000 Z
10
+ date: 2025-09-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rake
@@ -92,6 +92,7 @@ files:
92
92
  - lib/svix/models/airwallex_config_out.rb
93
93
  - lib/svix/models/app_portal_access_in.rb
94
94
  - lib/svix/models/app_portal_access_out.rb
95
+ - lib/svix/models/app_portal_capability.rb
95
96
  - lib/svix/models/app_usage_stats_in.rb
96
97
  - lib/svix/models/app_usage_stats_out.rb
97
98
  - lib/svix/models/application_in.rb
@@ -161,6 +162,8 @@ files:
161
162
  - lib/svix/models/ingest_endpoint_out.rb
162
163
  - lib/svix/models/ingest_endpoint_secret_in.rb
163
164
  - lib/svix/models/ingest_endpoint_secret_out.rb
165
+ - lib/svix/models/ingest_endpoint_transformation_out.rb
166
+ - lib/svix/models/ingest_endpoint_transformation_patch.rb
164
167
  - lib/svix/models/ingest_endpoint_update.rb
165
168
  - lib/svix/models/ingest_source_consumer_portal_access_in.rb
166
169
  - lib/svix/models/ingest_source_in.rb
@@ -194,6 +197,7 @@ files:
194
197
  - lib/svix/models/message_in.rb
195
198
  - lib/svix/models/message_out.rb
196
199
  - lib/svix/models/message_status.rb
200
+ - lib/svix/models/message_status_text.rb
197
201
  - lib/svix/models/operational_webhook_endpoint_headers_in.rb
198
202
  - lib/svix/models/operational_webhook_endpoint_headers_out.rb
199
203
  - lib/svix/models/operational_webhook_endpoint_in.rb