telnyx 5.102.1 → 5.103.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.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/ai/assistant_create_params.rb +170 -9
  5. data/lib/telnyx/models/ai/assistant_tool.rb +14 -14
  6. data/lib/telnyx/models/ai/assistant_update_params.rb +170 -9
  7. data/lib/telnyx/models/ai/assistants/canary_deploy.rb +123 -3
  8. data/lib/telnyx/models/ai/assistants/canary_deploy_response.rb +125 -3
  9. data/lib/telnyx/models/ai/assistants/scheduled_event_create_params.rb +17 -1
  10. data/lib/telnyx/models/ai/assistants/scheduled_phone_call_event_response.rb +91 -1
  11. data/lib/telnyx/models/ai/assistants/update_assistant.rb +171 -9
  12. data/lib/telnyx/models/ai/inference_embedding.rb +169 -9
  13. data/lib/telnyx/models/ai/openai_list_models_response.rb +31 -3
  14. data/lib/telnyx/models/ai/transfer_tool.rb +9 -7
  15. data/lib/telnyx/models/ai_retrieve_models_response.rb +31 -3
  16. data/lib/telnyx/models/calls/action_gather_using_ai_params.rb +23 -4
  17. data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +23 -4
  18. data/lib/telnyx/models/calls/action_speak_params.rb +23 -4
  19. data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +23 -4
  20. data/lib/telnyx/models/calls/transcription_start_request.rb +167 -5
  21. data/lib/telnyx/models/conferences/action_speak_params.rb +23 -4
  22. data/lib/telnyx/models/text_to_speech_generate_params.rb +6 -6
  23. data/lib/telnyx/models/uac_connection_create_params.rb +255 -9
  24. data/lib/telnyx/models/uac_connection_create_response.rb +878 -3
  25. data/lib/telnyx/models/uac_connection_delete_response.rb +878 -3
  26. data/lib/telnyx/models/uac_connection_list_response.rb +876 -0
  27. data/lib/telnyx/models/uac_connection_retrieve_response.rb +879 -3
  28. data/lib/telnyx/models/uac_connection_update_params.rb +255 -9
  29. data/lib/telnyx/models/uac_connection_update_response.rb +878 -3
  30. data/lib/telnyx/models.rb +0 -14
  31. data/lib/telnyx/resources/ai/assistants/canary_deploys.rb +2 -2
  32. data/lib/telnyx/resources/ai/assistants/scheduled_events.rb +5 -1
  33. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -3
  34. data/lib/telnyx/resources/ai/assistants.rb +6 -6
  35. data/lib/telnyx/resources/calls/actions.rb +5 -5
  36. data/lib/telnyx/resources/conferences/actions.rb +1 -1
  37. data/lib/telnyx/resources/uac_connections.rb +8 -8
  38. data/lib/telnyx/version.rb +1 -1
  39. data/lib/telnyx.rb +1 -19
  40. data/rbi/telnyx/models/ai/assistant_create_params.rbi +341 -12
  41. data/rbi/telnyx/models/ai/assistant_tool.rbi +10 -10
  42. data/rbi/telnyx/models/ai/assistant_update_params.rbi +341 -12
  43. data/rbi/telnyx/models/ai/assistants/canary_deploy.rbi +290 -4
  44. data/rbi/telnyx/models/ai/assistants/canary_deploy_response.rbi +301 -3
  45. data/rbi/telnyx/models/ai/assistants/scheduled_event_create_params.rbi +22 -0
  46. data/rbi/telnyx/models/ai/assistants/scheduled_phone_call_event_response.rbi +153 -0
  47. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +355 -12
  48. data/rbi/telnyx/models/ai/inference_embedding.rbi +340 -12
  49. data/rbi/telnyx/models/ai/openai_list_models_response.rbi +56 -3
  50. data/rbi/telnyx/models/ai/transfer_tool.rbi +5 -5
  51. data/rbi/telnyx/models/ai_retrieve_models_response.rbi +51 -3
  52. data/rbi/telnyx/models/calls/action_gather_using_ai_params.rbi +41 -5
  53. data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +41 -5
  54. data/rbi/telnyx/models/calls/action_speak_params.rbi +41 -5
  55. data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +41 -5
  56. data/rbi/telnyx/models/calls/transcription_start_request.rbi +480 -10
  57. data/rbi/telnyx/models/conferences/action_speak_params.rbi +41 -5
  58. data/rbi/telnyx/models/text_to_speech_generate_params.rbi +6 -6
  59. data/rbi/telnyx/models/uac_connection_create_params.rbi +516 -12
  60. data/rbi/telnyx/models/uac_connection_create_response.rbi +1756 -4
  61. data/rbi/telnyx/models/uac_connection_delete_response.rbi +1756 -4
  62. data/rbi/telnyx/models/uac_connection_list_response.rbi +1727 -0
  63. data/rbi/telnyx/models/uac_connection_retrieve_response.rbi +1756 -4
  64. data/rbi/telnyx/models/uac_connection_update_params.rbi +516 -12
  65. data/rbi/telnyx/models/uac_connection_update_response.rbi +1756 -4
  66. data/rbi/telnyx/models.rbi +0 -14
  67. data/rbi/telnyx/resources/ai/assistants/canary_deploys.rbi +4 -2
  68. data/rbi/telnyx/resources/ai/assistants/scheduled_events.rbi +6 -0
  69. data/rbi/telnyx/resources/ai/assistants/versions.rbi +9 -3
  70. data/rbi/telnyx/resources/ai/assistants.rbi +10 -6
  71. data/rbi/telnyx/resources/calls/actions.rbi +6 -6
  72. data/rbi/telnyx/resources/conferences/actions.rbi +1 -1
  73. data/rbi/telnyx/resources/uac_connections.rbi +13 -7
  74. data/sig/telnyx/models/ai/assistant_create_params.rbs +142 -18
  75. data/sig/telnyx/models/ai/assistant_tool.rbs +8 -8
  76. data/sig/telnyx/models/ai/assistant_update_params.rbs +142 -18
  77. data/sig/telnyx/models/ai/assistants/canary_deploy.rbs +113 -6
  78. data/sig/telnyx/models/ai/assistants/canary_deploy_response.rbs +109 -4
  79. data/sig/telnyx/models/ai/assistants/scheduled_event_create_params.rbs +14 -0
  80. data/sig/telnyx/models/ai/assistants/scheduled_phone_call_event_response.rbs +85 -0
  81. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +145 -18
  82. data/sig/telnyx/models/ai/inference_embedding.rbs +142 -18
  83. data/sig/telnyx/models/ai/openai_list_models_response.rbs +39 -4
  84. data/sig/telnyx/models/ai/transfer_tool.rbs +4 -4
  85. data/sig/telnyx/models/ai_retrieve_models_response.rbs +39 -4
  86. data/sig/telnyx/models/calls/action_gather_using_ai_params.rbs +15 -1
  87. data/sig/telnyx/models/calls/action_gather_using_speak_params.rbs +15 -1
  88. data/sig/telnyx/models/calls/action_speak_params.rbs +15 -1
  89. data/sig/telnyx/models/calls/action_start_ai_assistant_params.rbs +15 -1
  90. data/sig/telnyx/models/calls/transcription_start_request.rbs +184 -2
  91. data/sig/telnyx/models/conferences/action_speak_params.rbs +15 -1
  92. data/sig/telnyx/models/text_to_speech_generate_params.rbs +6 -6
  93. data/sig/telnyx/models/uac_connection_create_params.rbs +211 -17
  94. data/sig/telnyx/models/uac_connection_create_response.rbs +731 -5
  95. data/sig/telnyx/models/uac_connection_delete_response.rbs +731 -5
  96. data/sig/telnyx/models/uac_connection_list_response.rbs +722 -0
  97. data/sig/telnyx/models/uac_connection_retrieve_response.rbs +731 -5
  98. data/sig/telnyx/models/uac_connection_update_params.rbs +211 -17
  99. data/sig/telnyx/models/uac_connection_update_response.rbs +731 -5
  100. data/sig/telnyx/models.rbs +0 -14
  101. data/sig/telnyx/resources/ai/assistants/canary_deploys.rbs +2 -2
  102. data/sig/telnyx/resources/ai/assistants/scheduled_events.rbs +2 -0
  103. data/sig/telnyx/resources/ai/assistants/versions.rbs +3 -3
  104. data/sig/telnyx/resources/ai/assistants.rbs +6 -6
  105. data/sig/telnyx/resources/uac_connections.rbs +7 -7
  106. metadata +4 -58
  107. data/lib/telnyx/models/ai/assistant_integration.rb +0 -38
  108. data/lib/telnyx/models/ai/assistant_mcp_server.rb +0 -35
  109. data/lib/telnyx/models/ai/assistants/clause.rb +0 -54
  110. data/lib/telnyx/models/ai/assistants/rollout_slot.rb +0 -27
  111. data/lib/telnyx/models/ai/assistants/rule_input.rb +0 -40
  112. data/lib/telnyx/models/ai/assistants/rule_output.rb +0 -40
  113. data/lib/telnyx/models/ai/assistants/serve.rb +0 -33
  114. data/lib/telnyx/models/ai/inference_embedding_interruption_settings.rb +0 -39
  115. data/lib/telnyx/models/ai/start_speaking_plan.rb +0 -37
  116. data/lib/telnyx/models/ai/transcription_endpointing_plan.rb +0 -39
  117. data/lib/telnyx/models/calls/transcription_engine_assemblyai_config.rb +0 -64
  118. data/lib/telnyx/models/calls/transcription_engine_xai_config.rb +0 -108
  119. data/lib/telnyx/models/model_metadata.rb +0 -33
  120. data/lib/telnyx/models/uac_connection.rb +0 -412
  121. data/lib/telnyx/models/uac_external_settings.rb +0 -101
  122. data/lib/telnyx/models/uac_inbound.rb +0 -210
  123. data/lib/telnyx/models/uac_internal_settings.rb +0 -25
  124. data/lib/telnyx/models/uac_outbound.rb +0 -131
  125. data/lib/telnyx/models/xai_voice_settings.rb +0 -36
  126. data/rbi/telnyx/models/ai/assistant_integration.rbi +0 -60
  127. data/rbi/telnyx/models/ai/assistant_mcp_server.rbi +0 -51
  128. data/rbi/telnyx/models/ai/assistants/clause.rbi +0 -91
  129. data/rbi/telnyx/models/ai/assistants/rollout_slot.rbi +0 -36
  130. data/rbi/telnyx/models/ai/assistants/rule_input.rbi +0 -73
  131. data/rbi/telnyx/models/ai/assistants/rule_output.rbi +0 -73
  132. data/rbi/telnyx/models/ai/assistants/serve.rbi +0 -61
  133. data/rbi/telnyx/models/ai/inference_embedding_interruption_settings.rbi +0 -72
  134. data/rbi/telnyx/models/ai/start_speaking_plan.rbi +0 -70
  135. data/rbi/telnyx/models/ai/transcription_endpointing_plan.rbi +0 -71
  136. data/rbi/telnyx/models/calls/transcription_engine_assemblyai_config.rbi +0 -155
  137. data/rbi/telnyx/models/calls/transcription_engine_xai_config.rbi +0 -329
  138. data/rbi/telnyx/models/model_metadata.rbi +0 -44
  139. data/rbi/telnyx/models/uac_connection.rbi +0 -684
  140. data/rbi/telnyx/models/uac_external_settings.rbi +0 -146
  141. data/rbi/telnyx/models/uac_inbound.rbi +0 -410
  142. data/rbi/telnyx/models/uac_internal_settings.rbi +0 -39
  143. data/rbi/telnyx/models/uac_outbound.rbi +0 -224
  144. data/rbi/telnyx/models/xai_voice_settings.rbi +0 -64
  145. data/sig/telnyx/models/ai/assistant_integration.rbs +0 -26
  146. data/sig/telnyx/models/ai/assistant_mcp_server.rbs +0 -19
  147. data/sig/telnyx/models/ai/assistants/clause.rbs +0 -46
  148. data/sig/telnyx/models/ai/assistants/rollout_slot.rbs +0 -19
  149. data/sig/telnyx/models/ai/assistants/rule_input.rbs +0 -33
  150. data/sig/telnyx/models/ai/assistants/rule_output.rbs +0 -33
  151. data/sig/telnyx/models/ai/assistants/serve.rbs +0 -35
  152. data/sig/telnyx/models/ai/inference_embedding_interruption_settings.rbs +0 -30
  153. data/sig/telnyx/models/ai/start_speaking_plan.rbs +0 -33
  154. data/sig/telnyx/models/ai/transcription_endpointing_plan.rbs +0 -38
  155. data/sig/telnyx/models/calls/transcription_engine_assemblyai_config.rbs +0 -62
  156. data/sig/telnyx/models/calls/transcription_engine_xai_config.rbs +0 -130
  157. data/sig/telnyx/models/model_metadata.rbs +0 -32
  158. data/sig/telnyx/models/uac_connection.rbs +0 -338
  159. data/sig/telnyx/models/uac_external_settings.rbs +0 -73
  160. data/sig/telnyx/models/uac_inbound.rbs +0 -190
  161. data/sig/telnyx/models/uac_internal_settings.rbs +0 -15
  162. data/sig/telnyx/models/uac_outbound.rbs +0 -113
  163. data/sig/telnyx/models/xai_voice_settings.rbs +0 -34
@@ -7,15 +7,135 @@ module Telnyx
7
7
  class CanaryDeploy < Telnyx::Internal::Type::BaseModel
8
8
  # @!attribute rules
9
9
  #
10
- # @return [Array<Telnyx::Models::AI::Assistants::RuleInput>, nil]
11
- optional :rules, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::RuleInput] }
10
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule>, nil]
11
+ optional :rules, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeploy::Rule] }
12
12
 
13
13
  # @!method initialize(rules: nil)
14
14
  # Create/update request body. Accepts:
15
15
  #
16
16
  # - `rules` — canonical ordered list of routing rules
17
17
  #
18
- # @param rules [Array<Telnyx::Models::AI::Assistants::RuleInput>]
18
+ # @param rules [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule>]
19
+
20
+ class Rule < Telnyx::Internal::Type::BaseModel
21
+ # @!attribute serve
22
+ # What a rule serves when matched.
23
+ #
24
+ # Exactly one of:
25
+ #
26
+ # - `version_id` — serve a specific version
27
+ # - `rollout` — weighted random across versions; weights must sum to less than
28
+ # 100, with the leftover routing to the main version
29
+ #
30
+ # @return [Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve]
31
+ required :serve, -> { Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve }
32
+
33
+ # @!attribute match
34
+ #
35
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match>, nil]
36
+ optional :match, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeploy::Rule::Match] }
37
+
38
+ # @!method initialize(serve:, match: nil)
39
+ # Some parameter documentations has been truncated, see
40
+ # {Telnyx::Models::AI::Assistants::CanaryDeploy::Rule} for more details.
41
+ #
42
+ # A targeting rule: `match` clauses (AND) gate `serve`.
43
+ #
44
+ # An empty `match` is a catch-all (always fires).
45
+ #
46
+ # @param serve [Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve] What a rule serves when matched.
47
+ #
48
+ # @param match [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match>]
49
+
50
+ # @see Telnyx::Models::AI::Assistants::CanaryDeploy::Rule#serve
51
+ class Serve < Telnyx::Internal::Type::BaseModel
52
+ # @!attribute rollout
53
+ #
54
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout>, nil]
55
+ optional :rollout,
56
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout] }
57
+
58
+ # @!attribute version_id
59
+ #
60
+ # @return [String, nil]
61
+ optional :version_id, String
62
+
63
+ # @!method initialize(rollout: nil, version_id: nil)
64
+ # What a rule serves when matched.
65
+ #
66
+ # Exactly one of:
67
+ #
68
+ # - `version_id` — serve a specific version
69
+ # - `rollout` — weighted random across versions; weights must sum to less than
70
+ # 100, with the leftover routing to the main version
71
+ #
72
+ # @param rollout [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout>]
73
+ # @param version_id [String]
74
+
75
+ class Rollout < Telnyx::Internal::Type::BaseModel
76
+ # @!attribute version_id
77
+ #
78
+ # @return [String]
79
+ required :version_id, String
80
+
81
+ # @!attribute weight
82
+ #
83
+ # @return [Float]
84
+ required :weight, Float
85
+
86
+ # @!method initialize(version_id:, weight:)
87
+ # One slot in a percentage rollout.
88
+ #
89
+ # @param version_id [String]
90
+ # @param weight [Float]
91
+ end
92
+ end
93
+
94
+ class Match < Telnyx::Internal::Type::BaseModel
95
+ # @!attribute attribute
96
+ # Attribute name from the routing context
97
+ #
98
+ # @return [String]
99
+ required :attribute, String
100
+
101
+ # @!attribute operator
102
+ # Match operator
103
+ #
104
+ # @return [Symbol, Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match::Operator]
105
+ required :operator, enum: -> { Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::Operator }
106
+
107
+ # @!attribute values
108
+ #
109
+ # @return [Array<String>]
110
+ required :values, Telnyx::Internal::Type::ArrayOf[String]
111
+
112
+ # @!method initialize(attribute:, operator:, values:)
113
+ # A single attribute/operator/values check.
114
+ #
115
+ # A clause matches when the routing context's value for `attribute` satisfies
116
+ # `operator` against any of `values`.
117
+ #
118
+ # @param attribute [String] Attribute name from the routing context
119
+ #
120
+ # @param operator [Symbol, Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match::Operator] Match operator
121
+ #
122
+ # @param values [Array<String>]
123
+
124
+ # Match operator
125
+ #
126
+ # @see Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match#operator
127
+ module Operator
128
+ extend Telnyx::Internal::Type::Enum
129
+
130
+ IN = :in
131
+ NOT_IN = :not_in
132
+ STARTS_WITH = :starts_with
133
+
134
+ # @!method self.values
135
+ # @return [Array<Symbol>]
136
+ end
137
+ end
138
+ end
19
139
  end
20
140
  end
21
141
  end
@@ -18,8 +18,9 @@ module Telnyx
18
18
 
19
19
  # @!attribute rules
20
20
  #
21
- # @return [Array<Telnyx::Models::AI::Assistants::RuleOutput>]
22
- required :rules, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::RuleOutput] }
21
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule>]
22
+ required :rules,
23
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeployResponse::Rule] }
23
24
 
24
25
  # @!attribute updated_at
25
26
  #
@@ -33,8 +34,129 @@ module Telnyx
33
34
  #
34
35
  # @param assistant_id [String]
35
36
  # @param created_at [Time]
36
- # @param rules [Array<Telnyx::Models::AI::Assistants::RuleOutput>]
37
+ # @param rules [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule>]
37
38
  # @param updated_at [Time]
39
+
40
+ class Rule < Telnyx::Internal::Type::BaseModel
41
+ # @!attribute serve
42
+ # What a rule serves when matched.
43
+ #
44
+ # Exactly one of:
45
+ #
46
+ # - `version_id` — serve a specific version
47
+ # - `rollout` — weighted random across versions; weights must sum to less than
48
+ # 100, with the leftover routing to the main version
49
+ #
50
+ # @return [Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve]
51
+ required :serve, -> { Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve }
52
+
53
+ # @!attribute match
54
+ #
55
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match>, nil]
56
+ optional :match,
57
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match] }
58
+
59
+ # @!method initialize(serve:, match: nil)
60
+ # Some parameter documentations has been truncated, see
61
+ # {Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule} for more details.
62
+ #
63
+ # A targeting rule: `match` clauses (AND) gate `serve`.
64
+ #
65
+ # An empty `match` is a catch-all (always fires).
66
+ #
67
+ # @param serve [Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve] What a rule serves when matched.
68
+ #
69
+ # @param match [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match>]
70
+
71
+ # @see Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule#serve
72
+ class Serve < Telnyx::Internal::Type::BaseModel
73
+ # @!attribute rollout
74
+ #
75
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout>, nil]
76
+ optional :rollout,
77
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout] }
78
+
79
+ # @!attribute version_id
80
+ #
81
+ # @return [String, nil]
82
+ optional :version_id, String
83
+
84
+ # @!method initialize(rollout: nil, version_id: nil)
85
+ # What a rule serves when matched.
86
+ #
87
+ # Exactly one of:
88
+ #
89
+ # - `version_id` — serve a specific version
90
+ # - `rollout` — weighted random across versions; weights must sum to less than
91
+ # 100, with the leftover routing to the main version
92
+ #
93
+ # @param rollout [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout>]
94
+ # @param version_id [String]
95
+
96
+ class Rollout < Telnyx::Internal::Type::BaseModel
97
+ # @!attribute version_id
98
+ #
99
+ # @return [String]
100
+ required :version_id, String
101
+
102
+ # @!attribute weight
103
+ #
104
+ # @return [Float]
105
+ required :weight, Float
106
+
107
+ # @!method initialize(version_id:, weight:)
108
+ # One slot in a percentage rollout.
109
+ #
110
+ # @param version_id [String]
111
+ # @param weight [Float]
112
+ end
113
+ end
114
+
115
+ class Match < Telnyx::Internal::Type::BaseModel
116
+ # @!attribute attribute
117
+ # Attribute name from the routing context
118
+ #
119
+ # @return [String]
120
+ required :attribute, String
121
+
122
+ # @!attribute operator
123
+ # Match operator
124
+ #
125
+ # @return [Symbol, Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator]
126
+ required :operator, enum: -> { Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator }
127
+
128
+ # @!attribute values
129
+ #
130
+ # @return [Array<String>]
131
+ required :values, Telnyx::Internal::Type::ArrayOf[String]
132
+
133
+ # @!method initialize(attribute:, operator:, values:)
134
+ # A single attribute/operator/values check.
135
+ #
136
+ # A clause matches when the routing context's value for `attribute` satisfies
137
+ # `operator` against any of `values`.
138
+ #
139
+ # @param attribute [String] Attribute name from the routing context
140
+ #
141
+ # @param operator [Symbol, Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator] Match operator
142
+ #
143
+ # @param values [Array<String>]
144
+
145
+ # Match operator
146
+ #
147
+ # @see Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match#operator
148
+ module Operator
149
+ extend Telnyx::Internal::Type::Enum
150
+
151
+ IN = :in
152
+ NOT_IN = :not_in
153
+ STARTS_WITH = :starts_with
154
+
155
+ # @!method self.values
156
+ # @return [Array<Symbol>]
157
+ end
158
+ end
159
+ end
38
160
  end
39
161
  end
40
162
  end
@@ -52,13 +52,25 @@ module Telnyx
52
52
  # @return [Hash{Symbol=>String}, nil]
53
53
  optional :dynamic_variables, Telnyx::Internal::Type::HashOf[String]
54
54
 
55
+ # @!attribute max_retries_client_errors
56
+ # Configure number of retries on client errors: busy, no-answer, failed, canceled
57
+ # (caller hung up before the callee answered)
58
+ #
59
+ # @return [Integer, nil]
60
+ optional :max_retries_client_errors, Integer
61
+
62
+ # @!attribute retry_interval_secs
63
+ #
64
+ # @return [Integer, nil]
65
+ optional :retry_interval_secs, Integer
66
+
55
67
  # @!attribute text
56
68
  # Required for sms scheduled events. The text to be sent to the end user.
57
69
  #
58
70
  # @return [String, nil]
59
71
  optional :text, String
60
72
 
61
- # @!method initialize(assistant_id:, scheduled_at_fixed_datetime:, telnyx_agent_target:, telnyx_conversation_channel:, telnyx_end_user_target:, conversation_metadata: nil, dynamic_variables: nil, text: nil, request_options: {})
73
+ # @!method initialize(assistant_id:, scheduled_at_fixed_datetime:, telnyx_agent_target:, telnyx_conversation_channel:, telnyx_end_user_target:, conversation_metadata: nil, dynamic_variables: nil, max_retries_client_errors: nil, retry_interval_secs: nil, text: nil, request_options: {})
62
74
  # Some parameter documentations has been truncated, see
63
75
  # {Telnyx::Models::AI::Assistants::ScheduledEventCreateParams} for more details.
64
76
  #
@@ -76,6 +88,10 @@ module Telnyx
76
88
  #
77
89
  # @param dynamic_variables [Hash{Symbol=>String}] A map of dynamic variable names to values. These variables can be referenced in
78
90
  #
91
+ # @param max_retries_client_errors [Integer] Configure number of retries on client errors: busy, no-answer, failed, canceled
92
+ #
93
+ # @param retry_interval_secs [Integer]
94
+ #
79
95
  # @param text [String] Required for sms scheduled events. The text to be sent to the end user.
80
96
  #
81
97
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
@@ -30,6 +30,24 @@ module Telnyx
30
30
  # @return [String]
31
31
  required :telnyx_end_user_target, String
32
32
 
33
+ # @!attribute call_attempts
34
+ #
35
+ # @return [Array<Telnyx::Models::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt>, nil]
36
+ optional :call_attempts,
37
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt] }
38
+
39
+ # @!attribute call_duration
40
+ # Duration of the call in seconds
41
+ #
42
+ # @return [Integer, nil]
43
+ optional :call_duration, Integer
44
+
45
+ # @!attribute call_status
46
+ # Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
47
+ #
48
+ # @return [String, nil]
49
+ optional :call_status, String
50
+
33
51
  # @!attribute conversation_id
34
52
  #
35
53
  # @return [String, nil]
@@ -46,6 +64,12 @@ module Telnyx
46
64
  # @return [Time, nil]
47
65
  optional :created_at, Time
48
66
 
67
+ # @!attribute dispatched_at
68
+ # Date time at which call was sent
69
+ #
70
+ # @return [Time, nil]
71
+ optional :dispatched_at, Time
72
+
49
73
  # @!attribute dynamic_variables
50
74
  # A map of dynamic variable names to values. These variables can be referenced in
51
75
  # the assistant's instructions and messages using {{variable_name}} syntax.
@@ -58,6 +82,13 @@ module Telnyx
58
82
  # @return [Array<String>, nil]
59
83
  optional :errors, Telnyx::Internal::Type::ArrayOf[String]
60
84
 
85
+ # @!attribute max_retries_client_errors
86
+ # Configure number of retries on client errors: busy, no-answer, failed, canceled
87
+ # (caller hung up before the callee answered)
88
+ #
89
+ # @return [Integer, nil]
90
+ optional :max_retries_client_errors, Integer
91
+
61
92
  # @!attribute retry_attempts
62
93
  #
63
94
  # @return [Integer, nil]
@@ -68,6 +99,11 @@ module Telnyx
68
99
  # @return [Integer, nil]
69
100
  optional :retry_count, Integer
70
101
 
102
+ # @!attribute retry_interval_secs
103
+ #
104
+ # @return [Integer, nil]
105
+ optional :retry_interval_secs, Integer
106
+
71
107
  # @!attribute scheduled_event_id
72
108
  #
73
109
  # @return [String, nil]
@@ -78,7 +114,7 @@ module Telnyx
78
114
  # @return [Symbol, Telnyx::Models::AI::Assistants::EventStatus, nil]
79
115
  optional :status, enum: -> { Telnyx::AI::Assistants::EventStatus }
80
116
 
81
- # @!method initialize(assistant_id:, scheduled_at_fixed_datetime:, telnyx_agent_target:, telnyx_conversation_channel:, telnyx_end_user_target:, conversation_id: nil, conversation_metadata: nil, created_at: nil, dynamic_variables: nil, errors: nil, retry_attempts: nil, retry_count: nil, scheduled_event_id: nil, status: nil)
117
+ # @!method initialize(assistant_id:, scheduled_at_fixed_datetime:, telnyx_agent_target:, telnyx_conversation_channel:, telnyx_end_user_target:, call_attempts: nil, call_duration: nil, call_status: nil, conversation_id: nil, conversation_metadata: nil, created_at: nil, dispatched_at: nil, dynamic_variables: nil, errors: nil, max_retries_client_errors: nil, retry_attempts: nil, retry_count: nil, retry_interval_secs: nil, scheduled_event_id: nil, status: nil)
82
118
  # Some parameter documentations has been truncated, see
83
119
  # {Telnyx::Models::AI::Assistants::ScheduledPhoneCallEventResponse} for more
84
120
  # details.
@@ -93,24 +129,78 @@ module Telnyx
93
129
  #
94
130
  # @param telnyx_end_user_target [String]
95
131
  #
132
+ # @param call_attempts [Array<Telnyx::Models::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt>]
133
+ #
134
+ # @param call_duration [Integer] Duration of the call in seconds
135
+ #
136
+ # @param call_status [String] Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
137
+ #
96
138
  # @param conversation_id [String]
97
139
  #
98
140
  # @param conversation_metadata [Hash{Symbol=>String, Integer, Boolean}]
99
141
  #
100
142
  # @param created_at [Time]
101
143
  #
144
+ # @param dispatched_at [Time] Date time at which call was sent
145
+ #
102
146
  # @param dynamic_variables [Hash{Symbol=>String}] A map of dynamic variable names to values. These variables can be referenced in
103
147
  #
104
148
  # @param errors [Array<String>]
105
149
  #
150
+ # @param max_retries_client_errors [Integer] Configure number of retries on client errors: busy, no-answer, failed, canceled
151
+ #
106
152
  # @param retry_attempts [Integer]
107
153
  #
108
154
  # @param retry_count [Integer]
109
155
  #
156
+ # @param retry_interval_secs [Integer]
157
+ #
110
158
  # @param scheduled_event_id [String]
111
159
  #
112
160
  # @param status [Symbol, Telnyx::Models::AI::Assistants::EventStatus]
113
161
 
162
+ class CallAttempt < Telnyx::Internal::Type::BaseModel
163
+ # @!attribute attempt_number
164
+ #
165
+ # @return [Integer]
166
+ required :attempt_number, Integer
167
+
168
+ # @!attribute attempted_at
169
+ #
170
+ # @return [Time]
171
+ required :attempted_at, Time
172
+
173
+ # @!attribute call_status
174
+ # Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
175
+ #
176
+ # @return [String]
177
+ required :call_status, String
178
+
179
+ # @!attribute call_duration
180
+ # Duration of the call in seconds
181
+ #
182
+ # @return [Integer, nil]
183
+ optional :call_duration, Integer
184
+
185
+ # @!attribute telnyx_call_control_id
186
+ #
187
+ # @return [String, nil]
188
+ optional :telnyx_call_control_id, String
189
+
190
+ # @!method initialize(attempt_number:, attempted_at:, call_status:, call_duration: nil, telnyx_call_control_id: nil)
191
+ # One row in `call_attempts` — captures the terminal outcome of a single dispatch.
192
+ #
193
+ # @param attempt_number [Integer]
194
+ #
195
+ # @param attempted_at [Time]
196
+ #
197
+ # @param call_status [String] Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
198
+ #
199
+ # @param call_duration [Integer] Duration of the call in seconds
200
+ #
201
+ # @param telnyx_call_control_id [String]
202
+ end
203
+
114
204
  module ConversationMetadata
115
205
  extend Telnyx::Internal::Type::Union
116
206