telnyx 5.70.0 → 5.71.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 (105) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/ai/assistant.rb +6 -149
  5. data/lib/telnyx/models/book_appointment_tool.rb +31 -0
  6. data/lib/telnyx/models/book_appointment_tool_params.rb +51 -0
  7. data/lib/telnyx/models/call_assistant_request.rb +176 -0
  8. data/lib/telnyx/models/call_control_bucket_ids.rb +23 -0
  9. data/lib/telnyx/models/call_control_retrieval_tool.rb +31 -0
  10. data/lib/telnyx/models/call_dial_params.rb +11 -1
  11. data/lib/telnyx/models/calls/action_answer_params.rb +11 -1
  12. data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +6 -39
  13. data/lib/telnyx/models/check_availability_tool.rb +31 -0
  14. data/lib/telnyx/models/check_availability_tool_params.rb +31 -0
  15. data/lib/telnyx/models/pronunciation_dict_alias_item.rb +51 -0
  16. data/lib/telnyx/models/pronunciation_dict_create_params.rb +5 -93
  17. data/lib/telnyx/models/pronunciation_dict_create_response.rb +3 -191
  18. data/lib/telnyx/models/pronunciation_dict_data.rb +101 -0
  19. data/lib/telnyx/models/pronunciation_dict_phoneme_item.rb +71 -0
  20. data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +3 -191
  21. data/lib/telnyx/models/pronunciation_dict_update_params.rb +5 -93
  22. data/lib/telnyx/models/pronunciation_dict_update_response.rb +3 -191
  23. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +203 -191
  24. data/lib/telnyx/models/voice_clone_create_from_design_params.rb +3 -3
  25. data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +61 -54
  26. data/lib/telnyx/models/voice_clone_create_params.rb +28 -28
  27. data/lib/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_params.rb +26 -0
  28. data/lib/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_response.rb +54 -0
  29. data/lib/telnyx/models.rb +20 -0
  30. data/lib/telnyx/resources/calls/actions.rb +4 -2
  31. data/lib/telnyx/resources/calls.rb +3 -1
  32. data/lib/telnyx/resources/pronunciation_dicts.rb +4 -4
  33. data/lib/telnyx/resources/texml/accounts/calls.rb +3 -3
  34. data/lib/telnyx/resources/voice_clones.rb +6 -6
  35. data/lib/telnyx/resources/whatsapp/phone_numbers/profile/photo.rb +20 -0
  36. data/lib/telnyx/version.rb +1 -1
  37. data/lib/telnyx.rb +12 -1
  38. data/rbi/telnyx/models/ai/assistant.rbi +15 -329
  39. data/rbi/telnyx/models/book_appointment_tool.rbi +65 -0
  40. data/rbi/telnyx/models/book_appointment_tool_params.rbi +83 -0
  41. data/rbi/telnyx/models/call_assistant_request.rbi +322 -0
  42. data/rbi/telnyx/models/call_control_bucket_ids.rbi +42 -0
  43. data/rbi/telnyx/models/call_control_retrieval_tool.rbi +63 -0
  44. data/rbi/telnyx/models/call_dial_params.rbi +15 -0
  45. data/rbi/telnyx/models/calls/action_answer_params.rbi +15 -0
  46. data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +10 -77
  47. data/rbi/telnyx/models/check_availability_tool.rbi +67 -0
  48. data/rbi/telnyx/models/check_availability_tool_params.rbi +45 -0
  49. data/rbi/telnyx/models/pronunciation_dict_alias_item.rbi +79 -0
  50. data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +8 -154
  51. data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +6 -366
  52. data/rbi/telnyx/models/pronunciation_dict_data.rbi +186 -0
  53. data/rbi/telnyx/models/pronunciation_dict_phoneme_item.rbi +117 -0
  54. data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +6 -366
  55. data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +10 -156
  56. data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +6 -366
  57. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +391 -403
  58. data/rbi/telnyx/models/voice_clone_create_from_design_params.rbi +10 -10
  59. data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +94 -92
  60. data/rbi/telnyx/models/voice_clone_create_params.rbi +53 -53
  61. data/rbi/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_params.rbi +47 -0
  62. data/rbi/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_response.rbi +118 -0
  63. data/rbi/telnyx/models.rbi +20 -0
  64. data/rbi/telnyx/resources/calls/actions.rbi +9 -3
  65. data/rbi/telnyx/resources/calls.rbi +5 -0
  66. data/rbi/telnyx/resources/pronunciation_dicts.rbi +5 -7
  67. data/rbi/telnyx/resources/texml/accounts/calls.rbi +5 -5
  68. data/rbi/telnyx/resources/voice_clones.rbi +9 -9
  69. data/rbi/telnyx/resources/whatsapp/phone_numbers/profile/photo.rbi +16 -0
  70. data/sig/telnyx/models/ai/assistant.rbs +3 -142
  71. data/sig/telnyx/models/book_appointment_tool.rbs +35 -0
  72. data/sig/telnyx/models/book_appointment_tool_params.rbs +39 -0
  73. data/sig/telnyx/models/call_assistant_request.rbs +132 -0
  74. data/sig/telnyx/models/call_control_bucket_ids.rbs +21 -0
  75. data/sig/telnyx/models/call_control_retrieval_tool.rbs +35 -0
  76. data/sig/telnyx/models/call_dial_params.rbs +9 -0
  77. data/sig/telnyx/models/calls/action_answer_params.rbs +9 -0
  78. data/sig/telnyx/models/calls/action_start_ai_assistant_params.rbs +6 -35
  79. data/sig/telnyx/models/check_availability_tool.rbs +35 -0
  80. data/sig/telnyx/models/check_availability_tool_params.rbs +16 -0
  81. data/sig/telnyx/models/pronunciation_dict_alias_item.rbs +40 -0
  82. data/sig/telnyx/models/pronunciation_dict_create_params.rbs +2 -58
  83. data/sig/telnyx/models/pronunciation_dict_create_response.rbs +6 -155
  84. data/sig/telnyx/models/pronunciation_dict_data.rbs +88 -0
  85. data/sig/telnyx/models/pronunciation_dict_phoneme_item.rbs +55 -0
  86. data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +6 -155
  87. data/sig/telnyx/models/pronunciation_dict_update_params.rbs +2 -58
  88. data/sig/telnyx/models/pronunciation_dict_update_response.rbs +6 -155
  89. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +317 -325
  90. data/sig/telnyx/models/voice_clone_create_from_design_params.rbs +7 -7
  91. data/sig/telnyx/models/voice_clone_create_from_upload_params.rbs +63 -61
  92. data/sig/telnyx/models/voice_clone_create_params.rbs +35 -35
  93. data/sig/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_params.rbs +30 -0
  94. data/sig/telnyx/models/whatsapp/phone_numbers/profile/photo_retrieve_response.rbs +63 -0
  95. data/sig/telnyx/models.rbs +20 -0
  96. data/sig/telnyx/resources/calls/actions.rbs +2 -1
  97. data/sig/telnyx/resources/calls.rbs +1 -0
  98. data/sig/telnyx/resources/pronunciation_dicts.rbs +1 -1
  99. data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -1
  100. data/sig/telnyx/resources/voice_clones.rbs +2 -2
  101. data/sig/telnyx/resources/whatsapp/phone_numbers/profile/photo.rbs +5 -0
  102. metadata +38 -5
  103. data/lib/telnyx/models/pronunciation_dict_list_response.rb +0 -190
  104. data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +0 -353
  105. data/sig/telnyx/models/pronunciation_dict_list_response.rbs +0 -144
@@ -40,12 +40,12 @@ module Telnyx
40
40
  T.nilable(
41
41
  T::Array[
42
42
  T.any(
43
- Telnyx::AI::Assistant::Tool::BookAppointment,
44
- Telnyx::AI::Assistant::Tool::CheckAvailability,
43
+ Telnyx::BookAppointmentTool,
44
+ Telnyx::CheckAvailabilityTool,
45
45
  Telnyx::AI::WebhookTool,
46
46
  Telnyx::AI::HangupTool,
47
47
  Telnyx::AI::TransferTool,
48
- Telnyx::AI::Assistant::Tool::Retrieval
48
+ Telnyx::CallControlRetrievalTool
49
49
  )
50
50
  ]
51
51
  )
@@ -58,12 +58,12 @@ module Telnyx
58
58
  tools:
59
59
  T::Array[
60
60
  T.any(
61
- Telnyx::AI::Assistant::Tool::BookAppointment::OrHash,
62
- Telnyx::AI::Assistant::Tool::CheckAvailability::OrHash,
61
+ Telnyx::BookAppointmentTool::OrHash,
62
+ Telnyx::CheckAvailabilityTool::OrHash,
63
63
  Telnyx::AI::WebhookTool::OrHash,
64
64
  Telnyx::AI::HangupTool::OrHash,
65
65
  Telnyx::AI::TransferTool::OrHash,
66
- Telnyx::AI::Assistant::Tool::Retrieval::OrHash
66
+ Telnyx::CallControlRetrievalTool::OrHash
67
67
  )
68
68
  ]
69
69
  ).void
@@ -79,12 +79,12 @@ module Telnyx
79
79
  tools:
80
80
  T::Array[
81
81
  T.any(
82
- Telnyx::AI::Assistant::Tool::BookAppointment::OrHash,
83
- Telnyx::AI::Assistant::Tool::CheckAvailability::OrHash,
82
+ Telnyx::BookAppointmentTool::OrHash,
83
+ Telnyx::CheckAvailabilityTool::OrHash,
84
84
  Telnyx::AI::WebhookTool::OrHash,
85
85
  Telnyx::AI::HangupTool::OrHash,
86
86
  Telnyx::AI::TransferTool::OrHash,
87
- Telnyx::AI::Assistant::Tool::Retrieval::OrHash
87
+ Telnyx::CallControlRetrievalTool::OrHash
88
88
  )
89
89
  ]
90
90
  ).returns(T.attached_class)
@@ -114,12 +114,12 @@ module Telnyx
114
114
  tools:
115
115
  T::Array[
116
116
  T.any(
117
- Telnyx::AI::Assistant::Tool::BookAppointment,
118
- Telnyx::AI::Assistant::Tool::CheckAvailability,
117
+ Telnyx::BookAppointmentTool,
118
+ Telnyx::CheckAvailabilityTool,
119
119
  Telnyx::AI::WebhookTool,
120
120
  Telnyx::AI::HangupTool,
121
121
  Telnyx::AI::TransferTool,
122
- Telnyx::AI::Assistant::Tool::Retrieval
122
+ Telnyx::CallControlRetrievalTool
123
123
  )
124
124
  ]
125
125
  }
@@ -134,329 +134,15 @@ module Telnyx
134
134
  Variants =
135
135
  T.type_alias do
136
136
  T.any(
137
- Telnyx::AI::Assistant::Tool::BookAppointment,
138
- Telnyx::AI::Assistant::Tool::CheckAvailability,
137
+ Telnyx::BookAppointmentTool,
138
+ Telnyx::CheckAvailabilityTool,
139
139
  Telnyx::AI::WebhookTool,
140
140
  Telnyx::AI::HangupTool,
141
141
  Telnyx::AI::TransferTool,
142
- Telnyx::AI::Assistant::Tool::Retrieval
142
+ Telnyx::CallControlRetrievalTool
143
143
  )
144
144
  end
145
145
 
146
- class BookAppointment < Telnyx::Internal::Type::BaseModel
147
- OrHash =
148
- T.type_alias do
149
- T.any(
150
- Telnyx::AI::Assistant::Tool::BookAppointment,
151
- Telnyx::Internal::AnyHash
152
- )
153
- end
154
-
155
- sig do
156
- returns(
157
- Telnyx::AI::Assistant::Tool::BookAppointment::BookAppointment
158
- )
159
- end
160
- attr_reader :book_appointment
161
-
162
- sig do
163
- params(
164
- book_appointment:
165
- Telnyx::AI::Assistant::Tool::BookAppointment::BookAppointment::OrHash
166
- ).void
167
- end
168
- attr_writer :book_appointment
169
-
170
- sig { returns(Symbol) }
171
- attr_accessor :type
172
-
173
- sig do
174
- params(
175
- book_appointment:
176
- Telnyx::AI::Assistant::Tool::BookAppointment::BookAppointment::OrHash,
177
- type: Symbol
178
- ).returns(T.attached_class)
179
- end
180
- def self.new(book_appointment:, type: :book_appointment)
181
- end
182
-
183
- sig do
184
- override.returns(
185
- {
186
- book_appointment:
187
- Telnyx::AI::Assistant::Tool::BookAppointment::BookAppointment,
188
- type: Symbol
189
- }
190
- )
191
- end
192
- def to_hash
193
- end
194
-
195
- class BookAppointment < Telnyx::Internal::Type::BaseModel
196
- OrHash =
197
- T.type_alias do
198
- T.any(
199
- Telnyx::AI::Assistant::Tool::BookAppointment::BookAppointment,
200
- Telnyx::Internal::AnyHash
201
- )
202
- end
203
-
204
- # Reference to an integration secret that contains your Cal.com API key. You would
205
- # pass the `identifier` for an integration secret
206
- # [/v2/integration_secrets](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
207
- # that refers to your Cal.com API key.
208
- sig { returns(String) }
209
- attr_accessor :api_key_ref
210
-
211
- # Event Type ID for which slots are being fetched.
212
- # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-event-type-id)
213
- sig { returns(Integer) }
214
- attr_accessor :event_type_id
215
-
216
- # The name of the attendee
217
- # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-name).
218
- # If not provided, the assistant will ask for the attendee's name.
219
- sig { returns(T.nilable(String)) }
220
- attr_reader :attendee_name
221
-
222
- sig { params(attendee_name: String).void }
223
- attr_writer :attendee_name
224
-
225
- # The timezone of the attendee
226
- # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-timezone).
227
- # If not provided, the assistant will ask for the attendee's timezone.
228
- sig { returns(T.nilable(String)) }
229
- attr_reader :attendee_timezone
230
-
231
- sig { params(attendee_timezone: String).void }
232
- attr_writer :attendee_timezone
233
-
234
- sig do
235
- params(
236
- api_key_ref: String,
237
- event_type_id: Integer,
238
- attendee_name: String,
239
- attendee_timezone: String
240
- ).returns(T.attached_class)
241
- end
242
- def self.new(
243
- # Reference to an integration secret that contains your Cal.com API key. You would
244
- # pass the `identifier` for an integration secret
245
- # [/v2/integration_secrets](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
246
- # that refers to your Cal.com API key.
247
- api_key_ref:,
248
- # Event Type ID for which slots are being fetched.
249
- # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-event-type-id)
250
- event_type_id:,
251
- # The name of the attendee
252
- # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-name).
253
- # If not provided, the assistant will ask for the attendee's name.
254
- attendee_name: nil,
255
- # The timezone of the attendee
256
- # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-timezone).
257
- # If not provided, the assistant will ask for the attendee's timezone.
258
- attendee_timezone: nil
259
- )
260
- end
261
-
262
- sig do
263
- override.returns(
264
- {
265
- api_key_ref: String,
266
- event_type_id: Integer,
267
- attendee_name: String,
268
- attendee_timezone: String
269
- }
270
- )
271
- end
272
- def to_hash
273
- end
274
- end
275
- end
276
-
277
- class CheckAvailability < Telnyx::Internal::Type::BaseModel
278
- OrHash =
279
- T.type_alias do
280
- T.any(
281
- Telnyx::AI::Assistant::Tool::CheckAvailability,
282
- Telnyx::Internal::AnyHash
283
- )
284
- end
285
-
286
- sig do
287
- returns(
288
- Telnyx::AI::Assistant::Tool::CheckAvailability::CheckAvailability
289
- )
290
- end
291
- attr_reader :check_availability
292
-
293
- sig do
294
- params(
295
- check_availability:
296
- Telnyx::AI::Assistant::Tool::CheckAvailability::CheckAvailability::OrHash
297
- ).void
298
- end
299
- attr_writer :check_availability
300
-
301
- sig { returns(Symbol) }
302
- attr_accessor :type
303
-
304
- sig do
305
- params(
306
- check_availability:
307
- Telnyx::AI::Assistant::Tool::CheckAvailability::CheckAvailability::OrHash,
308
- type: Symbol
309
- ).returns(T.attached_class)
310
- end
311
- def self.new(check_availability:, type: :check_availability)
312
- end
313
-
314
- sig do
315
- override.returns(
316
- {
317
- check_availability:
318
- Telnyx::AI::Assistant::Tool::CheckAvailability::CheckAvailability,
319
- type: Symbol
320
- }
321
- )
322
- end
323
- def to_hash
324
- end
325
-
326
- class CheckAvailability < Telnyx::Internal::Type::BaseModel
327
- OrHash =
328
- T.type_alias do
329
- T.any(
330
- Telnyx::AI::Assistant::Tool::CheckAvailability::CheckAvailability,
331
- Telnyx::Internal::AnyHash
332
- )
333
- end
334
-
335
- # Reference to an integration secret that contains your Cal.com API key. You would
336
- # pass the `identifier` for an integration secret
337
- # [/v2/integration_secrets](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
338
- # that refers to your Cal.com API key.
339
- sig { returns(String) }
340
- attr_accessor :api_key_ref
341
-
342
- # Event Type ID for which slots are being fetched.
343
- # [cal.com](https://cal.com/docs/api-reference/v2/slots/get-available-slots#parameter-event-type-id)
344
- sig { returns(Integer) }
345
- attr_accessor :event_type_id
346
-
347
- sig do
348
- params(api_key_ref: String, event_type_id: Integer).returns(
349
- T.attached_class
350
- )
351
- end
352
- def self.new(
353
- # Reference to an integration secret that contains your Cal.com API key. You would
354
- # pass the `identifier` for an integration secret
355
- # [/v2/integration_secrets](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
356
- # that refers to your Cal.com API key.
357
- api_key_ref:,
358
- # Event Type ID for which slots are being fetched.
359
- # [cal.com](https://cal.com/docs/api-reference/v2/slots/get-available-slots#parameter-event-type-id)
360
- event_type_id:
361
- )
362
- end
363
-
364
- sig do
365
- override.returns(
366
- { api_key_ref: String, event_type_id: Integer }
367
- )
368
- end
369
- def to_hash
370
- end
371
- end
372
- end
373
-
374
- class Retrieval < Telnyx::Internal::Type::BaseModel
375
- OrHash =
376
- T.type_alias do
377
- T.any(
378
- Telnyx::AI::Assistant::Tool::Retrieval,
379
- Telnyx::Internal::AnyHash
380
- )
381
- end
382
-
383
- sig { returns(Telnyx::AI::Assistant::Tool::Retrieval::Retrieval) }
384
- attr_reader :retrieval
385
-
386
- sig do
387
- params(
388
- retrieval:
389
- Telnyx::AI::Assistant::Tool::Retrieval::Retrieval::OrHash
390
- ).void
391
- end
392
- attr_writer :retrieval
393
-
394
- sig { returns(Symbol) }
395
- attr_accessor :type
396
-
397
- sig do
398
- params(
399
- retrieval:
400
- Telnyx::AI::Assistant::Tool::Retrieval::Retrieval::OrHash,
401
- type: Symbol
402
- ).returns(T.attached_class)
403
- end
404
- def self.new(retrieval:, type: :retrieval)
405
- end
406
-
407
- sig do
408
- override.returns(
409
- {
410
- retrieval: Telnyx::AI::Assistant::Tool::Retrieval::Retrieval,
411
- type: Symbol
412
- }
413
- )
414
- end
415
- def to_hash
416
- end
417
-
418
- class Retrieval < Telnyx::Internal::Type::BaseModel
419
- OrHash =
420
- T.type_alias do
421
- T.any(
422
- Telnyx::AI::Assistant::Tool::Retrieval::Retrieval,
423
- Telnyx::Internal::AnyHash
424
- )
425
- end
426
-
427
- sig { returns(T::Array[String]) }
428
- attr_accessor :bucket_ids
429
-
430
- # The maximum number of results to retrieve as context for the language model.
431
- sig { returns(T.nilable(Integer)) }
432
- attr_reader :max_num_results
433
-
434
- sig { params(max_num_results: Integer).void }
435
- attr_writer :max_num_results
436
-
437
- sig do
438
- params(
439
- bucket_ids: T::Array[String],
440
- max_num_results: Integer
441
- ).returns(T.attached_class)
442
- end
443
- def self.new(
444
- bucket_ids:,
445
- # The maximum number of results to retrieve as context for the language model.
446
- max_num_results: nil
447
- )
448
- end
449
-
450
- sig do
451
- override.returns(
452
- { bucket_ids: T::Array[String], max_num_results: Integer }
453
- )
454
- end
455
- def to_hash
456
- end
457
- end
458
- end
459
-
460
146
  sig do
461
147
  override.returns(T::Array[Telnyx::AI::Assistant::Tool::Variants])
462
148
  end
@@ -0,0 +1,65 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ class BookAppointmentTool < Telnyx::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Telnyx::BookAppointmentTool, Telnyx::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(Telnyx::BookAppointmentToolParams) }
12
+ attr_reader :book_appointment
13
+
14
+ sig do
15
+ params(book_appointment: Telnyx::BookAppointmentToolParams::OrHash).void
16
+ end
17
+ attr_writer :book_appointment
18
+
19
+ sig { returns(Telnyx::BookAppointmentTool::Type::OrSymbol) }
20
+ attr_accessor :type
21
+
22
+ sig do
23
+ params(
24
+ book_appointment: Telnyx::BookAppointmentToolParams::OrHash,
25
+ type: Telnyx::BookAppointmentTool::Type::OrSymbol
26
+ ).returns(T.attached_class)
27
+ end
28
+ def self.new(book_appointment:, type:)
29
+ end
30
+
31
+ sig do
32
+ override.returns(
33
+ {
34
+ book_appointment: Telnyx::BookAppointmentToolParams,
35
+ type: Telnyx::BookAppointmentTool::Type::OrSymbol
36
+ }
37
+ )
38
+ end
39
+ def to_hash
40
+ end
41
+
42
+ module Type
43
+ extend Telnyx::Internal::Type::Enum
44
+
45
+ TaggedSymbol =
46
+ T.type_alias { T.all(Symbol, Telnyx::BookAppointmentTool::Type) }
47
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
48
+
49
+ BOOK_APPOINTMENT =
50
+ T.let(
51
+ :book_appointment,
52
+ Telnyx::BookAppointmentTool::Type::TaggedSymbol
53
+ )
54
+
55
+ sig do
56
+ override.returns(
57
+ T::Array[Telnyx::BookAppointmentTool::Type::TaggedSymbol]
58
+ )
59
+ end
60
+ def self.values
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,83 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ class BookAppointmentToolParams < Telnyx::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Telnyx::BookAppointmentToolParams, Telnyx::Internal::AnyHash)
9
+ end
10
+
11
+ # Reference to an integration secret that contains your Cal.com API key. You would
12
+ # pass the `identifier` for an integration secret
13
+ # [/v2/integration_secrets](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
14
+ # that refers to your Cal.com API key.
15
+ sig { returns(String) }
16
+ attr_accessor :api_key_ref
17
+
18
+ # Event Type ID for which slots are being fetched.
19
+ # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-event-type-id)
20
+ sig { returns(Integer) }
21
+ attr_accessor :event_type_id
22
+
23
+ # The name of the attendee
24
+ # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-name).
25
+ # If not provided, the assistant will ask for the attendee's name.
26
+ sig { returns(T.nilable(String)) }
27
+ attr_reader :attendee_name
28
+
29
+ sig { params(attendee_name: String).void }
30
+ attr_writer :attendee_name
31
+
32
+ # The timezone of the attendee
33
+ # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-timezone).
34
+ # If not provided, the assistant will ask for the attendee's timezone.
35
+ sig { returns(T.nilable(String)) }
36
+ attr_reader :attendee_timezone
37
+
38
+ sig { params(attendee_timezone: String).void }
39
+ attr_writer :attendee_timezone
40
+
41
+ sig do
42
+ params(
43
+ api_key_ref: String,
44
+ event_type_id: Integer,
45
+ attendee_name: String,
46
+ attendee_timezone: String
47
+ ).returns(T.attached_class)
48
+ end
49
+ def self.new(
50
+ # Reference to an integration secret that contains your Cal.com API key. You would
51
+ # pass the `identifier` for an integration secret
52
+ # [/v2/integration_secrets](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
53
+ # that refers to your Cal.com API key.
54
+ api_key_ref:,
55
+ # Event Type ID for which slots are being fetched.
56
+ # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-event-type-id)
57
+ event_type_id:,
58
+ # The name of the attendee
59
+ # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-name).
60
+ # If not provided, the assistant will ask for the attendee's name.
61
+ attendee_name: nil,
62
+ # The timezone of the attendee
63
+ # [cal.com](https://cal.com/docs/api-reference/v2/bookings/create-a-booking#body-attendee-timezone).
64
+ # If not provided, the assistant will ask for the attendee's timezone.
65
+ attendee_timezone: nil
66
+ )
67
+ end
68
+
69
+ sig do
70
+ override.returns(
71
+ {
72
+ api_key_ref: String,
73
+ event_type_id: Integer,
74
+ attendee_name: String,
75
+ attendee_timezone: String
76
+ }
77
+ )
78
+ end
79
+ def to_hash
80
+ end
81
+ end
82
+ end
83
+ end