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
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Agents#rotate_secret
7
+ class AgentRotateSecretParams < Sentdm::Models::MutationRequest
8
+ extend Sentdm::Internal::Type::RequestParameters::Converter
9
+ include Sentdm::Internal::Type::RequestParameters
10
+
11
+ # @!attribute id
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute idempotency_key
17
+ #
18
+ # @return [String, nil]
19
+ optional :idempotency_key, String
20
+
21
+ # @!attribute x_profile_id
22
+ #
23
+ # @return [String, nil]
24
+ optional :x_profile_id, String
25
+
26
+ # @!method initialize(id:, idempotency_key: nil, x_profile_id: nil, request_options: {})
27
+ # @param id [String]
28
+ # @param idempotency_key [String]
29
+ # @param x_profile_id [String]
30
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,141 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Agents#update
7
+ class AgentUpdateParams < Sentdm::Internal::Type::BaseModel
8
+ extend Sentdm::Internal::Type::RequestParameters::Converter
9
+ include Sentdm::Internal::Type::RequestParameters
10
+
11
+ # @!attribute id
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute audio
17
+ # Audio sessions: { sample_rate }; null restores the default.
18
+ #
19
+ # @return [Sentdm::Models::Voice::VoiceAgentAudioSpec, nil]
20
+ optional :audio, -> { Sentdm::Voice::VoiceAgentAudioSpec }, nil?: true
21
+
22
+ # @!attribute fallback
23
+ # A new fallback party, or null for none.
24
+ #
25
+ # @return [Sentdm::Models::Voice::VoiceAgentPartySpec, nil]
26
+ optional :fallback, -> { Sentdm::Voice::VoiceAgentPartySpec }, nil?: true
27
+
28
+ # @!attribute greeting
29
+ # A new greeting, or null for none.
30
+ #
31
+ # @return [String, nil]
32
+ optional :greeting, String, nil?: true
33
+
34
+ # @!attribute limits
35
+ # The whole limits object; null restores the defaults.
36
+ #
37
+ # @return [Sentdm::Models::Voice::VoiceAgentLimitsSpec, nil]
38
+ optional :limits, -> { Sentdm::Voice::VoiceAgentLimitsSpec }, nil?: true
39
+
40
+ # @!attribute name
41
+ # A new name, 1 to 100 characters.
42
+ #
43
+ # @return [String, nil]
44
+ optional :name, String
45
+
46
+ # @!attribute sandbox
47
+ # Sandbox flag - when true, the operation is simulated without side effects Useful
48
+ # for testing integrations without actual execution
49
+ #
50
+ # @return [Boolean, nil]
51
+ optional :sandbox, Sentdm::Internal::Type::Boolean
52
+
53
+ # @!attribute session_type
54
+ # text or audio. Changing it drops the settings the other type cannot have
55
+ # (speech, audio, greeting) unless the body sends them.
56
+ #
57
+ # @return [String, nil]
58
+ optional :session_type, String
59
+
60
+ # @!attribute speech
61
+ # Text sessions: { setting, voice, language }, replaced whole; null restores the
62
+ # defaults.
63
+ #
64
+ # @return [Sentdm::Models::Voice::VoiceAgentSpeechSpec, nil]
65
+ optional :speech, -> { Sentdm::Voice::VoiceAgentSpeechSpec }, nil?: true
66
+
67
+ # @!attribute tools
68
+ # The whole list of tools; null restores the default.
69
+ #
70
+ # @return [Array<String>, nil]
71
+ optional :tools, Sentdm::Internal::Type::ArrayOf[String], nil?: true
72
+
73
+ # @!attribute transcripts
74
+ # The whole transcripts object; null restores the defaults.
75
+ #
76
+ # @return [Sentdm::Models::Voice::VoiceAgentTranscriptsSpec, nil]
77
+ optional :transcripts, -> { Sentdm::Voice::VoiceAgentTranscriptsSpec }, nil?: true
78
+
79
+ # @!attribute transfer_targets
80
+ # The whole list of parties; null clears it.
81
+ #
82
+ # @return [Array<Sentdm::Models::Voice::VoiceAgentPartySpec>, nil]
83
+ optional :transfer_targets,
84
+ -> { Sentdm::Internal::Type::ArrayOf[Sentdm::Voice::VoiceAgentPartySpec] },
85
+ nil?: true
86
+
87
+ # @!attribute websocket_url
88
+ # A new wss:// URL, or null for an agent that dials in.
89
+ #
90
+ # @return [String, nil]
91
+ optional :websocket_url, String, nil?: true
92
+
93
+ # @!attribute idempotency_key
94
+ #
95
+ # @return [String, nil]
96
+ optional :idempotency_key, String
97
+
98
+ # @!attribute x_profile_id
99
+ #
100
+ # @return [String, nil]
101
+ optional :x_profile_id, String
102
+
103
+ # @!method initialize(id:, audio: nil, fallback: nil, greeting: nil, limits: nil, name: nil, sandbox: nil, session_type: nil, speech: nil, tools: nil, transcripts: nil, transfer_targets: nil, websocket_url: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
104
+ # Some parameter documentations has been truncated, see
105
+ # {Sentdm::Models::Voice::AgentUpdateParams} for more details.
106
+ #
107
+ # @param id [String]
108
+ #
109
+ # @param audio [Sentdm::Models::Voice::VoiceAgentAudioSpec, nil] Audio sessions: { sample_rate }; null restores the default.
110
+ #
111
+ # @param fallback [Sentdm::Models::Voice::VoiceAgentPartySpec, nil] A new fallback party, or null for none.
112
+ #
113
+ # @param greeting [String, nil] A new greeting, or null for none.
114
+ #
115
+ # @param limits [Sentdm::Models::Voice::VoiceAgentLimitsSpec, nil] The whole limits object; null restores the defaults.
116
+ #
117
+ # @param name [String] A new name, 1 to 100 characters.
118
+ #
119
+ # @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
120
+ #
121
+ # @param session_type [String] text or audio. Changing it drops the settings the other type cannot have (speech
122
+ #
123
+ # @param speech [Sentdm::Models::Voice::VoiceAgentSpeechSpec, nil] Text sessions: { setting, voice, language }, replaced whole; null restores the d
124
+ #
125
+ # @param tools [Array<String>, nil] The whole list of tools; null restores the default.
126
+ #
127
+ # @param transcripts [Sentdm::Models::Voice::VoiceAgentTranscriptsSpec, nil] The whole transcripts object; null restores the defaults.
128
+ #
129
+ # @param transfer_targets [Array<Sentdm::Models::Voice::VoiceAgentPartySpec>, nil] The whole list of parties; null clears it.
130
+ #
131
+ # @param websocket_url [String, nil] A new wss:// URL, or null for an agent that dials in.
132
+ #
133
+ # @param idempotency_key [String]
134
+ #
135
+ # @param x_profile_id [String]
136
+ #
137
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
138
+ end
139
+ end
140
+ end
141
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Agents#create
7
+ class APIResponseOfVoiceAgent < Sentdm::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ # A voice agent as stored: what was written with every default filled in, plus the
10
+ # signing secret the one time it is shown (on create, and on rotate). The one
11
+ # shape every read of an agent answers with, on /v3/voice/agents and on the admin
12
+ # API the dashboard uses, so the two cannot drift.
13
+ #
14
+ # @return [Sentdm::Models::Voice::VoiceAgent, nil]
15
+ optional :data, -> { Sentdm::Voice::VoiceAgent }, nil?: true
16
+
17
+ # @!attribute error
18
+ # Error information
19
+ #
20
+ # @return [Sentdm::Models::ErrorDetail, nil]
21
+ optional :error, -> { Sentdm::ErrorDetail }, nil?: true
22
+
23
+ # @!attribute meta
24
+ # Request and response metadata
25
+ #
26
+ # @return [Sentdm::Models::APIMeta, nil]
27
+ optional :meta, -> { Sentdm::APIMeta }
28
+
29
+ # @!attribute success
30
+ # Indicates whether the request was successful
31
+ #
32
+ # @return [Boolean, nil]
33
+ optional :success, Sentdm::Internal::Type::Boolean
34
+
35
+ # @!method initialize(data: nil, error: nil, meta: nil, success: nil)
36
+ # Some parameter documentations has been truncated, see
37
+ # {Sentdm::Models::Voice::APIResponseOfVoiceAgent} for more details.
38
+ #
39
+ # Standard API response envelope for all v3 endpoints
40
+ #
41
+ # @param data [Sentdm::Models::Voice::VoiceAgent, nil] A voice agent as stored: what was written with every default filled in, plus the
42
+ #
43
+ # @param error [Sentdm::Models::ErrorDetail, nil] Error information
44
+ #
45
+ # @param meta [Sentdm::Models::APIMeta] Request and response metadata
46
+ #
47
+ # @param success [Boolean] Indicates whether the request was successful
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Agents#rotate_secret
7
+ class APIResponseOfVoiceAgentSecret < Sentdm::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ # A freshly rotated signing secret.
10
+ #
11
+ # @return [Sentdm::Models::Voice::VoiceAgentSecret, nil]
12
+ optional :data, -> { Sentdm::Voice::VoiceAgentSecret }, nil?: true
13
+
14
+ # @!attribute error
15
+ # Error information
16
+ #
17
+ # @return [Sentdm::Models::ErrorDetail, nil]
18
+ optional :error, -> { Sentdm::ErrorDetail }, nil?: true
19
+
20
+ # @!attribute meta
21
+ # Request and response metadata
22
+ #
23
+ # @return [Sentdm::Models::APIMeta, nil]
24
+ optional :meta, -> { Sentdm::APIMeta }
25
+
26
+ # @!attribute success
27
+ # Indicates whether the request was successful
28
+ #
29
+ # @return [Boolean, nil]
30
+ optional :success, Sentdm::Internal::Type::Boolean
31
+
32
+ # @!method initialize(data: nil, error: nil, meta: nil, success: nil)
33
+ # Standard API response envelope for all v3 endpoints
34
+ #
35
+ # @param data [Sentdm::Models::Voice::VoiceAgentSecret, nil] A freshly rotated signing secret.
36
+ #
37
+ # @param error [Sentdm::Models::ErrorDetail, nil] Error information
38
+ #
39
+ # @param meta [Sentdm::Models::APIMeta] Request and response metadata
40
+ #
41
+ # @param success [Boolean] Indicates whether the request was successful
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ class APIResponseOfVoiceAgentsList < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute data
8
+ # A page of the account's agents. The agent itself is VoiceAgentResponse, shared
9
+ # with the admin API.
10
+ #
11
+ # @return [Sentdm::Models::Voice::VoiceAgentsList, nil]
12
+ optional :data, -> { Sentdm::Voice::VoiceAgentsList }, nil?: true
13
+
14
+ # @!attribute error
15
+ # Error information
16
+ #
17
+ # @return [Sentdm::Models::ErrorDetail, nil]
18
+ optional :error, -> { Sentdm::ErrorDetail }, nil?: true
19
+
20
+ # @!attribute meta
21
+ # Request and response metadata
22
+ #
23
+ # @return [Sentdm::Models::APIMeta, nil]
24
+ optional :meta, -> { Sentdm::APIMeta }
25
+
26
+ # @!attribute success
27
+ # Indicates whether the request was successful
28
+ #
29
+ # @return [Boolean, nil]
30
+ optional :success, Sentdm::Internal::Type::Boolean
31
+
32
+ # @!method initialize(data: nil, error: nil, meta: nil, success: nil)
33
+ # Some parameter documentations has been truncated, see
34
+ # {Sentdm::Models::Voice::APIResponseOfVoiceAgentsList} for more details.
35
+ #
36
+ # Standard API response envelope for all v3 endpoints
37
+ #
38
+ # @param data [Sentdm::Models::Voice::VoiceAgentsList, nil] A page of the account's agents. The agent itself is VoiceAgentResponse, shared w
39
+ #
40
+ # @param error [Sentdm::Models::ErrorDetail, nil] Error information
41
+ #
42
+ # @param meta [Sentdm::Models::APIMeta] Request and response metadata
43
+ #
44
+ # @param success [Boolean] Indicates whether the request was successful
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Catalogue#list
7
+ class APIResponseOfVoiceCatalogue < Sentdm::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ # The voices and languages a text-session agent may name in its speech settings:
10
+ # what GET /v3/voice/voices and the admin GET /voice/voices answer, in one shape.
11
+ #
12
+ # @return [Sentdm::Models::Voice::VoiceCatalogue, nil]
13
+ optional :data, -> { Sentdm::Voice::VoiceCatalogue }, nil?: true
14
+
15
+ # @!attribute error
16
+ # Error information
17
+ #
18
+ # @return [Sentdm::Models::ErrorDetail, nil]
19
+ optional :error, -> { Sentdm::ErrorDetail }, nil?: true
20
+
21
+ # @!attribute meta
22
+ # Request and response metadata
23
+ #
24
+ # @return [Sentdm::Models::APIMeta, nil]
25
+ optional :meta, -> { Sentdm::APIMeta }
26
+
27
+ # @!attribute success
28
+ # Indicates whether the request was successful
29
+ #
30
+ # @return [Boolean, nil]
31
+ optional :success, Sentdm::Internal::Type::Boolean
32
+
33
+ # @!method initialize(data: nil, error: nil, meta: nil, success: nil)
34
+ # Some parameter documentations has been truncated, see
35
+ # {Sentdm::Models::Voice::APIResponseOfVoiceCatalogue} for more details.
36
+ #
37
+ # Standard API response envelope for all v3 endpoints
38
+ #
39
+ # @param data [Sentdm::Models::Voice::VoiceCatalogue, nil] The voices and languages a text-session agent may name in its speech settings: w
40
+ #
41
+ # @param error [Sentdm::Models::ErrorDetail, nil] Error information
42
+ #
43
+ # @param meta [Sentdm::Models::APIMeta] Request and response metadata
44
+ #
45
+ # @param success [Boolean] Indicates whether the request was successful
46
+ end
47
+ end
48
+ end
49
+ end
@@ -12,6 +12,13 @@ module Sentdm
12
12
  # @return [String, nil]
13
13
  optional :id, String
14
14
 
15
+ # @!attribute agent_id
16
+ # The voice agent that answered the call, such as
17
+ # agent_9f2ab000-0000-4000-8000-000000000001. Null for an inapp call
18
+ #
19
+ # @return [String, nil]
20
+ optional :agent_id, String, nil?: true
21
+
15
22
  # @!attribute answered_at
16
23
  # When the call was answered (UTC). Null until then, and always null for a call
17
24
  # between two of your app users
@@ -19,6 +26,22 @@ module Sentdm
19
26
  # @return [Time, nil]
20
27
  optional :answered_at, Time, nil?: true
21
28
 
29
+ # @!attribute caller_id_used
30
+ # The caller id shown on the phone leg, in E.164 format: the one your answer
31
+ # chose, or the owning number when it chose none. Null for a call with no phone
32
+ # leg
33
+ #
34
+ # @return [String, nil]
35
+ optional :caller_id_used, String, nil?: true
36
+
37
+ # @!attribute connected_number
38
+ # The phone number the call was connected to, in E.164 format: the number your
39
+ # answer dialed, or the fallback number a call to one of your voice agents
40
+ # reached. Null when the call was not connected to a phone number
41
+ #
42
+ # @return [String, nil]
43
+ optional :connected_number, String, nil?: true
44
+
22
45
  # @!attribute direction
23
46
  # outbound for a call placed from your app, inbound for a call to one of your
24
47
  # numbers
@@ -40,9 +63,9 @@ module Sentdm
40
63
 
41
64
  # @!attribute failure_reason
42
65
  # Why the call did not complete: callback_timeout, invalid_answer,
43
- # insufficient_balance, destination_blocked, callback_not_configured, rejected or
44
- # no_answer. Null while the call is live, when it completed, and when it failed
45
- # without a recorded reason
66
+ # insufficient_balance, destination_blocked, callback_not_configured, rejected,
67
+ # no_answer, or for an agent call agent_busy or agent_unreachable. Null while the
68
+ # call is live, when it completed, and when it failed without a recorded reason
46
69
  #
47
70
  # @return [String, nil]
48
71
  optional :failure_reason, String, nil?: true
@@ -53,9 +76,19 @@ module Sentdm
53
76
  # @return [Sentdm::Models::Voice::CallParty, nil]
54
77
  optional :from, -> { Sentdm::Voice::CallParty }
55
78
 
79
+ # @!attribute legs
80
+ # The legs the price covers, one entry per billed leg, each with its own cost: a
81
+ # call your answer connected to a phone number ran the caller's leg to your number
82
+ # and the leg to the connected number at once, and both are billed. Null until the
83
+ # call has been priced
84
+ #
85
+ # @return [Array<Sentdm::Models::Voice::Call::Leg>, nil]
86
+ optional :legs, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::Voice::Call::Leg] }, nil?: true
87
+
56
88
  # @!attribute mode
57
89
  # The calling mode: inapp for a call between people in your app and phone numbers,
58
- # routed by your number's callback URL
90
+ # routed by your number's callback URL; agent for a call one of your voice agents
91
+ # answered
59
92
  #
60
93
  # @return [String, nil]
61
94
  optional :mode, String
@@ -108,7 +141,7 @@ module Sentdm
108
141
  # @return [Sentdm::Models::Voice::CallParty, nil]
109
142
  optional :to, -> { Sentdm::Voice::CallParty }
110
143
 
111
- # @!method initialize(id: nil, answered_at: nil, direction: nil, duration_seconds: nil, ended_at: nil, failure_reason: nil, from: nil, mode: nil, number: nil, price: nil, recording_available: nil, started_at: nil, status: nil, timeline: nil, to: nil)
144
+ # @!method initialize(id: nil, agent_id: nil, answered_at: nil, caller_id_used: nil, connected_number: nil, direction: nil, duration_seconds: nil, ended_at: nil, failure_reason: nil, from: nil, legs: nil, mode: nil, number: nil, price: nil, recording_available: nil, started_at: nil, status: nil, timeline: nil, to: nil)
112
145
  # Some parameter documentations has been truncated, see
113
146
  # {Sentdm::Models::Voice::Call} for more details.
114
147
  #
@@ -116,8 +149,14 @@ module Sentdm
116
149
  #
117
150
  # @param id [String] The call id, the same one carried by the call.request question and every call we
118
151
  #
152
+ # @param agent_id [String, nil] The voice agent that answered the call, such as agent_9f2ab000-0000-4000-8000-00
153
+ #
119
154
  # @param answered_at [Time, nil] When the call was answered (UTC). Null until then, and always null for a call be
120
155
  #
156
+ # @param caller_id_used [String, nil] The caller id shown on the phone leg, in E.164 format: the one your answer chose
157
+ #
158
+ # @param connected_number [String, nil] The phone number the call was connected to, in E.164 format: the number your ans
159
+ #
121
160
  # @param direction [String] outbound for a call placed from your app, inbound for a call to one of your numb
122
161
  #
123
162
  # @param duration_seconds [Integer, nil] Billable duration in seconds. Null while the call is live
@@ -128,6 +167,8 @@ module Sentdm
128
167
  #
129
168
  # @param from [Sentdm::Models::Voice::CallParty] One end of a call
130
169
  #
170
+ # @param legs [Array<Sentdm::Models::Voice::Call::Leg>, nil] The legs the price covers, one entry per billed leg, each with its own cost: a c
171
+ #
131
172
  # @param mode [String] The calling mode: inapp for a call between people in your app and phone numbers,
132
173
  #
133
174
  # @param number [String] Your number that owns the call, in E.164 format: the dialed number for an inboun
@@ -143,6 +184,57 @@ module Sentdm
143
184
  # @param timeline [Array<Sentdm::Models::Voice::CallTimelineEntry>, nil] When the call entered each status, oldest first. Only returned when reading one
144
185
  #
145
186
  # @param to [Sentdm::Models::Voice::CallParty] One end of a call
187
+
188
+ class Leg < Sentdm::Internal::Type::BaseModel
189
+ # @!attribute billed_minutes
190
+ # The whole minutes the leg was billed for
191
+ #
192
+ # @return [Integer, nil]
193
+ optional :billed_minutes, Integer
194
+
195
+ # @!attribute cost
196
+ # What the leg cost, in the same unit as the call's price
197
+ #
198
+ # @return [Float, nil]
199
+ optional :cost, Float
200
+
201
+ # @!attribute currency
202
+ # The currency of the cost: USD
203
+ #
204
+ # @return [String, nil]
205
+ optional :currency, String
206
+
207
+ # @!attribute direction
208
+ # inbound for the caller's leg to your number, outbound for a leg placed on your
209
+ # behalf
210
+ #
211
+ # @return [String, nil]
212
+ optional :direction, String
213
+
214
+ # @!attribute number
215
+ # The phone number the leg reached, in E.164 format: your number for the inbound
216
+ # leg, the number dialed for an outbound one. Null for a leg to one of your app
217
+ # users or a room
218
+ #
219
+ # @return [String, nil]
220
+ optional :number, String, nil?: true
221
+
222
+ # @!method initialize(billed_minutes: nil, cost: nil, currency: nil, direction: nil, number: nil)
223
+ # Some parameter documentations has been truncated, see
224
+ # {Sentdm::Models::Voice::Call::Leg} for more details.
225
+ #
226
+ # One leg of a call the price covers
227
+ #
228
+ # @param billed_minutes [Integer] The whole minutes the leg was billed for
229
+ #
230
+ # @param cost [Float] What the leg cost, in the same unit as the call's price
231
+ #
232
+ # @param currency [String] The currency of the cost: USD
233
+ #
234
+ # @param direction [String] inbound for the caller's leg to your number, outbound for a leg placed on your b
235
+ #
236
+ # @param number [String, nil] The phone number the leg reached, in E.164 format: your number for the inbound l
237
+ end
146
238
  end
147
239
  end
148
240
  end
@@ -8,6 +8,13 @@ module Sentdm
8
8
  extend Sentdm::Internal::Type::RequestParameters::Converter
9
9
  include Sentdm::Internal::Type::RequestParameters
10
10
 
11
+ # @!attribute agent_id
12
+ # Optional filter on the voice agent that answered the call, such as
13
+ # agent_9f2ab000-0000-4000-8000-000000000001
14
+ #
15
+ # @return [String, nil]
16
+ optional :agent_id, String, nil?: true
17
+
11
18
  # @!attribute direction
12
19
  # Optional direction filter: outbound for calls placed from your app, inbound for
13
20
  # calls to one of your numbers
@@ -21,6 +28,13 @@ module Sentdm
21
28
  # @return [Time, nil]
22
29
  optional :from, Time, nil?: true
23
30
 
31
+ # @!attribute mode
32
+ # Optional mode filter: inapp for calls routed by your number's callback URL,
33
+ # agent for calls one of your voice agents answered
34
+ #
35
+ # @return [String, nil]
36
+ optional :mode, String, nil?: true
37
+
24
38
  # @!attribute number
25
39
  # Optional filter on the number that owns the call, one of your voice-enabled
26
40
  # numbers in E.164 format
@@ -58,14 +72,18 @@ module Sentdm
58
72
  # @return [String, nil]
59
73
  optional :x_profile_id, String
60
74
 
61
- # @!method initialize(direction: nil, from: nil, number: nil, page: nil, page_size: nil, status: nil, to: nil, x_profile_id: nil, request_options: {})
75
+ # @!method initialize(agent_id: nil, direction: nil, from: nil, mode: nil, number: nil, page: nil, page_size: nil, status: nil, to: nil, x_profile_id: nil, request_options: {})
62
76
  # Some parameter documentations has been truncated, see
63
77
  # {Sentdm::Models::Voice::CallListParams} for more details.
64
78
  #
79
+ # @param agent_id [String, nil] Optional filter on the voice agent that answered the call, such as agent_9f2ab00
80
+ #
65
81
  # @param direction [String, nil] Optional direction filter: outbound for calls placed from your app, inbound for
66
82
  #
67
83
  # @param from [Time, nil] Only calls started at or after this time (ISO 8601)
68
84
  #
85
+ # @param mode [String, nil] Optional mode filter: inapp for calls routed by your number's callback URL, agen
86
+ #
69
87
  # @param number [String, nil] Optional filter on the number that owns the call, one of your voice-enabled numb
70
88
  #
71
89
  # @param page [Integer] Page number (1-indexed)
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ module Voice
6
+ # @see Sentdm::Resources::Voice::Catalogue#list
7
+ class CatalogueListParams < Sentdm::Internal::Type::BaseModel
8
+ extend Sentdm::Internal::Type::RequestParameters::Converter
9
+ include Sentdm::Internal::Type::RequestParameters
10
+
11
+ # @!attribute x_profile_id
12
+ #
13
+ # @return [String, nil]
14
+ optional :x_profile_id, String
15
+
16
+ # @!method initialize(x_profile_id: nil, request_options: {})
17
+ # @param x_profile_id [String]
18
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end