sentdm 0.39.0 → 0.40.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 (140) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +1 -1
  4. data/lib/sentdm/internal/voice_agents_page.rb +115 -0
  5. data/lib/sentdm/models/call_event.rb +8 -6
  6. data/lib/sentdm/models/call_event_payload.rb +25 -6
  7. data/lib/sentdm/models/channels/voice_create_params.rb +23 -11
  8. data/lib/sentdm/models/channels/voice_number.rb +23 -1
  9. data/lib/sentdm/models/channels/voice_update_params.rb +12 -1
  10. data/lib/sentdm/models/voice/agent_create_params.rb +142 -0
  11. data/lib/sentdm/models/voice/agent_delete_params.rb +28 -0
  12. data/lib/sentdm/models/voice/agent_list_params.rb +38 -0
  13. data/lib/sentdm/models/voice/agent_retrieve_params.rb +28 -0
  14. data/lib/sentdm/models/voice/agent_rotate_secret_params.rb +34 -0
  15. data/lib/sentdm/models/voice/agent_update_params.rb +141 -0
  16. data/lib/sentdm/models/voice/api_response_of_voice_agent.rb +51 -0
  17. data/lib/sentdm/models/voice/api_response_of_voice_agent_secret.rb +45 -0
  18. data/lib/sentdm/models/voice/api_response_of_voice_agents_list.rb +48 -0
  19. data/lib/sentdm/models/voice/api_response_of_voice_catalogue.rb +49 -0
  20. data/lib/sentdm/models/voice/call.rb +97 -5
  21. data/lib/sentdm/models/voice/call_list_params.rb +19 -1
  22. data/lib/sentdm/models/voice/catalogue_list_params.rb +22 -0
  23. data/lib/sentdm/models/voice/voice_agent.rb +138 -0
  24. data/lib/sentdm/models/voice/voice_agent_audio.rb +19 -0
  25. data/lib/sentdm/models/voice/voice_agent_audio_spec.rb +20 -0
  26. data/lib/sentdm/models/voice/voice_agent_limits.rb +31 -0
  27. data/lib/sentdm/models/voice/voice_agent_limits_spec.rb +40 -0
  28. data/lib/sentdm/models/voice/voice_agent_party.rb +25 -0
  29. data/lib/sentdm/models/voice/voice_agent_party_spec.rb +28 -0
  30. data/lib/sentdm/models/voice/voice_agent_secret.rb +27 -0
  31. data/lib/sentdm/models/voice/voice_agent_speech.rb +31 -0
  32. data/lib/sentdm/models/voice/voice_agent_speech_spec.rb +40 -0
  33. data/lib/sentdm/models/voice/voice_agent_transcripts.rb +25 -0
  34. data/lib/sentdm/models/voice/voice_agent_transcripts_spec.rb +32 -0
  35. data/lib/sentdm/models/voice/voice_agents_list.rb +30 -0
  36. data/lib/sentdm/models/voice/voice_catalogue.rb +30 -0
  37. data/lib/sentdm/models/voice/voice_catalogue_voice.rb +43 -0
  38. data/lib/sentdm/models/webhook_create_params.rb +31 -5
  39. data/lib/sentdm/models/webhook_response.rb +66 -4
  40. data/lib/sentdm/models/webhook_update_params.rb +15 -3
  41. data/lib/sentdm/resources/channels/voice.rb +38 -15
  42. data/lib/sentdm/resources/profiles/campaigns.rb +3 -2
  43. data/lib/sentdm/resources/voice/agents.rb +319 -0
  44. data/lib/sentdm/resources/voice/calls/participants.rb +11 -0
  45. data/lib/sentdm/resources/voice/calls.rb +44 -13
  46. data/lib/sentdm/resources/voice/catalogue.rb +71 -0
  47. data/lib/sentdm/resources/voice/tokens.rb +11 -0
  48. data/lib/sentdm/resources/voice.rb +86 -0
  49. data/lib/sentdm/resources/webhooks.rb +43 -15
  50. data/lib/sentdm/version.rb +1 -1
  51. data/lib/sentdm.rb +29 -0
  52. data/rbi/sentdm/internal/voice_agents_page.rbi +71 -0
  53. data/rbi/sentdm/models/call_event.rbi +14 -10
  54. data/rbi/sentdm/models/call_event_payload.rbi +28 -5
  55. data/rbi/sentdm/models/channels/voice_create_params.rbi +33 -17
  56. data/rbi/sentdm/models/channels/voice_number.rbi +31 -0
  57. data/rbi/sentdm/models/channels/voice_update_params.rbi +14 -0
  58. data/rbi/sentdm/models/voice/agent_create_params.rbi +215 -0
  59. data/rbi/sentdm/models/voice/agent_delete_params.rbi +48 -0
  60. data/rbi/sentdm/models/voice/agent_list_params.rbi +66 -0
  61. data/rbi/sentdm/models/voice/agent_retrieve_params.rbi +48 -0
  62. data/rbi/sentdm/models/voice/agent_rotate_secret_params.rbi +64 -0
  63. data/rbi/sentdm/models/voice/agent_update_params.rbi +211 -0
  64. data/rbi/sentdm/models/voice/api_response_of_voice_agent.rbi +85 -0
  65. data/rbi/sentdm/models/voice/api_response_of_voice_agent_secret.rbi +81 -0
  66. data/rbi/sentdm/models/voice/api_response_of_voice_agents_list.rbi +83 -0
  67. data/rbi/sentdm/models/voice/api_response_of_voice_catalogue.rbi +83 -0
  68. data/rbi/sentdm/models/voice/call.rbi +141 -8
  69. data/rbi/sentdm/models/voice/call_list_params.rbi +20 -0
  70. data/rbi/sentdm/models/voice/catalogue_list_params.rbi +40 -0
  71. data/rbi/sentdm/models/voice/voice_agent.rbi +196 -0
  72. data/rbi/sentdm/models/voice/voice_agent_audio.rbi +30 -0
  73. data/rbi/sentdm/models/voice/voice_agent_audio_spec.rbi +33 -0
  74. data/rbi/sentdm/models/voice/voice_agent_limits.rbi +57 -0
  75. data/rbi/sentdm/models/voice/voice_agent_limits_spec.rbi +62 -0
  76. data/rbi/sentdm/models/voice/voice_agent_party.rbi +36 -0
  77. data/rbi/sentdm/models/voice/voice_agent_party_spec.rbi +45 -0
  78. data/rbi/sentdm/models/voice/voice_agent_secret.rbi +37 -0
  79. data/rbi/sentdm/models/voice/voice_agent_speech.rbi +48 -0
  80. data/rbi/sentdm/models/voice/voice_agent_speech_spec.rbi +62 -0
  81. data/rbi/sentdm/models/voice/voice_agent_transcripts.rbi +43 -0
  82. data/rbi/sentdm/models/voice/voice_agent_transcripts_spec.rbi +51 -0
  83. data/rbi/sentdm/models/voice/voice_agents_list.rbi +55 -0
  84. data/rbi/sentdm/models/voice/voice_catalogue.rbi +59 -0
  85. data/rbi/sentdm/models/voice/voice_catalogue_voice.rbi +75 -0
  86. data/rbi/sentdm/models/webhook_create_params.rbi +41 -3
  87. data/rbi/sentdm/models/webhook_response.rbi +112 -3
  88. data/rbi/sentdm/models/webhook_update_params.rbi +18 -3
  89. data/rbi/sentdm/resources/channels/voice.rbi +52 -19
  90. data/rbi/sentdm/resources/profiles/campaigns.rbi +3 -2
  91. data/rbi/sentdm/resources/voice/agents.rbi +316 -0
  92. data/rbi/sentdm/resources/voice/calls/participants.rbi +11 -0
  93. data/rbi/sentdm/resources/voice/calls.rbi +46 -11
  94. data/rbi/sentdm/resources/voice/catalogue.rbi +59 -0
  95. data/rbi/sentdm/resources/voice/tokens.rbi +11 -0
  96. data/rbi/sentdm/resources/voice.rbi +84 -0
  97. data/rbi/sentdm/resources/webhooks.rbi +56 -16
  98. data/sig/sentdm/internal/voice_agents_page.rbs +41 -0
  99. data/sig/sentdm/models/call_event_payload.rbs +12 -0
  100. data/sig/sentdm/models/channels/voice_create_params.rbs +9 -4
  101. data/sig/sentdm/models/channels/voice_number.rbs +12 -0
  102. data/sig/sentdm/models/channels/voice_update_params.rbs +5 -0
  103. data/sig/sentdm/models/voice/agent_create_params.rbs +99 -0
  104. data/sig/sentdm/models/voice/agent_delete_params.rbs +34 -0
  105. data/sig/sentdm/models/voice/agent_list_params.rbs +40 -0
  106. data/sig/sentdm/models/voice/agent_retrieve_params.rbs +32 -0
  107. data/sig/sentdm/models/voice/agent_rotate_secret_params.rbs +40 -0
  108. data/sig/sentdm/models/voice/agent_update_params.rbs +108 -0
  109. data/sig/sentdm/models/voice/api_response_of_voice_agent.rbs +41 -0
  110. data/sig/sentdm/models/voice/api_response_of_voice_agent_secret.rbs +41 -0
  111. data/sig/sentdm/models/voice/api_response_of_voice_agents_list.rbs +41 -0
  112. data/sig/sentdm/models/voice/api_response_of_voice_catalogue.rbs +41 -0
  113. data/sig/sentdm/models/voice/call.rbs +65 -0
  114. data/sig/sentdm/models/voice/call_list_params.rbs +10 -0
  115. data/sig/sentdm/models/voice/catalogue_list_params.rbs +27 -0
  116. data/sig/sentdm/models/voice/voice_agent.rbs +116 -0
  117. data/sig/sentdm/models/voice/voice_agent_audio.rbs +19 -0
  118. data/sig/sentdm/models/voice/voice_agent_audio_spec.rbs +17 -0
  119. data/sig/sentdm/models/voice/voice_agent_limits.rbs +38 -0
  120. data/sig/sentdm/models/voice/voice_agent_limits_spec.rbs +34 -0
  121. data/sig/sentdm/models/voice/voice_agent_party.rbs +23 -0
  122. data/sig/sentdm/models/voice/voice_agent_party_spec.rbs +19 -0
  123. data/sig/sentdm/models/voice/voice_agent_secret.rbs +19 -0
  124. data/sig/sentdm/models/voice/voice_agent_speech.rbs +32 -0
  125. data/sig/sentdm/models/voice/voice_agent_speech_spec.rbs +26 -0
  126. data/sig/sentdm/models/voice/voice_agent_transcripts.rbs +23 -0
  127. data/sig/sentdm/models/voice/voice_agent_transcripts_spec.rbs +20 -0
  128. data/sig/sentdm/models/voice/voice_agents_list.rbs +35 -0
  129. data/sig/sentdm/models/voice/voice_catalogue.rbs +35 -0
  130. data/sig/sentdm/models/voice/voice_catalogue_voice.rbs +42 -0
  131. data/sig/sentdm/models/webhook_create_params.rbs +12 -0
  132. data/sig/sentdm/models/webhook_response.rbs +46 -3
  133. data/sig/sentdm/models/webhook_update_params.rbs +5 -0
  134. data/sig/sentdm/resources/channels/voice.rbs +3 -1
  135. data/sig/sentdm/resources/voice/agents.rbs +74 -0
  136. data/sig/sentdm/resources/voice/calls.rbs +2 -0
  137. data/sig/sentdm/resources/voice/catalogue.rbs +14 -0
  138. data/sig/sentdm/resources/voice.rbs +4 -0
  139. data/sig/sentdm/resources/webhooks.rbs +3 -0
  140. metadata +89 -2
@@ -14,18 +14,28 @@ module Sentdm
14
14
  # tried to deliver and what your endpoint answered — which is the first place to
15
15
  # look when something appears to be missing.
16
16
  class Webhooks
17
- # Creates a new webhook endpoint for the authenticated customer.
17
+ # Creates a new webhook endpoint for the authenticated customer. A webhook is
18
+ # version 2 unless the request sets webhook_version to 1: Svix delivers it, signed
19
+ # with the webhook-id, webhook-timestamp and webhook-signature headers, and
20
+ # retries it on its own schedule, so retry_count and timeout_seconds apply to
21
+ # version 1 only. sender_profile applies to version 1 only and is ignored on
22
+ # version 2; is_inheritable applies to version 2 only. A version 1 webhook's
23
+ # response returns its sender_profile selection, with an empty event_types when it
24
+ # is not cloned onto sender profiles; a version 2 webhook's response leaves
25
+ # sender_profile out.
18
26
  sig do
19
27
  params(
20
28
  display_name: String,
21
29
  endpoint_url: String,
22
30
  event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
23
31
  event_types: T::Array[String],
32
+ is_inheritable: T::Boolean,
24
33
  retry_count: Integer,
25
34
  sandbox: T::Boolean,
26
35
  sender_profile:
27
36
  T.nilable(Sentdm::WebhookCreateParams::SenderProfile::OrHash),
28
37
  timeout_seconds: Integer,
38
+ webhook_version: T.nilable(Integer),
29
39
  idempotency_key: String,
30
40
  x_profile_id: String,
31
41
  request_options: Sentdm::RequestOptions::OrHash
@@ -40,17 +50,28 @@ module Sentdm
40
50
  event_filters: nil,
41
51
  # Body param
42
52
  event_types: nil,
43
- # Body param
53
+ # Body param: Also delivers every sender profile's events to this webhook, at the
54
+ # same URL and with the same signing secret, and lets each profile see the webhook
55
+ # and read the events about itself. Off by default: the organization's own events
56
+ # only. Only an organization's version 2 webhook can set it.
57
+ is_inheritable: nil,
58
+ # Body param: Delivery retries. Applies to version 1 only: Svix retries a version
59
+ # 2 webhook on its own schedule.
44
60
  retry_count: nil,
45
61
  # Body param: Sandbox flag - when true, the operation is simulated without side
46
62
  # effects Useful for testing integrations without actual execution
47
63
  sandbox: nil,
48
64
  # Body param: Request-only: the events an organization webhook's sender profile
49
- # clones receive, one clone per existing and future profile. Responses never
50
- # return it.
65
+ # clones receive, one clone per existing and future profile. A version 1 webhook's
66
+ # responses report it as WebhookSenderProfileV3Response.
51
67
  sender_profile: nil,
52
- # Body param
68
+ # Body param: Delivery timeout. Applies to version 1 only.
53
69
  timeout_seconds: nil,
70
+ # Body param: Who delivers the webhook: 2, the default, is delivered by Svix and
71
+ # signed with the webhook-id, webhook-timestamp and webhook-signature headers; 1
72
+ # is the older delivery, signed with the X-Webhook-\* headers, which will be
73
+ # retired.
74
+ webhook_version: nil,
54
75
  # Header param: Unique key to ensure idempotent request processing. Must be 1-255
55
76
  # alphanumeric characters, hyphens, or underscores. Responses are cached for 24
56
77
  # hours per key per customer.
@@ -63,7 +84,8 @@ module Sentdm
63
84
  )
64
85
  end
65
86
 
66
- # Retrieves a single webhook by ID for the authenticated customer.
87
+ # Retrieves a single webhook by ID for the authenticated customer. A version 1
88
+ # webhook includes its sender_profile selection.
67
89
  sig do
68
90
  params(
69
91
  id: String,
@@ -80,7 +102,11 @@ module Sentdm
80
102
  )
81
103
  end
82
104
 
83
- # Updates an existing webhook for the authenticated customer.
105
+ # Updates an existing webhook for the authenticated customer. Its version does not
106
+ # change. sender_profile applies to a version 1 webhook and is_inheritable to a
107
+ # version 2 one; retry_count and timeout_seconds apply to version 1 only. A
108
+ # version 1 webhook's response returns its sender_profile selection as saved; a
109
+ # version 2 webhook's response leaves sender_profile out.
84
110
  sig do
85
111
  params(
86
112
  id: String,
@@ -88,6 +114,7 @@ module Sentdm
88
114
  endpoint_url: String,
89
115
  event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
90
116
  event_types: T::Array[String],
117
+ is_inheritable: T.nilable(T::Boolean),
91
118
  retry_count: Integer,
92
119
  sandbox: T::Boolean,
93
120
  sender_profile:
@@ -109,14 +136,18 @@ module Sentdm
109
136
  event_filters: nil,
110
137
  # Body param
111
138
  event_types: nil,
139
+ # Body param: Makes this webhook inheritable by the organization's sender profiles
140
+ # (see create), or stops it being inheritable. Omit or pass null to keep it as it
141
+ # is. Only a version 2 webhook can be inheritable.
142
+ is_inheritable: nil,
112
143
  # Body param
113
144
  retry_count: nil,
114
145
  # Body param: Sandbox flag - when true, the operation is simulated without side
115
146
  # effects Useful for testing integrations without actual execution
116
147
  sandbox: nil,
117
148
  # Body param: Request-only: the events an organization webhook's sender profile
118
- # clones receive, one clone per existing and future profile. Responses never
119
- # return it.
149
+ # clones receive, one clone per existing and future profile. A version 1 webhook's
150
+ # responses report it as WebhookSenderProfileV3Response.
120
151
  sender_profile: nil,
121
152
  # Body param
122
153
  timeout_seconds: nil,
@@ -132,7 +163,8 @@ module Sentdm
132
163
  )
133
164
  end
134
165
 
135
- # Retrieves a paginated list of webhooks for the authenticated customer.
166
+ # Retrieves a paginated list of webhooks for the authenticated customer. Each
167
+ # version 1 webhook includes its sender_profile selection.
136
168
  sig do
137
169
  params(
138
170
  is_active: T.nilable(T::Boolean),
@@ -192,9 +224,11 @@ module Sentdm
192
224
  )
193
225
  end
194
226
 
195
- # Retrieves a paginated list of delivery events for the specified webhook. If the
196
- # webhook is cloned onto your sender profiles, the list includes what those clones
197
- # received; read payload.account_id to tell whose event it is.
227
+ # Retrieves a paginated list of delivery events for the specified webhook, newest
228
+ # first. If the webhook is cloned onto your sender profiles (version 1) or
229
+ # inheritable by them (version 2, is_inheritable), the list includes their events;
230
+ # read payload.account_id to tell whose event it is. A sender profile may read its
231
+ # organization's inheritable webhook too, and gets the events about itself.
198
232
  sig do
199
233
  params(
200
234
  id: String,
@@ -226,8 +260,11 @@ module Sentdm
226
260
  )
227
261
  end
228
262
 
229
- # Generates a new signing secret for the specified webhook. The old secret is
230
- # immediately invalidated.
263
+ # Generates a new signing secret for the specified webhook. A version 1 webhook's
264
+ # old secret stops verifying at once. A version 2 webhook's deliveries are signed
265
+ # with the new secret at once, and with the old one as well for the next 24 hours,
266
+ # so a receiver can switch over without rejecting any; after that the old secret
267
+ # no longer verifies.
231
268
  sig do
232
269
  params(
233
270
  id: String,
@@ -255,7 +292,10 @@ module Sentdm
255
292
  )
256
293
  end
257
294
 
258
- # Sends a test event to the specified webhook endpoint to verify connectivity.
295
+ # Sends a test event to the specified webhook endpoint to verify connectivity. A
296
+ # version 1 webhook is tested at once and the answer says whether it was
297
+ # delivered; a version 2 webhook's test is queued with Svix, which delivers it
298
+ # right after, and the answer says it was queued.
259
299
  sig do
260
300
  params(
261
301
  id: String,
@@ -0,0 +1,41 @@
1
+ module Sentdm
2
+ module Internal
3
+ class VoiceAgentsPage[Elem]
4
+ include Sentdm::Internal::Type::BasePage[Elem]
5
+
6
+ attr_accessor data: Data
7
+
8
+ def inspect: -> String
9
+
10
+ type data = { agents: ::Array[top], pagination: Data::Pagination }
11
+ class Data < Sentdm::Internal::Type::BaseModel
12
+ attr_reader agents: ::Array[top]?
13
+
14
+ def agents=: (::Array[top]) -> ::Array[top]
15
+
16
+ attr_reader pagination: Data::Pagination?
17
+
18
+ def pagination=: (Data::Pagination) -> Data::Pagination
19
+
20
+ def initialize: (
21
+ ?agents: ::Array[top],
22
+ ?pagination: Data::Pagination
23
+ ) -> void
24
+
25
+ def to_hash: -> { agents: ::Array[top], pagination: Data::Pagination }
26
+
27
+ type pagination = { has_more: bool }
28
+
29
+ class Pagination < Sentdm::Internal::Type::BaseModel
30
+ attr_reader has_more: bool?
31
+
32
+ def has_more=: (bool) -> bool
33
+
34
+ def initialize: (?has_more: bool) -> void
35
+
36
+ def to_hash: -> { has_more: bool }
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -4,8 +4,10 @@ module Sentdm
4
4
  {
5
5
  call_id: String,
6
6
  account_id: String,
7
+ agent_id: String?,
7
8
  channel: String,
8
9
  duration_seconds: Integer?,
10
+ mode: String,
9
11
  number: String,
10
12
  price: Float?,
11
13
  reason: String?,
@@ -20,12 +22,18 @@ module Sentdm
20
22
 
21
23
  def account_id=: (String) -> String
22
24
 
25
+ attr_accessor agent_id: String?
26
+
23
27
  attr_reader channel: String?
24
28
 
25
29
  def channel=: (String) -> String
26
30
 
27
31
  attr_accessor duration_seconds: Integer?
28
32
 
33
+ attr_reader mode: String?
34
+
35
+ def mode=: (String) -> String
36
+
29
37
  attr_reader number: String?
30
38
 
31
39
  def number=: (String) -> String
@@ -43,8 +51,10 @@ module Sentdm
43
51
  def initialize: (
44
52
  call_id: String,
45
53
  ?account_id: String,
54
+ ?agent_id: String?,
46
55
  ?channel: String,
47
56
  ?duration_seconds: Integer?,
57
+ ?mode: String,
48
58
  ?number: String,
49
59
  ?price: Float?,
50
60
  ?reason: String?,
@@ -55,8 +65,10 @@ module Sentdm
55
65
  def to_hash: -> {
56
66
  call_id: String,
57
67
  account_id: String,
68
+ agent_id: String?,
58
69
  channel: String,
59
70
  duration_seconds: Integer?,
71
+ mode: String,
60
72
  number: String,
61
73
  price: Float?,
62
74
  reason: String?,
@@ -3,8 +3,9 @@ module Sentdm
3
3
  module Channels
4
4
  type voice_create_params =
5
5
  {
6
- callback_url: String,
6
+ agent_id: String?,
7
7
  area_code: String?,
8
+ callback_url: String?,
8
9
  default_for_app_calls: bool?,
9
10
  number: String?,
10
11
  sandbox: bool,
@@ -17,10 +18,12 @@ module Sentdm
17
18
  extend Sentdm::Internal::Type::RequestParameters::Converter
18
19
  include Sentdm::Internal::Type::RequestParameters
19
20
 
20
- attr_accessor callback_url: String
21
+ attr_accessor agent_id: String?
21
22
 
22
23
  attr_accessor area_code: String?
23
24
 
25
+ attr_accessor callback_url: String?
26
+
24
27
  attr_accessor default_for_app_calls: bool?
25
28
 
26
29
  attr_accessor number: String?
@@ -38,8 +41,9 @@ module Sentdm
38
41
  def x_profile_id=: (String) -> String
39
42
 
40
43
  def initialize: (
41
- callback_url: String,
44
+ ?agent_id: String?,
42
45
  ?area_code: String?,
46
+ ?callback_url: String?,
43
47
  ?default_for_app_calls: bool?,
44
48
  ?number: String?,
45
49
  ?sandbox: bool,
@@ -49,8 +53,9 @@ module Sentdm
49
53
  ) -> void
50
54
 
51
55
  def to_hash: -> {
52
- callback_url: String,
56
+ agent_id: String?,
53
57
  area_code: String?,
58
+ callback_url: String?,
54
59
  default_for_app_calls: bool?,
55
60
  number: String?,
56
61
  sandbox: bool,
@@ -3,15 +3,19 @@ module Sentdm
3
3
  module Channels
4
4
  type voice_number =
5
5
  {
6
+ agent_id: String?,
6
7
  callback_url: String?,
7
8
  created_at: Time,
8
9
  default_for_app_calls: bool,
9
10
  number: String,
11
+ routes_to: String,
10
12
  status: String,
11
13
  updated_at: Time
12
14
  }
13
15
 
14
16
  class VoiceNumber < Sentdm::Internal::Type::BaseModel
17
+ attr_accessor agent_id: String?
18
+
15
19
  attr_accessor callback_url: String?
16
20
 
17
21
  attr_reader created_at: Time?
@@ -26,6 +30,10 @@ module Sentdm
26
30
 
27
31
  def number=: (String) -> String
28
32
 
33
+ attr_reader routes_to: String?
34
+
35
+ def routes_to=: (String) -> String
36
+
29
37
  attr_reader status: String?
30
38
 
31
39
  def status=: (String) -> String
@@ -35,19 +43,23 @@ module Sentdm
35
43
  def updated_at=: (Time) -> Time
36
44
 
37
45
  def initialize: (
46
+ ?agent_id: String?,
38
47
  ?callback_url: String?,
39
48
  ?created_at: Time,
40
49
  ?default_for_app_calls: bool,
41
50
  ?number: String,
51
+ ?routes_to: String,
42
52
  ?status: String,
43
53
  ?updated_at: Time
44
54
  ) -> void
45
55
 
46
56
  def to_hash: -> {
57
+ agent_id: String?,
47
58
  callback_url: String?,
48
59
  created_at: Time,
49
60
  default_for_app_calls: bool,
50
61
  number: String,
62
+ routes_to: String,
51
63
  status: String,
52
64
  updated_at: Time
53
65
  }
@@ -4,6 +4,7 @@ module Sentdm
4
4
  type voice_update_params =
5
5
  {
6
6
  number: String,
7
+ agent_id: String?,
7
8
  callback_url: String?,
8
9
  default_for_app_calls: bool?,
9
10
  sandbox: bool,
@@ -19,6 +20,8 @@ module Sentdm
19
20
 
20
21
  attr_accessor number: String
21
22
 
23
+ attr_accessor agent_id: String?
24
+
22
25
  attr_accessor callback_url: String?
23
26
 
24
27
  attr_accessor default_for_app_calls: bool?
@@ -39,6 +42,7 @@ module Sentdm
39
42
 
40
43
  def initialize: (
41
44
  number: String,
45
+ ?agent_id: String?,
42
46
  ?callback_url: String?,
43
47
  ?default_for_app_calls: bool?,
44
48
  ?sandbox: bool,
@@ -50,6 +54,7 @@ module Sentdm
50
54
 
51
55
  def to_hash: -> {
52
56
  number: String,
57
+ agent_id: String?,
53
58
  callback_url: String?,
54
59
  default_for_app_calls: bool?,
55
60
  sandbox: bool,
@@ -0,0 +1,99 @@
1
+ module Sentdm
2
+ module Models
3
+ module Voice
4
+ type agent_create_params =
5
+ {
6
+ audio: Sentdm::Voice::VoiceAgentAudioSpec?,
7
+ fallback: Sentdm::Voice::VoiceAgentPartySpec?,
8
+ greeting: String?,
9
+ limits: Sentdm::Voice::VoiceAgentLimitsSpec?,
10
+ name: String?,
11
+ sandbox: bool,
12
+ session_type: String?,
13
+ speech: Sentdm::Voice::VoiceAgentSpeechSpec?,
14
+ tools: ::Array[String]?,
15
+ transcripts: Sentdm::Voice::VoiceAgentTranscriptsSpec?,
16
+ transfer_targets: ::Array[Sentdm::Voice::VoiceAgentPartySpec]?,
17
+ websocket_url: String?,
18
+ idempotency_key: String,
19
+ x_profile_id: String
20
+ }
21
+ & Sentdm::Internal::Type::request_parameters
22
+
23
+ class AgentCreateParams < Sentdm::Internal::Type::BaseModel
24
+ extend Sentdm::Internal::Type::RequestParameters::Converter
25
+ include Sentdm::Internal::Type::RequestParameters
26
+
27
+ attr_accessor audio: Sentdm::Voice::VoiceAgentAudioSpec?
28
+
29
+ attr_accessor fallback: Sentdm::Voice::VoiceAgentPartySpec?
30
+
31
+ attr_accessor greeting: String?
32
+
33
+ attr_accessor limits: Sentdm::Voice::VoiceAgentLimitsSpec?
34
+
35
+ attr_accessor name: String?
36
+
37
+ attr_reader sandbox: bool?
38
+
39
+ def sandbox=: (bool) -> bool
40
+
41
+ attr_accessor session_type: String?
42
+
43
+ attr_accessor speech: Sentdm::Voice::VoiceAgentSpeechSpec?
44
+
45
+ attr_accessor tools: ::Array[String]?
46
+
47
+ attr_accessor transcripts: Sentdm::Voice::VoiceAgentTranscriptsSpec?
48
+
49
+ attr_accessor transfer_targets: ::Array[Sentdm::Voice::VoiceAgentPartySpec]?
50
+
51
+ attr_accessor websocket_url: String?
52
+
53
+ attr_reader idempotency_key: String?
54
+
55
+ def idempotency_key=: (String) -> String
56
+
57
+ attr_reader x_profile_id: String?
58
+
59
+ def x_profile_id=: (String) -> String
60
+
61
+ def initialize: (
62
+ ?audio: Sentdm::Voice::VoiceAgentAudioSpec?,
63
+ ?fallback: Sentdm::Voice::VoiceAgentPartySpec?,
64
+ ?greeting: String?,
65
+ ?limits: Sentdm::Voice::VoiceAgentLimitsSpec?,
66
+ ?name: String?,
67
+ ?sandbox: bool,
68
+ ?session_type: String?,
69
+ ?speech: Sentdm::Voice::VoiceAgentSpeechSpec?,
70
+ ?tools: ::Array[String]?,
71
+ ?transcripts: Sentdm::Voice::VoiceAgentTranscriptsSpec?,
72
+ ?transfer_targets: ::Array[Sentdm::Voice::VoiceAgentPartySpec]?,
73
+ ?websocket_url: String?,
74
+ ?idempotency_key: String,
75
+ ?x_profile_id: String,
76
+ ?request_options: Sentdm::request_opts
77
+ ) -> void
78
+
79
+ def to_hash: -> {
80
+ audio: Sentdm::Voice::VoiceAgentAudioSpec?,
81
+ fallback: Sentdm::Voice::VoiceAgentPartySpec?,
82
+ greeting: String?,
83
+ limits: Sentdm::Voice::VoiceAgentLimitsSpec?,
84
+ name: String?,
85
+ sandbox: bool,
86
+ session_type: String?,
87
+ speech: Sentdm::Voice::VoiceAgentSpeechSpec?,
88
+ tools: ::Array[String]?,
89
+ transcripts: Sentdm::Voice::VoiceAgentTranscriptsSpec?,
90
+ transfer_targets: ::Array[Sentdm::Voice::VoiceAgentPartySpec]?,
91
+ websocket_url: String?,
92
+ idempotency_key: String,
93
+ x_profile_id: String,
94
+ request_options: Sentdm::RequestOptions
95
+ }
96
+ end
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,34 @@
1
+ module Sentdm
2
+ module Models
3
+ module Voice
4
+ type agent_delete_params =
5
+ { id: String, x_profile_id: String }
6
+ & Sentdm::Internal::Type::request_parameters
7
+
8
+ class AgentDeleteParams < Sentdm::Models::MutationRequest
9
+ extend Sentdm::Internal::Type::RequestParameters::Converter
10
+ include Sentdm::Internal::Type::RequestParameters
11
+
12
+ def id: -> String
13
+
14
+ def id=: (String _) -> String
15
+
16
+ def x_profile_id: -> String?
17
+
18
+ def x_profile_id=: (String _) -> String
19
+
20
+ def initialize: (
21
+ id: String,
22
+ ?x_profile_id: String,
23
+ ?request_options: Sentdm::request_opts
24
+ ) -> void
25
+
26
+ def to_hash: -> {
27
+ id: String,
28
+ x_profile_id: String,
29
+ request_options: Sentdm::RequestOptions
30
+ }
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,40 @@
1
+ module Sentdm
2
+ module Models
3
+ module Voice
4
+ type agent_list_params =
5
+ { page: Integer, page_size: Integer, x_profile_id: String }
6
+ & Sentdm::Internal::Type::request_parameters
7
+
8
+ class AgentListParams < Sentdm::Internal::Type::BaseModel
9
+ extend Sentdm::Internal::Type::RequestParameters::Converter
10
+ include Sentdm::Internal::Type::RequestParameters
11
+
12
+ attr_reader page: Integer?
13
+
14
+ def page=: (Integer) -> Integer
15
+
16
+ attr_reader page_size: Integer?
17
+
18
+ def page_size=: (Integer) -> Integer
19
+
20
+ attr_reader x_profile_id: String?
21
+
22
+ def x_profile_id=: (String) -> String
23
+
24
+ def initialize: (
25
+ ?page: Integer,
26
+ ?page_size: Integer,
27
+ ?x_profile_id: String,
28
+ ?request_options: Sentdm::request_opts
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ page: Integer,
33
+ page_size: Integer,
34
+ x_profile_id: String,
35
+ request_options: Sentdm::RequestOptions
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,32 @@
1
+ module Sentdm
2
+ module Models
3
+ module Voice
4
+ type agent_retrieve_params =
5
+ { id: String, x_profile_id: String }
6
+ & Sentdm::Internal::Type::request_parameters
7
+
8
+ class AgentRetrieveParams < Sentdm::Internal::Type::BaseModel
9
+ extend Sentdm::Internal::Type::RequestParameters::Converter
10
+ include Sentdm::Internal::Type::RequestParameters
11
+
12
+ attr_accessor id: String
13
+
14
+ attr_reader x_profile_id: String?
15
+
16
+ def x_profile_id=: (String) -> String
17
+
18
+ def initialize: (
19
+ id: String,
20
+ ?x_profile_id: String,
21
+ ?request_options: Sentdm::request_opts
22
+ ) -> void
23
+
24
+ def to_hash: -> {
25
+ id: String,
26
+ x_profile_id: String,
27
+ request_options: Sentdm::RequestOptions
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,40 @@
1
+ module Sentdm
2
+ module Models
3
+ module Voice
4
+ type agent_rotate_secret_params =
5
+ { id: String, idempotency_key: String, x_profile_id: String }
6
+ & Sentdm::Internal::Type::request_parameters
7
+
8
+ class AgentRotateSecretParams < Sentdm::Models::MutationRequest
9
+ extend Sentdm::Internal::Type::RequestParameters::Converter
10
+ include Sentdm::Internal::Type::RequestParameters
11
+
12
+ def id: -> String
13
+
14
+ def id=: (String _) -> String
15
+
16
+ def idempotency_key: -> String?
17
+
18
+ def idempotency_key=: (String _) -> String
19
+
20
+ def x_profile_id: -> String?
21
+
22
+ def x_profile_id=: (String _) -> String
23
+
24
+ def initialize: (
25
+ id: String,
26
+ ?idempotency_key: String,
27
+ ?x_profile_id: String,
28
+ ?request_options: Sentdm::request_opts
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ id: String,
33
+ idempotency_key: String,
34
+ x_profile_id: String,
35
+ request_options: Sentdm::RequestOptions
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end