events

package
v0.0.0-...-f01b9ca Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

View Source
const (
	OrganizationPhoneNumberLinkV1 = "V1_ORGANIZATION_PHONE_NUMBER_LINK"
	//Deprecated
	OrganizationLocationLinkV1                     = "V1_ORGANIZATION_LOCATION_LINK"
	OrganizationUpsertCustomFieldV1                = "V1_ORGANIZATION_UPSERT_CUSTOM_FIELD"
	OrganizationAddParentV1                        = "V1_ORGANIZATION_ADD_PARENT"
	OrganizationRemoveParentV1                     = "V1_ORGANIZATION_REMOVE_PARENT"
	OrganizationRefreshArrV1                       = "V1_ORGANIZATION_REFRESH_ARR"
	OrganizationRefreshRenewalSummaryV1            = "V1_ORGANIZATION_REFRESH_RENEWAL_SUMMARY"
	OrganizationUpdateOnboardingStatusV1           = "V1_ORGANIZATION_UPDATE_ONBOARDING_STATUS"
	OrganizationUpdateOwnerNotificationV1          = "V1_ORGANIZATION_UPDATE_OWNER_NOTIFICATION"
	OrganizationUpdateOwnerV1                      = "V1_ORGANIZATION_UPDATE_OWNER" //DEPRECATED
	OrganizationCreateBillingProfileV1             = "V1_ORGANIZATION_CREATE_BILLING_PROFILE"
	OrganizationUpdateBillingProfileV1             = "V1_ORGANIZATION_UPDATE_BILLING_PROFILE"
	OrganizationEmailLinkToBillingProfileV1        = "V1_ORGANIZATION_EMAIL_LINK_TO_BILLING_PROFILE"
	OrganizationEmailUnlinkFromBillingProfileV1    = "V1_ORGANIZATION_EMAIL_UNLINK_FROM_BILLING_PROFILE"
	OrganizationLocationLinkToBillingProfileV1     = "V1_ORGANIZATION_LOCATION_LINK_TO_BILLING_PROFILE"
	OrganizationLocationUnlinkFromBillingProfileV1 = "V1_ORGANIZATION_LOCATION_UNLINK_FROM_BILLING_PROFILE"
	// Deprecated
	OrganizationRequestEnrichV1      = "V1_ORGANIZATION_ENRICH"
	OrganizationRefreshDerivedDataV1 = "V1_ORGANIZATION_REFRESH_DERIVED_DATA"
	OrganizationAddLocationV1        = "V1_ORGANIZATION_ADD_LOCATION"
	OrganizationAdjustIndustryV1     = "V1_ORGANIZATION_ADJUST_INDUSTRY"
)
View Source
const (
	FieldMaskLegalName = "legalName"
	FieldMaskTaxId     = "taxId"
)

Variables

This section is empty.

Functions

func NewBillingProfileCreateEvent

func NewBillingProfileCreateEvent(aggregate eventstore.Aggregate, billingProfileId, legalName, taxId string, sourceFields common.Source, createdAt, updatedAt time.Time) (eventstore.Event, error)

func NewBillingProfileUpdateEvent

func NewBillingProfileUpdateEvent(aggregate eventstore.Aggregate, billingProfileId, legalName, taxId string, updatedAt time.Time, fieldsMask []string) (eventstore.Event, error)

func NewLinkEmailToBillingProfileEvent

func NewLinkEmailToBillingProfileEvent(aggregate eventstore.Aggregate, billingProfileId, emailId string, primary bool, updatedAt time.Time) (eventstore.Event, error)

func NewLinkLocationToBillingProfileEvent

func NewLinkLocationToBillingProfileEvent(aggregate eventstore.Aggregate, billingProfileId, locationId string, updatedAt time.Time) (eventstore.Event, error)

func NewOrganizationAddLocationEvent

func NewOrganizationAddLocationEvent(aggregate eventstore.Aggregate, locationId string, location cmnmod.Location, sourceFields cmnmod.Source, createdAt time.Time) (eventstore.Event, error)

func NewOrganizationAddParentEvent

func NewOrganizationAddParentEvent(aggregate eventstore.Aggregate, parentOrganizationId, relType string) (eventstore.Event, error)

func NewOrganizationAdjustIndustryEvent

func NewOrganizationAdjustIndustryEvent(aggregate eventstore.Aggregate) (eventstore.Event, error)

func NewOrganizationLinkLocationEvent

func NewOrganizationLinkLocationEvent(aggregate eventstore.Aggregate, locationId string, updatedAt time.Time) (eventstore.Event, error)

func NewOrganizationLinkPhoneNumberEvent

func NewOrganizationLinkPhoneNumberEvent(aggregate eventstore.Aggregate, phoneNumberId, label string, primary bool, updatedAt time.Time) (eventstore.Event, error)

func NewOrganizationOwnerUpdateEvent

func NewOrganizationOwnerUpdateEvent(aggregate eventstore.Aggregate, ownerUserId, actorUserId, organizationId string, updatedAt time.Time) (eventstore.Event, error)

func NewOrganizationOwnerUpdateNotificationEvent

func NewOrganizationOwnerUpdateNotificationEvent(aggregate eventstore.Aggregate, ownerUserId, actorUserId, organizationId string, updatedAt time.Time) (eventstore.Event, error)

func NewOrganizationRefreshArrEvent

func NewOrganizationRefreshArrEvent(aggregate eventstore.Aggregate) (eventstore.Event, error)

func NewOrganizationRefreshDerivedData

func NewOrganizationRefreshDerivedData(aggregate eventstore.Aggregate) (eventstore.Event, error)

func NewOrganizationRefreshRenewalSummaryEvent

func NewOrganizationRefreshRenewalSummaryEvent(aggregate eventstore.Aggregate) (eventstore.Event, error)

func NewOrganizationRemoveParentEvent

func NewOrganizationRemoveParentEvent(aggregate eventstore.Aggregate, parentOrganizationId string) (eventstore.Event, error)

func NewOrganizationRequestEnrich

func NewOrganizationRequestEnrich(aggregate eventstore.Aggregate, website string) (eventstore.Event, error)

func NewOrganizationUpsertCustomField

func NewOrganizationUpsertCustomField(aggregate eventstore.Aggregate, sourceFields common.Source, createdAt, updatedAt time.Time, customField model.CustomField, foundInEventStore bool) (eventstore.Event, error)

func NewUnlinkEmailFromBillingProfileEvent

func NewUnlinkEmailFromBillingProfileEvent(aggregate eventstore.Aggregate, billingProfileId, emailId string, updatedAt time.Time) (eventstore.Event, error)

func NewUnlinkLocationFromBillingProfileEvent

func NewUnlinkLocationFromBillingProfileEvent(aggregate eventstore.Aggregate, billingProfileId, locationId string, updatedAt time.Time) (eventstore.Event, error)

func NewUpdateOnboardingStatusEvent

func NewUpdateOnboardingStatusEvent(aggregate eventstore.Aggregate, status, comments, updatedByUserId, causedByContractId string, updatedAt time.Time) (eventstore.Event, error)

Types

type BillingProfileCreateEvent

type BillingProfileCreateEvent struct {
	Tenant           string        `json:"tenant" validate:"required"`
	BillingProfileId string        `json:"billingProfileId" validate:"required"`
	CreatedAt        time.Time     `json:"createdAt"`
	UpdatedAt        time.Time     `json:"updatedAt"`
	LegalName        string        `json:"legalName"`
	TaxId            string        `json:"taxId"`
	SourceFields     common.Source `json:"sourceFields" validate:"required"`
}

type BillingProfileUpdateEvent

type BillingProfileUpdateEvent struct {
	Tenant           string    `json:"tenant" validate:"required"`
	BillingProfileId string    `json:"billingProfileId" validate:"required"`
	UpdatedAt        time.Time `json:"updatedAt"`
	LegalName        string    `json:"legalName,omitempty"`
	TaxId            string    `json:"taxId,omitempty"`
	FieldsMask       []string  `json:"fieldsMask,omitempty"`
}

func (BillingProfileUpdateEvent) UpdateLegalName

func (e BillingProfileUpdateEvent) UpdateLegalName() bool

func (BillingProfileUpdateEvent) UpdateTaxId

func (e BillingProfileUpdateEvent) UpdateTaxId() bool

type LinkEmailToBillingProfileEvent

type LinkEmailToBillingProfileEvent struct {
	Tenant           string    `json:"tenant" validate:"required"`
	UpdatedAt        time.Time `json:"updatedAt"`
	BillingProfileId string    `json:"billingProfileId" validate:"required"`
	EmailId          string    `json:"emailId" validate:"required"`
	Primary          bool      `json:"primary"`
}

type LinkLocationToBillingProfileEvent

type LinkLocationToBillingProfileEvent struct {
	Tenant           string    `json:"tenant" validate:"required"`
	UpdatedAt        time.Time `json:"updatedAt"`
	BillingProfileId string    `json:"billingProfileId" validate:"required"`
	LocationId       string    `json:"locationId" validate:"required"`
}

type OrganizationAddLocationEvent

type OrganizationAddLocationEvent struct {
	Tenant        string    `json:"tenant" validate:"required"`
	LocationId    string    `json:"locationId" validate:"required"`
	Source        string    `json:"source"`
	SourceOfTruth string    `json:"sourceOfTruth"`
	AppSource     string    `json:"appSource"`
	CreatedAt     time.Time `json:"createdAt"`
	Name          string    `json:"name"`
	RawAddress    string    `json:"rawAddress"`
	Country       string    `json:"country"`
	CountryCodeA2 string    `json:"countryCodeA2"`
	CountryCodeA3 string    `json:"countryCodeA3"`
	Region        string    `json:"region"`
	District      string    `json:"district"`
	Locality      string    `json:"locality"`
	AddressLine1  string    `json:"addressLine1"`
	AddressLine2  string    `json:"addressLine2"`
	Street        string    `json:"street"`
	HouseNumber   string    `json:"houseNumber"`
	ZipCode       string    `json:"zipCode"`
	PostalCode    string    `json:"postalCode"`
	AddressType   string    `json:"addressType"`
	Commercial    bool      `json:"commercial"`
	Predirection  string    `json:"predirection"`
	PlusFour      string    `json:"plusFour"`
	TimeZone      string    `json:"timeZone"`
	UtcOffset     *float64  `json:"utcOffset"`
	Latitude      *float64  `json:"latitude"`
	Longitude     *float64  `json:"longitude"`
}

type OrganizationAddParentEvent

type OrganizationAddParentEvent struct {
	Tenant               string `json:"tenant" validate:"required"`
	ParentOrganizationId string `json:"parentOrganizationId" validate:"required"`
	Type                 string `json:"type"`
}

type OrganizationAdjustIndustryEvent

type OrganizationAdjustIndustryEvent struct {
	Tenant string `json:"tenant" validate:"required"`
}

type OrganizationLinkLocationEvent

type OrganizationLinkLocationEvent struct {
	Tenant     string    `json:"tenant" validate:"required"`
	UpdatedAt  time.Time `json:"updatedAt"`
	LocationId string    `json:"locationId" validate:"required"`
}

type OrganizationLinkPhoneNumberEvent

type OrganizationLinkPhoneNumberEvent struct {
	Tenant        string    `json:"tenant" validate:"required"`
	UpdatedAt     time.Time `json:"updatedAt"`
	PhoneNumberId string    `json:"phoneNumberId" validate:"required"`
	Label         string    `json:"label"`
	Primary       bool      `json:"primary"`
}

type OrganizationOwnerUpdateEvent

type OrganizationOwnerUpdateEvent struct {
	Tenant         string    `json:"tenant" validate:"required"`
	UpdatedAt      time.Time `json:"updatedAt"`
	OwnerUserId    string    `json:"ownerUserId" validate:"required"` // who became owner
	OrganizationId string    `json:"organizationId" validate:"required"`
	ActorUserId    string    `json:"actorUserId"` // who set the owner
}

type OrganizationRefreshArrEvent

type OrganizationRefreshArrEvent struct {
	Tenant string `json:"tenant" validate:"required"`
}

type OrganizationRefreshDerivedData

type OrganizationRefreshDerivedData struct {
	Tenant string `json:"tenant" validate:"required"`
}

type OrganizationRefreshRenewalSummaryEvent

type OrganizationRefreshRenewalSummaryEvent struct {
	Tenant string `json:"tenant" validate:"required"`
}

type OrganizationRemoveParentEvent

type OrganizationRemoveParentEvent struct {
	Tenant               string `json:"tenant" validate:"required"`
	ParentOrganizationId string `json:"parentOrganizationId" validate:"required"`
}

type OrganizationRequestEnrich

type OrganizationRequestEnrich struct {
	Tenant      string    `json:"tenant" validate:"required"`
	Website     string    `json:"website"`
	RequestedAt time.Time `json:"requestedAt"`
}

type OrganizationUpsertCustomField

type OrganizationUpsertCustomField struct {
	Tenant              string                      `json:"tenant" validate:"required"`
	Source              string                      `json:"source,omitempty"`
	SourceOfTruth       string                      `json:"sourceOfTruth,omitempty"`
	AppSource           string                      `json:"appSource,omitempty"`
	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    neo4jmodel.CustomFieldValue `json:"customFieldValue"`
}

type UnlinkEmailFromBillingProfileEvent

type UnlinkEmailFromBillingProfileEvent struct {
	Tenant           string    `json:"tenant" validate:"required"`
	UpdatedAt        time.Time `json:"updatedAt"`
	BillingProfileId string    `json:"billingProfileId" validate:"required"`
	EmailId          string    `json:"emailId" validate:"required"`
}

type UnlinkLocationFromBillingProfileEvent

type UnlinkLocationFromBillingProfileEvent struct {
	Tenant           string    `json:"tenant" validate:"required"`
	UpdatedAt        time.Time `json:"updatedAt"`
	BillingProfileId string    `json:"billingProfileId" validate:"required"`
	LocationId       string    `json:"locationId" validate:"required"`
}

type UpdateOnboardingStatusEvent

type UpdateOnboardingStatusEvent struct {
	Tenant             string    `json:"tenant" validate:"required"`
	Status             string    `json:"status" validate:"required"`
	Comments           string    `json:"comments"`
	UpdatedByUserId    string    `json:"updatedByUserId"`
	UpdatedAt          time.Time `json:"updatedAt"`
	CausedByContractId string    `json:"causedByContractId"`
}

Jump to

Keyboard shortcuts

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