Documentation ¶
Index ¶
- func NewCommonStoreService() *commonStoreService
- type CommonStoreService
- type Contact
- type Conversation
- type CustomerOSService
- func (s *CustomerOSService) ConversationByIdExists(ctx context.Context, tenant string, conversationId string) (bool, error)
- func (s *CustomerOSService) CreateContactWithEmail(ctx context.Context, tenant string, email string) (*Contact, error)
- func (s *CustomerOSService) CreateContactWithPhone(ctx context.Context, tenant string, phoneNumber string) (*Contact, error)
- func (s *CustomerOSService) CreateConversation(ctx context.Context, tenant string, initiator Participant, ...) (*Conversation, error)
- func (s *CustomerOSService) GetActiveConversationOrCreate(ctx context.Context, tenant string, initiator Participant, ...) (*Conversation, error)
- func (s *CustomerOSService) GetContactByEmail(ctx context.Context, email string, tenant string) (*Contact, error)
- func (s *CustomerOSService) GetContactById(ctx context.Context, id string, tenant string) (*Contact, error)
- func (s *CustomerOSService) GetContactByPhone(ctx context.Context, phoneNumber string, tenant string) (*Contact, error)
- func (s *CustomerOSService) GetContactWithEmailOrCreate(ctx context.Context, tenant string, email string) (Contact, error)
- func (s *CustomerOSService) GetContactWithPhoneOrCreate(ctx context.Context, tenant string, phoneNumber string) (Contact, error)
- func (s *CustomerOSService) GetConversationById(ctx context.Context, tenant string, conversationId string) (*Conversation, error)
- func (s *CustomerOSService) GetConversationParticipants(ctx context.Context, tenant string, conversationId string) ([]string, error)
- func (s *CustomerOSService) GetConversationParticipantsIds(ctx context.Context, tenant string, conversationId string) ([]Participant, error)
- func (s *CustomerOSService) GetConversationWithContactInitiator(ctx context.Context, tenant string, contactId string, ...) (*Conversation, error)
- func (s *CustomerOSService) GetConversationWithThreadId(ctx context.Context, tenant string, eventType entity.EventType, ...) (*Conversation, error)
- func (s *CustomerOSService) GetConversationWithUserInitiator(ctx context.Context, tenant string, userId string, eventType entity.EventType) (*Conversation, error)
- func (s *CustomerOSService) GetConversations(ctx context.Context, tenant string, onlyContacts bool) ([]Conversation, error)
- func (s *CustomerOSService) GetUserByEmail(ctx context.Context, email string, tenant string) (*User, error)
- func (s *CustomerOSService) UpdateConversation(ctx context.Context, tenant string, conversationId string, lastSenderId string, ...) (string, error)
- type CustomerOSServiceInterface
- type EmailContent
- type MessageService
- func (s *MessageService) GetFeed(ctx context.Context, feedIdRequest *msProto.FeedId) (*msProto.FeedItem, error)
- func (s *MessageService) GetFeeds(ctx context.Context, request *msProto.GetFeedsPagedRequest) (*msProto.FeedItemPagedResponse, error)
- func (s *MessageService) GetMessage(ctx context.Context, msgId *msProto.MessageId) (*msProto.Message, error)
- func (s *MessageService) GetMessagesForFeed(ctx context.Context, feedRequest *msProto.PagedMessages) (*msProto.MessageListResponse, error)
- func (s *MessageService) GetParticipantIds(ctx context.Context, feedId *msProto.FeedId) (*msProto.ParticipantObjectListResponse, error)
- func (s *MessageService) GetParticipants(ctx context.Context, feedId *msProto.FeedId) (*msProto.ParticipantsListResponse, error)
- func (s *MessageService) SaveMessage(ctx context.Context, input *msProto.InputMessage) (*msProto.MessageId, error)
- type Participant
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommonStoreService ¶
func NewCommonStoreService() *commonStoreService
Types ¶
type CommonStoreService ¶
type CommonStoreService interface { ConvertMSTypeToEntityType(channel msProto.MessageType) entity.EventType ConvertEntityTypeToMSType(eventType entity.EventType) msProto.MessageType ConvertMSSubtypeToEntitySubtype(channel msProto.MessageSubtype) entity.EventSubtype ConvertEntitySubtypeToMSSubtype(eventType entity.EventSubtype) msProto.MessageSubtype ConvertMSSenderTypeToEntitySenderType(direction msProto.SenderType) entity.SenderType ConvertEntitySenderTypeToMSSenderType(direction entity.SenderType) msProto.SenderType ConvertEntityDirectionToMSDirection(direction entity.Direction) msProto.MessageDirection ConvertMSDirectionToEntityDirection(direction msProto.MessageDirection) entity.Direction EncodeConversationToMS(conversation Conversation) *msProto.FeedItem EncodeMessageIdToMS(conversation Conversation) *msProto.MessageId EncodeConversationEventToMS(conversationEvent entity.ConversationEvent) *msProto.Message }
type Conversation ¶
type Conversation struct { Id string StartedAt time.Time UpdatedAt time.Time Channel string Status string InitiatorFirstName string InitiatorLastName string InitiatorUsername string InitiatorType string LastSenderId string LastSenderType string LastSenderFirstName string LastSenderLastName string LastContentPreview string }
type CustomerOSService ¶
type CustomerOSService struct {
// contains filtered or unexported fields
}
func NewCustomerOSService ¶
func NewCustomerOSService(driver *neo4j.DriverWithContext, graphqlClient *graphql.Client, postgresRepositories *repository.PostgresRepositories, commonStoreService *commonStoreService, config *config.Config) *CustomerOSService
func (*CustomerOSService) ConversationByIdExists ¶
func (*CustomerOSService) CreateContactWithEmail ¶
func (*CustomerOSService) CreateContactWithPhone ¶
func (*CustomerOSService) CreateConversation ¶
func (s *CustomerOSService) CreateConversation(ctx context.Context, tenant string, initiator Participant, initiatorUsername string, channel entity.EventType, threadId string) (*Conversation, error)
func (*CustomerOSService) GetActiveConversationOrCreate ¶
func (s *CustomerOSService) GetActiveConversationOrCreate( ctx context.Context, tenant string, initiator Participant, initiatorUsername *msProto.ParticipantId, eventType entity.EventType, threadId string, ) (*Conversation, error)
func (*CustomerOSService) GetContactByEmail ¶
func (*CustomerOSService) GetContactById ¶
func (*CustomerOSService) GetContactByPhone ¶
func (*CustomerOSService) GetContactWithEmailOrCreate ¶
func (*CustomerOSService) GetContactWithPhoneOrCreate ¶
func (*CustomerOSService) GetConversationById ¶
func (s *CustomerOSService) GetConversationById(ctx context.Context, tenant string, conversationId string) (*Conversation, error)
func (*CustomerOSService) GetConversationParticipants ¶
func (*CustomerOSService) GetConversationParticipantsIds ¶
func (s *CustomerOSService) GetConversationParticipantsIds(ctx context.Context, tenant string, conversationId string) ([]Participant, error)
func (*CustomerOSService) GetConversationWithContactInitiator ¶
func (s *CustomerOSService) GetConversationWithContactInitiator(ctx context.Context, tenant string, contactId string, eventType entity.EventType) (*Conversation, error)
func (*CustomerOSService) GetConversationWithThreadId ¶
func (s *CustomerOSService) GetConversationWithThreadId(ctx context.Context, tenant string, eventType entity.EventType, threadId string) (*Conversation, error)
func (*CustomerOSService) GetConversationWithUserInitiator ¶
func (s *CustomerOSService) GetConversationWithUserInitiator(ctx context.Context, tenant string, userId string, eventType entity.EventType) (*Conversation, error)
func (*CustomerOSService) GetConversations ¶
func (s *CustomerOSService) GetConversations(ctx context.Context, tenant string, onlyContacts bool) ([]Conversation, error)
func (*CustomerOSService) GetUserByEmail ¶
type CustomerOSServiceInterface ¶
type CustomerOSServiceInterface interface { ContactByPhoneExists(e164 string) (bool, error) GetUserByEmail(email string) (*User, error) GetContactById(id string) (*Contact, error) GetContactByEmail(email string) (*Contact, error) GetContactByPhone(phoneNumber string) (*Contact, error) CreateContactWithEmail(tenant string, email string) (*Contact, error) CreateContactWithPhone(tenant string, phoneNumber string) (*Contact, error) ConversationByIdExists(tenant string, conversationId string) (bool, error) GetConversations(tenant string) ([]Conversation, error) GetConversationById(tenant string, conversationId string) (Conversation, error) CreateConversation(tenant string, initiatorId string, initiatorFirstName string, initiatorLastName string, initiatorUsername string, initiatorType entity.SenderType, channel entity.EventType) (*Conversation, error) UpdateConversation(tenant string, conversationId string, participantId string, participantType entity.SenderType, lastSenderFirstName string, lastSenderLastName string, lastContentPreview string) (string, error) }
type EmailContent ¶
type MessageService ¶
type MessageService struct { msProto.UnimplementedMessageStoreServiceServer // contains filtered or unexported fields }
func NewMessageService ¶
func NewMessageService(driver *neo4j.DriverWithContext, postgresRepositories *repository.PostgresRepositories, customerOSService *CustomerOSService, commonStoreService *commonStoreService) *MessageService
func (*MessageService) GetFeeds ¶
func (s *MessageService) GetFeeds(ctx context.Context, request *msProto.GetFeedsPagedRequest) (*msProto.FeedItemPagedResponse, error)
func (*MessageService) GetMessage ¶
func (*MessageService) GetMessagesForFeed ¶
func (s *MessageService) GetMessagesForFeed(ctx context.Context, feedRequest *msProto.PagedMessages) (*msProto.MessageListResponse, error)
func (*MessageService) GetParticipantIds ¶
func (s *MessageService) GetParticipantIds(ctx context.Context, feedId *msProto.FeedId) (*msProto.ParticipantObjectListResponse, error)
func (*MessageService) GetParticipants ¶
func (s *MessageService) GetParticipants(ctx context.Context, feedId *msProto.FeedId) (*msProto.ParticipantsListResponse, error)
func (*MessageService) SaveMessage ¶
func (s *MessageService) SaveMessage(ctx context.Context, input *msProto.InputMessage) (*msProto.MessageId, error)
type Participant ¶
type Participant struct { Id string Type entity.SenderType }
Click to show internal directories.
Click to hide internal directories.