telnyx 5.93.0 → 5.95.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: b6b2c294fdc41c43c9c54835da7c720d652835a9355f4e311e7e598ceb957138
4
- data.tar.gz: 416b3f97abd69193e2354361f5b8333d3a2e43259d45f75ea5faa3f053de0ef0
3
+ metadata.gz: 983b777cfec44134445845b4820273fd5a66737d9468e13c4571240fa8c81c8a
4
+ data.tar.gz: 2f80d13386ce09cca4ae4af6dab1c407b55210b69274c2fdb93047a37347911b
5
5
  SHA512:
6
- metadata.gz: 25ebd760fefcccad22a65a42db426f9e95251f3ab0d7465c4a71b558fcb8ea500fecfdbd549d312bc7c27adb3c1ab6adb2b1ae680825433e6ad41bd20ac241e8
7
- data.tar.gz: f760b206e7430c6cf5d1753683792ed53a47f422a6bb60d0c84323006c96f158082d2e48013bbe5890139b8a62009490bb44bbc0aa97b241e61bf46c59033a0d
6
+ metadata.gz: 3fff9fb84a8a3a37a7058afec468394693ae00fdd1f7893436465fdd2b512d04af5c573e6392cf7a5f1973e4a4332028f11bc6573b8e79635edbe92aeb96865f
7
+ data.tar.gz: ae447016cb9c50548466304beaadd4bf4a53fdd4a4bffca1abd5cacd796c1ecb5759e0e746ff8ae2a93a829bde5b6446b94d30e14fd2305604adcb05ec7bd562
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.95.0 (2026-04-30)
4
+
5
+ Full Changelog: [v5.94.0...v5.95.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.94.0...v5.95.0)
6
+
7
+ ### Features
8
+
9
+ * AI-2183: Document dynamic variable support for transcription keyterm ([823e5bd](https://github.com/team-telnyx/telnyx-ruby/commit/823e5bdaa3679a150e76631e79841514215a5847))
10
+
11
+ ## 5.94.0 (2026-04-30)
12
+
13
+ Full Changelog: [v5.93.0...v5.94.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.93.0...v5.94.0)
14
+
15
+ ### Features
16
+
17
+ * Assistant tool targets master ([b06b562](https://github.com/team-telnyx/telnyx-ruby/commit/b06b562ff66c80a5afd7f0c82a2aa42241f7811c))
18
+
3
19
  ## 5.93.0 (2026-04-29)
4
20
 
5
21
  Full Changelog: [v5.92.0...v5.93.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.92.0...v5.93.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.93.0"
27
+ gem "telnyx", "~> 5.95.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -140,11 +140,12 @@ module Telnyx
140
140
 
141
141
  # @!attribute targets
142
142
  # The different possible targets of the transfer. The assistant will be able to
143
- # choose one of the targets to transfer the call to.
143
+ # choose one of the targets to transfer the call to. This can also be a dynamic
144
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
145
+ # variables webhook and resolves to an array of target objects at runtime.
144
146
  #
145
- # @return [Array<Telnyx::Models::AI::AssistantTool::Transfer::Transfer::Target>]
146
- required :targets,
147
- -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::AssistantTool::Transfer::Transfer::Target] }
147
+ # @return [Array<Telnyx::Models::AI::AssistantTool::Transfer::Transfer::Targets::UnionMember0>, String]
148
+ required :targets, union: -> { Telnyx::AI::AssistantTool::Transfer::Transfer::Targets }
148
149
 
149
150
  # @!attribute custom_headers
150
151
  # Custom headers to be added to the SIP INVITE for the transfer command.
@@ -183,7 +184,7 @@ module Telnyx
183
184
  #
184
185
  # @param from [String] Number or SIP URI placing the call.
185
186
  #
186
- # @param targets [Array<Telnyx::Models::AI::AssistantTool::Transfer::Transfer::Target>] The different possible targets of the transfer. The assistant will be able to ch
187
+ # @param targets [Array<Telnyx::Models::AI::AssistantTool::Transfer::Transfer::Targets::UnionMember0>, String] The different possible targets of the transfer. The assistant will be able to ch
187
188
  #
188
189
  # @param custom_headers [Array<Telnyx::Models::AI::AssistantTool::Transfer::Transfer::CustomHeader>] Custom headers to be added to the SIP INVITE for the transfer command.
189
190
  #
@@ -193,23 +194,47 @@ module Telnyx
193
194
  #
194
195
  # @param warm_transfer_instructions [String] Natural language instructions for your agent for how to provide context for the
195
196
 
196
- class Target < Telnyx::Internal::Type::BaseModel
197
- # @!attribute name
198
- # The name of the target.
199
- #
200
- # @return [String, nil]
201
- optional :name, String
197
+ # The different possible targets of the transfer. The assistant will be able to
198
+ # choose one of the targets to transfer the call to. This can also be a dynamic
199
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
200
+ # variables webhook and resolves to an array of target objects at runtime.
201
+ #
202
+ # @see Telnyx::Models::AI::AssistantTool::Transfer::Transfer#targets
203
+ module Targets
204
+ extend Telnyx::Internal::Type::Union
202
205
 
203
- # @!attribute to
204
- # The destination number or SIP URI of the call.
205
- #
206
- # @return [String, nil]
207
- optional :to, String
206
+ variant -> { Telnyx::Models::AI::AssistantTool::Transfer::Transfer::Targets::UnionMember0Array }
208
207
 
209
- # @!method initialize(name: nil, to: nil)
210
- # @param name [String] The name of the target.
211
- #
212
- # @param to [String] The destination number or SIP URI of the call.
208
+ # A dynamic variable string like `{{ targets }}` where `targets` is returned by the dynamic variables webhook and resolves to an array of target objects at runtime.
209
+ variant String
210
+
211
+ class UnionMember0 < Telnyx::Internal::Type::BaseModel
212
+ # @!attribute to
213
+ # The destination number or SIP URI of the call.
214
+ #
215
+ # @return [String]
216
+ required :to, String
217
+
218
+ # @!attribute name
219
+ # The name of the target.
220
+ #
221
+ # @return [String, nil]
222
+ optional :name, String
223
+
224
+ # @!method initialize(to:, name: nil)
225
+ # @param to [String] The destination number or SIP URI of the call.
226
+ #
227
+ # @param name [String] The name of the target.
228
+ end
229
+
230
+ # @!method self.variants
231
+ # @return [Array(Array<Telnyx::Models::AI::AssistantTool::Transfer::Transfer::Targets::UnionMember0>, String)]
232
+
233
+ # @type [Telnyx::Internal::Type::Converter]
234
+ UnionMember0Array =
235
+ Telnyx::Internal::Type::ArrayOf[-> {
236
+ Telnyx::AI::AssistantTool::Transfer::Transfer::Targets::UnionMember0
237
+ }]
213
238
  end
214
239
 
215
240
  class CustomHeader < Telnyx::Internal::Type::BaseModel
@@ -512,6 +537,21 @@ module Telnyx
512
537
  # @return [String, nil]
513
538
  optional :from, String
514
539
 
540
+ # @!attribute targets
541
+ # The different possible targets of the invite. The assistant will be able to
542
+ # choose one of the targets to invite to the call. This can also be a dynamic
543
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
544
+ # variables webhook and resolves to an array of target objects at runtime. If
545
+ # omitted or null, the invite tool can still be configured and targets may be
546
+ # supplied dynamically at runtime.
547
+ #
548
+ # @return [Array<Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::Targets::UnionMember0>, String, nil]
549
+ optional :targets,
550
+ union: -> {
551
+ Telnyx::AI::AssistantTool::Invite::InviteConfig::Targets
552
+ },
553
+ nil?: true
554
+
515
555
  # @!attribute voicemail_detection
516
556
  # Configuration for voicemail detection (AMD - Answering Machine Detection) on the
517
557
  # invited call.
@@ -519,7 +559,7 @@ module Telnyx
519
559
  # @return [Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::VoicemailDetection, nil]
520
560
  optional :voicemail_detection, -> { Telnyx::AI::AssistantTool::Invite::InviteConfig::VoicemailDetection }
521
561
 
522
- # @!method initialize(custom_headers: nil, from: nil, voicemail_detection: nil)
562
+ # @!method initialize(custom_headers: nil, from: nil, targets: nil, voicemail_detection: nil)
523
563
  # Some parameter documentations has been truncated, see
524
564
  # {Telnyx::Models::AI::AssistantTool::Invite::InviteConfig} for more details.
525
565
  #
@@ -527,6 +567,8 @@ module Telnyx
527
567
  #
528
568
  # @param from [String] Number or SIP URI placing the call.
529
569
  #
570
+ # @param targets [Array<Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::Targets::UnionMember0>, String, nil] The different possible targets of the invite. The assistant will be able to choo
571
+ #
530
572
  # @param voicemail_detection [Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::VoicemailDetection] Configuration for voicemail detection (AMD - Answering Machine Detection) on the
531
573
 
532
574
  class CustomHeader < Telnyx::Internal::Type::BaseModel
@@ -554,6 +596,51 @@ module Telnyx
554
596
  # @param value [String] The value of the header. Note that we support mustache templating for the value.
555
597
  end
556
598
 
599
+ # The different possible targets of the invite. The assistant will be able to
600
+ # choose one of the targets to invite to the call. This can also be a dynamic
601
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
602
+ # variables webhook and resolves to an array of target objects at runtime. If
603
+ # omitted or null, the invite tool can still be configured and targets may be
604
+ # supplied dynamically at runtime.
605
+ #
606
+ # @see Telnyx::Models::AI::AssistantTool::Invite::InviteConfig#targets
607
+ module Targets
608
+ extend Telnyx::Internal::Type::Union
609
+
610
+ variant -> { Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::Targets::UnionMember0Array }
611
+
612
+ # A dynamic variable string like `{{ targets }}` where `targets` is returned by the dynamic variables webhook and resolves to an array of target objects at runtime.
613
+ variant String
614
+
615
+ class UnionMember0 < Telnyx::Internal::Type::BaseModel
616
+ # @!attribute to
617
+ # The destination number or SIP URI of the call.
618
+ #
619
+ # @return [String]
620
+ required :to, String
621
+
622
+ # @!attribute name
623
+ # The name of the target.
624
+ #
625
+ # @return [String, nil]
626
+ optional :name, String
627
+
628
+ # @!method initialize(to:, name: nil)
629
+ # @param to [String] The destination number or SIP URI of the call.
630
+ #
631
+ # @param name [String] The name of the target.
632
+ end
633
+
634
+ # @!method self.variants
635
+ # @return [Array(Array<Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::Targets::UnionMember0>, String)]
636
+
637
+ # @type [Telnyx::Internal::Type::Converter]
638
+ UnionMember0Array =
639
+ Telnyx::Internal::Type::ArrayOf[-> {
640
+ Telnyx::AI::AssistantTool::Invite::InviteConfig::Targets::UnionMember0
641
+ }]
642
+ end
643
+
557
644
  # @see Telnyx::Models::AI::AssistantTool::Invite::InviteConfig#voicemail_detection
558
645
  class VoicemailDetection < Telnyx::Internal::Type::BaseModel
559
646
  # @!attribute detection_mode
@@ -37,7 +37,11 @@ module Telnyx
37
37
  # @!attribute keyterm
38
38
  # Available only for deepgram/nova-3 and deepgram/flux. A comma-separated list of
39
39
  # key terms to boost for recognition during transcription. Helps improve accuracy
40
- # for domain-specific terminology, proper nouns, or uncommon words.
40
+ # for domain-specific terminology, proper nouns, or uncommon words. This field may
41
+ # be templated with
42
+ # [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
43
+ # using mustache syntax (e.g. `Telnyx,{{customer_name}},VoIP`). Variables are
44
+ # resolved at call time before the value is sent to the speech-to-text engine.
41
45
  #
42
46
  # @return [String, nil]
43
47
  optional :keyterm, String
@@ -28,10 +28,12 @@ module Telnyx
28
28
 
29
29
  # @!attribute targets
30
30
  # The different possible targets of the transfer. The assistant will be able to
31
- # choose one of the targets to transfer the call to.
31
+ # choose one of the targets to transfer the call to. This can also be a dynamic
32
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
33
+ # variables webhook and resolves to an array of target objects at runtime.
32
34
  #
33
- # @return [Array<Telnyx::Models::AI::TransferTool::Transfer::Target>]
34
- required :targets, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::TransferTool::Transfer::Target] }
35
+ # @return [Array<Telnyx::Models::AI::TransferTool::Transfer::Targets::UnionMember0>, String]
36
+ required :targets, union: -> { Telnyx::AI::TransferTool::Transfer::Targets }
35
37
 
36
38
  # @!method initialize(from:, targets:)
37
39
  # Some parameter documentations has been truncated, see
@@ -39,25 +41,49 @@ module Telnyx
39
41
  #
40
42
  # @param from [String] Number or SIP URI placing the call.
41
43
  #
42
- # @param targets [Array<Telnyx::Models::AI::TransferTool::Transfer::Target>] The different possible targets of the transfer. The assistant will be able to ch
43
-
44
- class Target < Telnyx::Internal::Type::BaseModel
45
- # @!attribute name
46
- # The name of the target.
47
- #
48
- # @return [String, nil]
49
- optional :name, String
50
-
51
- # @!attribute to
52
- # The destination number or SIP URI of the call.
53
- #
54
- # @return [String, nil]
55
- optional :to, String
56
-
57
- # @!method initialize(name: nil, to: nil)
58
- # @param name [String] The name of the target.
59
- #
60
- # @param to [String] The destination number or SIP URI of the call.
44
+ # @param targets [Array<Telnyx::Models::AI::TransferTool::Transfer::Targets::UnionMember0>, String] The different possible targets of the transfer. The assistant will be able to ch
45
+
46
+ # The different possible targets of the transfer. The assistant will be able to
47
+ # choose one of the targets to transfer the call to. This can also be a dynamic
48
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
49
+ # variables webhook and resolves to an array of target objects at runtime.
50
+ #
51
+ # @see Telnyx::Models::AI::TransferTool::Transfer#targets
52
+ module Targets
53
+ extend Telnyx::Internal::Type::Union
54
+
55
+ variant -> { Telnyx::Models::AI::TransferTool::Transfer::Targets::UnionMember0Array }
56
+
57
+ # A dynamic variable string like `{{ targets }}` where `targets` is returned by the dynamic variables webhook and resolves to an array of target objects at runtime.
58
+ variant String
59
+
60
+ class UnionMember0 < Telnyx::Internal::Type::BaseModel
61
+ # @!attribute to
62
+ # The destination number or SIP URI of the call.
63
+ #
64
+ # @return [String]
65
+ required :to, String
66
+
67
+ # @!attribute name
68
+ # The name of the target.
69
+ #
70
+ # @return [String, nil]
71
+ optional :name, String
72
+
73
+ # @!method initialize(to:, name: nil)
74
+ # @param to [String] The destination number or SIP URI of the call.
75
+ #
76
+ # @param name [String] The name of the target.
77
+ end
78
+
79
+ # @!method self.variants
80
+ # @return [Array(Array<Telnyx::Models::AI::TransferTool::Transfer::Targets::UnionMember0>, String)]
81
+
82
+ # @type [Telnyx::Internal::Type::Converter]
83
+ UnionMember0Array =
84
+ Telnyx::Internal::Type::ArrayOf[-> {
85
+ Telnyx::AI::TransferTool::Transfer::Targets::UnionMember0
86
+ }]
61
87
  end
62
88
  end
63
89
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.93.0"
4
+ VERSION = "5.95.0"
5
5
  end
@@ -273,10 +273,12 @@ module Telnyx
273
273
  attr_accessor :from
274
274
 
275
275
  # The different possible targets of the transfer. The assistant will be able to
276
- # choose one of the targets to transfer the call to.
276
+ # choose one of the targets to transfer the call to. This can also be a dynamic
277
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
278
+ # variables webhook and resolves to an array of target objects at runtime.
277
279
  sig do
278
280
  returns(
279
- T::Array[Telnyx::AI::AssistantTool::Transfer::Transfer::Target]
281
+ Telnyx::AI::AssistantTool::Transfer::Transfer::Targets::Variants
280
282
  )
281
283
  end
282
284
  attr_accessor :targets
@@ -342,9 +344,7 @@ module Telnyx
342
344
  params(
343
345
  from: String,
344
346
  targets:
345
- T::Array[
346
- Telnyx::AI::AssistantTool::Transfer::Transfer::Target::OrHash
347
- ],
347
+ Telnyx::AI::AssistantTool::Transfer::Transfer::Targets::Variants,
348
348
  custom_headers:
349
349
  T::Array[
350
350
  Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader::OrHash
@@ -359,7 +359,9 @@ module Telnyx
359
359
  # Number or SIP URI placing the call.
360
360
  from:,
361
361
  # The different possible targets of the transfer. The assistant will be able to
362
- # choose one of the targets to transfer the call to.
362
+ # choose one of the targets to transfer the call to. This can also be a dynamic
363
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
364
+ # variables webhook and resolves to an array of target objects at runtime.
363
365
  targets:,
364
366
  # Custom headers to be added to the SIP INVITE for the transfer command.
365
367
  custom_headers: nil,
@@ -383,9 +385,7 @@ module Telnyx
383
385
  {
384
386
  from: String,
385
387
  targets:
386
- T::Array[
387
- Telnyx::AI::AssistantTool::Transfer::Transfer::Target
388
- ],
388
+ Telnyx::AI::AssistantTool::Transfer::Transfer::Targets::Variants,
389
389
  custom_headers:
390
390
  T::Array[
391
391
  Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader
@@ -400,41 +400,76 @@ module Telnyx
400
400
  def to_hash
401
401
  end
402
402
 
403
- class Target < Telnyx::Internal::Type::BaseModel
404
- OrHash =
403
+ # The different possible targets of the transfer. The assistant will be able to
404
+ # choose one of the targets to transfer the call to. This can also be a dynamic
405
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
406
+ # variables webhook and resolves to an array of target objects at runtime.
407
+ module Targets
408
+ extend Telnyx::Internal::Type::Union
409
+
410
+ Variants =
405
411
  T.type_alias do
406
412
  T.any(
407
- Telnyx::AI::AssistantTool::Transfer::Transfer::Target,
408
- Telnyx::Internal::AnyHash
413
+ T::Array[
414
+ Telnyx::AI::AssistantTool::Transfer::Transfer::Targets::UnionMember0
415
+ ],
416
+ String
409
417
  )
410
418
  end
411
419
 
412
- # The name of the target.
413
- sig { returns(T.nilable(String)) }
414
- attr_reader :name
420
+ class UnionMember0 < Telnyx::Internal::Type::BaseModel
421
+ OrHash =
422
+ T.type_alias do
423
+ T.any(
424
+ Telnyx::AI::AssistantTool::Transfer::Transfer::Targets::UnionMember0,
425
+ Telnyx::Internal::AnyHash
426
+ )
427
+ end
415
428
 
416
- sig { params(name: String).void }
417
- attr_writer :name
429
+ # The destination number or SIP URI of the call.
430
+ sig { returns(String) }
431
+ attr_accessor :to
418
432
 
419
- # The destination number or SIP URI of the call.
420
- sig { returns(T.nilable(String)) }
421
- attr_reader :to
433
+ # The name of the target.
434
+ sig { returns(T.nilable(String)) }
435
+ attr_reader :name
422
436
 
423
- sig { params(to: String).void }
424
- attr_writer :to
437
+ sig { params(name: String).void }
438
+ attr_writer :name
425
439
 
426
- sig { params(name: String, to: String).returns(T.attached_class) }
427
- def self.new(
428
- # The name of the target.
429
- name: nil,
430
- # The destination number or SIP URI of the call.
431
- to: nil
432
- )
440
+ sig do
441
+ params(to: String, name: String).returns(T.attached_class)
442
+ end
443
+ def self.new(
444
+ # The destination number or SIP URI of the call.
445
+ to:,
446
+ # The name of the target.
447
+ name: nil
448
+ )
449
+ end
450
+
451
+ sig { override.returns({ to: String, name: String }) }
452
+ def to_hash
453
+ end
433
454
  end
434
455
 
435
- sig { override.returns({ name: String, to: String }) }
436
- def to_hash
456
+ sig do
457
+ override.returns(
458
+ T::Array[
459
+ Telnyx::AI::AssistantTool::Transfer::Transfer::Targets::Variants
460
+ ]
461
+ )
462
+ end
463
+ def self.variants
437
464
  end
465
+
466
+ UnionMember0Array =
467
+ T.let(
468
+ Telnyx::Internal::Type::ArrayOf[
469
+ Telnyx::AI::AssistantTool::Transfer::Transfer::Targets::UnionMember0
470
+ ],
471
+ Telnyx::Internal::Type::Converter
472
+ )
438
473
  end
439
474
 
440
475
  class CustomHeader < Telnyx::Internal::Type::BaseModel
@@ -1080,6 +1115,21 @@ module Telnyx
1080
1115
  sig { params(from: String).void }
1081
1116
  attr_writer :from
1082
1117
 
1118
+ # The different possible targets of the invite. The assistant will be able to
1119
+ # choose one of the targets to invite to the call. This can also be a dynamic
1120
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
1121
+ # variables webhook and resolves to an array of target objects at runtime. If
1122
+ # omitted or null, the invite tool can still be configured and targets may be
1123
+ # supplied dynamically at runtime.
1124
+ sig do
1125
+ returns(
1126
+ T.nilable(
1127
+ Telnyx::AI::AssistantTool::Invite::InviteConfig::Targets::Variants
1128
+ )
1129
+ )
1130
+ end
1131
+ attr_accessor :targets
1132
+
1083
1133
  # Configuration for voicemail detection (AMD - Answering Machine Detection) on the
1084
1134
  # invited call.
1085
1135
  sig do
@@ -1106,6 +1156,10 @@ module Telnyx
1106
1156
  Telnyx::AI::AssistantTool::Invite::InviteConfig::CustomHeader::OrHash
1107
1157
  ],
1108
1158
  from: String,
1159
+ targets:
1160
+ T.nilable(
1161
+ Telnyx::AI::AssistantTool::Invite::InviteConfig::Targets::Variants
1162
+ ),
1109
1163
  voicemail_detection:
1110
1164
  Telnyx::AI::AssistantTool::Invite::InviteConfig::VoicemailDetection::OrHash
1111
1165
  ).returns(T.attached_class)
@@ -1115,6 +1169,13 @@ module Telnyx
1115
1169
  custom_headers: nil,
1116
1170
  # Number or SIP URI placing the call.
1117
1171
  from: nil,
1172
+ # The different possible targets of the invite. The assistant will be able to
1173
+ # choose one of the targets to invite to the call. This can also be a dynamic
1174
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
1175
+ # variables webhook and resolves to an array of target objects at runtime. If
1176
+ # omitted or null, the invite tool can still be configured and targets may be
1177
+ # supplied dynamically at runtime.
1178
+ targets: nil,
1118
1179
  # Configuration for voicemail detection (AMD - Answering Machine Detection) on the
1119
1180
  # invited call.
1120
1181
  voicemail_detection: nil
@@ -1129,6 +1190,10 @@ module Telnyx
1129
1190
  Telnyx::AI::AssistantTool::Invite::InviteConfig::CustomHeader
1130
1191
  ],
1131
1192
  from: String,
1193
+ targets:
1194
+ T.nilable(
1195
+ Telnyx::AI::AssistantTool::Invite::InviteConfig::Targets::Variants
1196
+ ),
1132
1197
  voicemail_detection:
1133
1198
  Telnyx::AI::AssistantTool::Invite::InviteConfig::VoicemailDetection
1134
1199
  }
@@ -1180,6 +1245,80 @@ module Telnyx
1180
1245
  end
1181
1246
  end
1182
1247
 
1248
+ # The different possible targets of the invite. The assistant will be able to
1249
+ # choose one of the targets to invite to the call. This can also be a dynamic
1250
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
1251
+ # variables webhook and resolves to an array of target objects at runtime. If
1252
+ # omitted or null, the invite tool can still be configured and targets may be
1253
+ # supplied dynamically at runtime.
1254
+ module Targets
1255
+ extend Telnyx::Internal::Type::Union
1256
+
1257
+ Variants =
1258
+ T.type_alias do
1259
+ T.any(
1260
+ T::Array[
1261
+ Telnyx::AI::AssistantTool::Invite::InviteConfig::Targets::UnionMember0
1262
+ ],
1263
+ String
1264
+ )
1265
+ end
1266
+
1267
+ class UnionMember0 < Telnyx::Internal::Type::BaseModel
1268
+ OrHash =
1269
+ T.type_alias do
1270
+ T.any(
1271
+ Telnyx::AI::AssistantTool::Invite::InviteConfig::Targets::UnionMember0,
1272
+ Telnyx::Internal::AnyHash
1273
+ )
1274
+ end
1275
+
1276
+ # The destination number or SIP URI of the call.
1277
+ sig { returns(String) }
1278
+ attr_accessor :to
1279
+
1280
+ # The name of the target.
1281
+ sig { returns(T.nilable(String)) }
1282
+ attr_reader :name
1283
+
1284
+ sig { params(name: String).void }
1285
+ attr_writer :name
1286
+
1287
+ sig do
1288
+ params(to: String, name: String).returns(T.attached_class)
1289
+ end
1290
+ def self.new(
1291
+ # The destination number or SIP URI of the call.
1292
+ to:,
1293
+ # The name of the target.
1294
+ name: nil
1295
+ )
1296
+ end
1297
+
1298
+ sig { override.returns({ to: String, name: String }) }
1299
+ def to_hash
1300
+ end
1301
+ end
1302
+
1303
+ sig do
1304
+ override.returns(
1305
+ T::Array[
1306
+ Telnyx::AI::AssistantTool::Invite::InviteConfig::Targets::Variants
1307
+ ]
1308
+ )
1309
+ end
1310
+ def self.variants
1311
+ end
1312
+
1313
+ UnionMember0Array =
1314
+ T.let(
1315
+ Telnyx::Internal::Type::ArrayOf[
1316
+ Telnyx::AI::AssistantTool::Invite::InviteConfig::Targets::UnionMember0
1317
+ ],
1318
+ Telnyx::Internal::Type::Converter
1319
+ )
1320
+ end
1321
+
1183
1322
  class VoicemailDetection < Telnyx::Internal::Type::BaseModel
1184
1323
  OrHash =
1185
1324
  T.type_alias do
@@ -48,7 +48,11 @@ module Telnyx
48
48
 
49
49
  # Available only for deepgram/nova-3 and deepgram/flux. A comma-separated list of
50
50
  # key terms to boost for recognition during transcription. Helps improve accuracy
51
- # for domain-specific terminology, proper nouns, or uncommon words.
51
+ # for domain-specific terminology, proper nouns, or uncommon words. This field may
52
+ # be templated with
53
+ # [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
54
+ # using mustache syntax (e.g. `Telnyx,{{customer_name}},VoIP`). Variables are
55
+ # resolved at call time before the value is sent to the speech-to-text engine.
52
56
  sig { returns(T.nilable(String)) }
53
57
  attr_reader :keyterm
54
58
 
@@ -114,7 +118,11 @@ module Telnyx
114
118
  eot_timeout_ms: nil,
115
119
  # Available only for deepgram/nova-3 and deepgram/flux. A comma-separated list of
116
120
  # key terms to boost for recognition during transcription. Helps improve accuracy
117
- # for domain-specific terminology, proper nouns, or uncommon words.
121
+ # for domain-specific terminology, proper nouns, or uncommon words. This field may
122
+ # be templated with
123
+ # [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
124
+ # using mustache syntax (e.g. `Telnyx,{{customer_name}},VoIP`). Variables are
125
+ # resolved at call time before the value is sent to the speech-to-text engine.
118
126
  keyterm: nil,
119
127
  # Available only for assemblyai/universal-streaming. Maximum duration of silence
120
128
  # in milliseconds before forcing an end of turn.
@@ -54,22 +54,25 @@ module Telnyx
54
54
  attr_accessor :from
55
55
 
56
56
  # The different possible targets of the transfer. The assistant will be able to
57
- # choose one of the targets to transfer the call to.
58
- sig { returns(T::Array[Telnyx::AI::TransferTool::Transfer::Target]) }
57
+ # choose one of the targets to transfer the call to. This can also be a dynamic
58
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
59
+ # variables webhook and resolves to an array of target objects at runtime.
60
+ sig { returns(Telnyx::AI::TransferTool::Transfer::Targets::Variants) }
59
61
  attr_accessor :targets
60
62
 
61
63
  sig do
62
64
  params(
63
65
  from: String,
64
- targets:
65
- T::Array[Telnyx::AI::TransferTool::Transfer::Target::OrHash]
66
+ targets: Telnyx::AI::TransferTool::Transfer::Targets::Variants
66
67
  ).returns(T.attached_class)
67
68
  end
68
69
  def self.new(
69
70
  # Number or SIP URI placing the call.
70
71
  from:,
71
72
  # The different possible targets of the transfer. The assistant will be able to
72
- # choose one of the targets to transfer the call to.
73
+ # choose one of the targets to transfer the call to. This can also be a dynamic
74
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
75
+ # variables webhook and resolves to an array of target objects at runtime.
73
76
  targets:
74
77
  )
75
78
  end
@@ -78,48 +81,79 @@ module Telnyx
78
81
  override.returns(
79
82
  {
80
83
  from: String,
81
- targets: T::Array[Telnyx::AI::TransferTool::Transfer::Target]
84
+ targets: Telnyx::AI::TransferTool::Transfer::Targets::Variants
82
85
  }
83
86
  )
84
87
  end
85
88
  def to_hash
86
89
  end
87
90
 
88
- class Target < Telnyx::Internal::Type::BaseModel
89
- OrHash =
91
+ # The different possible targets of the transfer. The assistant will be able to
92
+ # choose one of the targets to transfer the call to. This can also be a dynamic
93
+ # variable string like `{{ targets }}` where `targets` is returned by the dynamic
94
+ # variables webhook and resolves to an array of target objects at runtime.
95
+ module Targets
96
+ extend Telnyx::Internal::Type::Union
97
+
98
+ Variants =
90
99
  T.type_alias do
91
100
  T.any(
92
- Telnyx::AI::TransferTool::Transfer::Target,
93
- Telnyx::Internal::AnyHash
101
+ T::Array[
102
+ Telnyx::AI::TransferTool::Transfer::Targets::UnionMember0
103
+ ],
104
+ String
94
105
  )
95
106
  end
96
107
 
97
- # The name of the target.
98
- sig { returns(T.nilable(String)) }
99
- attr_reader :name
100
-
101
- sig { params(name: String).void }
102
- attr_writer :name
103
-
104
- # The destination number or SIP URI of the call.
105
- sig { returns(T.nilable(String)) }
106
- attr_reader :to
108
+ class UnionMember0 < Telnyx::Internal::Type::BaseModel
109
+ OrHash =
110
+ T.type_alias do
111
+ T.any(
112
+ Telnyx::AI::TransferTool::Transfer::Targets::UnionMember0,
113
+ Telnyx::Internal::AnyHash
114
+ )
115
+ end
107
116
 
108
- sig { params(to: String).void }
109
- attr_writer :to
117
+ # The destination number or SIP URI of the call.
118
+ sig { returns(String) }
119
+ attr_accessor :to
110
120
 
111
- sig { params(name: String, to: String).returns(T.attached_class) }
112
- def self.new(
113
121
  # The name of the target.
114
- name: nil,
115
- # The destination number or SIP URI of the call.
116
- to: nil
117
- )
122
+ sig { returns(T.nilable(String)) }
123
+ attr_reader :name
124
+
125
+ sig { params(name: String).void }
126
+ attr_writer :name
127
+
128
+ sig { params(to: String, name: String).returns(T.attached_class) }
129
+ def self.new(
130
+ # The destination number or SIP URI of the call.
131
+ to:,
132
+ # The name of the target.
133
+ name: nil
134
+ )
135
+ end
136
+
137
+ sig { override.returns({ to: String, name: String }) }
138
+ def to_hash
139
+ end
118
140
  end
119
141
 
120
- sig { override.returns({ name: String, to: String }) }
121
- def to_hash
142
+ sig do
143
+ override.returns(
144
+ T::Array[Telnyx::AI::TransferTool::Transfer::Targets::Variants]
145
+ )
122
146
  end
147
+ def self.variants
148
+ end
149
+
150
+ UnionMember0Array =
151
+ T.let(
152
+ Telnyx::Internal::Type::ArrayOf[
153
+ Telnyx::AI::TransferTool::Transfer::Targets::UnionMember0
154
+ ],
155
+ Telnyx::Internal::Type::Converter
156
+ )
123
157
  end
124
158
  end
125
159
 
@@ -111,7 +111,7 @@ module Telnyx
111
111
  type transfer =
112
112
  {
113
113
  from: String,
114
- targets: ::Array[Telnyx::AI::AssistantTool::Transfer::Transfer::Target],
114
+ targets: Telnyx::Models::AI::AssistantTool::Transfer::Transfer::targets,
115
115
  custom_headers: ::Array[Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader],
116
116
  voicemail_detection: Telnyx::AI::AssistantTool::Transfer::Transfer::VoicemailDetection,
117
117
  warm_message_delay_ms: Integer?,
@@ -121,7 +121,7 @@ module Telnyx
121
121
  class Transfer < Telnyx::Internal::Type::BaseModel
122
122
  attr_accessor from: String
123
123
 
124
- attr_accessor targets: ::Array[Telnyx::AI::AssistantTool::Transfer::Transfer::Target]
124
+ attr_accessor targets: Telnyx::Models::AI::AssistantTool::Transfer::Transfer::targets
125
125
 
126
126
  attr_reader custom_headers: ::Array[Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader]?
127
127
 
@@ -143,7 +143,7 @@ module Telnyx
143
143
 
144
144
  def initialize: (
145
145
  from: String,
146
- targets: ::Array[Telnyx::AI::AssistantTool::Transfer::Transfer::Target],
146
+ targets: Telnyx::Models::AI::AssistantTool::Transfer::Transfer::targets,
147
147
  ?custom_headers: ::Array[Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader],
148
148
  ?voicemail_detection: Telnyx::AI::AssistantTool::Transfer::Transfer::VoicemailDetection,
149
149
  ?warm_message_delay_ms: Integer?,
@@ -152,27 +152,37 @@ module Telnyx
152
152
 
153
153
  def to_hash: -> {
154
154
  from: String,
155
- targets: ::Array[Telnyx::AI::AssistantTool::Transfer::Transfer::Target],
155
+ targets: Telnyx::Models::AI::AssistantTool::Transfer::Transfer::targets,
156
156
  custom_headers: ::Array[Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader],
157
157
  voicemail_detection: Telnyx::AI::AssistantTool::Transfer::Transfer::VoicemailDetection,
158
158
  warm_message_delay_ms: Integer?,
159
159
  warm_transfer_instructions: String
160
160
  }
161
161
 
162
- type target = { name: String, to: String }
162
+ type targets =
163
+ ::Array[Telnyx::AI::AssistantTool::Transfer::Transfer::Targets::UnionMember0]
164
+ | String
163
165
 
164
- class Target < Telnyx::Internal::Type::BaseModel
165
- attr_reader name: String?
166
+ module Targets
167
+ extend Telnyx::Internal::Type::Union
166
168
 
167
- def name=: (String) -> String
169
+ type union_member0 = { to: String, name: String }
170
+
171
+ class UnionMember0 < Telnyx::Internal::Type::BaseModel
172
+ attr_accessor to: String
173
+
174
+ attr_reader name: String?
168
175
 
169
- attr_reader to: String?
176
+ def name=: (String) -> String
170
177
 
171
- def to=: (String) -> String
178
+ def initialize: (to: String, ?name: String) -> void
172
179
 
173
- def initialize: (?name: String, ?to: String) -> void
180
+ def to_hash: -> { to: String, name: String }
181
+ end
182
+
183
+ def self?.variants: -> ::Array[Telnyx::Models::AI::AssistantTool::Transfer::Transfer::targets]
174
184
 
175
- def to_hash: -> { name: String, to: String }
185
+ UnionMember0Array: Telnyx::Internal::Type::Converter
176
186
  end
177
187
 
178
188
  type custom_header = { name: String, value: String }
@@ -437,6 +447,7 @@ module Telnyx
437
447
  {
438
448
  custom_headers: ::Array[Telnyx::AI::AssistantTool::Invite::InviteConfig::CustomHeader],
439
449
  from: String,
450
+ targets: Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::targets?,
440
451
  voicemail_detection: Telnyx::AI::AssistantTool::Invite::InviteConfig::VoicemailDetection
441
452
  }
442
453
 
@@ -451,6 +462,8 @@ module Telnyx
451
462
 
452
463
  def from=: (String) -> String
453
464
 
465
+ attr_accessor targets: Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::targets?
466
+
454
467
  attr_reader voicemail_detection: Telnyx::AI::AssistantTool::Invite::InviteConfig::VoicemailDetection?
455
468
 
456
469
  def voicemail_detection=: (
@@ -460,12 +473,14 @@ module Telnyx
460
473
  def initialize: (
461
474
  ?custom_headers: ::Array[Telnyx::AI::AssistantTool::Invite::InviteConfig::CustomHeader],
462
475
  ?from: String,
476
+ ?targets: Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::targets?,
463
477
  ?voicemail_detection: Telnyx::AI::AssistantTool::Invite::InviteConfig::VoicemailDetection
464
478
  ) -> void
465
479
 
466
480
  def to_hash: -> {
467
481
  custom_headers: ::Array[Telnyx::AI::AssistantTool::Invite::InviteConfig::CustomHeader],
468
482
  from: String,
483
+ targets: Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::targets?,
469
484
  voicemail_detection: Telnyx::AI::AssistantTool::Invite::InviteConfig::VoicemailDetection
470
485
  }
471
486
 
@@ -485,6 +500,32 @@ module Telnyx
485
500
  def to_hash: -> { name: String, value: String }
486
501
  end
487
502
 
503
+ type targets =
504
+ ::Array[Telnyx::AI::AssistantTool::Invite::InviteConfig::Targets::UnionMember0]
505
+ | String
506
+
507
+ module Targets
508
+ extend Telnyx::Internal::Type::Union
509
+
510
+ type union_member0 = { to: String, name: String }
511
+
512
+ class UnionMember0 < Telnyx::Internal::Type::BaseModel
513
+ attr_accessor to: String
514
+
515
+ attr_reader name: String?
516
+
517
+ def name=: (String) -> String
518
+
519
+ def initialize: (to: String, ?name: String) -> void
520
+
521
+ def to_hash: -> { to: String, name: String }
522
+ end
523
+
524
+ def self?.variants: -> ::Array[Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::targets]
525
+
526
+ UnionMember0Array: Telnyx::Internal::Type::Converter
527
+ end
528
+
488
529
  type voicemail_detection =
489
530
  {
490
531
  detection_mode: Telnyx::Models::AI::AssistantTool::Invite::InviteConfig::VoicemailDetection::detection_mode,
@@ -25,38 +25,48 @@ module Telnyx
25
25
  type transfer =
26
26
  {
27
27
  from: String,
28
- targets: ::Array[Telnyx::AI::TransferTool::Transfer::Target]
28
+ targets: Telnyx::Models::AI::TransferTool::Transfer::targets
29
29
  }
30
30
 
31
31
  class Transfer < Telnyx::Internal::Type::BaseModel
32
32
  attr_accessor from: String
33
33
 
34
- attr_accessor targets: ::Array[Telnyx::AI::TransferTool::Transfer::Target]
34
+ attr_accessor targets: Telnyx::Models::AI::TransferTool::Transfer::targets
35
35
 
36
36
  def initialize: (
37
37
  from: String,
38
- targets: ::Array[Telnyx::AI::TransferTool::Transfer::Target]
38
+ targets: Telnyx::Models::AI::TransferTool::Transfer::targets
39
39
  ) -> void
40
40
 
41
41
  def to_hash: -> {
42
42
  from: String,
43
- targets: ::Array[Telnyx::AI::TransferTool::Transfer::Target]
43
+ targets: Telnyx::Models::AI::TransferTool::Transfer::targets
44
44
  }
45
45
 
46
- type target = { name: String, to: String }
46
+ type targets =
47
+ ::Array[Telnyx::AI::TransferTool::Transfer::Targets::UnionMember0]
48
+ | String
47
49
 
48
- class Target < Telnyx::Internal::Type::BaseModel
49
- attr_reader name: String?
50
+ module Targets
51
+ extend Telnyx::Internal::Type::Union
50
52
 
51
- def name=: (String) -> String
53
+ type union_member0 = { to: String, name: String }
52
54
 
53
- attr_reader to: String?
55
+ class UnionMember0 < Telnyx::Internal::Type::BaseModel
56
+ attr_accessor to: String
54
57
 
55
- def to=: (String) -> String
58
+ attr_reader name: String?
56
59
 
57
- def initialize: (?name: String, ?to: String) -> void
60
+ def name=: (String) -> String
58
61
 
59
- def to_hash: -> { name: String, to: String }
62
+ def initialize: (to: String, ?name: String) -> void
63
+
64
+ def to_hash: -> { to: String, name: String }
65
+ end
66
+
67
+ def self?.variants: -> ::Array[Telnyx::Models::AI::TransferTool::Transfer::targets]
68
+
69
+ UnionMember0Array: Telnyx::Internal::Type::Converter
60
70
  end
61
71
  end
62
72
 
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.93.0
4
+ version: 5.95.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Telnyx
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-29 00:00:00.000000000 Z
11
+ date: 2026-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi