Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAgentSmithServer(s grpc.ServiceRegistrar, srv AgentSmithServer)
- type AgentSessionEndEvent
- type AgentSmithClient
- type AgentSmithServer
- type AgentSmith_FollowAgentClient
- type AgentSmith_FollowAgentServer
- type AgentState
- type AgentStateChangeEvent
- func (*AgentStateChangeEvent) Descriptor() ([]byte, []int)deprecated
- func (x *AgentStateChangeEvent) GetEmpty() *EmptyState
- func (x *AgentStateChangeEvent) GetNewState() AgentState
- func (x *AgentStateChangeEvent) GetOldState() AgentState
- func (x *AgentStateChangeEvent) GetStateDetails() isAgentStateChangeEvent_StateDetails
- func (*AgentStateChangeEvent) ProtoMessage()
- func (x *AgentStateChangeEvent) ProtoReflect() protoreflect.Message
- func (x *AgentStateChangeEvent) Reset()
- func (x *AgentStateChangeEvent) String() string
- type AgentStateChangeEvent_Empty
- type AgentVoiceEndEvent
- type AgentVoiceStartEvent
- func (*AgentVoiceStartEvent) Descriptor() ([]byte, []int)deprecated
- func (x *AgentVoiceStartEvent) GetSipDialUrl() string
- func (*AgentVoiceStartEvent) ProtoMessage()
- func (x *AgentVoiceStartEvent) ProtoReflect() protoreflect.Message
- func (x *AgentVoiceStartEvent) Reset()
- func (x *AgentVoiceStartEvent) String() string
- type EmptyState
- type FollowAgentReq
- func (*FollowAgentReq) Descriptor() ([]byte, []int)deprecated
- func (x *FollowAgentReq) GetAsmSessionSid() int64
- func (x *FollowAgentReq) GetId() isFollowAgentReq_Id
- func (x *FollowAgentReq) GetUserId() string
- func (*FollowAgentReq) ProtoMessage()
- func (x *FollowAgentReq) ProtoReflect() protoreflect.Message
- func (x *FollowAgentReq) Reset()
- func (x *FollowAgentReq) String() string
- type FollowAgentReq_AsmSessionSid
- type FollowAgentReq_UserId
- type FollowAgentRes
- func (*FollowAgentRes) Descriptor() ([]byte, []int)deprecated
- func (x *FollowAgentRes) GetAgentSessionEnd() *AgentSessionEndEvent
- func (x *FollowAgentRes) GetAgentStateChange() *AgentStateChangeEvent
- func (x *FollowAgentRes) GetAgentVoiceEnd() *AgentVoiceEndEvent
- func (x *FollowAgentRes) GetAgentVoiceStart() *AgentVoiceStartEvent
- func (x *FollowAgentRes) GetEvent() isFollowAgentRes_Event
- func (x *FollowAgentRes) GetTs() *timestamppb.Timestamp
- func (*FollowAgentRes) ProtoMessage()
- func (x *FollowAgentRes) ProtoReflect() protoreflect.Message
- func (x *FollowAgentRes) Reset()
- func (x *FollowAgentRes) String() string
- type FollowAgentRes_AgentSessionEnd
- type FollowAgentRes_AgentStateChange
- type FollowAgentRes_AgentVoiceEnd
- type FollowAgentRes_AgentVoiceStart
- type UnimplementedAgentSmithServer
- type UnsafeAgentSmithServer
Constants ¶
const (
AgentSmith_FollowAgent_FullMethodName = "/api.v1alpha1.agentsmith.AgentSmith/FollowAgent"
)
Variables ¶
var ( AgentState_name = map[int32]string{ 0: "UNKNOWN", 1: "UNAVAILABLE", 2: "IDLE", 3: "READY", 4: "HUNGUP", 5: "DESTROYED", 6: "PEERED", 7: "PAUSED", 8: "WRAPUP", 10: "PREPARING_AFTER_IDLE", } AgentState_value = map[string]int32{ "UNKNOWN": 0, "UNAVAILABLE": 1, "IDLE": 2, "READY": 3, "HUNGUP": 4, "DESTROYED": 5, "PEERED": 6, "PAUSED": 7, "WRAPUP": 8, "PREPARING_AFTER_IDLE": 10, } )
Enum value maps for AgentState.
var AgentSmith_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1alpha1.agentsmith.AgentSmith", HandlerType: (*AgentSmithServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "FollowAgent", Handler: _AgentSmith_FollowAgent_Handler, ServerStreams: true, }, }, Metadata: "api/v1alpha1/agentsmith/service.proto", }
AgentSmith_ServiceDesc is the grpc.ServiceDesc for AgentSmith service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_v1alpha1_agentsmith_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAgentSmithServer ¶
func RegisterAgentSmithServer(s grpc.ServiceRegistrar, srv AgentSmithServer)
Types ¶
type AgentSessionEndEvent ¶
type AgentSessionEndEvent struct {
// contains filtered or unexported fields
}
AgentSessionEndEvent is the event that is triggered when the agent session is closed.
func (*AgentSessionEndEvent) Descriptor
deprecated
func (*AgentSessionEndEvent) Descriptor() ([]byte, []int)
Deprecated: Use AgentSessionEndEvent.ProtoReflect.Descriptor instead.
func (*AgentSessionEndEvent) ProtoMessage ¶
func (*AgentSessionEndEvent) ProtoMessage()
func (*AgentSessionEndEvent) ProtoReflect ¶
func (x *AgentSessionEndEvent) ProtoReflect() protoreflect.Message
func (*AgentSessionEndEvent) Reset ¶
func (x *AgentSessionEndEvent) Reset()
func (*AgentSessionEndEvent) String ¶
func (x *AgentSessionEndEvent) String() string
type AgentSmithClient ¶
type AgentSmithClient interface { // FollowAgent method find an agent identified by user_id or asm_session_id and return a stream of events // associated with the current session of the user and long as the session lives regardless if the agent is // using the omni interface or neo interface. // When the agent is in a voice session one of the first messages received will be AgentVoiceStartEvent that // contains a sip dial url that can be used to connect to the agent's voice session. FollowAgent(ctx context.Context, in *FollowAgentReq, opts ...grpc.CallOption) (AgentSmith_FollowAgentClient, error) }
AgentSmithClient is the client API for AgentSmith service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
AgentSmith is the Public API for the AgentSmith service. This service provides the methods for public integrations to follow agents and/or create virtual agents.
func NewAgentSmithClient ¶
func NewAgentSmithClient(cc grpc.ClientConnInterface) AgentSmithClient
type AgentSmithServer ¶
type AgentSmithServer interface { // FollowAgent method find an agent identified by user_id or asm_session_id and return a stream of events // associated with the current session of the user and long as the session lives regardless if the agent is // using the omni interface or neo interface. // When the agent is in a voice session one of the first messages received will be AgentVoiceStartEvent that // contains a sip dial url that can be used to connect to the agent's voice session. FollowAgent(*FollowAgentReq, AgentSmith_FollowAgentServer) error // contains filtered or unexported methods }
AgentSmithServer is the server API for AgentSmith service. All implementations must embed UnimplementedAgentSmithServer for forward compatibility.
AgentSmith is the Public API for the AgentSmith service. This service provides the methods for public integrations to follow agents and/or create virtual agents.
type AgentSmith_FollowAgentClient ¶
type AgentSmith_FollowAgentClient interface { Recv() (*FollowAgentRes, error) grpc.ClientStream }
type AgentSmith_FollowAgentServer ¶
type AgentSmith_FollowAgentServer interface { Send(*FollowAgentRes) error grpc.ServerStream }
type AgentState ¶
type AgentState int32
AgentState is the state of the agent
const ( // TBD - in the works AgentState_UNKNOWN AgentState = 0 // TODO should we even have an unknown state? just use unavailable? AgentState_UNAVAILABLE AgentState = 1 AgentState_IDLE AgentState = 2 AgentState_READY AgentState = 3 AgentState_HUNGUP AgentState = 4 AgentState_DESTROYED AgentState = 5 AgentState_PEERED AgentState = 6 AgentState_PAUSED AgentState = 7 AgentState_WRAPUP AgentState = 8 AgentState_PREPARING_AFTER_IDLE AgentState = 10 )
func (AgentState) Descriptor ¶
func (AgentState) Descriptor() protoreflect.EnumDescriptor
func (AgentState) Enum ¶
func (x AgentState) Enum() *AgentState
func (AgentState) EnumDescriptor
deprecated
func (AgentState) EnumDescriptor() ([]byte, []int)
Deprecated: Use AgentState.Descriptor instead.
func (AgentState) Number ¶
func (x AgentState) Number() protoreflect.EnumNumber
func (AgentState) String ¶
func (x AgentState) String() string
func (AgentState) Type ¶
func (AgentState) Type() protoreflect.EnumType
type AgentStateChangeEvent ¶
type AgentStateChangeEvent struct { // the old state of the agent OldState AgentState `` /* 126-byte string literal not displayed */ // the new state of the agent NewState AgentState `` /* 126-byte string literal not displayed */ // state definition // // Types that are valid to be assigned to StateDetails: // // *AgentStateChangeEvent_Empty StateDetails isAgentStateChangeEvent_StateDetails `protobuf_oneof:"state_details"` // contains filtered or unexported fields }
AgentStateChangeEvent is the event that is triggered when the agent state changes in the agent interface.
func (*AgentStateChangeEvent) Descriptor
deprecated
func (*AgentStateChangeEvent) Descriptor() ([]byte, []int)
Deprecated: Use AgentStateChangeEvent.ProtoReflect.Descriptor instead.
func (*AgentStateChangeEvent) GetEmpty ¶
func (x *AgentStateChangeEvent) GetEmpty() *EmptyState
func (*AgentStateChangeEvent) GetNewState ¶
func (x *AgentStateChangeEvent) GetNewState() AgentState
func (*AgentStateChangeEvent) GetOldState ¶
func (x *AgentStateChangeEvent) GetOldState() AgentState
func (*AgentStateChangeEvent) GetStateDetails ¶
func (x *AgentStateChangeEvent) GetStateDetails() isAgentStateChangeEvent_StateDetails
func (*AgentStateChangeEvent) ProtoMessage ¶
func (*AgentStateChangeEvent) ProtoMessage()
func (*AgentStateChangeEvent) ProtoReflect ¶
func (x *AgentStateChangeEvent) ProtoReflect() protoreflect.Message
func (*AgentStateChangeEvent) Reset ¶
func (x *AgentStateChangeEvent) Reset()
func (*AgentStateChangeEvent) String ¶
func (x *AgentStateChangeEvent) String() string
type AgentStateChangeEvent_Empty ¶
type AgentStateChangeEvent_Empty struct {
Empty *EmptyState `protobuf:"bytes,10,opt,name=empty,proto3,oneof"` // TBD - in the works
}
type AgentVoiceEndEvent ¶
type AgentVoiceEndEvent struct {
// contains filtered or unexported fields
}
AgentVoiceEndEvent is the event that is triggered when the agent ends a voice session.
func (*AgentVoiceEndEvent) Descriptor
deprecated
func (*AgentVoiceEndEvent) Descriptor() ([]byte, []int)
Deprecated: Use AgentVoiceEndEvent.ProtoReflect.Descriptor instead.
func (*AgentVoiceEndEvent) ProtoMessage ¶
func (*AgentVoiceEndEvent) ProtoMessage()
func (*AgentVoiceEndEvent) ProtoReflect ¶
func (x *AgentVoiceEndEvent) ProtoReflect() protoreflect.Message
func (*AgentVoiceEndEvent) Reset ¶
func (x *AgentVoiceEndEvent) Reset()
func (*AgentVoiceEndEvent) String ¶
func (x *AgentVoiceEndEvent) String() string
type AgentVoiceStartEvent ¶
type AgentVoiceStartEvent struct { // the sip dial url that can be used to connect to the agent's voice session. SipDialUrl string `protobuf:"bytes,1,opt,name=sip_dial_url,json=sipDialUrl,proto3" json:"sip_dial_url,omitempty"` // TBD // contains filtered or unexported fields }
AgentVoiceStartEvent is the event that is triggered when the agent starts a voice session.
func (*AgentVoiceStartEvent) Descriptor
deprecated
func (*AgentVoiceStartEvent) Descriptor() ([]byte, []int)
Deprecated: Use AgentVoiceStartEvent.ProtoReflect.Descriptor instead.
func (*AgentVoiceStartEvent) GetSipDialUrl ¶
func (x *AgentVoiceStartEvent) GetSipDialUrl() string
func (*AgentVoiceStartEvent) ProtoMessage ¶
func (*AgentVoiceStartEvent) ProtoMessage()
func (*AgentVoiceStartEvent) ProtoReflect ¶
func (x *AgentVoiceStartEvent) ProtoReflect() protoreflect.Message
func (*AgentVoiceStartEvent) Reset ¶
func (x *AgentVoiceStartEvent) Reset()
func (*AgentVoiceStartEvent) String ¶
func (x *AgentVoiceStartEvent) String() string
type EmptyState ¶
type EmptyState struct {
// contains filtered or unexported fields
}
EmptyState is a debugging state (for now)
func (*EmptyState) Descriptor
deprecated
func (*EmptyState) Descriptor() ([]byte, []int)
Deprecated: Use EmptyState.ProtoReflect.Descriptor instead.
func (*EmptyState) ProtoMessage ¶
func (*EmptyState) ProtoMessage()
func (*EmptyState) ProtoReflect ¶
func (x *EmptyState) ProtoReflect() protoreflect.Message
func (*EmptyState) Reset ¶
func (x *EmptyState) Reset()
func (*EmptyState) String ¶
func (x *EmptyState) String() string
type FollowAgentReq ¶
type FollowAgentReq struct { // the agent could be identified by user_id or asm_session_id // // Types that are valid to be assigned to Id: // // *FollowAgentReq_UserId // *FollowAgentReq_AsmSessionSid Id isFollowAgentReq_Id `protobuf_oneof:"id"` // contains filtered or unexported fields }
FollowAgentReq is the request for the FollowAgent method.
func (*FollowAgentReq) Descriptor
deprecated
func (*FollowAgentReq) Descriptor() ([]byte, []int)
Deprecated: Use FollowAgentReq.ProtoReflect.Descriptor instead.
func (*FollowAgentReq) GetAsmSessionSid ¶
func (x *FollowAgentReq) GetAsmSessionSid() int64
func (*FollowAgentReq) GetId ¶
func (x *FollowAgentReq) GetId() isFollowAgentReq_Id
func (*FollowAgentReq) GetUserId ¶
func (x *FollowAgentReq) GetUserId() string
func (*FollowAgentReq) ProtoMessage ¶
func (*FollowAgentReq) ProtoMessage()
func (*FollowAgentReq) ProtoReflect ¶
func (x *FollowAgentReq) ProtoReflect() protoreflect.Message
func (*FollowAgentReq) Reset ¶
func (x *FollowAgentReq) Reset()
func (*FollowAgentReq) String ¶
func (x *FollowAgentReq) String() string
type FollowAgentReq_AsmSessionSid ¶
type FollowAgentReq_AsmSessionSid struct { // asm_session_sid of the given agent that can be obtain from ... AsmSessionSid int64 `protobuf:"varint,2,opt,name=asm_session_sid,json=asmSessionSid,proto3,oneof"` }
type FollowAgentReq_UserId ¶
type FollowAgentReq_UserId struct { // user_id of the given agent that can be obtain from ... UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3,oneof"` }
type FollowAgentRes ¶
type FollowAgentRes struct { // the timestamp of the event Ts *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=ts,proto3" json:"ts,omitempty"` // the event type // // Types that are valid to be assigned to Event: // // *FollowAgentRes_AgentStateChange // *FollowAgentRes_AgentVoiceStart // *FollowAgentRes_AgentVoiceEnd // *FollowAgentRes_AgentSessionEnd Event isFollowAgentRes_Event `protobuf_oneof:"event"` // contains filtered or unexported fields }
FollowAgentRes is the response for the FollowAgent method. Each message is an event associated with the agent session and represents a change in the state of the agent session.
func (*FollowAgentRes) Descriptor
deprecated
func (*FollowAgentRes) Descriptor() ([]byte, []int)
Deprecated: Use FollowAgentRes.ProtoReflect.Descriptor instead.
func (*FollowAgentRes) GetAgentSessionEnd ¶
func (x *FollowAgentRes) GetAgentSessionEnd() *AgentSessionEndEvent
func (*FollowAgentRes) GetAgentStateChange ¶
func (x *FollowAgentRes) GetAgentStateChange() *AgentStateChangeEvent
func (*FollowAgentRes) GetAgentVoiceEnd ¶
func (x *FollowAgentRes) GetAgentVoiceEnd() *AgentVoiceEndEvent
func (*FollowAgentRes) GetAgentVoiceStart ¶
func (x *FollowAgentRes) GetAgentVoiceStart() *AgentVoiceStartEvent
func (*FollowAgentRes) GetEvent ¶
func (x *FollowAgentRes) GetEvent() isFollowAgentRes_Event
func (*FollowAgentRes) GetTs ¶
func (x *FollowAgentRes) GetTs() *timestamppb.Timestamp
func (*FollowAgentRes) ProtoMessage ¶
func (*FollowAgentRes) ProtoMessage()
func (*FollowAgentRes) ProtoReflect ¶
func (x *FollowAgentRes) ProtoReflect() protoreflect.Message
func (*FollowAgentRes) Reset ¶
func (x *FollowAgentRes) Reset()
func (*FollowAgentRes) String ¶
func (x *FollowAgentRes) String() string
type FollowAgentRes_AgentSessionEnd ¶
type FollowAgentRes_AgentSessionEnd struct { // the agent session end event that is triggered when the agent session is closed. After this event the connection // will be closed by the server. AgentSessionEnd *AgentSessionEndEvent `protobuf:"bytes,13,opt,name=agent_session_end,json=agentSessionEnd,proto3,oneof"` }
type FollowAgentRes_AgentStateChange ¶
type FollowAgentRes_AgentStateChange struct { // A generic state change event that has been triggered in the agent interface AgentStateChange *AgentStateChangeEvent `protobuf:"bytes,10,opt,name=agent_state_change,json=agentStateChange,proto3,oneof"` }
type FollowAgentRes_AgentVoiceEnd ¶
type FollowAgentRes_AgentVoiceEnd struct { // the voice agent session end event AgentVoiceEnd *AgentVoiceEndEvent `protobuf:"bytes,12,opt,name=agent_voice_end,json=agentVoiceEnd,proto3,oneof"` }
type FollowAgentRes_AgentVoiceStart ¶
type FollowAgentRes_AgentVoiceStart struct { // The voice agent session start event AgentVoiceStart *AgentVoiceStartEvent `protobuf:"bytes,11,opt,name=agent_voice_start,json=agentVoiceStart,proto3,oneof"` }
type UnimplementedAgentSmithServer ¶
type UnimplementedAgentSmithServer struct{}
UnimplementedAgentSmithServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAgentSmithServer) FollowAgent ¶
func (UnimplementedAgentSmithServer) FollowAgent(*FollowAgentReq, AgentSmith_FollowAgentServer) error
type UnsafeAgentSmithServer ¶
type UnsafeAgentSmithServer interface {
// contains filtered or unexported methods
}
UnsafeAgentSmithServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentSmithServer will result in compilation errors.