Documentation ¶
Index ¶
- type ActionReadRepository
- type ActionWriteRepository
- type AddressDetails
- type BankAccountCreateFields
- type BankAccountReadRepository
- type BankAccountUpdateFields
- type BankAccountWriteRepository
- type BillingProfileCreateFields
- type BillingProfileUpdateFields
- type BillingProfileWriteRepository
- type CommentCreateFields
- type CommentReadRepository
- type CommentUpdateFields
- type CommentWriteRepository
- type CommonReadRepository
- type ContactCreateFields
- type ContactUpdateFields
- type ContactWriteRepository
- type ContractCreateFields
- type ContractReadRepository
- type ContractUpdateFields
- type ContractWriteRepository
- type CountryReadRepository
- type CountryWriteRepository
- type CustomFieldCreateFields
- type CustomFieldWriteRepository
- type DomainReadRepository
- type DomainWriteRepository
- type EmailCreateFields
- type EmailReadRepository
- type EmailValidatedFields
- type EmailWriteRepository
- type ExternalSystemReadRepository
- type ExternalSystemWriteRepository
- type InteractionEventCreateFields
- type InteractionEventReadRepository
- type InteractionEventUpdateFields
- type InteractionEventWriteRepository
- type InteractionSessionCreateFields
- type InteractionSessionWriteRepository
- type InvoiceCreateFields
- type InvoiceFillFields
- type InvoiceLineCreateFields
- type InvoiceLineReadRepository
- type InvoiceLineWriteRepository
- type InvoiceReadRepository
- type InvoiceUpdateFields
- type InvoiceWriteRepository
- type InvoicingCycleReadRepository
- type InvoicingCycleWriteRepository
- type IssueCreateFields
- type IssueReadRepository
- type IssueUpdateFields
- type IssueWriteRepository
- type JobRoleCreateFields
- type JobRoleWriteRepository
- type LocationCreateFields
- type LocationUpdateFields
- type LocationWriteRepository
- type LogEntryCreateFields
- type LogEntryReadRepository
- type LogEntryUpdateFields
- type LogEntryWriteRepository
- type MasterPlanMilestoneUpdateFields
- type MasterPlanReadRepository
- type MasterPlanUpdateFields
- type MasterPlanWriteRepository
- type OfferingCreateFields
- type OfferingReadRepository
- type OfferingUpdateFields
- type OfferingWriteRepository
- type OpportunityCreateFields
- type OpportunityReadRepository
- type OpportunityUpdateFields
- type OpportunityWriteRepository
- type OrderReadRepository
- type OrderWriteRepository
- type OrganizationCreateFields
- type OrganizationPlanMilestoneUpdateFields
- type OrganizationPlanReadRepository
- type OrganizationPlanUpdateFields
- type OrganizationPlanWriteRepository
- type OrganizationReadRepository
- type OrganizationUpdateFields
- type OrganizationWriteRepository
- type PhoneNumberCreateFields
- type PhoneNumberReadRepository
- type PhoneNumberValidateFields
- type PhoneNumberWriteRepository
- type PlayerFields
- type PlayerWriteRepository
- type ReminderReadRepository
- type ReminderUpdateFields
- type ReminderWriteRepository
- type RenewalOpportunityCreateFields
- type RenewalOpportunityUpdateFields
- type Repositories
- type ServiceLineItemCreateFields
- type ServiceLineItemReadRepository
- type ServiceLineItemUpdateFields
- type ServiceLineItemWriteRepository
- type SocialFields
- type SocialWriteRepository
- type StateReadRepository
- type TagReadRepository
- type TagWriteRepository
- type TenantAndContractId
- type TenantAndOpportunityId
- type TenantBillingProfileCreateFields
- type TenantBillingProfileUpdateFields
- type TenantReadRepository
- type TenantSettingsFields
- type TenantWriteRepository
- type TimelineEventReadRepository
- type UserCreateFields
- type UserReadRepository
- type UserUpdateFields
- type UserWriteRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionReadRepository ¶
type ActionReadRepository interface {
GetSingleAction(ctx context.Context, tenant, entityId string, entityType enum.EntityType, actionType enum.ActionType) (*dbtype.Node, error)
}
func NewActionReadRepository ¶
func NewActionReadRepository(driver *neo4j.DriverWithContext, database string) ActionReadRepository
type ActionWriteRepository ¶
type ActionWriteRepository interface { Create(ctx context.Context, tenant, entityId string, entityType enum.EntityType, actionType enum.ActionType, content, metadata string, createdAt time.Time, appSource string) (*dbtype.Node, error) CreateWithProperties(ctx context.Context, tenant, entityId string, entityType enum.EntityType, actionType enum.ActionType, content, metadata string, createdAt time.Time, appSource string, extraProperties map[string]any) (*dbtype.Node, error) MergeByActionType(ctx context.Context, tenant, entityId string, entityType enum.EntityType, actionType enum.ActionType, content, metadata string, createdAt time.Time, appSource string) (*dbtype.Node, error) }
func NewActionWriteRepository ¶
func NewActionWriteRepository(driver *neo4j.DriverWithContext, database string) ActionWriteRepository
type AddressDetails ¶
type AddressDetails struct { Latitude *float64 `json:"latitude"` Longitude *float64 `json:"longitude"` Country string `json:"country"` Region string `json:"region"` District string `json:"district"` Locality string `json:"locality"` Street string `json:"street"` Address string `json:"address"` Address2 string `json:"address2"` Zip string `json:"zip"` AddressType string `json:"addressType"` HouseNumber string `json:"houseNumber"` PostalCode string `json:"postalCode"` PlusFour string `json:"plusFour"` Commercial bool `json:"commercial"` Predirection string `json:"predirection"` TimeZone string `json:"timeZone"` UtcOffset int `json:"utcOffset"` }
type BankAccountCreateFields ¶
type BankAccountCreateFields struct { Id string `json:"id"` CreatedAt time.Time `json:"createdAt"` SourceFields model.Source `json:"sourceFields"` BankName string `json:"bankName"` BankTransferEnabled bool `json:"bankTransferEnabled"` AllowInternational bool `json:"allowInternational"` Currency enum.Currency `json:"currency"` Iban string `json:"iban"` Bic string `json:"bic"` SortCode string `json:"sortCode"` AccountNumber string `json:"accountNumber"` RoutingNumber string `json:"routingNumber"` OtherDetails string `json:"otherDetails"` }
type BankAccountReadRepository ¶
type BankAccountReadRepository interface { GetBankAccounts(ctx context.Context, tenant string) ([]*dbtype.Node, error) GetBankAccountById(ctx context.Context, tenant, id string) (*dbtype.Node, error) }
func NewBankAccountReadRepository ¶
func NewBankAccountReadRepository(driver *neo4j.DriverWithContext, database string) BankAccountReadRepository
type BankAccountUpdateFields ¶
type BankAccountUpdateFields struct { Id string `json:"id"` UpdatedAt time.Time `json:"updatedAt"` BankName string `json:"bankName"` BankTransferEnabled bool `json:"bankTransferEnabled"` AllowInternational bool `json:"allowInternational"` Currency enum.Currency `json:"currency"` Iban string `json:"iban"` Bic string `json:"bic"` SortCode string `json:"sortCode"` AccountNumber string `json:"accountNumber"` RoutingNumber string `json:"routingNumber"` OtherDetails string `json:"otherDetails"` UpdateBankName bool `json:"updateBankName"` UpdateBankTransferEnabled bool `json:"updateBankTransferEnabled"` UpdateAllowInternational bool `json:"updateAllowInternational"` UpdateCurrency bool `json:"updateCurrency"` UpdateIban bool `json:"updateIban"` UpdateBic bool `json:"updateBic"` UpdateSortCode bool `json:"updateSortCode"` UpdateAccountNumber bool `json:"updateAccountNumber"` UpdateRoutingNumber bool `json:"updateRoutingNumber"` UpdateOtherDetails bool `json:"updateOtherDetails"` }
type BankAccountWriteRepository ¶
type BankAccountWriteRepository interface { CreateBankAccount(ctx context.Context, tenant string, data BankAccountCreateFields) error UpdateBankAccount(ctx context.Context, tenant string, data BankAccountUpdateFields) error DeleteBankAccount(ctx context.Context, tenant, id string) error }
func NewBankAccountWriteRepository ¶
func NewBankAccountWriteRepository(driver *neo4j.DriverWithContext, database string) BankAccountWriteRepository
type BillingProfileWriteRepository ¶
type BillingProfileWriteRepository interface { Create(ctx context.Context, tenant, billingProfileId string, data BillingProfileCreateFields) error Update(ctx context.Context, tenant, billingProfileId string, data BillingProfileUpdateFields) error LinkEmailToBillingProfile(ctx context.Context, tenant, organizationId, billingProfileId, emailId string, primary bool, updatedAt time.Time) error UnlinkEmailFromBillingProfile(ctx context.Context, tenant, organizationId, billingProfileId, emailId string, updatedAt time.Time) error LinkLocationToBillingProfile(ctx context.Context, tenant, organizationId, billingProfileId, locationId string, updatedAt time.Time) error UnlinkLocationFromBillingProfile(ctx context.Context, tenant, organizationId, billingProfileId, locationId string, updatedAt time.Time) error }
func NewBillingProfileWriteRepository ¶
func NewBillingProfileWriteRepository(driver *neo4j.DriverWithContext, database string) BillingProfileWriteRepository
type CommentCreateFields ¶
type CommentCreateFields struct { Content string `json:"content"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` ContentType string `json:"contentType"` AuthorUserId string `json:"authorUserId"` CommentedIssueId string `json:"commentedIssueId"` SourceFields model.Source `json:"sourceFields"` }
type CommentReadRepository ¶
type CommentReadRepository interface {
GetAllForIssues(ctx context.Context, tenant string, issueIds []string) ([]*utils.DbNodeAndId, error)
}
func NewCommentReadRepository ¶
func NewCommentReadRepository(driver *neo4j.DriverWithContext, database string) CommentReadRepository
type CommentUpdateFields ¶
type CommentWriteRepository ¶
type CommentWriteRepository interface { Create(ctx context.Context, tenant, commentId string, data CommentCreateFields) error Update(ctx context.Context, tenant, commentId string, data CommentUpdateFields) error }
func NewCommentWriteRepository ¶
func NewCommentWriteRepository(driver *neo4j.DriverWithContext, database string) CommentWriteRepository
type CommonReadRepository ¶
type CommonReadRepository interface { ExistsById(ctx context.Context, tenant, id, label string) (bool, error) ExistsByIdLinkedTo(ctx context.Context, tenant, id, label, linkedToId, linkedToLabel, linkRelationship string) (bool, error) ExistsByIdLinkedFrom(ctx context.Context, tenant, id, label, linkedFromId, linkedFromLabel, linkRelationship string) (bool, error) }
func NewCommonReadRepository ¶
func NewCommonReadRepository(driver *neo4j.DriverWithContext, database string) CommonReadRepository
type ContactCreateFields ¶
type ContactCreateFields struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Prefix string `json:"prefix"` Description string `json:"description"` Timezone string `json:"timezone"` ProfilePhotoUrl string `json:"profilePhotoUrl"` Name string `json:"name"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` SourceFields model.Source `json:"sourceFields"` }
type ContactUpdateFields ¶
type ContactUpdateFields struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Prefix string `json:"prefix"` Description string `json:"description"` Timezone string `json:"timezone"` ProfilePhotoUrl string `json:"profilePhotoUrl"` Name string `json:"name"` UpdatedAt time.Time `json:"updatedAt"` Source string `json:"source"` UpdateFirstName bool `json:"updateFirstName"` UpdateLastName bool `json:"updateLastName"` UpdateName bool `json:"updateName"` UpdatePrefix bool `json:"updatePrefix"` UpdateDescription bool `json:"updateDescription"` UpdateTimezone bool `json:"updateTimezone"` UpdateProfilePhotoUrl bool `json:"updateProfilePhotoUrl"` }
type ContactWriteRepository ¶
type ContactWriteRepository interface { CreateContact(ctx context.Context, tenant, contactId string, data ContactCreateFields) error CreateContactInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, contactId string, data ContactCreateFields) error UpdateContact(ctx context.Context, tenant, contactId string, data ContactUpdateFields) error }
func NewContactWriteRepository ¶
func NewContactWriteRepository(driver *neo4j.DriverWithContext, database string) ContactWriteRepository
type ContractCreateFields ¶
type ContractCreateFields struct { OrganizationId string `json:"organizationId"` Name string `json:"name"` ContractUrl string `json:"contractUrl"` CreatedByUserId string `json:"createdByUserId"` ServiceStartedAt *time.Time `json:"serviceStartedAt,omitempty"` SignedAt *time.Time `json:"signedAt,omitempty"` LengthInMonths int64 `json:"lengthInMonths"` Status string `json:"status"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` SourceFields model.Source `json:"sourceFields"` BillingCycleInMonths int64 `json:"billingCycleInMonths"` Currency neo4jenum.Currency `json:"currency"` InvoicingStartDate *time.Time `json:"invoicingStartDate,omitempty"` InvoicingEnabled bool `json:"invoicingEnabled"` PayOnline bool `json:"payOnline"` PayAutomatically bool `json:"payAutomatically"` CanPayWithCard bool `json:"canPayWithCard"` CanPayWithDirectDebit bool `json:"canPayWithDirectDebit"` CanPayWithBankTransfer bool `json:"canPayWithBankTransfer"` AutoRenew bool `json:"autoRenew"` Check bool `json:"check"` DueDays int64 `json:"dueDays"` Country string `json:"country"` Approved bool `json:"approved"` }
type ContractReadRepository ¶
type ContractReadRepository interface { GetContractById(ctx context.Context, tenant, contractId string) (*dbtype.Node, error) GetContractByServiceLineItemId(ctx context.Context, tenant, serviceLineItemId string) (*dbtype.Node, error) GetContractByOpportunityId(ctx context.Context, tenant string, opportunityId string) (*dbtype.Node, error) GetContractsForOrganizations(ctx context.Context, tenant string, organizationIds []string) ([]*utils.DbNodeAndId, error) GetContractForInvoice(ctx context.Context, tenant string, invoiceId string) (*dbtype.Node, error) GetContractsForInvoices(ctx context.Context, tenant string, invoiceIds []string) ([]*utils.DbNodeAndId, error) TenantsHasAtLeastOneContract(ctx context.Context, tenant string) (bool, error) CountContracts(ctx context.Context, tenant string) (int64, error) GetContractsToGenerateCycleInvoices(ctx context.Context, referenceTime time.Time, delayMinutes int) ([]*utils.DbNodeAndTenant, error) GetContractsToGenerateOffCycleInvoices(ctx context.Context, referenceTime time.Time, delayMinutes int) ([]*utils.DbNodeAndTenant, error) GetContractsToGenerateNextScheduledInvoices(ctx context.Context, referenceTime time.Time, delayMinutes int) ([]*utils.DbNodeAndTenant, error) GetContractsForStatusRenewal(ctx context.Context, referenceTime time.Time) ([]TenantAndContractId, error) GetContractsForRenewalRollout(ctx context.Context, referenceTime time.Time) ([]TenantAndContractId, error) IsContractInvoiced(ctx context.Context, tenant, contractId string) (bool, error) }
func NewContractReadRepository ¶
func NewContractReadRepository(driver *neo4j.DriverWithContext, database string) ContractReadRepository
type ContractUpdateFields ¶
type ContractUpdateFields struct { Name string `json:"name"` ContractUrl string `json:"contractUrl"` Status string `json:"status"` Source string `json:"source"` LengthInMonths int64 `json:"lengthInMonths"` UpdatedAt time.Time `json:"updatedAt"` ServiceStartedAt *time.Time `json:"serviceStartedAt"` SignedAt *time.Time `json:"signedAt"` EndedAt *time.Time `json:"endedAt"` BillingCycleInMonths int64 `json:"billingCycleInMonths"` Currency neo4jenum.Currency `json:"currency"` InvoicingStartDate *time.Time `json:"invoicingStartDate,omitempty"` NextInvoiceDate *time.Time `json:"nextInvoiceDate,omitempty"` AddressLine1 string `json:"addressLine1"` AddressLine2 string `json:"addressLine2"` Locality string `json:"locality"` Country string `json:"country"` Region string `json:"region"` Zip string `json:"zip"` OrganizationLegalName string `json:"organizationLegalName"` InvoiceEmail string `json:"invoiceEmail"` InvoiceEmailCC []string `json:"invoiceEmailCC"` InvoiceEmailBCC []string `json:"invoiceEmailBCC"` InvoiceNote string `json:"invoiceNote"` InvoicingEnabled bool `json:"invoicingEnabled"` PayOnline bool `json:"payOnline"` PayAutomatically bool `json:"payAutomatically"` CanPayWithCard bool `json:"canPayWithCard"` CanPayWithDirectDebit bool `json:"canPayWithDirectDebit"` CanPayWithBankTransfer bool `json:"canPayWithBankTransfer"` AutoRenew bool `json:"autoRenew"` DueDays int64 `json:"dueDays"` Check bool `json:"check"` Approved bool `json:"approved"` UpdateName bool `json:"updateName"` UpdateContractUrl bool `json:"updateContractUrl"` UpdateStatus bool `json:"updateStatus"` UpdateServiceStartedAt bool `json:"updateServiceStartedAt"` UpdateSignedAt bool `json:"updateSignedAt"` UpdateEndedAt bool `json:"updateEndedAt"` UpdateBillingCycleInMonths bool `json:"updateBillingCycleInMonths"` UpdateCurrency bool `json:"updateCurrency"` UpdateInvoicingStartDate bool `json:"updateInvoicingStartDate"` UpdateNextInvoiceDate bool `json:"updateNextInvoiceDate"` UpdateAddressLine1 bool `json:"updateAddressLine1"` UpdateAddressLine2 bool `json:"updateAddressLine2"` UpdateLocality bool `json:"updateLocality"` UpdateCountry bool `json:"updateCountry"` UpdateRegion bool `json:"updateRegion"` UpdateZip bool `json:"updateZip"` UpdateOrganizationLegalName bool `json:"updateOrganizationLegalName"` UpdateInvoiceEmail bool `json:"updateInvoiceEmail"` UpdateInvoiceEmailCC bool `json:"UpdateInvoiceEmailCC"` UpdateInvoiceEmailBCC bool `json:"UpdateInvoiceEmailBCC"` UpdateInvoiceNote bool `json:"updateInvoiceNote"` UpdateCanPayWithCard bool `json:"updateCanPayWithCard"` UpdateCanPayWithDirectDebit bool `json:"updateCanPayWithDirectDebit"` UpdateCanPayWithBankTransfer bool `json:"updateCanPayWithBankTransfer"` UpdateInvoicingEnabled bool `json:"updateInvoicingEnabled"` UpdatePayOnline bool `json:"updatePayOnline"` UpdatePayAutomatically bool `json:"updatePayAutomatically"` UpdateAutoRenew bool `json:"updateAutoRenew"` UpdateCheck bool `json:"updateCheck"` UpdateDueDays bool `json:"updateDueDays"` UpdateLengthInMonths bool `json:"updateLengthInMonths"` UpdateApproved bool `json:"updateApproved"` }
type ContractWriteRepository ¶
type ContractWriteRepository interface { CreateForOrganization(ctx context.Context, tenant, contractId string, data ContractCreateFields) error UpdateContract(ctx context.Context, tenant, contractId string, data ContractUpdateFields) error UpdateStatus(ctx context.Context, tenant, contractId, status string) error SuspendActiveRenewalOpportunity(ctx context.Context, tenant, contractId string) error ActivateSuspendedRenewalOpportunity(ctx context.Context, tenant, contractId string) error ContractCausedOnboardingStatusChange(ctx context.Context, tenant, contractId string) error MarkStatusRenewalRequested(ctx context.Context, tenant, contractId string) error MarkRolloutRenewalRequested(ctx context.Context, tenant, contractId string) error MarkCycleInvoicingRequested(ctx context.Context, tenant, contractId string, invoicingStartedAt time.Time) error MarkOffCycleInvoicingRequested(ctx context.Context, tenant, contractId string, invoicingStartedAt time.Time) error MarkNextPreviewInvoicingRequested(ctx context.Context, tenant, contractId string, invoicingStartedAt time.Time) error SoftDelete(ctx context.Context, tenant, contractId string, deletedAt time.Time) error }
func NewContractWriteRepository ¶
func NewContractWriteRepository(driver *neo4j.DriverWithContext, database string) ContractWriteRepository
type CountryReadRepository ¶
type CountryReadRepository interface { GetDefaultCountryCodeA3(ctx context.Context, tenant string) (string, error) GetCountryByCodeIfExists(ctx context.Context, code string) (*dbtype.Node, error) GetCountryByCodeA3IfExists(ctx context.Context, codeA3 string) (*dbtype.Node, error) GetCountryByCodeA2IfExists(ctx context.Context, codeA2 string) (*dbtype.Node, error) GetCountriesPaginated(ctx context.Context, skip, limit int) (*utils.DbNodesWithTotalCount, error) GetCountries(ctx context.Context) ([]*dbtype.Node, error) GetAllForPhoneNumbers(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) }
func NewCountryReadRepository ¶
func NewCountryReadRepository(driver *neo4j.DriverWithContext, database string) CountryReadRepository
type CountryWriteRepository ¶
type CountryWriteRepository interface { CreateCountry(ctx context.Context, id, name, codeA2, codeA3, phoneCode string, createdAt time.Time) error UpdateCountry(ctx context.Context, id, name, codeA2, codeA3, phoneCode string, updatedAt time.Time) error }
func NewCountryWriteRepository ¶
func NewCountryWriteRepository(driver *neo4j.DriverWithContext, database string) CountryWriteRepository
type CustomFieldCreateFields ¶
type CustomFieldCreateFields struct { CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` ExistsInEventStore bool `json:"existsInEventStore"` TemplateId *string `json:"templateId,omitempty"` CustomFieldId string `json:"customFieldId"` CustomFieldName string `json:"customFieldName"` CustomFieldDataType string `json:"customFieldDataType"` CustomFieldValue model.CustomFieldValue `json:"customFieldValue"` SourceFields model.Source `json:"sourceFields,omitempty"` }
type CustomFieldWriteRepository ¶
type CustomFieldWriteRepository interface {
AddCustomFieldToOrganization(ctx context.Context, tenant, organizationId string, data CustomFieldCreateFields) error
}
func NewCustomFieldWriteRepository ¶
func NewCustomFieldWriteRepository(driver *neo4j.DriverWithContext, database string) CustomFieldWriteRepository
type DomainReadRepository ¶
type DomainReadRepository interface {
GetDomain(ctx context.Context, domain string) (*dbtype.Node, error)
}
func NewDomainReadRepository ¶
func NewDomainReadRepository(driver *neo4j.DriverWithContext, database string) DomainReadRepository
type DomainWriteRepository ¶
type DomainWriteRepository interface {
CreateDomain(ctx context.Context, domain, source, appSource string, now time.Time) error
}
func NewDomainWriteRepository ¶
func NewDomainWriteRepository(driver *neo4j.DriverWithContext, database string) DomainWriteRepository
type EmailCreateFields ¶
type EmailReadRepository ¶
type EmailReadRepository interface { GetEmailIdIfExists(ctx context.Context, tenant, email string) (string, error) GetEmailForUser(ctx context.Context, tenant string, userId string) (*dbtype.Node, error) }
func NewEmailReadRepository ¶
func NewEmailReadRepository(driver *neo4j.DriverWithContext, database string) EmailReadRepository
type EmailValidatedFields ¶
type EmailValidatedFields struct { ValidationError string `json:"validationError"` EmailAddress string `json:"emailAddress"` Domain string `json:"domain"` AcceptsMail bool `json:"acceptsMail"` CanConnectSmtp bool `json:"canConnectSmtp"` HasFullInbox bool `json:"hasFullInbox"` IsCatchAll bool `json:"isCatchAll"` IsDeliverable bool `json:"isDeliverable"` IsDisabled bool `json:"isDisabled"` IsValidSyntax bool `json:"isValidSyntax"` Username string `json:"username"` ValidatedAt time.Time `json:"validatedAt"` IsReachable string `json:"isReachable"` }
type EmailWriteRepository ¶
type EmailWriteRepository interface { CreateEmail(ctx context.Context, tenant, emailId string, data EmailCreateFields) error UpdateEmail(ctx context.Context, tenant, emailId, source string, updatedAt time.Time) error FailEmailValidation(ctx context.Context, tenant, emailId, validationError string, validatedAt time.Time) error EmailValidated(ctx context.Context, tenant, emailId string, data EmailValidatedFields) error LinkWithContact(ctx context.Context, tenant, contactId, emailId, label string, primary bool, updatedAt time.Time) error LinkWithOrganization(ctx context.Context, tenant, organizationId, emailId, label string, primary bool, updatedAt time.Time) error LinkWithUser(ctx context.Context, tenant, userId, emailId, label string, primary bool, updatedAt time.Time) error }
func NewEmailWriteRepository ¶
func NewEmailWriteRepository(driver *neo4j.DriverWithContext, database string) EmailWriteRepository
type ExternalSystemReadRepository ¶
type ExternalSystemReadRepository interface { GetFirstExternalIdForLinkedEntity(ctx context.Context, tenant, externalSystemId, entityId, entityLabel string) (string, error) GetAllExternalIdsForLinkedEntity(ctx context.Context, tenant, externalSystemId, entityId, entityLabel string) ([]string, error) GetAllForTenant(ctx context.Context, tenant string) ([]*dbtype.Node, error) }
func NewExternalSystemReadRepository ¶
func NewExternalSystemReadRepository(driver *neo4j.DriverWithContext, database string) ExternalSystemReadRepository
type ExternalSystemWriteRepository ¶
type ExternalSystemWriteRepository interface { CreateIfNotExists(ctx context.Context, tenant, externalSystemId, externalSystemName string) error LinkWithEntity(ctx context.Context, tenant, linkedEntityId, linkedEntityNodeLabel string, externalSystem model.ExternalSystem) error LinkWithEntityInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, linkedEntityId, linkedEntityNodeLabel string, externalSystem model.ExternalSystem) error SetProperty(ctx context.Context, tenant, externalSystemId, propertyName string, propertyValue any) error }
func NewExternalSystemWriteRepository ¶
func NewExternalSystemWriteRepository(driver *neo4j.DriverWithContext, database string) ExternalSystemWriteRepository
type InteractionEventCreateFields ¶
type InteractionEventCreateFields struct { SourceFields model.Source `json:"sourceFields"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Content string `json:"content"` ContentType string `json:"contentType"` Channel string `json:"channel"` ChannelData string `json:"channelData"` Identifier string `json:"identifier"` EventType string `json:"eventType"` BelongsToIssueId string `json:"belongsToIssueId"` BelongsToSessionId string `json:"belongsToSessionId"` Hide bool `json:"hide"` }
type InteractionEventReadRepository ¶
type InteractionEventReadRepository interface {
GetInteractionEvent(ctx context.Context, tenant, interactionEventId string) (*dbtype.Node, error)
}
func NewInteractionEventReadRepository ¶
func NewInteractionEventReadRepository(driver *neo4j.DriverWithContext, database string) InteractionEventReadRepository
type InteractionEventUpdateFields ¶
type InteractionEventUpdateFields struct { UpdatedAt time.Time `json:"updatedAt"` Content string `json:"content"` ContentType string `json:"contentType"` Channel string `json:"channel"` ChannelData string `json:"channelData"` Identifier string `json:"identifier"` EventType string `json:"eventType"` Hide bool `json:"hide"` Source string `json:"source"` }
type InteractionEventWriteRepository ¶
type InteractionEventWriteRepository interface { Create(ctx context.Context, tenant, interactionEventId string, data InteractionEventCreateFields) error Update(ctx context.Context, tenant, interactionEventId string, data InteractionEventUpdateFields) error SetAnalysisForInteractionEvent(ctx context.Context, tenant, interactionEventId, content, contentType, analysisType, source, appSource string, updatedAt time.Time) error RemoveAllActionItemsForInteractionEvent(ctx context.Context, tenant, interactionEventId string) error AddActionItemForInteractionEvent(ctx context.Context, tenant, interactionEventId, content, source, appSource string, updatedAt time.Time) error LinkInteractionEventWithSenderById(ctx context.Context, tenant, interactionEventId, entityId, label, relationType string) error LinkInteractionEventWithReceiverById(ctx context.Context, tenant, interactionEventId, entityId, label, relationType string) error LinkInteractionEventToSession(ctx context.Context, tenant, interactionEventId, interactionSessionId string) error InteractionEventSentByEmail(ctx context.Context, tenant, interactionEventId, emailId string) error InteractionEventSentToEmails(ctx context.Context, tenant, interactionEventId, sentType string, emailsId []string) error }
func NewInteractionEventWriteRepository ¶
func NewInteractionEventWriteRepository(driver *neo4j.DriverWithContext, database string) InteractionEventWriteRepository
type InteractionSessionCreateFields ¶
type InteractionSessionCreateFields struct { CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` SourceFields model.Source `json:"sourceFields"` Channel string `json:"channel"` ChannelData string `json:"channelData"` Identifier string `json:"identifier"` Type string `json:"type"` Status string `json:"status"` Name string `json:"name"` }
type InteractionSessionWriteRepository ¶
type InteractionSessionWriteRepository interface {
Create(ctx context.Context, tenant, interactionSessionId string, data InteractionSessionCreateFields) error
}
func NewInteractionSessionWriteRepository ¶
func NewInteractionSessionWriteRepository(driver *neo4j.DriverWithContext, database string) InteractionSessionWriteRepository
type InvoiceCreateFields ¶
type InvoiceCreateFields struct { ContractId string `json:"contractId"` Currency neo4jenum.Currency `json:"currency"` DryRun bool `json:"dryRun"` OffCycle bool `json:"offCycle"` Postpaid bool `json:"postpaid"` Preview bool `json:"preview"` PeriodStartDate time.Time `json:"periodStartDate"` PeriodEndDate time.Time `json:"periodEndDate"` CreatedAt time.Time `json:"createdAt"` IssuedDate time.Time `json:"issuedDate"` DueDate time.Time `json:"dueDate"` SourceFields model.Source `json:"sourceFields"` BillingCycleInMonths int64 `json:"billingCycleInMonths"` Status neo4jenum.InvoiceStatus `json:"status"` Note string `json:"note"` }
type InvoiceFillFields ¶
type InvoiceFillFields struct { Amount float64 `json:"amount"` VAT float64 `json:"vat"` TotalAmount float64 `json:"totalAmount"` UpdatedAt time.Time `json:"updatedAt"` ContractId string `json:"contractId"` Currency neo4jenum.Currency `json:"currency"` DryRun bool `json:"dryRun"` OffCycle bool `json:"offCycle"` Postpaid bool `json:"postpaid"` Preview bool `json:"preview"` InvoiceNumber string `json:"invoiceNumber"` PeriodStartDate time.Time `json:"periodStartDate"` PeriodEndDate time.Time `json:"periodEndDate"` BillingCycleInMonths int64 `json:"billingCycleInMonths"` Status neo4jenum.InvoiceStatus `json:"status"` Note string `json:"note"` CustomerName string `json:"customerName"` CustomerEmail string `json:"customerEmail"` CustomerAddressLine1 string `json:"customerAddressLine1"` CustomerAddressLine2 string `json:"customerAddressLine2"` CustomerAddressZip string `json:"customerAddressZip"` CustomerAddressLocality string `json:"customerAddressLocality"` CustomerAddressCountry string `json:"customerAddressCountry"` CustomerAddressRegion string `json:"customerAddressRegion"` ProviderLogoRepositoryFileId string `json:"providerLogoRepositoryFileId"` ProviderName string `json:"providerName"` ProviderEmail string `json:"providerEmail"` ProviderAddressLine1 string `json:"providerAddressLine1"` ProviderAddressLine2 string `json:"providerAddressLine2"` ProviderAddressZip string `json:"providerAddressZip"` ProviderAddressLocality string `json:"providerAddressLocality"` ProviderAddressCountry string `json:"providerAddressCountry"` ProviderAddressRegion string `json:"providerAddressRegion"` }
type InvoiceLineCreateFields ¶
type InvoiceLineCreateFields struct { CreatedAt time.Time `json:"createdAt"` SourceFields model.Source `json:"sourceFields"` Name string `json:"name"` Price float64 `json:"price"` Quantity int64 `json:"quantity"` Amount float64 `json:"amount"` VAT float64 `json:"vat"` TotalAmount float64 `json:"totalAmount"` ServiceLineItemId string `json:"serviceLineItemId"` ServiceLineItemParentId string `json:"serviceLineItemParentId"` BilledType enum.BilledType `json:"billedType"` }
type InvoiceLineReadRepository ¶
type InvoiceLineReadRepository interface { GetAllForInvoice(ctx context.Context, tenant string, invoiceId string) ([]*dbtype.Node, error) GetAllForInvoices(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) GetLatestInvoiceLineWithInvoiceIdByServiceLineItemParentId(ctx context.Context, tenant, sliParentId string) (*utils.DbNodeAndId, error) }
func NewInvoiceLineReadRepository ¶
func NewInvoiceLineReadRepository(driver *neo4j.DriverWithContext, database string) InvoiceLineReadRepository
type InvoiceLineWriteRepository ¶
type InvoiceLineWriteRepository interface {
CreateInvoiceLine(ctx context.Context, tenant, invoiceId, invoiceLineId string, data InvoiceLineCreateFields) error
}
func NewInvoiceLineWriteRepository ¶
func NewInvoiceLineWriteRepository(driver *neo4j.DriverWithContext, database string) InvoiceLineWriteRepository
type InvoiceReadRepository ¶
type InvoiceReadRepository interface { GetInvoiceById(ctx context.Context, tenant, invoiceId string) (*dbtype.Node, error) CountInvoices(ctx context.Context, tenant, filterString string, filterParams map[string]interface{}) (int64, error) GetPaginatedInvoices(ctx context.Context, tenant string, skip, limit int, filterCypher string, filterParams map[string]interface{}, sorting *utils.Cypher) (*utils.DbNodesWithTotalCount, error) GetInvoicesForPayNotifications(ctx context.Context, minutesFromLastUpdate, lookbackWindow int, referenceTime time.Time) ([]*utils.DbNodeAndTenant, error) CountNonDryRunInvoicesForContract(ctx context.Context, tenant, contractId string) (int, error) GetInvoicesForPaymentLinkRequest(ctx context.Context, minutesFromLastUpdate, lookbackWindow int, referenceTime time.Time) ([]*utils.DbNodeAndTenant, error) GetPreviousCycleInvoice(ctx context.Context, tenant, contractId string) (*dbtype.Node, error) GetLastIssuedOnCycleInvoiceForContract(ctx context.Context, tenant, contractId string) (*dbtype.Node, error) GetFirstPreviewFilledInvoice(ctx context.Context, tenant, contractId string) (*dbtype.Node, error) GetExpiredDryRunInvoices(ctx context.Context) ([]*utils.DbNodeAndTenant, error) GetAllForContracts(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) GetInvoicesForOverdue(ctx context.Context) ([]*utils.DbNodeAndTenant, error) GetInvoicesForOnHold(ctx context.Context) ([]*utils.DbNodeAndTenant, error) GetInvoicesForScheduled(ctx context.Context) ([]*utils.DbNodeAndTenant, error) }
func NewInvoiceReadRepository ¶
func NewInvoiceReadRepository(driver *neo4j.DriverWithContext, database string) InvoiceReadRepository
type InvoiceUpdateFields ¶
type InvoiceWriteRepository ¶
type InvoiceWriteRepository interface { CreateInvoiceForContract(ctx context.Context, tenant, invoiceId string, data InvoiceCreateFields) error FillInvoice(ctx context.Context, tenant, invoiceId string, data InvoiceFillFields) error InvoicePdfGenerated(ctx context.Context, tenant, id, repositoryFileId string, updatedAt time.Time) error UpdateInvoice(ctx context.Context, tenant, invoiceId string, data InvoiceUpdateFields) error MarkInvoiceFinalizedEventSent(ctx context.Context, tenant, invoiceId string) error MarkPayNotificationRequested(ctx context.Context, tenant, invoiceId string, requestedAt time.Time) error MarkPaymentLinkRequested(ctx context.Context, tenant, invoiceId string) error SetPaidInvoiceNotificationSentAt(ctx context.Context, tenant, invoiceId string) error SetPayInvoiceNotificationSentAt(ctx context.Context, tenant, invoiceId string) error DeleteInitializedInvoice(ctx context.Context, tenant, invoiceId string) error DeletePreviewCycleInvoices(ctx context.Context, tenant, contractId, skipInvoiceId string) error DeletePreviewCycleInitializedInvoices(ctx context.Context, tenant, contractId, skipInvoiceId string) error DeleteDryRunInvoice(ctx context.Context, tenant, invoiceId string) error }
func NewInvoiceWriteRepository ¶
func NewInvoiceWriteRepository(driver *neo4j.DriverWithContext, database string) InvoiceWriteRepository
type InvoicingCycleReadRepository ¶
type InvoicingCycleReadRepository interface {
GetInvoicingCycle(ctx context.Context, tenant string) (*dbtype.Node, error)
}
func NewInvoicingCycleReadRepository ¶
func NewInvoicingCycleReadRepository(driver *neo4j.DriverWithContext, database string) InvoicingCycleReadRepository
type InvoicingCycleWriteRepository ¶
type InvoicingCycleWriteRepository interface { CreateInvoicingCycleType(ctx context.Context, tenant, id, invoicingCycleType, source, appSource string, createdAt time.Time) error UpdateInvoicingCycleType(ctx context.Context, tenant, id, invoicingCycleType string, updatedAt time.Time) error }
func NewInvoicingCycleWriteRepository ¶
func NewInvoicingCycleWriteRepository(driver *neo4j.DriverWithContext, database string) InvoicingCycleWriteRepository
type IssueCreateFields ¶
type IssueCreateFields struct { CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` SourceFields model.Source `json:"sourceFields"` GroupId string `json:"groupId"` Subject string `json:"subject"` Description string `json:"description"` Status string `json:"status"` Priority string `json:"priority"` ReportedByOrganizationId string `json:"reportedByOrganizationId"` SubmittedByOrganizationId string `json:"submittedByOrganizationId"` SubmittedByUserId string `json:"submittedByUserId"` }
type IssueReadRepository ¶
type IssueReadRepository interface { GetById(ctx context.Context, tenant, issueId string) (*dbtype.Node, error) GetMatchedIssueId(ctx context.Context, tenant, externalSystem, externalId string) (string, error) GetIssueIdByExternalId(ctx context.Context, tenant, externalId, externalSystemId string) (string, error) }
func NewIssueReadRepository ¶
func NewIssueReadRepository(driver *neo4j.DriverWithContext, database string) IssueReadRepository
type IssueUpdateFields ¶
type IssueWriteRepository ¶
type IssueWriteRepository interface { Create(ctx context.Context, tenant, issueId string, data IssueCreateFields) error Update(ctx context.Context, tenant, issueId string, data IssueUpdateFields) error AddUserAssignee(ctx context.Context, tenant, issueId, userId string, at time.Time) error RemoveUserAssignee(ctx context.Context, tenant, issueId, userId string, at time.Time) error AddUserFollower(ctx context.Context, tenant, issueId, userId string, at time.Time) error RemoveUserFollower(ctx context.Context, tenant, issueId, userId string, at time.Time) error ReportedByOrganizationWithGroupId(ctx context.Context, tenant, organizationId, groupId string) error RemoveReportedByOrganizationWithGroupId(ctx context.Context, tenant, organizationId, groupId string) error LinkUnthreadIssuesToOrganizationByGroupId(ctx context.Context) error }
func NewIssueWriteRepository ¶
func NewIssueWriteRepository(driver *neo4j.DriverWithContext, database string) IssueWriteRepository
type JobRoleCreateFields ¶
type JobRoleCreateFields struct { Description string `json:"description"` JobTitle string `json:"jobTitle"` StartedAt *time.Time `json:"startedAt"` EndedAt *time.Time `json:"endedAt"` SourceFields model.Source `json:"sourceFields"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Primary bool `json:"primary"` }
type JobRoleWriteRepository ¶
type JobRoleWriteRepository interface { CreateJobRole(ctx context.Context, tenant, jobRoleId string, data JobRoleCreateFields) error LinkWithUser(ctx context.Context, tenant, userId, jobRoleId string, updatedAt time.Time) error LinkContactWithOrganization(ctx context.Context, tenant, contactId, organizationId string, data JobRoleCreateFields) error }
func NewJobRoleWriteRepository ¶
func NewJobRoleWriteRepository(driver *neo4j.DriverWithContext, database string) JobRoleWriteRepository
type LocationCreateFields ¶
type LocationUpdateFields ¶
type LocationWriteRepository ¶
type LocationWriteRepository interface { CreateLocation(ctx context.Context, tenant, locationId string, data LocationCreateFields) error UpdateLocation(ctx context.Context, tenant, locationId string, data LocationUpdateFields) error FailLocationValidation(ctx context.Context, tenant, locationId, validationError string, validatedAt time.Time) error LocationValidated(ctx context.Context, tenant, locationId string, addressDetails AddressDetails, validatedAt time.Time) error LinkWithOrganization(ctx context.Context, tenant, organizationId, locationId string, updatedAt time.Time) error LinkWithContact(ctx context.Context, tenant, contactId, locationId string, updatedAt time.Time) error }
func NewLocationWriteRepository ¶
func NewLocationWriteRepository(driver *neo4j.DriverWithContext, database string) LocationWriteRepository
type LogEntryCreateFields ¶
type LogEntryCreateFields struct { Content string `json:"content"` ContentType string `json:"contentType"` StartedAt time.Time `json:"startedAt" ` AuthorUserId string `json:"authorUserId"` LoggedOrganizationId string `json:"loggedOrganizationId"` SourceFields model.Source `json:"sourceFields"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
type LogEntryReadRepository ¶
type LogEntryReadRepository interface {
GetById(ctx context.Context, tenant, id string) (*dbtype.Node, error)
}
func NewLogEntryReadRepository ¶
func NewLogEntryReadRepository(driver *neo4j.DriverWithContext, database string) LogEntryReadRepository
type LogEntryUpdateFields ¶
type LogEntryWriteRepository ¶
type LogEntryWriteRepository interface { Create(ctx context.Context, tenant, logEntryId string, data LogEntryCreateFields) error Update(ctx context.Context, tenant, logEntryId string, data LogEntryUpdateFields) error }
func NewLogEntryWriteRepository ¶
func NewLogEntryWriteRepository(driver *neo4j.DriverWithContext, database string) LogEntryWriteRepository
type MasterPlanReadRepository ¶
type MasterPlanReadRepository interface { GetMasterPlanById(ctx context.Context, tenant, masterPlanId string) (*dbtype.Node, error) GetMasterPlanMilestoneById(ctx context.Context, tenant, masterPlanMilestoneId string) (*dbtype.Node, error) GetMasterPlanMilestoneByPlanAndId(ctx context.Context, tenant, masterPlanId, masterPlanMilestoneId string) (*dbtype.Node, error) GetMasterPlansOrderByCreatedAt(ctx context.Context, tenant string, returnRetired *bool) ([]*dbtype.Node, error) GetMasterPlanMilestonesForMasterPlans(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) GetMaxOrderForMasterPlanMilestones(ctx context.Context, tenant, masterPlanId string) (int64, error) GetMasterPlanMilestonesForMasterPlan(ctx context.Context, tenant, masterPlanId string) ([]*dbtype.Node, error) }
func NewMasterPlanReadRepository ¶
func NewMasterPlanReadRepository(driver *neo4j.DriverWithContext, database string) MasterPlanReadRepository
type MasterPlanUpdateFields ¶
type MasterPlanWriteRepository ¶
type MasterPlanWriteRepository interface { Create(ctx context.Context, tenant, masterPlanId, name, source, appSource string, createdAt time.Time) error Update(ctx context.Context, tenant, masterPlanId string, data MasterPlanUpdateFields) error CreateMilestone(ctx context.Context, tenant, masterPlanId, milestoneId, name, source, appSource string, order, durationHours int64, items []string, optional bool, createdAt time.Time) error UpdateMilestone(ctx context.Context, tenant, masterPlanId, milestoneId string, data MasterPlanMilestoneUpdateFields) error }
func NewMasterPlanWriteRepository ¶
func NewMasterPlanWriteRepository(driver *neo4j.DriverWithContext, database string) MasterPlanWriteRepository
type OfferingCreateFields ¶
type OfferingCreateFields struct { Id string `json:"id"` CreatedAt time.Time `json:"createdAt"` SourceFields model.Source `json:"sourceFields"` BankName string `json:"bankName"` BankTransferEnabled bool `json:"bankTransferEnabled"` AllowInternational bool `json:"allowInternational"` Currency enum.Currency `json:"currency"` Iban string `json:"iban"` Bic string `json:"bic"` SortCode string `json:"sortCode"` AccountNumber string `json:"accountNumber"` RoutingNumber string `json:"routingNumber"` OtherDetails string `json:"otherDetails"` }
type OfferingReadRepository ¶
type OfferingReadRepository interface { GetOfferings(ctx context.Context, tenant string) ([]*dbtype.Node, error) GetOfferingById(ctx context.Context, tenant, id string) (*dbtype.Node, error) }
func NewOfferingReadRepository ¶
func NewOfferingReadRepository(driver *neo4j.DriverWithContext, database string) OfferingReadRepository
type OfferingUpdateFields ¶
type OfferingUpdateFields struct { Id string `json:"id"` UpdatedAt time.Time `json:"updatedAt"` BankName string `json:"bankName"` BankTransferEnabled bool `json:"bankTransferEnabled"` AllowInternational bool `json:"allowInternational"` Currency enum.Currency `json:"currency"` Iban string `json:"iban"` Bic string `json:"bic"` SortCode string `json:"sortCode"` AccountNumber string `json:"accountNumber"` RoutingNumber string `json:"routingNumber"` OtherDetails string `json:"otherDetails"` UpdateBankName bool `json:"updateBankName"` UpdateBankTransferEnabled bool `json:"updateBankTransferEnabled"` UpdateAllowInternational bool `json:"updateAllowInternational"` UpdateCurrency bool `json:"updateCurrency"` UpdateIban bool `json:"updateIban"` UpdateBic bool `json:"updateBic"` UpdateSortCode bool `json:"updateSortCode"` UpdateAccountNumber bool `json:"updateAccountNumber"` UpdateRoutingNumber bool `json:"updateRoutingNumber"` UpdateOtherDetails bool `json:"updateOtherDetails"` }
type OfferingWriteRepository ¶
type OfferingWriteRepository interface { CreateOffering(ctx context.Context, tenant string, data OfferingCreateFields) error UpdateOffering(ctx context.Context, tenant string, data OfferingUpdateFields) error DeleteOffering(ctx context.Context, tenant, id string) error }
func NewOfferingWriteRepository ¶
func NewOfferingWriteRepository(driver *neo4j.DriverWithContext, database string) OfferingWriteRepository
type OpportunityCreateFields ¶
type OpportunityCreateFields struct { OrganizationId string `json:"organizationId"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` SourceFields model.Source `json:"sourceFields"` Name string `json:"name"` Amount float64 `json:"amount"` InternalType string `json:"internalType"` ExternalType string `json:"externalType"` InternalStage string `json:"internalStage"` ExternalStage string `json:"externalStage"` EstimatedClosedAt *time.Time `json:"estimatedClosedAt"` GeneralNotes string `json:"generalNotes"` NextSteps string `json:"nextSteps"` CreatedByUserId string `json:"createdByUserId"` }
type OpportunityReadRepository ¶
type OpportunityReadRepository interface { GetOpportunityById(ctx context.Context, tenant, opportunityId string) (*dbtype.Node, error) GetActiveRenewalOpportunityForContract(ctx context.Context, tenant, contractId string) (*dbtype.Node, error) GetActiveRenewalOpportunitiesForOrganization(ctx context.Context, tenant, organizationId string) ([]*dbtype.Node, error) GetRenewalOpportunitiesForClosingAsLost(ctx context.Context) ([]TenantAndOpportunityId, error) GetPreviousClosedWonRenewalOpportunityForContract(ctx context.Context, tenant, contractId string) (*dbtype.Node, error) GetForContracts(ctx context.Context, tenant string, contractIds []string) ([]*utils.DbNodeAndId, error) }
func NewOpportunityReadRepository ¶
func NewOpportunityReadRepository(driver *neo4j.DriverWithContext, database string) OpportunityReadRepository
type OpportunityUpdateFields ¶
type OpportunityUpdateFields struct { UpdatedAt time.Time `json:"updatedAt"` Source string `json:"source"` Name string `json:"name"` Amount float64 `json:"amount"` MaxAmount float64 `json:"maxAmount"` UpdateName bool `json:"updateName"` UpdateAmount bool `json:"updateAmount"` UpdateMaxAmount bool `json:"updateMaxAmount"` }
type OpportunityWriteRepository ¶
type OpportunityWriteRepository interface { CreateForOrganization(ctx context.Context, tenant, opportunityId string, data OpportunityCreateFields) error Update(ctx context.Context, tenant, opportunityId string, data OpportunityUpdateFields) error ReplaceOwner(ctx context.Context, tenant, opportunityId, userId string) error CreateRenewal(ctx context.Context, tenant, opportunityId string, data RenewalOpportunityCreateFields) (bool, error) UpdateRenewal(ctx context.Context, tenant, opportunityId string, data RenewalOpportunityUpdateFields) error UpdateNextRenewalDate(ctx context.Context, tenant, opportunityId string, updatedAt time.Time, renewedAt *time.Time) error CloseWin(ctx context.Context, tenant, opportunityId string, updatedAt, closedAt time.Time) error CloseLoose(ctx context.Context, tenant, opportunityId string, updatedAt, closedAt time.Time) error MarkRenewalRequested(ctx context.Context, tenant, opportunityId string) error }
func NewOpportunityWriteRepository ¶
func NewOpportunityWriteRepository(driver *neo4j.DriverWithContext, database string) OpportunityWriteRepository
type OrderReadRepository ¶
type OrderReadRepository interface { GetById(ctx context.Context, tenant, id string) (*dbtype.Node, error) GetMatchedOrderId(ctx context.Context, tenant, externalSystem, externalId string) (string, error) GetAllForOrganizations(ctx context.Context, tenant string, organizationIds []string) ([]*utils.DbNodeAndId, error) }
func NewOrderReadRepository ¶
func NewOrderReadRepository(driver *neo4j.DriverWithContext, database string) OrderReadRepository
type OrderWriteRepository ¶
type OrderWriteRepository interface {
UpsertOrder(ctx context.Context, tenant, organizationId, orderId string, createdAt, updatedAt time.Time, confirmedAt, paidAt, fulfilledAt, canceledAt *time.Time, sourceFields model.Source) error
}
func NewOrderWriteRepository ¶
func NewOrderWriteRepository(driver *neo4j.DriverWithContext, database string) OrderWriteRepository
type OrganizationCreateFields ¶
type OrganizationCreateFields struct { SourceFields model.Source `json:"sourceFields"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Name string `json:"name"` Hide bool `json:"hide"` Description string `json:"description"` Website string `json:"website"` Industry string `json:"industry"` SubIndustry string `json:"subIndustry"` IndustryGroup string `json:"industryGroup"` TargetAudience string `json:"targetAudience"` ValueProposition string `json:"valueProposition"` IsPublic bool `json:"isPublic"` IsCustomer bool `json:"isCustomer"` Employees int64 `json:"employees"` Market string `json:"market"` LastFundingRound string `json:"lastFundingRound"` LastFundingAmount string `json:"lastFundingAmount"` ReferenceId string `json:"referenceId"` Note string `json:"note"` LogoUrl string `json:"logoUrl"` Headquarters string `json:"headquarters"` YearFounded *int64 `json:"yearFounded"` EmployeeGrowthRate string `json:"employeeGrowthRate"` SlackChannelId string `json:"slackChannelId"` }
type OrganizationPlanMilestoneUpdateFields ¶
type OrganizationPlanMilestoneUpdateFields struct { UpdatedAt time.Time Name string Order int64 DurationHours int64 DueDate time.Time Items []entity.OrganizationPlanMilestoneItem StatusDetails entity.OrganizationPlanMilestoneStatusDetails Optional bool Retired bool Adhoc bool UpdateName bool UpdateOrder bool UpdateItems bool UpdateOptional bool UpdateRetired bool UpdateStatusDetails bool UpdateDueDate bool UpdateAdhoc bool }
type OrganizationPlanReadRepository ¶
type OrganizationPlanReadRepository interface { GetOrganizationPlanById(ctx context.Context, tenant, organizationPlanId string) (*dbtype.Node, error) GetOrganizationPlanMilestoneById(ctx context.Context, tenant, organizationPlanMilestoneId string) (*dbtype.Node, error) GetOrganizationPlanMilestoneByPlanAndId(ctx context.Context, tenant, organizationPlanId, organizationPlanMilestoneId string) (*dbtype.Node, error) GetOrganizationPlansOrderByCreatedAt(ctx context.Context, tenant string, returnRetired *bool) ([]*dbtype.Node, error) GetOrganizationPlanMilestonesForOrganizationPlans(ctx context.Context, tenant string, ids []string) ([]*utils.DbNodeAndId, error) GetMaxOrderForOrganizationPlanMilestones(ctx context.Context, tenant, organizationPlanId string) (int64, error) GetOrganizationPlansForOrganization(ctx context.Context, tenant, organizationId string) ([]*dbtype.Node, error) GetMilestoneDueDate(ctx context.Context, tenant, organizationPlanMilestoneId string) (time.Time, error) GetMilestonesForOrganizationPlan(ctx context.Context, tenant, organizationPlanId string) ([]*dbtype.Node, error) GetOrganizationFromOrganizationPlan(ctx context.Context, tenant, organizationPlanId string) (*dbtype.Node, error) }
func NewOrganizationPlanReadRepository ¶
func NewOrganizationPlanReadRepository(driver *neo4j.DriverWithContext, database string) OrganizationPlanReadRepository
type OrganizationPlanWriteRepository ¶
type OrganizationPlanWriteRepository interface { Create(ctx context.Context, tenant, masterPlanId, organizationPlanId, name, source, appSource string, createdAt time.Time, statusDetails entity.OrganizationPlanStatusDetails) error Update(ctx context.Context, tenant, organizationPlanId string, data OrganizationPlanUpdateFields) error CreateMilestone(ctx context.Context, tenant, organizationPlanId, milestoneId, name, source, appSource string, order int64, items []entity.OrganizationPlanMilestoneItem, optional, adhoc bool, createdAt, dueDate time.Time, statusDetails entity.OrganizationPlanMilestoneStatusDetails) error CreateBulkMilestones(ctx context.Context, tenant, organizationPlanId, source, appSource string, milestones []entity.OrganizationPlanMilestoneEntity, createdAt time.Time) error UpdateMilestone(ctx context.Context, tenant, organizationPlanId, milestoneId string, data OrganizationPlanMilestoneUpdateFields) error LinkWithOrganization(ctx context.Context, tenant, organizationPlanId, organizationId string, createdAt time.Time) error LinkWithMasterPlan(ctx context.Context, tenant, organizationPlanId, masterPlanId string, createdAt time.Time) error }
func NewOrganizationPlanWriteRepository ¶
func NewOrganizationPlanWriteRepository(driver *neo4j.DriverWithContext, database string) OrganizationPlanWriteRepository
type OrganizationReadRepository ¶
type OrganizationReadRepository interface { GetOrganization(ctx context.Context, tenant, organizationId string) (*dbtype.Node, error) GetOrganizationIdsConnectedToInteractionEvent(ctx context.Context, tenant, interactionEventId string) ([]string, error) GetOrganizationByOpportunityId(ctx context.Context, tenant, opportunityId string) (*dbtype.Node, error) GetOrganizationByContractId(ctx context.Context, tenant, contractId string) (*dbtype.Node, error) GetOrganizationByInvoiceId(ctx context.Context, tenant, invoiceId string) (*dbtype.Node, error) GetOrganizationByCustomerOsId(ctx context.Context, tenant, customerOsId string) (*dbtype.Node, error) GetOrganizationByReferenceId(ctx context.Context, tenant, referenceId string) (*dbtype.Node, error) GetAllForInvoices(ctx context.Context, tenant string, invoiceIds []string) ([]*utils.DbNodeAndId, error) GetAllForSlackChannels(ctx context.Context, tenant string, slackChannelIds []string) ([]*utils.DbNodeAndId, error) }
func NewOrganizationReadRepository ¶
func NewOrganizationReadRepository(driver *neo4j.DriverWithContext, database string) OrganizationReadRepository
type OrganizationUpdateFields ¶
type OrganizationUpdateFields struct { Name string `json:"name"` Hide bool `json:"hide"` Description string `json:"description"` Website string `json:"website"` Industry string `json:"industry"` SubIndustry string `json:"subIndustry"` IndustryGroup string `json:"industryGroup"` TargetAudience string `json:"targetAudience"` ValueProposition string `json:"valueProposition"` IsPublic bool `json:"isPublic"` IsCustomer bool `json:"isCustomer"` Employees int64 `json:"employees"` Market string `json:"market"` LastFundingRound string `json:"lastFundingRound"` LastFundingAmount string `json:"lastFundingAmount"` ReferenceId string `json:"referenceId"` Note string `json:"note"` LogoUrl string `json:"logoUrl"` Headquarters string `json:"headquarters"` YearFounded *int64 `json:"yearFounded"` EmployeeGrowthRate string `json:"employeeGrowthRate"` SlackChannelId string `json:"slackChannelId"` WebScrapedUrl string `json:"webScrapedUrl"` Source string `json:"source"` UpdatedAt time.Time `json:"updatedAt"` UpdateName bool `json:"updateName"` UpdateDescription bool `json:"updateDescription"` UpdateHide bool `json:"updateHide"` UpdateIsCustomer bool `json:"updateIsCustomer"` UpdateWebsite bool `json:"updateWebsite"` UpdateIndustry bool `json:"updateIndustry"` UpdateSubIndustry bool `json:"updateSubIndustry"` UpdateIndustryGroup bool `json:"updateIndustryGroup"` UpdateTargetAudience bool `json:"updateTargetAudience"` UpdateValueProposition bool `json:"updateValueProposition"` UpdateLastFundingRound bool `json:"updateLastFundingRound"` UpdateLastFundingAmount bool `json:"updateLastFundingAmount"` UpdateReferenceId bool `json:"updateReferenceId"` UpdateNote bool `json:"updateNote"` UpdateIsPublic bool `json:"updateIsPublic"` UpdateEmployees bool `json:"updateEmployees"` UpdateMarket bool `json:"updateMarket"` UpdateYearFounded bool `json:"updateYearFounded"` UpdateHeadquarters bool `json:"updateHeadquarters"` UpdateLogoUrl bool `json:"updateLogoUrl"` UpdateEmployeeGrowthRate bool `json:"updateEmployeeGrowthRate"` UpdateSlackChannelId bool `json:"updateSlackChannelId"` }
type OrganizationWriteRepository ¶
type OrganizationWriteRepository interface { CreateOrganization(ctx context.Context, tenant, organizationId string, data OrganizationCreateFields) error CreateOrganizationInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, organizationId string, data OrganizationCreateFields) error UpdateOrganization(ctx context.Context, tenant, organizationId string, data OrganizationUpdateFields) error LinkWithDomain(ctx context.Context, tenant, organizationId, domain string) error ReplaceOwner(ctx context.Context, tenant, organizationId, userId string) error SetVisibility(ctx context.Context, tenant, organizationId string, hide bool) error UpdateLastTouchpoint(ctx context.Context, tenant, organizationId string, touchpointAt time.Time, touchpointId, touchpointType string) error SetCustomerOsIdIfMissing(ctx context.Context, tenant, organizationId, customerOsId string) error LinkWithParentOrganization(ctx context.Context, tenant, organizationId, parentOrganizationId, subOrganizationType string) error UnlinkParentOrganization(ctx context.Context, tenant, organizationId, parentOrganizationId string) error UpdateArr(ctx context.Context, tenant, organizationId string) error UpdateRenewalSummary(ctx context.Context, tenant, organizationId string, likelihood *string, likelihoodOrder *int64, nextRenewalDate *time.Time) error WebScrapeRequested(ctx context.Context, tenant, organizationId, url string, attempt int64, requestedAt time.Time) error UpdateOnboardingStatus(ctx context.Context, tenant, organizationId, status, comments string, statusOrder *int64, updatedAt time.Time) error }
func NewOrganizationWriteRepository ¶
func NewOrganizationWriteRepository(driver *neo4j.DriverWithContext, database string) OrganizationWriteRepository
type PhoneNumberCreateFields ¶
type PhoneNumberReadRepository ¶
type PhoneNumberReadRepository interface { GetPhoneNumberIdIfExists(ctx context.Context, tenant, phoneNumber string) (string, error) GetCountryCodeA2ForPhoneNumber(ctx context.Context, tenant, phoneNumberId string) (string, error) }
func NewPhoneNumberReadRepository ¶
func NewPhoneNumberReadRepository(driver *neo4j.DriverWithContext, database string) PhoneNumberReadRepository
type PhoneNumberWriteRepository ¶
type PhoneNumberWriteRepository interface { CreatePhoneNumber(ctx context.Context, tenant, phoneNumberId string, data PhoneNumberCreateFields) error UpdatePhoneNumber(ctx context.Context, tenant, phoneNumberId, source string, updatedAt time.Time) error FailPhoneNumberValidation(ctx context.Context, tenant, phoneNumberId, validationError string, validatedAt time.Time) error PhoneNumberValidated(ctx context.Context, tenant, phoneNumberId string, data PhoneNumberValidateFields) error LinkWithContact(ctx context.Context, tenant, contactId, phoneNumberId, label string, primary bool, updatedAt time.Time) error LinkWithOrganization(ctx context.Context, tenant, organizationId, phoneNumberId, label string, primary bool, updatedAt time.Time) error LinkWithUser(ctx context.Context, tenant, userId, phoneNumberId, label string, primary bool, updatedAt time.Time) error }
func NewPhoneNumberWriteRepository ¶
func NewPhoneNumberWriteRepository(driver *neo4j.DriverWithContext, database string) PhoneNumberWriteRepository
type PlayerFields ¶
type PlayerWriteRepository ¶
type PlayerWriteRepository interface {
Merge(ctx context.Context, tenant, userId string, data PlayerFields) error
}
func NewPlayerWriteRepository ¶
func NewPlayerWriteRepository(driver *neo4j.DriverWithContext, database string) PlayerWriteRepository
type ReminderReadRepository ¶
type ReminderReadRepository interface { GetReminderById(ctx context.Context, tenant, id string) (*dbtype.Node, error) GetRemindersOrderByDueDateAsc(ctx context.Context, tenant, organizationId string, dismissed *bool) ([]*dbtype.Node, error) GetRemindersOrderByDueDateDesc(ctx context.Context, tenant, organizationId string, dismissed *bool) ([]*dbtype.Node, error) GetRemindersForOrganization(ctx context.Context, tenant, organizationId string, dismissed *bool) ([]*dbtype.Node, error) }
func NewReminderReadRepository ¶
func NewReminderReadRepository(driver *neo4j.DriverWithContext, database string) ReminderReadRepository
type ReminderUpdateFields ¶
type ReminderWriteRepository ¶
type ReminderWriteRepository interface { CreateReminder(ctx context.Context, tenant, id, userId, organizationId, content, source, appSource string, createdAt, dueDate time.Time) error UpdateReminder(ctx context.Context, tenant, id string, data ReminderUpdateFields) error DeleteReminder(ctx context.Context, tenant, id string) error }
func NewReminderWriteRepository ¶
func NewReminderWriteRepository(driver *neo4j.DriverWithContext, database string) ReminderWriteRepository
type RenewalOpportunityCreateFields ¶
type RenewalOpportunityCreateFields struct { ContractId string `json:"contractId"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` SourceFields model.Source `json:"sourceFields"` InternalType string `json:"internalType"` InternalStage string `json:"internalStage"` RenewalLikelihood string `json:"renewalLikelihood"` RenewalApproved bool `json:"renewalApproved"` RenewedAt *time.Time `json:"renewedAt"` RenewalAdjustedRate int64 `json:"renewalAdjustedRate"` }
type RenewalOpportunityUpdateFields ¶
type RenewalOpportunityUpdateFields struct { UpdatedAt time.Time `json:"updatedAt"` Source string `json:"source"` UpdatedByUserId string `json:"updatedByUserId"` SetUpdatedByUserId bool `json:"setUpdatedByUserId"` Comments string `json:"comments"` Amount float64 `json:"amount"` RenewalLikelihood string `json:"renewalLikelihood"` RenewalApproved bool `json:"renewalApproved"` RenewedAt *time.Time `json:"renewedAt"` RenewalAdjustedRate int64 `json:"renewalAdjustedRate"` UpdateComments bool `json:"updateComments"` UpdateAmount bool `json:"updateAmount"` UpdateRenewalLikelihood bool `json:"updateRenewalLikelihood"` UpdateRenewalApproved bool `json:"updateRenewalApproved"` UpdateRenewedAt bool `json:"updateRenewedAt"` UpdateRenewalAdjustedRate bool `json:"updateRenewalAdjustedRate"` }
type Repositories ¶
type Repositories struct { ActionReadRepository ActionReadRepository ActionWriteRepository ActionWriteRepository BankAccountReadRepository BankAccountReadRepository BankAccountWriteRepository BankAccountWriteRepository BillingProfileWriteRepository BillingProfileWriteRepository CommentReadRepository CommentReadRepository CommentWriteRepository CommentWriteRepository CommonReadRepository CommonReadRepository ContactWriteRepository ContactWriteRepository ContractReadRepository ContractReadRepository ContractWriteRepository ContractWriteRepository CountryReadRepository CountryReadRepository CountryWriteRepository CountryWriteRepository CustomFieldWriteRepository CustomFieldWriteRepository EmailReadRepository EmailReadRepository EmailWriteRepository EmailWriteRepository ExternalSystemReadRepository ExternalSystemReadRepository ExternalSystemWriteRepository ExternalSystemWriteRepository InteractionEventReadRepository InteractionEventReadRepository InteractionEventWriteRepository InteractionEventWriteRepository InteractionSessionWriteRepository InteractionSessionWriteRepository InvoiceReadRepository InvoiceReadRepository InvoiceWriteRepository InvoiceWriteRepository InvoiceLineReadRepository InvoiceLineReadRepository InvoiceLineWriteRepository InvoiceLineWriteRepository InvoicingCycleReadRepository InvoicingCycleReadRepository InvoicingCycleWriteRepository InvoicingCycleWriteRepository IssueReadRepository IssueReadRepository IssueWriteRepository IssueWriteRepository JobRoleWriteRepository JobRoleWriteRepository LocationWriteRepository LocationWriteRepository LogEntryReadRepository LogEntryReadRepository LogEntryWriteRepository LogEntryWriteRepository MasterPlanReadRepository MasterPlanReadRepository MasterPlanWriteRepository MasterPlanWriteRepository OfferingReadRepository OfferingReadRepository OfferingWriteRepository OfferingWriteRepository OpportunityReadRepository OpportunityReadRepository OpportunityWriteRepository OpportunityWriteRepository OrganizationReadRepository OrganizationReadRepository OrganizationWriteRepository OrganizationWriteRepository OrganizationPlanReadRepository OrganizationPlanReadRepository OrganizationPlanWriteRepository OrganizationPlanWriteRepository OrderReadRepository OrderReadRepository OrderWriteRepository OrderWriteRepository PhoneNumberReadRepository PhoneNumberReadRepository PhoneNumberWriteRepository PhoneNumberWriteRepository PlayerWriteRepository PlayerWriteRepository ReminderReadRepository ReminderReadRepository ReminderWriteRepository ReminderWriteRepository ServiceLineItemReadRepository ServiceLineItemReadRepository ServiceLineItemWriteRepository ServiceLineItemWriteRepository StateReadRepository StateReadRepository SocialWriteRepository SocialWriteRepository TagReadRepository TagReadRepository TagWriteRepository TagWriteRepository TenantReadRepository TenantReadRepository TenantWriteRepository TenantWriteRepository TimelineEventReadRepository TimelineEventReadRepository UserReadRepository UserReadRepository UserWriteRepository UserWriteRepository DomainReadRepository DomainReadRepository DomainWriteRepository DomainWriteRepository }
func InitNeo4jRepositories ¶
func InitNeo4jRepositories(driver *neo4j.DriverWithContext, neo4jDatabase string) *Repositories
type ServiceLineItemCreateFields ¶
type ServiceLineItemCreateFields struct { IsNewVersionForExistingSLI bool `json:"isNewVersionForExistingSLI"` PreviousQuantity int64 `json:"previousQuantity"` PreviousPrice float64 `json:"previousPrice"` PreviousBilled string `json:"previousBilled"` SourceFields model.Source `json:"sourceFields"` ContractId string `json:"contractId"` ParentId string `json:"parentId"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` StartedAt time.Time `json:"startedAt"` EndedAt *time.Time `json:"endedAt"` Price float64 `json:"price"` Quantity int64 `json:"quantity"` Name string `json:"name"` Billed string `json:"billed"` Comments string `json:"comments"` VatRate float64 `json:"vatRate"` PreviousVatRate float64 `json:"previousVatRate"` }
type ServiceLineItemReadRepository ¶
type ServiceLineItemReadRepository interface { GetServiceLineItemById(ctx context.Context, tenant, serviceLineItemId string) (*dbtype.Node, error) GetServiceLineItemsByParentId(ctx context.Context, tenant, sliParentId string) ([]*dbtype.Node, error) GetServiceLineItemsForContract(ctx context.Context, tenant, contractId string) ([]*neo4j.Node, error) GetServiceLineItemsForContracts(ctx context.Context, tenant string, contractIds []string) ([]*utils.DbNodeAndId, error) GetServiceLineItemsForInvoiceLines(ctx context.Context, tenant string, invoiceLineIds []string) ([]*utils.DbNodeAndId, error) GetLatestServiceLineItemByParentId(ctx context.Context, tenant, serviceLineItemParentId string, beforeDate *time.Time) (*dbtype.Node, error) WasServiceLineItemInvoiced(ctx context.Context, tenant, serviceLineItemId string) (bool, error) }
func NewServiceLineItemReadRepository ¶
func NewServiceLineItemReadRepository(driver *neo4j.DriverWithContext, database string) ServiceLineItemReadRepository
type ServiceLineItemUpdateFields ¶
type ServiceLineItemUpdateFields struct { Price float64 `json:"price"` Quantity int64 `json:"quantity"` Name string `json:"name"` Billed string `json:"billed"` Comments string `json:"comments"` Source string `json:"source"` UpdatedAt time.Time `json:"updatedAt"` VatRate float64 `json:"vatRate"` StartedAt *time.Time `json:"startedAt"` }
type ServiceLineItemWriteRepository ¶
type ServiceLineItemWriteRepository interface { CreateForContract(ctx context.Context, tenant, serviceLineItemId string, data ServiceLineItemCreateFields) error Update(ctx context.Context, tenant, serviceLineItemId string, data ServiceLineItemUpdateFields) error Delete(ctx context.Context, tenant, serviceLineItemId string) error Close(ctx context.Context, tenant, serviceLineItemId string, updatedAt, endedAt time.Time, isCanceled bool) error AdjustEndDates(ctx context.Context, tenant, parentId string) error }
func NewServiceLineItemWriteRepository ¶
func NewServiceLineItemWriteRepository(driver *neo4j.DriverWithContext, database string) ServiceLineItemWriteRepository
type SocialFields ¶
type SocialWriteRepository ¶
type SocialWriteRepository interface {
MergeSocialFor(ctx context.Context, tenant, linkedEntityId, linkedEntityNodeLabel string, data SocialFields) error
}
func NewSocialWriteRepository ¶
func NewSocialWriteRepository(driver *neo4j.DriverWithContext, database string) SocialWriteRepository
type StateReadRepository ¶
type StateReadRepository interface {
GetStatesByCountryId(ctx context.Context, countryId string) ([]*dbtype.Node, error)
}
func NewStateReadRepository ¶
func NewStateReadRepository(driver *neo4j.DriverWithContext, database string) StateReadRepository
type TagReadRepository ¶
type TagReadRepository interface { GetById(ctx context.Context, tenant, tagId string) (*dbtype.Node, error) GetAll(ctx context.Context, tenant string) ([]*dbtype.Node, error) GetByNameOptional(ctx context.Context, tenant, name string) (*dbtype.Node, error) GetForContact(ctx context.Context, tenant, contactId string) ([]*dbtype.Node, error) GetForContacts(ctx context.Context, tenant string, contactIds []string) ([]*utils.DbNodeWithRelationAndId, error) GetForLogEntries(ctx context.Context, tenant string, logEntryIds []string) ([]*utils.DbNodeWithRelationAndId, error) GetForIssues(ctx context.Context, tenant string, issueIds []string) ([]*utils.DbNodeWithRelationAndId, error) GetForOrganizations(ctx context.Context, tenant string, organizationIds []string) ([]*utils.DbNodeWithRelationAndId, error) }
func NewTagReadRepository ¶
func NewTagReadRepository(driver *neo4j.DriverWithContext, database string) TagReadRepository
type TagWriteRepository ¶
type TagWriteRepository interface { LinkTagByIdToEntity(ctx context.Context, tenant, tagId, linkedEntityId, linkedEntityNodeLabel string, taggedAt time.Time) error UnlinkTagByIdFromEntity(ctx context.Context, tenant, tagId, linkedEntityId, linkedEntityNodeLabel string) error }
func NewTagWriteRepository ¶
func NewTagWriteRepository(driver *neo4j.DriverWithContext, database string) TagWriteRepository
type TenantAndContractId ¶
type TenantAndOpportunityId ¶
type TenantBillingProfileCreateFields ¶
type TenantBillingProfileCreateFields struct { Id string `json:"id"` CreatedAt time.Time `json:"createdAt"` SourceFields model.Source `json:"sourceFields"` Phone string `json:"phone"` LegalName string `json:"legalName"` AddressLine1 string `json:"addressLine1"` AddressLine2 string `json:"addressLine2"` AddressLine3 string `json:"addressLine3"` Locality string `json:"locality"` Country string `json:"country"` Region string `json:"region"` Zip string `json:"zip"` VatNumber string `json:"vatNumber"` SendInvoicesFrom string `json:"sendInvoicesFrom"` SendInvoicesBcc string `json:"sendInvoicesBcc"` CanPayWithPigeon bool `json:"canPayWithPigeon"` CanPayWithBankTransfer bool `json:"canPayWithBankTransfer"` Check bool `json:"check"` }
type TenantBillingProfileUpdateFields ¶
type TenantBillingProfileUpdateFields struct { Id string `json:"id"` UpdatedAt time.Time `json:"updatedAt"` Phone string `json:"phone"` LegalName string `json:"legalName"` AddressLine1 string `json:"addressLine1"` AddressLine2 string `json:"addressLine2"` AddressLine3 string `json:"addressLine3"` Locality string `json:"locality"` Country string `json:"country"` Region string `json:"region"` Zip string `json:"zip"` VatNumber string `json:"vatNumber"` SendInvoicesFrom string `json:"sendInvoicesFrom"` SendInvoicesBcc string `json:"sendInvoicesBcc"` CanPayWithPigeon bool `json:"canPayWithPigeon"` CanPayWithBankTransfer bool `json:"canPayWithBankTransfer"` Check bool `json:"check"` UpdatePhone bool `json:"updatePhone"` UpdateLegalName bool `json:"updateLegalName"` UpdateAddressLine1 bool `json:"updateAddressLine1"` UpdateAddressLine2 bool `json:"updateAddressLine2"` UpdateAddressLine3 bool `json:"updateAddressLine3"` UpdateLocality bool `json:"updateLocality"` UpdateCountry bool `json:"updateCountry"` UpdateRegion bool `json:"updateRegion"` UpdateZip bool `json:"updateZip"` UpdateVatNumber bool `json:"updateVatNumber"` UpdateSendInvoicesFrom bool `json:"updateSendInvoicesFrom"` UpdateSendInvoicesBcc bool `json:"updateSendInvoicesBcc"` UpdateCanPayWithPigeon bool `json:"updateCanPayWithPigeon"` UpdateCanPayWithBankTransfer bool `json:"updateCanPayWithBankTransfer"` UpdateCheck bool `json:"updateCheck"` }
type TenantReadRepository ¶
type TenantReadRepository interface { TenantExists(ctx context.Context, name string) (bool, error) GetTenantByName(ctx context.Context, tenant string) (*dbtype.Node, error) GetTenantForWorkspaceProvider(ctx context.Context, workspaceName, workspaceProvider string) (*dbtype.Node, error) GetTenantForUserEmail(ctx context.Context, email string) (*dbtype.Node, error) GetTenantSettings(ctx context.Context, tenant string) (*dbtype.Node, error) GetTenantBillingProfiles(ctx context.Context, tenant string) ([]*dbtype.Node, error) GetTenantBillingProfileById(ctx context.Context, tenant, id string) (*dbtype.Node, error) }
func NewTenantReadRepository ¶
func NewTenantReadRepository(driver *neo4j.DriverWithContext, database string) TenantReadRepository
type TenantSettingsFields ¶
type TenantSettingsFields struct { UpdatedAt time.Time `json:"updatedAt"` LogoRepositoryFileId string `json:"logoRepositoryFileId"` BaseCurrency enum.Currency `json:"baseCurrency"` InvoicingEnabled bool `json:"invoicingEnabled"` InvoicingPostpaid bool `json:"invoicingPostpaid"` UpdateLogoRepositoryFileId bool `json:"updateLogoRepositoryFileId"` UpdateInvoicingEnabled bool `json:"updateInvoicingEnabled"` UpdateInvoicingPostpaid bool `json:"updateInvoicingPostpaid"` UpdateBaseCurrency bool `json:"updateBaseCurrency"` }
type TenantWriteRepository ¶
type TenantWriteRepository interface { CreateTenantBillingProfile(ctx context.Context, tenant string, data TenantBillingProfileCreateFields) error UpdateTenantBillingProfile(ctx context.Context, tenant string, data TenantBillingProfileUpdateFields) error UpdateTenantSettings(ctx context.Context, tenant string, data TenantSettingsFields) error }
func NewTenantWriteRepository ¶
func NewTenantWriteRepository(driver *neo4j.DriverWithContext, database string) TenantWriteRepository
type TimelineEventReadRepository ¶
type TimelineEventReadRepository interface { GetTimelineEvent(ctx context.Context, tenant, id string) (*dbtype.Node, error) CalculateAndGetLastTouchPoint(ctx context.Context, tenant, organizationId string) (*time.Time, string, error) GetTimelineEventsForContact(ctx context.Context, tenant, contactId string, startingDate time.Time, size int, labels []string) ([]*dbtype.Node, error) GetTimelineEventsForOrganization(ctx context.Context, tenant, organizationId string, startingDate time.Time, size int, labels []string) ([]*dbtype.Node, error) GetTimelineEventsTotalCountForContact(ctx context.Context, tenant string, id string, labels []string) (int64, error) GetTimelineEventsTotalCountForOrganization(ctx context.Context, tenant string, id string, labels []string) (int64, error) GetTimelineEventsWithIds(ctx context.Context, tenant string, ids []string) ([]*dbtype.Node, error) }
func NewTimelineEventReadRepository ¶
func NewTimelineEventReadRepository(driver *neo4j.DriverWithContext, database string) TimelineEventReadRepository
type UserCreateFields ¶
type UserCreateFields struct { Name string `json:"name"` FirstName string `json:"firstName"` LastName string `json:"lastName"` SourceFields model.Source `json:"sourceFields"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Internal bool `json:"internal"` Bot bool `json:"bot"` ProfilePhotoUrl string `json:"profilePhotoUrl"` Timezone string `json:"timezone"` }
type UserReadRepository ¶
type UserReadRepository interface { GetUserById(ctx context.Context, tenant, userId string) (*dbtype.Node, error) FindUserByEmail(ctx context.Context, email string) (string, string, []string, error) }
func NewUserReadRepository ¶
func NewUserReadRepository(driver *neo4j.DriverWithContext, database string) UserReadRepository
type UserUpdateFields ¶
type UserUpdateFields struct { Name string `json:"name"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Source string `json:"source"` UpdatedAt time.Time `json:"updatedAt"` Internal bool `json:"internal"` Bot bool `json:"bot"` ProfilePhotoUrl string `json:"profilePhotoUrl"` Timezone string `json:"timezone"` }
type UserWriteRepository ¶
type UserWriteRepository interface { CreateUser(ctx context.Context, tenant, userId string, data UserCreateFields) error CreateUserInTx(ctx context.Context, tx neo4j.ManagedTransaction, tenant, userId string, data UserCreateFields) error UpdateUser(ctx context.Context, tenant, userId string, data UserUpdateFields) error AddRole(ctx context.Context, tenant, userId, role string, timestamp time.Time) error RemoveRole(ctx context.Context, tenant, userId, role string, timestamp time.Time) error }
func NewUserWriteRepository ¶
func NewUserWriteRepository(driver *neo4j.DriverWithContext, database string) UserWriteRepository
Source Files ¶
- action_read_repository.go
- action_write_repository.go
- bank_account_read_repository.go
- bank_account_write_repository.go
- billing_profile_write_repository.go
- comment_read_repository.go
- comment_write_repository.go
- common_read_repository.go
- contact_write_repository.go
- contract_read_repository.go
- contract_write_repository.go
- country_read_repository.go
- country_write_repository.go
- custom_field_write_repository.go
- domain_read_repository.go
- domain_write_repository.go
- email_read_repository.go
- email_write_repository.go
- external_system_read_repository.go
- external_system_write_repository.go
- interaction_event_read_repository.go
- interaction_event_write_repository.go
- interaction_session_write_repository.go
- invoice_line_read_repository.go
- invoice_line_write_repository.go
- invoice_read_repository.go
- invoice_write_repository.go
- invoicing_cycle_read_repository.go
- invoicing_cycle_write_repository.go
- issue_read_repository.go
- issue_write_repository.go
- job_role_write_repository.go
- location_write_repository.go
- log_entry_read_repository.go
- log_entry_write_repository.go
- master_plan_read_repository.go
- master_plan_write_repository.go
- offering_read_repository.go
- offering_write_repository.go
- opportunity_read_repository.go
- opportunity_write_repository.go
- order_read_repository.go
- order_write_repository.go
- organization_plan_read_repository.go
- organization_plan_write_repository.go
- organization_read_repository.go
- organization_write_repository.go
- phone_number_read_repository.go
- phone_number_write_repository.go
- player_write_repository.go
- reminder_read_repository.go
- reminder_write_repository.go
- repositories.go
- service_line_item_read_repository.go
- service_line_item_write_repository.go
- social_write_repository.go
- state_read_repository.go
- tag_read_repository.go
- tag_write_repository.go
- tenant_read_repository.go
- tenant_write_repository.go
- timeline_event_read_repository.go
- user_read_repository.go
- user_write_repository.go
Click to show internal directories.
Click to hide internal directories.