Documentation ¶
Index ¶
- Constants
- type ActionItemRepository
- type ActionRepository
- type AnalysisRepository
- type AttachmentRepository
- type CalendarRepository
- type ContactRepository
- type CustomFieldRepository
- type CustomFieldTemplateRepository
- type DashboardRepository
- type DomainRepository
- type Drivers
- type EmailRepository
- type EntityTemplateRepository
- type ExternalSystemRepository
- type FieldSetRepository
- type FieldSetTemplateRepository
- type InteractionEventRepository
- type InteractionSessionRepository
- type IssueRepository
- type JobRoleRepository
- type LinkedNature
- type LinkedWith
- type LocationRepository
- type MeetingRepository
- type NoteDbNodeWithParentId
- type NoteDbNodesWithTotalCount
- type NoteRepository
- type OrganizationRepository
- type PartOfType
- type PhoneNumberRepository
- type PlayerRepository
- type Repositories
- type SearchRepository
- type SendDirection
- type SocialRepository
- type TagRepository
- type TenantRepository
- type UserRepository
- type WorkspaceRepository
Constants ¶
View Source
const ( SearchSortParamOrganization = "ORGANIZATION" SearchSortParamWebsite = "WEBSITE" SearchSortParamEmail = "EMAIL" SearchSortParamCountry = "COUNTRY" SearchSortParamOnboardingStatus = "ONBOARDING_STATUS" SearchSortParamIsCustomer = "IS_CUSTOMER" SearchSortParamRelationship = "RELATIONSHIP" SearchSortParamStage = "STAGE" SearchSortParamName = "NAME" SearchSortParamRenewalLikelihood = "RENEWAL_LIKELIHOOD" SearchSortParamRenewalCycleNext = "RENEWAL_CYCLE_NEXT" SearchSortParamRenewalDate = "RENEWAL_DATE" SearchSortParamLastTouchpoint = "LAST_TOUCHPOINT" SearchSortParamForecastArr = "FORECAST_ARR" SearchSortParamRegion = "REGION" SearchSortParamLocality = "LOCALITY" SearchSortParamOwnerId = "OWNER_ID" SearchSortParamLocation = "LOCATION" SearchSortParamOwner = "OWNER" SearchSortParamLastTouchpointAt = "LAST_TOUCHPOINT_AT" SearchSortParamLastTouchpointType = "LAST_TOUCHPOINT_TYPE" SearchSortParamRenewalCycle = "RENEWAL_CYCLE" SearchSortParamContractLengthInMonths = "CONTRACT_LENGTH_IN_MONTHS" SearchParamExternalId = "EXTERNAL_ID" )
View Source
const ( LINKED_WITH_INTERACTION_SESSION LinkedWith = "InteractionSession" LINKED_WITH_INTERACTION_EVENT LinkedWith = "InteractionEvent" LINKED_WITH_MEETING LinkedWith = "Meeting" LINKED_WITH_NOTE LinkedWith = "Note" LINKED_WITH_CONTRACT LinkedWith = "Contract" LINKED_NATURE_RECORDING LinkedNature = "Recording" )
View Source
const (
Relationship_Subsidiary = "SUBSIDIARY_OF"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionItemRepository ¶
type ActionItemRepository interface { LinkWithInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, linkedWith LinkedWith, entityId, includedById string) (*dbtype.Node, error) UnlinkWithTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, linkedWith LinkedWith, entityId, includedById string) (*dbtype.Node, error) GetFor(ctx context.Context, tenant string, linkedWith LinkedWith, entityIds []string) ([]*utils.DbNodeAndId, error) }
func NewActionItemRepository ¶
func NewActionItemRepository(driver *neo4j.DriverWithContext) ActionItemRepository
type ActionRepository ¶
type ActionRepository interface {
Create(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entityId string, entityType entity.EntityType, actionType neo4jenum.ActionType, source neo4jentity.DataSource, appSource string) (*dbtype.Node, error)
}
func NewActionRepository ¶
func NewActionRepository(driver *neo4j.DriverWithContext) ActionRepository
type AnalysisRepository ¶
type AnalysisRepository interface { LinkWithDescribesXXInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, linkedWith LinkedWith, entityId, analysisId string) error GetDescribesForAnalysis(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) GetDescribedByForXX(ctx context.Context, tenant string, ids []string, linkedWith LinkedWith) ([]*utils.DbNodeAndId, error) Create(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, newAnalysis entity.AnalysisEntity, source, sourceOfTruth neo4jentity.DataSource) (*dbtype.Node, error) }
func NewAnalysisRepository ¶
func NewAnalysisRepository(driver *neo4j.DriverWithContext) AnalysisRepository
type AttachmentRepository ¶
type AttachmentRepository interface { LinkWithXXIncludesAttachmentInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, linkedWith LinkedWith, linkedNature *LinkedNature, attachmentId, includedById string) (*dbtype.Node, error) UnlinkWithXXIncludesAttachmentInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, linkedWith LinkedWith, linkedNature *LinkedNature, attachmentId, includedById string) (*dbtype.Node, error) GetAttachmentsForXX(ctx context.Context, tenant string, linkedWith LinkedWith, linkedNature *LinkedNature, ids []string) ([]*utils.DbNodeAndId, error) Create(ctx context.Context, tx neo4j.ManagedTransaction, tenant, id, cdnUrl, basePath, fileName, mimeType string, size int64, createdAt *time.Time, source, sourceOfTruth neo4jentity.DataSource, appSource string) (*dbtype.Node, error) }
func NewAttachmentRepository ¶
func NewAttachmentRepository(driver *neo4j.DriverWithContext) AttachmentRepository
type CalendarRepository ¶
type CalendarRepository interface {
GetAllForUsers(ctx context.Context, tenant string, userIds []string) ([]*utils.DbNodeAndId, error)
}
func NewCalendarRepository ¶
func NewCalendarRepository(driver *neo4j.DriverWithContext) CalendarRepository
type ContactRepository ¶
type ContactRepository interface { // Deprecated, use events-platform Delete(ctx context.Context, session neo4j.SessionWithContext, tenant, contactId string) error // Deprecated, use events-platform SetOwner(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId, userId string) error // Deprecated, use events-platform RemoveOwner(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId string) error // Deprecated, use events-platform LinkWithEntityTemplateInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, obj *model.CustomFieldEntityType, entityTemplateId string) error GetPaginatedContacts(ctx context.Context, session neo4j.SessionWithContext, tenant string, skip, limit int, filter *utils.CypherFilter, sort *utils.CypherSort) (*utils.DbNodesWithTotalCount, error) GetPaginatedContactsForOrganization(ctx context.Context, session neo4j.SessionWithContext, tenant, organizationId string, skip, limit int, filter *utils.CypherFilter, sort *utils.CypherSort) (*utils.DbNodesWithTotalCount, error) GetAllForJobRoles(ctx context.Context, tenant string, jobRoleIds []string) ([]*utils.DbNodeAndId, error) GetContactsForEmail(ctx context.Context, tenant, email string) ([]*dbtype.Node, error) GetContactsForPhoneNumber(ctx context.Context, tenant, phoneNumber string) ([]*dbtype.Node, error) // Deprecated, use events-platform AddTag(ctx context.Context, tenant, contactId, tagId string) (*dbtype.Node, error) // Deprecated, use events-platform RemoveTag(ctx context.Context, tenant, contactId, tagId string) (*dbtype.Node, error) // Deprecated, use events-platform AddOrganization(ctx context.Context, tenant, contactId, organizationId, source, appSource string) (*dbtype.Node, error) // Deprecated, use events-platform RemoveOrganization(ctx context.Context, tenant, contactId, organizationId string) (*dbtype.Node, error) // Deprecated, use events-platform MergeContactPropertiesInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, primaryContactId, mergedContactId string, sourceOfTruth neo4jentity.DataSource) error // Deprecated, use events-platform MergeContactRelationsInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, primaryContactId, mergedContactId string) error // Deprecated, use events-platform UpdateMergedContactLabelsInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, mergedContactId string) error GetAllForEmails(ctx context.Context, tenant string, emailIds []string) ([]*utils.DbNodeAndId, error) GetAllForPhoneNumbers(ctx context.Context, tenant string, phoneNumberIds []string) ([]*utils.DbNodeAndId, error) // Deprecated, use events-platform Archive(ctx context.Context, tenant, contactId string) error // Deprecated, use events-platform RestoreFromArchive(ctx context.Context, tenant, contactId string) error GetById(ctx context.Context, tenant, contactId string) (*dbtype.Node, error) GetBillableContactStats(ctx context.Context) (*neo4j.Record, error) }
func NewContactRepository ¶
func NewContactRepository(driver *neo4j.DriverWithContext, database string) ContactRepository
type CustomFieldRepository ¶
type CustomFieldRepository interface { MergeCustomFieldToContactInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, contactId string, entity entity.CustomFieldEntity) (*dbtype.Node, error) MergeCustomFieldInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entityType *model.CustomFieldEntityType, entity entity.CustomFieldEntity) (*dbtype.Node, error) MergeCustomFieldToFieldSetInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, obj *model.CustomFieldEntityType, fieldSet string, entity entity.CustomFieldEntity) (*dbtype.Node, error) LinkWithCustomFieldTemplateForContactInTx(ctx context.Context, tx neo4j.ManagedTransaction, fieldId, contactId, templateId string) error LinkWithCustomFieldTemplateInTx(ctx context.Context, tx neo4j.ManagedTransaction, fieldId string, obj *model.CustomFieldEntityType, templateId string) error LinkWithCustomFieldTemplateForFieldSetInTx(ctx context.Context, tx neo4j.ManagedTransaction, fieldId, fieldSetId, templateId string) error UpdateForContactInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId string, entity entity.CustomFieldEntity) (*dbtype.Node, error) UpdateForFieldSetInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId, fieldSetId string, entity entity.CustomFieldEntity) (*dbtype.Node, error) FindAll(ctx context.Context, session neo4j.SessionWithContext, tenant string, obj *model.CustomFieldEntityType) ([]*neo4j.Record, error) FindAllForFieldSet(ctx context.Context, session neo4j.SessionWithContext, tenant, fieldSetId string) ([]*neo4j.Record, error) DeleteByNameFromContact(ctx context.Context, session neo4j.SessionWithContext, tenant, contactId, fieldName string) error DeleteByIdFromContact(ctx context.Context, session neo4j.SessionWithContext, tenant, contactId, fieldId string) error DeleteByIdFromFieldSet(ctx context.Context, session neo4j.SessionWithContext, tenant, contactId, fieldSetId, fieldId string) error GetCustomFields(ctx context.Context, session neo4j.SessionWithContext, tenant string, obj *model.CustomFieldEntityType) ([]*neo4j.Record, error) }
func NewCustomFieldRepository ¶
func NewCustomFieldRepository(driver *neo4j.DriverWithContext, database string) CustomFieldRepository
type CustomFieldTemplateRepository ¶
type CustomFieldTemplateRepository interface { Merge(ctx context.Context, tenant string, inputEntity entity.CustomFieldTemplateEntity) (*dbtype.Node, error) GetById(ctx context.Context, id string) (*dbtype.Node, error) FindAllByEntityTemplateId(ctx context.Context, entityTemplateId string) (any, error) FindAllByEntityFieldSetTemplateId(ctx context.Context, fieldSetTemplateId string) (any, error) FindByCustomFieldId(ctx context.Context, fieldSetId string) (any, error) // contains filtered or unexported methods }
func NewCustomFieldTemplateRepository ¶
func NewCustomFieldTemplateRepository(driver *neo4j.DriverWithContext, database string) CustomFieldTemplateRepository
type DashboardRepository ¶
type DashboardRepository interface { GetDashboardViewOrganizationData(ctx context.Context, tenant string, skip, limit int, where *model.Filter, sort *model.SortBy) (*utils.DbNodesWithTotalCount, error) GetDashboardViewRenewalData(ctx context.Context, tenant string, skip, limit int, where *model.Filter, sort *model.SortBy) (*utils.RecordsWithTotalCount, error) GetDashboardNewCustomersData(ctx context.Context, tenant string, startDate, endDate time.Time) ([]map[string]interface{}, error) GetDashboardCustomerMapData(ctx context.Context, tenant string) ([]map[string]interface{}, error) GetDashboardRevenueAtRiskData(ctx context.Context, tenant string, startDate, endDate time.Time) ([]map[string]interface{}, error) GetDashboardMRRPerCustomerData(ctx context.Context, tenant string, startDate, endDate time.Time) ([]map[string]interface{}, error) GetDashboardARRBreakdownData(ctx context.Context, tenant string, startDate, endDate time.Time) ([]map[string]interface{}, error) GetDashboardARRBreakdownUpsellsAndDowngradesData(ctx context.Context, tenant, queryType string, startDate, endDate time.Time) ([]map[string]interface{}, error) GetDashboardARRBreakdownRenewalsData(ctx context.Context, tenant string, startDate, endDate time.Time) ([]map[string]interface{}, error) GetDashboardARRBreakdownValueData(ctx context.Context, tenant string, date time.Time) (float64, error) GetDashboardRetentionRateContractsRenewalsData(ctx context.Context, tenant string, startDate, endDate time.Time) ([]map[string]interface{}, error) GetDashboardRetentionRateContractsChurnedData(ctx context.Context, tenant string, startDate, endDate time.Time) ([]map[string]interface{}, error) GetDashboardAverageTimeToOnboardPerMonth(ctx context.Context, tenant string, startDate, endDate time.Time) ([]map[string]interface{}, error) GetDashboardOnboardingCompletionPerMonth(ctx context.Context, tenant string, startDate, endDate time.Time) ([]map[string]interface{}, error) GetDashboardGRRData(ctx context.Context, tenant string, startDate, endDate time.Time) ([]map[string]interface{}, error) }
func NewDashboardRepository ¶
func NewDashboardRepository(driver *neo4j.DriverWithContext) DashboardRepository
type DomainRepository ¶
type DomainRepository interface {
GetForOrganizations(ctx context.Context, tenant string, organizationIds []string) ([]*utils.DbNodeAndId, error)
}
func NewDomainRepository ¶
func NewDomainRepository(driver *neo4j.DriverWithContext, database string) DomainRepository
type Drivers ¶
type Drivers struct {
Neo4jDriver *neo4j.DriverWithContext
}
type EmailRepository ¶
type EmailRepository interface { MergeEmailToInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entityType entity.EntityType, entityId string, entity entity.EmailEntity) (*dbtype.Node, *dbtype.Relationship, error) UpdateEmailForInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entityType entity.EntityType, entityId string, entity entity.EmailEntity) (*dbtype.Node, *dbtype.Relationship, error) SetOtherEmailsNonPrimaryInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenantId string, entityType entity.EntityType, entityId string, email string) error GetAllFor(ctx context.Context, tenant string, entityType entity.EntityType, entityId string) ([]*db.Record, error) GetAllForIds(ctx context.Context, tenant string, entityType entity.EntityType, entityIds []string) ([]*utils.DbNodeWithRelationAndId, error) RemoveRelationship(ctx context.Context, entityType entity.EntityType, tenant, entityId, email string) error RemoveRelationshipById(ctx context.Context, entityType entity.EntityType, tenant, entityId, emailId string) error DeleteById(ctx context.Context, tenant, emailId string) error GetByIdAndRelatedEntity(ctx context.Context, entityType entity.EntityType, tenant, emailId, entityId string) (*dbtype.Node, error) Exists(ctx context.Context, tenant, email string) (bool, error) GetById(ctx context.Context, emailId string) (*dbtype.Node, error) GetByEmail(ctx context.Context, tenant, email string) (*dbtype.Node, error) }
func NewEmailRepository ¶
func NewEmailRepository(driver *neo4j.DriverWithContext, database string) EmailRepository
type EntityTemplateRepository ¶
type EntityTemplateRepository interface { Create(ctx context.Context, tenant string, entity *entity.EntityTemplateEntity) (any, error) FindAllByTenant(ctx context.Context, session neo4j.SessionWithContext, tenant string) ([]*db.Record, error) FindAllByTenantAndExtends(ctx context.Context, session neo4j.SessionWithContext, tenant, extends string) ([]*db.Record, error) FindById(ctx context.Context, tenant string, obj *model.CustomFieldEntityType) (any, error) }
func NewEntityTemplateRepository ¶
func NewEntityTemplateRepository(driver *neo4j.DriverWithContext, repositories *Repositories) EntityTemplateRepository
type ExternalSystemRepository ¶
type ExternalSystemRepository interface { LinkNodeWithExternalSystemInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, nodeId, nodeType string, relationship neo4jentity.ExternalSystemEntity) error GetFor(ctx context.Context, tenant string, ids []string, label string) ([]*utils.DbNodeWithRelationAndId, error) }
func NewExternalSystemRepository ¶
func NewExternalSystemRepository(driver *neo4j.DriverWithContext) ExternalSystemRepository
type FieldSetRepository ¶
type FieldSetRepository interface { LinkWithFieldSetTemplateInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, fieldSetId, templateId string, entityType model.EntityType) error MergeFieldSetToContactInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId string, entity entity.FieldSetEntity) (*dbtype.Node, error) MergeFieldSetInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, obj *model.CustomFieldEntityType, entity entity.FieldSetEntity) (*dbtype.Node, error) UpdateFieldSetForContactInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId string, entity entity.FieldSetEntity) (*dbtype.Node, error) DeleteByIdFromContact(ctx context.Context, session neo4j.SessionWithContext, tenant, contactId, fieldSetId string) error FindAll(ctx context.Context, session neo4j.SessionWithContext, tenant string, obj *model.CustomFieldEntityType) ([]*neo4j.Record, error) }
func NewFieldSetRepository ¶
func NewFieldSetRepository(driver *neo4j.DriverWithContext) FieldSetRepository
type FieldSetTemplateRepository ¶
type FieldSetTemplateRepository interface { FindAllByEntityTemplateId(ctx context.Context, entityTemplateId string) (any, error) FindByFieldSetId(ctx context.Context, fieldSetId string) (any, error) // contains filtered or unexported methods }
func NewFieldSetTemplateRepository ¶
func NewFieldSetTemplateRepository(driver *neo4j.DriverWithContext, repositories *Repositories) FieldSetTemplateRepository
type InteractionEventRepository ¶
type InteractionEventRepository interface { GetAllForInteractionSessions(ctx context.Context, tenant string, ids []string, returnContent bool) ([]*utils.DbPropsAndId, error) GetAllForMeetings(ctx context.Context, tenant string, ids []string, returnContent bool) ([]*utils.DbPropsAndId, error) GetAllForIssues(ctx context.Context, tenant string, issueIds []string, returnContent bool) ([]*utils.DbPropsAndId, error) GetSentByParticipantsForInteractionEvents(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeWithRelationAndId, error) GetSentToParticipantsForInteractionEvents(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeWithRelationAndId, error) GetReplyToInteractionEventsForInteractionEvents(ctx context.Context, tenant string, ids []string, returnContent bool) ([]*utils.DbPropsAndId, error) // Deprecated, use events-platform LinkWithExternalSystemInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, interactionEventId, externalId, externalSystemId string) error // Deprecated, use events-platform LinkWithPartOfXXInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, interactionEventId string, partOfId string, partOfType PartOfType) error // Deprecated, use events-platform LinkWithRepliesToInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, interactionEventId, repliesToEventId string) error // Deprecated, use events-platform LinkWithSentXXParticipantInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entityType entity.EntityType, interactionEventId, participantId string, sentType *string, direction SendDirection) error // Deprecated, use events-platform LinkWithSentXXEmailInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, interactionEventId, email string, sentType *string, direction SendDirection) error // Deprecated, use events-platform LinkWithSentXXPhoneNumberInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, interactionEventId, e164 string, sentType *string, direction SendDirection) error Create(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, newInteractionEvent entity.InteractionEventEntity, source, sourceOfTruth neo4jentity.DataSource) (*dbtype.Node, error) }
func NewInteractionEventRepository ¶
func NewInteractionEventRepository(driver *neo4j.DriverWithContext, database string) InteractionEventRepository
type InteractionSessionRepository ¶
type InteractionSessionRepository interface { GetAllForInteractionEvents(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) Create(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entity *entity.InteractionSessionEntity) (*dbtype.Node, error) GetAttendedByParticipantsForInteractionSessions(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeWithRelationAndId, error) LinkWithAttendedByEmailInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, interactionSessionId, email string, sentType *string) error LinkWithAttendedByPhoneNumberInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, interactionSessionId, e164 string, sentType *string) error LinkWithAttendedByParticipantInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entityType entity.EntityType, interactionSessionId, participantId string, sentType *string) error }
func NewInteractionSessionRepository ¶
func NewInteractionSessionRepository(driver *neo4j.DriverWithContext) InteractionSessionRepository
type IssueRepository ¶
type IssueRepository interface { GetIssueCountByStatusForOrganization(ctx context.Context, tenant, organizationId string) (map[string]int64, error) GetById(ctx context.Context, tenant, issueId string) (*dbtype.Node, error) GetAllForInteractionEvents(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) GetSubmitterParticipantsForIssues(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) GetReporterParticipantsForIssues(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) GetAssigneeParticipantsForIssues(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) GetFollowerParticipantsForIssues(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) }
func NewIssueRepository ¶
func NewIssueRepository(driver *neo4j.DriverWithContext, database string) IssueRepository
type JobRoleRepository ¶
type JobRoleRepository interface { GetAllForContact(ctx context.Context, session neo4j.SessionWithContext, tenant, contactId string) ([]*dbtype.Node, error) GetAllForContacts(ctx context.Context, tenant string, contactIds []string) ([]*utils.DbNodeAndId, error) GetAllForOrganization(ctx context.Context, session neo4j.SessionWithContext, tenant, organizationId string) ([]*dbtype.Node, error) GetAllForOrganizations(ctx context.Context, tenant string, organizationIds []string) ([]*utils.DbNodeAndId, error) DeleteJobRoleInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId, roleId string) error SetOtherJobRolesForContactNonPrimaryInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId, skipRoleId string) error CreateJobRole(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId string, input entity.JobRoleEntity) (*dbtype.Node, error) UpdateJobRoleDetails(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId, roleId string, input entity.JobRoleEntity) (*dbtype.Node, error) LinkWithOrganization(ctx context.Context, tx neo4j.ManagedTransaction, tenant, roleId, organizationId string) error GetAllForUsers(ctx context.Context, tenant string, userIds []string) ([]*utils.DbNodeAndId, error) }
func NewJobRoleRepository ¶
func NewJobRoleRepository(driver *neo4j.DriverWithContext) JobRoleRepository
type LinkedNature ¶
type LinkedNature string
type LinkedWith ¶
type LinkedWith string
type LocationRepository ¶
type LocationRepository interface { GetAllForContact(ctx context.Context, tenant, contactId string) ([]*dbtype.Node, error) GetAllForContacts(ctx context.Context, tenant string, contactIds []string) ([]*utils.DbNodeAndId, error) GetAllForOrganization(ctx context.Context, tenant, organizationId string) ([]*dbtype.Node, error) GetAllForOrganizations(ctx context.Context, tenant string, organizationIds []string) ([]*utils.DbNodeAndId, error) CreateLocationForEntity(ctx context.Context, fromContext string, entityType entity.EntityType, id string, source entity.SourceFields) (*dbtype.Node, error) Update(ctx context.Context, tenant string, locationEntity entity.LocationEntity) (*dbtype.Node, error) RemoveRelationshipAndDeleteOrphans(ctx context.Context, entityType entity.EntityType, entityId, locationId string) error }
func NewLocationRepository ¶
func NewLocationRepository(driver *neo4j.DriverWithContext) LocationRepository
type MeetingRepository ¶
type MeetingRepository interface { Create(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entity *entity.MeetingEntity) (*dbtype.Node, error) Update(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entity *entity.MeetingEntity) (*dbtype.Node, error) LinkWithParticipantInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, meetingId, participantId string, entityType entity.EntityType, relation entity.MeetingRelation) error UnlinkParticipantInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, meetingId, participantId string, entityType entity.EntityType, relation entity.MeetingRelation) error GetParticipantsForMeetings(ctx context.Context, tenant string, ids []string, relation entity.MeetingRelation) ([]*utils.DbNodeWithRelationAndId, error) GetMeetingForInteractionEvent(ctx context.Context, tenant string, id string) (*dbtype.Node, error) GetAllForInteractionEvents(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) GetPaginatedMeetings(ctx context.Context, session neo4j.SessionWithContext, externalSystemID string, externalID *string, tenant, userEmail string, skip, limit int, filter *utils.CypherFilter, sort *utils.CypherSort) (*utils.DbNodesWithTotalCount, error) }
func NewMeetingRepository ¶
func NewMeetingRepository(driver *neo4j.DriverWithContext) MeetingRepository
type NoteDbNodeWithParentId ¶
type NoteDbNodesWithTotalCount ¶
type NoteDbNodesWithTotalCount struct { Nodes []*NoteDbNodeWithParentId Count int64 }
type NoteRepository ¶
type NoteRepository interface { GetPaginatedNotesForContact(ctx context.Context, tenant, contactId string, skip, limit int) (*NoteDbNodesWithTotalCount, error) GetTimeRangeNotesForContact(ctx context.Context, session neo4j.SessionWithContext, tenant, contactId string, start, end time.Time) ([]*neo4j.Node, error) GetNotesForMeetings(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) CreateNoteForContact(ctx context.Context, tenant, contactId string, entity entity.NoteEntity) (*dbtype.Node, error) CreateNoteForOrganization(ctx context.Context, tenant, organization string, entity entity.NoteEntity) (*dbtype.Node, error) CreateNoteForMeeting(ctx context.Context, tenant, meeting string, entity *entity.NoteEntity) (*dbtype.Node, error) CreateNoteForMeetingTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, meeting string, entity *entity.NoteEntity) (*dbtype.Node, error) UpdateNote(ctx context.Context, session neo4j.SessionWithContext, tenant string, entity entity.NoteEntity) (*dbtype.Node, error) Delete(ctx context.Context, tenant, noteId string) error SetNoteCreator(ctx context.Context, tenant, userId, noteId string) error GetNotedEntitiesForNotes(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) }
func NewNoteRepository ¶
func NewNoteRepository(driver *neo4j.DriverWithContext) NoteRepository
type OrganizationRepository ¶
type OrganizationRepository interface { CountOrganizations(ctx context.Context, tenant string) (int64, error) CountCustomers(ctx context.Context, tenant string) (int64, error) GetPaginatedOrganizations(ctx context.Context, tenant string, skip, limit int, filter *utils.CypherFilter, sorting *utils.CypherSort) (*utils.DbNodesWithTotalCount, error) GetPaginatedOrganizationsForContact(ctx context.Context, tenant, contactId string, skip, limit int, filter *utils.CypherFilter, sorting *utils.CypherSort) (*utils.DbNodesWithTotalCount, error) Archive(ctx context.Context, organizationId string) error MergeOrganizationPropertiesInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, primaryOrganizationId, mergedOrganizationId string, sourceOfTruth neo4jentity.DataSource) error MergeOrganizationRelationsInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, primaryOrganizationId, mergedOrganizationId string) error UpdateMergedOrganizationLabelsInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, mergedOrganizationId string) error GetAllForEmails(ctx context.Context, tenant string, emailIds []string) ([]*utils.DbNodeAndId, error) GetAllForPhoneNumbers(ctx context.Context, tenant string, phoneNumberIds []string) ([]*utils.DbNodeAndId, error) GetAllForJobRoles(ctx context.Context, tenant string, jobRoleIds []string) ([]*utils.DbNodeAndId, error) GetLinkedSubOrganizations(ctx context.Context, tenant string, parentOrganizationIds []string, relationName string) ([]*utils.DbNodeWithRelationAndId, error) GetLinkedParentOrganizations(ctx context.Context, tenant string, organizationIds []string, relationName string) ([]*utils.DbNodeWithRelationAndId, error) RemoveOwner(ctx context.Context, tenant, organizationId string) (*dbtype.Node, error) GetSuggestedMergePrimaryOrganizations(ctx context.Context, organizationIds []string) ([]*utils.DbNodeWithRelationAndId, error) GetMinMaxRenewalForecastArr(ctx context.Context) (float64, float64, error) GetOrganizations(ctx context.Context, tenant string, ids []string) ([]*dbtype.Node, error) }
func NewOrganizationRepository ¶
func NewOrganizationRepository(driver *neo4j.DriverWithContext, database string) OrganizationRepository
type PartOfType ¶
type PartOfType string
const ( PART_OF_INTERACTION_SESSION PartOfType = "InteractionSession" PART_OF_MEETING PartOfType = "Meeting" )
type PhoneNumberRepository ¶
type PhoneNumberRepository interface { GetAllForIds(ctx context.Context, tenant string, entityType entity.EntityType, entityIds []string) ([]*utils.DbNodeWithRelationAndId, error) GetByIdAndRelatedEntity(ctx context.Context, entityType entity.EntityType, tenant, phoneNumberId, entityId string) (*dbtype.Node, error) MergePhoneNumberToInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entityType entity.EntityType, entityId string, phoneNumberEntity entity.PhoneNumberEntity) (*dbtype.Node, *dbtype.Relationship, error) UpdatePhoneNumberForInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entityType entity.EntityType, entityId string, phoneNumberEntity entity.PhoneNumberEntity) (*dbtype.Node, *dbtype.Relationship, error) SetOtherPhoneNumbersNonPrimaryInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant string, entityType entity.EntityType, entityId, phoneNumberId string) error RemoveRelationship(ctx context.Context, entityType entity.EntityType, tenant, entityId, phoneNumber string) error RemoveRelationshipById(ctx context.Context, entityType entity.EntityType, tenant, entityId, phoneNumberId string) error Exists(ctx context.Context, tenant string, e164 string) (bool, error) GetByPhoneNumber(ctx context.Context, tenant, e164 string) (*dbtype.Node, error) GetById(ctx context.Context, phoneNumberId string) (*dbtype.Node, error) LinkWithCountryInTx(ctx context.Context, tx neo4j.ManagedTransaction, phoneNumberId, countryCodeA2 string) error }
func NewPhoneNumberRepository ¶
func NewPhoneNumberRepository(driver *neo4j.DriverWithContext) PhoneNumberRepository
type PlayerRepository ¶
type PlayerRepository interface { Merge(ctx context.Context, tx neo4j.ManagedTransaction, entity *entity.PlayerEntity) (*dbtype.Node, error) Update(ctx context.Context, tx neo4j.ManagedTransaction, entity *entity.PlayerEntity) (*dbtype.Node, error) SetDefaultUserInTx(ctx context.Context, tx neo4j.ManagedTransaction, playerId, userId string, relation entity.PlayerRelation) (*dbtype.Node, error) LinkWithUserInTx(ctx context.Context, tx neo4j.ManagedTransaction, playerId, userId, userTenant string, relation entity.PlayerRelation) error UnlinkUserInTx(ctx context.Context, tx neo4j.ManagedTransaction, playerId, userId, userTenant string, relation entity.PlayerRelation) error GetUsersForPlayer(ctx context.Context, ids []string) ([]*utils.DbNodeWithRelationIdAndTenant, error) GetPlayerByAuthIdProvider(ctx context.Context, authId string, provider string) (*dbtype.Node, error) GetPlayerByIdentityId(ctx context.Context, identityId string) (*dbtype.Node, error) GetPlayerForUser(ctx context.Context, tenant string, userId string, relation entity.PlayerRelation) (*dbtype.Node, error) }
func NewPlayerRepository ¶
func NewPlayerRepository(driver *neo4j.DriverWithContext) PlayerRepository
type Repositories ¶
type Repositories struct { Drivers Drivers Neo4jRepositories *neo4jrepository.Repositories PostgresRepositories *postgresRepository.Repositories //Deprecated OrganizationRepository OrganizationRepository //Deprecated ContactRepository ContactRepository //Deprecated CustomFieldTemplateRepository CustomFieldTemplateRepository //Deprecated CustomFieldRepository CustomFieldRepository //Deprecated EntityTemplateRepository EntityTemplateRepository //Deprecated FieldSetTemplateRepository FieldSetTemplateRepository //Deprecated FieldSetRepository FieldSetRepository //Deprecated UserRepository UserRepository //Deprecated ExternalSystemRepository ExternalSystemRepository //Deprecated NoteRepository NoteRepository //Deprecated JobRoleRepository JobRoleRepository //Deprecated CalendarRepository CalendarRepository LocationRepository LocationRepository //Deprecated EmailRepository EmailRepository //Deprecated PhoneNumberRepository PhoneNumberRepository //Deprecated TagRepository TagRepository //Deprecated SearchRepository SearchRepository //Deprecated DashboardRepository DashboardRepository //Deprecated DomainRepository DomainRepository //Deprecated IssueRepository IssueRepository //Deprecated InteractionEventRepository InteractionEventRepository //Deprecated InteractionSessionRepository InteractionSessionRepository //Deprecated AnalysisRepository AnalysisRepository //Deprecated AttachmentRepository AttachmentRepository //Deprecated MeetingRepository MeetingRepository //Deprecated TenantRepository TenantRepository //Deprecated WorkspaceRepository WorkspaceRepository //Deprecated SocialRepository SocialRepository //Deprecated PlayerRepository PlayerRepository //Deprecated ActionRepository ActionRepository //Deprecated ActionItemRepository ActionItemRepository }
func InitRepos ¶
func InitRepos(driver *neo4j.DriverWithContext, database string, gormDb *gorm.DB) *Repositories
type SearchRepository ¶
type SearchRepository interface {
GCliSearch(ctx context.Context, tenant, keyword string, limit int) ([]*db.Record, error)
}
func NewSearchRepository ¶
func NewSearchRepository(driver *neo4j.DriverWithContext) SearchRepository
type SendDirection ¶
type SendDirection string
const ( SENT_TO SendDirection = "SENT_TO" SENT_BY SendDirection = "SENT_BY" )
type SocialRepository ¶
type SocialRepository interface { CreateSocialForEntity(ctx context.Context, tenant string, linkedEntityType entity.EntityType, linkedEntityId string, socialEntity neo4jentity.SocialEntity) (*dbtype.Node, error) Update(ctx context.Context, tenant string, socialEntity neo4jentity.SocialEntity) (*dbtype.Node, error) GetAllForEntities(ctx context.Context, tenant string, linkedEntityType entity.EntityType, linkedEntityIds []string) ([]*utils.DbNodeAndId, error) }
func NewSocialRepository ¶
func NewSocialRepository(driver *neo4j.DriverWithContext) SocialRepository
type TagRepository ¶
type TagRepository interface { Merge(ctx context.Context, tenant string, tag neo4jentity.TagEntity) (*dbtype.Node, error) Update(ctx context.Context, tenant string, tag neo4jentity.TagEntity) (*dbtype.Node, error) UnlinkAndDelete(ctx context.Context, tenant string, tagId string) error }
func NewTagRepository ¶
func NewTagRepository(driver *neo4j.DriverWithContext) TagRepository
type TenantRepository ¶
type TenantRepository interface { Merge(ctx context.Context, tenant neo4jentity.TenantEntity) (*dbtype.Node, error) LinkWithWorkspace(ctx context.Context, tenant string, workspace entity.WorkspaceEntity) (bool, error) }
func NewTenantRepository ¶
func NewTenantRepository(driver *neo4j.DriverWithContext) TenantRepository
type UserRepository ¶
type UserRepository interface { FindUserByEmail(ctx context.Context, tenant string, email string) (*dbtype.Node, error) IsOwner(parentCtx context.Context, tx neo4j.ManagedTransaction, tenant, userId string) (*bool, error) GetOwnerForContact(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId string) (*dbtype.Node, error) GetCreatorForNote(ctx context.Context, tx neo4j.ManagedTransaction, tenant, noteId string) (*dbtype.Node, error) GetPaginatedCustomerUsers(ctx context.Context, session neo4j.SessionWithContext, tenant string, skip, limit int, filter *utils.CypherFilter, sort *utils.CypherSort) (*utils.DbNodesWithTotalCount, error) GetAllForEmails(ctx context.Context, tenant string, emailIds []string) ([]*utils.DbNodeAndId, error) GetAllForPhoneNumbers(ctx context.Context, tenant string, phoneNumberIds []string) ([]*utils.DbNodeAndId, error) GetAllOwnersForOrganizations(ctx context.Context, tenant string, organizationIDs []string) ([]*utils.DbNodeAndId, error) GetAllOwnersForOpportunities(ctx context.Context, tenant string, opportunityIds []string) ([]*utils.DbNodeAndId, error) GetAllCreatorsForOpportunities(ctx context.Context, tenant string, opportunityIds []string) ([]*utils.DbNodeAndId, error) GetAllCreatorsForServiceLineItems(ctx context.Context, tenant string, serviceLineItemIds []string) ([]*utils.DbNodeAndId, error) GetAllCreatorsForContracts(ctx context.Context, tenant string, contractIds []string) ([]*utils.DbNodeAndId, error) GetAllAuthorsForLogEntries(ctx context.Context, tenant string, logEntryIDs []string) ([]*utils.DbNodeAndId, error) GetAllAuthorsForComments(ctx context.Context, tenant string, commentIds []string) ([]*utils.DbNodeAndId, error) GetDistinctOrganizationOwners(ctx context.Context, tenant string) ([]*dbtype.Node, error) GetUsers(ctx context.Context, tenant string, ids []string) ([]*dbtype.Node, error) GetOwnerForContract(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contractId string) (*dbtype.Node, error) GetOwnerForReminder(ctx context.Context, tx neo4j.ManagedTransaction, tenant, reminderId string) (*dbtype.Node, error) }
func NewUserRepository ¶
func NewUserRepository(driver *neo4j.DriverWithContext, database string) UserRepository
type WorkspaceRepository ¶
type WorkspaceRepository interface {
Merge(ctx context.Context, workspace entity.WorkspaceEntity) (*dbtype.Node, error)
}
func NewWorkspaceRepository ¶
func NewWorkspaceRepository(driver *neo4j.DriverWithContext) WorkspaceRepository
Source Files ¶
- action_item_repository.go
- action_repository.go
- analysis_repository.go
- attachment_repository.go
- calendar_repository.go
- contact_repository.go
- custom_field_repository.go
- custom_field_template_repository.go
- dashboard_repository.go
- domain_repository.go
- email_repository.go
- entity_template_repository.go
- external_system_repository.go
- field_set_repository.go
- field_set_template_repository.go
- interaction_event_repository.go
- interaction_session_repository.go
- issue_repository.go
- job_role_repository.go
- link_with.go
- location_repository.go
- meeting_repository.go
- note_repository.go
- organization_repository.go
- phone_number_repository.go
- player_repository.go
- repositories.go
- search_repository.go
- social_repository.go
- tag_repository.go
- tenant_repository.go
- user_repository.go
- workspace_repository.go
Click to show internal directories.
Click to hide internal directories.