@graph8/sdk 0.2.1 → 0.4.0

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/react.d.mts CHANGED
@@ -2,6 +2,454 @@ import * as _jitsu_js from '@jitsu/js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { ReactNode } from 'react';
4
4
 
5
+ /**
6
+ * Inbox channel — `email`, `sms`, or `linkedin` (HeyReach internally).
7
+ * Defaults to `email` on routes that accept this as a query param.
8
+ */
9
+ type InboxChannel = "email" | "sms" | "linkedin";
10
+ interface InboxContact {
11
+ name?: string | null;
12
+ email?: string | null;
13
+ company?: string | null;
14
+ [key: string]: unknown;
15
+ }
16
+ interface InboxTag {
17
+ id: string;
18
+ name: string;
19
+ }
20
+ interface InboxAssignee {
21
+ email: string;
22
+ name?: string | null;
23
+ [key: string]: unknown;
24
+ }
25
+ interface InboxMessage {
26
+ message_id: string | null;
27
+ from_address: string | null;
28
+ to_addresses: string[];
29
+ content: string | null;
30
+ /** "USER", "AI", or "OTHER". */
31
+ responder: string | null;
32
+ date: string | null;
33
+ is_draft: boolean;
34
+ }
35
+ interface InboxThread {
36
+ id: string;
37
+ /** "email", "sms", or "linkedin". */
38
+ channel: string;
39
+ subject: string | null;
40
+ contact: InboxContact | null;
41
+ messages: InboxMessage[];
42
+ /** "open", "responded", "ai_responded", etc. */
43
+ status: string | null;
44
+ tags: InboxTag[];
45
+ assignees: InboxAssignee[];
46
+ created_at: string | null;
47
+ updated_at: string | null;
48
+ }
49
+ interface InboxListParams {
50
+ channel?: InboxChannel;
51
+ sequence_id?: string;
52
+ /** Filter by thread status (e.g. "open", "responded", "ai_responded"). */
53
+ status?: string;
54
+ /** Filter by assignee email. */
55
+ assignee?: string;
56
+ /** Filter by tag ID. */
57
+ tag?: string;
58
+ page?: number;
59
+ /** Default 50, max 100. */
60
+ page_size?: number;
61
+ }
62
+ interface InboxAssignResult {
63
+ assigned: boolean;
64
+ assignee: string;
65
+ count: number;
66
+ [key: string]: unknown;
67
+ }
68
+ interface InboxTagResult {
69
+ tagged: boolean;
70
+ tag_count: number;
71
+ [key: string]: unknown;
72
+ }
73
+ interface InboxDraft {
74
+ /** HTML body. */
75
+ content: string;
76
+ /** Plain-text alternative, if available. */
77
+ plain_content: string | null;
78
+ /** Credits charged for AI generation. */
79
+ credits_charged: number;
80
+ }
81
+ interface InboxSendParams {
82
+ body: string;
83
+ channel: InboxChannel;
84
+ subject?: string;
85
+ /** Recipient override — email, phone, or LinkedIn ID. */
86
+ to?: string;
87
+ /** Sender override — mailbox email, Twilio number, or LinkedIn account ID. */
88
+ from_address?: string;
89
+ }
90
+ interface InboxSendResult {
91
+ message_id: string | null;
92
+ status: string;
93
+ channel: string;
94
+ }
95
+ /**
96
+ * Inbox API — read + reply to multi-channel inbox threads (email, SMS, LinkedIn/HeyReach).
97
+ * Requires API key (server-side).
98
+ *
99
+ * Backed by:
100
+ * GET /api/v1/inbox
101
+ * GET /api/v1/inbox/{reply_id}
102
+ * POST /api/v1/inbox/{reply_id}/assign
103
+ * POST /api/v1/inbox/{reply_id}/tag
104
+ * GET /api/v1/inbox/{reply_id}/draft (charges credits, 402 on insufficient balance)
105
+ * POST /api/v1/inbox/{reply_id}/send
106
+ */
107
+ declare const createInboxClient: (apiKey: string, apiUrl?: string) => {
108
+ /** List inbox threads across email, SMS, and LinkedIn. */
109
+ list(params?: InboxListParams): Promise<{
110
+ data: InboxThread[];
111
+ }>;
112
+ /** Get a single inbox thread. Defaults to email channel. */
113
+ get(replyId: string, channel?: InboxChannel): Promise<InboxThread>;
114
+ /** Assign a user to an inbox thread. */
115
+ assign(replyId: string, assigneeEmail: string, channel?: InboxChannel): Promise<InboxAssignResult>;
116
+ /** Attach tag IDs to an inbox thread. */
117
+ tag(replyId: string, tagIds: string[], channel?: InboxChannel): Promise<InboxTagResult>;
118
+ /**
119
+ * Generate an AI draft reply for a thread.
120
+ * Charges credits — server returns 402 if balance is insufficient.
121
+ */
122
+ draft(replyId: string, channel?: InboxChannel): Promise<InboxDraft>;
123
+ /** Send a reply through email, SMS, or LinkedIn. */
124
+ send(replyId: string, payload: InboxSendParams): Promise<InboxSendResult>;
125
+ };
126
+
127
+ interface Deal {
128
+ id: string | null;
129
+ name: string | null;
130
+ description: string | null;
131
+ amount: number | null;
132
+ currency: string | null;
133
+ stage_id: string | null;
134
+ stage_name: string | null;
135
+ pipeline_id: string | null;
136
+ /** Linked company ID (mashup_company_id), if any. */
137
+ company_id: number | string | null;
138
+ owner_id: string | null;
139
+ /** ISO 8601 date. */
140
+ close_date: string | null;
141
+ created_at: string | null;
142
+ updated_at: string | null;
143
+ }
144
+ interface DealCreateParams {
145
+ name: string;
146
+ /** Linked company ID. */
147
+ company_id?: number;
148
+ description?: string;
149
+ amount?: number;
150
+ /** Default: "USD". */
151
+ currency?: string;
152
+ /** Stage ID from the org's pipelines. Defaults to first stage of default pipeline if omitted. */
153
+ stage_id?: string;
154
+ /** Pipeline ID. Defaults to org's default pipeline if omitted. */
155
+ pipeline_id?: string;
156
+ /** ISO 8601 close date. */
157
+ close_date?: string;
158
+ }
159
+ interface DealUpdateParams {
160
+ name?: string;
161
+ description?: string;
162
+ amount?: number;
163
+ currency?: string;
164
+ stage_id?: string;
165
+ /** ISO 8601 close date. */
166
+ close_date?: string;
167
+ }
168
+ interface DealListParams {
169
+ page?: number;
170
+ limit?: number;
171
+ stage_id?: string;
172
+ pipeline_id?: string;
173
+ /** Substring search on deal name. */
174
+ search?: string;
175
+ }
176
+ interface PipelineStage {
177
+ id: string;
178
+ name: string;
179
+ probability: number | null;
180
+ position: number | null;
181
+ stage_type: string | null;
182
+ color: string | null;
183
+ required_elements: string[];
184
+ recommended_elements: string[];
185
+ channel_scripts: Record<string, string>;
186
+ }
187
+ interface Pipeline {
188
+ id: string;
189
+ name: string;
190
+ is_default: boolean;
191
+ stages: PipelineStage[];
192
+ }
193
+ /** Trimmed deal shape returned by /contacts/{id}/deals and /companies/{id}/deals. */
194
+ interface ContactDeal {
195
+ deal_id: string | null;
196
+ name: string | null;
197
+ stage: string | null;
198
+ value: number | null;
199
+ currency: string | null;
200
+ role: string | null;
201
+ pipeline_id: string | null;
202
+ close_date: string | null;
203
+ owner_id: string | null;
204
+ created_at: string | null;
205
+ }
206
+ interface PaginationMeta$1 {
207
+ page: number;
208
+ limit: number;
209
+ total: number;
210
+ has_next: boolean;
211
+ }
212
+ /**
213
+ * Deals API - CRUD for deals + pipelines. Requires API key (server-side).
214
+ *
215
+ * Backed by:
216
+ * GET /api/v1/deals/pipelines
217
+ * GET /api/v1/deals
218
+ * POST /api/v1/deals
219
+ * GET /api/v1/deals/{deal_id}
220
+ * PATCH /api/v1/deals/{deal_id}
221
+ * DELETE /api/v1/deals/{deal_id}
222
+ * GET /api/v1/contacts/{contact_id}/deals
223
+ * GET /api/v1/companies/{company_id}/deals
224
+ */
225
+ declare const createDealsClient: (apiKey: string, apiUrl?: string) => {
226
+ /** List all deal pipelines and their stages. */
227
+ pipelines(): Promise<{
228
+ data: Pipeline[];
229
+ }>;
230
+ /** List deals org-wide with optional filters and pagination. */
231
+ list(params?: DealListParams): Promise<{
232
+ data: Deal[];
233
+ pagination?: PaginationMeta$1;
234
+ }>;
235
+ /** Create a new deal. */
236
+ create(deal: DealCreateParams): Promise<Deal>;
237
+ /** Get a single deal by ID. */
238
+ get(dealId: string): Promise<Deal>;
239
+ /** Update a deal (partial). */
240
+ update(dealId: string, fields: DealUpdateParams): Promise<Deal>;
241
+ /** Delete a deal. */
242
+ delete(dealId: string): Promise<{
243
+ data: {
244
+ deleted: boolean;
245
+ };
246
+ }>;
247
+ /** Get all deals associated with a contact. */
248
+ forContact(contactId: number): Promise<{
249
+ data: ContactDeal[];
250
+ }>;
251
+ /** Get all deals associated with a company. */
252
+ forCompany(companyId: number): Promise<{
253
+ data: ContactDeal[];
254
+ }>;
255
+ };
256
+
257
+ /** A field (column) definition on contacts or companies — base or custom. */
258
+ interface Field {
259
+ id: number | null;
260
+ title: string;
261
+ /** Internal column name (slug). */
262
+ name: string | null;
263
+ /** Currently only "text" is supported; other types may be added later. */
264
+ data_type: string;
265
+ /** True if available org-wide, false if list-specific. */
266
+ is_global: boolean;
267
+ }
268
+ /** Created custom field (column). */
269
+ interface CreatedField {
270
+ id: number;
271
+ title: string;
272
+ data_type: string;
273
+ name: string;
274
+ list_id: number | null;
275
+ is_global: boolean;
276
+ }
277
+ interface FieldCreateParams {
278
+ title: string;
279
+ /** "contacts" or "companies". Defaults to "contacts" on the backend. */
280
+ entity?: "contacts" | "companies";
281
+ /** "text" (default) — additional types may be added later. */
282
+ data_type?: string;
283
+ /** If set, the field is list-specific. Omit for org-wide global field. */
284
+ list_id?: number;
285
+ }
286
+ interface FieldDeleteParams {
287
+ entity?: "contacts" | "companies";
288
+ /**
289
+ * Optional list scope guard. If provided, the column must belong to this
290
+ * list or the request returns 404. Use this to prevent accidentally
291
+ * deleting a column on a different list in the same org.
292
+ */
293
+ list_id?: number;
294
+ }
295
+ interface SetFieldValueParams {
296
+ /** Contact ID (entity='contacts') or company ID (entity='companies'). */
297
+ record_id: number;
298
+ /** Value to write. Pass null/undefined to clear the field. */
299
+ value?: string | null;
300
+ entity?: "contacts" | "companies";
301
+ }
302
+ /**
303
+ * Fields API - manage custom fields (columns) on contacts and companies.
304
+ * Requires API key (server-side).
305
+ *
306
+ * Backed by:
307
+ * GET /api/v1/fields — list contact fields
308
+ * GET /api/v1/fields/companies — list company fields
309
+ * POST /api/v1/fields — create a custom field
310
+ * DELETE /api/v1/fields/{column_id} — delete a custom field
311
+ * PATCH /api/v1/fields/{column_id}/values — set value on a single record
312
+ */
313
+ declare const createFieldsClient: (apiKey: string, apiUrl?: string) => {
314
+ /** List contact fields (base + custom). Pass listId to include list-specific custom fields. */
315
+ listContactFields(listId?: number): Promise<{
316
+ data: Field[];
317
+ }>;
318
+ /** List company fields (base + custom). Pass listId to include list-specific custom fields. */
319
+ listCompanyFields(listId?: number): Promise<{
320
+ data: Field[];
321
+ }>;
322
+ /** Create a custom field on contacts (default) or companies. */
323
+ create(params: FieldCreateParams): Promise<CreatedField>;
324
+ /** Delete a custom field (soft-delete). Pass list_id to scope-guard against cross-list deletion. */
325
+ delete(columnId: number, params?: FieldDeleteParams): Promise<{
326
+ data: {
327
+ column_id: number;
328
+ deleted: boolean;
329
+ };
330
+ }>;
331
+ /** Set a custom field value on a single contact or company row. Pass value=null to clear. */
332
+ setValue(columnId: number, params: SetFieldValueParams): Promise<{
333
+ data: {
334
+ column_id: number;
335
+ record_id: number;
336
+ updated: boolean;
337
+ };
338
+ }>;
339
+ };
340
+
341
+ interface Task {
342
+ id: string;
343
+ entity_type: string | null;
344
+ entity_id: string | null;
345
+ title: string;
346
+ description: string | null;
347
+ due_date: string | null;
348
+ assignee_id: string | null;
349
+ assignee_name: string | null;
350
+ /** "open" | "completed" (other values may appear if the backend adds states later) */
351
+ status: string | null;
352
+ /** 0=none, 1=urgent, 2=high, 3=normal, 4=low */
353
+ priority: number | null;
354
+ task_type: string | null;
355
+ created_by: string | null;
356
+ created_at: string | null;
357
+ updated_at: string | null;
358
+ }
359
+ interface TaskCreateParams {
360
+ title: string;
361
+ description?: string;
362
+ /** ISO 8601 date string. */
363
+ due_date?: string;
364
+ assignee_id?: string;
365
+ /** 0=none, 1=urgent, 2=high, 3=normal, 4=low */
366
+ priority?: number;
367
+ }
368
+ interface TaskUpdateParams {
369
+ title?: string;
370
+ description?: string;
371
+ due_date?: string;
372
+ assignee_id?: string;
373
+ /** "open" | "completed" */
374
+ status?: string;
375
+ priority?: number;
376
+ }
377
+ interface TaskListParams {
378
+ /** "open" | "completed" */
379
+ status?: string;
380
+ /** 0-4 */
381
+ priority?: number;
382
+ assignee_id?: string;
383
+ /** Substring search on title. */
384
+ search?: string;
385
+ }
386
+ /**
387
+ * Tasks API - CRUD for tasks attached to contacts. Requires API key (server-side).
388
+ *
389
+ * Backed by:
390
+ * GET /api/v1/contacts/{contact_id}/tasks
391
+ * GET /api/v1/tasks
392
+ * POST /api/v1/contacts/{contact_id}/tasks
393
+ * PATCH /api/v1/tasks/{task_id}
394
+ * DELETE /api/v1/tasks/{task_id}
395
+ */
396
+ declare const createTasksClient: (apiKey: string, apiUrl?: string) => {
397
+ /** List tasks on a single contact. Optional status filter ("open" | "completed"). */
398
+ listForContact(contactId: number, status?: string): Promise<{
399
+ data: Task[];
400
+ }>;
401
+ /** List all tasks org-wide with optional filters. */
402
+ list(params?: TaskListParams): Promise<{
403
+ data: Task[];
404
+ }>;
405
+ /** Create a task on a contact. */
406
+ create(contactId: number, task: TaskCreateParams): Promise<Task>;
407
+ /** Update a task (partial). */
408
+ update(taskId: string, fields: TaskUpdateParams): Promise<Task>;
409
+ /** Delete a task. */
410
+ delete(taskId: string): Promise<{
411
+ data: {
412
+ deleted: boolean;
413
+ };
414
+ }>;
415
+ };
416
+
417
+ interface Note {
418
+ id: string;
419
+ entity_type: string;
420
+ entity_id: string;
421
+ content: string;
422
+ created_by: string | null;
423
+ created_by_name: string | null;
424
+ created_at: string | null;
425
+ updated_at: string | null;
426
+ }
427
+ /**
428
+ * Notes API - CRUD for notes attached to contacts. Requires API key (server-side).
429
+ *
430
+ * Backed by:
431
+ * GET /api/v1/contacts/{contact_id}/notes
432
+ * POST /api/v1/contacts/{contact_id}/notes
433
+ * PATCH /api/v1/notes/{note_id}
434
+ * DELETE /api/v1/notes/{note_id}
435
+ */
436
+ declare const createNotesClient: (apiKey: string, apiUrl?: string) => {
437
+ /** List all notes on a contact. */
438
+ list(contactId: number): Promise<{
439
+ data: Note[];
440
+ }>;
441
+ /** Create a note on a contact. */
442
+ create(contactId: number, content: string): Promise<Note>;
443
+ /** Update a note's content. */
444
+ update(noteId: string, content: string): Promise<Note>;
445
+ /** Delete a note. */
446
+ delete(noteId: string): Promise<{
447
+ data: {
448
+ deleted: boolean;
449
+ };
450
+ }>;
451
+ };
452
+
5
453
  interface ContactList {
6
454
  id: number;
7
455
  title: string;
@@ -86,6 +534,25 @@ interface CompanyContact {
86
534
  work_email: string | null;
87
535
  job_title: string | null;
88
536
  }
537
+ /** A column definition on companies (base or custom). */
538
+ interface CompanyColumn {
539
+ id: number | null;
540
+ title: string;
541
+ data_type: string;
542
+ name: string | null;
543
+ /** Stringified list_id when list-scoped, otherwise null/empty for global. */
544
+ object_id: string | null;
545
+ is_global: boolean;
546
+ }
547
+ interface CompanyColumnCreateParams {
548
+ title: string;
549
+ /** Email of the user creating the column. Required by the backend (audit). */
550
+ created_by: string;
551
+ /** "text" (default) — additional types may be added later. */
552
+ data_type?: string;
553
+ /** If set, the column is list-specific. Omit for org-wide global column. */
554
+ list_id?: number;
555
+ }
89
556
  /**
90
557
  * Companies API - search and manage CRM companies. Requires API key (server-side).
91
558
  */
@@ -110,6 +577,12 @@ declare const createCompaniesClient: (apiKey: string, apiUrl?: string) => {
110
577
  delete(companyId: number): Promise<{
111
578
  deleted: boolean;
112
579
  }>;
580
+ /** List custom company columns. Pass listId to include list-specific columns. */
581
+ listColumns(listId?: number): Promise<{
582
+ data: CompanyColumn[];
583
+ }>;
584
+ /** Create a custom company column. Global if list_id is omitted, list-scoped otherwise. */
585
+ createColumn(params: CompanyColumnCreateParams): Promise<CompanyColumn>;
113
586
  };
114
587
 
115
588
  interface Contact {
@@ -166,6 +639,25 @@ interface ContactUpdateParams {
166
639
  state?: string;
167
640
  country?: string;
168
641
  }
642
+ /** A column definition on contacts (base or custom). */
643
+ interface ContactColumn {
644
+ id: number | null;
645
+ title: string;
646
+ data_type: string;
647
+ name: string | null;
648
+ /** Stringified list_id when list-scoped, otherwise null/empty for global. */
649
+ object_id: string | null;
650
+ is_global: boolean;
651
+ }
652
+ interface ContactColumnCreateParams {
653
+ title: string;
654
+ /** Email of the user creating the column. Required by the backend (audit). */
655
+ created_by: string;
656
+ /** "text" (default) — additional types may be added later. */
657
+ data_type?: string;
658
+ /** If set, the column is list-specific. Omit for org-wide global column. */
659
+ list_id?: number;
660
+ }
169
661
  /**
170
662
  * Contacts API - full CRUD for CRM contacts. Requires API key (server-side).
171
663
  */
@@ -187,6 +679,12 @@ declare const createContactsClient: (apiKey: string, apiUrl?: string) => {
187
679
  delete(contactId: number): Promise<{
188
680
  deleted: boolean;
189
681
  }>;
682
+ /** List custom contact columns. Pass listId to include list-specific columns. */
683
+ listColumns(listId?: number): Promise<{
684
+ data: ContactColumn[];
685
+ }>;
686
+ /** Create a custom contact column. Global if list_id is omitted, list-scoped otherwise. */
687
+ createColumn(params: ContactColumnCreateParams): Promise<ContactColumn>;
190
688
  };
191
689
 
192
690
  type WebhookEvent = "reply_received" | "meeting_booked" | "contact_enriched" | "contact_created" | "sequence_completed" | "sequence_replied" | "campaign_launched" | "form_submitted" | "visitor_identified";
@@ -248,20 +746,276 @@ interface CallAnalysis {
248
746
  }
249
747
  type VoiceEvent = "connected" | "transcription" | "ended" | "error";
250
748
  type VoiceCallback = (data: Record<string, unknown>) => void;
749
+ interface VoicePagination {
750
+ total_items: number;
751
+ total_pages: number;
752
+ current_page: number;
753
+ page_size: number;
754
+ }
755
+ interface DialerSessionSummary {
756
+ session_id: string;
757
+ status: string | null;
758
+ user_id: string | null;
759
+ user_email: string | null;
760
+ org_id: string | null;
761
+ from_phone: string | null;
762
+ campaign_id: string | null;
763
+ campaign_builder_campaign_id: string | null;
764
+ name: string | null;
765
+ session_metadata: Record<string, unknown> | null;
766
+ total_calls: number | null;
767
+ created_at: string | null;
768
+ updated_at: string | null;
769
+ contact_ids: unknown[];
770
+ }
771
+ interface DialerSessionsListResult {
772
+ sessions: DialerSessionSummary[];
773
+ pagination: VoicePagination;
774
+ }
775
+ interface DialerSessionsListParams {
776
+ page?: number;
777
+ /** Default 50, max 200. */
778
+ page_size?: number;
779
+ /** Comma-separated status list (e.g. "ACTIVE,PAUSED"). */
780
+ status?: string;
781
+ user_email?: string;
782
+ /** Substring search on session name. */
783
+ name?: string;
784
+ campaign_id?: string;
785
+ list_id?: string;
786
+ list_name?: string;
787
+ /** ISO 8601 timestamp. */
788
+ date_from?: string;
789
+ /** ISO 8601 timestamp. */
790
+ date_to?: string;
791
+ sort_by?: string;
792
+ /** Default "desc". */
793
+ sort_order?: "asc" | "desc";
794
+ }
795
+ interface DialerStatsParams {
796
+ session_id?: string;
797
+ user_email?: string;
798
+ /** YYYY-MM-DD. */
799
+ date_from?: string;
800
+ /** YYYY-MM-DD. */
801
+ date_to?: string;
802
+ /** Default "DAILY". */
803
+ aggregation?: "DAILY" | "TOTAL";
804
+ }
805
+ interface DialerReportFilters {
806
+ session_id: string | null;
807
+ user_email: string | null;
808
+ org_id: string | null;
809
+ date_from: string | null;
810
+ date_to: string | null;
811
+ aggregation: string | null;
812
+ }
813
+ interface DialerReportMetric {
814
+ date: string | null;
815
+ sdr_name: string | null;
816
+ org_id: string | null;
817
+ list_title: string | null;
818
+ total_dials: number;
819
+ total_connections: number;
820
+ connection_rate: number;
821
+ total_voicemails: number;
822
+ voicemail_rate: number;
823
+ talk_time_minutes: number;
824
+ avg_call_duration_minutes: number;
825
+ dispositions: Record<string, unknown> | null;
826
+ success_rate: number;
827
+ unique_sessions: number;
828
+ avg_calls_per_session: number;
829
+ redial_count: number;
830
+ redial_success_rate: number | null;
831
+ peak_calling_hour: number | null;
832
+ total_callbacks: number;
833
+ }
834
+ interface DialerStatsResult {
835
+ filters: DialerReportFilters;
836
+ metrics: DialerReportMetric[];
837
+ summary: DialerReportMetric | null;
838
+ }
839
+ interface DialerNumberInfo {
840
+ number: string;
841
+ /** Default "ai". */
842
+ inbound_type: string;
843
+ /** Default "twilio". */
844
+ telephony_provider: string;
845
+ calls_today: number;
846
+ calls_7d: number;
847
+ connect_rate_7d: number;
848
+ is_valid: boolean;
849
+ daily_limit: number;
850
+ assigned_to: string | null;
851
+ created_at: string | null;
852
+ }
853
+ interface DialerNumbersListResult {
854
+ numbers: DialerNumberInfo[];
855
+ }
856
+ interface MissedCallback {
857
+ id: string | number | null;
858
+ caller_phone: string | null;
859
+ inbound_number: string | null;
860
+ first_name: string | null;
861
+ last_name: string | null;
862
+ email: string | null;
863
+ contact_id: string | number | null;
864
+ parallel_session_id: string | null;
865
+ created_at: string | null;
866
+ call_duration: number | null;
867
+ is_callback: boolean;
868
+ }
869
+ interface MissedCallbacksResult {
870
+ missed_callbacks: MissedCallback[];
871
+ count: number;
872
+ }
873
+ interface CallGradingResult {
874
+ room_name: string;
875
+ /** "ready" or "pending". */
876
+ status: string;
877
+ grading: Record<string, unknown> | null;
878
+ reviewed: boolean;
879
+ reviewed_at: string | null;
880
+ }
881
+ interface DialerAgentSummary {
882
+ agent_id: string;
883
+ agent_name: string | null;
884
+ /** "SDR", etc. */
885
+ role: string | null;
886
+ agent_status: string | null;
887
+ /** "agent" or "twin". */
888
+ entity_type: string | null;
889
+ description: string | null;
890
+ phone: string | null;
891
+ is_template: boolean;
892
+ }
893
+ interface DialerAgentsListResult {
894
+ agents: DialerAgentSummary[];
895
+ total_count: number;
896
+ }
897
+ interface DialerAgentsListParams {
898
+ /** e.g. "SDR". */
899
+ role?: string;
900
+ agent_status?: string;
901
+ /** "agent" or "twin". */
902
+ entity_type?: "agent" | "twin";
903
+ /** Substring filter on name/description. */
904
+ search?: string;
905
+ }
906
+ interface DialerSessionCreateParams {
907
+ /** 1-200 chars. */
908
+ name: string;
909
+ /** Org's dialer phone (E.164, 9-16 chars). */
910
+ from_phone: string;
911
+ /** Contact list ID (stored in session metadata). */
912
+ list_id?: string;
913
+ /** Display title for the source list. */
914
+ list_title?: string;
915
+ /** V2 agent UUID. */
916
+ agent_id?: string;
917
+ /** V1 fallback name. Defaults to "default_agent". */
918
+ agent_name?: string;
919
+ /** "agent" or "twin". */
920
+ entity_type?: "agent" | "twin";
921
+ /** Campaign Builder UUID. */
922
+ studio_campaign_id?: string;
923
+ /** IANA timezone (e.g. "America/New_York"). */
924
+ user_timezone?: string;
925
+ /** Per-session voicemail-skip override. null/omit = use SDR default. */
926
+ skip_voicemails?: boolean;
927
+ }
928
+ interface DialerSessionCreateResult {
929
+ session_id: string;
930
+ status: string;
931
+ name: string | null;
932
+ org_id: string | null;
933
+ user_id: string | null;
934
+ user_email: string | null;
935
+ from_phone: string | null;
936
+ session_metadata: Record<string, unknown> | null;
937
+ total_calls: number;
938
+ created_at: string | null;
939
+ message: string | null;
940
+ }
941
+ /** "ACTIVE" resumes, "PAUSED" pauses, "COMPLETED" stops. "FAILED" is rejected. */
942
+ type DialerSessionStatus = "ACTIVE" | "PAUSED" | "COMPLETED";
943
+ interface DialerSessionStatusUpdateResult {
944
+ session_id: string;
945
+ status: string;
946
+ message: string | null;
947
+ name: string | null;
948
+ org_id: string | null;
949
+ user_id: string | null;
950
+ user_email: string | null;
951
+ from_phone: string | null;
952
+ session_metadata: Record<string, unknown> | null;
953
+ total_calls: number;
954
+ created_at: string | null;
955
+ updated_at: string | null;
956
+ }
957
+ interface DialerSessionResumeResult extends DialerSessionStatusUpdateResult {
958
+ /** Contacts actually placed in this batch (voice caps at 4). */
959
+ dialed_count: number;
960
+ }
251
961
  /**
252
- * Voice AI - start AI voice calls, get transcriptions and analysis. Requires API key.
962
+ * Voice AI start AI voice calls, get transcriptions and analysis.
963
+ * Plus full parallel-dialer session control via the `dialer` namespace.
964
+ * Requires API key (server-side).
965
+ *
966
+ * Backed by:
967
+ * GET /api/v1/voice/dialer/sessions
968
+ * POST /api/v1/voice/dialer/sessions
969
+ * PATCH /api/v1/voice/dialer/sessions/{session_id}/status
970
+ * POST /api/v1/voice/dialer/sessions/{session_id}/resume
971
+ * GET /api/v1/voice/dialer/stats
972
+ * GET /api/v1/voice/dialer/numbers
973
+ * GET /api/v1/voice/dialer/missed-callbacks
974
+ * GET /api/v1/voice/dialer/calls/{room_name}/grading
975
+ * GET /api/v1/voice/dialer/agents
253
976
  */
254
977
  declare const createVoiceClient: (apiKey: string, apiUrl?: string) => {
255
- /** Start an AI voice session. */
978
+ /**
979
+ * Start an AI voice session.
980
+ * @deprecated Preview surface — for parallel-dialer flows use `voice.dialer.createSession()`.
981
+ */
256
982
  start(config: {
257
983
  agent?: string;
258
984
  contactId?: number;
259
985
  context?: Record<string, unknown>;
260
986
  }): Promise<VoiceSession>;
261
- /** Get call analysis for a completed session. */
987
+ /**
988
+ * Get call analysis for a completed session.
989
+ * @deprecated Preview surface — for dialer-call grading use `voice.dialer.callGrading(roomName)`.
990
+ */
262
991
  analysis(sessionId: string): Promise<CallAnalysis>;
263
992
  /** Listen for voice events. */
264
993
  on(event: VoiceEvent, callback: VoiceCallback): void;
994
+ /** Parallel-dialer session control + analytics. */
995
+ dialer: {
996
+ /** List parallel-dialer sessions with filters + pagination. */
997
+ listSessions(params?: DialerSessionsListParams): Promise<DialerSessionsListResult>;
998
+ /** Create a parallel-dialer session in PAUSED state. SDR opens UI to start dialing. */
999
+ createSession(payload: DialerSessionCreateParams): Promise<DialerSessionCreateResult>;
1000
+ /** Pause / resume / stop a dialer session via status flip. */
1001
+ updateSessionStatus(sessionId: string, status: DialerSessionStatus): Promise<DialerSessionStatusUpdateResult>;
1002
+ /**
1003
+ * Resume a PAUSED dialer session. Auto-fetches the next batch from the source list,
1004
+ * filters already-called + phoneless rows, and forwards to voice's start-session.
1005
+ * @param maxContacts 1-4 (voice caps parallel dialing at 4). Default 4.
1006
+ */
1007
+ resumeSession(sessionId: string, maxContacts?: number): Promise<DialerSessionResumeResult>;
1008
+ /** Aggregated dialer analytics (daily breakdown or total). */
1009
+ stats(params?: DialerStatsParams): Promise<DialerStatsResult>;
1010
+ /** List dialer-eligible phone numbers with 7-day stats + daily limits. */
1011
+ numbers(userEmail?: string): Promise<DialerNumbersListResult>;
1012
+ /** List missed inbound callbacks with caller / contact info. */
1013
+ missedCallbacks(limit?: number): Promise<MissedCallbacksResult>;
1014
+ /** AI grading for a single dialer call (returns "pending" while in progress). */
1015
+ callGrading(roomName: string): Promise<CallGradingResult>;
1016
+ /** List voice agents available for dialer sessions (capped at 100; no pagination). */
1017
+ agents(params?: DialerAgentsListParams): Promise<DialerAgentsListResult>;
1018
+ };
265
1019
  };
266
1020
 
267
1021
  interface AnalyticsOverview {
@@ -352,24 +1106,210 @@ declare const createCampaignsClient: (apiKey: string, apiUrl?: string) => {
352
1106
  stats(campaignId: string): Promise<CampaignStats>;
353
1107
  };
354
1108
 
355
- interface Sequence {
356
- id: string;
357
- name: string;
358
- status: string;
359
- step_count: number | null;
360
- contact_count: number | null;
361
- }
362
1109
  interface AddToSequenceConfig {
363
1110
  sequenceId: string;
364
1111
  contactIds: number[];
365
1112
  listId: number;
366
1113
  }
1114
+ interface SequenceListItem {
1115
+ id: string;
1116
+ name: string | null;
1117
+ status: string | null;
1118
+ user_email: string | null;
1119
+ step_count: number | null;
1120
+ contact_count: number | null;
1121
+ sequence_kind: string | null;
1122
+ associated_list_id: number | null;
1123
+ created_at: string | null;
1124
+ updated_at: string | null;
1125
+ }
1126
+ interface SequenceListParams {
1127
+ page?: number;
1128
+ limit?: number;
1129
+ /** Filter by sequence status (e.g. "live", "draft", "paused"). */
1130
+ status?: string;
1131
+ }
1132
+ interface SequenceDetail {
1133
+ id: string;
1134
+ name: string | null;
1135
+ description: string | null;
1136
+ status: string | null;
1137
+ user_email: string | null;
1138
+ associated_list_id: number | null;
1139
+ finish_on_reply: boolean;
1140
+ send_in_same_thread: boolean;
1141
+ wait_for_new_contacts: boolean;
1142
+ paused_at: string | null;
1143
+ resumed_at: string | null;
1144
+ created_at: string | null;
1145
+ updated_at: string | null;
1146
+ }
1147
+ interface SequenceContactItem {
1148
+ id: string | null;
1149
+ contact_id: number | null;
1150
+ state: string | null;
1151
+ current_step_order: number | null;
1152
+ created_at: string | null;
1153
+ updated_at: string | null;
1154
+ }
1155
+ interface SequenceContactsParams {
1156
+ page?: number;
1157
+ limit?: number;
1158
+ /** Filter by contact state (e.g. "active", "completed", "replied"). */
1159
+ state?: string;
1160
+ }
1161
+ interface SequenceActionResult {
1162
+ sequence_id: string;
1163
+ status: string;
1164
+ contacts_affected: number;
1165
+ }
367
1166
  /**
368
- * Sequences - manage outbound sequences. Requires API key (server-side).
1167
+ * Step type. Note: LinkedIn flows use "HEYREACH" there is no "LINKEDIN" step type.
1168
+ * Server is case-insensitive on input but stores uppercase.
1169
+ */
1170
+ type SequenceStepType = "EMAIL" | "PHONE" | "SMS" | "WHATSAPP" | "HEYREACH" | "MANUAL_DIALER";
1171
+ type SequenceStepInputType = "ON_DEMAND" | "MANUAL_TEMPLATE" | "AI_GENERATED_TEMPLATE";
1172
+ interface SequenceStepConfig {
1173
+ step_order: number;
1174
+ step_type: SequenceStepType | string;
1175
+ /** Defaults to "ON_DEMAND". */
1176
+ input_type?: SequenceStepInputType | string;
1177
+ /** Wait time before this step in seconds. Defaults to 0. */
1178
+ time_interval?: number;
1179
+ /** Template body, AI prompt, or other step-type-specific config. */
1180
+ step_data?: Record<string, unknown>;
1181
+ }
1182
+ interface SequenceChannelConfig {
1183
+ channel_id: number;
1184
+ channel_value: string;
1185
+ channel_type: string;
1186
+ channel_data?: Record<string, unknown>;
1187
+ }
1188
+ interface SequenceCreateParams {
1189
+ name: string;
1190
+ user_email: string;
1191
+ description?: string;
1192
+ finish_on_reply?: boolean;
1193
+ send_in_same_thread?: boolean;
1194
+ wait_for_new_contacts?: boolean;
1195
+ associated_list_id?: number;
1196
+ steps?: SequenceStepConfig[];
1197
+ channels?: SequenceChannelConfig[];
1198
+ campaign_id?: string;
1199
+ }
1200
+ interface SequenceCreateResult {
1201
+ id: string;
1202
+ name: string;
1203
+ status: string;
1204
+ created_at: string | null;
1205
+ }
1206
+ interface SequenceUpdateParams {
1207
+ name?: string;
1208
+ description?: string;
1209
+ is_shared?: boolean;
1210
+ finish_on_reply?: boolean;
1211
+ send_in_same_thread?: boolean;
1212
+ wait_for_new_contacts?: boolean;
1213
+ schedule_id?: string;
1214
+ appointment_id?: number;
1215
+ }
1216
+ interface SequenceStepUpdateParams {
1217
+ step_data?: Record<string, unknown>;
1218
+ time_interval?: number;
1219
+ step_type?: SequenceStepType | string;
1220
+ input_type?: SequenceStepInputType | string;
1221
+ }
1222
+ interface SequencePreviewStep {
1223
+ id: string;
1224
+ step_order: number;
1225
+ step_type: string;
1226
+ input_type: string;
1227
+ time_interval: number | null;
1228
+ step_data: Record<string, unknown> | null;
1229
+ }
1230
+ interface SequencePreviewChannel {
1231
+ id: string;
1232
+ channel_id: number | null;
1233
+ channel_value: string | null;
1234
+ channel_type: string | null;
1235
+ }
1236
+ interface SequencePreview {
1237
+ id: string;
1238
+ name: string | null;
1239
+ status: string | null;
1240
+ description: string | null;
1241
+ steps: SequencePreviewStep[];
1242
+ channels: SequencePreviewChannel[];
1243
+ }
1244
+ interface SequenceAnalytics {
1245
+ overview: Record<string, unknown>;
1246
+ performance: Record<string, unknown>;
1247
+ engagement: Record<string, unknown>;
1248
+ timeline: Record<string, unknown>[];
1249
+ contact_distribution: Record<string, unknown>;
1250
+ step_breakdown: Record<string, unknown>[];
1251
+ step_creation_methods: Record<string, unknown>[];
1252
+ sender_distribution: Record<string, unknown>[];
1253
+ }
1254
+ interface PaginationMeta {
1255
+ page: number;
1256
+ limit: number;
1257
+ total: number;
1258
+ has_next: boolean;
1259
+ }
1260
+ /**
1261
+ * Sequences API — list, create, run, pause, update, analyze multi-channel sequences.
1262
+ * Requires API key (server-side).
1263
+ *
1264
+ * Backed by:
1265
+ * GET /api/v1/sequences
1266
+ * POST /api/v1/sequences
1267
+ * GET /api/v1/sequences/{sequence_id}
1268
+ * PATCH /api/v1/sequences/{sequence_id}
1269
+ * DELETE /api/v1/sequences/{sequence_id}
1270
+ * GET /api/v1/sequences/{sequence_id}/contacts
1271
+ * POST /api/v1/sequences/{sequence_id}/contacts
1272
+ * POST /api/v1/sequences/{sequence_id}/run
1273
+ * POST /api/v1/sequences/{sequence_id}/pause
1274
+ * POST /api/v1/sequences/{sequence_id}/resume
1275
+ * PATCH /api/v1/sequences/{sequence_id}/steps/{step_id}
1276
+ * GET /api/v1/sequences/{sequence_id}/preview
1277
+ * GET /api/v1/sequences/{sequence_id}/analytics
369
1278
  */
370
1279
  declare const createSequencesClient: (apiKey: string, apiUrl?: string) => {
371
- list(page?: number, limit?: number): Promise<Sequence[]>;
372
- add(config: AddToSequenceConfig): Promise<void>;
1280
+ /** List sequences with pagination + optional status filter. */
1281
+ list: {
1282
+ (): Promise<SequenceListItem[]>;
1283
+ (page: number, limit?: number): Promise<SequenceListItem[]>;
1284
+ (params: SequenceListParams): Promise<SequenceListItem[]>;
1285
+ };
1286
+ /** Get full sequence details by ID. */
1287
+ get(sequenceId: string): Promise<SequenceDetail>;
1288
+ /** List contacts enrolled in a sequence. Filter by state (e.g. "active", "replied"). */
1289
+ contacts(sequenceId: string, params?: SequenceContactsParams): Promise<{
1290
+ data: SequenceContactItem[];
1291
+ pagination?: PaginationMeta;
1292
+ }>;
1293
+ /** Add contacts to a sequence (V2 queuing). Live or drafted sequences only. */
1294
+ add(config: AddToSequenceConfig): Promise<SequenceActionResult>;
1295
+ /** Create a new sequence with optional steps + channels. */
1296
+ create(payload: SequenceCreateParams): Promise<SequenceCreateResult>;
1297
+ /** Update sequence metadata. Rejected (409) if sequence is in a transitional status. */
1298
+ update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
1299
+ /** Update a single step within a sequence. */
1300
+ updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
1301
+ /** Soft-delete (archive) a sequence. */
1302
+ delete(sequenceId: string): Promise<SequenceActionResult>;
1303
+ /** Run/start a DRAFTED sequence (V2 orchestration). */
1304
+ run(sequenceId: string): Promise<SequenceActionResult>;
1305
+ /** Pause a live sequence. */
1306
+ pause(sequenceId: string): Promise<SequenceActionResult>;
1307
+ /** Resume a paused sequence. */
1308
+ resume(sequenceId: string): Promise<SequenceActionResult>;
1309
+ /** Read-only sequence preview with all steps + channels (no enrollment). */
1310
+ preview(sequenceId: string): Promise<SequencePreview>;
1311
+ /** Comprehensive analytics for a sequence. */
1312
+ analytics(sequenceId: string): Promise<SequenceAnalytics>;
373
1313
  };
374
1314
 
375
1315
  interface PersonEnrichment {
@@ -696,6 +1636,11 @@ declare const useG8: () => {
696
1636
  _contacts: ReturnType<typeof createContactsClient> | null;
697
1637
  _companies: ReturnType<typeof createCompaniesClient> | null;
698
1638
  _lists: ReturnType<typeof createListsClient> | null;
1639
+ _notes: ReturnType<typeof createNotesClient> | null;
1640
+ _tasks: ReturnType<typeof createTasksClient> | null;
1641
+ _fields: ReturnType<typeof createFieldsClient> | null;
1642
+ _deals: ReturnType<typeof createDealsClient> | null;
1643
+ _inbox: ReturnType<typeof createInboxClient> | null;
699
1644
  init(config: G8Config): void;
700
1645
  track(event: string, properties?: TrackProperties): void;
701
1646
  identify(userId: string, properties?: IdentifyProperties): void;
@@ -749,8 +1694,26 @@ declare const useG8: () => {
749
1694
  search(filters: SearchFilter[], page?: number, limit?: number): Promise<SearchResults>;
750
1695
  };
751
1696
  get sequences(): {
752
- list(page?: number, limit?: number): Promise<Sequence[]>;
753
- add(config: AddToSequenceConfig): Promise<void>;
1697
+ list: {
1698
+ (): Promise<SequenceListItem[]>;
1699
+ (page: number, limit?: number): Promise<SequenceListItem[]>;
1700
+ (params: SequenceListParams): Promise<SequenceListItem[]>;
1701
+ };
1702
+ get(sequenceId: string): Promise<SequenceDetail>;
1703
+ contacts(sequenceId: string, params?: SequenceContactsParams): Promise<{
1704
+ data: SequenceContactItem[];
1705
+ pagination?: PaginationMeta;
1706
+ }>;
1707
+ add(config: AddToSequenceConfig): Promise<SequenceActionResult>;
1708
+ create(payload: SequenceCreateParams): Promise<SequenceCreateResult>;
1709
+ update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
1710
+ updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
1711
+ delete(sequenceId: string): Promise<SequenceActionResult>;
1712
+ run(sequenceId: string): Promise<SequenceActionResult>;
1713
+ pause(sequenceId: string): Promise<SequenceActionResult>;
1714
+ resume(sequenceId: string): Promise<SequenceActionResult>;
1715
+ preview(sequenceId: string): Promise<SequencePreview>;
1716
+ analytics(sequenceId: string): Promise<SequenceAnalytics>;
754
1717
  };
755
1718
  get campaigns(): {
756
1719
  list(page?: number, limit?: number): Promise<Campaign[]>;
@@ -784,6 +1747,17 @@ declare const useG8: () => {
784
1747
  }): Promise<VoiceSession>;
785
1748
  analysis(sessionId: string): Promise<CallAnalysis>;
786
1749
  on(event: "error" | "ended" | "connected" | "transcription", callback: (data: Record<string, unknown>) => void): void;
1750
+ dialer: {
1751
+ listSessions(params?: DialerSessionsListParams): Promise<DialerSessionsListResult>;
1752
+ createSession(payload: DialerSessionCreateParams): Promise<DialerSessionCreateResult>;
1753
+ updateSessionStatus(sessionId: string, status: DialerSessionStatus): Promise<DialerSessionStatusUpdateResult>;
1754
+ resumeSession(sessionId: string, maxContacts?: number): Promise<DialerSessionResumeResult>;
1755
+ stats(params?: DialerStatsParams): Promise<DialerStatsResult>;
1756
+ numbers(userEmail?: string): Promise<DialerNumbersListResult>;
1757
+ missedCallbacks(limit?: number): Promise<MissedCallbacksResult>;
1758
+ callGrading(roomName: string): Promise<CallGradingResult>;
1759
+ agents(params?: DialerAgentsListParams): Promise<DialerAgentsListResult>;
1760
+ };
787
1761
  };
788
1762
  get pages(): {
789
1763
  clone(url: string): Promise<LandingPage>;
@@ -813,6 +1787,10 @@ declare const useG8: () => {
813
1787
  delete(contactId: number): Promise<{
814
1788
  deleted: boolean;
815
1789
  }>;
1790
+ listColumns(listId?: number): Promise<{
1791
+ data: ContactColumn[];
1792
+ }>;
1793
+ createColumn(params: ContactColumnCreateParams): Promise<ContactColumn>;
816
1794
  };
817
1795
  get companies(): {
818
1796
  list(params?: CompanyListParams): Promise<{
@@ -830,6 +1808,10 @@ declare const useG8: () => {
830
1808
  delete(companyId: number): Promise<{
831
1809
  deleted: boolean;
832
1810
  }>;
1811
+ listColumns(listId?: number): Promise<{
1812
+ data: CompanyColumn[];
1813
+ }>;
1814
+ createColumn(params: CompanyColumnCreateParams): Promise<CompanyColumn>;
833
1815
  };
834
1816
  get lists(): {
835
1817
  list(page?: number, limit?: number): Promise<{
@@ -851,6 +1833,88 @@ declare const useG8: () => {
851
1833
  removed: number;
852
1834
  }>;
853
1835
  };
1836
+ get notes(): {
1837
+ list(contactId: number): Promise<{
1838
+ data: Note[];
1839
+ }>;
1840
+ create(contactId: number, content: string): Promise<Note>;
1841
+ update(noteId: string, content: string): Promise<Note>;
1842
+ delete(noteId: string): Promise<{
1843
+ data: {
1844
+ deleted: boolean;
1845
+ };
1846
+ }>;
1847
+ };
1848
+ get tasks(): {
1849
+ listForContact(contactId: number, status?: string): Promise<{
1850
+ data: Task[];
1851
+ }>;
1852
+ list(params?: TaskListParams): Promise<{
1853
+ data: Task[];
1854
+ }>;
1855
+ create(contactId: number, task: TaskCreateParams): Promise<Task>;
1856
+ update(taskId: string, fields: TaskUpdateParams): Promise<Task>;
1857
+ delete(taskId: string): Promise<{
1858
+ data: {
1859
+ deleted: boolean;
1860
+ };
1861
+ }>;
1862
+ };
1863
+ get fields(): {
1864
+ listContactFields(listId?: number): Promise<{
1865
+ data: Field[];
1866
+ }>;
1867
+ listCompanyFields(listId?: number): Promise<{
1868
+ data: Field[];
1869
+ }>;
1870
+ create(params: FieldCreateParams): Promise<CreatedField>;
1871
+ delete(columnId: number, params?: FieldDeleteParams): Promise<{
1872
+ data: {
1873
+ column_id: number;
1874
+ deleted: boolean;
1875
+ };
1876
+ }>;
1877
+ setValue(columnId: number, params: SetFieldValueParams): Promise<{
1878
+ data: {
1879
+ column_id: number;
1880
+ record_id: number;
1881
+ updated: boolean;
1882
+ };
1883
+ }>;
1884
+ };
1885
+ get deals(): {
1886
+ pipelines(): Promise<{
1887
+ data: Pipeline[];
1888
+ }>;
1889
+ list(params?: DealListParams): Promise<{
1890
+ data: Deal[];
1891
+ pagination?: PaginationMeta$1;
1892
+ }>;
1893
+ create(deal: DealCreateParams): Promise<Deal>;
1894
+ get(dealId: string): Promise<Deal>;
1895
+ update(dealId: string, fields: DealUpdateParams): Promise<Deal>;
1896
+ delete(dealId: string): Promise<{
1897
+ data: {
1898
+ deleted: boolean;
1899
+ };
1900
+ }>;
1901
+ forContact(contactId: number): Promise<{
1902
+ data: ContactDeal[];
1903
+ }>;
1904
+ forCompany(companyId: number): Promise<{
1905
+ data: ContactDeal[];
1906
+ }>;
1907
+ };
1908
+ get inbox(): {
1909
+ list(params?: InboxListParams): Promise<{
1910
+ data: InboxThread[];
1911
+ }>;
1912
+ get(replyId: string, channel?: InboxChannel): Promise<InboxThread>;
1913
+ assign(replyId: string, assigneeEmail: string, channel?: InboxChannel): Promise<InboxAssignResult>;
1914
+ tag(replyId: string, tagIds: string[], channel?: InboxChannel): Promise<InboxTagResult>;
1915
+ draft(replyId: string, channel?: InboxChannel): Promise<InboxDraft>;
1916
+ send(replyId: string, payload: InboxSendParams): Promise<InboxSendResult>;
1917
+ };
854
1918
  get initialized(): boolean;
855
1919
  _assertInit(): void;
856
1920
  _assertKey(module: string): void;