ultisuite-client/lib/contacts/discovery-types.ts
R3D347HR4Y 07d57f13a8
Some checks are pending
E2E / Playwright e2e (push) Waiting to run
Add Contact Avatar Features and Improve UI Components
- Introduced new ContactAvatar and ContactAvatarPicker components for enhanced avatar management in contact views.
- Updated ContactDetailView and ContactFormView to utilize the new avatar components, improving user experience when adding or editing contacts.
- Enhanced ContactHoverCard and ContactRow components to display avatars, providing a more visually appealing interface.
- Added loading and error states in ContactsListView for better user feedback during data fetching.
- Implemented a new ContactsLoadState component to handle loading and error scenarios in the contacts list.
- Updated package.json to include @formkit/auto-animate for improved UI animations.
2026-06-06 20:26:51 +02:00

156 lines
3.4 KiB
TypeScript

export interface ApiLLMProvider {
id: string
name: string
base_url: string
api_key?: string
default_model: string
}
export interface ApiLLMSettings {
default_provider_id: string
providers: ApiLLMProvider[]
contact_discovery_model?: string
contact_discovery_provider_id?: string
}
export interface ApiLLMModelsResponse {
models: string[]
}
export type ApiSearchProviderType = 'brave'
export interface ApiSearchProvider {
id: string
name: string
type: ApiSearchProviderType
api_key?: string
}
export interface ApiSearchSettings {
default_provider_id: string
providers: ApiSearchProvider[]
}
export interface ApiDiscoveredEmail {
email: string
display_name: string
roles?: string[]
message_count: number
}
export interface ApiDiscoveredSignature {
id: string
message_id?: string
signature_text: string
message_date: string
confidence: number
}
export interface ApiEnrichedContactData {
first_name?: string
last_name?: string
company?: string
department?: string
job_title?: string
emails?: { value: string; label: string }[]
phones?: { value: string; label: string }[]
addresses?: {
street?: string
city?: string
region?: string
postal_code?: string
country?: string
label: string
}[]
website?: string
social_profiles?: { value: string; label: string }[]
notes?: string
}
export interface ApiDiscoveredProfile {
id: string
display_name: string
primary_email: string
all_emails: ApiDiscoveredEmail[]
message_count: number
sent_count: number
received_count: number
spam_count: number
forwarded_count: number
is_mailing_list: boolean
is_disposable: boolean
is_spam_heavy: boolean
classification_reason?: string
linked_contact_uid?: string
enrichment_status: 'pending' | 'enriching' | 'enriched' | 'skipped' | 'failed'
enriched_data?: ApiEnrichedContactData
status: 'suggested' | 'accepted' | 'rejected' | 'ignored' | 'blocked'
signatures?: ApiDiscoveredSignature[]
detected_in_accounts?: ApiAccountDetection[]
last_message_at?: string
}
export interface ApiEnrichmentSuggestion {
id: string
profile_id?: string
target_contact_uid?: string
suggestion_type: 'new_contact' | 'enrich_contact'
field_path: string
suggested_value: string
suggested_label: string
confidence: number
status: 'pending' | 'accepted' | 'rejected'
profile?: ApiDiscoveredProfile
}
export interface ApiAccountDetection {
account_id: string
account_email: string
account_name: string
message_count: number
}
export interface ApiDiscoveryScan {
id: string
status: 'pending' | 'running' | 'completed' | 'failed'
phase: 'pending' | 'scanning_messages' | 'building_profiles' | 'enriching' | 'done'
messages_scanned: number
total_messages: number
profiles_found: number
profiles_total: number
progress_percent: number
error_message?: string
started_at: string
updated_at: string
completed_at?: string
}
export interface ApiDiscoveryOtherPage {
groups: ApiDiscoveredProfileGroup[]
total: number
limit: number
offset: number
has_more: boolean
}
export interface ApiDiscoveredProfileGroup {
group_key: string
profile_ids: string[]
display_name: string
primary_email: string
message_count: number
profile: ApiDiscoveredProfile
profiles?: ApiDiscoveredProfile[]
}
export interface ApiDiscoveryCounts {
other_contacts: number
suggestions: number
ignored: number
blocked: number
}
export interface ApiDispositionEmails {
emails: string[]
}