-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
142 lines (126 loc) · 3.07 KB
/
Copy pathtypes.ts
File metadata and controls
142 lines (126 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
export type LeadStatus = string;
export interface StatusConfig {
id: string;
label: string;
color: string; // e.g. 'blue', 'green', 'red', 'yellow', 'purple', 'gray'
order: number;
}
export interface Note {
id: string;
content: string;
createdAt: string;
author: string;
activityDate?: string; // YYYY-MM-DD, defaults to today
activityType?: 'call' | 'email' | 'text' | 'in_person';
}
export interface Product {
id: string;
user_id: string;
name: string;
description: string;
}
export interface AppSettings {
id?: string;
user_id?: string;
companyName: string;
companyDescription: string;
aboutMe: string; // User persona/style
sheetUrl?: string;
statuses: StatusConfig[];
autopilotStatuses?: string[];
slackWebhookUrl?: string;
slackNotifyNewLead?: boolean;
slackNotifyNewNote?: boolean;
geminiApiKey?: string;
openaiApiKey?: string;
anthropicApiKey?: string;
}
export interface LeadAIAnalysis {
score: number;
reasoning: string;
nextAction: string;
lastUpdated: string;
}
export interface Lead {
id: string;
user_id: string;
companyName: string;
contactName?: string;
email?: string;
phone?: string;
website?: string;
status: LeadStatus;
notes: Note[];
description?: string; // AI gathered info
location?: string;
latitude?: number;
longitude?: number;
source: 'MANUAL' | 'AI_FINDER';
productIds: string[]; // IDs of products interested/assigned
aiAnalysis?: LeadAIAnalysis;
matchScore?: number;
matchReason?: string;
createdAt: string;
}
export interface ChatMessage {
id: string;
role: 'user' | 'model';
text: string;
isThinking?: boolean;
loadingMessage?: string; // Dynamic loading text
foundLeads?: Lead[]; // If the model returned leads in this turn
}
export interface AutopilotAction {
id: string;
leadId: string;
leadName: string;
contactName?: string;
email?: string;
phone?: string;
actionType: 'email' | 'call' | 'social' | 'note';
priority: number;
reasoning: string;
content?: string;
status: 'pending' | 'completed' | 'skipped';
}
export interface AutopilotQueue {
generatedAt: string;
actions: AutopilotAction[];
}
// Google Sheets row representation (mock)
export type SheetRow = (string | number | boolean)[];
// --- Growth Lab ---
export type GrowthConceptStatus = 'RAW' | 'IGNITED' | 'ARCHIVED';
export type GrowthPostStatus = 'DRAFT' | 'POSTED';
export type EngagementOpportunityStatus = 'NEW' | 'DONE';
export interface GrowthSettings {
userId: string;
currentCampaignTheme?: string;
themeGoal?: string;
updatedAt: string;
}
export interface GrowthConcept {
id: string;
userId: string;
topic: string;
themeSnapshot?: string;
status: GrowthConceptStatus;
createdAt: string;
}
export interface GrowthPost {
id: string;
conceptId: string;
platform: 'LINKEDIN' | 'X';
content: string;
status: GrowthPostStatus;
createdAt: string;
}
export interface EngagementOpportunity {
id: string;
userId: string;
queryUrl: string;
themeFocus?: string;
suggestedReply?: string;
status: EngagementOpportunityStatus;
createdAt: string;
}