entity

package
v0.0.0-...-6af0346 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 10 Imported by: 38

Documentation

Index

Constants

View Source
const GSUITE_SERVICE_EMAIL_ADDRESS = "GSUITE_SERVICE_EMAIL_ADDRESS"
View Source
const GSUITE_SERVICE_PRIVATE_KEY = "GSUITE_SERVICE_PRIVATE_KEY"
View Source
const KeyPrefix = "cos_"
View Source
const Organization = "organization"

Variables

This section is empty.

Functions

This section is empty.

Types

type AiLocationMapping

type AiLocationMapping struct {
	ID            uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	CreatedAt     time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	Input         string    `gorm:"column:input;type:text;NOT NULL;" json:"input"`
	ResponseJson  string    `gorm:"column:response_json;type:text;NOT NULL;" json:"responseJson"`
	AiPromptLogId string    `gorm:"column:ai_prompt_log_id;type:uuid;" json:"aiPromptLogId"`
}

func (AiLocationMapping) TableName

func (AiLocationMapping) TableName() string

type AiPromptLog

type AiPromptLog struct {
	ID                      string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt               time.Time `gorm:"default:CURRENT_TIMESTAMP"`
	AppSource               string    `gorm:"column:app_source;type:varchar(50);NOT NULL;" json:"appSource" binding:"required"`
	Provider                string    `gorm:"column:provider;type:varchar(50);NOT NULL;" json:"provider" binding:"required"`
	Model                   string    `gorm:"column:model;type:varchar(100);NOT NULL;" json:"model" binding:"required"`
	PromptType              string    `gorm:"column:prompt_type;type:varchar(255);NOT NULL;" json:"promptType" binding:"required"`
	PromptTemplate          *string   `gorm:"column:prompt_template;type:text;" json:"promptTemplate" binding:"required"`
	Tenant                  *string   `gorm:"column:tenant;type:varchar(100);" json:"tenant" binding:"required"`
	NodeId                  *string   `gorm:"column:node_id;type:varchar(255);" json:"nodeId" binding:"required"`
	NodeLabel               *string   `gorm:"column:node_label;type:varchar(100);" json:"nodeLabel" binding:"required"`
	Prompt                  string    `gorm:"column:prompt;type:text;NOT NULL;" json:"prompt" binding:"required"`
	RawResponse             string    `gorm:"column:raw_response;type:text;NOT NULL;" json:"rawResponse" binding:"required"`
	PostProcessError        bool      `gorm:"column:post_process_error;" json:"postProcessError" binding:"required"`
	PostProcessErrorMessage *string   `gorm:"column:post_process_error_message;type:text;" json:"postProcessErrorMessage" binding:"required"`
}

func (AiPromptLog) TableName

func (AiPromptLog) TableName() string

type ApiBillableEvent

type ApiBillableEvent struct {
	ID            uint64        `gorm:"primary_key;autoIncrement" json:"id"`
	Tenant        string        `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	Event         BillableEvent `gorm:"column:event;type:varchar(255);NOT NULL;index:idx_tenant_event" json:"event"`
	Subtype       string        `gorm:"column:subtype;type:varchar(255)" json:"subtype,omitempty"`
	Source        string        `gorm:"column:source;type:varchar(255)" json:"source,omitempty"`
	ExternalID    string        `gorm:"column:external_id;type:varchar(255);index" json:"externalId"`
	ReferenceData string        `gorm:"column:reference_data;type:text" json:"referenceData,omitempty"`
	CreatedAt     time.Time     `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
}

ApiBillableEvent represents a chargeable event in your system

func (ApiBillableEvent) TableName

func (ApiBillableEvent) TableName() string

TableName sets the name of the table for GORM

type AppKey

type AppKey struct {
	ID     uint64 `gorm:"primary_key;autoIncrement:true" json:"id"`
	AppId  string `gorm:"column:app_id;type:varchar(255);NOT NULL" json:"appId" binding:"required"`
	Key    string `gorm:"column:key;type:varchar(255);NOT NULL;index:idx_key,unique" json:"key" binding:"required"`
	Active bool   `gorm:"column:active;type:bool;NOT NULL" json:"active" binding:"required"`
}

func (AppKey) TableName

func (AppKey) TableName() string

type BaseEntity

type BaseEntity struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;not null" json:"createdAt,omitempty"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;not null" json:"updatedAt,omitempty"`
}

type BetterContactResponseBody

type BetterContactResponseBody struct {
	Id      string `json:"id"`
	Status  string `json:"status"`
	Summary struct {
		Total         int `json:"total"`
		Valid         int `json:"valid"`
		Undeliverable int `json:"undeliverable"`
		NotFound      int `json:"not_found"`
	} `json:"summary"`
	Data []struct {
		Enriched                     bool          `json:"enriched"`
		EmailProvider                string        `json:"email_provider"`
		CompanyName                  string        `json:"company_name"`
		CompanyDomain                string        `json:"company_domain"`
		ContactGender                interface{}   `json:"contact_gender"`
		CompanyIndustry              interface{}   `json:"company_industry"`
		CompanyLegalId               interface{}   `json:"company_legal_id"`
		ContactJobTitle              interface{}   `json:"contact_job_title"`
		ContactLastName              string        `json:"contact_last_name"`
		CompanyLegalName             interface{}   `json:"company_legal_name"`
		ContactFirstName             string        `json:"contact_first_name"`
		CompanyAddressCity           interface{}   `json:"company_address_city"`
		CompanyLinkedinUrl           interface{}   `json:"company_linkedin_url"`
		CompanyPhoneNumber           interface{}   `json:"company_phone_number"`
		ContactPhoneNumber           interface{}   `json:"contact_phone_number"`
		CompanyAddressState          interface{}   `json:"company_address_state"`
		CompanyIndustryCode          interface{}   `json:"company_industry_code"`
		ContactEmailAddress          string        `json:"contact_email_address"`
		CompanyAddressStreet         interface{}   `json:"company_address_street"`
		CompanyAddressCountry        interface{}   `json:"company_address_country"`
		CompanyAddressZipcode        interface{}   `json:"company_address_zipcode"`
		CompanyEmployeesNumber       interface{}   `json:"company_employees_number"`
		ContactEmailAddressStatus    string        `json:"contact_email_address_status"`
		ContactLinkedinProfileUrl    string        `json:"contact_linkedin_profile_url"`
		ContactEmailAddressProvider  string        `json:"contact_email_address_provider"`
		ContactAdditionalPhoneNumber interface{}   `json:"contact_additional_phone_number"`
		CustomFields                 []interface{} `json:"custom_fields"`
	} `json:"data"`
}

type BillableEvent

type BillableEvent string

BillableEvent is a custom type representing various events

const (
	BillableEventEmailVerifiedCatchAll     BillableEvent = "email_verified_catch_all"
	BillableEventEmailVerifiedNotCatchAll  BillableEvent = "email_verified_not_catch_all"
	BillableEventEnrichPersonEmailFound    BillableEvent = "enrich_person_email_found"
	BillableEventEnrichPersonPhoneFound    BillableEvent = "enrich_person_phone_found"
	BillableEventEnrichOrganizationSuccess BillableEvent = "enrich_organization_success"
	BillableEventIpVerificationSuccess     BillableEvent = "ip_verification_success"
	BillableEventFlowActionExecuted        BillableEvent = "flow_action_executed"
)

Constants for predefined Billable Events

type BrandfetchCompany

type BrandfetchCompany struct {
	Employees   any                  `json:"employees,omitempty"`
	FoundedYear int64                `json:"foundedYear,omitempty"`
	Industries  []BrandfetchIndustry `json:"industries,omitempty"`
	Kind        string               `json:"kind,omitempty"`
	Location    struct {
		City          string `json:"city,omitempty"`
		Country       string `json:"country,omitempty"`
		CountryCodeA2 string `json:"countryCode,omitempty"`
		Region        string `json:"region,omitempty"`
		State         string `json:"state,omitempty"`
		SubRegion     string `json:"subRegion,omitempty"`
	} `json:"location,omitempty"`
}

func (BrandfetchCompany) GetEmployees

func (bc BrandfetchCompany) GetEmployees() int64

func (BrandfetchCompany) LocationIsEmpty

func (bc BrandfetchCompany) LocationIsEmpty() bool

type BrandfetchIndustry

type BrandfetchIndustry struct {
	Score  float64 `json:"score,omitempty"`
	Name   string  `json:"name,omitempty"`
	Emoji  string  `json:"emoji,omitempty"`
	Slug   string  `json:"slug,omitempty"`
	Parent struct {
		Emoji string `json:"emoji,omitempty"`
		Name  string `json:"name,omitempty"`
		Slug  string `json:"slug,omitempty"`
	} `json:"parent,omitempty"`
}
type BrandfetchLink struct {
	Name string `json:"name,omitempty"`
	Url  string `json:"url,omitempty"`
}

type BrandfetchResponseBody

type BrandfetchResponseBody struct {
	Message         string            `json:"message,omitempty"`
	Id              string            `json:"id,omitempty"`
	Name            string            `json:"name,omitempty"`
	Domain          string            `json:"domain,omitempty"`
	Claimed         bool              `json:"claimed"`
	Description     string            `json:"description,omitempty"`
	LongDescription string            `json:"longDescription,omitempty"`
	Links           []BrandfetchLink  `json:"links,omitempty"`
	Logos           []BranfetchLogo   `json:"logos,omitempty"`
	QualityScore    float64           `json:"qualityScore,omitempty"`
	Company         BrandfetchCompany `json:"company,omitempty"`
	IsNsfw          bool              `json:"isNsfw"`
}

func (BrandfetchResponseBody) GetIconUrls

func (b BrandfetchResponseBody) GetIconUrls() []string

func (BrandfetchResponseBody) GetLogoUrls

func (b BrandfetchResponseBody) GetLogoUrls() []string

func (BrandfetchResponseBody) IsEmpty

func (b BrandfetchResponseBody) IsEmpty() bool
type BranfetchLogo struct {
	Theme   string                `json:"theme,omitempty"`
	Type    string                `json:"type,omitempty"`
	Formats []BranfetchLogoFormat `json:"formats,omitempty"`
}

type BranfetchLogoFormat

type BranfetchLogoFormat struct {
	Src        string `json:"src,omitempty"`
	Background string `json:"background,omitempty"`
	Format     string `json:"format,omitempty"`
	Height     int64  `json:"height,omitempty"`
	Width      int64  `json:"width,omitempty"`
	Size       int64  `json:"size,omitempty"`
}

type BrowserAutomationsRun

type BrowserAutomationsRun struct {
	Id              int    `gorm:"primary_key;autoIncrement:true"`
	BrowserConfigId int    `gorm:"column:browser_config_id;type:integer"`
	UserId          string `gorm:"column:user_id;type:varchar(36);"`
	Tenant          string `gorm:"column:tenant;type:varchar(36);"`
	Type            string `gorm:"column:type;type:browser_automation_run_type;"`
	Status          string `gorm:"column:status;type:browser_automation_run_status;"`
	Payload         string `gorm:"column:payload;type:text;"`
}

func (BrowserAutomationsRun) TableName

func (BrowserAutomationsRun) TableName() string

type BrowserAutomationsRunResult

type BrowserAutomationsRunResult struct {
	Id         uint64 `gorm:"primary_key;autoIncrement:true"`
	RunId      int    `gorm:"column:run_id;type:integer"`
	ResultData string `gorm:"column:result_data;type:text;"`
}

func (BrowserAutomationsRunResult) TableName

func (BrowserAutomationsRunResult) TableName() string

type BrowserConfig

type BrowserConfig struct {
	Id     int    `gorm:"primary_key;autoIncrement:true"`
	UserId string `gorm:"column:user_id;type:varchar(36);"`
	Tenant string `gorm:"column:tenant;type:varchar(36);"`
	Status string `gorm:"column:session_status;type:browser_config_session_status;"`
}

func (BrowserConfig) TableName

func (BrowserConfig) TableName() string

type CacheEmailEnrow

type CacheEmailEnrow struct {
	ID            string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	RequestID     string    `gorm:"column:request_id;type:varchar(255);NOT NULL" json:"requestId"`
	CreatedAt     time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt     time.Time `gorm:"column:updated_at;type:timestamp;" json:"updatedAt"`
	Email         string    `gorm:"column:email;type:varchar(255);NOT NULL" json:"email"`
	Qualification string    `gorm:"column:qualification;type:varchar(255)" json:"qualification"`
	Data          string    `gorm:"column:data;type:text" json:"data"`
}

func (CacheEmailEnrow) TableName

func (CacheEmailEnrow) TableName() string

type CacheEmailScrubby

type CacheEmailScrubby struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	CheckedAt time.Time `gorm:"column:checked_at;type:timestamp" json:"checkedAt"`
	Email     string    `gorm:"column:email;type:varchar(255);NOT NULL" json:"domain"`
	Status    string    `gorm:"column:status;type:varchar(255)" json:"status"`
}

func (CacheEmailScrubby) TableName

func (CacheEmailScrubby) TableName() string

type CacheEmailTrueinbox

type CacheEmailTrueinbox struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	Email     string    `gorm:"column:email;type:varchar(255);NOT NULL" json:"email"`
	Result    string    `gorm:"column:result;type:varchar(255)" json:"result"`
	Data      string    `gorm:"column:data;type:text" json:"data"`
}

func (CacheEmailTrueinbox) TableName

func (CacheEmailTrueinbox) TableName() string

type CacheEmailValidation

type CacheEmailValidation struct {
	ID                  string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt           time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt           time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	Email               string    `gorm:"column:email;type:varchar(255);NOT NULL;index:idx_cache_email_validation_email,unique" json:"email"`
	NormalizedEmail     string    `gorm:"column:normalized_email;type:varchar(255)" json:"normalizedEmail"`
	Username            string    `gorm:"column:username;type:varchar(255)" json:"username"`
	Domain              string    `gorm:"column:domain;type:varchar(255)" json:"domain"`
	IsMailboxFull       bool      `gorm:"column:is_mailbox_full;type:boolean" json:"isMailboxFull"`
	IsRoleAccount       bool      `gorm:"column:is_role_account;type:boolean" json:"isRoleAccount"`
	IsSystemGenerated   bool      `gorm:"column:is_system_generated;type:boolean" json:"isSystemGenerated"`
	IsFreeAccount       bool      `gorm:"column:is_free_account;type:boolean" json:"isFreeAccount"`
	SmtpSuccess         bool      `gorm:"column:smtp_success;type:boolean" json:"smtpSuccess"`
	ResponseCode        string    `gorm:"column:response_code;type:varchar(255)" json:"responseCode"`
	ErrorCode           string    `gorm:"column:error_code;type:varchar(255)" json:"errorCode"`
	Description         string    `gorm:"column:description;type:text" json:"description"`
	TLSRequired         bool      `gorm:"column:tls_required;type:boolean" json:"tlsRequired"`
	RetryValidation     bool      `gorm:"column:retry_validation;type:boolean" json:"retryValidation"`
	Deliverable         string    `gorm:"column:deliverable;type:varchar(16)" json:"deliverable"`
	HealthIsGreylisted  bool      `gorm:"column:health_is_greylisted;type:boolean" json:"healthIsGreylisted"`
	HealthIsBlacklisted bool      `gorm:"column:health_is_blacklisted;type:boolean" json:"healthIsBlacklisted"`
	HealthServerIP      string    `gorm:"column:health_server_ip;type:varchar(255)" json:"healthServerIP"`
	HealthFromEmail     string    `gorm:"column:health_from_email;type:varchar(255)" json:"healthFromEmail"`
	HealthRetryAfter    int       `gorm:"column:health_retry_after;type:integer" json:"healthRetryAfter"`
	AlternateEmail      string    `gorm:"column:alternate_email;type:varchar(255)" json:"alternateEmail"`
	Error               string    `gorm:"column:error;type:varchar(255)" json:"error"`
	Data                string    `gorm:"column:data;type:text" json:"data"`
}

func (CacheEmailValidation) TableName

func (CacheEmailValidation) TableName() string

type CacheEmailValidationDomain

type CacheEmailValidationDomain struct {
	ID                  string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt           time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt           time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	Domain              string    `gorm:"column:domain;type:varchar(255);NOT NULL;index:idx_cache_email_validation_domain_domain,unique" json:"domain"`
	IsCatchAll          bool      `gorm:"column:is_catch_all;type:boolean" json:"isCatchAll"`
	IsFirewalled        bool      `gorm:"column:is_firewalled;type:boolean" json:"isFirewalled"`
	Provider            string    `gorm:"column:provider;type:varchar(255)" json:"provider"`
	Firewall            string    `gorm:"column:firewall;type:varchar(255)" json:"firewall"`
	HasMXRecord         bool      `gorm:"column:has_mx_record;type:boolean" json:"hasMXRecord"`
	HasSPFRecord        bool      `gorm:"column:has_spf_record;type:boolean" json:"hasSPFRecord"`
	Error               string    `gorm:"column:error;type:varchar(255)" json:"error"`
	Data                string    `gorm:"column:data;type:text" json:"data"`
	CanConnectSMTP      bool      `gorm:"column:can_connect_smtp;type:boolean" json:"canConnectSMTP"`
	TLSRequired         bool      `gorm:"column:tls_required;type:boolean" json:"tlsRequired"`
	ResponseCode        string    `gorm:"column:response_code;type:varchar(255)" json:"responseCode"`
	ErrorCode           string    `gorm:"column:error_code;type:varchar(255)" json:"errorCode"`
	Description         string    `gorm:"column:description;type:text" json:"description"`
	HealthIsGreylisted  bool      `gorm:"column:health_is_greylisted;type:boolean" json:"healthIsGreylisted"`
	HealthIsBlacklisted bool      `gorm:"column:health_is_blacklisted;type:boolean" json:"healthIsBlacklisted"`
	HealthServerIP      string    `gorm:"column:health_server_ip;type:varchar(255)" json:"healthServerIP"`
	HealthFromEmail     string    `gorm:"column:health_from_email;type:varchar(255)" json:"healthFromEmail"`
	HealthRetryAfter    int       `gorm:"column:health_retry_after;type:integer" json:"healthRetryAfter"`
	IsPrimaryDomain     *bool     `gorm:"column:is_primary_domain;type:boolean" json:"isPrimaryDomain"`
	PrimaryDomain       string    `gorm:"column:primary_domain;type:varchar(255)" json:"primaryDomain"`
}

func (CacheEmailValidationDomain) TableName

func (CacheEmailValidationDomain) TableName() string

type CacheIpData

type CacheIpData struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	Ip        string    `gorm:"column:ip;type:varchar(255);NOT NULL;index:idx_cache_ip_data_ip,unique" json:"ip"`
	Data      string    `gorm:"column:data;type:text" json:"data"`
}

func (CacheIpData) TableName

func (CacheIpData) TableName() string

type CacheIpHunter

type CacheIpHunter struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	Ip        string    `gorm:"column:ip;type:varchar(255);NOT NULL;index:idx_cache_ip_hunter_ip,unique" json:"ip"`
	Data      string    `gorm:"column:data;type:text" json:"data"`
}

func (CacheIpHunter) TableName

func (CacheIpHunter) TableName() string

type ColumnView

type ColumnView struct {
	ColumnId      int    `json:"columnId"`
	ColumnType    string `json:"columnType"`
	Width         int    `json:"width"`
	Visible       bool   `json:"visible"`
	Name          string `json:"name"`
	Filter        string `json:"filter"`
	DefaultFilter string `json:"defaultFilter"`
}

type Columns

type Columns struct {
	Columns []ColumnView `json:"columns"`
}

type CosApiEnrichPersonTempResult

type CosApiEnrichPersonTempResult struct {
	ID                    uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	Tenant                string    `gorm:"column:tenant;type:varchar(255);" json:"tenant"`
	CreatedAt             time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	ScrapinRecordId       uint64    `gorm:"column:scrapin_record_id;type:bigint;" json:"scrapinRecordId"`
	BettercontactRecordId string    `gorm:"column:bettercontact_record_id;type:varchar(255);" json:"bettercontactRecordId"`
}

func (CosApiEnrichPersonTempResult) TableName

type CurrencyRate

type CurrencyRate struct {
	ID        uint64    `gorm:"primary_key;autoIncrement:true"`
	Currency  string    `gorm:"type:varchar(3);not null"` // Currency code (e.g., EUR, GBP, etc.)
	Rate      float64   `gorm:"not null"`                 // Exchange rate relative to USD
	Date      time.Time `gorm:"not null"`                 // Date of the exchange rate
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp"`
	Source    string    `gorm:"type:varchar(255);not null"` // Source of the exchange rate (e.g., ECB, etc.)
}

All rates are relative to USD, i.e., 1 USD = Rate Currency (1 USD = 0.93 EUR)

func (CurrencyRate) TableName

func (CurrencyRate) TableName() string

func (CurrencyRate) UniqueIndex

func (CurrencyRate) UniqueIndex() [][]string

type CustomerOsIds

type CustomerOsIds struct {
	Tenant       string    `gorm:"column:tenant;size:50;primaryKey"`
	CustomerOSID string    `gorm:"column:customer_os_id;size:30;primaryKey"`
	Entity       string    `gorm:"column:entity;size:30"`
	EntityId     string    `gorm:"column:entity_id;size:50"`
	CreatedDate  time.Time `gorm:"default:current_timestamp"`
	Attempts     int       `gorm:"column:attempts"`
}

func (CustomerOsIds) TableName

func (CustomerOsIds) TableName() string

type DMARCMonitoring

type DMARCMonitoring struct {
	ID            string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	Tenant        string    `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	CreatedAt     time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	EmailProvider string    `gorm:"column:email_provider;type:varchar(255)" json:"emailProvider"`
	Domain        string    `gorm:"column:domain;type:varchar(255)" json:"domain"`
	ReportStart   time.Time `gorm:"column:report_start;type:timestamp" json:"reportStart"`
	ReportEnd     time.Time `gorm:"column:report_end;type:timestamp" json:"reportEnd"`
	MessageCount  int       `gorm:"column:message_count;type:integer" json:"messageCount"`
	SPFPass       int       `gorm:"column:spf_pass;type:integer" json:"spfPass"`
	DKIMPass      int       `gorm:"column:dkim_pass;type:integer" json:"dkimPass"`
	DMARCPass     int       `gorm:"column:dmarc_pass;type:integer" json:"dmarcPass"`
	Data          string    `gorm:"type:text"`
}

func (DMARCMonitoring) TableName

func (DMARCMonitoring) TableName() string

type EmailImportState

type EmailImportState string
const (
	REAL_TIME           EmailImportState = "REAL_TIME"
	HISTORY             EmailImportState = "HISTORY" // this is not used in DB. this is used just in code to trigger the import for the other states
	LAST_WEEK           EmailImportState = "LAST_WEEK"
	LAST_3_MONTHS       EmailImportState = "LAST_3_MONTHS"
	LAST_YEAR           EmailImportState = "LAST_YEAR"
	OLDER_THAN_ONE_YEAR EmailImportState = "OLDER_THAN_ONE_YEAR"
)

type EmailLookup

type EmailLookup struct {
	ID             string          `gorm:"column:id;primary_key;type:varchar(64);" json:"id"`
	Tenant         string          `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	CreatedAt      time.Time       `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt      time.Time       `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	TrackerDomain  string          `gorm:"column:tracker_domain;type:varchar(255);" json:"trackerDomain"`
	MessageId      string          `gorm:"column:message_id;type:varchar(64);NOT NULL" json:"messageId"`
	LinkId         string          `gorm:"column:link_id;type:varchar(64);NOT NULL" json:"linkId"`
	RedirectUrl    string          `gorm:"column:redirect_url;type:varchar(255);NOT NULL" json:"redirectUrl"`
	Campaign       string          `gorm:"column:campaign;type:varchar(255);NOT NULL" json:"campaign"`
	Type           EmailLookupType `gorm:"column:type;type:varchar(32);NOT NULL" json:"type"`
	RecipientId    string          `gorm:"column:recipient_id;type:varchar(255);" json:"recipientId"`
	TrackOpens     bool            `gorm:"column:track_opens;type:boolean;NOT NULL" json:"trackOpens"`
	TrackClicks    bool            `gorm:"column:track_clicks;type:boolean;NOT NULL" json:"trackClicks"`
	UnsubscribeUrl string          `gorm:"column:unsubscribe_url;type:varchar(255);" json:"unsubscribeUrl"`
}

func (EmailLookup) TableName

func (EmailLookup) TableName() string

type EmailLookupType

type EmailLookupType string
const (
	EmailLookupTypeLink        EmailLookupType = "Link"
	EmailLookupTypeSpyPixel    EmailLookupType = "SpyPixel"
	EmailLookupTypeUnsubscribe EmailLookupType = "Unsubscribe"
)

type EmailMessage

type EmailMessage struct {
	ID        uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp"`

	Status EmailMessageStatus `gorm:"size:50;not null;"`

	SentAt *time.Time `gorm:"column:sent_at;type:timestamp;"`
	Error  *string    `gorm:"column:error;type:text"`

	UniqueInternalIdentifier *string `gorm:"size:255;index:unique_internal_identifier"`

	Tenant       string `gorm:"size:255;not null;index:idx_raw_email_external_system"`
	ProducerId   string `gorm:"size:255;not null;"`
	ProducerType string `gorm:"size:255;not null;"`

	//Email message data
	FromName     string   `gorm:"size:255;"`
	From         string   `gorm:"size:255;"`
	FromProvider string   `gorm:"size:255;"`
	To           []string `gorm:"-"`
	ToString     string   `gorm:"type:text;column:to"`
	Cc           []string `gorm:"-"`
	CcString     string   `gorm:"type:text;column:cc"`
	Bcc          []string `gorm:"-"`
	BccString    string   `gorm:"type:text;column:bcc"`
	Subject      string
	Content      string

	//COS interaction event id
	//deprecated
	ReplyTo *string

	//Values taken from providers
	ProviderMessageId  string `gorm:"size:255;not null;"`
	ProviderThreadId   string `gorm:"size:255;not null;"`
	ProviderInReplyTo  string `gorm:"size:255;not null;"`
	ProviderReferences string `gorm:"size:255;not null;"`
}

func (*EmailMessage) AfterFind

func (e *EmailMessage) AfterFind(tx *gorm.DB) (err error)

AfterFind hook for converting strings to slices

func (*EmailMessage) BeforeSave

func (e *EmailMessage) BeforeSave(tx *gorm.DB) (err error)

BeforeSave hook for converting slices to strings

func (EmailMessage) TableName

func (EmailMessage) TableName() string

type EmailMessageStatus

type EmailMessageStatus string
const (
	EmailMessageStatusScheduled EmailMessageStatus = "SCHEDULED"
	EmailMessageStatusSent      EmailMessageStatus = "SENT"
	EmailMessageStatusProcessed EmailMessageStatus = "PROCESSED"
	EmailMessageStatusError     EmailMessageStatus = "ERROR"
)

type EmailRawData

type EmailRawData struct {
	ProviderMessageId string            `json:"ProviderMessageId"`
	MessageId         string            `json:"MessageId"`
	Sent              time.Time         `json:"Sent"`
	Subject           string            `json:"Subject"`
	From              string            `json:"From"`
	To                string            `json:"To"`
	Cc                string            `json:"Cc"`
	Bcc               string            `json:"Bcc"`
	Html              string            `json:"Html"`
	Text              string            `json:"Text"`
	ThreadId          string            `json:"ThreadId"`
	InReplyTo         string            `json:"InReplyTo"`
	Reference         string            `json:"Reference"`
	Headers           map[string]string `json:"Headers"`
}

type EmailTracking

type EmailTracking struct {
	ID          string                 `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	Tenant      string                 `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	CreatedAt   time.Time              `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt   time.Time              `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	Timestamp   time.Time              `gorm:"column:timestamp;type:timestamp;DEFAULT:current_timestamp" json:"timestamp"`
	MessageId   string                 `gorm:"column:message_id;type:varchar(64);NOT NULL" json:"messageId"`
	LinkId      string                 `gorm:"column:link_id;type:varchar(64);" json:"linkId"`
	RecipientId string                 `gorm:"column:recipient_id;type:varchar(255);" json:"recipientId"`
	Campaign    string                 `gorm:"column:campaign;type:varchar(255);" json:"campaign"`
	EventType   EmailTrackingEventType `gorm:"column:event_type;type:varchar(255);NOT NULL" json:"eventType"`
	IP          string                 `gorm:"column:ip;type:varchar(255);" json:"ip" `
}

func (EmailTracking) TableName

func (EmailTracking) TableName() string

type EmailTrackingEventType

type EmailTrackingEventType string
const (
	EmailTrackingEventTypeOpen        EmailTrackingEventType = "email_open"
	EmailTrackingEventTypeLinkClick   EmailTrackingEventType = "email_link_click"
	EmailTrackingEventTypeUnsubscribe EmailTrackingEventType = "email_unsubscribe"
)

type EmailValidationRecord

type EmailValidationRecord struct {
	ID             uint64    `gorm:"primary_key;autoIncrement" json:"id"`
	RequestID      string    `gorm:"column:request_id;type:varchar(255);NOT NULL;index:idx_email_request_id,unique" json:"requestId"`
	Tenant         string    `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	Email          string    `gorm:"column:email;type:varchar(255);NOT NULL;index:idx_email_request_id,unique" json:"email"`
	Priority       int       `gorm:"column:priority;type:int;DEFAULT:0" json:"priority"`
	Data           string    `gorm:"column:data;type:text;NOT NULL" json:"data"`
	VerifyCatchAll bool      `gorm:"column:verify_catch_all;type:boolean;DEFAULT:false" json:"verifyCatchAll"`
	CreatedAt      time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt      time.Time `gorm:"column:updated_at;type:timestamp;" json:"updatedAt"`
}

func (EmailValidationRecord) TableName

func (EmailValidationRecord) TableName() string

type EmailValidationRequestBulk

type EmailValidationRequestBulk struct {
	RequestID           string                           `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"requestId"`
	Tenant              string                           `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenantId"`
	TotalEmails         int                              `gorm:"column:total_emails;type:int;NOT NULL" json:"totalEmails"`
	DeliverableEmails   int                              `gorm:"column:deliverable_emails;type:int;DEFAULT:0" json:"deliverableEmails"`
	UndeliverableEmails int                              `gorm:"column:undeliverable_emails;type:int;DEFAULT:0" json:"undeliverableEmails"`
	Status              EmailValidationRequestBulkStatus `gorm:"column:status;type:varchar(50);NOT NULL" json:"status"`
	CreatedAt           time.Time                        `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt           time.Time                        `gorm:"column:updated_at;type:timestamp;" json:"updatedAt"`
	FileName            string                           `gorm:"column:file_name;type:varchar(255);NOT NULL" json:"fileName"`
	Priority            int                              `gorm:"column:priority;type:int;DEFAULT:0" json:"priority"`
	VerifyCatchAll      bool                             `gorm:"column:verify_catch_all;type:boolean;DEFAULT:false" json:"verifyCatchAll"`
	FileStoreId         string                           `gorm:"column:file_store_id;type:varchar(255)" json:"fileStoreId"`
}

func (EmailValidationRequestBulk) TableName

func (EmailValidationRequestBulk) TableName() string

type EmailValidationRequestBulkStatus

type EmailValidationRequestBulkStatus string
const (
	EmailValidationRequestBulkStatusProcessing EmailValidationRequestBulkStatus = "processing"
	EmailValidationRequestBulkStatusCompleted  EmailValidationRequestBulkStatus = "completed"
)

type EnrichDetailsBetterContact

type EnrichDetailsBetterContact struct {
	ID                 string    `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	RequestID          string    `gorm:"column:request_id;type:varchar(255);NOT NULL" json:"requestId"`
	CreatedAt          time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt          time.Time `gorm:"column:updated_at;type:timestamp;" json:"updatedAt"`
	ContactFirstName   string    `gorm:"column:contact_first_name;type:varchar(255);" json:"contactFirstName"`
	ContactLastName    string    `gorm:"column:contact_last_name;type:varchar(255);" json:"contactLastName"`
	ContactLinkedInUrl string    `gorm:"column:contact_linkedin_url;type:varchar(255);" json:"contactLinkedInUrl"`
	CompanyName        string    `gorm:"column:company_name;type:varchar(255);" json:"companyName"`
	CompanyDomain      string    `gorm:"column:company_domain;type:varchar(255);" json:"companyDomain"`
	EnrichPhoneNumber  bool      `gorm:"column:enrich_phone_number;type:boolean;DEFAULT:false" json:"enrichPhoneNumber"`
	Request            string    `gorm:"column:request;type:text;" json:"request"`
	Response           string    `gorm:"column:response;type:text;" json:"response"`
}

func (EnrichDetailsBetterContact) TableName

func (EnrichDetailsBetterContact) TableName() string

type EnrichDetailsBrandfetch

type EnrichDetailsBrandfetch struct {
	ID                 uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	Domain             string    `gorm:"column:domain;type:varchar(255);DEFAULT:'';NOT NULL" json:"domain"`
	Data               string    `gorm:"column:data;type:text;DEFAULT:'';NOT NULL" json:"data"`
	CreatedAt          time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt          time.Time `gorm:"column:updated_at;type:timestamp;;DEFAULT:current_timestamp" json:"updatedAt"`
	Success            bool      `gorm:"column:success;type:boolean;DEFAULT:false" json:"success"`
	SyncedToGlobalOrgs bool      `gorm:"column:synced_to_global_orgs;type:boolean;DEFAULT:false" json:"syncedToGlobalOrgs"`
}

func (EnrichDetailsBrandfetch) TableName

func (EnrichDetailsBrandfetch) TableName() string

type EnrichDetailsPreFilterTracking

type EnrichDetailsPreFilterTracking struct {
	ID                 string    `gorm:"type:uuid;default:gen_random_uuid();primaryKey" json:"id"`
	CreatedAt          time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt          time.Time `gorm:"column:updated_at;type:timestamp;" json:"updatedAt"`
	IP                 string    `gorm:"column:ip;uniqueIndex:ip_unique;type:varchar(255);" json:"ip"`
	ShouldIdentify     *bool     `gorm:"column:should_identify;type:boolean;" json:"shouldIdentify"`
	SkipIdentifyReason string    `gorm:"column:skip_identify_reason;type:varchar(255);" json:"skipIdentifyReason"`
	Response           *string   `gorm:"column:response;type:text;" json:"response"`
}

func (EnrichDetailsPreFilterTracking) TableName

type EnrichDetailsScrapIn

type EnrichDetailsScrapIn struct {
	ID                 uint64      `gorm:"primary_key;autoIncrement:true" json:"id"`
	Flow               ScrapInFlow `gorm:"column:flow;type:varchar(255);NOT NULL" json:"flow"`
	Param1             string      `gorm:"column:param1;type:varchar(1000);" json:"param1"`
	Param2             string      `gorm:"column:param2;type:varchar(1000);" json:"param2"`
	Param3             string      `gorm:"column:param3;type:varchar(1000);" json:"param3"`
	Param4             string      `gorm:"column:param4;type:varchar(1000);" json:"param4"`
	Param5             string      `gorm:"column:param5;type:varchar(1000);" json:"param5"`
	AllParamsJson      string      `gorm:"column:all_params_json;type:text;DEFAULT:'';NOT NULL" json:"allParams"`
	Data               string      `gorm:"column:data;type:text;DEFAULT:'';NOT NULL" json:"data"`
	CreatedAt          time.Time   `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt          time.Time   `gorm:"column:updated_at;type:timestamp;;DEFAULT:current_timestamp" json:"updatedAt"`
	Success            bool        `gorm:"column:success;type:boolean;DEFAULT:false" json:"success"`
	PersonFound        bool        `gorm:"column:person_found;type:boolean;DEFAULT:false" json:"personFound"`
	CompanyFound       bool        `gorm:"column:company_found;type:boolean;DEFAULT:false" json:"companyFound"`
	SyncedToGlobalOrgs bool        `gorm:"column:synced_to_global_orgs;type:boolean;DEFAULT:false" json:"syncedToGlobalOrgs"`
}

func (EnrichDetailsScrapIn) TableName

func (EnrichDetailsScrapIn) TableName() string

type EnrichDetailsTracking

type EnrichDetailsTracking struct {
	ID             string    `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	CreatedAt      time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt      time.Time `gorm:"column:updated_at;type:timestamp;" json:"updatedAt"`
	IP             string    `gorm:"column:ip;uniqueIndex:ip_unique;type:varchar(255);" json:"ip"`
	CompanyName    *string   `gorm:"column:company_name;type:varchar(255);" json:"companyName"`
	CompanyDomain  *string   `gorm:"column:company_domain;type:varchar(255);" json:"companyDomain"`
	CompanyWebsite *string   `gorm:"column:company_website;type:varchar(255);" json:"companyWebsite"`
	SourceEmail    *string   `gorm:"column:source_email;type:varchar(255);" json:"sourceEmail"`
	Response       string    `gorm:"column:response;type:text;" json:"response"`
}

func (EnrichDetailsTracking) TableName

func (EnrichDetailsTracking) TableName() string

type EnrowResponseBody

type EnrowResponseBody struct {
	Email         string `json:"email"`
	Id            string `json:"id"`
	Qualification string `json:"qualification"`
}

type EventBuffer

type EventBuffer struct {
	Tenant          string    `gorm:"column:tenant;size:50"`
	UUID            string    `gorm:"column:uuid;size:250;primaryKey"`
	ExpiryTimestamp time.Time `gorm:"column:expiry_timestamp;size:100"`
	CreatedDate     time.Time `gorm:"default:current_timestamp"`

	EventType     string `gorm:"column:event_type;size:250"`
	EventData     []byte `gorm:"column:event_data;"`
	EventMetadata []byte `gorm:"column:event_metadata;"`

	// Deprecated
	// event store Event fields
	EventID            string    `gorm:"column:event_id;size:50"`
	EventTimestamp     time.Time `gorm:"column:event_timestamp;size:100"`
	EventAggregateType string    `gorm:"column:event_aggregate_type;size:250"`
	EventAggregateID   string    `gorm:"column:event_aggregate_id;size:250"`
	EventVersion       int64     `gorm:"column:event_version;"`
}

func (EventBuffer) TableName

func (EventBuffer) TableName() string

type ExternalAppKeys

type ExternalAppKeys struct {
	ID         uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	App        string    `gorm:"column:app;type:varchar(255);NOT NULL;index:idx_external_app_key_unique,unique" json:"app"`
	AppKey     string    `gorm:"column:app_key;type:varchar(255);NOT NULL;index:idx_external_app_key_unique,unique" json:"appKey"`
	Group1     string    `gorm:"column:group1;type:varchar(255);index:idx_external_app_key_unique,unique" json:"group1"`
	CreatedAt  time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	UsageCount int       `gorm:"column:usage_count;type:int;NOT NULL" json:"usageCount"`
}

func (ExternalAppKeys) TableName

func (ExternalAppKeys) TableName() string

type Flow

type Flow struct {
	ID             string     `gorm:"primaryKey;type:varchar(50)" json:"id"`
	Tenant         string     `gorm:"column:tenant;type:varchar(255);not null;uniqueIndex:idx_tenant_name" json:"tenant" binding:"required"`
	Name           string     `gorm:"column:name;type:varchar(255);not null;uniqueIndex:idx_tenant_name" json:"name" binding:"required"`
	Description    *string    `gorm:"column:description;type:text" json:"description"`
	TriggerOn      string     `gorm:"column:trigger_on;type:varchar(255);not null" json:"triggerOn" binding:"required"`
	TriggerNodeID  string     `gorm:"column:trigger_node_id;type:varchar(255);not null" json:"triggerNodeId" binding:"required"`
	VisibleInUI    *bool      `gorm:"column:visible_in_ui;type:boolean;default:true" json:"visibleInUI"`
	Status         string     `gorm:"column:status;type:varchar(50);not null;default:'inactive'" json:"status"`
	CreatedAt      time.Time  `gorm:"column:created_at;autoCreateTime" json:"createdAt"`
	UpdatedAt      *time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"`
	CreatedBy      *string    `gorm:"column:created_by;type:varchar(255)" json:"createdBy"`
	LastModifiedBy *string    `gorm:"column:last_modified_by;type:varchar(255)" json:"lastModifiedBy"`
}

func (Flow) TableName

func (Flow) TableName() string

type FlowAgentExecution

type FlowAgentExecution struct {
	ID              string     `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	FlowExecutionID string     `gorm:"column:flow_execution_id;type:uuid;default:gen_random_uuid()" json:"flowExecutionId"`
	FlowNodeID      string     `gorm:"column:flow_node_id;type:varchar(255)" json:"flowNodeId"`
	Agent           string     `gorm:"column:agent;type:varchar(255);not null" json:"agent" binding:"required"`
	Status          string     `gorm:"column:status;type:varchar(255);not null;default:'pending'" json:"status"`
	ScheduledFor    *time.Time `gorm:"column:scheduled_for" json:"scheduledFor"`
	StartedAt       *time.Time `gorm:"column:started_at" json:"startedAt"`
	CompletedAt     *time.Time `gorm:"column:completed_at" json:"completedAt"`
	ErrorMessage    *string    `gorm:"column:error_message;type:text" json:"errorMessage"`
	CreatedAt       time.Time  `gorm:"column:created_at;autoCreateTime" json:"createdAt"`
	UpdatedAt       *time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"`
	Result          *string    `gorm:"column:result;type:text" json:"result"`
}

func (FlowAgentExecution) TableName

func (FlowAgentExecution) TableName() string

type FlowAgentRegistry

type FlowAgentRegistry struct {
	ID           uint64          `gorm:"primaryKey;autoIncrement" json:"id"`
	Agent        string          `gorm:"column:agent;type:varchar(255);not null;index" json:"agent" binding:"required"`
	FriendlyName string          `gorm:"column:friendly_name;type:varchar(255);not null;index" json:"FriendlyName" binding:"required"`
	Description  string          `gorm:"column:description;type:varchar(255);not null" json:"description" binding:"required"`
	Instructions *datatypes.JSON `gorm:"column:instructions;type:jsonb" json:"instructions"`
	Status       string          `gorm:"column:status;type:varchar(50)" json:"status"`
}

func (FlowAgentRegistry) TableName

func (FlowAgentRegistry) TableName() string

type FlowDeadEvents

type FlowDeadEvents struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	Tenant    string    `gorm:"column:tenant;type:varchar(255);not null" json:"tenant" binding:"required"`
	NodeType  string    `gorm:"column:nodeType;type:varchar(255);not null" json:"nodeType" binding:"required"`
	EventType string    `gorm:"column:event_type;type:varchar(255);not null" json:"eventType" binding:"required"`
	Event     string    `gorm:"column:event;type:varchar(255);not null" json:"event" binding:"required"`
	CreatedAt time.Time `gorm:"column:created_at;autoCreateTime" json:"createdAt"`
	Data      *string   `gorm:"column:data;type:text" json:"data"`
}

func (FlowDeadEvents) TableName

func (FlowDeadEvents) TableName() string

type FlowEdge

type FlowEdge struct {
	ID         string     `gorm:"primaryKey;type:varchar(50)" json:"id"`
	FlowID     string     `gorm:"column:flow_id;type:varchar(50);not null;index" json:"flowId"`
	FromNodeID string     `gorm:"column:from_node_id;type:varchar(50);not null" json:"fromNodeId"`
	ToNodeID   string     `gorm:"column:to_node_id;type:varchar(50);not null" json:"toNodeId"`
	Condition  *string    `gorm:"column:condition;type:varchar(255)" json:"condition"`
	CreatedAt  time.Time  `gorm:"column:created_at;autoCreateTime" json:"createdAt"`
	UpdatedAt  *time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"`
	Status     string     `gorm:"column:status;type:varchar(50)" json:"status"`

	// used to store conditional logic
	Data *datatypes.JSON `gorm:"column:data;type:jsonb" json:"data"`
}

func (FlowEdge) TableName

func (FlowEdge) TableName() string

func (FlowEdge) UniqueIndex

func (FlowEdge) UniqueIndex() [][]string

type FlowExecution

type FlowExecution struct {
	ID                string     `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	Tenant            string     `gorm:"column:tenant;type:varchar(255);not null;index" json:"tenant" binding:"required"`
	FlowID            string     `gorm:"column:flow_id;type:varchar(255);not null;index" json:"flowId" binding:"required"`
	EntityID          string     `gorm:"column:entity_id;type:varchar(255);not null;index" json:"entityId" binding:"required"`
	EntityType        string     `gorm:"column:entity_type;type:varchar(255);not null" json:"entityType" binding:"required"`
	Status            string     `gorm:"column:status;type:varchar(255);not null" json:"status"`
	ScheduledFor      *time.Time `gorm:"column:scheduled_for" json:"scheduledFor"`
	StartedAt         *time.Time `gorm:"column:started_at;not null" json:"startedAt"`
	CompletedAt       *time.Time `gorm:"column:completed_at" json:"completedAt"`
	ErrorMessage      *string    `gorm:"column:error_message;type:text" json:"errorMessage"`
	BlockedReason     *string    `gorm:"column:blocked_reason;type:text" json:"blockedReason"`
	CurrentStep       string     `gorm:"column:current_step;type:varchar(255);index" json:"currentStep"`
	CurrentStepNodeId string     `gorm:"column:current_step_node_id;type:varchar(255);index" json:"currentStepNodeId"`
	CreatedAt         time.Time  `gorm:"column:created_at;autoCreateTime" json:"createdAt"`
	UpdatedAt         *time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"`
	Context           *string    `gorm:"column:context;type:text" json:"context"`
}

func (FlowExecution) TableName

func (FlowExecution) TableName() string

type FlowListenerRegistry

type FlowListenerRegistry struct {
	ID             uint64 `gorm:"primaryKey;autoIncrement" json:"id"`
	ExternalSystem string `gorm:"column:external_system;type:varchar(255);not null;index" json:"externalSystem" binding:"required"`
	ListenerEvent  string `gorm:"column:listener_event;type:varchar(255);not null;index" json:"listenerEvent" binding:"required"`
	FriendlyName   string `gorm:"column:friendly_name;type:varchar(255);not null;index" json:"friendlyName" binding:"required"`
	Description    string `gorm:"column:description;type:varchar(255);not null" json:"description" binding:"required"`
	Status         string `gorm:"column:status;type:varchar(50)" json:"status"`
}

func (FlowListenerRegistry) TableName

func (FlowListenerRegistry) TableName() string

type FlowNode

type FlowNode struct {
	ID        string     `gorm:"primaryKey;type:varchar(50)" json:"id"`
	FlowID    string     `gorm:"column:flow_id;type:varchar(50);not null;index" json:"flowId"`
	Type      string     `gorm:"column:type;type:varchar(50);not null" json:"type"`
	Event     *string    `gorm:"column:event;type:varchar(255)" json:"event"`
	CreatedAt time.Time  `gorm:"column:created_at;autoCreateTime" json:"createdAt"`
	UpdatedAt *time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"`
	Status    string     `gorm:"column:status;type:varchar(50)" json:"status"`

	// used to store wait time config, email subject & template, etc
	EventData *datatypes.JSON `gorm:"column:data;type:jsonb" json:"data"`
	UIData    *string         `gorm:"column:ui_data;type:varchar(255)" json:"uiData"`
}

func (FlowNode) TableName

func (FlowNode) TableName() string

func (FlowNode) UniqueIndex

func (FlowNode) UniqueIndex() [][]string

type FlowTransitionsRegistry

type FlowTransitionsRegistry struct {
	ID           uint64 `gorm:"primary_key;autoIncrement:true" json:"id"`
	FromNodeType string `gorm:"column:from_node_type;type:varchar(255);not null;index" json:"fromNodeType" binding:"required"`
	FromNode     string `gorm:"column:from_node;type:varchar(255);not null;uniqueIndex:idx_from_to_nodes;index" json:"fromNode" binding:"required"`
	ToNodeType   string `gorm:"column:to_node_type;type:varchar(255);not null;index" json:"toNodeType" binding:"required"`
	ToNode       string `gorm:"column:to_node;type:varchar(255);not null;uniqueIndex:idx_from_to_nodes;index" json:"toNode" binding:"required"`
	Status       string `gorm:"column:status;type:varchar(50)" json:"status"`
}

func (FlowTransitionsRegistry) TableName

func (FlowTransitionsRegistry) TableName() string

type FlowWebhooks

type FlowWebhooks struct {
	ID            uint64     `gorm:"primaryKey;autoIncrement" json:"id"`
	Tenant        string     `gorm:"column:tenant;type:varchar(255);not null;index" json:"tenant" binding:"required"`
	CreatedAt     time.Time  `gorm:"column:created_at;autoCreateTime" json:"createdAt"`
	UpdatedAt     *time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"`
	WebhookPath   string     `gorm:"column:webhook_path;type:varchar(255);not null" json:"webhookPath" binding:"required"`
	Integration   string     `gorm:"column:integration;type:varchar(255);index" json:"integration"`
	RotationCount int        `gorm:"column:rotation_count;type:integer" json:"rotationCount"`
	Secret        string     `gorm:"column:secret;type:varchar(255);not null" json:"secret" binding:"required"`
	Enabled       bool       `gorm:"column:enabled;type:boolean;default:true" json:"enabled"`
}

func (*FlowWebhooks) IsActive

func (fw *FlowWebhooks) IsActive() bool

func (FlowWebhooks) TableName

func (FlowWebhooks) TableName() string

func (FlowWebhooks) UniqueIndex

func (FlowWebhooks) UniqueIndex() [][]string

func (*FlowWebhooks) Validate

func (fw *FlowWebhooks) Validate() error

type GlobalOrganization

type GlobalOrganization struct {
	ID                          uint64    `gorm:"primary_key;autoIncrement" json:"id"`
	Name                        string    `gorm:"column:name;type:varchar(255)" json:"name"`
	PrimaryDomain               string    `` /* 128-byte string literal not displayed */
	OtherDomains                string    `gorm:"column:other_domains;type:text" json:"otherDomains"`
	CreatedAt                   time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt                   time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	Description                 string    `gorm:"column:description;type:text" json:"description"`
	IconUrl                     string    `gorm:"column:icon_url;type:varchar(2000)" json:"iconUrl"`
	LogoUrl                     string    `gorm:"column:logo_url;type:varchar(2000)" json:"logoUrl"`
	Website                     string    `gorm:"column:website;type:varchar(255)" json:"website"`
	LinkedInUrl                 string    `gorm:"column:linkedin;type:varchar(255)" json:"linkedin"`
	LinkedInAlias               string    `gorm:"column:linkedin_alias;type:varchar(255)" json:"linkedinAlias"`
	OtherSocials                []string  `gorm:"column:other_socials;type:text[]" json:"otherSocials"`
	ValueProposition            string    `gorm:"column:value_proposition;type:text" json:"valueProposition"`
	TargetAudience              string    `gorm:"column:target_audience;type:text" json:"targetAudience"`
	IndustryGicsSectorId        string    `gorm:"column:industry_gics_sector_id;type:varchar(255)" json:"industryGicsSectorId"`
	IndustryGicsIndustryGroupId string    `gorm:"column:industry_gics_industry_group_id;type:varchar(255)" json:"industryGicsIndustryGroupId"`
	IndustryGicsIndustryId      string    `gorm:"column:industry_gics_industry_id;type:varchar(255)" json:"industryGicsIndustryId"`
	IndustryGicsSubIndustryId   string    `gorm:"column:industry_gics_sub_industry_id;type:varchar(255)" json:"industryGicsSubIndustryId"`
	YearFounded                 int       `gorm:"column:year_founded" json:"yearFounded"`
	EmployeeCount               int64     `gorm:"column:employee_count" json:"employeeCount"`
	City                        string    `gorm:"column:city;type:varchar(255)" json:"city"`
	CountryA2                   string    `gorm:"column:country_a2;type:varchar(255)" json:"countryA2"`
}

func (GlobalOrganization) TableName

func (GlobalOrganization) TableName() string

TableName sets the name of the table for GORM

type GlobalOrganizationWebsiteToProcess

type GlobalOrganizationWebsiteToProcess struct {
	ID          uint64    `gorm:"primary_key;autoIncrement" json:"id"`
	Website     string    `gorm:"column:website;type:varchar(255)" json:"website"`
	CreatedAt   time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	ProcessedAt time.Time `gorm:"column:processed_at;type:timestamp" json:"processedAt"`
	Processed   bool      `gorm:"column:processed;type:boolean" json:"processed"`
	Notes       string    `gorm:"column:notes;type:text" json:"notes"`
}

func (GlobalOrganizationWebsiteToProcess) TableName

TableName sets the name of the table for GORM

type GoogleServiceAccountKey

type GoogleServiceAccountKey struct {
	ID         uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	TenantName string    `gorm:"size:255;not null;index:idx_tenant_api_keys"`
	Key        string    `gorm:"size:255;not null;index:idx_tenant_api_keys"`
	Value      string    `gorm:"type:text"`
}

func (GoogleServiceAccountKey) TableName

func (GoogleServiceAccountKey) TableName() string

type IPDataResponseBody

type IPDataResponseBody struct {
	StatusCode    int     `json:"status_code"`
	Message       string  `json:"message"`
	Ip            string  `json:"ip"`
	City          string  `json:"city"`
	Region        string  `json:"region"`
	RegionCode    string  `json:"region_code"`
	RegionType    string  `json:"region_type"`
	CountryName   string  `json:"country_name"`
	CountryCode   string  `json:"country_code"`
	ContinentName string  `json:"continent_name"`
	ContinentCode string  `json:"continent_code"`
	Latitude      float64 `json:"latitude"`
	Longitude     float64 `json:"longitude"`
	Asn           struct {
		Asn    string `json:"asn"`
		Name   string `json:"name"`
		Domain string `json:"domain"`
		Route  string `json:"route"`
		Type   string `json:"type"`
	} `json:"asn"`
	Carrier *struct {
		Name string `json:"name"`
		Mcc  string `json:"mcc"`
		Mnc  string `json:"mnc"`
	} `json:"carrier"`
	TimeZone struct {
		Name        string    `json:"name"`
		Abbr        string    `json:"abbr"`
		Offset      string    `json:"offset"`
		IsDst       bool      `json:"is_dst"`
		CurrentTime time.Time `json:"current_time"`
	} `json:"time_zone"`
	Threat struct {
		IsTor           bool          `json:"is_tor"`
		IsVpn           bool          `json:"is_vpn"`
		IsIcloudRelay   bool          `json:"is_icloud_relay"`
		IsProxy         bool          `json:"is_proxy"`
		IsDatacenter    bool          `json:"is_datacenter"`
		IsAnonymous     bool          `json:"is_anonymous"`
		IsKnownAttacker bool          `json:"is_known_attacker"`
		IsKnownAbuser   bool          `json:"is_known_abuser"`
		IsThreat        bool          `json:"is_threat"`
		IsBogon         bool          `json:"is_bogon"`
		Blocklists      []interface{} `json:"blocklists"`
	} `json:"threat"`
	Count string `json:"count"`
}

type IndustryMapping

type IndustryMapping struct {
	ID             uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	CreatedAt      time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	InputIndustry  string    `gorm:"column:input_industry;type:varchar(255);NOT NULL" json:"inputIndustry"`
	OutputIndustry string    `gorm:"column:output_industry;type:varchar(255);NOT NULL" json:"outputIndustry"`
}

func (IndustryMapping) TableName

func (IndustryMapping) TableName() string

type Location

type Location struct {
	CityName     string `json:"cityName"`
	RegionName   string `json:"regionName"`
	PostalCode   string `json:"postalCode"`
	StreetName   string `json:"streetName"`
	StreetNumber string `json:"streetNumber"`
	Country      struct {
		Name string `json:"name"`
		Iso2 string `json:"iso2"`
		Iso3 string `json:"iso3"`
	} `json:"country"`
	RawLocation string // To store the raw string value if the location is a single string
}

Define a custom type for Location

func (*Location) UnmarshalJSON

func (l *Location) UnmarshalJSON(data []byte) error

Implement the UnmarshalJSON method for Location

type MagicLink struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`

	Email string `gorm:"column:email;type:varchar(255);NOT NULL" json:"email"`
	Code  string `gorm:"column:code;type:varchar(255);NOT NULL" json:"code"`
	Url   string `gorm:"column:url;type:varchar(255);NOT NULL" json:"url"`
}

func (MagicLink) TableName

func (MagicLink) TableName() string

type MailStackDomain

type MailStackDomain struct {
	ID          uint64    `gorm:"primary_key;autoIncrement" json:"id"`
	Tenant      string    `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	Domain      string    `gorm:"column:domain;type:varchar(255);NOT NULL;uniqueIndex" json:"domain"`
	Configured  bool      `gorm:"column:configured;type:boolean;NOT NULL;DEFAULT:false" json:"configured"`
	CreatedAt   time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt   time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`
	Active      bool      `gorm:"column:active;type:boolean;NOT NULL;DEFAULT:true" json:"active"`
	DkimPublic  string    `gorm:"column:dkim_public;type:text" json:"dkimPublic"`
	DkimPrivate string    `gorm:"column:dkim_private;type:text" json:"dkimPrivate"`
}

func (MailStackDomain) TableName

func (MailStackDomain) TableName() string

type MailStackDomainConfiguration

type MailStackDomainConfiguration struct {
}

type MailboxStatus

type MailboxStatus string
const (
	MailboxStatusPendingProvisioning MailboxStatus = "PENDING_PROVISIONING"
	MailboxStatusProvisioned         MailboxStatus = "PROVISIONED"
)

type MailstackBuyRequest

type MailstackBuyRequest struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	Tenant    string    `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`

	Domains   string `gorm:"column:domains;type:text" json:"domains"`
	Usernames string `gorm:"column:usernames;type:text" json:"usernames"`

	PaymentIntentId string `gorm:"column:payment_intent_id;type:varchar(255)" json:"paymentIntentId"`

	Status MailstackBuyRequestStatus `gorm:"column:status;type:varchar(50)" json:"status"`
}

func (MailstackBuyRequest) TableName

func (MailstackBuyRequest) TableName() string

type MailstackBuyRequestDomain

type MailstackBuyRequestDomain struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	Tenant    string    `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`

	MailstackBuyRequestId string `gorm:"column:mailstack_buy_request_id;type:uuid;NOT NULL" json:"mailstackBuyRequestId"`
	Domain                string `gorm:"column:domain;type:varchar(255)" json:"domain"`
	RedirectWebsite       string `gorm:"column:redirect_website;type:varchar(255)" json:"redirectWebsite"`

	Status MailstackBuyRequestDomainStatus `gorm:"column:status;type:varchar(50)" json:"status"`
}

func (MailstackBuyRequestDomain) TableName

func (MailstackBuyRequestDomain) TableName() string

type MailstackBuyRequestDomainStatus

type MailstackBuyRequestDomainStatus string
const (
	MailstackBuyRequestDomainStatusPendingProvisioning  MailstackBuyRequestDomainStatus = "PENDING_PROVISIONING"
	MailstackBuyRequestDomainStatusPendingConfiguration MailstackBuyRequestDomainStatus = "PENDING_CONFIGURATION"
	MailstackBuyRequestDomainStatusCompleted            MailstackBuyRequestDomainStatus = "COMPLETED"
	MailstackBuyRequestDomainStatusFailed               MailstackBuyRequestDomainStatus = "FAILED"
)

type MailstackBuyRequestStatus

type MailstackBuyRequestStatus string
const (
	MailstackBuyRequestStatusPending   MailstackBuyRequestStatus = "PENDING"
	MailstackBuyRequestStatusCompleted MailstackBuyRequestStatus = "COMPLETED"
	MailstackBuyRequestStatusFailed    MailstackBuyRequestStatus = "FAILED"
)

type MailstackReputationEntity

type MailstackReputationEntity struct {
	ID                  string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	Tenant              string    `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	CreatedAt           time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	Domain              string    `gorm:"column:domain;type:varchar(255)" json:"domain"`
	DomainAgePenalty    int       `gorm:"column:domain_age_penalty;type:integer" json:"domainAgePenalty"`
	BlacklistPenaltyPct int       `gorm:"column:blacklist_penalty_pct;type:integer" json:"blacklistPenaltyPct"`
	BouncePenaltyPct    int       `gorm:"column:bounce_penalty_pct;type:integer" json:"bouncePenaltyPct"`
	DMARCPenaltyPct     int       `gorm:"column:dmarc_penalty_pct;type:integer" json:"dmarcPenaltyPct"`
	SPFPenaltyPct       int       `gorm:"column:spf_penalty_pct;type:integer" json:"spfPenaltyPct"`
}

func (MailstackReputationEntity) TableName

func (MailstackReputationEntity) TableName() string

type OAuthTokenEntity

type OAuthTokenEntity struct {
	Provider                  string    `gorm:"primaryKey;autoIncrement:false;index:idx_primary;column:provider;size:255;not null"`
	TenantName                string    `gorm:"primaryKey;autoIncrement:false;index:idx_primary;column:tenant_name;size:255;not null"`
	EmailAddress              string    `gorm:"primaryKey;autoIncrement:false;index:idx_primary;column:email_address;size:255;not null"`
	Type                      string    `gorm:"column:type;size:50;"`
	PlayerIdentityId          string    `gorm:"column:player_identity_id;size:255;not null"`
	AccessToken               string    `gorm:"column:access_token;type:text"`
	RefreshToken              string    `gorm:"column:refresh_token;type:text"`
	NeedsManualRefresh        bool      `gorm:"column:needs_manual_refresh;default:false;"`
	IdToken                   string    `gorm:"column:id_token;type:text"`
	ExpiresAt                 time.Time `gorm:"column:expires_at;type:timestamp;"`
	Scope                     string    `gorm:"column:scope;type:text"`
	GmailSyncEnabled          bool      `gorm:"column:gmail_sync_enabled;default:false;"`
	GoogleCalendarSyncEnabled bool      `gorm:"column:google_calendar_sync_enabled;default:false;"`
}

func (OAuthTokenEntity) TableName

func (OAuthTokenEntity) TableName() string

type OrganizationWebsiteHostingPlatform

type OrganizationWebsiteHostingPlatform struct {
	ID         string    `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	UrlPattern string    `gorm:"size:255;NOT NULL"`
	CreatedAt  time.Time `gorm:"default:CURRENT_TIMESTAMP"`
}

func (OrganizationWebsiteHostingPlatform) TableName

type PersonalEmailProvider

type PersonalEmailProvider struct {
	ID             uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	ProviderName   string    `gorm:"size:255;not null;"`
	ProviderDomain string    `gorm:"size:255;not null;index:idx_provider_domain"`
	CreatedAt      time.Time `gorm:"default:CURRENT_TIMESTAMP"`
}

func (PersonalEmailProvider) TableName

func (PersonalEmailProvider) TableName() string

type PersonalIntegration

type PersonalIntegration struct {
	ID         uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	TenantName string    `gorm:"column:tenant_name;type:varchar(255);NOT NULL" json:"tenantName" binding:"required"`
	Name       string    `gorm:"column:name;type:varchar(255);NOT NULL" json:"name" binding:"required"`
	Email      string    `gorm:"column:email;type:varchar(255);NOT NULL" json:"email" binding:"required"`
	Secret     string    `gorm:"column:key;type:varchar(255);NOT NULL;index:idx_key,unique" json:"key" binding:"required"`
	Active     bool      `gorm:"column:active;type:boolean;DEFAULT:true" json:"active"`
	CreatedAt  time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`
}

func (PersonalIntegration) TableName

func (PersonalIntegration) TableName() string

func (PersonalIntegration) UniqueIndex

func (PersonalIntegration) UniqueIndex() [][]string

type PostmarkApiKey

type PostmarkApiKey struct {
	ID         uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	TenantName string    `gorm:"column:tenant_name;type:varchar(255);NOT NULL" json:"tenantName" binding:"required"`
	Key        string    `gorm:"column:key;type:varchar(255);NOT NULL;index:idx_key,unique" json:"key" binding:"required"`
	CreatedAt  time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`
}

func (PostmarkApiKey) TableName

func (PostmarkApiKey) TableName() string

type RawEmail

type RawEmail struct {
	ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`

	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	SentAt    time.Time `gorm:"column:sent_at;type:timestamp;DEFAULT:current_timestamp" json:"sentAt"`

	ExternalSystem    string           `gorm:"size:255;not null;index:idx_raw_email_external_system"`
	Tenant            string           `gorm:"size:255;not null;index:idx_raw_email_external_system"`
	Username          string           `gorm:"size:255;not null;index:idx_raw_email_external_system"`
	State             EmailImportState `gorm:"size:255;not null;"`
	ProviderMessageId string           `gorm:"size:255;not null;"`
	MessageId         string           `gorm:"size:255;not null;index:idx_raw_email_external_system"`

	Status        string  `gorm:"column:status;size:50;not null"`
	Reason        *string `gorm:"column:reason;type:text"`
	Error         *string `gorm:"column:error;type:text"`
	BouncedEmails *string `gorm:"column:bounced_emails;type:text"`

	Data string `gorm:"type:text"`
}

func (RawEmail) TableName

func (RawEmail) TableName() string

type RawState

type RawState string
const (
	PENDING   RawState = "PENDING"
	SKIPPED   RawState = "SKIPPED"
	ERROR     RawState = "ERROR"
	PROCESSED RawState = "PROCESSED"
)

func (RawState) String

func (rawState RawState) String() string

type ScrapInFlow

type ScrapInFlow string
const (
	ScrapInFlowPersonSearch   ScrapInFlow = "PERSON_SEARCH"
	ScrapInFlowPersonProfile  ScrapInFlow = "PERSON_PROFILE"
	ScrapInFlowCompanySearch  ScrapInFlow = "COMPANY_SEARCH"
	ScrapInFlowCompanyProfile ScrapInFlow = "COMPANY_PROFILE"
)

type ScrapInResponseBody

type ScrapInResponseBody struct {
	Success       bool                   `json:"success"`
	Email         string                 `json:"email"`
	EmailType     string                 `json:"emailType"`
	CreditsLeft   int                    `json:"credits_left"`
	RateLimitLeft int                    `json:"rate_limit_left"`
	Person        *ScrapinPersonDetails  `json:"person,omitempty"`
	Company       *ScrapinCompanyDetails `json:"company,omitempty"`
}

ScrapInResponseBody is getting serialized in the Data field

type ScrapinCompanyDetails

type ScrapinCompanyDetails struct {
	LinkedInId         string `json:"linkedInId"`
	Name               string `json:"name"`
	UniversalName      string `json:"universalName"`
	LinkedInUrl        string `json:"linkedInUrl"`
	EmployeeCount      int    `json:"employeeCount"`
	EmployeeCountRange struct {
		Start int `json:"start"`
		End   int `json:"end"`
	} `json:"employeeCountRange"`
	WebsiteUrl    string      `json:"websiteUrl"`
	Tagline       interface{} `json:"tagline"` // Can be null, so use interface{}
	Description   string      `json:"description"`
	Industry      string      `json:"industry"`
	Phone         interface{} `json:"phone"` // Can be null, so use interface{}
	Specialities  []string    `json:"specialities"`
	FollowerCount int         `json:"followerCount"`
	Headquarter   struct {
		City           string      `json:"city"`
		Country        string      `json:"country"`
		PostalCode     string      `json:"postalCode"`
		GeographicArea string      `json:"geographicArea"`
		Street1        string      `json:"street1"`
		Street2        interface{} `json:"street2"` // Can be null, so use interface{}
	} `json:"headquarter"`
	FoundedOn struct {
		Year int `json:"year"`
	}
}

func (ScrapinCompanyDetails) GetEmployeeCount

func (c ScrapinCompanyDetails) GetEmployeeCount() int64

func (ScrapinCompanyDetails) HeadquarterIsEmpty

func (c ScrapinCompanyDetails) HeadquarterIsEmpty() bool

type ScrapinPersonDetails

type ScrapinPersonDetails struct {
	PublicIdentifier   string `json:"publicIdentifier"`
	LinkedInIdentifier string `json:"linkedInIdentifier"`
	LinkedInUrl        string `json:"linkedInUrl"`
	FirstName          string `json:"firstName"`
	LastName           string `json:"lastName"`
	Headline           string `json:"headline"`
	Location           string `json:"location"`
	Summary            string `json:"summary"`
	PhotoUrl           string `json:"photoUrl"`
	CreationDate       struct {
		Month int `json:"month"`
		Year  int `json:"year"`
	} `json:"creationDate"`
	FollowerCount int `json:"followerCount"`
	Positions     struct {
		PositionsCount  int `json:"positionsCount"`
		PositionHistory []struct {
			Title        string `json:"title"`
			CompanyName  string `json:"companyName"`
			Description  string `json:"description"`
			StartEndDate struct {
				Start *struct {
					Month int `json:"month"`
					Year  int `json:"year"`
				} `json:"start"`
				End *struct {
					Month int `json:"month"`
					Year  int `json:"year"`
				} `json:"end"`
			} `json:"startEndDate"`
			CompanyLogo string `json:"companyLogo"`
			LinkedInUrl string `json:"linkedInUrl"`
			LinkedInId  string `json:"linkedInId"`
		} `json:"positionHistory"`
	} `json:"positions"`
	Schools struct {
		EducationsCount  int `json:"educationsCount"`
		EducationHistory []struct {
			DegreeName   string      `json:"degreeName"`
			FieldOfStudy string      `json:"fieldOfStudy"`
			Description  interface{} `json:"description"` // Can be null, so use interface{}
			LinkedInUrl  string      `json:"linkedInUrl"`
			SchoolLogo   string      `json:"schoolLogo"`
			SchoolName   string      `json:"schoolName"`
			StartEndDate struct {
				Start struct {
					Month *int `json:"month"` // Can be null, so use pointer
					Year  *int `json:"year"`  // Can be null, so use pointer
				} `json:"start"`
				End struct {
					Month *int `json:"month"` // Can be null, so use pointer
					Year  *int `json:"year"`  // Can be null, so use pointer
				} `json:"end"`
			} `json:"startEndDate"`
		} `json:"educationHistory"`
	} `json:"schools"`
	Skills    []interface{} `json:"skills"`    // Can be empty, so use interface{}
	Languages []interface{} `json:"languages"` // Can be empty, so use interface{}
}

type ScrubbyStatus

type ScrubbyStatus string
const (
	ScrubbyStatusPending ScrubbyStatus = "pending"
	ScrubbyStatusValid   ScrubbyStatus = "Valid"
	ScrubbyStatusInvalid ScrubbyStatus = "Invalid"

	ScrubbyStatusLowercasePending ScrubbyStatus = "pending"
	ScrubbyStatusLowercaseValid   ScrubbyStatus = "valid"
	ScrubbyStatusLowercaseInvalid ScrubbyStatus = "invalid"
)

type SlackChannel

type SlackChannel struct {
	ID             uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	Source         string    `gorm:"column:source;type:varchar(255);"`
	CreatedAt      time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp"`
	UpdatedAt      time.Time `gorm:"column:updated_at;type:timestamp"`
	TenantName     string    `gorm:"column:tenant_name;type:varchar(255);NOT NULL"`
	ChannelId      string    `gorm:"column:channel_id;type:varchar(255);NOT NULL"`
	ChannelName    string    `gorm:"column:channel_name;type:varchar(255);"`
	OrganizationId *string   `gorm:"column:organization_id;type:varchar(255);"`
}

func (SlackChannel) TableName

func (SlackChannel) TableName() string

func (SlackChannel) UniqueIndex

func (SlackChannel) UniqueIndex() [][]string

type SlackChannelNotification

type SlackChannelNotification struct {
	ID        uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp"`
	Tenant    string    `gorm:"column:tenant;type:varchar(255);NOT NULL"`
	ChannelId string    `gorm:"column:channel_id;type:varchar(255);NOT NULL"`
	Workflow  string    `gorm:"column:workflow;type:varchar(255);"`
}

send notifications to slack channels tenants can configure this for particular workflows

func (SlackChannelNotification) TableName

func (SlackChannelNotification) TableName() string

func (SlackChannelNotification) UniqueIndex

func (SlackChannelNotification) UniqueIndex() [][]string

type SlackSettingsEntity

type SlackSettingsEntity struct {
	Id           uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	TenantName   string    `gorm:"index:idx_tenant_uk;size:255;not null"`
	CreatedAt    time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt    time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	AppId        string    `gorm:"size:255;"`
	AuthedUserId string    `gorm:"size:255;"`
	Scope        string    `gorm:"size:255;"`
	TokenType    string    `gorm:"size:255;"`
	AccessToken  string    `gorm:"size:255;"`
	BotUserId    string    `gorm:"size:255;"`
	TeamId       string    `gorm:"size:255;"`
}

func (SlackSettingsEntity) TableName

func (SlackSettingsEntity) TableName() string

type SnitcherResponseBody

type SnitcherResponseBody struct {
	Fuzzy   bool   `json:"fuzzy"`
	Domain  string `json:"domain"`
	Type    string `json:"type"`
	Company *struct {
		Name          string      `json:"name"`
		Domain        string      `json:"domain"`
		Website       string      `json:"website"`
		Industry      string      `json:"industry"`
		FoundedYear   interface{} `json:"founded_year"`
		EmployeeRange string      `json:"employee_range"`
		AnnualRevenue interface{} `json:"annual_revenue"`
		TotalFunding  interface{} `json:"total_funding"`
		Location      Location    `json:"location"`
		Description   string      `json:"description"`
		Phone         string      `json:"phone"`
		Geo           struct {
			Country      string  `json:"country"`
			CountryCode  string  `json:"country_code"`
			State        string  `json:"state"`
			StateCode    *string `json:"state_code"`
			PostalCode   *string `json:"postal_code"`
			City         string  `json:"city"`
			Street       *string `json:"street"`
			StreetNumber *string `json:"street_number"`
		} `json:"geo"`
		Profiles *struct {
			Crunchbase *struct {
				Handle string      `json:"handle"`
				Url    interface{} `json:"url"`
			} `json:"crunchbase"`
			Linkedin *struct {
				Handle string `json:"handle"`
				Url    string `json:"url"`
			} `json:"linkedin"`
			Facebook *struct {
				Handle string `json:"handle"`
				Url    string `json:"url"`
			} `json:"facebook"`
			Twitter *struct {
				Handle string `json:"handle"`
				Url    string `json:"url"`
			} `json:"twitter"`
			Instagram *struct {
				Handle string      `json:"handle"`
				Url    interface{} `json:"url"`
			} `json:"instagram"`
			Youtube *struct {
				Handle string      `json:"handle"`
				Url    interface{} `json:"url"`
			} `json:"youtube"`
		} `json:"profiles"`
	} `json:"company"`
	GeoIP struct {
		Country     string `json:"country"`
		CountryCode string `json:"country_code"`
		City        string `json:"city"`
		State       string `json:"state"`
	} `json:"geoIP"`
}

func (SnitcherResponseBody) HasLocation

func (location SnitcherResponseBody) HasLocation() bool

func (SnitcherResponseBody) HasRawLocation

func (location SnitcherResponseBody) HasRawLocation() bool

func (SnitcherResponseBody) LocationToString

func (location SnitcherResponseBody) LocationToString() string

type StatsApiCalls

type StatsApiCalls struct {
	ID        uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	Tenant    string    `gorm:"column:tenant;type:varchar(255);NOT NULL;index:idx_stats_api_calls_unique,unique" json:"tenant"`
	Api       string    `gorm:"column:api;type:varchar(255);NOT NULL;index:idx_stats_api_calls_unique,unique" json:"api"`
	Day       time.Time `gorm:"column:day;type:date;NOT NULL;index:idx_stats_api_calls_unique,unique" json:"day"`
	Calls     uint64    `gorm:"column:calls;type:bigint;NOT NULL" json:"calls"`
}

func (StatsApiCalls) TableName

func (StatsApiCalls) TableName() string

type TableViewDefinition

type TableViewDefinition struct {
	ID             uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	CreatedAt      time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt      time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	Tenant         string    `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	UserId         string    `gorm:"column:user_id;type:varchar(255)" json:"userId"`
	TableId        string    `gorm:"column:table_id;type:varchar(255);NOT NULL;DEFAULT:''" json:"tableId"`
	TableType      string    `gorm:"column:table_type;type:varchar(255);NOT NULL" json:"tableType"`
	Name           string    `gorm:"column:table_name;type:varchar(255);NOT NULL" json:"tableName"`
	Order          int       `gorm:"column:position;type:int;NOT NULL" json:"order"`
	Icon           string    `gorm:"column:icon;type:varchar(255)" json:"icon"`
	Filters        string    `gorm:"column:filters;type:text" json:"filters"`
	DefaultFilters string    `gorm:"column:default_filters;type:text" json:"defaultFilters"`
	Sorting        string    `gorm:"column:sorting;type:text" json:"sorting"`
	ColumnsJson    string    `gorm:"column:columns;type:text" json:"columns"`
	IsPreset       bool      `gorm:"column:is_preset;type:boolean;NOT NULL;DEFAULT:false" json:"isPreset"`
	IsShared       bool      `gorm:"column:is_shared;type:boolean;NOT NULL;DEFAULT:false" json:"isShared"`
}

func (TableViewDefinition) TableName

func (TableViewDefinition) TableName() string

type Tenant

type Tenant struct {
	Name      string    `gorm:"primary_key;type:varchar(255);NOT NULL" json:"name"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	HashID    string    `gorm:"column:tenant_hash;type:varchar(25)" json:"hashID"`
}

func (Tenant) TableName

func (Tenant) TableName() string

type TenantSettings

type TenantSettings struct {
	ID         string `gorm:"primary_key;type:uuid;default:gen_random_uuid()"`
	TenantName string `gorm:"column:tenant_name;type:varchar(255);NOT NULL" binding:"required"`

	SmartSheetId          *string `gorm:"column:smart_sheet_id;type:varchar(255);" binding:"required"`
	SmartSheetAccessToken *string `gorm:"column:smart_sheet_access_token;type:varchar(255);"  binding:"required"`

	JiraAPIToken *string `gorm:"column:jira_api_token;type:varchar(255);" binding:"required"`
	JiraDomain   *string `gorm:"column:jira_domain;type:varchar(255);" binding:"required"`
	JiraEmail    *string `gorm:"column:jira_email;type:varchar(255);" binding:"required"`

	TrelloAPIToken *string `gorm:"column:trello_api_token;type:varchar(255);" binding:"required"`
	TrelloAPIKey   *string `gorm:"column:trello_api_key;type:varchar(255);"  binding:"required"`

	AhaAPIUrl *string `gorm:"column:aha_api_url;type:varchar(255);"  binding:"required"`
	AhaAPIKey *string `gorm:"column:aha_api_key;type:varchar(255);"  binding:"required"`

	AirtablePersonalAccessToken *string `gorm:"column:airtable_personal_access_token;type:varchar(255);"  binding:"required"`

	AmplitudeAPIKey    *string `gorm:"column:amplitude_api_key;type:varchar(255);"  binding:"required"`
	AmplitudeSecretKey *string `gorm:"column:amplitude_secret_key;type:varchar(255);" binding:"required"`

	AsanaAccessToken *string `gorm:"column:asana_access_token;type:varchar(255);"  binding:"required"`

	BatonAPIKey *string `gorm:"column:baton_api_key;type:varchar(255);"  binding:"required"`

	BabelforceRegionEnvironment *string `gorm:"column:babelforce_region_environment;type:varchar(255);"  binding:"required"`
	BabelforceAccessKeyId       *string `gorm:"column:babelforce_access_key_id;type:varchar(255);"  binding:"required"`
	BabelforceAccessToken       *string `gorm:"column:babelforce_access_token;type:varchar(255);" binding:"required"`

	BigQueryServiceAccountKey *string `gorm:"column:bigquery_service_account_key;type:varchar(255);" binding:"required"`

	BraintreePublicKey   *string `gorm:"column:braintree_public_key;type:varchar(255);" binding:"required"`
	BraintreePrivateKey  *string `gorm:"column:braintree_private_key;type:varchar(255);"  binding:"required"`
	BraintreeEnvironment *string `gorm:"column:braintree_environment;type:varchar(255);"  binding:"required"`
	BraintreeMerchantId  *string `gorm:"column:braintree_merchant_id;type:varchar(255);"  binding:"required"`

	CallRailAccount  *string `gorm:"column:callrail_account;type:varchar(255);" binding:"required"`
	CallRailApiToken *string `gorm:"column:callrail_api_token;type:varchar(255);"  binding:"required"`

	ChargebeeApiKey         *string `gorm:"column:chargebee_api_key;type:varchar(255);" binding:"required"`
	ChargebeeProductCatalog *string `gorm:"column:chargebee_product_catalog;type:varchar(255);" binding:"required"`

	ChargifyApiKey *string `gorm:"column:chargify_api_key;type:varchar(255);" binding:"required"`
	ChargifyDomain *string `gorm:"column:chargify_domain;type:varchar(255);" binding:"required"`

	ClickUpApiKey *string `gorm:"column:clickup_api_key;type:varchar(255);" binding:"required"`

	CloseComApiKey *string `gorm:"column:closecom_api_key;type:varchar(255);" binding:"required"`

	CodaAuthToken  *string `gorm:"column:coda_auth_token;type:varchar(255);" binding:"required"`
	CodaDocumentId *string `gorm:"column:coda_document_id;type:varchar(255);" binding:"required"`

	ConfluenceApiToken   *string `gorm:"column:confluence_api_token;type:varchar(255);" binding:"required"`
	ConfluenceDomain     *string `gorm:"column:confluence_domain;type:varchar(255);" binding:"required"`
	ConfluenceLoginEmail *string `gorm:"column:confluence_login_email;type:varchar(255);" binding:"required"`

	CourierApiKey *string `gorm:"column:courier_api_key;type:varchar(255);" binding:"required"`

	CustomerIoApiKey *string `gorm:"column:customerio_api_key;type:varchar(255);" binding:"required"`

	DatadogApiKey         *string `gorm:"column:datadog_api_key;type:varchar(255);" binding:"required"`
	DatadogApplicationKey *string `gorm:"column:datadog_application_key;type:varchar(255);" binding:"required"`

	DelightedApiKey *string `gorm:"column:delighted_api_key;type:varchar(255);" binding:"required"`

	DixaApiToken *string `gorm:"column:dixa_api_token;type:varchar(255);" binding:"required"`

	DriftApiToken *string `gorm:"column:drift_api_token;type:varchar(255);" binding:"required"`

	EmailOctopusApiKey *string `gorm:"column:emailoctopus_api_key;type:varchar(255);" binding:"required"`

	FacebookMarketingAccessToken *string `gorm:"column:facebook_marketing_access_token;type:varchar(255);"  binding:"required"`

	FastbillApiKey    *string `gorm:"column:fastbill_api_key;type:varchar(255);" binding:"required"`
	FastbillProjectId *string `gorm:"column:fastbill_project_id;type:varchar(255);" binding:"required"`

	FlexportApiKey *string `gorm:"column:flexport_api_key;type:varchar(255);" binding:"required"`

	FreshcallerApiKey *string `gorm:"column:freshcaller_api_key;type:varchar(255);" binding:"required"`

	FreshdeskApiKey *string `gorm:"column:freshdesk_api_key;type:varchar(255);" binding:"required"`
	FreshdeskDomain *string `gorm:"column:freshdesk_domain;type:varchar(255);" binding:"required"`

	FreshsalesApiKey *string `gorm:"column:freshsales_api_key;type:varchar(255);" binding:"required"`
	FreshsalesDomain *string `gorm:"column:freshsales_domain;type:varchar(255);" binding:"required"`

	FreshserviceApiKey *string `gorm:"column:freshservice_api_key;type:varchar(255);" binding:"required"`
	FreshserviceDomain *string `gorm:"column:freshservice_domain;type:varchar(255);" binding:"required"`

	GenesysRegion       *string `gorm:"column:genesys_region;type:varchar(255);" binding:"required"`
	GenesysClientId     *string `gorm:"column:genesys_client_id;type:varchar(255);" binding:"required"`
	GenesysClientSecret *string `gorm:"column:genesys_client_secret;type:varchar(255);" binding:"required"`

	GitHubAccessToken *string `gorm:"column:github_access_token;type:varchar(255);" binding:"required"`

	GitLabAccessToken *string `gorm:"column:gitlab_access_token;type:varchar(255);" binding:"required"`

	GoCardlessAccessToken *string `gorm:"column:gocardless_access_token;type:varchar(255);" binding:"required"`
	GoCardlessEnvironment *string `gorm:"column:gocardless_environment;type:varchar(255);" binding:"required"`
	GoCardlessVersion     *string `gorm:"column:gocardless_version;type:varchar(255);" binding:"required"`

	GongApiKey *string `gorm:"column:gong_api_key;type:varchar(255);" binding:"required"`

	HarvestAccountId   *string `gorm:"column:harvest_account_id;type:varchar(255);" binding:"required"`
	HarvestAccessToken *string `gorm:"column:harvest_access_token;type:varchar(255);" binding:"required"`

	InsightlyApiToken *string `gorm:"column:insightly_api_token;type:varchar(255);" binding:"required"`

	InstagramAccessToken *string `gorm:"column:instagram_access_token;type:varchar(255);" binding:"required"`

	InstatusApiKey *string `gorm:"column:instatus_api_key;type:varchar(255);" binding:"required"`

	IntercomAccessToken *string `gorm:"column:intercom_access_token;type:varchar(255);" binding:"required"`

	KlaviyoApiKey *string `gorm:"column:klaviyo_api_key;type:varchar(255);" binding:"required"`

	KustomerApiToken *string `gorm:"column:kustomer_api_token;type:varchar(255);" binding:"required"`

	LookerClientId     *string `gorm:"column:looker_client_id;type:varchar(255);" binding:"required"`
	LookerClientSecret *string `gorm:"column:looker_client_secret;type:varchar(255);" binding:"required"`
	LookerDomain       *string `gorm:"column:looker_domain;type:varchar(255);" binding:"required"`

	MailchimpApiKey *string `gorm:"column:mailchimp_api_key;type:varchar(255);" binding:"required"`

	MailjetEmailApiKey    *string `gorm:"column:mailjet_email_api_key;type:varchar(255);" binding:"required"`
	MailjetEmailApiSecret *string `gorm:"column:mailjet_email_api_secret;type:varchar(255);" binding:"required"`

	MarketoClientId     *string `gorm:"column:marketo_client_id;type:varchar(255);" binding:"required"`
	MarketoClientSecret *string `gorm:"column:marketo_client_secret;type:varchar(255);" binding:"required"`
	MarketoDomainUrl    *string `gorm:"column:marketo_domain_url;type:varchar(255);" binding:"required"`

	MicrosoftTeamsTenantId     *string `gorm:"column:microsoft_teams_tenant_id;type:varchar(255);" binding:"required"`
	MicrosoftTeamsClientId     *string `gorm:"column:microsoft_teams_client_id;type:varchar(255);" binding:"required"`
	MicrosoftTeamsClientSecret *string `gorm:"column:microsoft_teams_client_secret;type:varchar(255);" binding:"required"`

	MondayApiToken *string `gorm:"column:monday_api_token;type:varchar(255);" binding:"required"`

	NotionInternalAccessToken *string `gorm:"column:notion_internal_access_token;type:varchar(255);" binding:"required"`
	NotionPublicAccessToken   *string `gorm:"column:notion_public_access_token;type:varchar(255);" binding:"required"`
	NotionPublicClientId      *string `gorm:"column:notion_public_client_id;type:varchar(255);" binding:"required"`
	NotionPublicClientSecret  *string `gorm:"column:notion_public_client_secret;type:varchar(255);" binding:"required"`

	OracleNetsuiteAccountId      *string `gorm:"column:oracle_netsuite_account_id;type:varchar(255);" binding:"required"`
	OracleNetsuiteConsumerKey    *string `gorm:"column:oracle_netsuite_consumer_key;type:varchar(255);" binding:"required"`
	OracleNetsuiteConsumerSecret *string `gorm:"column:oracle_netsuite_consumer_secret;type:varchar(255);" binding:"required"`
	OracleNetsuiteTokenId        *string `gorm:"column:oracle_netsuite_token_id;type:varchar(255);" binding:"required"`
	OracleNetsuiteTokenSecret    *string `gorm:"column:oracle_netsuite_token_secret;type:varchar(255);" binding:"required"`

	OrbApiKey *string `gorm:"column:orb_api_key;type:varchar(255);" binding:"required"`

	OrbitApiKey *string `gorm:"column:orbit_api_key;type:varchar(255);" binding:"required"`

	PagerDutyApikey *string `gorm:"column:pager_duty_apikey;type:varchar(255);" binding:"required"`

	PaypalTransactionClientId *string `gorm:"column:paypal_transaction_client_id;type:varchar(255);" binding:"required"`
	PaypalTransactionSecret   *string `gorm:"column:paypal_transaction_secret;type:varchar(255);" binding:"required"`

	PaystackSecretKey      *string `gorm:"column:paystack_secret_key;type:varchar(255);" binding:"required"`
	PaystackLookbackWindow *string `gorm:"column:paystack_lookback_window;type:varchar(255);" binding:"required"`

	PendoApiToken *string `gorm:"column:pendo_api_token;type:varchar(255);" binding:"required"`

	PipedriveApiToken *string `gorm:"column:pipedrive_api_token;type:varchar(255);" binding:"required"`

	PlaidAccessToken *string `gorm:"column:plaid_access_token;type:varchar(255);" binding:"required"`

	PlausibleApiKey *string `gorm:"column:plausible_api_key;type:varchar(255);" binding:"required"`
	PlausibleSiteId *string `gorm:"column:plausible_site_id;type:varchar(255);" binding:"required"`

	PostHogApiKey  *string `gorm:"column:post_hog_api_key;type:varchar(255);" binding:"required"`
	PostHogBaseUrl *string `gorm:"column:post_hog_base_url;type:varchar(255);" binding:"required"`

	QualarooApiKey   *string `gorm:"column:qualaroo_api_key;type:varchar(255);" binding:"required"`
	QualarooApiToken *string `gorm:"column:qualaroo_api_token;type:varchar(255);" binding:"required"`

	QuickBooksClientId     *string `gorm:"column:quick_books_client_id;type:varchar(255);" binding:"required"`
	QuickBooksClientSecret *string `gorm:"column:quick_books_client_secret;type:varchar(255);" binding:"required"`
	QuickBooksRealmId      *string `gorm:"column:quick_books_realm_id;type:varchar(255);" binding:"required"`
	QuickBooksRefreshToken *string `gorm:"column:quick_books_refresh_token;type:varchar(255);" binding:"required"`

	RechargeApiToken *string `gorm:"column:recharge_api_token;type:varchar(255);" binding:"required"`

	RecruiteeCompanyId *string `gorm:"column:recruitee_company_id;type:varchar(255);" binding:"required"`
	RecruiteeApiKey    *string `gorm:"column:recruitee_api_key;type:varchar(255);" binding:"required"`

	RecurlyApiKey *string `gorm:"column:recurly_api_key;type:varchar(255);" binding:"required"`

	RetentlyApiToken *string `gorm:"column:retently_api_token;type:varchar(255);" binding:"required"`

	SalesloftApiKey *string `gorm:"column:salesloft_api_key;type:varchar(255);" binding:"required"`

	SendgridApiKey *string `gorm:"column:sendgrid_api_key;type:varchar(255);" binding:"required"`

	SentryProject             *string `gorm:"column:sentry_project;type:varchar(255);" binding:"required"`
	SentryHost                *string `gorm:"column:sentry_host;type:varchar(255);" binding:"required"`
	SentryAuthenticationToken *string `gorm:"column:sentry_authentication_token;type:varchar(255);" binding:"required"`
	SentryOrganization        *string `gorm:"column:sentry_organization;type:varchar(255);" binding:"required"`

	SlackApiToken       *string `gorm:"column:slack_api_token;type:varchar(255);" binding:"required"`
	SlackChannelFilter  *string `gorm:"column:slack_channel_filter;type:varchar(255);" binding:"required"`
	SlackLookbackWindow *string `gorm:"column:slack_lookback_window;type:varchar(255);" binding:"required"`

	StripeAccountId *string `gorm:"column:stripe_account_id;type:varchar(255);" binding:"required"`
	StripeSecretKey *string `gorm:"column:stripe_secret_key;type:varchar(255);" binding:"required"`

	SurveySparrowAccessToken *string `gorm:"column:survey_sparrow_access_token;type:varchar(255);" binding:"required"`

	SurveyMonkeyAccessToken *string `gorm:"column:survey_monkey_access_token;type:varchar(255);" binding:"required"`

	TalkdeskApiKey *string `gorm:"column:talkdesk_api_key;type:varchar(255);" binding:"required"`

	TikTokAccessToken *string `gorm:"column:tik_tok_access_token;type:varchar(255);" binding:"required"`

	TodoistApiToken *string `gorm:"column:todoist_api_token;type:varchar(255);" binding:"required"`

	TypeformApiToken *string `gorm:"column:typeform_api_token;type:varchar(255);" binding:"required"`

	VittallyApiKey *string `gorm:"column:vittally_api_key;type:varchar(255);" binding:"required"`

	WrikeAccessToken *string `gorm:"column:wrike_access_token;type:varchar(255);" binding:"required"`
	WrikeHostUrl     *string `gorm:"column:wrike_host_url;type:varchar(255);" binding:"required"`

	XeroClientId     *string `gorm:"column:xero_client_id;type:varchar(255);" binding:"required"`
	XeroClientSecret *string `gorm:"column:xero_client_secret;type:varchar(255);" binding:"required"`
	XeroTenantId     *string `gorm:"column:xero_tenant_id;type:varchar(255);" binding:"required"`
	XeroScopes       *string `gorm:"column:xero_scopes;type:varchar(255);" binding:"required"`

	ZendeskAPIKey     *string `gorm:"column:zendesk_api_key;type:varchar(255);" binding:"required"`
	ZendeskSubdomain  *string `gorm:"column:zendesk_subdomain;type:varchar(255);" binding:"required"`
	ZendeskAdminEmail *string `gorm:"column:zendesk_admin_email;type:varchar(255);" binding:"required"`

	ZendeskChatSubdomain *string `gorm:"column:zendesk_chat_subdomain;type:varchar(255);" binding:"required"`
	ZendeskChatAccessKey *string `gorm:"column:zendesk_chat_access_key;type:varchar(255);" binding:"required"`

	ZendeskTalkSubdomain *string `gorm:"column:zendesk_talk_subdomain;type:varchar(255);" binding:"required"`
	ZendeskTalkAccessKey *string `gorm:"column:zendesk_talk_access_key;type:varchar(255);" binding:"required"`

	ZendeskSellApiToken *string `gorm:"column:zendesk_sell_api_token;type:varchar(255);" binding:"required"`

	ZendeskSunshineSubdomain *string `gorm:"column:zendesk_sunshine_subdomain;type:varchar(255);" binding:"required"`
	ZendeskSunshineApiToken  *string `gorm:"column:zendesk_sunshine_api_token;type:varchar(255);" binding:"required"`
	ZendeskSunshineEmail     *string `gorm:"column:zendesk_sunshine_email;type:varchar(255);" binding:"required"`

	ZenefitsToken *string `gorm:"column:zenefits_token;type:varchar(255);" binding:"required"`

	MixpanelUsername        *string `gorm:"column:mixpanel_username;type:varchar(255);" binding:"required"`
	MixpanelSecret          *string `gorm:"column:mixpanel_secret;type:varchar(255);" binding:"required"`
	MixpanelProjectId       *string `gorm:"column:mixpanel_project_id;type:varchar(255);" binding:"required"`
	MixpanelProjectSecret   *string `gorm:"column:mixpanel_project_secret;type:varchar(255);" binding:"required"`
	MixpanelProjectTimezone *string `gorm:"column:mixpanel_project_timezone;type:varchar(255);" binding:"required"`
	MixpanelRegion          *string `gorm:"column:mixpanel_region;type:varchar(255);" binding:"required"`

	LinkedInCredential   *string `gorm:"column:linkedin_credential;type:varchar(255)" binding:"required" json:"linkedInCredential"`
	LinkedInCredentialIV *string `gorm:"column:linkedin_credential_iv;type:varchar(32)"`
	LinkedInPassword     *string `gorm:"column:linkedin_password;type:varchar(255)" binding:"required" json:"linkedInPassword"`
	LinkedInPasswordIV   *string `gorm:"column:linkedin_password_iv;type:varchar(32)"`
}

func (TenantSettings) TableName

func (TenantSettings) TableName() string

type TenantSettingsEmailExclusion

type TenantSettingsEmailExclusion struct {
	ID             uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	Tenant         string    `gorm:"size:255;not null;"`
	ExcludeSubject *string   `gorm:"size:255;"`
	ExcludeBody    *string   `gorm:"size:255;"`
}

func (TenantSettingsEmailExclusion) TableName

type TenantSettingsMailbox

type TenantSettingsMailbox struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	Tenant    string    `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`

	MailboxUsername string `gorm:"column:mailbox_username;type:varchar(255)" json:"mailboxUsername"`
	MailboxPassword string `gorm:"column:mailbox_password;type:varchar(255)" json:"mailboxPassword"`

	Domain   string `gorm:"column:domain;type:varchar(255)" json:"domain"`
	Username string `gorm:"column:user_name;type:varchar(255)" json:"userName"`

	UserId string `gorm:"column:user_id;type:varchar(255)" json:"userId"` // linked user in neo4j

	ForwardingTo   string `gorm:"column:forwarding_to;type:text" json:"forwardingTo"`
	WebmailEnabled bool   `gorm:"column:webmail_enabled;type:boolean" json:"webmailEnabled"`

	LastRampUpAt  time.Time `gorm:"column:last_ramp_up_at;type:timestamp" json:"lastRampUpAt"`
	RampUpRate    int       `gorm:"type:integer" json:"rampUpRate"`
	RampUpMax     int       `gorm:"type:integer" json:"rampUpMax"`
	RampUpCurrent int       `gorm:"type:integer" json:"rampUpCurrent"`

	MinMinutesBetweenEmails int `gorm:"type:integer" json:"minMinutesBetweenEmails"`
	MaxMinutesBetweenEmails int `gorm:"type:integer" json:"maxMinutesBetweenEmails"`

	Status MailboxStatus `gorm:"column:status;type:varchar(255)" json:"status"`
}

func (TenantSettingsMailbox) TableName

func (TenantSettingsMailbox) TableName() string

type TenantSettingsOpportunityStage

type TenantSettingsOpportunityStage struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	Tenant    string    `gorm:"column:tenant;type:varchar(255);NOT NULL" json:"tenant"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`

	Visible        bool   `gorm:"column:visible;value:boolean;NOT NULL" json:"visible"`
	Value          string `gorm:"column:val;value:varchar(255);NOT NULL" json:"value"`
	Order          int    `gorm:"column:idx;type:int;NOT NULL" json:"order"`
	Label          string `gorm:"column:label;type:varchar(255);NOT NULL" json:"label"`
	LikelihoodRate int64  `gorm:"column:likelihood_rate;type:int;NOT NULL;DEFAULT:0" json:"likelihoodRate"`
}

func (TenantSettingsOpportunityStage) TableName

type TenantWebhook

type TenantWebhook struct {
	// tenant, event, webhook, api key
	ID              uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	TenantName      string    `gorm:"column:tenant_name;type:varchar(255);NOT NULL" json:"tenantName" binding:"required"`
	CreatedAt       time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt       time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`
	WebhookUrl      string    `gorm:"column:webhook_url;type:varchar(255);NOT NULL" json:"webhook" binding:"required"`
	ApiKey          string    `gorm:"column:api_key;type:varchar(255);NOT NULL" json:"apiKey" binding:"required"`
	Event           string    `gorm:"column:event;type:varchar(255);NOT NULL" json:"event" binding:"required"`
	AuthHeaderName  string    `gorm:"column:auth_header_name;type:varchar(255)" json:"authHeaderName"`
	AuthHeaderValue string    `gorm:"column:auth_header_value;type:varchar(255)" json:"authHeaderValue"`
	// data for notifying user if webhook fails
	UserId        string `gorm:"column:user_id;type:varchar(255)" json:"userId"`
	UserFirstName string `gorm:"column:user_first_name;type:varchar(255)" json:"userFirstName"`
	UserLastName  string `gorm:"column:user_last_name;type:varchar(255)" json:"userLastName"`
	UserEmail     string `gorm:"column:user_email;type:varchar(255)" json:"userEmail"`
}

func (TenantWebhook) TableName

func (TenantWebhook) TableName() string

func (TenantWebhook) UniqueIndex

func (TenantWebhook) UniqueIndex() [][]string

type TenantWebhookApiKey

type TenantWebhookApiKey struct {
	ID        uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	Tenant    string    `gorm:"column:tenant_name;type:varchar(255);NOT NULL" json:"tenantName" binding:"required"`
	Key       string    `gorm:"column:key;type:varchar(255);NOT NULL;index:tenant_webhook_api_keys_uk,unique" json:"key" binding:"required"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`
	Enabled   bool      `gorm:"column:enabled;type:boolean;DEFAULT:true" json:"enabled"`
}

func (TenantWebhookApiKey) TableName

func (TenantWebhookApiKey) TableName() string

type Tracking

type Tracking struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP"`

	Tenant string `gorm:"column:tenant;type:varchar(255);" json:"tenant"`

	UserId    string `gorm:"column:user_id;type:varchar(255);NOT NULL;" json:"userId"`
	IP        string `gorm:"column:ip;type:varchar(255);" json:"ip" `
	EventType string `gorm:"column:event_type;type:varchar(255);" json:"eventType"`
	EventData string `gorm:"column:event_data;type:text;" json:"eventData"`
	Timestamp int    `gorm:"column:timestamp;type:bigint;" json:"timestamp"`

	Href             string `gorm:"column:href;type:varchar(1000);" json:"href"`
	Origin           string `gorm:"column:origin;type:varchar(255);" json:"origin"`
	Search           string `gorm:"column:search;type:varchar(1000);" json:"search"`
	Hostname         string `gorm:"column:hostname;type:varchar(255);" json:"hostname"`
	Pathname         string `gorm:"column:pathname;type:varchar(255);" json:"pathname"`
	Referrer         string `gorm:"column:referrer;type:varchar(2000);" json:"referrer"`
	UserAgent        string `gorm:"column:user_agent;type:text;" json:"userAgent"`
	Language         string `gorm:"column:language;type:varchar(255);" json:"language"`
	CookiesEnabled   bool   `gorm:"column:cookies_enabled;type:boolean;" json:"cookiesEnabled"`
	ScreenResolution string `gorm:"column:screen_resolution;type:varchar(255);" json:"screenResolution"`

	State               TrackingIdentificationState `gorm:"column:state;type:varchar(50);" json:"state"`
	OrganizationId      *string                     `gorm:"column:organization_id;type:varchar(255);" json:"organizationId"`
	OrganizationName    *string                     `gorm:"column:organization_name;type:varchar(255);" json:"organizationName"`
	OrganizationDomain  *string                     `gorm:"column:organization_domain;type:varchar(255);" json:"organizationDomain"`
	OrganizationWebsite *string                     `gorm:"column:organization_website;type:varchar(255);" json:"organizationWebsite"`
	Notified            bool                        `gorm:"column:notified;type:boolean;default:false" json:"notified"`
	NotificationTry     int                         `gorm:"column:notification_try;type:integer;default:0" json:"notificationTry"`
}

func (Tracking) TableName

func (Tracking) TableName() string

type TrackingAllowedOrigin

type TrackingAllowedOrigin struct {
	ID        string    `gorm:"primaryKey;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
	Tenant    string    `gorm:"type:varchar(255);not null;uniqueIndex:idx_tenant_origin" json:"tenant" binding:"required"`
	Origin    string    `gorm:"type:varchar(255);not null;uniqueIndex:idx_tenant_origin" json:"origin" binding:"required"`
	Enabled   bool      `gorm:"default:true" json:"enabled"`
}

func (TrackingAllowedOrigin) TableName

func (TrackingAllowedOrigin) TableName() string

type TrackingIdentificationState

type TrackingIdentificationState string
const (
	TrackingIdentificationStateError               TrackingIdentificationState = "ERROR"                // tracking record processing error
	TrackingIdentificationStateNew                 TrackingIdentificationState = "NEW"                  // New tracking record
	TrackingIdentificationStatePrefilteredAsked    TrackingIdentificationState = "PREFILTER_ASKED"      // tracking record passed the IPData prefilter
	TrackingIdentificationStatePrefilteredPass     TrackingIdentificationState = "PREFILTER_PASS"       // tracking record passed the IPData prefilter
	TrackingIdentificationStatePrefilteredFail     TrackingIdentificationState = "PREFILTER_FAIL"       // tracking record failed the IPData prefilter
	TrackingIdentificationStateIdentified          TrackingIdentificationState = "IDENTIFIED"           // tracking record identified with scraping
	TrackingIdentificationStateNotIdentified       TrackingIdentificationState = "NOT_IDENTIFIED"       // tracking record not identified with scraping
	TrackingIdentificationStateOrganizationCreated TrackingIdentificationState = "ORGANIZATION_CREATED" // organization created for tracking record
	TrackingIdentificationStateOrganizationExists  TrackingIdentificationState = "ORGANIZATION_EXISTS"  // organization already exists for tracking record
)

type TrueInboxResponseBody

type TrueInboxResponseBody struct {
	Email            string `json:"email"`
	Status           string `json:"status"`
	Result           string `json:"result"`
	ConfidenceScore  int    `json:"confidenceScore"`
	SmtpProvider     string `json:"smtpProvider"`
	MailDisposable   bool   `json:"mailDisposable"`
	MailAcceptAll    bool   `json:"mailAcceptAll"`
	Free             bool   `json:"free"`
	TotalCredits     int    `json:"total_credits"`
	CreditsUsed      int    `json:"credits_used"`
	CreditsRemaining int    `json:"credits_remaining"`
}

type UpdateRawEmailTable

type UpdateRawEmailTable struct {
	EmailProcessingStatus RawState
	Reason                *string
	BouncedEmails         *[]string
	Error                 error
}

type UserEmailImportState

type UserEmailImportState struct {
	ID        uuid.UUID        `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	Tenant    string           `gorm:"size:255;not null;uniqueIndex:uq_one_state_per_tenant_and_user"`
	Username  string           `gorm:"size:255;not null;uniqueIndex:uq_one_state_per_tenant_and_user"`
	Provider  string           `gorm:"size:255;not null;uniqueIndex:uq_one_state_per_tenant_and_user"`
	State     EmailImportState `gorm:"size:50;not null;uniqueIndex:uq_one_state_per_tenant_and_user"`
	StartDate *time.Time       `gorm:""`
	StopDate  *time.Time       `gorm:""`
	Active    bool             `gorm:"not null"`
	Cursor    string           `gorm:"size:255;not null"`
}

func (UserEmailImportState) TableName

func (UserEmailImportState) TableName() string

type UserEmailImportStateHistory

type UserEmailImportStateHistory struct {
	ID        uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	EntityId  uuid.UUID `gorm:"not null"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`

	Tenant    string           `gorm:"size:255;not null"`
	Username  string           `gorm:"size:255;not null"`
	Provider  string           `gorm:"size:255;not null"`
	State     EmailImportState `gorm:"size:50;not null"`
	StartDate *time.Time       `gorm:""`
	StopDate  *time.Time       `gorm:""`
	Active    bool             `gorm:"not null"`
	Cursor    string           `gorm:"size:255;not null"`
}

func (UserEmailImportStateHistory) TableName

func (UserEmailImportStateHistory) TableName() string

type UserWorkingSchedule

type UserWorkingSchedule struct {
	ID        uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp"`
	Tenant    string    `gorm:"size:255;not null;"`

	UserId    string `gorm:"type:varchar(255);not null"`
	DayRange  string `gorm:"type:varchar(7);not null"` // E.g., "Mon-Fri" or "Thu-Fri"
	StartHour string `gorm:"type:varchar(5);not null"` // E.g., 09:00
	EndHour   string `gorm:"type:varchar(5);not null"` // E.g., 18:00
}

func (UserWorkingSchedule) TableName

func (UserWorkingSchedule) TableName() string

Source Files

Jump to

Keyboard shortcuts

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