@@ -28,6 +28,7 @@ syntax = "proto3";
2828package tcnapi.exile.gate.v2 ;
2929
3030import "google/api/annotations.proto" ;
31+ import "google/protobuf/duration.proto" ;
3132import "google/protobuf/timestamp.proto" ;
3233import "google/protobuf/wrappers.proto" ;
3334import "tcnapi/exile/core/v2/entities.proto" ;
@@ -243,6 +244,33 @@ service GateService {
243244 body : "*"
244245 };
245246 }
247+
248+ /**
249+ * Voice recording retrieval operations
250+ */
251+ // Search for voice recordings
252+ rpc SearchVoiceRecordings (SearchVoiceRecordingsRequest ) returns (stream SearchVoiceRecordingsResponse ) {
253+ option (google.api.http ) = {
254+ post : "/tcnapi/exile/gate/v2/search_voice_recordings"
255+ body : "*"
256+ };
257+ }
258+
259+ // Get a voice recording download link
260+ rpc GetVoiceRecordingDownloadLink (GetVoiceRecordingDownloadLinkRequest ) returns (GetVoiceRecordingDownloadLinkResponse ) {
261+ option (google.api.http ) = {
262+ get : "/tcnapi/exile/gate/v2/get_voice_recording_download_link"
263+ body : "*"
264+ };
265+ }
266+
267+ // Get a list of allowed searchable fields
268+ rpc ListSearchableRecordingFields (ListSearchableRecordingFieldsRequest ) returns (ListSearchableRecordingFieldsResponse ) {
269+ option (google.api.http ) = {
270+ get : "/tcnapi/exile/gate/v2/list_searchable_recording_fields"
271+ body : "*"
272+ };
273+ }
246274}
247275
248276/**
@@ -894,3 +922,82 @@ message Agent {
894922 string username = 5 ; // Agent's username
895923 string partner_agent_id = 6 ; // ID of the agent in the partner's system
896924}
925+
926+ /**
927+ * Request message for searching voice recordings.
928+ */
929+ message SearchVoiceRecordingsRequest {
930+ repeated SearchOption search_options = 1 ; // Optional. Structured search options for building the filter.
931+ }
932+
933+ /**
934+ * Response message for searching voice recordings.
935+ */
936+ message SearchVoiceRecordingsResponse {
937+ repeated Recording recordings = 1 ;
938+ }
939+
940+ /**
941+ * Message representing a voice recording.
942+ */
943+ message Recording {
944+ string name = 1 ; // The fully qualified resource name of the recording. Format: "orgs/{org}/regions/{region}/zones/{zone}/recordings/{recording}"
945+ int64 call_sid = 2 ; // The unique identifier of the call recorded.
946+ CallType call_type = 3 ; // The type of call recorded.
947+ google.protobuf.Duration duration = 4 ; // The duration of the recording.
948+ string agent_phone = 5 ; // The phone number of the agent.
949+ string client_phone = 6 ; // The phone number of the client.
950+ string campaign = 7 ; // The name of the campaign.
951+ RecordingType recording_type = 8 ; // The type of the recording.
952+ google.protobuf.Timestamp start_time = 9 ; // The start time of the recording.
953+ repeated string partner_agent_ids = 10 ; // The user IDs of participating agents.
954+ }
955+
956+ /**
957+ * Enumeration of recording types.
958+ */
959+ enum RecordingType {
960+ RECORDING_TYPE_TCN = 0 ;
961+ RECORDING_TYPE_EXTERNAL = 1 ;
962+ RECORDING_TYPE_VOICEMAIL = 2 ;
963+ }
964+
965+ /**
966+ * Request message for getting a voice recording download link.
967+ */
968+ message GetVoiceRecordingDownloadLinkRequest {
969+ string recording_id = 1 ; // The ID of the recording to get the download link for
970+ }
971+
972+ /**
973+ * Response message for getting a voice recording download link.
974+ */
975+ message GetVoiceRecordingDownloadLinkResponse {
976+ string download_link = 1 ; // The download link for the recording
977+ }
978+
979+ message SearchOption {
980+ string field = 1 ; // The field to search on (see above for supported fields).
981+ Operator operator = 2 ; // The operator to use for comparison.
982+ string value = 3 ; // The value to compare against.
983+ }
984+
985+ // Supported operators for search options.
986+ enum Operator {
987+ OPERATOR_UNSPECIFIED = 0 ;
988+ EQUAL = 1 ; // =
989+ CONTAINS = 2 ; // :
990+ NOT_EQUAL = 3 ; // !=
991+ }
992+
993+ /**
994+ * Request message for listing searchable recording fields.
995+ */
996+ message ListSearchableRecordingFieldsRequest {}
997+
998+ /**
999+ * Response message for listing searchable recording fields.
1000+ */
1001+ message ListSearchableRecordingFieldsResponse {
1002+ repeated string fields = 1 ;
1003+ }
0 commit comments