Skip to content

Commit 1db63e8

Browse files
authored
Merge pull request #2 from tcncloud/skills_api
Skills api
2 parents ccf8e75 + d4b453f commit 1db63e8

File tree

2 files changed

+65
-10
lines changed

2 files changed

+65
-10
lines changed

tcnapi/exile/gate/v2/entities.proto

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,3 +276,12 @@ enum AgentState {
276276
// interim state for cold agent transfer
277277
AGENT_STATE_COLD_AGENT_TRANSFER_STARTED = 39;
278278
}
279+
280+
message Skill {
281+
// the id to pass back to Assign calls to give this skill to an agent
282+
string skill_id = 1;
283+
string name = 2;
284+
string description = 3;
285+
// will not be set if the skill is not assigned to an agent
286+
int64 proficiency = 4;
287+
}

tcnapi/exile/gate/v2/public.proto

Lines changed: 56 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,32 @@ service GateService {
234234
body: "*"
235235
};
236236
}
237-
237+
/**
238+
* Skill management operations
239+
* These methods handle skill management for agents
240+
*/
241+
// List all available skills in an organization
242+
rpc ListSkills(ListSkillsRequest) returns (ListSkillsResponse) {
243+
option (google.api.http) = {get: "/tcnapi/exile/gate/v2/skills"};
244+
}
245+
// List all skills assigned to an agent, and their proficiency
246+
rpc ListAgentSkills(ListAgentSkillsRequest) returns (ListAgentSkillsResponse) {
247+
option (google.api.http) = {get: "/tcnapi/exile/gate/v2/agents/{partner_agent_id=partner_agent_id}/skills"};
248+
}
249+
// Assign a skill to an agent
250+
rpc AssignAgentSkill(AssignAgentSkillRequest) returns (AssignAgentSkillResponse) {
251+
option (google.api.http) = {
252+
post: "/tcnapi/exile/gate/v2/agents/{partner_agent_id=partner_agent_id}/assign_skill"
253+
body: "*"
254+
};
255+
}
256+
// Unassign a skill from an agent
257+
rpc UnassignAgentSkill(UnassignAgentSkillRequest) returns (UnassignAgentSkillResponse) {
258+
option (google.api.http) = {
259+
post: "/tcnapi/exile/gate/v2/agents/{partner_agent_id=partner_agent_id}/unassign_skill"
260+
body: "*"
261+
};
262+
}
238263
/**
239264
* Logging operations
240265
*/
@@ -923,10 +948,31 @@ message Agent {
923948
string partner_agent_id = 6; // ID of the agent in the partner's system
924949
}
925950

951+
message ListSkillsRequest {}
952+
message ListSkillsResponse {
953+
repeated Skill skills = 1;
954+
}
955+
message ListAgentSkillsRequest {
956+
string partner_agent_id = 1;
957+
}
958+
message ListAgentSkillsResponse {
959+
repeated Skill skills = 1;
960+
}
961+
message AssignAgentSkillRequest {
962+
string partner_agent_id = 1;
963+
string skill_id = 2;
964+
}
965+
message AssignAgentSkillResponse {}
966+
message UnassignAgentSkillRequest {
967+
string partner_agent_id = 1;
968+
string skill_id = 2;
969+
}
970+
message UnassignAgentSkillResponse {}
971+
926972
/**
927973
* Request message for searching voice recordings.
928974
*/
929-
message SearchVoiceRecordingsRequest {
975+
message SearchVoiceRecordingsRequest {
930976
repeated SearchOption search_options = 1; // Optional. Structured search options for building the filter.
931977
}
932978

@@ -941,7 +987,7 @@ message SearchVoiceRecordingsResponse {
941987
* Message representing a voice recording.
942988
*/
943989
message Recording {
944-
string name = 1; // The fully qualified resource name of the recording. Format: "orgs/{org}/regions/{region}/zones/{zone}/recordings/{recording}"
990+
string name = 1; // The fully qualified resource name of the recording. Format: "orgs/{org}/regions/{region}/zones/{zone}/recordings/{recording}"
945991
int64 call_sid = 2; // The unique identifier of the call recorded.
946992
CallType call_type = 3; // The type of call recorded.
947993
google.protobuf.Duration duration = 4; // The duration of the recording.
@@ -978,19 +1024,19 @@ message GetVoiceRecordingDownloadLinkResponse {
9781024

9791025
message SearchOption {
9801026
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.
1027+
Operator operator = 2; // The operator to use for comparison.
1028+
string value = 3; // The value to compare against.
9831029
}
9841030

9851031
// Supported operators for search options.
9861032
enum Operator {
9871033
OPERATOR_UNSPECIFIED = 0;
988-
EQUAL = 1; // =
989-
CONTAINS = 2; // :
990-
NOT_EQUAL = 3; // !=
1034+
EQUAL = 1; // =
1035+
CONTAINS = 2; // :
1036+
NOT_EQUAL = 3; // !=
9911037
}
9921038

993-
/**
1039+
/**
9941040
* Request message for listing searchable recording fields.
9951041
*/
9961042
message ListSearchableRecordingFieldsRequest {}
@@ -1000,4 +1046,4 @@ message ListSearchableRecordingFieldsRequest {}
10001046
*/
10011047
message ListSearchableRecordingFieldsResponse {
10021048
repeated string fields = 1;
1003-
}
1049+
}

0 commit comments

Comments
 (0)