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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/lib/sentdm/internal/voice_agents_page.rb +115 -0
- data/lib/sentdm/models/call_event.rb +8 -6
- data/lib/sentdm/models/call_event_payload.rb +25 -6
- data/lib/sentdm/models/channels/voice_create_params.rb +23 -11
- data/lib/sentdm/models/channels/voice_number.rb +23 -1
- data/lib/sentdm/models/channels/voice_update_params.rb +12 -1
- data/lib/sentdm/models/voice/agent_create_params.rb +142 -0
- data/lib/sentdm/models/voice/agent_delete_params.rb +28 -0
- data/lib/sentdm/models/voice/agent_list_params.rb +38 -0
- data/lib/sentdm/models/voice/agent_retrieve_params.rb +28 -0
- data/lib/sentdm/models/voice/agent_rotate_secret_params.rb +34 -0
- data/lib/sentdm/models/voice/agent_update_params.rb +141 -0
- data/lib/sentdm/models/voice/api_response_of_voice_agent.rb +51 -0
- data/lib/sentdm/models/voice/api_response_of_voice_agent_secret.rb +45 -0
- data/lib/sentdm/models/voice/api_response_of_voice_agents_list.rb +48 -0
- data/lib/sentdm/models/voice/api_response_of_voice_catalogue.rb +49 -0
- data/lib/sentdm/models/voice/call.rb +97 -5
- data/lib/sentdm/models/voice/call_list_params.rb +19 -1
- data/lib/sentdm/models/voice/catalogue_list_params.rb +22 -0
- data/lib/sentdm/models/voice/voice_agent.rb +138 -0
- data/lib/sentdm/models/voice/voice_agent_audio.rb +19 -0
- data/lib/sentdm/models/voice/voice_agent_audio_spec.rb +20 -0
- data/lib/sentdm/models/voice/voice_agent_limits.rb +31 -0
- data/lib/sentdm/models/voice/voice_agent_limits_spec.rb +40 -0
- data/lib/sentdm/models/voice/voice_agent_party.rb +25 -0
- data/lib/sentdm/models/voice/voice_agent_party_spec.rb +28 -0
- data/lib/sentdm/models/voice/voice_agent_secret.rb +27 -0
- data/lib/sentdm/models/voice/voice_agent_speech.rb +31 -0
- data/lib/sentdm/models/voice/voice_agent_speech_spec.rb +40 -0
- data/lib/sentdm/models/voice/voice_agent_transcripts.rb +25 -0
- data/lib/sentdm/models/voice/voice_agent_transcripts_spec.rb +32 -0
- data/lib/sentdm/models/voice/voice_agents_list.rb +30 -0
- data/lib/sentdm/models/voice/voice_catalogue.rb +30 -0
- data/lib/sentdm/models/voice/voice_catalogue_voice.rb +43 -0
- data/lib/sentdm/models/webhook_create_params.rb +31 -5
- data/lib/sentdm/models/webhook_response.rb +66 -4
- data/lib/sentdm/models/webhook_update_params.rb +15 -3
- data/lib/sentdm/resources/channels/voice.rb +38 -15
- data/lib/sentdm/resources/profiles/campaigns.rb +3 -2
- data/lib/sentdm/resources/voice/agents.rb +319 -0
- data/lib/sentdm/resources/voice/calls/participants.rb +11 -0
- data/lib/sentdm/resources/voice/calls.rb +44 -13
- data/lib/sentdm/resources/voice/catalogue.rb +71 -0
- data/lib/sentdm/resources/voice/tokens.rb +11 -0
- data/lib/sentdm/resources/voice.rb +86 -0
- data/lib/sentdm/resources/webhooks.rb +43 -15
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +29 -0
- data/rbi/sentdm/internal/voice_agents_page.rbi +71 -0
- data/rbi/sentdm/models/call_event.rbi +14 -10
- data/rbi/sentdm/models/call_event_payload.rbi +28 -5
- data/rbi/sentdm/models/channels/voice_create_params.rbi +33 -17
- data/rbi/sentdm/models/channels/voice_number.rbi +31 -0
- data/rbi/sentdm/models/channels/voice_update_params.rbi +14 -0
- data/rbi/sentdm/models/voice/agent_create_params.rbi +215 -0
- data/rbi/sentdm/models/voice/agent_delete_params.rbi +48 -0
- data/rbi/sentdm/models/voice/agent_list_params.rbi +66 -0
- data/rbi/sentdm/models/voice/agent_retrieve_params.rbi +48 -0
- data/rbi/sentdm/models/voice/agent_rotate_secret_params.rbi +64 -0
- data/rbi/sentdm/models/voice/agent_update_params.rbi +211 -0
- data/rbi/sentdm/models/voice/api_response_of_voice_agent.rbi +85 -0
- data/rbi/sentdm/models/voice/api_response_of_voice_agent_secret.rbi +81 -0
- data/rbi/sentdm/models/voice/api_response_of_voice_agents_list.rbi +83 -0
- data/rbi/sentdm/models/voice/api_response_of_voice_catalogue.rbi +83 -0
- data/rbi/sentdm/models/voice/call.rbi +141 -8
- data/rbi/sentdm/models/voice/call_list_params.rbi +20 -0
- data/rbi/sentdm/models/voice/catalogue_list_params.rbi +40 -0
- data/rbi/sentdm/models/voice/voice_agent.rbi +196 -0
- data/rbi/sentdm/models/voice/voice_agent_audio.rbi +30 -0
- data/rbi/sentdm/models/voice/voice_agent_audio_spec.rbi +33 -0
- data/rbi/sentdm/models/voice/voice_agent_limits.rbi +57 -0
- data/rbi/sentdm/models/voice/voice_agent_limits_spec.rbi +62 -0
- data/rbi/sentdm/models/voice/voice_agent_party.rbi +36 -0
- data/rbi/sentdm/models/voice/voice_agent_party_spec.rbi +45 -0
- data/rbi/sentdm/models/voice/voice_agent_secret.rbi +37 -0
- data/rbi/sentdm/models/voice/voice_agent_speech.rbi +48 -0
- data/rbi/sentdm/models/voice/voice_agent_speech_spec.rbi +62 -0
- data/rbi/sentdm/models/voice/voice_agent_transcripts.rbi +43 -0
- data/rbi/sentdm/models/voice/voice_agent_transcripts_spec.rbi +51 -0
- data/rbi/sentdm/models/voice/voice_agents_list.rbi +55 -0
- data/rbi/sentdm/models/voice/voice_catalogue.rbi +59 -0
- data/rbi/sentdm/models/voice/voice_catalogue_voice.rbi +75 -0
- data/rbi/sentdm/models/webhook_create_params.rbi +41 -3
- data/rbi/sentdm/models/webhook_response.rbi +112 -3
- data/rbi/sentdm/models/webhook_update_params.rbi +18 -3
- data/rbi/sentdm/resources/channels/voice.rbi +52 -19
- data/rbi/sentdm/resources/profiles/campaigns.rbi +3 -2
- data/rbi/sentdm/resources/voice/agents.rbi +316 -0
- data/rbi/sentdm/resources/voice/calls/participants.rbi +11 -0
- data/rbi/sentdm/resources/voice/calls.rbi +46 -11
- data/rbi/sentdm/resources/voice/catalogue.rbi +59 -0
- data/rbi/sentdm/resources/voice/tokens.rbi +11 -0
- data/rbi/sentdm/resources/voice.rbi +84 -0
- data/rbi/sentdm/resources/webhooks.rbi +56 -16
- data/sig/sentdm/internal/voice_agents_page.rbs +41 -0
- data/sig/sentdm/models/call_event_payload.rbs +12 -0
- data/sig/sentdm/models/channels/voice_create_params.rbs +9 -4
- data/sig/sentdm/models/channels/voice_number.rbs +12 -0
- data/sig/sentdm/models/channels/voice_update_params.rbs +5 -0
- data/sig/sentdm/models/voice/agent_create_params.rbs +99 -0
- data/sig/sentdm/models/voice/agent_delete_params.rbs +34 -0
- data/sig/sentdm/models/voice/agent_list_params.rbs +40 -0
- data/sig/sentdm/models/voice/agent_retrieve_params.rbs +32 -0
- data/sig/sentdm/models/voice/agent_rotate_secret_params.rbs +40 -0
- data/sig/sentdm/models/voice/agent_update_params.rbs +108 -0
- data/sig/sentdm/models/voice/api_response_of_voice_agent.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_voice_agent_secret.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_voice_agents_list.rbs +41 -0
- data/sig/sentdm/models/voice/api_response_of_voice_catalogue.rbs +41 -0
- data/sig/sentdm/models/voice/call.rbs +65 -0
- data/sig/sentdm/models/voice/call_list_params.rbs +10 -0
- data/sig/sentdm/models/voice/catalogue_list_params.rbs +27 -0
- data/sig/sentdm/models/voice/voice_agent.rbs +116 -0
- data/sig/sentdm/models/voice/voice_agent_audio.rbs +19 -0
- data/sig/sentdm/models/voice/voice_agent_audio_spec.rbs +17 -0
- data/sig/sentdm/models/voice/voice_agent_limits.rbs +38 -0
- data/sig/sentdm/models/voice/voice_agent_limits_spec.rbs +34 -0
- data/sig/sentdm/models/voice/voice_agent_party.rbs +23 -0
- data/sig/sentdm/models/voice/voice_agent_party_spec.rbs +19 -0
- data/sig/sentdm/models/voice/voice_agent_secret.rbs +19 -0
- data/sig/sentdm/models/voice/voice_agent_speech.rbs +32 -0
- data/sig/sentdm/models/voice/voice_agent_speech_spec.rbs +26 -0
- data/sig/sentdm/models/voice/voice_agent_transcripts.rbs +23 -0
- data/sig/sentdm/models/voice/voice_agent_transcripts_spec.rbs +20 -0
- data/sig/sentdm/models/voice/voice_agents_list.rbs +35 -0
- data/sig/sentdm/models/voice/voice_catalogue.rbs +35 -0
- data/sig/sentdm/models/voice/voice_catalogue_voice.rbs +42 -0
- data/sig/sentdm/models/webhook_create_params.rbs +12 -0
- data/sig/sentdm/models/webhook_response.rbs +46 -3
- data/sig/sentdm/models/webhook_update_params.rbs +5 -0
- data/sig/sentdm/resources/channels/voice.rbs +3 -1
- data/sig/sentdm/resources/voice/agents.rbs +74 -0
- data/sig/sentdm/resources/voice/calls.rbs +2 -0
- data/sig/sentdm/resources/voice/catalogue.rbs +14 -0
- data/sig/sentdm/resources/voice.rbs +4 -0
- data/sig/sentdm/resources/webhooks.rbs +3 -0
- metadata +89 -2
|
@@ -14,6 +14,8 @@ module Sentdm
|
|
|
14
14
|
sig { params(id: String).void }
|
|
15
15
|
attr_writer :id
|
|
16
16
|
|
|
17
|
+
# Failed attempts since the last success. Version 1 only: always 0 on a version 2
|
|
18
|
+
# webhook, whose deliveries are in its events (GET /v3/webhooks/{id}/events).
|
|
17
19
|
sig { returns(T.nilable(Integer)) }
|
|
18
20
|
attr_reader :consecutive_failures
|
|
19
21
|
|
|
@@ -61,9 +63,22 @@ module Sentdm
|
|
|
61
63
|
sig { params(is_active: T::Boolean).void }
|
|
62
64
|
attr_writer :is_active
|
|
63
65
|
|
|
66
|
+
# Whether the webhook also receives its organization's sender profiles' events,
|
|
67
|
+
# and each profile sees it and reads the events about itself. Always false on a
|
|
68
|
+
# version 1 webhook.
|
|
69
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
70
|
+
attr_reader :is_inheritable
|
|
71
|
+
|
|
72
|
+
sig { params(is_inheritable: T::Boolean).void }
|
|
73
|
+
attr_writer :is_inheritable
|
|
74
|
+
|
|
75
|
+
# When the webhook was last attempted. Version 1 only: always null on a version 2
|
|
76
|
+
# webhook.
|
|
64
77
|
sig { returns(T.nilable(Time)) }
|
|
65
78
|
attr_accessor :last_delivery_attempt_at
|
|
66
79
|
|
|
80
|
+
# When the webhook last received an event. Version 1 only: always null on a
|
|
81
|
+
# version 2 webhook.
|
|
67
82
|
sig { returns(T.nilable(Time)) }
|
|
68
83
|
attr_accessor :last_successful_delivery_at
|
|
69
84
|
|
|
@@ -73,6 +88,22 @@ module Sentdm
|
|
|
73
88
|
sig { params(retry_count: Integer).void }
|
|
74
89
|
attr_writer :retry_count
|
|
75
90
|
|
|
91
|
+
# The events a version 1 webhook's sender profile clones receive, as a response
|
|
92
|
+
# reports them.
|
|
93
|
+
#
|
|
94
|
+
# Its own type, field for field the same as the request's sender_profile. A
|
|
95
|
+
# response is not a request, whatever it carries.
|
|
96
|
+
sig { returns(T.nilable(Sentdm::WebhookResponse::SenderProfile)) }
|
|
97
|
+
attr_reader :sender_profile
|
|
98
|
+
|
|
99
|
+
sig do
|
|
100
|
+
params(
|
|
101
|
+
sender_profile:
|
|
102
|
+
T.nilable(Sentdm::WebhookResponse::SenderProfile::OrHash)
|
|
103
|
+
).void
|
|
104
|
+
end
|
|
105
|
+
attr_writer :sender_profile
|
|
106
|
+
|
|
76
107
|
sig { returns(T.nilable(String)) }
|
|
77
108
|
attr_accessor :signing_secret
|
|
78
109
|
|
|
@@ -85,6 +116,14 @@ module Sentdm
|
|
|
85
116
|
sig { returns(T.nilable(Time)) }
|
|
86
117
|
attr_accessor :updated_at
|
|
87
118
|
|
|
119
|
+
# Who delivers the webhook: 1 the older delivery, which will be retired, or 2
|
|
120
|
+
# Svix. A webhook is created as version 2 unless the request asks for 1.
|
|
121
|
+
sig { returns(T.nilable(Integer)) }
|
|
122
|
+
attr_reader :webhook_version
|
|
123
|
+
|
|
124
|
+
sig { params(webhook_version: Integer).void }
|
|
125
|
+
attr_writer :webhook_version
|
|
126
|
+
|
|
88
127
|
sig do
|
|
89
128
|
params(
|
|
90
129
|
id: String,
|
|
@@ -96,16 +135,22 @@ module Sentdm
|
|
|
96
135
|
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
97
136
|
event_types: T::Array[String],
|
|
98
137
|
is_active: T::Boolean,
|
|
138
|
+
is_inheritable: T::Boolean,
|
|
99
139
|
last_delivery_attempt_at: T.nilable(Time),
|
|
100
140
|
last_successful_delivery_at: T.nilable(Time),
|
|
101
141
|
retry_count: Integer,
|
|
142
|
+
sender_profile:
|
|
143
|
+
T.nilable(Sentdm::WebhookResponse::SenderProfile::OrHash),
|
|
102
144
|
signing_secret: T.nilable(String),
|
|
103
145
|
timeout_seconds: Integer,
|
|
104
|
-
updated_at: T.nilable(Time)
|
|
146
|
+
updated_at: T.nilable(Time),
|
|
147
|
+
webhook_version: Integer
|
|
105
148
|
).returns(T.attached_class)
|
|
106
149
|
end
|
|
107
150
|
def self.new(
|
|
108
151
|
id: nil,
|
|
152
|
+
# Failed attempts since the last success. Version 1 only: always 0 on a version 2
|
|
153
|
+
# webhook, whose deliveries are in its events (GET /v3/webhooks/{id}/events).
|
|
109
154
|
consecutive_failures: nil,
|
|
110
155
|
created_at: nil,
|
|
111
156
|
# Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
@@ -116,12 +161,29 @@ module Sentdm
|
|
|
116
161
|
event_filters: nil,
|
|
117
162
|
event_types: nil,
|
|
118
163
|
is_active: nil,
|
|
164
|
+
# Whether the webhook also receives its organization's sender profiles' events,
|
|
165
|
+
# and each profile sees it and reads the events about itself. Always false on a
|
|
166
|
+
# version 1 webhook.
|
|
167
|
+
is_inheritable: nil,
|
|
168
|
+
# When the webhook was last attempted. Version 1 only: always null on a version 2
|
|
169
|
+
# webhook.
|
|
119
170
|
last_delivery_attempt_at: nil,
|
|
171
|
+
# When the webhook last received an event. Version 1 only: always null on a
|
|
172
|
+
# version 2 webhook.
|
|
120
173
|
last_successful_delivery_at: nil,
|
|
121
174
|
retry_count: nil,
|
|
175
|
+
# The events a version 1 webhook's sender profile clones receive, as a response
|
|
176
|
+
# reports them.
|
|
177
|
+
#
|
|
178
|
+
# Its own type, field for field the same as the request's sender_profile. A
|
|
179
|
+
# response is not a request, whatever it carries.
|
|
180
|
+
sender_profile: nil,
|
|
122
181
|
signing_secret: nil,
|
|
123
182
|
timeout_seconds: nil,
|
|
124
|
-
updated_at: nil
|
|
183
|
+
updated_at: nil,
|
|
184
|
+
# Who delivers the webhook: 1 the older delivery, which will be retired, or 2
|
|
185
|
+
# Svix. A webhook is created as version 2 unless the request asks for 1.
|
|
186
|
+
webhook_version: nil
|
|
125
187
|
)
|
|
126
188
|
end
|
|
127
189
|
|
|
@@ -137,17 +199,64 @@ module Sentdm
|
|
|
137
199
|
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
138
200
|
event_types: T::Array[String],
|
|
139
201
|
is_active: T::Boolean,
|
|
202
|
+
is_inheritable: T::Boolean,
|
|
140
203
|
last_delivery_attempt_at: T.nilable(Time),
|
|
141
204
|
last_successful_delivery_at: T.nilable(Time),
|
|
142
205
|
retry_count: Integer,
|
|
206
|
+
sender_profile: T.nilable(Sentdm::WebhookResponse::SenderProfile),
|
|
143
207
|
signing_secret: T.nilable(String),
|
|
144
208
|
timeout_seconds: Integer,
|
|
145
|
-
updated_at: T.nilable(Time)
|
|
209
|
+
updated_at: T.nilable(Time),
|
|
210
|
+
webhook_version: Integer
|
|
146
211
|
}
|
|
147
212
|
)
|
|
148
213
|
end
|
|
149
214
|
def to_hash
|
|
150
215
|
end
|
|
216
|
+
|
|
217
|
+
class SenderProfile < Sentdm::Internal::Type::BaseModel
|
|
218
|
+
OrHash =
|
|
219
|
+
T.type_alias do
|
|
220
|
+
T.any(
|
|
221
|
+
Sentdm::WebhookResponse::SenderProfile,
|
|
222
|
+
Sentdm::Internal::AnyHash
|
|
223
|
+
)
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
sig { returns(T.nilable(T::Hash[Symbol, T::Array[String]])) }
|
|
227
|
+
attr_accessor :event_filters
|
|
228
|
+
|
|
229
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
230
|
+
attr_reader :event_types
|
|
231
|
+
|
|
232
|
+
sig { params(event_types: T::Array[String]).void }
|
|
233
|
+
attr_writer :event_types
|
|
234
|
+
|
|
235
|
+
# The events a version 1 webhook's sender profile clones receive, as a response
|
|
236
|
+
# reports them.
|
|
237
|
+
#
|
|
238
|
+
# Its own type, field for field the same as the request's sender_profile. A
|
|
239
|
+
# response is not a request, whatever it carries.
|
|
240
|
+
sig do
|
|
241
|
+
params(
|
|
242
|
+
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
243
|
+
event_types: T::Array[String]
|
|
244
|
+
).returns(T.attached_class)
|
|
245
|
+
end
|
|
246
|
+
def self.new(event_filters: nil, event_types: nil)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
sig do
|
|
250
|
+
override.returns(
|
|
251
|
+
{
|
|
252
|
+
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
253
|
+
event_types: T::Array[String]
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
end
|
|
257
|
+
def to_hash
|
|
258
|
+
end
|
|
259
|
+
end
|
|
151
260
|
end
|
|
152
261
|
end
|
|
153
262
|
end
|
|
@@ -35,6 +35,12 @@ module Sentdm
|
|
|
35
35
|
sig { params(event_types: T::Array[String]).void }
|
|
36
36
|
attr_writer :event_types
|
|
37
37
|
|
|
38
|
+
# Makes this webhook inheritable by the organization's sender profiles (see
|
|
39
|
+
# create), or stops it being inheritable. Omit or pass null to keep it as it is.
|
|
40
|
+
# Only a version 2 webhook can be inheritable.
|
|
41
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
42
|
+
attr_accessor :is_inheritable
|
|
43
|
+
|
|
38
44
|
sig { returns(T.nilable(Integer)) }
|
|
39
45
|
attr_reader :retry_count
|
|
40
46
|
|
|
@@ -50,7 +56,8 @@ module Sentdm
|
|
|
50
56
|
attr_writer :sandbox
|
|
51
57
|
|
|
52
58
|
# Request-only: the events an organization webhook's sender profile clones
|
|
53
|
-
# receive, one clone per existing and future profile.
|
|
59
|
+
# receive, one clone per existing and future profile. A version 1 webhook's
|
|
60
|
+
# responses report it as WebhookSenderProfileV3Response.
|
|
54
61
|
sig { returns(T.nilable(Sentdm::WebhookUpdateParams::SenderProfile)) }
|
|
55
62
|
attr_reader :sender_profile
|
|
56
63
|
|
|
@@ -87,6 +94,7 @@ module Sentdm
|
|
|
87
94
|
endpoint_url: String,
|
|
88
95
|
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
89
96
|
event_types: T::Array[String],
|
|
97
|
+
is_inheritable: T.nilable(T::Boolean),
|
|
90
98
|
retry_count: Integer,
|
|
91
99
|
sandbox: T::Boolean,
|
|
92
100
|
sender_profile:
|
|
@@ -103,12 +111,17 @@ module Sentdm
|
|
|
103
111
|
endpoint_url: nil,
|
|
104
112
|
event_filters: nil,
|
|
105
113
|
event_types: nil,
|
|
114
|
+
# Makes this webhook inheritable by the organization's sender profiles (see
|
|
115
|
+
# create), or stops it being inheritable. Omit or pass null to keep it as it is.
|
|
116
|
+
# Only a version 2 webhook can be inheritable.
|
|
117
|
+
is_inheritable: nil,
|
|
106
118
|
retry_count: nil,
|
|
107
119
|
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
108
120
|
# for testing integrations without actual execution
|
|
109
121
|
sandbox: nil,
|
|
110
122
|
# Request-only: the events an organization webhook's sender profile clones
|
|
111
|
-
# receive, one clone per existing and future profile.
|
|
123
|
+
# receive, one clone per existing and future profile. A version 1 webhook's
|
|
124
|
+
# responses report it as WebhookSenderProfileV3Response.
|
|
112
125
|
sender_profile: nil,
|
|
113
126
|
timeout_seconds: nil,
|
|
114
127
|
idempotency_key: nil,
|
|
@@ -125,6 +138,7 @@ module Sentdm
|
|
|
125
138
|
endpoint_url: String,
|
|
126
139
|
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
127
140
|
event_types: T::Array[String],
|
|
141
|
+
is_inheritable: T.nilable(T::Boolean),
|
|
128
142
|
retry_count: Integer,
|
|
129
143
|
sandbox: T::Boolean,
|
|
130
144
|
sender_profile:
|
|
@@ -158,7 +172,8 @@ module Sentdm
|
|
|
158
172
|
attr_writer :event_types
|
|
159
173
|
|
|
160
174
|
# Request-only: the events an organization webhook's sender profile clones
|
|
161
|
-
# receive, one clone per existing and future profile.
|
|
175
|
+
# receive, one clone per existing and future profile. A version 1 webhook's
|
|
176
|
+
# responses report it as WebhookSenderProfileV3Response.
|
|
162
177
|
sig do
|
|
163
178
|
params(
|
|
164
179
|
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
@@ -44,6 +44,16 @@ module Sentdm
|
|
|
44
44
|
# question the way you verify a webhook. `POST /v3/channels/voice/{number}/test`
|
|
45
45
|
# sends a test question and reports the verdict.
|
|
46
46
|
#
|
|
47
|
+
# Send `agent_id` instead of `callback_url`, or with it, to have one of your voice
|
|
48
|
+
# agents (`GET /v3/voice/agents`) answer calls to the number. The agent wins over
|
|
49
|
+
# the callback URL for calls to the number; calls your app places from it still
|
|
50
|
+
# follow your app. `routes_to` in the response says which answers, and reads
|
|
51
|
+
# `agent_pending` while the number is still being moved to the agent. Calls follow
|
|
52
|
+
# the move within about an hour, as the provider applies it on its own clock.
|
|
53
|
+
# While numbers cannot be bound to agents, a request with `agent_id` is refused
|
|
54
|
+
# with `502` before any number is obtained or anything is written; send
|
|
55
|
+
# `callback_url` instead.
|
|
56
|
+
#
|
|
47
57
|
# Your first voice number becomes the line app-originated calls are placed from
|
|
48
58
|
# when a voice token names no number; send `default_for_app_calls: true` to give
|
|
49
59
|
# that role to another number. A number you turned off earlier is turned back on,
|
|
@@ -57,8 +67,9 @@ module Sentdm
|
|
|
57
67
|
# with `202`; nothing is written and no number is bought.
|
|
58
68
|
sig do
|
|
59
69
|
params(
|
|
60
|
-
|
|
70
|
+
agent_id: T.nilable(String),
|
|
61
71
|
area_code: T.nilable(String),
|
|
72
|
+
callback_url: T.nilable(String),
|
|
62
73
|
default_for_app_calls: T.nilable(T::Boolean),
|
|
63
74
|
number: T.nilable(String),
|
|
64
75
|
sandbox: T::Boolean,
|
|
@@ -68,18 +79,24 @@ module Sentdm
|
|
|
68
79
|
).returns(Sentdm::Channels::APIResponseOfVoiceNumberCreated)
|
|
69
80
|
end
|
|
70
81
|
def create(
|
|
71
|
-
# Body param:
|
|
72
|
-
#
|
|
73
|
-
#
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
|
|
77
|
-
callback_url:,
|
|
82
|
+
# Body param: One of your voice agents (GET /v3/voice/agents), such as
|
|
83
|
+
# agent_9f2ab000-0000-4000-8000-000000000001, to answer calls to this number. It
|
|
84
|
+
# wins over callback_url for calls to the number, and both may be sent; calls your
|
|
85
|
+
# app places from the number still follow your app. Send it instead of
|
|
86
|
+
# callback_url for a number only an agent answers.
|
|
87
|
+
agent_id: nil,
|
|
78
88
|
# Body param: The US area code a new number should be in, as 212. Only for a
|
|
79
89
|
# request that leaves number out — sending both says two different things about
|
|
80
90
|
# which number to use, and is refused. Omit it too and the number comes from
|
|
81
91
|
# anywhere in the country.
|
|
82
92
|
area_code: nil,
|
|
93
|
+
# Body param: Where Sent asks what to do with each call on this number: an
|
|
94
|
+
# absolute HTTP or HTTPS URL on a public host. A signed question is POSTed here
|
|
95
|
+
# when a call arrives or a caller presses a key, and the answer decides the call.
|
|
96
|
+
# Every question is signed with the callback_secret the response returns, the same
|
|
97
|
+
# way your webhooks are signed. Turning the number on again with a different URL
|
|
98
|
+
# replaces it and keeps the secret. Required unless agent_id is sent.
|
|
99
|
+
callback_url: nil,
|
|
83
100
|
# Body param: Make this the line app-originated calls are placed from when a voice
|
|
84
101
|
# token names no number. Omit it and your first voice number takes that role; a
|
|
85
102
|
# later one leaves it where it is.
|
|
@@ -134,18 +151,23 @@ module Sentdm
|
|
|
134
151
|
#
|
|
135
152
|
# ## What it changes
|
|
136
153
|
#
|
|
137
|
-
# | Body | Effect
|
|
138
|
-
# | --------------------------------------------- |
|
|
139
|
-
# | `"status": "ACTIVE"` | turns calls on again for a number you turned off; the callback URL and the secret it had are kept
|
|
140
|
-
# | `"status": "INACTIVE"` | turns calls off; the callback URL and the secret stay on the number
|
|
141
|
-
# | `"default_for_app_calls": true` | makes this the line app-originated calls are placed from when a voice token names no number
|
|
142
|
-
# | `"callback_url": "https://example.com/voice"` | replaces where Sent asks what to do with each call on the number; the signing secret and the status are kept
|
|
143
|
-
# |
|
|
154
|
+
# | Body | Effect |
|
|
155
|
+
# | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
156
|
+
# | `"status": "ACTIVE"` | turns calls on again for a number you turned off; the callback URL and the secret it had are kept |
|
|
157
|
+
# | `"status": "INACTIVE"` | turns calls off; the callback URL and the secret stay on the number |
|
|
158
|
+
# | `"default_for_app_calls": true` | makes this the line app-originated calls are placed from when a voice token names no number |
|
|
159
|
+
# | `"callback_url": "https://example.com/voice"` | replaces where Sent asks what to do with each call on the number; the signing secret and the status are kept |
|
|
160
|
+
# | `"agent_id": "agent_…"` | one of your voice agents answers calls to the number, within about an hour of the change (the provider applies the move on its own clock, and `routes_to` reads `agent` as soon as it has recorded it); it wins over `callback_url` for calls to the number, and calls your app places from it still follow your app. `routes_to` reads `agent_pending` while the number is still being moved to the agent |
|
|
161
|
+
# | `"agent_id": null` | unbinds the agent, so `callback_url` answers calls to the number again |
|
|
162
|
+
# | key omitted | left exactly as it is |
|
|
144
163
|
#
|
|
145
164
|
# `status` is matched ignoring case. Any combination is accepted:
|
|
146
165
|
# `status: "ACTIVE"` with `default_for_app_calls: true` turns a number on as the
|
|
147
|
-
# new default, and a `callback_url` sent with either status is written too.
|
|
148
|
-
#
|
|
166
|
+
# new default, and a `callback_url` sent with either status is written too.
|
|
167
|
+
# `agent_id` is applied first, so a refusal to move the number to or from the
|
|
168
|
+
# agent leaves everything as it was, and the `409` and `400` refusals below are
|
|
169
|
+
# decided before anything is written, so they leave everything as it was too. A
|
|
170
|
+
# body that names none of them is refused.
|
|
149
171
|
#
|
|
150
172
|
# A number can be on without a callback URL: calls placed from your app then
|
|
151
173
|
# connect straight to the number or user they dial, and calls to the number are
|
|
@@ -164,8 +186,12 @@ module Sentdm
|
|
|
164
186
|
# **Making an inactive number the default is `400`.** Send `status: "ACTIVE"` in
|
|
165
187
|
# the same call.
|
|
166
188
|
#
|
|
167
|
-
# **A number you never turned voice on for is `404
|
|
168
|
-
# `POST /v3/channels/voice`.
|
|
189
|
+
# **A number you never turned voice on for is `404`**, and so is an `agent_id`
|
|
190
|
+
# that is not one of your agents. Add the number with `POST /v3/channels/voice`.
|
|
191
|
+
#
|
|
192
|
+
# **`502` means the number could not be moved to or from the agent**, or an
|
|
193
|
+
# `agent_id` was sent while numbers cannot be bound to agents; nothing was
|
|
194
|
+
# written.
|
|
169
195
|
#
|
|
170
196
|
# The number is the E.164 value in the path with the plus sign URL-encoded
|
|
171
197
|
# (`%2B`).
|
|
@@ -176,6 +202,7 @@ module Sentdm
|
|
|
176
202
|
sig do
|
|
177
203
|
params(
|
|
178
204
|
number: String,
|
|
205
|
+
agent_id: T.nilable(String),
|
|
179
206
|
callback_url: T.nilable(String),
|
|
180
207
|
default_for_app_calls: T.nilable(T::Boolean),
|
|
181
208
|
sandbox: T::Boolean,
|
|
@@ -190,6 +217,12 @@ module Sentdm
|
|
|
190
217
|
# Path param: The number in E.164 format with the plus sign URL-encoded, e.g.
|
|
191
218
|
# %2B12125550100
|
|
192
219
|
number,
|
|
220
|
+
# Body param: One of your voice agents, such as
|
|
221
|
+
# agent_9f2ab000-0000-4000-8000-000000000001, to answer calls to the number, or
|
|
222
|
+
# null to unbind it so the callback URL answers them again. The agent wins over
|
|
223
|
+
# callback_url for calls to the number; calls your app places from it still follow
|
|
224
|
+
# your app.
|
|
225
|
+
agent_id: nil,
|
|
193
226
|
# Body param: A new callback URL for the number, active or not: an absolute HTTP
|
|
194
227
|
# or HTTPS URL on a public host, where Sent asks what to do with each call. The
|
|
195
228
|
# signing secret is kept.
|
|
@@ -55,8 +55,9 @@ module Sentdm
|
|
|
55
55
|
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
56
56
|
# explicitly.
|
|
57
57
|
#
|
|
58
|
-
# Updates an existing campaign under the brand of the specified profile.
|
|
59
|
-
#
|
|
58
|
+
# Updates an existing campaign under the brand of the specified profile. Once the
|
|
59
|
+
# campaign has been submitted to TCR its volume can no longer move between low
|
|
60
|
+
# volume (under 2,000 messages a day) and high volume.
|
|
60
61
|
sig do
|
|
61
62
|
params(
|
|
62
63
|
campaign_id: String,
|