sqlite

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LifecycleSourceAuto    = "auto"
	LifecycleSourceBuiltin = "builtin"
	LifecycleSourceProfile = "profile"
)

Variables

This section is empty.

Functions

func NormalizeCallFactsGroupBy

func NormalizeCallFactsGroupBy(groupBy string) (string, error)

Types

type AttributionCoverage

type AttributionCoverage struct {
	CallsWithTitles       int64  `json:"calls_with_titles"`
	CallsWithParties      int64  `json:"calls_with_parties"`
	CallsWithPartyTitles  int64  `json:"calls_with_party_titles"`
	UsersWithTitles       int64  `json:"users_with_titles"`
	AccountNameCalls      int64  `json:"account_name_calls"`
	AccountIndustryCalls  int64  `json:"account_industry_calls"`
	OpportunityStageCalls int64  `json:"opportunity_stage_calls"`
	ContactObjectCalls    int64  `json:"contact_object_calls"`
	LeadObjectCalls       int64  `json:"lead_object_calls"`
	ObjectsWithNames      int64  `json:"objects_with_names"`
	ParticipantStatus     string `json:"participant_status"`
	PersonTitleStatus     string `json:"person_title_status"`
	RecommendedNextAction string `json:"recommended_next_action,omitempty"`
}

type BusinessConcept

type BusinessConcept struct {
	Kind        string   `json:"kind"`
	Name        string   `json:"name"`
	Label       string   `json:"label,omitempty"`
	Description string   `json:"description,omitempty"`
	Object      string   `json:"object,omitempty"`
	ObjectTypes []string `json:"object_types,omitempty"`
	FieldNames  []string `json:"field_names,omitempty"`
	Aliases     []string `json:"aliases,omitempty"`
}

type BusinessProfile

type BusinessProfile struct {
	ProfileID           int64                `json:"profile_id"`
	Name                string               `json:"name,omitempty"`
	Version             int                  `json:"version"`
	SourcePath          string               `json:"source_path"`
	SourceSHA256        string               `json:"source_sha256"`
	CanonicalSHA256     string               `json:"canonical_sha256"`
	ImportedAt          string               `json:"imported_at"`
	ImportedBy          string               `json:"imported_by"`
	IsActive            bool                 `json:"is_active"`
	LifecycleCore       []string             `json:"lifecycle_core"`
	ObjectConcepts      []BusinessConcept    `json:"object_concepts"`
	FieldConcepts       []BusinessConcept    `json:"field_concepts"`
	LifecycleBuckets    []BusinessConcept    `json:"lifecycle_buckets"`
	MethodologyConcepts []BusinessConcept    `json:"methodology_concepts"`
	Warnings            []profilepkg.Finding `json:"warnings,omitempty"`
	UnavailableConcepts []string             `json:"unavailable_concepts,omitempty"`
}

type CRMFieldPopulationCell

type CRMFieldPopulationCell struct {
	GroupValue     string  `json:"group_value"`
	FieldName      string  `json:"field_name"`
	FieldLabel     string  `json:"field_label"`
	ObjectCount    int64   `json:"object_count"`
	CallCount      int64   `json:"call_count"`
	PopulatedCount int64   `json:"populated_count"`
	PopulationRate float64 `json:"population_rate"`
}

type CRMFieldPopulationMatrix

type CRMFieldPopulationMatrix struct {
	ObjectType   string                   `json:"object_type"`
	GroupByField string                   `json:"group_by_field"`
	Cells        []CRMFieldPopulationCell `json:"cells"`
}

type CRMFieldPopulationMatrixParams

type CRMFieldPopulationMatrixParams struct {
	ObjectType   string
	GroupByField string
	Limit        int
}

type CRMFieldSummary

type CRMFieldSummary struct {
	ObjectType         string   `json:"object_type"`
	FieldName          string   `json:"field_name"`
	FieldLabel         string   `json:"field_label"`
	RowCount           int64    `json:"row_count"`
	CallCount          int64    `json:"call_count"`
	PopulatedCount     int64    `json:"populated_count"`
	DistinctValueCount int64    `json:"distinct_value_count"`
	ExampleValues      []string `json:"example_values,omitempty"`
}

type CRMFieldValueMatch

type CRMFieldValueMatch struct {
	CallID       string `json:"call_id"`
	Title        string `json:"title"`
	StartedAt    string `json:"started_at"`
	ObjectType   string `json:"object_type"`
	ObjectID     string `json:"object_id,omitempty"`
	ObjectName   string `json:"object_name,omitempty"`
	FieldName    string `json:"field_name"`
	FieldLabel   string `json:"field_label"`
	ValueSnippet string `json:"value_snippet,omitempty"`
}

type CRMFieldValueSearchParams

type CRMFieldValueSearchParams struct {
	ObjectType          string
	FieldName           string
	ValueQuery          string
	Limit               int
	IncludeValueSnippet bool
}

type CRMIntegrationRecord

type CRMIntegrationRecord struct {
	IntegrationID string `json:"integration_id"`
	Name          string `json:"name,omitempty"`
	Provider      string `json:"provider,omitempty"`
	UpdatedAt     string `json:"updated_at,omitempty"`
}

type CRMObjectTypeSummary

type CRMObjectTypeSummary struct {
	ObjectType            string `json:"object_type"`
	ObjectCount           int64  `json:"object_count"`
	CallCount             int64  `json:"call_count"`
	FieldCount            int64  `json:"field_count"`
	PopulatedFieldCount   int64  `json:"populated_field_count"`
	DistinctObjectIDCount int64  `json:"distinct_object_id_count"`
}

type CRMSchemaFieldListParams

type CRMSchemaFieldListParams struct {
	IntegrationID string
	ObjectType    string
	Limit         int
}

type CRMSchemaFieldRecord

type CRMSchemaFieldRecord struct {
	IntegrationID string `json:"integration_id"`
	ObjectType    string `json:"object_type"`
	FieldName     string `json:"field_name"`
	FieldLabel    string `json:"field_label,omitempty"`
	FieldType     string `json:"field_type,omitempty"`
	UpdatedAt     string `json:"updated_at,omitempty"`
}

type CRMSchemaObjectRecord

type CRMSchemaObjectRecord struct {
	IntegrationID string `json:"integration_id"`
	ObjectType    string `json:"object_type"`
	DisplayName   string `json:"display_name,omitempty"`
	FieldCount    int64  `json:"field_count"`
	UpdatedAt     string `json:"updated_at,omitempty"`
}

type CacheInventory

type CacheInventory struct {
	TableCounts         []CacheTableCount  `json:"table_counts"`
	OldestCallStartedAt string             `json:"oldest_call_started_at,omitempty"`
	NewestCallStartedAt string             `json:"newest_call_started_at,omitempty"`
	Summary             *SyncStatusSummary `json:"summary"`
}

type CachePurgePlan

type CachePurgePlan struct {
	StartedBefore          string `json:"started_before"`
	CallCount              int64  `json:"call_count"`
	TranscriptCount        int64  `json:"transcript_count"`
	TranscriptSegmentCount int64  `json:"transcript_segment_count"`
	ContextObjectCount     int64  `json:"context_object_count"`
	ContextFieldCount      int64  `json:"context_field_count"`
	ProfileCallFactCount   int64  `json:"profile_call_fact_count"`
}

type CacheTableCount

type CacheTableCount struct {
	Table string `json:"table"`
	Rows  int64  `json:"rows"`
}

type CallDetail

type CallDetail struct {
	CallID              string                `json:"call_id"`
	Title               string                `json:"title"`
	StartedAt           string                `json:"started_at"`
	DurationSeconds     int64                 `json:"duration_seconds"`
	PartiesCount        int64                 `json:"parties_count"`
	CRMObjects          []CallDetailCRMObject `json:"crm_objects,omitempty"`
	CRMObjectsTruncated bool                  `json:"crm_objects_truncated,omitempty"`
}

type CallDetailCRMObject

type CallDetailCRMObject struct {
	ObjectType          string   `json:"object_type"`
	ObjectID            string   `json:"object_id"`
	ObjectName          string   `json:"object_name,omitempty"`
	FieldCount          int64    `json:"field_count"`
	PopulatedFieldCount int64    `json:"populated_field_count"`
	FieldNames          []string `json:"field_names,omitempty"`
	FieldNamesTruncated bool     `json:"field_names_truncated,omitempty"`
}

type CallFactsCoverage

type CallFactsCoverage struct {
	TotalCalls             int64   `json:"total_calls"`
	TranscriptCount        int64   `json:"transcript_count"`
	MissingTranscriptCount int64   `json:"missing_transcript_count"`
	TranscriptCoverageRate float64 `json:"transcript_coverage_rate"`
	OpportunityCallCount   int64   `json:"opportunity_call_count"`
	AccountCallCount       int64   `json:"account_call_count"`
	ExternalCallCount      int64   `json:"external_call_count"`
	InternalCallCount      int64   `json:"internal_call_count"`
	UnknownScopeCallCount  int64   `json:"unknown_scope_call_count"`
	PurposePopulatedCalls  int64   `json:"purpose_populated_calls"`
	CalendarCallCount      int64   `json:"calendar_call_count"`
	TotalDurationSeconds   int64   `json:"total_duration_seconds"`
}

type CallFactsSummaryParams

type CallFactsSummaryParams struct {
	GroupBy          string
	LifecycleBucket  string
	Scope            string
	System           string
	Direction        string
	TranscriptStatus string
	Limit            int
	LifecycleSource  string
}

type CallFactsSummaryRow

type CallFactsSummaryRow struct {
	GroupBy                string  `json:"group_by"`
	GroupValue             string  `json:"group_value"`
	CallCount              int64   `json:"call_count"`
	TranscriptCount        int64   `json:"transcript_count"`
	MissingTranscriptCount int64   `json:"missing_transcript_count"`
	TranscriptCoverageRate float64 `json:"transcript_coverage_rate"`
	OpportunityCallCount   int64   `json:"opportunity_call_count"`
	AccountCallCount       int64   `json:"account_call_count"`
	ExternalCallCount      int64   `json:"external_call_count"`
	InternalCallCount      int64   `json:"internal_call_count"`
	UnknownScopeCallCount  int64   `json:"unknown_scope_call_count"`
	TotalDurationSeconds   int64   `json:"total_duration_seconds"`
	AvgDurationSeconds     float64 `json:"avg_duration_seconds"`
	LatestCallAt           string  `json:"latest_call_at"`
}

type CallRecord

type CallRecord struct {
	CallID          string
	Title           string
	StartedAt       string
	DurationSeconds int64
	PartiesCount    int64
	ContextPresent  bool
	RawJSON         []byte
	RawSHA256       string
	FirstSeenAt     string
	UpdatedAt       string
}

type CallSearchParams

type CallSearchParams struct {
	CRMObjectType string
	CRMObjectID   string
	Limit         int
}

type ContextCounts

type ContextCounts struct {
	Objects int
	Fields  int
}

type FinishSyncRunParams

type FinishSyncRunParams struct {
	Status         string
	Cursor         string
	RecordsSeen    int64
	RecordsWritten int64
	ErrorText      string
	RequestContext string
}

type GongSettingListParams

type GongSettingListParams struct {
	Kind  string
	Limit int
}

type GongSettingRecord

type GongSettingRecord struct {
	Kind      string `json:"kind"`
	ObjectID  string `json:"object_id"`
	Name      string `json:"name,omitempty"`
	Active    bool   `json:"active"`
	UpdatedAt string `json:"updated_at,omitempty"`
}

type GovernanceFilteredExportPlan added in v0.3.0

type GovernanceFilteredExportPlan struct {
	SourceDBPath                  string `json:"source_db_path"`
	OutputDBPath                  string `json:"output_db_path"`
	SuppressedCallCount           int    `json:"suppressed_call_count"`
	DeletedCalls                  int64  `json:"deleted_calls"`
	DeletedTranscripts            int64  `json:"deleted_transcripts"`
	DeletedTranscriptSegments     int64  `json:"deleted_transcript_segments"`
	DeletedContextObjects         int64  `json:"deleted_context_objects"`
	DeletedContextFields          int64  `json:"deleted_context_fields"`
	DeletedProfileCallFactRows    int64  `json:"deleted_profile_call_fact_rows"`
	RemainingSuppressedCandidates int64  `json:"remaining_suppressed_candidates"`
}

func ExportGovernanceFilteredDB added in v0.3.0

func ExportGovernanceFilteredDB(ctx context.Context, sourcePath, outputPath string, suppressedCallIDs []string, overwrite bool) (*GovernanceFilteredExportPlan, error)

type LateStageSignal

type LateStageSignal struct {
	FieldName             string  `json:"field_name"`
	FieldLabel            string  `json:"field_label"`
	LatePopulatedCalls    int64   `json:"late_populated_calls"`
	NonLatePopulatedCalls int64   `json:"non_late_populated_calls"`
	LateRate              float64 `json:"late_rate"`
	NonLateRate           float64 `json:"non_late_rate"`
	Lift                  float64 `json:"lift"`
}

type LateStageSignalParams

type LateStageSignalParams struct {
	ObjectType          string
	StageField          string
	LateStageValues     []string
	IncludeStageProxies bool
	Limit               int
}

type LateStageSignalsReport

type LateStageSignalsReport struct {
	ObjectType      string            `json:"object_type"`
	StageField      string            `json:"stage_field"`
	LateStageValues []string          `json:"late_stage_values"`
	TotalCalls      int64             `json:"total_calls"`
	LateCalls       int64             `json:"late_calls"`
	NonLateCalls    int64             `json:"non_late_calls"`
	StageCounts     map[string]int64  `json:"stage_counts"`
	Signals         []LateStageSignal `json:"signals"`
}

type LifecycleBucketDefinition

type LifecycleBucketDefinition struct {
	Bucket         string   `json:"bucket"`
	Label          string   `json:"label"`
	Description    string   `json:"description"`
	PrimarySignals []string `json:"primary_signals"`
}

type LifecycleBucketSummary

type LifecycleBucketSummary struct {
	Bucket                 string `json:"bucket"`
	CallCount              int64  `json:"call_count"`
	TranscriptCount        int64  `json:"transcript_count"`
	MissingTranscriptCount int64  `json:"missing_transcript_count"`
	OpportunityCallCount   int64  `json:"opportunity_call_count"`
	AccountCallCount       int64  `json:"account_call_count"`
	TotalDurationSeconds   int64  `json:"total_duration_seconds"`
	LatestCallID           string `json:"latest_call_id"`
	LatestCallAt           string `json:"latest_call_at"`
	HighConfidenceCalls    int64  `json:"high_confidence_calls"`
	MediumConfidenceCalls  int64  `json:"medium_confidence_calls"`
	LowConfidenceCalls     int64  `json:"low_confidence_calls"`
}

type LifecycleCRMFieldComparison

type LifecycleCRMFieldComparison struct {
	BucketA    string                           `json:"bucket_a"`
	BucketB    string                           `json:"bucket_b"`
	ObjectType string                           `json:"object_type,omitempty"`
	Fields     []LifecycleCRMFieldComparisonRow `json:"fields"`
}

type LifecycleCRMFieldComparisonParams

type LifecycleCRMFieldComparisonParams struct {
	BucketA    string
	BucketB    string
	ObjectType string
	Limit      int
}

type LifecycleCRMFieldComparisonRow

type LifecycleCRMFieldComparisonRow struct {
	ObjectType       string  `json:"object_type"`
	FieldName        string  `json:"field_name"`
	FieldLabel       string  `json:"field_label"`
	BucketACallCount int64   `json:"bucket_a_call_count"`
	BucketBCallCount int64   `json:"bucket_b_call_count"`
	BucketAPopulated int64   `json:"bucket_a_populated"`
	BucketBPopulated int64   `json:"bucket_b_populated"`
	BucketARate      float64 `json:"bucket_a_rate"`
	BucketBRate      float64 `json:"bucket_b_rate"`
	RateDelta        float64 `json:"rate_delta"`
}

type LifecycleCallSearchParams

type LifecycleCallSearchParams struct {
	Bucket                 string
	MissingTranscriptsOnly bool
	Limit                  int
	LifecycleSource        string
}

type LifecycleCallSearchResult

type LifecycleCallSearchResult struct {
	CallID            string   `json:"call_id"`
	Title             string   `json:"title"`
	StartedAt         string   `json:"started_at"`
	DurationSeconds   int64    `json:"duration_seconds"`
	Bucket            string   `json:"bucket"`
	Confidence        string   `json:"confidence"`
	Reason            string   `json:"reason"`
	EvidenceFields    []string `json:"evidence_fields,omitempty"`
	OpportunityCount  int64    `json:"opportunity_count"`
	AccountCount      int64    `json:"account_count"`
	TranscriptPresent bool     `json:"transcript_present"`
}

type LifecycleSummaryParams

type LifecycleSummaryParams struct {
	Bucket          string
	LifecycleSource string
}

type LifecycleTranscriptPriority

type LifecycleTranscriptPriority struct {
	CallID          string   `json:"call_id"`
	Title           string   `json:"title"`
	StartedAt       string   `json:"started_at"`
	DurationSeconds int64    `json:"duration_seconds"`
	System          string   `json:"system,omitempty"`
	Direction       string   `json:"direction,omitempty"`
	Scope           string   `json:"scope,omitempty"`
	Bucket          string   `json:"bucket"`
	Confidence      string   `json:"confidence"`
	PriorityScore   int64    `json:"priority_score"`
	Reason          string   `json:"reason"`
	EvidenceFields  []string `json:"evidence_fields,omitempty"`
}

type LifecycleTranscriptPriorityParams

type LifecycleTranscriptPriorityParams struct {
	Bucket          string
	Limit           int
	LifecycleSource string
}

type MissingTranscriptCall

type MissingTranscriptCall struct {
	CallID    string
	Title     string
	StartedAt string
}

type OpportunityCallSummary

type OpportunityCallSummary struct {
	OpportunityID          string `json:"opportunity_id"`
	OpportunityName        string `json:"opportunity_name"`
	Stage                  string `json:"stage,omitempty"`
	Amount                 string `json:"amount,omitempty"`
	CloseDate              string `json:"close_date,omitempty"`
	OwnerID                string `json:"owner_id,omitempty"`
	CallCount              int64  `json:"call_count"`
	TranscriptCount        int64  `json:"transcript_count"`
	MissingTranscriptCount int64  `json:"missing_transcript_count"`
	TotalDurationSeconds   int64  `json:"total_duration_seconds"`
	LatestCallID           string `json:"latest_call_id"`
	LatestCallAt           string `json:"latest_call_at"`
}

type OpportunityCallSummaryParams

type OpportunityCallSummaryParams struct {
	StageValues []string
	Limit       int
}

type OpportunityMissingTranscriptParams

type OpportunityMissingTranscriptParams struct {
	StageValues []string
	Limit       int
}

type OpportunityMissingTranscriptSummary

type OpportunityMissingTranscriptSummary struct {
	OpportunityID          string `json:"opportunity_id"`
	OpportunityName        string `json:"opportunity_name"`
	Stage                  string `json:"stage,omitempty"`
	CallCount              int64  `json:"call_count"`
	MissingTranscriptCount int64  `json:"missing_transcript_count"`
	TranscriptCount        int64  `json:"transcript_count"`
	LatestCallID           string `json:"latest_call_id"`
	LatestCallAt           string `json:"latest_call_at"`
}

type ProfileHistoryEntry added in v0.3.0

type ProfileHistoryEntry struct {
	ProfileID       int64  `json:"profile_id"`
	Name            string `json:"name,omitempty"`
	Version         int    `json:"version"`
	SourcePath      string `json:"source_path,omitempty"`
	SourceSHA256    string `json:"source_sha256"`
	CanonicalSHA256 string `json:"canonical_sha256"`
	ImportedAt      string `json:"imported_at"`
	ImportedBy      string `json:"imported_by,omitempty"`
	IsActive        bool   `json:"is_active"`
	WarningCount    int64  `json:"warning_count"`
}

type ProfileImportParams

type ProfileImportParams struct {
	SourcePath      string
	SourceSHA256    string
	CanonicalSHA256 string
	RawYAML         []byte
	CanonicalJSON   []byte
	Profile         *profilepkg.Profile
	Findings        []profilepkg.Finding
	ImportedBy      string
	StageOnly       bool
}

type ProfileImportResult

type ProfileImportResult struct {
	ProfileID       int64  `json:"profile_id"`
	Imported        bool   `json:"imported"`
	Activated       bool   `json:"activated"`
	SourceSHA256    string `json:"source_sha256"`
	CanonicalSHA256 string `json:"canonical_sha256"`
}

type ProfileQueryInfo

type ProfileQueryInfo struct {
	LifecycleSource     string           `json:"lifecycle_source"`
	Profile             *BusinessProfile `json:"profile,omitempty"`
	UnavailableConcepts []string         `json:"unavailable_concepts,omitempty"`
}

type ProfileReadiness

type ProfileReadiness struct {
	Active                  bool     `json:"active"`
	Status                  string   `json:"status"`
	Detail                  string   `json:"detail"`
	Name                    string   `json:"name,omitempty"`
	Version                 int      `json:"version,omitempty"`
	CanonicalSHA256         string   `json:"canonical_sha256,omitempty"`
	ObjectConceptCount      int      `json:"object_concept_count,omitempty"`
	FieldConceptCount       int      `json:"field_concept_count,omitempty"`
	LifecycleBucketCount    int      `json:"lifecycle_bucket_count,omitempty"`
	MethodologyConceptCount int      `json:"methodology_concept_count,omitempty"`
	WarningCount            int      `json:"warning_count,omitempty"`
	UnavailableConcepts     []string `json:"unavailable_concepts,omitempty"`
	CacheFresh              bool     `json:"cache_fresh"`
	CacheStatus             string   `json:"cache_status"`
	Blocking                []string `json:"blocking,omitempty"`
}

type PublicReadiness

type PublicReadiness struct {
	ConversationVolume    ReadinessFlag `json:"conversation_volume"`
	TranscriptCoverage    ReadinessFlag `json:"transcript_coverage"`
	ScorecardThemes       ReadinessFlag `json:"scorecard_themes"`
	LifecycleSeparation   ReadinessFlag `json:"lifecycle_separation"`
	CRMSegmentation       ReadinessFlag `json:"crm_segmentation"`
	AttributionReadiness  ReadinessFlag `json:"attribution_readiness"`
	CRMInventoryNote      string        `json:"crm_inventory_note,omitempty"`
	RecommendedNextAction string        `json:"recommended_next_action,omitempty"`
}

type ReadinessFlag

type ReadinessFlag struct {
	Ready        bool     `json:"ready"`
	Status       string   `json:"status"`
	Detail       string   `json:"detail"`
	Requirements []string `json:"requirements,omitempty"`
}

type ScorecardDetail

type ScorecardDetail struct {
	ScorecardSummary
	Questions []ScorecardQuestion `json:"questions"`
}

type ScorecardListParams

type ScorecardListParams struct {
	ActiveOnly bool
	Limit      int
}

type ScorecardQuestion

type ScorecardQuestion struct {
	QuestionID   string   `json:"question_id,omitempty"`
	QuestionText string   `json:"question_text"`
	QuestionType string   `json:"question_type,omitempty"`
	IsOverall    bool     `json:"is_overall,omitempty"`
	MinRange     int64    `json:"min_range,omitempty"`
	MaxRange     int64    `json:"max_range,omitempty"`
	AnswerGuide  string   `json:"answer_guide,omitempty"`
	Options      []string `json:"options,omitempty"`
}

type ScorecardSummary

type ScorecardSummary struct {
	ScorecardID     string `json:"scorecard_id"`
	Name            string `json:"name"`
	Active          bool   `json:"active"`
	ReviewMethod    string `json:"review_method,omitempty"`
	WorkspaceID     string `json:"workspace_id,omitempty"`
	QuestionCount   int64  `json:"question_count"`
	SourceCreatedAt string `json:"source_created_at,omitempty"`
	SourceUpdatedAt string `json:"source_updated_at,omitempty"`
	CachedUpdatedAt string `json:"cached_updated_at,omitempty"`
}

type StartSyncRunParams

type StartSyncRunParams struct {
	Scope          string
	SyncKey        string
	Cursor         string
	From           string
	To             string
	RequestContext string
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func Open

func Open(ctx context.Context, path string) (*Store, error)

func OpenReadOnly

func OpenReadOnly(ctx context.Context, path string) (*Store, error)

func (*Store) ActivateProfile added in v0.3.0

func (s *Store) ActivateProfile(ctx context.Context, ref string) (*ProfileImportResult, error)

func (*Store) ActiveBusinessProfile

func (s *Store) ActiveBusinessProfile(ctx context.Context) (*BusinessProfile, error)

func (*Store) ActiveProfileDocument

func (s *Store) ActiveProfileDocument(ctx context.Context) (*profilepkg.Profile, error)

func (*Store) AnalyzeLateStageSignals

func (s *Store) AnalyzeLateStageSignals(ctx context.Context, params LateStageSignalParams) (*LateStageSignalsReport, error)

func (*Store) CRMFieldPopulationMatrix

func (s *Store) CRMFieldPopulationMatrix(ctx context.Context, params CRMFieldPopulationMatrixParams) (*CRMFieldPopulationMatrix, error)

func (*Store) CacheInventory

func (s *Store) CacheInventory(ctx context.Context) (*CacheInventory, error)

func (*Store) CallFactsCoverage

func (s *Store) CallFactsCoverage(ctx context.Context) (*CallFactsCoverage, error)

func (*Store) CallFactsCoverageWithSource

func (s *Store) CallFactsCoverageWithSource(ctx context.Context, sourceArg string) (*CallFactsCoverage, []CallFactsSummaryRow, *ProfileQueryInfo, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) CompareLifecycleCRMFields

func (s *Store) CompareLifecycleCRMFields(ctx context.Context, params LifecycleCRMFieldComparisonParams) (*LifecycleCRMFieldComparison, error)

func (*Store) DB

func (s *Store) DB() *sql.DB

func (*Store) DeleteGovernanceSuppressedCalls added in v0.3.0

func (s *Store) DeleteGovernanceSuppressedCalls(ctx context.Context, callIDs []string) (*GovernanceFilteredExportPlan, error)

func (*Store) FindCallsMissingTranscripts

func (s *Store) FindCallsMissingTranscripts(ctx context.Context, limit int) ([]MissingTranscriptCall, error)

func (*Store) FinishSyncRun

func (s *Store) FinishSyncRun(ctx context.Context, runID int64, params FinishSyncRunParams) error

func (*Store) GetCallDetail

func (s *Store) GetCallDetail(ctx context.Context, callID string) (*CallDetail, error)

func (*Store) GetCallRaw

func (s *Store) GetCallRaw(ctx context.Context, callID string) (json.RawMessage, error)

func (*Store) GetScorecardDetail

func (s *Store) GetScorecardDetail(ctx context.Context, scorecardID string) (*ScorecardDetail, error)

func (*Store) GovernanceDataFingerprint added in v0.3.0

func (s *Store) GovernanceDataFingerprint(ctx context.Context) (string, error)

func (*Store) GovernanceNameCandidates added in v0.3.0

func (s *Store) GovernanceNameCandidates(ctx context.Context) ([]governance.Candidate, error)

func (*Store) ImportProfile

func (s *Store) ImportProfile(ctx context.Context, params ProfileImportParams) (*ProfileImportResult, error)

func (*Store) ListBusinessConcepts

func (s *Store) ListBusinessConcepts(ctx context.Context) ([]BusinessConcept, error)

func (*Store) ListCRMFields

func (s *Store) ListCRMFields(ctx context.Context, objectType string, limit int) ([]CRMFieldSummary, error)

func (*Store) ListCRMIntegrations

func (s *Store) ListCRMIntegrations(ctx context.Context) ([]CRMIntegrationRecord, error)

func (*Store) ListCRMObjectTypes

func (s *Store) ListCRMObjectTypes(ctx context.Context) ([]CRMObjectTypeSummary, error)

func (*Store) ListCRMSchemaFields

func (s *Store) ListCRMSchemaFields(ctx context.Context, params CRMSchemaFieldListParams) ([]CRMSchemaFieldRecord, error)

func (*Store) ListCRMSchemaObjects

func (s *Store) ListCRMSchemaObjects(ctx context.Context, integrationID string) ([]CRMSchemaObjectRecord, error)

func (*Store) ListGongSettings

func (s *Store) ListGongSettings(ctx context.Context, params GongSettingListParams) ([]GongSettingRecord, error)

func (*Store) ListLifecycleBucketDefinitions

func (s *Store) ListLifecycleBucketDefinitions(ctx context.Context) ([]LifecycleBucketDefinition, error)

func (*Store) ListLifecycleBucketDefinitionsWithSource

func (s *Store) ListLifecycleBucketDefinitionsWithSource(ctx context.Context, requested string) ([]LifecycleBucketDefinition, *ProfileQueryInfo, error)

func (*Store) ListOpportunitiesMissingTranscripts

func (s *Store) ListOpportunitiesMissingTranscripts(ctx context.Context, params OpportunityMissingTranscriptParams) ([]OpportunityMissingTranscriptSummary, error)

func (*Store) ListProfiles added in v0.3.0

func (s *Store) ListProfiles(ctx context.Context) ([]ProfileHistoryEntry, error)

func (*Store) ListScorecards

func (s *Store) ListScorecards(ctx context.Context, params ScorecardListParams) ([]ScorecardSummary, error)

func (*Store) ListUnmappedCRMFields

func (s *Store) ListUnmappedCRMFields(ctx context.Context, params UnmappedCRMFieldParams) ([]UnmappedCRMField, error)

func (*Store) Migrate

func (s *Store) Migrate(ctx context.Context) error

func (*Store) PlanCachePurgeBefore

func (s *Store) PlanCachePurgeBefore(ctx context.Context, startedBefore string) (*CachePurgePlan, error)

func (*Store) PrioritizeTranscriptsByLifecycle

func (s *Store) PrioritizeTranscriptsByLifecycle(ctx context.Context, params LifecycleTranscriptPriorityParams) ([]LifecycleTranscriptPriority, error)

func (*Store) PrioritizeTranscriptsByLifecycleWithSource

func (s *Store) PrioritizeTranscriptsByLifecycleWithSource(ctx context.Context, params LifecycleTranscriptPriorityParams) ([]LifecycleTranscriptPriority, *ProfileQueryInfo, error)

func (*Store) ProfileDocument added in v0.3.0

func (s *Store) ProfileDocument(ctx context.Context, ref string) (*StoredProfileDocument, error)

func (*Store) ProfileInventory

func (s *Store) ProfileInventory(ctx context.Context) (*profilepkg.Inventory, error)

func (*Store) PurgeCacheBefore

func (s *Store) PurgeCacheBefore(ctx context.Context, startedBefore string) (*CachePurgePlan, error)

func (*Store) RefreshActiveProfileReadModel

func (s *Store) RefreshActiveProfileReadModel(ctx context.Context) error

func (*Store) ResolveLifecycleSource

func (s *Store) ResolveLifecycleSource(ctx context.Context, requested string) (string, *BusinessProfile, error)

func (*Store) SearchCRMFieldValues

func (s *Store) SearchCRMFieldValues(ctx context.Context, params CRMFieldValueSearchParams) ([]CRMFieldValueMatch, error)

func (*Store) SearchCallsByLifecycle

func (s *Store) SearchCallsByLifecycle(ctx context.Context, params LifecycleCallSearchParams) ([]LifecycleCallSearchResult, error)

func (*Store) SearchCallsByLifecycleWithSource

func (s *Store) SearchCallsByLifecycleWithSource(ctx context.Context, params LifecycleCallSearchParams) ([]LifecycleCallSearchResult, *ProfileQueryInfo, error)

func (*Store) SearchCallsRaw

func (s *Store) SearchCallsRaw(ctx context.Context, params CallSearchParams) ([]json.RawMessage, error)

func (*Store) SearchTranscriptQuotesWithAttribution

func (s *Store) SearchTranscriptQuotesWithAttribution(ctx context.Context, params TranscriptAttributionSearchParams) ([]TranscriptAttributionSearchResult, error)

func (*Store) SearchTranscriptSegments

func (s *Store) SearchTranscriptSegments(ctx context.Context, query string, limit int) ([]TranscriptSearchResult, error)

func (*Store) SearchTranscriptSegmentsByCRMContext

func (s *Store) SearchTranscriptSegmentsByCRMContext(ctx context.Context, params TranscriptCRMSearchParams) ([]TranscriptCRMSearchResult, error)

func (*Store) SearchTranscriptSegmentsByCallFacts

func (s *Store) SearchTranscriptSegmentsByCallFacts(ctx context.Context, params TranscriptCallFactsSearchParams) ([]TranscriptCallFactsSearchResult, error)

func (*Store) StartSyncRun

func (s *Store) StartSyncRun(ctx context.Context, params StartSyncRunParams) (*SyncRun, error)

func (*Store) SummarizeCallFacts

func (s *Store) SummarizeCallFacts(ctx context.Context, params CallFactsSummaryParams) ([]CallFactsSummaryRow, error)

func (*Store) SummarizeCallFactsWithSource

func (s *Store) SummarizeCallFactsWithSource(ctx context.Context, params CallFactsSummaryParams) ([]CallFactsSummaryRow, *ProfileQueryInfo, error)

func (*Store) SummarizeCallsByLifecycle

func (s *Store) SummarizeCallsByLifecycle(ctx context.Context, params LifecycleSummaryParams) ([]LifecycleBucketSummary, error)

func (*Store) SummarizeCallsByLifecycleWithSource

func (s *Store) SummarizeCallsByLifecycleWithSource(ctx context.Context, params LifecycleSummaryParams) ([]LifecycleBucketSummary, *ProfileQueryInfo, error)

func (*Store) SummarizeOpportunityCalls

func (s *Store) SummarizeOpportunityCalls(ctx context.Context, params OpportunityCallSummaryParams) ([]OpportunityCallSummary, error)

func (*Store) SyncStatusSummary

func (s *Store) SyncStatusSummary(ctx context.Context) (*SyncStatusSummary, error)

func (*Store) UpsertCRMIntegration

func (s *Store) UpsertCRMIntegration(ctx context.Context, raw json.RawMessage) (*CRMIntegrationRecord, error)

func (*Store) UpsertCRMSchema

func (s *Store) UpsertCRMSchema(ctx context.Context, integrationID string, objectType string, raw json.RawMessage) (int64, error)

func (*Store) UpsertCall

func (s *Store) UpsertCall(ctx context.Context, raw json.RawMessage) (*CallRecord, error)

func (*Store) UpsertCallContext

func (s *Store) UpsertCallContext(ctx context.Context, callID string, raw json.RawMessage) (ContextCounts, error)

func (*Store) UpsertGongSetting

func (s *Store) UpsertGongSetting(ctx context.Context, kind string, raw json.RawMessage) (*GongSettingRecord, error)

func (*Store) UpsertTranscript

func (s *Store) UpsertTranscript(ctx context.Context, raw json.RawMessage) (*TranscriptRecord, error)

func (*Store) UpsertUser

func (s *Store) UpsertUser(ctx context.Context, raw json.RawMessage) (*UserRecord, error)

type StoredProfileDocument added in v0.3.0

type StoredProfileDocument struct {
	Meta    ProfileHistoryEntry `json:"meta"`
	Profile *profilepkg.Profile `json:"profile"`
}

type SyncRun

type SyncRun struct {
	ID             int64
	Scope          string
	SyncKey        string
	Cursor         string
	From           string
	To             string
	RequestContext string
	Status         string
	StartedAt      string
	FinishedAt     string
	RecordsSeen    int64
	RecordsWritten int64
	ErrorText      string
}

type SyncState

type SyncState struct {
	SyncKey       string
	Scope         string
	Cursor        string
	LastRunID     int64
	LastStatus    string
	LastError     string
	LastSuccessAt string
	UpdatedAt     string
}

type SyncStatusSummary

type SyncStatusSummary struct {
	TotalCalls                   int64               `json:"total_calls"`
	TotalUsers                   int64               `json:"total_users"`
	TotalTranscripts             int64               `json:"total_transcripts"`
	TotalTranscriptSegments      int64               `json:"total_transcript_segments"`
	TotalEmbeddedCRMContextCalls int64               `json:"total_embedded_crm_context_calls"`
	TotalEmbeddedCRMObjects      int64               `json:"total_embedded_crm_objects"`
	TotalEmbeddedCRMFields       int64               `json:"total_embedded_crm_fields"`
	TotalCRMIntegrations         int64               `json:"total_crm_integrations"`
	TotalCRMSchemaObjects        int64               `json:"total_crm_schema_objects"`
	TotalCRMSchemaFields         int64               `json:"total_crm_schema_fields"`
	TotalGongSettings            int64               `json:"total_gong_settings"`
	TotalScorecards              int64               `json:"total_scorecards"`
	MissingTranscripts           int64               `json:"missing_transcripts"`
	RunningSyncRuns              int64               `json:"running_sync_runs"`
	ProfileReadiness             ProfileReadiness    `json:"profile_readiness"`
	PublicReadiness              PublicReadiness     `json:"public_readiness"`
	AttributionCoverage          AttributionCoverage `json:"attribution_coverage"`
	LastRun                      *SyncRun            `json:"last_run,omitempty"`
	LastSuccessfulRun            *SyncRun            `json:"last_successful_run,omitempty"`
	States                       []SyncState         `json:"states"`
}

type TranscriptAttributionSearchParams

type TranscriptAttributionSearchParams struct {
	Query            string
	FromDate         string
	ToDate           string
	LifecycleBucket  string
	Industry         string
	AccountQuery     string
	OpportunityStage string
	Limit            int
}

type TranscriptAttributionSearchResult

type TranscriptAttributionSearchResult struct {
	CallID                 string `json:"call_id,omitempty"`
	Title                  string `json:"title,omitempty"`
	StartedAt              string `json:"started_at"`
	CallDate               string `json:"call_date,omitempty"`
	LifecycleBucket        string `json:"lifecycle_bucket,omitempty"`
	AccountName            string `json:"account_name,omitempty"`
	AccountIndustry        string `json:"account_industry,omitempty"`
	AccountWebsite         string `json:"account_website,omitempty"`
	OpportunityName        string `json:"opportunity_name,omitempty"`
	OpportunityStage       string `json:"opportunity_stage,omitempty"`
	OpportunityType        string `json:"opportunity_type,omitempty"`
	OpportunityCloseDate   string `json:"opportunity_close_date,omitempty"`
	OpportunityProbability string `json:"opportunity_probability,omitempty"`
	ParticipantStatus      string `json:"participant_status"`
	PersonTitleStatus      string `json:"person_title_status"`
	PersonTitleSource      string `json:"person_title_source,omitempty"`
	SegmentIndex           int    `json:"segment_index"`
	StartMS                int64  `json:"start_ms"`
	EndMS                  int64  `json:"end_ms"`
	Snippet                string `json:"snippet"`
	ContextExcerpt         string `json:"context_excerpt"`
}

type TranscriptCRMSearchParams

type TranscriptCRMSearchParams struct {
	Query      string
	ObjectType string
	ObjectID   string
	Limit      int
}

type TranscriptCRMSearchResult

type TranscriptCRMSearchResult struct {
	CallID              string `json:"call_id"`
	Title               string `json:"title"`
	StartedAt           string `json:"started_at"`
	ObjectType          string `json:"object_type"`
	ObjectID            string `json:"object_id"`
	ObjectName          string `json:"object_name"`
	MatchingObjectCount int64  `json:"matching_object_count"`
	SpeakerID           string `json:"speaker_id"`
	SegmentIndex        int    `json:"segment_index"`
	StartMS             int64  `json:"start_ms"`
	EndMS               int64  `json:"end_ms"`
	Snippet             string `json:"snippet"`
}

type TranscriptCallFactsSearchParams

type TranscriptCallFactsSearchParams struct {
	Query           string
	FromDate        string
	ToDate          string
	LifecycleBucket string
	Scope           string
	System          string
	Direction       string
	Limit           int
}

type TranscriptCallFactsSearchResult

type TranscriptCallFactsSearchResult struct {
	CallID          string `json:"-"`
	StartedAt       string `json:"started_at"`
	CallDate        string `json:"call_date"`
	CallMonth       string `json:"call_month"`
	DurationSeconds int64  `json:"duration_seconds"`
	LifecycleBucket string `json:"lifecycle_bucket"`
	Scope           string `json:"scope"`
	System          string `json:"system"`
	Direction       string `json:"direction"`
	SegmentIndex    int    `json:"segment_index"`
	StartMS         int64  `json:"start_ms"`
	EndMS           int64  `json:"end_ms"`
	Snippet         string `json:"snippet"`
	ContextExcerpt  string `json:"context_excerpt"`
}

type TranscriptRecord

type TranscriptRecord struct {
	CallID       string
	SegmentCount int
	RawJSON      []byte
	RawSHA256    string
	FirstSeenAt  string
	UpdatedAt    string
}

type TranscriptSearchResult

type TranscriptSearchResult struct {
	CallID       string
	SpeakerID    string
	SegmentIndex int
	StartMS      int64
	EndMS        int64
	Text         string
	Snippet      string
}

type TranscriptSegment

type TranscriptSegment struct {
	ID           int64
	CallID       string
	SegmentIndex int
	SpeakerID    string
	StartMS      int64
	EndMS        int64
	Text         string
	RawJSON      []byte
}

type UnmappedCRMField

type UnmappedCRMField struct {
	ObjectType         string  `json:"object_type"`
	FieldName          string  `json:"field_name"`
	FieldLabel         string  `json:"field_label,omitempty"`
	FieldType          string  `json:"field_type,omitempty"`
	ObjectCount        int64   `json:"object_count"`
	PopulatedCount     int64   `json:"populated_count"`
	PopulationRate     float64 `json:"population_rate"`
	DistinctValueCount int64   `json:"distinct_value_count"`
	MinValueLength     int64   `json:"min_value_length"`
	MaxValueLength     int64   `json:"max_value_length"`
	AvgValueLength     float64 `json:"avg_value_length"`
}

type UnmappedCRMFieldParams

type UnmappedCRMFieldParams struct {
	Limit int
}

type UserRecord

type UserRecord struct {
	UserID      string
	Email       string
	FirstName   string
	LastName    string
	DisplayName string
	Title       string
	Active      bool
	RawJSON     []byte
	RawSHA256   string
	FirstSeenAt string
	UpdatedAt   string
}

Jump to

Keyboard shortcuts

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