asmconnect

package
v1.8.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AsmStreamAgentStateProcedure is the fully-qualified name of the Asm's StreamAgentState RPC.
	AsmStreamAgentStateProcedure = "/api.v1alpha1.asm.Asm/StreamAgentState"
	// AsmManagerStreamAgentStateProcedure is the fully-qualified name of the Asm's
	// ManagerStreamAgentState RPC.
	AsmManagerStreamAgentStateProcedure = "/api.v1alpha1.asm.Asm/ManagerStreamAgentState"
	// AsmPushEventsProcedure is the fully-qualified name of the Asm's PushEvents RPC.
	AsmPushEventsProcedure = "/api.v1alpha1.asm.Asm/PushEvents"
	// AsmCreateSessionProcedure is the fully-qualified name of the Asm's CreateSession RPC.
	AsmCreateSessionProcedure = "/api.v1alpha1.asm.Asm/CreateSession"
	// AsmEndSessionProcedure is the fully-qualified name of the Asm's EndSession RPC.
	AsmEndSessionProcedure = "/api.v1alpha1.asm.Asm/EndSession"
	// AsmGetCurrentSessionProcedure is the fully-qualified name of the Asm's GetCurrentSession RPC.
	AsmGetCurrentSessionProcedure = "/api.v1alpha1.asm.Asm/GetCurrentSession"
	// AsmEnableVoiceProcedure is the fully-qualified name of the Asm's EnableVoice RPC.
	AsmEnableVoiceProcedure = "/api.v1alpha1.asm.Asm/EnableVoice"
	// AsmDisableVoiceProcedure is the fully-qualified name of the Asm's DisableVoice RPC.
	AsmDisableVoiceProcedure = "/api.v1alpha1.asm.Asm/DisableVoice"
	// AsmListConversationsProcedure is the fully-qualified name of the Asm's ListConversations RPC.
	AsmListConversationsProcedure = "/api.v1alpha1.asm.Asm/ListConversations"
	// AsmAssignNewConversationProcedure is the fully-qualified name of the Asm's AssignNewConversation
	// RPC.
	AsmAssignNewConversationProcedure = "/api.v1alpha1.asm.Asm/AssignNewConversation"
	// AsmListAgentsProcedure is the fully-qualified name of the Asm's ListAgents RPC.
	AsmListAgentsProcedure = "/api.v1alpha1.asm.Asm/ListAgents"
	// AsmSetConversationCollectedDataProcedure is the fully-qualified name of the Asm's
	// SetConversationCollectedData RPC.
	AsmSetConversationCollectedDataProcedure = "/api.v1alpha1.asm.Asm/SetConversationCollectedData"
	// AsmGetQueuesDetailsProcedure is the fully-qualified name of the Asm's GetQueuesDetails RPC.
	AsmGetQueuesDetailsProcedure = "/api.v1alpha1.asm.Asm/GetQueuesDetails"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// AsmApiCreateSessionProcedure is the fully-qualified name of the AsmApi's CreateSession RPC.
	AsmApiCreateSessionProcedure = "/api.v1alpha1.asm.AsmApi/CreateSession"
	// AsmApiGetStatusProcedure is the fully-qualified name of the AsmApi's GetStatus RPC.
	AsmApiGetStatusProcedure = "/api.v1alpha1.asm.AsmApi/GetStatus"
	// AsmApiEndSessionProcedure is the fully-qualified name of the AsmApi's EndSession RPC.
	AsmApiEndSessionProcedure = "/api.v1alpha1.asm.AsmApi/EndSession"
	// AsmApiGetCurrentSessionProcedure is the fully-qualified name of the AsmApi's GetCurrentSession
	// RPC.
	AsmApiGetCurrentSessionProcedure = "/api.v1alpha1.asm.AsmApi/GetCurrentSession"
	// AsmApiSwitchSubsessionProcedure is the fully-qualified name of the AsmApi's SwitchSubsession RPC.
	AsmApiSwitchSubsessionProcedure = "/api.v1alpha1.asm.AsmApi/SwitchSubsession"
	// AsmApiListConversationsProcedure is the fully-qualified name of the AsmApi's ListConversations
	// RPC.
	AsmApiListConversationsProcedure = "/api.v1alpha1.asm.AsmApi/ListConversations"
	// AsmApiAssignNewConversationProcedure is the fully-qualified name of the AsmApi's
	// AssignNewConversation RPC.
	AsmApiAssignNewConversationProcedure = "/api.v1alpha1.asm.AsmApi/AssignNewConversation"
	// AsmApiListAgentsProcedure is the fully-qualified name of the AsmApi's ListAgents RPC.
	AsmApiListAgentsProcedure = "/api.v1alpha1.asm.AsmApi/ListAgents"
	// AsmApiSetConversationCollectedDataProcedure is the fully-qualified name of the AsmApi's
	// SetConversationCollectedData RPC.
	AsmApiSetConversationCollectedDataProcedure = "/api.v1alpha1.asm.AsmApi/SetConversationCollectedData"
	// AsmApiGetQueuesDetailsProcedure is the fully-qualified name of the AsmApi's GetQueuesDetails RPC.
	AsmApiGetQueuesDetailsProcedure = "/api.v1alpha1.asm.AsmApi/GetQueuesDetails"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// AsmApiName is the fully-qualified name of the AsmApi service.
	AsmApiName = "api.v1alpha1.asm.AsmApi"
)
View Source
const (
	// AsmName is the fully-qualified name of the Asm service.
	AsmName = "api.v1alpha1.asm.Asm"
)

Variables

This section is empty.

Functions

func NewAsmApiHandler

func NewAsmApiHandler(svc AsmApiHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewAsmApiHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewAsmHandler

func NewAsmHandler(svc AsmHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewAsmHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type AsmApiClient

type AsmApiClient interface {
	// Creates an agent session and enables the voice channel
	CreateSession(context.Context, *connect_go.Request[asm.CreateSessionReq]) (*connect_go.Response[asm.CreateSessionRes], error)
	// Returns an aggregate of the statuses of all channels
	GetStatus(context.Context, *connect_go.Request[asm.GetStatusReq]) (*connect_go.Response[asm.GetStatusRes], error)
	// Closes an asm session and all sub sessions
	EndSession(context.Context, *connect_go.Request[asm.EndSessionReq]) (*connect_go.Response[asm.EndSessionRes], error)
	// Gets an agent's current asm session
	GetCurrentSession(context.Context, *connect_go.Request[asm.GetCurrentSessionReq]) (*connect_go.Response[asm.AsmSession], error)
	// Updates the currently active subsession
	SwitchSubsession(context.Context, *connect_go.Request[asm.SwitchSubsessionReq]) (*connect_go.Response[asm.SwitchSubsessionRes], error)
	// Lists the conversations for an assigned agent
	ListConversations(context.Context, *connect_go.Request[asm.ListConversationsReq]) (*connect_go.Response[asm.ListConversationsRes], error)
	// Assign agent to matched conversation based on skills and channelTypes requested
	AssignNewConversation(context.Context, *connect_go.Request[asm.AssignNewConversationReq]) (*connect_go.Response[asm.AssignNewConversationRes], error)
	// List all agents for the given user. Contains statistical enrichments for each agent and their conversations.
	ListAgents(context.Context, *connect_go.Request[asm.ListAgentsReq]) (*connect_go.Response[asm.ListAgentsRes], error)
	// Set collected data per conversation
	SetConversationCollectedData(context.Context, *connect_go.Request[asm.SetConversationCollectedDataReq]) (*connect_go.Response[asm.SetConversationCollectedDataRes], error)
	// Set queue details
	GetQueuesDetails(context.Context, *connect_go.Request[asm.GetQueuesDetailsReq]) (*connect_go.Response[commons.GetQueuesDetailsRes], error)
}

AsmApiClient is a client for the api.v1alpha1.asm.AsmApi service.

func NewAsmApiClient

func NewAsmApiClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) AsmApiClient

NewAsmApiClient constructs a client for the api.v1alpha1.asm.AsmApi service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type AsmApiHandler

type AsmApiHandler interface {
	// Creates an agent session and enables the voice channel
	CreateSession(context.Context, *connect_go.Request[asm.CreateSessionReq]) (*connect_go.Response[asm.CreateSessionRes], error)
	// Returns an aggregate of the statuses of all channels
	GetStatus(context.Context, *connect_go.Request[asm.GetStatusReq]) (*connect_go.Response[asm.GetStatusRes], error)
	// Closes an asm session and all sub sessions
	EndSession(context.Context, *connect_go.Request[asm.EndSessionReq]) (*connect_go.Response[asm.EndSessionRes], error)
	// Gets an agent's current asm session
	GetCurrentSession(context.Context, *connect_go.Request[asm.GetCurrentSessionReq]) (*connect_go.Response[asm.AsmSession], error)
	// Updates the currently active subsession
	SwitchSubsession(context.Context, *connect_go.Request[asm.SwitchSubsessionReq]) (*connect_go.Response[asm.SwitchSubsessionRes], error)
	// Lists the conversations for an assigned agent
	ListConversations(context.Context, *connect_go.Request[asm.ListConversationsReq]) (*connect_go.Response[asm.ListConversationsRes], error)
	// Assign agent to matched conversation based on skills and channelTypes requested
	AssignNewConversation(context.Context, *connect_go.Request[asm.AssignNewConversationReq]) (*connect_go.Response[asm.AssignNewConversationRes], error)
	// List all agents for the given user. Contains statistical enrichments for each agent and their conversations.
	ListAgents(context.Context, *connect_go.Request[asm.ListAgentsReq]) (*connect_go.Response[asm.ListAgentsRes], error)
	// Set collected data per conversation
	SetConversationCollectedData(context.Context, *connect_go.Request[asm.SetConversationCollectedDataReq]) (*connect_go.Response[asm.SetConversationCollectedDataRes], error)
	// Set queue details
	GetQueuesDetails(context.Context, *connect_go.Request[asm.GetQueuesDetailsReq]) (*connect_go.Response[commons.GetQueuesDetailsRes], error)
}

AsmApiHandler is an implementation of the api.v1alpha1.asm.AsmApi service.

type AsmClient

type AsmClient interface {
	// Streams back status updates for the given asm session
	// only the asm session sid filter is allowed
	StreamAgentState(context.Context, *connect_go.Request[asm.StreamAgentStateReq]) (*connect_go.ServerStreamForClient[commons.StreamAgentStateRes], error)
	// Streams back statuses for the desired filter
	ManagerStreamAgentState(context.Context, *connect_go.Request[asm.ManagerStreamAgentStateReq]) (*connect_go.ServerStreamForClient[commons.ManagerStreamAgentStateRes], error)
	PushEvents(context.Context, *connect_go.Request[asm.PushEventsReq]) (*connect_go.Response[asm.PushEventsRes], error)
	// Creates an agent session and enables the voice channel
	CreateSession(context.Context, *connect_go.Request[asm.CreateSessionReq]) (*connect_go.Response[asm.CreateSessionRes], error)
	// Closes an asm session and all sub sessions
	EndSession(context.Context, *connect_go.Request[asm.EndSessionReq]) (*connect_go.Response[asm.EndSessionRes], error)
	// Gets an agent's current asm session
	GetCurrentSession(context.Context, *connect_go.Request[asm.GetCurrentSessionReq]) (*connect_go.Response[asm.AsmSession], error)
	// Updates the currently active subsession
	EnableVoice(context.Context, *connect_go.Request[asm.EnableVoiceReq]) (*connect_go.Response[asm.EnableVoiceRes], error)
	DisableVoice(context.Context, *connect_go.Request[asm.DisableVoiceReq]) (*connect_go.Response[asm.DisableVoiceRes], error)
	// Lists the conversations for an assigned agent
	ListConversations(context.Context, *connect_go.Request[asm.ListConversationsReq]) (*connect_go.Response[asm.ListConversationsRes], error)
	// Assign agent to matched conversation based on skills and channelTypes requested
	AssignNewConversation(context.Context, *connect_go.Request[asm.AssignNewConversationReq]) (*connect_go.Response[asm.AssignNewConversationRes], error)
	// List all agents for the given user. Contains statistical enrichments for each agent and their conversations.
	ListAgents(context.Context, *connect_go.Request[asm.ListAgentsReq]) (*connect_go.Response[asm.ListAgentsRes], error)
	// Set collected data per conversation
	SetConversationCollectedData(context.Context, *connect_go.Request[asm.SetConversationCollectedDataReq]) (*connect_go.Response[asm.SetConversationCollectedDataRes], error)
	// Set queue details
	GetQueuesDetails(context.Context, *connect_go.Request[asm.GetQueuesDetailsReq]) (*connect_go.Response[commons.GetQueuesDetailsRes], error)
}

AsmClient is a client for the api.v1alpha1.asm.Asm service.

func NewAsmClient

func NewAsmClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) AsmClient

NewAsmClient constructs a client for the api.v1alpha1.asm.Asm service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type AsmHandler

type AsmHandler interface {
	// Streams back status updates for the given asm session
	// only the asm session sid filter is allowed
	StreamAgentState(context.Context, *connect_go.Request[asm.StreamAgentStateReq], *connect_go.ServerStream[commons.StreamAgentStateRes]) error
	// Streams back statuses for the desired filter
	ManagerStreamAgentState(context.Context, *connect_go.Request[asm.ManagerStreamAgentStateReq], *connect_go.ServerStream[commons.ManagerStreamAgentStateRes]) error
	PushEvents(context.Context, *connect_go.Request[asm.PushEventsReq]) (*connect_go.Response[asm.PushEventsRes], error)
	// Creates an agent session and enables the voice channel
	CreateSession(context.Context, *connect_go.Request[asm.CreateSessionReq]) (*connect_go.Response[asm.CreateSessionRes], error)
	// Closes an asm session and all sub sessions
	EndSession(context.Context, *connect_go.Request[asm.EndSessionReq]) (*connect_go.Response[asm.EndSessionRes], error)
	// Gets an agent's current asm session
	GetCurrentSession(context.Context, *connect_go.Request[asm.GetCurrentSessionReq]) (*connect_go.Response[asm.AsmSession], error)
	// Updates the currently active subsession
	EnableVoice(context.Context, *connect_go.Request[asm.EnableVoiceReq]) (*connect_go.Response[asm.EnableVoiceRes], error)
	DisableVoice(context.Context, *connect_go.Request[asm.DisableVoiceReq]) (*connect_go.Response[asm.DisableVoiceRes], error)
	// Lists the conversations for an assigned agent
	ListConversations(context.Context, *connect_go.Request[asm.ListConversationsReq]) (*connect_go.Response[asm.ListConversationsRes], error)
	// Assign agent to matched conversation based on skills and channelTypes requested
	AssignNewConversation(context.Context, *connect_go.Request[asm.AssignNewConversationReq]) (*connect_go.Response[asm.AssignNewConversationRes], error)
	// List all agents for the given user. Contains statistical enrichments for each agent and their conversations.
	ListAgents(context.Context, *connect_go.Request[asm.ListAgentsReq]) (*connect_go.Response[asm.ListAgentsRes], error)
	// Set collected data per conversation
	SetConversationCollectedData(context.Context, *connect_go.Request[asm.SetConversationCollectedDataReq]) (*connect_go.Response[asm.SetConversationCollectedDataRes], error)
	// Set queue details
	GetQueuesDetails(context.Context, *connect_go.Request[asm.GetQueuesDetailsReq]) (*connect_go.Response[commons.GetQueuesDetailsRes], error)
}

AsmHandler is an implementation of the api.v1alpha1.asm.Asm service.

type UnimplementedAsmApiHandler

type UnimplementedAsmApiHandler struct{}

UnimplementedAsmApiHandler returns CodeUnimplemented from all methods.

type UnimplementedAsmHandler

type UnimplementedAsmHandler struct{}

UnimplementedAsmHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL