telnyx 5.67.1 → 5.68.2
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 +4 -4
- data/CHANGELOG.md +35 -0
- data/README.md +1 -1
- data/lib/telnyx/lib/webhook_verification.rb +1 -0
- data/lib/telnyx/lib/webhook_verification_error.rb +27 -0
- data/lib/telnyx/lib/webhooks_ed25519.rb +50 -0
- data/lib/telnyx/models/ai/voice_settings.rb +1 -1
- data/lib/telnyx/models/reputation_phone_number_with_reputation_data.rb +4 -22
- data/lib/telnyx/version.rb +1 -1
- data/rbi/telnyx/models/ai/voice_settings.rbi +2 -2
- data/rbi/telnyx/models/reputation_phone_number_with_reputation_data.rbi +6 -53
- data/sig/telnyx/models/reputation_phone_number_with_reputation_data.rbs +5 -17
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fc15a744f447e7c613e7e755a58535df1b6f45e5f2e224ca7c2ae0b34a047778
|
|
4
|
+
data.tar.gz: 647b8a4d529deb94ae909c30c7d1de71b00f5199f8caa7782508dd37550ca6a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 67a69b663b07bc3507001555c0178d4a4de7c9bc61b656970c25ab236377ee34b91723fb32bc6b821095007582d164bc8c46109d4f870548fa0cd7b38e2c7296
|
|
7
|
+
data.tar.gz: 633e6228be91505a6693026b2e64404fcf6f452ad0de12157f7845a0643b2f3131cc08bd13bdbd325d856db865fafc2509891d9fff1671e670b7ddf8f7436f5c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.68.2 (2026-03-31)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v5.68.1...v5.68.2](https://github.com/team-telnyx/telnyx-ruby/compare/v5.68.1...v5.68.2)
|
|
6
|
+
|
|
7
|
+
## 5.68.1 (2026-03-31)
|
|
8
|
+
|
|
9
|
+
Full Changelog: [v5.68.0...v5.68.1](https://github.com/team-telnyx/telnyx-ruby/compare/v5.68.0...v5.68.1)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **ci:** use correct rubygems OIDC action reference ([25859b2](https://github.com/team-telnyx/telnyx-ruby/commit/25859b2521364b0bbdf2e7d69ef709e22b30e3a4))
|
|
14
|
+
|
|
15
|
+
## 5.68.0 (2026-03-30)
|
|
16
|
+
|
|
17
|
+
Full Changelog: [v5.67.1...v5.68.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.67.1...v5.68.0)
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **ci:** switch to OIDC auth for RubyGems publishing ([9adb006](https://github.com/team-telnyx/telnyx-ruby/commit/9adb006d99fa6afb39568e5252f5445f13130a23))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Chores
|
|
25
|
+
|
|
26
|
+
* **ci:** support opting out of skipping builds on metadata-only commits ([b965999](https://github.com/team-telnyx/telnyx-ruby/commit/b965999a809754eec80ea0a52d484e0af183fabe))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Documentation
|
|
30
|
+
|
|
31
|
+
* fix voice settings available voices link ([0c73354](https://github.com/team-telnyx/telnyx-ruby/commit/0c73354fc70981237f2bfbdefd59b1229dfdcbf3))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Build System
|
|
35
|
+
|
|
36
|
+
* **deps-dev:** bump activesupport from 8.1.1 to 8.1.2.1 ([#188](https://github.com/team-telnyx/telnyx-ruby/issues/188)) ([322ba2a](https://github.com/team-telnyx/telnyx-ruby/commit/322ba2afdc721a3126faa981d663b2d41cac86ea))
|
|
37
|
+
|
|
3
38
|
## 5.67.1 (2026-03-26)
|
|
4
39
|
|
|
5
40
|
Full Changelog: [v5.67.0...v5.67.1](https://github.com/team-telnyx/telnyx-ruby/compare/v5.67.0...v5.67.1)
|
data/README.md
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Errors
|
|
5
|
+
# Error raised when webhook signature verification fails.
|
|
6
|
+
#
|
|
7
|
+
# This error is raised by the webhook verification module when:
|
|
8
|
+
# - No public key is configured
|
|
9
|
+
# - Required headers are missing (telnyx-signature-ed25519, telnyx-timestamp)
|
|
10
|
+
# - Timestamp is too old or too new (outside 5-minute tolerance)
|
|
11
|
+
# - Signature verification fails
|
|
12
|
+
# - Public key or signature format is invalid
|
|
13
|
+
#
|
|
14
|
+
# @example Handling verification errors
|
|
15
|
+
# begin
|
|
16
|
+
# client.webhooks.verify!(payload, headers)
|
|
17
|
+
# rescue Telnyx::Errors::WebhookVerificationError => e
|
|
18
|
+
# puts "Webhook verification failed: #{e.message}"
|
|
19
|
+
# end
|
|
20
|
+
class WebhookVerificationError < StandardError
|
|
21
|
+
# @param message [String] The error message describing the verification failure
|
|
22
|
+
def initialize(message:)
|
|
23
|
+
super(message)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "webhook_verification"
|
|
4
|
+
require_relative "webhook_verification_error"
|
|
5
|
+
|
|
6
|
+
module Telnyx
|
|
7
|
+
module Resources
|
|
8
|
+
# Extends the generated Webhooks class with ED25519 signature verification.
|
|
9
|
+
#
|
|
10
|
+
# This reopens the Webhooks class to include the WebhookVerification module,
|
|
11
|
+
# which adds ED25519 signature verification matching Python, Node, Go, and Java SDKs.
|
|
12
|
+
#
|
|
13
|
+
# Usage:
|
|
14
|
+
#
|
|
15
|
+
# require "telnyx"
|
|
16
|
+
# require "telnyx/lib/webhooks_ed25519"
|
|
17
|
+
#
|
|
18
|
+
# client = Telnyx::Client.new(
|
|
19
|
+
# api_key: ENV["TELNYX_API_KEY"],
|
|
20
|
+
# public_key: ENV["TELNYX_PUBLIC_KEY"] # Base64 from Mission Control
|
|
21
|
+
# )
|
|
22
|
+
#
|
|
23
|
+
# # Verify signature only (raises WebhookVerificationError on failure)
|
|
24
|
+
# client.webhooks.verify!(payload, headers)
|
|
25
|
+
#
|
|
26
|
+
# # Verify and parse (ED25519 verification, then parse)
|
|
27
|
+
# event = client.webhooks.unwrap(payload, headers: headers)
|
|
28
|
+
#
|
|
29
|
+
class Webhooks
|
|
30
|
+
include Telnyx::Lib::WebhookVerification
|
|
31
|
+
|
|
32
|
+
# Override unwrap to use ED25519 verification instead of StandardWebhooks.
|
|
33
|
+
#
|
|
34
|
+
# @param payload [String] The raw webhook payload as a string
|
|
35
|
+
# @param headers [Hash{String=>String}] The raw HTTP headers
|
|
36
|
+
# @param key [String, nil] Optional public key override (base64-encoded ED25519)
|
|
37
|
+
#
|
|
38
|
+
# @return [Telnyx::Models::UnwrapWebhookEvent]
|
|
39
|
+
# @raise [Telnyx::Errors::WebhookVerificationError] If verification fails
|
|
40
|
+
def unwrap(payload, headers:, key: nil)
|
|
41
|
+
# Use ED25519 verification
|
|
42
|
+
do_verify_signature(payload, headers, key || @client.public_key)
|
|
43
|
+
|
|
44
|
+
# Parse the payload
|
|
45
|
+
parsed = JSON.parse(payload, symbolize_names: true)
|
|
46
|
+
Telnyx::Internal::Type::Converter.coerce(Telnyx::Models::UnwrapWebhookEvent, parsed)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -6,7 +6,7 @@ module Telnyx
|
|
|
6
6
|
class VoiceSettings < Telnyx::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute voice
|
|
8
8
|
# The voice to be used by the voice assistant. Check the full list of
|
|
9
|
-
# [available voices](https://developers.telnyx.com/
|
|
9
|
+
# [available voices](https://developers.telnyx.com/docs/tts-stt/tts-available-voices)
|
|
10
10
|
# via our voices API. To use ElevenLabs, you must reference your ElevenLabs API
|
|
11
11
|
# key as an integration secret under the `api_key_ref` field. See
|
|
12
12
|
# [integration secrets documentation](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
@@ -28,10 +28,10 @@ module Telnyx
|
|
|
28
28
|
optional :phone_number, String
|
|
29
29
|
|
|
30
30
|
# @!attribute reputation_data
|
|
31
|
-
# Reputation metrics
|
|
31
|
+
# Reputation metrics
|
|
32
32
|
#
|
|
33
|
-
# @return [Telnyx::Models::ReputationData,
|
|
34
|
-
optional :reputation_data,
|
|
33
|
+
# @return [Telnyx::Models::ReputationData, nil]
|
|
34
|
+
optional :reputation_data, -> { Telnyx::ReputationData }
|
|
35
35
|
|
|
36
36
|
# @!attribute updated_at
|
|
37
37
|
# When the record was last updated
|
|
@@ -48,27 +48,9 @@ module Telnyx
|
|
|
48
48
|
#
|
|
49
49
|
# @param phone_number [String] Phone number in E.164 format
|
|
50
50
|
#
|
|
51
|
-
# @param reputation_data [Telnyx::Models::ReputationData
|
|
51
|
+
# @param reputation_data [Telnyx::Models::ReputationData] Reputation metrics
|
|
52
52
|
#
|
|
53
53
|
# @param updated_at [Time] When the record was last updated
|
|
54
|
-
|
|
55
|
-
# Reputation metrics (null if not yet fetched)
|
|
56
|
-
#
|
|
57
|
-
# @see Telnyx::Models::ReputationPhoneNumberWithReputationData#reputation_data
|
|
58
|
-
module ReputationData
|
|
59
|
-
extend Telnyx::Internal::Type::Union
|
|
60
|
-
|
|
61
|
-
# Reputation metrics
|
|
62
|
-
variant -> { Telnyx::ReputationData }
|
|
63
|
-
|
|
64
|
-
variant -> { Telnyx::Models::ReputationPhoneNumberWithReputationData::ReputationData::EmptyReputationDataMap }
|
|
65
|
-
|
|
66
|
-
# @!method self.variants
|
|
67
|
-
# @return [Array(Telnyx::Models::ReputationData, Hash{Symbol=>Object})]
|
|
68
|
-
|
|
69
|
-
# @type [Telnyx::Internal::Type::Converter]
|
|
70
|
-
EmptyReputationDataMap = Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
|
|
71
|
-
end
|
|
72
54
|
end
|
|
73
55
|
end
|
|
74
56
|
end
|
data/lib/telnyx/version.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Telnyx
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
# The voice to be used by the voice assistant. Check the full list of
|
|
13
|
-
# [available voices](https://developers.telnyx.com/
|
|
13
|
+
# [available voices](https://developers.telnyx.com/docs/tts-stt/tts-available-voices)
|
|
14
14
|
# via our voices API. To use ElevenLabs, you must reference your ElevenLabs API
|
|
15
15
|
# key as an integration secret under the `api_key_ref` field. See
|
|
16
16
|
# [integration secrets documentation](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
@@ -148,7 +148,7 @@ module Telnyx
|
|
|
148
148
|
end
|
|
149
149
|
def self.new(
|
|
150
150
|
# The voice to be used by the voice assistant. Check the full list of
|
|
151
|
-
# [available voices](https://developers.telnyx.com/
|
|
151
|
+
# [available voices](https://developers.telnyx.com/docs/tts-stt/tts-available-voices)
|
|
152
152
|
# via our voices API. To use ElevenLabs, you must reference your ElevenLabs API
|
|
153
153
|
# key as an integration secret under the `api_key_ref` field. See
|
|
154
154
|
# [integration secrets documentation](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
@@ -39,24 +39,11 @@ module Telnyx
|
|
|
39
39
|
sig { params(phone_number: String).void }
|
|
40
40
|
attr_writer :phone_number
|
|
41
41
|
|
|
42
|
-
# Reputation metrics
|
|
43
|
-
sig
|
|
44
|
-
returns(
|
|
45
|
-
T.nilable(
|
|
46
|
-
Telnyx::ReputationPhoneNumberWithReputationData::ReputationData::Variants
|
|
47
|
-
)
|
|
48
|
-
)
|
|
49
|
-
end
|
|
42
|
+
# Reputation metrics
|
|
43
|
+
sig { returns(T.nilable(Telnyx::ReputationData)) }
|
|
50
44
|
attr_reader :reputation_data
|
|
51
45
|
|
|
52
|
-
sig
|
|
53
|
-
params(
|
|
54
|
-
reputation_data:
|
|
55
|
-
T.nilable(
|
|
56
|
-
T.any(Telnyx::ReputationData::OrHash, T::Hash[Symbol, T.anything])
|
|
57
|
-
)
|
|
58
|
-
).void
|
|
59
|
-
end
|
|
46
|
+
sig { params(reputation_data: Telnyx::ReputationData::OrHash).void }
|
|
60
47
|
attr_writer :reputation_data
|
|
61
48
|
|
|
62
49
|
# When the record was last updated
|
|
@@ -72,10 +59,7 @@ module Telnyx
|
|
|
72
59
|
created_at: Time,
|
|
73
60
|
enterprise_id: String,
|
|
74
61
|
phone_number: String,
|
|
75
|
-
reputation_data:
|
|
76
|
-
T.nilable(
|
|
77
|
-
T.any(Telnyx::ReputationData::OrHash, T::Hash[Symbol, T.anything])
|
|
78
|
-
),
|
|
62
|
+
reputation_data: Telnyx::ReputationData::OrHash,
|
|
79
63
|
updated_at: Time
|
|
80
64
|
).returns(T.attached_class)
|
|
81
65
|
end
|
|
@@ -88,7 +72,7 @@ module Telnyx
|
|
|
88
72
|
enterprise_id: nil,
|
|
89
73
|
# Phone number in E.164 format
|
|
90
74
|
phone_number: nil,
|
|
91
|
-
# Reputation metrics
|
|
75
|
+
# Reputation metrics
|
|
92
76
|
reputation_data: nil,
|
|
93
77
|
# When the record was last updated
|
|
94
78
|
updated_at: nil
|
|
@@ -102,44 +86,13 @@ module Telnyx
|
|
|
102
86
|
created_at: Time,
|
|
103
87
|
enterprise_id: String,
|
|
104
88
|
phone_number: String,
|
|
105
|
-
reputation_data:
|
|
106
|
-
T.nilable(
|
|
107
|
-
Telnyx::ReputationPhoneNumberWithReputationData::ReputationData::Variants
|
|
108
|
-
),
|
|
89
|
+
reputation_data: Telnyx::ReputationData,
|
|
109
90
|
updated_at: Time
|
|
110
91
|
}
|
|
111
92
|
)
|
|
112
93
|
end
|
|
113
94
|
def to_hash
|
|
114
95
|
end
|
|
115
|
-
|
|
116
|
-
# Reputation metrics (null if not yet fetched)
|
|
117
|
-
module ReputationData
|
|
118
|
-
extend Telnyx::Internal::Type::Union
|
|
119
|
-
|
|
120
|
-
Variants =
|
|
121
|
-
T.type_alias do
|
|
122
|
-
T.nilable(
|
|
123
|
-
T.any(Telnyx::ReputationData, T::Hash[Symbol, T.anything])
|
|
124
|
-
)
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
sig do
|
|
128
|
-
override.returns(
|
|
129
|
-
T::Array[
|
|
130
|
-
Telnyx::ReputationPhoneNumberWithReputationData::ReputationData::Variants
|
|
131
|
-
]
|
|
132
|
-
)
|
|
133
|
-
end
|
|
134
|
-
def self.variants
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
EmptyReputationDataMap =
|
|
138
|
-
T.let(
|
|
139
|
-
Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
|
|
140
|
-
Telnyx::Internal::Type::Converter
|
|
141
|
-
)
|
|
142
|
-
end
|
|
143
96
|
end
|
|
144
97
|
end
|
|
145
98
|
end
|
|
@@ -6,7 +6,7 @@ module Telnyx
|
|
|
6
6
|
created_at: Time,
|
|
7
7
|
enterprise_id: String,
|
|
8
8
|
phone_number: String,
|
|
9
|
-
reputation_data: Telnyx::
|
|
9
|
+
reputation_data: Telnyx::ReputationData,
|
|
10
10
|
updated_at: Time
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -27,11 +27,9 @@ module Telnyx
|
|
|
27
27
|
|
|
28
28
|
def phone_number=: (String) -> String
|
|
29
29
|
|
|
30
|
-
attr_reader reputation_data: Telnyx::
|
|
30
|
+
attr_reader reputation_data: Telnyx::ReputationData?
|
|
31
31
|
|
|
32
|
-
def reputation_data=: (
|
|
33
|
-
Telnyx::Models::ReputationPhoneNumberWithReputationData::reputation_data?
|
|
34
|
-
) -> Telnyx::Models::ReputationPhoneNumberWithReputationData::reputation_data?
|
|
32
|
+
def reputation_data=: (Telnyx::ReputationData) -> Telnyx::ReputationData
|
|
35
33
|
|
|
36
34
|
attr_reader updated_at: Time?
|
|
37
35
|
|
|
@@ -42,7 +40,7 @@ module Telnyx
|
|
|
42
40
|
?created_at: Time,
|
|
43
41
|
?enterprise_id: String,
|
|
44
42
|
?phone_number: String,
|
|
45
|
-
?reputation_data: Telnyx::
|
|
43
|
+
?reputation_data: Telnyx::ReputationData,
|
|
46
44
|
?updated_at: Time
|
|
47
45
|
) -> void
|
|
48
46
|
|
|
@@ -51,19 +49,9 @@ module Telnyx
|
|
|
51
49
|
created_at: Time,
|
|
52
50
|
enterprise_id: String,
|
|
53
51
|
phone_number: String,
|
|
54
|
-
reputation_data: Telnyx::
|
|
52
|
+
reputation_data: Telnyx::ReputationData,
|
|
55
53
|
updated_at: Time
|
|
56
54
|
}
|
|
57
|
-
|
|
58
|
-
type reputation_data = (Telnyx::ReputationData | ::Hash[Symbol, top])?
|
|
59
|
-
|
|
60
|
-
module ReputationData
|
|
61
|
-
extend Telnyx::Internal::Type::Union
|
|
62
|
-
|
|
63
|
-
def self?.variants: -> ::Array[Telnyx::Models::ReputationPhoneNumberWithReputationData::reputation_data]
|
|
64
|
-
|
|
65
|
-
EmptyReputationDataMap: Telnyx::Internal::Type::Converter
|
|
66
|
-
end
|
|
67
55
|
end
|
|
68
56
|
end
|
|
69
57
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: telnyx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.68.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Telnyx
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -94,6 +94,8 @@ files:
|
|
|
94
94
|
- lib/telnyx/internal/type/unknown.rb
|
|
95
95
|
- lib/telnyx/internal/util.rb
|
|
96
96
|
- lib/telnyx/lib/webhook_verification.rb
|
|
97
|
+
- lib/telnyx/lib/webhook_verification_error.rb
|
|
98
|
+
- lib/telnyx/lib/webhooks_ed25519.rb
|
|
97
99
|
- lib/telnyx/lib/websocket.rb
|
|
98
100
|
- lib/telnyx/lib/websocket/base.rb
|
|
99
101
|
- lib/telnyx/lib/websocket/speech_to_text_stream_params.rb
|