@hasna/contacts 0.6.33 → 0.6.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +45 -11
- package/dist/index.js +3 -0
- package/dist/server/cloud-index.js +45 -11
- package/dist/server/index.js +45 -11
- package/migrations/0013_remote_delete_tombstones.sql +15 -0
- package/migrations/0014_contact_tag_filter_index.sql +9 -0
- package/package.json +1 -1
- package/dashboard/dist/assets/index-0l6aQb1t.css +0 -1
- package/dashboard/dist/assets/index-opnZdkVD.js +0 -229
- package/dashboard/dist/index.html +0 -13
- package/dist/cli/commands/advanced.d.ts +0 -3
- package/dist/cli/commands/advanced.d.ts.map +0 -1
- package/dist/cli/commands/audience.d.ts +0 -18
- package/dist/cli/commands/audience.d.ts.map +0 -1
- package/dist/cli/commands/core.d.ts +0 -3
- package/dist/cli/commands/core.d.ts.map +0 -1
- package/dist/cli/commands/crm.d.ts +0 -3
- package/dist/cli/commands/crm.d.ts.map +0 -1
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/storage.d.ts +0 -3
- package/dist/cli/storage.d.ts.map +0 -1
- package/dist/cli/utils.d.ts +0 -10
- package/dist/cli/utils.d.ts.map +0 -1
- package/dist/cloud/http-storage.d.ts +0 -88
- package/dist/cloud/http-storage.d.ts.map +0 -1
- package/dist/db/activity.d.ts +0 -15
- package/dist/db/activity.d.ts.map +0 -1
- package/dist/db/applications.d.ts +0 -10
- package/dist/db/applications.d.ts.map +0 -1
- package/dist/db/audiences.d.ts +0 -51
- package/dist/db/audiences.d.ts.map +0 -1
- package/dist/db/companies.d.ts +0 -19
- package/dist/db/companies.d.ts.map +0 -1
- package/dist/db/contact-tasks.d.ts +0 -19
- package/dist/db/contact-tasks.d.ts.map +0 -1
- package/dist/db/contacts.d.ts +0 -30
- package/dist/db/contacts.d.ts.map +0 -1
- package/dist/db/coordination.d.ts +0 -30
- package/dist/db/coordination.d.ts.map +0 -1
- package/dist/db/database.d.ts +0 -8
- package/dist/db/database.d.ts.map +0 -1
- package/dist/db/deals.d.ts +0 -14
- package/dist/db/deals.d.ts.map +0 -1
- package/dist/db/documents.d.ts +0 -38
- package/dist/db/documents.d.ts.map +0 -1
- package/dist/db/events.d.ts +0 -14
- package/dist/db/events.d.ts.map +0 -1
- package/dist/db/field-history.d.ts +0 -17
- package/dist/db/field-history.d.ts.map +0 -1
- package/dist/db/freshness.d.ts +0 -24
- package/dist/db/freshness.d.ts.map +0 -1
- package/dist/db/graph.d.ts +0 -21
- package/dist/db/graph.d.ts.map +0 -1
- package/dist/db/groups.d.ts +0 -22
- package/dist/db/groups.d.ts.map +0 -1
- package/dist/db/health.d.ts +0 -40
- package/dist/db/health.d.ts.map +0 -1
- package/dist/db/identity.d.ts +0 -32
- package/dist/db/identity.d.ts.map +0 -1
- package/dist/db/job-history.d.ts +0 -29
- package/dist/db/job-history.d.ts.map +0 -1
- package/dist/db/learnings.d.ts +0 -43
- package/dist/db/learnings.d.ts.map +0 -1
- package/dist/db/notes.d.ts +0 -8
- package/dist/db/notes.d.ts.map +0 -1
- package/dist/db/org-chart.d.ts +0 -37
- package/dist/db/org-chart.d.ts.map +0 -1
- package/dist/db/org-members.d.ts +0 -9
- package/dist/db/org-members.d.ts.map +0 -1
- package/dist/db/paths.d.ts +0 -3
- package/dist/db/paths.d.ts.map +0 -1
- package/dist/db/pg-migrations.d.ts +0 -8
- package/dist/db/pg-migrations.d.ts.map +0 -1
- package/dist/db/relationships.d.ts +0 -30
- package/dist/db/relationships.d.ts.map +0 -1
- package/dist/db/signals.d.ts +0 -18
- package/dist/db/signals.d.ts.map +0 -1
- package/dist/db/sqlite-adapter.d.ts +0 -15
- package/dist/db/sqlite-adapter.d.ts.map +0 -1
- package/dist/db/storage.d.ts +0 -15
- package/dist/db/storage.d.ts.map +0 -1
- package/dist/db/tags.d.ts +0 -14
- package/dist/db/tags.d.ts.map +0 -1
- package/dist/db/tombstones.d.ts +0 -19
- package/dist/db/tombstones.d.ts.map +0 -1
- package/dist/db/vendor-comms.d.ts +0 -15
- package/dist/db/vendor-comms.d.ts.map +0 -1
- package/dist/generated/storage-kit/health.d.ts +0 -20
- package/dist/generated/storage-kit/health.d.ts.map +0 -1
- package/dist/generated/storage-kit/index.d.ts +0 -8
- package/dist/generated/storage-kit/index.d.ts.map +0 -1
- package/dist/generated/storage-kit/migrations.d.ts +0 -48
- package/dist/generated/storage-kit/migrations.d.ts.map +0 -1
- package/dist/generated/storage-kit/mode.d.ts +0 -48
- package/dist/generated/storage-kit/mode.d.ts.map +0 -1
- package/dist/generated/storage-kit/pool.d.ts +0 -34
- package/dist/generated/storage-kit/pool.d.ts.map +0 -1
- package/dist/generated/storage-kit/query.d.ts +0 -36
- package/dist/generated/storage-kit/query.d.ts.map +0 -1
- package/dist/generated/storage-kit/tls.d.ts +0 -26
- package/dist/generated/storage-kit/tls.d.ts.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/apple-contacts.d.ts +0 -3
- package/dist/lib/apple-contacts.d.ts.map +0 -1
- package/dist/lib/audience-contract.d.ts +0 -215
- package/dist/lib/audience-contract.d.ts.map +0 -1
- package/dist/lib/audit.d.ts +0 -12
- package/dist/lib/audit.d.ts.map +0 -1
- package/dist/lib/brief.d.ts +0 -3
- package/dist/lib/brief.d.ts.map +0 -1
- package/dist/lib/config.d.ts +0 -7
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/connector.d.ts +0 -44
- package/dist/lib/connector.d.ts.map +0 -1
- package/dist/lib/context.d.ts +0 -5
- package/dist/lib/context.d.ts.map +0 -1
- package/dist/lib/dedup.d.ts +0 -10
- package/dist/lib/dedup.d.ts.map +0 -1
- package/dist/lib/document-scanner.d.ts +0 -8
- package/dist/lib/document-scanner.d.ts.map +0 -1
- package/dist/lib/embeddings.d.ts +0 -9
- package/dist/lib/embeddings.d.ts.map +0 -1
- package/dist/lib/export.d.ts +0 -8
- package/dist/lib/export.d.ts.map +0 -1
- package/dist/lib/freshness.d.ts +0 -19
- package/dist/lib/freshness.d.ts.map +0 -1
- package/dist/lib/gmail-import.d.ts +0 -51
- package/dist/lib/gmail-import.d.ts.map +0 -1
- package/dist/lib/google-contacts.d.ts +0 -115
- package/dist/lib/google-contacts.d.ts.map +0 -1
- package/dist/lib/images.d.ts +0 -30
- package/dist/lib/images.d.ts.map +0 -1
- package/dist/lib/import.d.ts +0 -10
- package/dist/lib/import.d.ts.map +0 -1
- package/dist/lib/learning-maintenance.d.ts +0 -8
- package/dist/lib/learning-maintenance.d.ts.map +0 -1
- package/dist/lib/mailery-sync.d.ts +0 -46
- package/dist/lib/mailery-sync.d.ts.map +0 -1
- package/dist/lib/meeting-capture.d.ts +0 -15
- package/dist/lib/meeting-capture.d.ts.map +0 -1
- package/dist/lib/package-version.d.ts +0 -6
- package/dist/lib/package-version.d.ts.map +0 -1
- package/dist/lib/signals.d.ts +0 -9
- package/dist/lib/signals.d.ts.map +0 -1
- package/dist/lib/signature-parser.d.ts +0 -36
- package/dist/lib/signature-parser.d.ts.map +0 -1
- package/dist/lib/stats.d.ts +0 -24
- package/dist/lib/stats.d.ts.map +0 -1
- package/dist/lib/timeline.d.ts +0 -11
- package/dist/lib/timeline.d.ts.map +0 -1
- package/dist/lib/upcoming.d.ts +0 -14
- package/dist/lib/upcoming.d.ts.map +0 -1
- package/dist/lib/vault.d.ts +0 -24
- package/dist/lib/vault.d.ts.map +0 -1
- package/dist/mcp/handlers/advanced.d.ts +0 -14
- package/dist/mcp/handlers/advanced.d.ts.map +0 -1
- package/dist/mcp/handlers/audience.d.ts +0 -9
- package/dist/mcp/handlers/audience.d.ts.map +0 -1
- package/dist/mcp/handlers/core.d.ts +0 -10
- package/dist/mcp/handlers/core.d.ts.map +0 -1
- package/dist/mcp/handlers/crm.d.ts +0 -14
- package/dist/mcp/handlers/crm.d.ts.map +0 -1
- package/dist/mcp/handlers/index.d.ts +0 -4
- package/dist/mcp/handlers/index.d.ts.map +0 -1
- package/dist/mcp/handlers/types.d.ts +0 -10
- package/dist/mcp/handlers/types.d.ts.map +0 -1
- package/dist/mcp/http.d.ts +0 -17
- package/dist/mcp/http.d.ts.map +0 -1
- package/dist/mcp/index.d.ts +0 -5
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/register-tools.d.ts +0 -3
- package/dist/mcp/register-tools.d.ts.map +0 -1
- package/dist/mcp/schema.d.ts +0 -3
- package/dist/mcp/schema.d.ts.map +0 -1
- package/dist/mcp/storage-tools.d.ts +0 -3
- package/dist/mcp/storage-tools.d.ts.map +0 -1
- package/dist/mcp/tools.d.ts +0 -3799
- package/dist/mcp/tools.d.ts.map +0 -1
- package/dist/sdk/index.d.ts +0 -16
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/sdk/v1.generated.d.ts +0 -203
- package/dist/sdk/v1.generated.d.ts.map +0 -1
- package/dist/server/cloud-index.d.ts +0 -3
- package/dist/server/cloud-index.d.ts.map +0 -1
- package/dist/server/cloud-serve.d.ts +0 -3
- package/dist/server/cloud-serve.d.ts.map +0 -1
- package/dist/server/cloud.d.ts +0 -53
- package/dist/server/cloud.d.ts.map +0 -1
- package/dist/server/index.d.ts +0 -3
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/openapi.d.ts +0 -765
- package/dist/server/openapi.d.ts.map +0 -1
- package/dist/server/pg-store.d.ts +0 -861
- package/dist/server/pg-store.d.ts.map +0 -1
- package/dist/server/security.d.ts +0 -24
- package/dist/server/security.d.ts.map +0 -1
- package/dist/server/serve.d.ts +0 -9
- package/dist/server/serve.d.ts.map +0 -1
- package/dist/server/v1.d.ts +0 -6
- package/dist/server/v1.d.ts.map +0 -1
- package/dist/store/index.d.ts +0 -383
- package/dist/store/index.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -856
- package/dist/types/index.d.ts.map +0 -1
package/dist/types/index.d.ts
DELETED
|
@@ -1,856 +0,0 @@
|
|
|
1
|
-
export type ContactStatus = "active" | "pending_reply" | "converted" | "closed" | "other";
|
|
2
|
-
export type PreferredContactMethod = "email" | "phone" | "telegram" | "whatsapp" | "linkedin" | "twitter" | "other";
|
|
3
|
-
export type EmailType = "work" | "personal" | "other";
|
|
4
|
-
export type PhoneType = "mobile" | "work" | "home" | "fax" | "whatsapp" | "other";
|
|
5
|
-
export type AddressType = "physical" | "mailing" | "billing" | "virtual" | "other";
|
|
6
|
-
export type SocialPlatform = "twitter" | "linkedin" | "github" | "instagram" | "telegram" | "discord" | "youtube" | "tiktok" | "bluesky" | "facebook" | "whatsapp" | "snapchat" | "reddit" | "other";
|
|
7
|
-
export type RelationshipType = "colleague" | "friend" | "family" | "reports_to" | "mentor" | "investor" | "partner" | "client" | "vendor" | "other";
|
|
8
|
-
export type ContactSource = "manual" | "import" | "linkedin" | "github" | "twitter" | "email" | "calendar" | "crm" | "other";
|
|
9
|
-
export type Sensitivity = "normal" | "confidential" | "restricted";
|
|
10
|
-
export interface Email {
|
|
11
|
-
id: string;
|
|
12
|
-
contact_id: string | null;
|
|
13
|
-
company_id: string | null;
|
|
14
|
-
address: string;
|
|
15
|
-
type: EmailType;
|
|
16
|
-
is_primary: boolean;
|
|
17
|
-
created_at: string;
|
|
18
|
-
}
|
|
19
|
-
export interface Phone {
|
|
20
|
-
id: string;
|
|
21
|
-
contact_id: string | null;
|
|
22
|
-
company_id: string | null;
|
|
23
|
-
number: string;
|
|
24
|
-
country_code: string | null;
|
|
25
|
-
type: PhoneType;
|
|
26
|
-
is_primary: boolean;
|
|
27
|
-
created_at: string;
|
|
28
|
-
}
|
|
29
|
-
export interface Address {
|
|
30
|
-
id: string;
|
|
31
|
-
contact_id: string | null;
|
|
32
|
-
company_id: string | null;
|
|
33
|
-
type: AddressType;
|
|
34
|
-
street: string | null;
|
|
35
|
-
city: string | null;
|
|
36
|
-
state: string | null;
|
|
37
|
-
zip: string | null;
|
|
38
|
-
country: string | null;
|
|
39
|
-
is_primary: boolean;
|
|
40
|
-
created_at: string;
|
|
41
|
-
}
|
|
42
|
-
export interface SocialProfile {
|
|
43
|
-
id: string;
|
|
44
|
-
contact_id: string | null;
|
|
45
|
-
company_id: string | null;
|
|
46
|
-
platform: SocialPlatform;
|
|
47
|
-
handle: string | null;
|
|
48
|
-
url: string | null;
|
|
49
|
-
is_primary: boolean;
|
|
50
|
-
created_at: string;
|
|
51
|
-
}
|
|
52
|
-
export interface Tag {
|
|
53
|
-
id: string;
|
|
54
|
-
name: string;
|
|
55
|
-
color: string;
|
|
56
|
-
description: string | null;
|
|
57
|
-
created_at: string;
|
|
58
|
-
}
|
|
59
|
-
export interface CreateTagInput {
|
|
60
|
-
name: string;
|
|
61
|
-
color?: string;
|
|
62
|
-
description?: string;
|
|
63
|
-
}
|
|
64
|
-
export interface UpdateTagInput {
|
|
65
|
-
name?: string;
|
|
66
|
-
color?: string;
|
|
67
|
-
description?: string | null;
|
|
68
|
-
}
|
|
69
|
-
export interface Contact {
|
|
70
|
-
id: string;
|
|
71
|
-
first_name: string;
|
|
72
|
-
last_name: string;
|
|
73
|
-
display_name: string;
|
|
74
|
-
nickname: string | null;
|
|
75
|
-
avatar_url: string | null;
|
|
76
|
-
notes: string | null;
|
|
77
|
-
birthday: string | null;
|
|
78
|
-
company_id: string | null;
|
|
79
|
-
job_title: string | null;
|
|
80
|
-
source: ContactSource;
|
|
81
|
-
custom_fields: Record<string, unknown>;
|
|
82
|
-
last_contacted_at: string | null;
|
|
83
|
-
website: string | null;
|
|
84
|
-
preferred_contact_method: PreferredContactMethod | null;
|
|
85
|
-
status: ContactStatus;
|
|
86
|
-
follow_up_at: string | null;
|
|
87
|
-
archived: boolean;
|
|
88
|
-
project_id: string | null;
|
|
89
|
-
sensitivity: Sensitivity;
|
|
90
|
-
do_not_contact?: boolean;
|
|
91
|
-
priority?: number;
|
|
92
|
-
timezone?: string | null;
|
|
93
|
-
created_at: string;
|
|
94
|
-
updated_at: string;
|
|
95
|
-
}
|
|
96
|
-
export interface ContactWithDetails extends Contact {
|
|
97
|
-
emails: Email[];
|
|
98
|
-
phones: Phone[];
|
|
99
|
-
addresses: Address[];
|
|
100
|
-
social_profiles: SocialProfile[];
|
|
101
|
-
tags: Tag[];
|
|
102
|
-
company: Company | null;
|
|
103
|
-
}
|
|
104
|
-
export interface CreateContactInput {
|
|
105
|
-
first_name?: string;
|
|
106
|
-
last_name?: string;
|
|
107
|
-
display_name?: string;
|
|
108
|
-
nickname?: string;
|
|
109
|
-
avatar_url?: string;
|
|
110
|
-
notes?: string;
|
|
111
|
-
birthday?: string;
|
|
112
|
-
company_id?: string;
|
|
113
|
-
job_title?: string;
|
|
114
|
-
source?: ContactSource;
|
|
115
|
-
custom_fields?: Record<string, unknown>;
|
|
116
|
-
last_contacted_at?: string;
|
|
117
|
-
website?: string;
|
|
118
|
-
preferred_contact_method?: PreferredContactMethod;
|
|
119
|
-
status?: ContactStatus;
|
|
120
|
-
follow_up_at?: string;
|
|
121
|
-
project_id?: string;
|
|
122
|
-
sensitivity?: Sensitivity;
|
|
123
|
-
do_not_contact?: boolean;
|
|
124
|
-
priority?: number;
|
|
125
|
-
timezone?: string;
|
|
126
|
-
emails?: CreateEmailInput[];
|
|
127
|
-
phones?: CreatePhoneInput[];
|
|
128
|
-
addresses?: CreateAddressInput[];
|
|
129
|
-
social_profiles?: CreateSocialProfileInput[];
|
|
130
|
-
tag_ids?: string[];
|
|
131
|
-
}
|
|
132
|
-
export interface UpdateContactInput {
|
|
133
|
-
first_name?: string;
|
|
134
|
-
last_name?: string;
|
|
135
|
-
display_name?: string;
|
|
136
|
-
nickname?: string | null;
|
|
137
|
-
avatar_url?: string | null;
|
|
138
|
-
notes?: string | null;
|
|
139
|
-
birthday?: string | null;
|
|
140
|
-
company_id?: string | null;
|
|
141
|
-
job_title?: string | null;
|
|
142
|
-
source?: ContactSource;
|
|
143
|
-
custom_fields?: Record<string, unknown>;
|
|
144
|
-
last_contacted_at?: string | null;
|
|
145
|
-
website?: string | null;
|
|
146
|
-
preferred_contact_method?: PreferredContactMethod | null;
|
|
147
|
-
status?: ContactStatus;
|
|
148
|
-
follow_up_at?: string | null;
|
|
149
|
-
project_id?: string | null;
|
|
150
|
-
sensitivity?: Sensitivity;
|
|
151
|
-
do_not_contact?: boolean;
|
|
152
|
-
priority?: number | null;
|
|
153
|
-
timezone?: string | null;
|
|
154
|
-
emails_add?: CreateEmailInput[];
|
|
155
|
-
phones_add?: CreatePhoneInput[];
|
|
156
|
-
}
|
|
157
|
-
export interface ContactListOptions {
|
|
158
|
-
limit?: number;
|
|
159
|
-
offset?: number;
|
|
160
|
-
company_id?: string;
|
|
161
|
-
tag_id?: string;
|
|
162
|
-
tag_ids?: string[];
|
|
163
|
-
source?: ContactSource;
|
|
164
|
-
status?: ContactStatus;
|
|
165
|
-
project_id?: string;
|
|
166
|
-
archived?: boolean;
|
|
167
|
-
follow_up_due?: boolean;
|
|
168
|
-
last_contacted_after?: string;
|
|
169
|
-
last_contacted_before?: string;
|
|
170
|
-
order_by?: "display_name" | "created_at" | "updated_at" | "last_contacted_at" | "follow_up_at";
|
|
171
|
-
order_dir?: "asc" | "desc";
|
|
172
|
-
include_dnc?: boolean;
|
|
173
|
-
include_restricted?: boolean;
|
|
174
|
-
priority_min?: number;
|
|
175
|
-
updated_since?: string;
|
|
176
|
-
}
|
|
177
|
-
export type DealStage = 'lead' | 'qualified' | 'proposal' | 'negotiation' | 'won' | 'lost' | 'cancelled';
|
|
178
|
-
export interface Deal {
|
|
179
|
-
id: string;
|
|
180
|
-
title: string;
|
|
181
|
-
contact_id?: string | null;
|
|
182
|
-
company_id?: string | null;
|
|
183
|
-
stage: DealStage;
|
|
184
|
-
value_usd?: number | null;
|
|
185
|
-
currency: string;
|
|
186
|
-
close_date?: string | null;
|
|
187
|
-
notes?: string | null;
|
|
188
|
-
created_at: string;
|
|
189
|
-
updated_at: string;
|
|
190
|
-
}
|
|
191
|
-
export interface CreateDealInput {
|
|
192
|
-
title: string;
|
|
193
|
-
contact_id?: string;
|
|
194
|
-
company_id?: string;
|
|
195
|
-
stage?: DealStage;
|
|
196
|
-
value_usd?: number;
|
|
197
|
-
currency?: string;
|
|
198
|
-
close_date?: string;
|
|
199
|
-
notes?: string;
|
|
200
|
-
}
|
|
201
|
-
export interface UpdateDealInput {
|
|
202
|
-
title?: string;
|
|
203
|
-
contact_id?: string | null;
|
|
204
|
-
company_id?: string | null;
|
|
205
|
-
stage?: DealStage;
|
|
206
|
-
value_usd?: number | null;
|
|
207
|
-
currency?: string;
|
|
208
|
-
close_date?: string | null;
|
|
209
|
-
notes?: string | null;
|
|
210
|
-
}
|
|
211
|
-
export type EventType = 'meeting' | 'call' | 'lunch' | 'email' | 'demo' | 'conference' | 'intro' | 'other';
|
|
212
|
-
export interface ContactEvent {
|
|
213
|
-
id: string;
|
|
214
|
-
title: string;
|
|
215
|
-
type: EventType;
|
|
216
|
-
event_date: string;
|
|
217
|
-
duration_min?: number | null;
|
|
218
|
-
contact_ids: string[];
|
|
219
|
-
company_id?: string | null;
|
|
220
|
-
notes?: string | null;
|
|
221
|
-
outcome?: string | null;
|
|
222
|
-
deal_id?: string | null;
|
|
223
|
-
created_at: string;
|
|
224
|
-
}
|
|
225
|
-
export interface CreateEventInput {
|
|
226
|
-
title: string;
|
|
227
|
-
type?: EventType;
|
|
228
|
-
event_date: string;
|
|
229
|
-
duration_min?: number;
|
|
230
|
-
contact_ids?: string[];
|
|
231
|
-
company_id?: string;
|
|
232
|
-
notes?: string;
|
|
233
|
-
outcome?: string;
|
|
234
|
-
deal_id?: string;
|
|
235
|
-
}
|
|
236
|
-
export type EntityType = 'operating' | 'holding' | 'dissolved' | 'nonprofit' | 'trust' | 'branch' | 'other';
|
|
237
|
-
export interface Company {
|
|
238
|
-
id: string;
|
|
239
|
-
name: string;
|
|
240
|
-
domain: string | null;
|
|
241
|
-
logo_url: string | null;
|
|
242
|
-
description: string | null;
|
|
243
|
-
industry: string | null;
|
|
244
|
-
size: string | null;
|
|
245
|
-
founded_year: number | null;
|
|
246
|
-
notes: string | null;
|
|
247
|
-
custom_fields: Record<string, unknown>;
|
|
248
|
-
archived: boolean;
|
|
249
|
-
project_id: string | null;
|
|
250
|
-
is_owned_entity: boolean;
|
|
251
|
-
entity_type?: EntityType | null;
|
|
252
|
-
created_at: string;
|
|
253
|
-
updated_at: string;
|
|
254
|
-
}
|
|
255
|
-
export interface CompanyWithDetails extends Company {
|
|
256
|
-
emails: Email[];
|
|
257
|
-
phones: Phone[];
|
|
258
|
-
addresses: Address[];
|
|
259
|
-
social_profiles: SocialProfile[];
|
|
260
|
-
tags: Tag[];
|
|
261
|
-
employee_count: number;
|
|
262
|
-
}
|
|
263
|
-
export interface CreateCompanyInput {
|
|
264
|
-
name: string;
|
|
265
|
-
domain?: string;
|
|
266
|
-
logo_url?: string;
|
|
267
|
-
description?: string;
|
|
268
|
-
industry?: string;
|
|
269
|
-
size?: string;
|
|
270
|
-
founded_year?: number;
|
|
271
|
-
notes?: string;
|
|
272
|
-
custom_fields?: Record<string, unknown>;
|
|
273
|
-
is_owned_entity?: boolean;
|
|
274
|
-
entity_type?: EntityType;
|
|
275
|
-
emails?: CreateEmailInput[];
|
|
276
|
-
phones?: CreatePhoneInput[];
|
|
277
|
-
addresses?: CreateAddressInput[];
|
|
278
|
-
social_profiles?: CreateSocialProfileInput[];
|
|
279
|
-
tag_ids?: string[];
|
|
280
|
-
}
|
|
281
|
-
export interface UpdateCompanyInput {
|
|
282
|
-
name?: string;
|
|
283
|
-
domain?: string | null;
|
|
284
|
-
logo_url?: string | null;
|
|
285
|
-
description?: string | null;
|
|
286
|
-
industry?: string | null;
|
|
287
|
-
size?: string | null;
|
|
288
|
-
founded_year?: number | null;
|
|
289
|
-
notes?: string | null;
|
|
290
|
-
custom_fields?: Record<string, unknown>;
|
|
291
|
-
project_id?: string | null;
|
|
292
|
-
is_owned_entity?: boolean;
|
|
293
|
-
entity_type?: EntityType | null;
|
|
294
|
-
}
|
|
295
|
-
export interface CompanyListOptions {
|
|
296
|
-
limit?: number;
|
|
297
|
-
offset?: number;
|
|
298
|
-
industry?: string;
|
|
299
|
-
tag_id?: string;
|
|
300
|
-
project_id?: string;
|
|
301
|
-
archived?: boolean;
|
|
302
|
-
is_owned_entity?: boolean;
|
|
303
|
-
order_by?: "name" | "created_at" | "updated_at";
|
|
304
|
-
order_dir?: "asc" | "desc";
|
|
305
|
-
}
|
|
306
|
-
export interface CreateEmailInput {
|
|
307
|
-
address: string;
|
|
308
|
-
type?: EmailType;
|
|
309
|
-
is_primary?: boolean;
|
|
310
|
-
}
|
|
311
|
-
export interface CreatePhoneInput {
|
|
312
|
-
number: string;
|
|
313
|
-
country_code?: string;
|
|
314
|
-
type?: PhoneType;
|
|
315
|
-
is_primary?: boolean;
|
|
316
|
-
}
|
|
317
|
-
export interface CreateAddressInput {
|
|
318
|
-
type?: AddressType;
|
|
319
|
-
street?: string;
|
|
320
|
-
city?: string;
|
|
321
|
-
state?: string;
|
|
322
|
-
zip?: string;
|
|
323
|
-
country?: string;
|
|
324
|
-
is_primary?: boolean;
|
|
325
|
-
}
|
|
326
|
-
export interface CreateSocialProfileInput {
|
|
327
|
-
platform: SocialPlatform;
|
|
328
|
-
handle?: string;
|
|
329
|
-
url?: string;
|
|
330
|
-
is_primary?: boolean;
|
|
331
|
-
}
|
|
332
|
-
export interface ContactRelationship {
|
|
333
|
-
id: string;
|
|
334
|
-
contact_a_id: string;
|
|
335
|
-
contact_b_id: string;
|
|
336
|
-
relationship_type: RelationshipType;
|
|
337
|
-
notes: string | null;
|
|
338
|
-
created_at: string;
|
|
339
|
-
}
|
|
340
|
-
export interface CreateRelationshipInput {
|
|
341
|
-
contact_a_id: string;
|
|
342
|
-
contact_b_id: string;
|
|
343
|
-
relationship_type: RelationshipType;
|
|
344
|
-
notes?: string;
|
|
345
|
-
}
|
|
346
|
-
export interface ContactNote {
|
|
347
|
-
id: string;
|
|
348
|
-
contact_id: string;
|
|
349
|
-
body: string;
|
|
350
|
-
created_by: string | null;
|
|
351
|
-
company_id?: string | null;
|
|
352
|
-
created_at: string;
|
|
353
|
-
}
|
|
354
|
-
export type CompanyRelationshipType = "client" | "vendor" | "partner" | "employee" | "contractor" | "investor" | "advisor" | "other" | "tax_preparer" | "registered_agent" | "bank_manager" | "attorney" | "paralegal" | "accountant" | "payroll_specialist" | "compliance_officer" | "primary_contact" | "backup_contact" | "recruiter" | "insurance_broker";
|
|
355
|
-
export interface CompanyRelationship {
|
|
356
|
-
id: string;
|
|
357
|
-
contact_id: string;
|
|
358
|
-
company_id: string;
|
|
359
|
-
relationship_type: CompanyRelationshipType;
|
|
360
|
-
notes: string | null;
|
|
361
|
-
start_date?: string | null;
|
|
362
|
-
end_date?: string | null;
|
|
363
|
-
is_primary: boolean;
|
|
364
|
-
status: 'active' | 'inactive' | 'ended';
|
|
365
|
-
created_at: string;
|
|
366
|
-
}
|
|
367
|
-
export interface CreateCompanyRelationshipInput {
|
|
368
|
-
contact_id: string;
|
|
369
|
-
company_id: string;
|
|
370
|
-
relationship_type: CompanyRelationshipType;
|
|
371
|
-
notes?: string;
|
|
372
|
-
start_date?: string;
|
|
373
|
-
end_date?: string;
|
|
374
|
-
is_primary?: boolean;
|
|
375
|
-
status?: 'active' | 'inactive' | 'ended';
|
|
376
|
-
}
|
|
377
|
-
export interface CompanyRelationshipRow {
|
|
378
|
-
id: string;
|
|
379
|
-
contact_id: string;
|
|
380
|
-
company_id: string;
|
|
381
|
-
relationship_type: string;
|
|
382
|
-
notes: string | null;
|
|
383
|
-
start_date: string | null;
|
|
384
|
-
end_date: string | null;
|
|
385
|
-
is_primary: number;
|
|
386
|
-
status: string;
|
|
387
|
-
created_at: string;
|
|
388
|
-
}
|
|
389
|
-
export interface OrgMember {
|
|
390
|
-
id: string;
|
|
391
|
-
company_id: string;
|
|
392
|
-
contact_id: string;
|
|
393
|
-
title?: string | null;
|
|
394
|
-
specialization?: string | null;
|
|
395
|
-
office_phone?: string | null;
|
|
396
|
-
response_sla_hours?: number | null;
|
|
397
|
-
notes?: string | null;
|
|
398
|
-
created_at: string;
|
|
399
|
-
updated_at: string;
|
|
400
|
-
}
|
|
401
|
-
export interface CreateOrgMemberInput {
|
|
402
|
-
company_id: string;
|
|
403
|
-
contact_id: string;
|
|
404
|
-
title?: string;
|
|
405
|
-
specialization?: string;
|
|
406
|
-
office_phone?: string;
|
|
407
|
-
response_sla_hours?: number;
|
|
408
|
-
notes?: string;
|
|
409
|
-
}
|
|
410
|
-
export interface UpdateOrgMemberInput {
|
|
411
|
-
title?: string | null;
|
|
412
|
-
specialization?: string | null;
|
|
413
|
-
office_phone?: string | null;
|
|
414
|
-
response_sla_hours?: number | null;
|
|
415
|
-
notes?: string | null;
|
|
416
|
-
}
|
|
417
|
-
export type VendorCommType = 'email' | 'call' | 'meeting' | 'invoice_request' | 'invoice_received' | 'payment' | 'dispute' | 'other';
|
|
418
|
-
export type VendorCommDirection = 'inbound' | 'outbound';
|
|
419
|
-
export type VendorCommStatus = 'sent' | 'awaiting_response' | 'responded' | 'no_response' | 'resolved';
|
|
420
|
-
export interface VendorCommunication {
|
|
421
|
-
id: string;
|
|
422
|
-
company_id: string;
|
|
423
|
-
contact_id?: string | null;
|
|
424
|
-
comm_date: string;
|
|
425
|
-
type: VendorCommType;
|
|
426
|
-
direction: VendorCommDirection;
|
|
427
|
-
subject?: string | null;
|
|
428
|
-
body?: string | null;
|
|
429
|
-
status: VendorCommStatus;
|
|
430
|
-
invoice_amount?: number | null;
|
|
431
|
-
invoice_currency?: string | null;
|
|
432
|
-
invoice_ref?: string | null;
|
|
433
|
-
follow_up_date?: string | null;
|
|
434
|
-
follow_up_done: boolean;
|
|
435
|
-
created_at: string;
|
|
436
|
-
}
|
|
437
|
-
export interface CreateVendorCommunicationInput {
|
|
438
|
-
company_id: string;
|
|
439
|
-
contact_id?: string;
|
|
440
|
-
comm_date: string;
|
|
441
|
-
type?: VendorCommType;
|
|
442
|
-
direction?: VendorCommDirection;
|
|
443
|
-
subject?: string;
|
|
444
|
-
body?: string;
|
|
445
|
-
status?: VendorCommStatus;
|
|
446
|
-
invoice_amount?: number;
|
|
447
|
-
invoice_currency?: string;
|
|
448
|
-
invoice_ref?: string;
|
|
449
|
-
follow_up_date?: string;
|
|
450
|
-
follow_up_done?: boolean;
|
|
451
|
-
}
|
|
452
|
-
export interface UpdateVendorCommunicationInput {
|
|
453
|
-
contact_id?: string | null;
|
|
454
|
-
comm_date?: string;
|
|
455
|
-
type?: VendorCommType;
|
|
456
|
-
direction?: VendorCommDirection;
|
|
457
|
-
subject?: string | null;
|
|
458
|
-
body?: string | null;
|
|
459
|
-
status?: VendorCommStatus;
|
|
460
|
-
invoice_amount?: number | null;
|
|
461
|
-
invoice_currency?: string | null;
|
|
462
|
-
invoice_ref?: string | null;
|
|
463
|
-
follow_up_date?: string | null;
|
|
464
|
-
follow_up_done?: boolean;
|
|
465
|
-
}
|
|
466
|
-
export interface EscalationRule {
|
|
467
|
-
after_days: number;
|
|
468
|
-
escalate_to_contact_id: string;
|
|
469
|
-
method: 'email' | 'note' | 'both';
|
|
470
|
-
}
|
|
471
|
-
export interface ContactTask {
|
|
472
|
-
id: string;
|
|
473
|
-
title: string;
|
|
474
|
-
description?: string | null;
|
|
475
|
-
contact_id: string;
|
|
476
|
-
assigned_by?: string | null;
|
|
477
|
-
deadline?: string | null;
|
|
478
|
-
status: 'pending' | 'awaiting_response' | 'in_progress' | 'completed' | 'cancelled' | 'escalated';
|
|
479
|
-
priority: 'low' | 'medium' | 'high' | 'critical';
|
|
480
|
-
entity_id?: string | null;
|
|
481
|
-
linked_todos_task_id?: string | null;
|
|
482
|
-
escalation_rules: EscalationRule[];
|
|
483
|
-
created_at: string;
|
|
484
|
-
updated_at: string;
|
|
485
|
-
}
|
|
486
|
-
export interface CreateContactTaskInput {
|
|
487
|
-
title: string;
|
|
488
|
-
description?: string;
|
|
489
|
-
contact_id: string;
|
|
490
|
-
assigned_by?: string;
|
|
491
|
-
deadline?: string;
|
|
492
|
-
status?: ContactTask['status'];
|
|
493
|
-
priority?: ContactTask['priority'];
|
|
494
|
-
entity_id?: string;
|
|
495
|
-
linked_todos_task_id?: string;
|
|
496
|
-
escalation_rules?: EscalationRule[];
|
|
497
|
-
}
|
|
498
|
-
export interface UpdateContactTaskInput {
|
|
499
|
-
title?: string;
|
|
500
|
-
description?: string | null;
|
|
501
|
-
assigned_by?: string | null;
|
|
502
|
-
deadline?: string | null;
|
|
503
|
-
status?: ContactTask['status'];
|
|
504
|
-
priority?: ContactTask['priority'];
|
|
505
|
-
entity_id?: string | null;
|
|
506
|
-
linked_todos_task_id?: string | null;
|
|
507
|
-
escalation_rules?: EscalationRule[];
|
|
508
|
-
}
|
|
509
|
-
export type ApplicationType = 'ai_credits' | 'grant' | 'startup_program' | 'visa' | 'trademark' | 'tax_filing' | 'loan' | 'other';
|
|
510
|
-
export type ApplicationStatus = 'draft' | 'submitted' | 'pending' | 'approved' | 'rejected' | 'follow_up_needed' | 'expired' | 'cancelled';
|
|
511
|
-
export type ApplicationMethod = 'email' | 'form' | 'typeform' | 'hubspot' | 'manual' | 'browser' | 'feathery' | 'other';
|
|
512
|
-
export interface Application {
|
|
513
|
-
id: string;
|
|
514
|
-
program_name: string;
|
|
515
|
-
provider_company_id?: string | null;
|
|
516
|
-
type: ApplicationType;
|
|
517
|
-
value_usd?: number | null;
|
|
518
|
-
applicant_contact_id?: string | null;
|
|
519
|
-
primary_contact_id?: string | null;
|
|
520
|
-
status: ApplicationStatus;
|
|
521
|
-
submitted_date?: string | null;
|
|
522
|
-
decision_date?: string | null;
|
|
523
|
-
follow_up_date?: string | null;
|
|
524
|
-
notes?: string | null;
|
|
525
|
-
method?: ApplicationMethod | null;
|
|
526
|
-
form_url?: string | null;
|
|
527
|
-
metadata: Record<string, unknown>;
|
|
528
|
-
created_at: string;
|
|
529
|
-
updated_at: string;
|
|
530
|
-
}
|
|
531
|
-
export interface CreateApplicationInput {
|
|
532
|
-
program_name: string;
|
|
533
|
-
provider_company_id?: string;
|
|
534
|
-
type?: ApplicationType;
|
|
535
|
-
value_usd?: number;
|
|
536
|
-
applicant_contact_id?: string;
|
|
537
|
-
primary_contact_id?: string;
|
|
538
|
-
status?: ApplicationStatus;
|
|
539
|
-
submitted_date?: string;
|
|
540
|
-
decision_date?: string;
|
|
541
|
-
follow_up_date?: string;
|
|
542
|
-
notes?: string;
|
|
543
|
-
method?: ApplicationMethod;
|
|
544
|
-
form_url?: string;
|
|
545
|
-
metadata?: Record<string, unknown>;
|
|
546
|
-
}
|
|
547
|
-
export interface UpdateApplicationInput {
|
|
548
|
-
program_name?: string;
|
|
549
|
-
provider_company_id?: string | null;
|
|
550
|
-
type?: ApplicationType;
|
|
551
|
-
value_usd?: number | null;
|
|
552
|
-
applicant_contact_id?: string | null;
|
|
553
|
-
primary_contact_id?: string | null;
|
|
554
|
-
status?: ApplicationStatus;
|
|
555
|
-
submitted_date?: string | null;
|
|
556
|
-
decision_date?: string | null;
|
|
557
|
-
follow_up_date?: string | null;
|
|
558
|
-
notes?: string | null;
|
|
559
|
-
method?: ApplicationMethod | null;
|
|
560
|
-
form_url?: string | null;
|
|
561
|
-
metadata?: Record<string, unknown>;
|
|
562
|
-
}
|
|
563
|
-
export interface ListApplicationsOptions {
|
|
564
|
-
type?: ApplicationType;
|
|
565
|
-
status?: ApplicationStatus;
|
|
566
|
-
provider_company_id?: string;
|
|
567
|
-
applicant_contact_id?: string;
|
|
568
|
-
}
|
|
569
|
-
export interface ActivityLog {
|
|
570
|
-
id: string;
|
|
571
|
-
contact_id: string | null;
|
|
572
|
-
company_id: string | null;
|
|
573
|
-
action: string;
|
|
574
|
-
details: string | null;
|
|
575
|
-
created_at: string;
|
|
576
|
-
}
|
|
577
|
-
export interface CreateActivityInput {
|
|
578
|
-
contact_id?: string;
|
|
579
|
-
company_id?: string;
|
|
580
|
-
action: string;
|
|
581
|
-
details?: string;
|
|
582
|
-
}
|
|
583
|
-
export interface Webhook {
|
|
584
|
-
id: string;
|
|
585
|
-
url: string;
|
|
586
|
-
events: string[];
|
|
587
|
-
secret: string | null;
|
|
588
|
-
active: boolean;
|
|
589
|
-
created_at: string;
|
|
590
|
-
}
|
|
591
|
-
export interface CreateWebhookInput {
|
|
592
|
-
url: string;
|
|
593
|
-
events?: string[];
|
|
594
|
-
secret?: string;
|
|
595
|
-
}
|
|
596
|
-
export interface UpdateWebhookInput {
|
|
597
|
-
url?: string;
|
|
598
|
-
events?: string[];
|
|
599
|
-
secret?: string | null;
|
|
600
|
-
active?: boolean;
|
|
601
|
-
}
|
|
602
|
-
export interface ContactRow {
|
|
603
|
-
id: string;
|
|
604
|
-
first_name: string;
|
|
605
|
-
last_name: string;
|
|
606
|
-
display_name: string;
|
|
607
|
-
nickname: string | null;
|
|
608
|
-
avatar_url: string | null;
|
|
609
|
-
notes: string | null;
|
|
610
|
-
birthday: string | null;
|
|
611
|
-
company_id: string | null;
|
|
612
|
-
job_title: string | null;
|
|
613
|
-
source: string;
|
|
614
|
-
custom_fields: string;
|
|
615
|
-
last_contacted_at: string | null;
|
|
616
|
-
website: string | null;
|
|
617
|
-
preferred_contact_method: string | null;
|
|
618
|
-
status: string;
|
|
619
|
-
follow_up_at: string | null;
|
|
620
|
-
archived: number;
|
|
621
|
-
project_id: string | null;
|
|
622
|
-
sensitivity: string;
|
|
623
|
-
do_not_contact: number;
|
|
624
|
-
priority: number;
|
|
625
|
-
timezone: string | null;
|
|
626
|
-
created_at: string;
|
|
627
|
-
updated_at: string;
|
|
628
|
-
}
|
|
629
|
-
export interface CompanyRow {
|
|
630
|
-
id: string;
|
|
631
|
-
name: string;
|
|
632
|
-
domain: string | null;
|
|
633
|
-
logo_url: string | null;
|
|
634
|
-
description: string | null;
|
|
635
|
-
industry: string | null;
|
|
636
|
-
size: string | null;
|
|
637
|
-
founded_year: number | null;
|
|
638
|
-
notes: string | null;
|
|
639
|
-
custom_fields: string;
|
|
640
|
-
archived: number;
|
|
641
|
-
project_id: string | null;
|
|
642
|
-
is_owned_entity: number;
|
|
643
|
-
entity_type: string | null;
|
|
644
|
-
created_at: string;
|
|
645
|
-
updated_at: string;
|
|
646
|
-
}
|
|
647
|
-
export interface EmailRow {
|
|
648
|
-
id: string;
|
|
649
|
-
contact_id: string | null;
|
|
650
|
-
company_id: string | null;
|
|
651
|
-
address: string;
|
|
652
|
-
type: string;
|
|
653
|
-
is_primary: number;
|
|
654
|
-
created_at: string;
|
|
655
|
-
}
|
|
656
|
-
export interface PhoneRow {
|
|
657
|
-
id: string;
|
|
658
|
-
contact_id: string | null;
|
|
659
|
-
company_id: string | null;
|
|
660
|
-
number: string;
|
|
661
|
-
country_code: string | null;
|
|
662
|
-
type: string;
|
|
663
|
-
is_primary: number;
|
|
664
|
-
created_at: string;
|
|
665
|
-
}
|
|
666
|
-
export interface AddressRow {
|
|
667
|
-
id: string;
|
|
668
|
-
contact_id: string | null;
|
|
669
|
-
company_id: string | null;
|
|
670
|
-
type: string;
|
|
671
|
-
street: string | null;
|
|
672
|
-
city: string | null;
|
|
673
|
-
state: string | null;
|
|
674
|
-
zip: string | null;
|
|
675
|
-
country: string | null;
|
|
676
|
-
is_primary: number;
|
|
677
|
-
created_at: string;
|
|
678
|
-
}
|
|
679
|
-
export interface SocialProfileRow {
|
|
680
|
-
id: string;
|
|
681
|
-
contact_id: string | null;
|
|
682
|
-
company_id: string | null;
|
|
683
|
-
platform: string;
|
|
684
|
-
handle: string | null;
|
|
685
|
-
url: string | null;
|
|
686
|
-
is_primary: number;
|
|
687
|
-
created_at: string;
|
|
688
|
-
}
|
|
689
|
-
export interface TagRow {
|
|
690
|
-
id: string;
|
|
691
|
-
name: string;
|
|
692
|
-
color: string;
|
|
693
|
-
description: string | null;
|
|
694
|
-
created_at: string;
|
|
695
|
-
}
|
|
696
|
-
export interface RelationshipRow {
|
|
697
|
-
id: string;
|
|
698
|
-
contact_a_id: string;
|
|
699
|
-
contact_b_id: string;
|
|
700
|
-
relationship_type: string;
|
|
701
|
-
notes: string | null;
|
|
702
|
-
created_at: string;
|
|
703
|
-
}
|
|
704
|
-
export interface ActivityRow {
|
|
705
|
-
id: string;
|
|
706
|
-
contact_id: string | null;
|
|
707
|
-
company_id: string | null;
|
|
708
|
-
action: string;
|
|
709
|
-
details: string | null;
|
|
710
|
-
created_at: string;
|
|
711
|
-
}
|
|
712
|
-
export interface WebhookRow {
|
|
713
|
-
id: string;
|
|
714
|
-
url: string;
|
|
715
|
-
events: string;
|
|
716
|
-
secret: string | null;
|
|
717
|
-
active: number;
|
|
718
|
-
created_at: string;
|
|
719
|
-
}
|
|
720
|
-
export interface Group {
|
|
721
|
-
id: string;
|
|
722
|
-
name: string;
|
|
723
|
-
description: string | null;
|
|
724
|
-
project_id: string | null;
|
|
725
|
-
member_count?: number;
|
|
726
|
-
company_count?: number;
|
|
727
|
-
created_at: string;
|
|
728
|
-
updated_at: string;
|
|
729
|
-
}
|
|
730
|
-
export interface CreateGroupInput {
|
|
731
|
-
name: string;
|
|
732
|
-
description?: string;
|
|
733
|
-
project_id?: string;
|
|
734
|
-
}
|
|
735
|
-
export interface UpdateGroupInput {
|
|
736
|
-
name?: string;
|
|
737
|
-
description?: string | null;
|
|
738
|
-
project_id?: string | null;
|
|
739
|
-
}
|
|
740
|
-
export interface DuplicateByEmail {
|
|
741
|
-
email: string;
|
|
742
|
-
contact_ids: string[];
|
|
743
|
-
}
|
|
744
|
-
export interface DuplicateByName {
|
|
745
|
-
contact_ids: [string, string];
|
|
746
|
-
similarity: number;
|
|
747
|
-
}
|
|
748
|
-
export declare class ContactNotFoundError extends Error {
|
|
749
|
-
constructor(id: string);
|
|
750
|
-
}
|
|
751
|
-
export declare class CompanyNotFoundError extends Error {
|
|
752
|
-
constructor(id: string);
|
|
753
|
-
}
|
|
754
|
-
export declare class TagNotFoundError extends Error {
|
|
755
|
-
constructor(id: string);
|
|
756
|
-
}
|
|
757
|
-
export declare class DuplicateTagNameError extends Error {
|
|
758
|
-
constructor(name: string);
|
|
759
|
-
}
|
|
760
|
-
export declare const AUDIENCE_CHANNELS: readonly ["email", "telegram", "sms"];
|
|
761
|
-
export type AudienceChannel = (typeof AUDIENCE_CHANNELS)[number];
|
|
762
|
-
export declare const CONSENT_STATUSES: readonly ["opt_in", "opt_out", "unknown"];
|
|
763
|
-
export type ConsentStatus = (typeof CONSENT_STATUSES)[number];
|
|
764
|
-
export declare const CONSENT_POLICIES: readonly ["opt_in", "opt_out", "transactional", "none"];
|
|
765
|
-
export type ConsentPolicy = (typeof CONSENT_POLICIES)[number];
|
|
766
|
-
export type AudienceMatch = "all" | "any";
|
|
767
|
-
export type AudiencePredicateKind = "tag" | "attribute" | "group";
|
|
768
|
-
export type AudiencePredicateOp = "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists";
|
|
769
|
-
export type AudiencePredicateValue = string | number | boolean;
|
|
770
|
-
export interface AudiencePredicate {
|
|
771
|
-
kind: AudiencePredicateKind;
|
|
772
|
-
/** Attribute key (required for attribute predicates), e.g. `job_title` or a custom field name. */
|
|
773
|
-
key?: string;
|
|
774
|
-
op?: AudiencePredicateOp;
|
|
775
|
-
value?: AudiencePredicateValue;
|
|
776
|
-
values?: AudiencePredicateValue[];
|
|
777
|
-
}
|
|
778
|
-
export interface Audience {
|
|
779
|
-
id: string;
|
|
780
|
-
audience_id: string;
|
|
781
|
-
name: string;
|
|
782
|
-
match: AudienceMatch;
|
|
783
|
-
predicates: AudiencePredicate[];
|
|
784
|
-
consent_policy: ConsentPolicy;
|
|
785
|
-
suppression_synced_at: string | null;
|
|
786
|
-
created_at: string;
|
|
787
|
-
updated_at: string;
|
|
788
|
-
}
|
|
789
|
-
export interface AudienceRow {
|
|
790
|
-
id: string;
|
|
791
|
-
audience_id: string;
|
|
792
|
-
name: string;
|
|
793
|
-
match: AudienceMatch;
|
|
794
|
-
predicates: string;
|
|
795
|
-
consent_policy: ConsentPolicy;
|
|
796
|
-
suppression_synced_at: string | null;
|
|
797
|
-
created_at: string;
|
|
798
|
-
updated_at: string;
|
|
799
|
-
}
|
|
800
|
-
export interface CreateAudienceInput {
|
|
801
|
-
audience_id: string;
|
|
802
|
-
name: string;
|
|
803
|
-
match?: AudienceMatch;
|
|
804
|
-
predicates: AudiencePredicate[];
|
|
805
|
-
consent_policy?: ConsentPolicy;
|
|
806
|
-
}
|
|
807
|
-
export interface UpdateAudienceInput {
|
|
808
|
-
name?: string;
|
|
809
|
-
match?: AudienceMatch;
|
|
810
|
-
predicates?: AudiencePredicate[];
|
|
811
|
-
consent_policy?: ConsentPolicy;
|
|
812
|
-
}
|
|
813
|
-
export interface ContactConsent {
|
|
814
|
-
contact_id: string;
|
|
815
|
-
channel: AudienceChannel;
|
|
816
|
-
status: ConsentStatus;
|
|
817
|
-
source: string | null;
|
|
818
|
-
updated_at: string;
|
|
819
|
-
}
|
|
820
|
-
export interface ContactSuppression {
|
|
821
|
-
id: string;
|
|
822
|
-
contact_id: string | null;
|
|
823
|
-
channel: AudienceChannel;
|
|
824
|
-
address: string;
|
|
825
|
-
reason: string | null;
|
|
826
|
-
created_at: string;
|
|
827
|
-
synced_at: string | null;
|
|
828
|
-
}
|
|
829
|
-
export interface AudienceRecipient {
|
|
830
|
-
contact_id: string;
|
|
831
|
-
display_name: string;
|
|
832
|
-
address: string;
|
|
833
|
-
consent_status: ConsentStatus;
|
|
834
|
-
}
|
|
835
|
-
export interface AudienceExclusion {
|
|
836
|
-
contact_id: string;
|
|
837
|
-
reason: "consent" | "suppressed" | "do_not_contact" | "no_address" | "archived";
|
|
838
|
-
}
|
|
839
|
-
export interface AudienceResolution {
|
|
840
|
-
audience_id: string;
|
|
841
|
-
channel: AudienceChannel;
|
|
842
|
-
consent_policy: ConsentPolicy;
|
|
843
|
-
matched: number;
|
|
844
|
-
recipients: AudienceRecipient[];
|
|
845
|
-
excluded: AudienceExclusion[];
|
|
846
|
-
}
|
|
847
|
-
export declare class AudienceNotFoundError extends Error {
|
|
848
|
-
constructor(id: string);
|
|
849
|
-
}
|
|
850
|
-
export declare class DuplicateAudienceIdError extends Error {
|
|
851
|
-
constructor(audienceId: string);
|
|
852
|
-
}
|
|
853
|
-
export declare class InvalidAudienceDefinitionError extends Error {
|
|
854
|
-
constructor(detail: string);
|
|
855
|
-
}
|
|
856
|
-
//# sourceMappingURL=index.d.ts.map
|