@graph8/sdk 0.3.0 → 0.5.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.ts CHANGED
@@ -2,6 +2,1149 @@ 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
+ interface MeetingAttendee {
6
+ name: string | null;
7
+ email: string;
8
+ role: "host" | "prospect" | "guest" | string;
9
+ contact_id?: number | null;
10
+ }
11
+ interface MeetingTranscriptLine {
12
+ speaker: string;
13
+ text: string;
14
+ timestamp: number;
15
+ }
16
+ interface MeetingAnalysis {
17
+ sentiment: "positive" | "neutral" | "negative";
18
+ summary: string;
19
+ next_steps: string[];
20
+ objections: string[];
21
+ talk_listen_ratio: number | null;
22
+ }
23
+ interface MeetingSummary {
24
+ id: string;
25
+ status: "scheduled" | "completed" | "cancelled" | "no_show";
26
+ event_type: string | null;
27
+ scheduled_at: string;
28
+ duration_minutes: number;
29
+ attendees: MeetingAttendee[];
30
+ contact_id: number | null;
31
+ conferencing_provider: string | null;
32
+ conferencing_url: string | null;
33
+ recording_url: string | null;
34
+ created_at: string;
35
+ }
36
+ interface MeetingDetail extends MeetingSummary {
37
+ transcript: MeetingTranscriptLine[] | null;
38
+ analysis: MeetingAnalysis | null;
39
+ }
40
+ interface MeetingListParams {
41
+ status?: "scheduled" | "completed" | "cancelled" | "no_show";
42
+ date_from?: string;
43
+ date_to?: string;
44
+ attendee_id?: string;
45
+ event_type?: string;
46
+ contact_id?: number;
47
+ page?: number;
48
+ limit?: number;
49
+ }
50
+ /**
51
+ * Meetings API - read-only access to scheduled, completed, and cancelled meetings.
52
+ * Booking happens via `g8.calendar.*` (write-key safe, browser only) — this surface
53
+ * is for reading meeting records, transcripts, and AI analysis.
54
+ *
55
+ * Requires API key (server-side).
56
+ *
57
+ * Backed by:
58
+ * GET /api/v1/inbox/meetings
59
+ * GET /api/v1/inbox/meetings/{meeting_id}
60
+ */
61
+ declare const createMeetingsClient: (apiKey: string, apiUrl?: string) => {
62
+ /** List meetings with optional filters. Returns summary rows without transcript / analysis. */
63
+ list(params?: MeetingListParams): Promise<{
64
+ data: MeetingSummary[];
65
+ pagination?: {
66
+ page: number;
67
+ limit: number;
68
+ total: number;
69
+ has_next: boolean;
70
+ };
71
+ }>;
72
+ /** Get full meeting detail including transcript + AI analysis (transcript available 1-5 min after meeting ends). */
73
+ get(meetingId: string): Promise<MeetingDetail>;
74
+ };
75
+
76
+ interface GlobalContextDocument {
77
+ id: string;
78
+ category: string;
79
+ title: string;
80
+ content: string;
81
+ metadata: Record<string, unknown> | null;
82
+ created_at: string | null;
83
+ updated_at: string | null;
84
+ }
85
+ interface Persona {
86
+ id: string;
87
+ name: string;
88
+ description: string | null;
89
+ status: string;
90
+ pain_points: string[];
91
+ goals: string[];
92
+ channels: string[];
93
+ created_at: string | null;
94
+ }
95
+ interface ICP {
96
+ id: string;
97
+ name: string;
98
+ description: string | null;
99
+ status: string;
100
+ industry: string[] | null;
101
+ employee_count_min: number | null;
102
+ employee_count_max: number | null;
103
+ revenue_min: number | null;
104
+ revenue_max: number | null;
105
+ countries: string[] | null;
106
+ created_at: string | null;
107
+ }
108
+ interface IntelligenceData {
109
+ id: string;
110
+ source_type: string;
111
+ url: string | null;
112
+ title: string | null;
113
+ content_summary: string | null;
114
+ collected_at: string | null;
115
+ }
116
+ interface ResearchReport {
117
+ id: string;
118
+ category: "buyer_psychology" | "competitive_teardown" | "gtm_channel" | "industry_analyst" | "review_sentiment" | "voice_of_customer";
119
+ title: string;
120
+ summary: string | null;
121
+ created_at: string | null;
122
+ }
123
+ /**
124
+ * Studio context — org-level intelligence documents. The 44-doc engine that
125
+ * powers campaign ideation: brand brief, value props, messaging house, ICPs,
126
+ * personas, intelligence (scrapes + enrichment), and AI research reports.
127
+ *
128
+ * Requires API key (server-side).
129
+ *
130
+ * Backed by:
131
+ * GET /api/v1/global-context/documents
132
+ * GET /api/v1/icps
133
+ * GET /api/v1/personas
134
+ * GET /api/v1/intelligence-data
135
+ * GET /api/v1/research-reports
136
+ */
137
+ declare const createStudioClient: (apiKey: string, apiUrl?: string) => {
138
+ /** Org-level Studio documents (brand_brief, value_props, messaging_house, etc.). */
139
+ globalContext(params?: {
140
+ category?: string;
141
+ limit?: number;
142
+ }): Promise<{
143
+ data: GlobalContextDocument[];
144
+ }>;
145
+ /** ICP definitions. */
146
+ icps(params?: {
147
+ status?: string;
148
+ limit?: number;
149
+ }): Promise<{
150
+ data: ICP[];
151
+ }>;
152
+ /** Buyer persona definitions. */
153
+ personas(params?: {
154
+ status?: string;
155
+ limit?: number;
156
+ }): Promise<{
157
+ data: Persona[];
158
+ }>;
159
+ /** Intelligence data (website scrapes, enrichment, competitor research). */
160
+ intelligenceData(params?: {
161
+ source_type?: string;
162
+ limit?: number;
163
+ }): Promise<{
164
+ data: IntelligenceData[];
165
+ }>;
166
+ /** AI research reports (buyer psychology, competitive teardown, GTM channel, etc.). */
167
+ researchReports(params?: {
168
+ category?: string;
169
+ limit?: number;
170
+ }): Promise<{
171
+ data: ResearchReport[];
172
+ }>;
173
+ };
174
+
175
+ interface IntentKeyword {
176
+ id: string;
177
+ keyword: string;
178
+ domain: string | null;
179
+ include_patterns: string[];
180
+ exclude_patterns: string[];
181
+ page_count: number;
182
+ visitor_count: number;
183
+ company_count: number;
184
+ contact_count: number;
185
+ created_at: string | null;
186
+ }
187
+ interface IntentPage {
188
+ url: string;
189
+ title: string | null;
190
+ keyword: string | null;
191
+ domain: string;
192
+ visitor_count: number;
193
+ last_seen: string | null;
194
+ }
195
+ interface IntentVisitor {
196
+ visitor_id: string;
197
+ company_domain: string | null;
198
+ company_name: string | null;
199
+ page_url: string;
200
+ first_seen: string | null;
201
+ last_seen: string | null;
202
+ visit_count: number;
203
+ }
204
+ interface IntentCompany {
205
+ domain: string;
206
+ name: string | null;
207
+ industry: string | null;
208
+ employee_count: string | null;
209
+ visit_count: number;
210
+ last_seen: string | null;
211
+ }
212
+ interface IntentContact {
213
+ contact_id: number | null;
214
+ email: string | null;
215
+ full_name: string | null;
216
+ company: string | null;
217
+ job_title: string | null;
218
+ last_seen: string | null;
219
+ }
220
+ interface IntentStats {
221
+ total_keywords: number;
222
+ total_pages: number;
223
+ total_visitors_30d: number;
224
+ total_companies_30d: number;
225
+ }
226
+ /**
227
+ * Intent + visitor tracking. Distinct from `g8.signals` (which is summary scoring) —
228
+ * this module exposes keyword tracking, page-level visitor data, and account-level
229
+ * intent signals from your own site (or from competitor URLs you've added).
230
+ *
231
+ * Requires API key (server-side).
232
+ *
233
+ * Backed by:
234
+ * GET /api/v1/intent/stats
235
+ * POST /api/v1/intent/keywords/list
236
+ * POST /api/v1/intent/keywords/create-from-domain
237
+ * DELETE /api/v1/intent/keywords/{keyword_id}
238
+ * POST /api/v1/intent/keywords/{keyword_id}/companies
239
+ * POST /api/v1/intent/keywords/{keyword_id}/contacts
240
+ * POST /api/v1/intent/keywords/{keyword_id}/urls
241
+ * POST /api/v1/intent/pages-by-domain
242
+ * POST /api/v1/intent/pages/search
243
+ * POST /api/v1/intent/pages/visitors
244
+ * POST /api/v1/intent/pages/contacts
245
+ * POST /api/v1/intent/pages/visitor-counts
246
+ * POST /intent-search/url-companies (note: bare host, no /api/v1 prefix)
247
+ */
248
+ declare const createIntentClient: (apiKey: string, apiUrl?: string) => {
249
+ /** Org-level intent stats (totals over the last 30 days). */
250
+ stats(): Promise<{
251
+ data: IntentStats;
252
+ }>;
253
+ /** List tracked keywords with optional pagination. */
254
+ listKeywords(params?: {
255
+ page?: number;
256
+ limit?: number;
257
+ search?: string;
258
+ }): Promise<{
259
+ data: IntentKeyword[];
260
+ }>;
261
+ /** Create a keyword group from a domain (auto-tracks all pages). */
262
+ createFromDomain(domain: string): Promise<{
263
+ data: IntentKeyword;
264
+ }>;
265
+ /** Stop tracking a keyword (irreversible — historical data is retained). */
266
+ deleteKeyword(keywordId: string): Promise<{
267
+ data: {
268
+ deleted: boolean;
269
+ };
270
+ }>;
271
+ /** Companies showing interest in a tracked keyword. */
272
+ keywordCompanies(keywordId: string, params?: {
273
+ limit?: number;
274
+ date_from?: string;
275
+ date_to?: string;
276
+ }): Promise<{
277
+ data: IntentCompany[];
278
+ }>;
279
+ /** Contacts showing interest in a tracked keyword. */
280
+ keywordContacts(keywordId: string, params?: {
281
+ limit?: number;
282
+ date_from?: string;
283
+ date_to?: string;
284
+ }): Promise<{
285
+ data: IntentContact[];
286
+ }>;
287
+ /** URLs associated with a keyword (pages visitors landed on while interested). */
288
+ keywordUrls(keywordId: string, params?: {
289
+ limit?: number;
290
+ }): Promise<{
291
+ data: IntentPage[];
292
+ }>;
293
+ /** Pages tracked on a specific domain. */
294
+ pagesByDomain(domain: string, params?: {
295
+ limit?: number;
296
+ }): Promise<{
297
+ data: IntentPage[];
298
+ }>;
299
+ /** Search tracked pages by URL fragment or keyword. */
300
+ searchPages(query: string, params?: {
301
+ limit?: number;
302
+ }): Promise<{
303
+ data: IntentPage[];
304
+ }>;
305
+ /** Get visitor records for a specific page URL. */
306
+ pageVisitors(pageUrl: string, params?: {
307
+ limit?: number;
308
+ date_from?: string;
309
+ date_to?: string;
310
+ }): Promise<{
311
+ data: IntentVisitor[];
312
+ }>;
313
+ /** Get contacts who visited a specific page URL. */
314
+ pageContacts(pageUrl: string, params?: {
315
+ limit?: number;
316
+ }): Promise<{
317
+ data: IntentContact[];
318
+ }>;
319
+ /** Visitor count aggregates by page (pass an array of URLs). */
320
+ pageVisitorCounts(urls: string[]): Promise<{
321
+ data: Array<{
322
+ url: string;
323
+ visitor_count: number;
324
+ }>;
325
+ }>;
326
+ /**
327
+ * Find companies whose users visited a specific URL (intent search).
328
+ *
329
+ * Note: this endpoint lives at the bare host (no `/api/v1` prefix), unlike the rest
330
+ * of the intent surface — we call it directly here instead of through the shared `post()` helper.
331
+ */
332
+ urlCompanies(url: string, params?: {
333
+ limit?: number;
334
+ date_from?: string;
335
+ date_to?: string;
336
+ }): Promise<{
337
+ data: IntentCompany[];
338
+ }>;
339
+ };
340
+
341
+ type SkillType = "llm" | "api";
342
+ interface SkillInputField {
343
+ name: string;
344
+ type: string;
345
+ required: boolean;
346
+ description?: string;
347
+ }
348
+ interface Skill {
349
+ id: string;
350
+ title: string;
351
+ description: string | null;
352
+ type: SkillType;
353
+ /** Only present on `type=llm`. */
354
+ prompt?: string;
355
+ /** Only present on `type=llm`. */
356
+ model?: string;
357
+ /** Only present on `type=api`. */
358
+ method?: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
359
+ /** Only present on `type=api`. */
360
+ url?: string;
361
+ /** Only present on `type=api`. */
362
+ headers?: Record<string, string>;
363
+ /** Only present on `type=api`. */
364
+ body_template?: string;
365
+ input_schema: {
366
+ fields: SkillInputField[];
367
+ };
368
+ output_schema: Record<string, unknown> | null;
369
+ created_at: string | null;
370
+ updated_at: string | null;
371
+ }
372
+ interface SkillCreateLLMParams {
373
+ title: string;
374
+ description?: string;
375
+ prompt: string;
376
+ model: string;
377
+ input_schema: {
378
+ fields: SkillInputField[];
379
+ };
380
+ output_schema?: Record<string, unknown>;
381
+ }
382
+ interface SkillCreateAPIParams {
383
+ title: string;
384
+ description?: string;
385
+ method: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
386
+ url: string;
387
+ headers?: Record<string, string>;
388
+ body_template?: string;
389
+ response_mapping?: Record<string, string>;
390
+ input_schema: {
391
+ fields: SkillInputField[];
392
+ };
393
+ }
394
+ interface SkillUpdateLLMParams {
395
+ title?: string;
396
+ description?: string;
397
+ prompt?: string;
398
+ model?: string;
399
+ input_schema?: {
400
+ fields: SkillInputField[];
401
+ };
402
+ output_schema?: Record<string, unknown>;
403
+ }
404
+ interface SkillUpdateAPIParams {
405
+ title?: string;
406
+ description?: string;
407
+ method?: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
408
+ url?: string;
409
+ headers?: Record<string, string>;
410
+ body_template?: string;
411
+ response_mapping?: Record<string, string>;
412
+ input_schema?: {
413
+ fields: SkillInputField[];
414
+ };
415
+ }
416
+ interface SkillTemplate {
417
+ id: string;
418
+ title: string;
419
+ description: string;
420
+ type: SkillType;
421
+ use_cases: string[];
422
+ }
423
+ interface SkillListParams {
424
+ page?: number;
425
+ limit?: number;
426
+ type?: SkillType;
427
+ search?: string;
428
+ }
429
+ /**
430
+ * Skills API - LLM and API building blocks that workflows compose into runs.
431
+ * Requires API key (server-side).
432
+ *
433
+ * Backed by:
434
+ * GET /api/v1/skills
435
+ * GET /api/v1/skills/{id}
436
+ * GET /api/v1/skills/{id}/variables
437
+ * GET /api/v1/skills/models
438
+ * GET /api/v1/skills/templates
439
+ * POST /api/v1/skills (both llm + api types via `type` field)
440
+ * POST /api/v1/skills/from-template
441
+ * POST /api/v1/skills/from-node
442
+ * PUT /api/v1/skills/{id}
443
+ * DELETE /api/v1/skills/{id}
444
+ * POST /api/v1/skills/validate
445
+ * POST /api/v1/skills/{id}/execute
446
+ */
447
+ declare const createSkillsClient: (apiKey: string, apiUrl?: string) => {
448
+ /** List skills. */
449
+ list(params?: SkillListParams): Promise<{
450
+ data: Skill[];
451
+ }>;
452
+ /** Get a skill by ID. */
453
+ get(skillId: string): Promise<Skill>;
454
+ /** Get the variables required by a skill (extracted from prompt or body template). */
455
+ getVariables(skillId: string): Promise<{
456
+ data: SkillInputField[];
457
+ }>;
458
+ /** List available LLM models. */
459
+ listModels(): Promise<{
460
+ data: Array<{
461
+ id: string;
462
+ label: string;
463
+ provider: string;
464
+ }>;
465
+ }>;
466
+ /** List skill templates. */
467
+ listTemplates(params?: {
468
+ type?: SkillType;
469
+ }): Promise<{
470
+ data: SkillTemplate[];
471
+ }>;
472
+ /** Create an LLM skill (prompt + model + schemas). */
473
+ createLLM(params: SkillCreateLLMParams): Promise<Skill>;
474
+ /** Create an API skill (HTTP request wrapper). */
475
+ createAPI(params: SkillCreateAPIParams): Promise<Skill>;
476
+ /** Create a skill from a built-in template. */
477
+ createFromTemplate(params: {
478
+ title: string;
479
+ template_id: string;
480
+ overrides?: Record<string, unknown>;
481
+ }): Promise<Skill>;
482
+ /** Lift a workflow node into a reusable skill. */
483
+ createFromNode(params: {
484
+ title: string;
485
+ description?: string;
486
+ node_id: string;
487
+ input_mapping?: Record<string, string>;
488
+ output_mapping?: Record<string, string>;
489
+ }): Promise<Skill>;
490
+ /** Update an LLM skill. */
491
+ updateLLM(skillId: string, fields: SkillUpdateLLMParams): Promise<Skill>;
492
+ /** Update an API skill. */
493
+ updateAPI(skillId: string, fields: SkillUpdateAPIParams): Promise<Skill>;
494
+ /** Delete a skill (irreversible if in-use workflows exist). */
495
+ delete(skillId: string): Promise<{
496
+ data: {
497
+ deleted: boolean;
498
+ };
499
+ }>;
500
+ /** Validate a skill definition (without saving). */
501
+ validate(skill: Partial<Skill>): Promise<{
502
+ data: {
503
+ valid: boolean;
504
+ errors: string[];
505
+ };
506
+ }>;
507
+ /** Execute a skill immediately with an input payload (test / preview). */
508
+ execute(skillId: string, inputPayload: Record<string, unknown>): Promise<{
509
+ data: {
510
+ output: Record<string, unknown>;
511
+ latency_ms: number;
512
+ tokens?: number;
513
+ error: string | null;
514
+ };
515
+ }>;
516
+ };
517
+
518
+ interface WorkflowNode {
519
+ id: string;
520
+ type: string;
521
+ config: Record<string, unknown>;
522
+ position?: {
523
+ x: number;
524
+ y: number;
525
+ };
526
+ /** Mapping from this node's output to the next node's input. */
527
+ input_mappings?: Record<string, string>;
528
+ }
529
+ interface WorkflowConnection {
530
+ from_node_id: string;
531
+ to_node_id: string;
532
+ condition?: string | null;
533
+ }
534
+ interface WorkflowConfig {
535
+ nodes: WorkflowNode[];
536
+ connections: WorkflowConnection[];
537
+ trigger?: Record<string, unknown> | null;
538
+ }
539
+ interface Workflow {
540
+ id: string;
541
+ name: string;
542
+ description: string | null;
543
+ config: WorkflowConfig;
544
+ trigger_config: Record<string, unknown> | null;
545
+ is_active: boolean;
546
+ created_at: string | null;
547
+ updated_at: string | null;
548
+ }
549
+ interface WorkflowCreateParams {
550
+ name: string;
551
+ description?: string;
552
+ config?: WorkflowConfig;
553
+ trigger_config?: Record<string, unknown>;
554
+ }
555
+ interface WorkflowUpdateParams {
556
+ name?: string;
557
+ description?: string;
558
+ config?: WorkflowConfig;
559
+ trigger_config?: Record<string, unknown>;
560
+ is_active?: boolean;
561
+ }
562
+ interface WorkflowExecution {
563
+ id: string;
564
+ workflow_id: string;
565
+ status: "pending" | "running" | "paused" | "completed" | "failed" | "stopped";
566
+ trigger_payload: Record<string, unknown>;
567
+ outputs: Record<string, unknown>;
568
+ error: string | null;
569
+ started_at: string | null;
570
+ ended_at: string | null;
571
+ }
572
+ interface NodeTypeSchema {
573
+ type: string;
574
+ label: string;
575
+ description: string;
576
+ config_schema: Record<string, unknown>;
577
+ output_schema: Record<string, unknown>;
578
+ }
579
+ interface WorkflowListParams {
580
+ page?: number;
581
+ limit?: number;
582
+ is_active?: boolean;
583
+ search?: string;
584
+ }
585
+ /**
586
+ * Workflows API - automation workflows with nodes, connections, and execution lifecycle.
587
+ * Requires API key (server-side).
588
+ *
589
+ * The graph8 workflow surface treats the whole workflow definition as a single
590
+ * record updated via `update()` — there are no per-node CRUD endpoints. To edit
591
+ * nodes or connections, fetch the workflow, mutate `config.nodes` / `config.connections`,
592
+ * and PUT it back.
593
+ *
594
+ * Backed by:
595
+ * GET /api/v1/workflows
596
+ * GET /api/v1/workflows/{id}
597
+ * POST /api/v1/workflows
598
+ * PUT /api/v1/workflows/{id}
599
+ * DELETE /api/v1/workflows/{id}
600
+ * POST /api/v1/workflows/validate
601
+ * POST /api/v1/workflows/{id}/execute
602
+ * GET /api/v1/workflows/executions/{exec_id}
603
+ * POST /api/v1/workflows/executions/{exec_id}/pause
604
+ * POST /api/v1/workflows/executions/{exec_id}/resume
605
+ * POST /api/v1/workflows/executions/{exec_id}/stop
606
+ * GET /api/v1/workflows/{id}/trigger-status
607
+ * POST /api/v1/workflows/{id}/trigger-reset
608
+ * GET /api/v1/workflows/node-types/schema
609
+ * GET /api/v1/workflows/integrations/slack/users|channels
610
+ * GET /api/v1/workflows/integrations/roam/users|groups
611
+ * GET /api/v1/workflows/mcp-servers
612
+ * GET /api/v1/workflows/dispositions
613
+ * GET /api/v1/workflows/forms/{form_id}/fields
614
+ */
615
+ declare const createWorkflowsClient: (apiKey: string, apiUrl?: string) => {
616
+ /** List workflows org-wide. */
617
+ list(params?: WorkflowListParams): Promise<{
618
+ data: Workflow[];
619
+ }>;
620
+ /** Get full workflow definition (nodes, connections, trigger, execution state). */
621
+ get(workflowId: string): Promise<Workflow>;
622
+ /** Create a new workflow. */
623
+ create(params: WorkflowCreateParams): Promise<Workflow>;
624
+ /**
625
+ * Update a workflow. Pass the full `config` (nodes + connections) to edit
626
+ * the graph — node-level CRUD is performed client-side by mutating the
627
+ * config and submitting the updated record.
628
+ */
629
+ update(workflowId: string, fields: WorkflowUpdateParams): Promise<Workflow>;
630
+ /** Delete a workflow. */
631
+ delete(workflowId: string): Promise<{
632
+ data: {
633
+ deleted: boolean;
634
+ };
635
+ }>;
636
+ /** Validate a workflow definition (orphans, dangling connections, required fields). */
637
+ validate(workflow: {
638
+ config: WorkflowConfig;
639
+ trigger_config?: Record<string, unknown>;
640
+ }): Promise<{
641
+ data: {
642
+ valid: boolean;
643
+ errors: Array<{
644
+ node_id?: string;
645
+ field?: string;
646
+ message: string;
647
+ }>;
648
+ };
649
+ }>;
650
+ /** Execute a workflow immediately with a trigger payload. */
651
+ execute(workflowId: string, triggerPayload?: Record<string, unknown>): Promise<WorkflowExecution>;
652
+ /** Get the status + output of a workflow execution. */
653
+ getExecution(executionId: string): Promise<WorkflowExecution>;
654
+ /** Pause an in-flight execution. */
655
+ pauseExecution(executionId: string): Promise<{
656
+ data: {
657
+ paused: boolean;
658
+ };
659
+ }>;
660
+ /** Resume a paused execution. */
661
+ resumeExecution(executionId: string): Promise<{
662
+ data: {
663
+ resumed: boolean;
664
+ };
665
+ }>;
666
+ /** Stop an execution (terminal state — cannot resume). */
667
+ stopExecution(executionId: string): Promise<{
668
+ data: {
669
+ stopped: boolean;
670
+ };
671
+ }>;
672
+ /** Get the status of a workflow's external trigger (e.g. "waiting for webhook"). */
673
+ getTriggerStatus(workflowId: string): Promise<{
674
+ data: {
675
+ status: string;
676
+ details: Record<string, unknown>;
677
+ };
678
+ }>;
679
+ /** Reset the trigger cursor (e.g. for event-stream triggers — resume from beginning). */
680
+ resetTrigger(workflowId: string): Promise<{
681
+ data: {
682
+ reset: boolean;
683
+ };
684
+ }>;
685
+ /**
686
+ * List available node types with schemas. Pass a `type` param to fetch one type's full schema.
687
+ */
688
+ nodeTypes(params?: {
689
+ type?: string;
690
+ }): Promise<{
691
+ data: NodeTypeSchema[];
692
+ }>;
693
+ /** Slack workspace users (for Slack action recipients). */
694
+ listSlackUsers(): Promise<{
695
+ data: Array<{
696
+ id: string;
697
+ name: string;
698
+ email: string | null;
699
+ }>;
700
+ }>;
701
+ /** Slack channels. */
702
+ listSlackChannels(): Promise<{
703
+ data: Array<{
704
+ id: string;
705
+ name: string;
706
+ is_private: boolean;
707
+ }>;
708
+ }>;
709
+ /** Roam (Copilot chat) users. */
710
+ listRoamUsers(): Promise<{
711
+ data: Array<{
712
+ id: string;
713
+ name: string;
714
+ email: string | null;
715
+ }>;
716
+ }>;
717
+ /** Roam (Copilot chat) groups. */
718
+ listRoamGroups(): Promise<{
719
+ data: Array<{
720
+ id: string;
721
+ name: string;
722
+ }>;
723
+ }>;
724
+ /** Available MCP servers (for Agent-node integrations). */
725
+ listMcpServers(): Promise<{
726
+ data: Array<{
727
+ id: string;
728
+ name: string;
729
+ url: string;
730
+ }>;
731
+ }>;
732
+ /** Available call dispositions (voice workflow nodes). */
733
+ listDispositions(): Promise<{
734
+ data: Array<{
735
+ id: string;
736
+ label: string;
737
+ }>;
738
+ }>;
739
+ /** Form field schema for form-trigger nodes. */
740
+ listFormFields(formId: string): Promise<{
741
+ data: Array<{
742
+ name: string;
743
+ type: string;
744
+ required: boolean;
745
+ }>;
746
+ }>;
747
+ };
748
+
749
+ /**
750
+ * Stage Checklist v2 pipelines. A "pipeline" here is a multi-stage workflow
751
+ * (with evidence requirements and per-channel scripts) that lives parallel
752
+ * to deal pipelines. Use `g8.deals.pipelines()` for deal-pipeline reads.
753
+ */
754
+ interface StagePipelineStage {
755
+ id: string;
756
+ name: string;
757
+ position: number;
758
+ /** Evidence keys that must be collected before the stage can be marked done. */
759
+ required_elements: string[];
760
+ /** Evidence keys that are recommended but not enforced. */
761
+ recommended_elements: string[];
762
+ /** Channel-specific scripts (call, email, linkedin, etc.). */
763
+ channel_scripts: Record<string, string>;
764
+ color: string | null;
765
+ stage_type: string | null;
766
+ }
767
+ interface StagePipeline {
768
+ id: string;
769
+ name: string;
770
+ target: string | null;
771
+ is_default: boolean;
772
+ stages: StagePipelineStage[];
773
+ created_at: string | null;
774
+ updated_at: string | null;
775
+ }
776
+ interface StagePipelineCreateParams {
777
+ name: string;
778
+ target?: string;
779
+ /** If true, creates an empty pipeline (no default stages). */
780
+ blank?: boolean;
781
+ }
782
+ interface StagePipelineUpdateParams {
783
+ name?: string;
784
+ target?: string;
785
+ }
786
+ interface StageCreateParams {
787
+ name: string;
788
+ position?: number;
789
+ required_elements?: string[];
790
+ recommended_elements?: string[];
791
+ channel_scripts?: Record<string, string>;
792
+ color?: string;
793
+ stage_type?: string;
794
+ }
795
+ interface StageUpdateParams {
796
+ name?: string;
797
+ position?: number;
798
+ required_elements?: string[];
799
+ recommended_elements?: string[];
800
+ channel_scripts?: Record<string, string>;
801
+ color?: string;
802
+ }
803
+ interface EvidenceKey {
804
+ key: string;
805
+ label: string;
806
+ description: string;
807
+ category: string;
808
+ }
809
+ interface PipelineSuggestion {
810
+ suggestion_id: string;
811
+ name: string;
812
+ target: string;
813
+ stages: Array<{
814
+ name: string;
815
+ required_elements: string[];
816
+ channel_scripts: Record<string, string>;
817
+ }>;
818
+ rationale: string;
819
+ }
820
+ /**
821
+ * Stage Checklist Pipelines API - workflow pipelines with evidence + scripts.
822
+ * Requires API key (server-side).
823
+ *
824
+ * Backed by:
825
+ * GET /api/v1/pipelines
826
+ * GET /api/v1/pipelines/{id}
827
+ * GET /api/v1/pipelines/evidence-library
828
+ * POST /api/v1/pipelines
829
+ * PUT /api/v1/pipelines/{id}
830
+ * DELETE /api/v1/pipelines/{id}
831
+ * POST /api/v1/pipelines/{id}/stages
832
+ * PUT /api/v1/pipelines/{id}/stages/{stage_id}
833
+ * DELETE /api/v1/pipelines/{id}/stages/{stage_id}
834
+ * PUT /api/v1/pipelines/{id}/stages/reorder
835
+ * POST /api/v1/pipelines/suggest
836
+ * POST /api/v1/pipelines/from-suggestion
837
+ */
838
+ declare const createPipelinesClient: (apiKey: string, apiUrl?: string) => {
839
+ /** List all stage-checklist pipelines with stages, evidence, scripts. */
840
+ list(): Promise<{
841
+ data: StagePipeline[];
842
+ }>;
843
+ /** Get a single pipeline by ID. */
844
+ get(pipelineId: string): Promise<StagePipeline>;
845
+ /** Get the canonical evidence-key library (used when defining stages). */
846
+ evidenceLibrary(): Promise<{
847
+ data: EvidenceKey[];
848
+ }>;
849
+ /** Create a new pipeline. Defaults to a templated set of stages; pass blank=true for empty. */
850
+ create(params: StagePipelineCreateParams): Promise<StagePipeline>;
851
+ /** Update pipeline metadata (name, target). */
852
+ update(pipelineId: string, fields: StagePipelineUpdateParams): Promise<StagePipeline>;
853
+ /** Delete a pipeline. Only allowed when no deals reference it. */
854
+ delete(pipelineId: string): Promise<{
855
+ data: {
856
+ deleted: boolean;
857
+ };
858
+ }>;
859
+ /** Add a new stage to a pipeline. */
860
+ createStage(pipelineId: string, stage: StageCreateParams): Promise<StagePipelineStage>;
861
+ /** Update a stage (evidence, scripts, position). */
862
+ updateStage(pipelineId: string, stageId: string, fields: StageUpdateParams): Promise<StagePipelineStage>;
863
+ /** Reorder stages within a pipeline (pass full ordered list of stage IDs). */
864
+ reorderStages(pipelineId: string, stageIds: string[]): Promise<{
865
+ data: StagePipelineStage[];
866
+ }>;
867
+ /** Delete a stage from a pipeline. */
868
+ deleteStage(pipelineId: string, stageId: string): Promise<{
869
+ data: {
870
+ deleted: boolean;
871
+ };
872
+ }>;
873
+ /** Get an AI-suggested pipeline based on org context (brand, ICP, messaging). */
874
+ suggest(): Promise<{
875
+ data: PipelineSuggestion;
876
+ }>;
877
+ /** Create a real pipeline from an AI suggestion (optionally with overrides). */
878
+ fromSuggestion(suggestionId: string, overrides?: Partial<{
879
+ name: string;
880
+ target: string;
881
+ }>): Promise<StagePipeline>;
882
+ };
883
+
884
+ interface QuoteLineItem {
885
+ product_id?: string | null;
886
+ name?: string | null;
887
+ description?: string | null;
888
+ quantity: number;
889
+ unit_price: number;
890
+ currency?: string | null;
891
+ recurring?: boolean | null;
892
+ }
893
+ type QuoteStatus = "draft" | "sent" | "signed" | "declined" | "expired" | "void";
894
+ interface QuoteSummary {
895
+ id: string;
896
+ name: string | null;
897
+ status: QuoteStatus;
898
+ total: number | null;
899
+ currency: string | null;
900
+ contact_id: number | null;
901
+ company_id: number | null;
902
+ expires_at: string | null;
903
+ created_at: string | null;
904
+ updated_at: string | null;
905
+ signing_url: string | null;
906
+ payment_link_url: string | null;
907
+ }
908
+ interface QuoteDetail extends QuoteSummary {
909
+ line_items: QuoteLineItem[];
910
+ notes: string | null;
911
+ recipient_email: string | null;
912
+ signed_at: string | null;
913
+ sent_at: string | null;
914
+ }
915
+ interface QuoteCreateParams {
916
+ contact_id?: number;
917
+ company_id?: number;
918
+ line_items: QuoteLineItem[];
919
+ currency?: string;
920
+ notes?: string;
921
+ /** ISO 8601 timestamp. */
922
+ expires_at?: string;
923
+ name?: string;
924
+ }
925
+ interface QuoteUpdateParams {
926
+ line_items?: QuoteLineItem[];
927
+ notes?: string;
928
+ expires_at?: string;
929
+ name?: string;
930
+ }
931
+ interface QuoteSendParams {
932
+ recipient_email: string;
933
+ /** Whether to attach the signing link. Defaults to true. */
934
+ send_signing_link?: boolean;
935
+ }
936
+ interface QuoteListParams {
937
+ status?: QuoteStatus;
938
+ contact_id?: number;
939
+ company_id?: number;
940
+ page?: number;
941
+ limit?: number;
942
+ }
943
+ interface QuotableProduct {
944
+ id: string;
945
+ name: string;
946
+ description: string | null;
947
+ unit_price: number;
948
+ currency: string;
949
+ recurring: boolean;
950
+ }
951
+ interface QuoteSettings {
952
+ default_currency: string;
953
+ default_tax_rate: number | null;
954
+ payment_providers: string[];
955
+ logo_url: string | null;
956
+ signature_required: boolean;
957
+ }
958
+ interface PaginationMeta$2 {
959
+ page: number;
960
+ limit: number;
961
+ total: number;
962
+ has_next: boolean;
963
+ }
964
+ /**
965
+ * Quotes API - quote-to-cash lifecycle. Requires API key (server-side).
966
+ *
967
+ * Backed by:
968
+ * GET /api/v1/quotes
969
+ * GET /api/v1/quotes/{id}
970
+ * POST /api/v1/quotes
971
+ * PUT /api/v1/quotes/{id}
972
+ * DELETE /api/v1/quotes/{id}
973
+ * POST /api/v1/quotes/{id}/duplicate
974
+ * POST /api/v1/quotes/{id}/edit-as-draft
975
+ * POST /api/v1/quotes/{id}/send
976
+ * GET /api/v1/quotable-products
977
+ * GET /api/v1/quote-settings
978
+ * GET /api/v1/contacts/{contact_id}/quotes
979
+ * GET /api/v1/companies/{company_id}/quotes
980
+ */
981
+ declare const createQuotesClient: (apiKey: string, apiUrl?: string) => {
982
+ /** List quotes org-wide with optional filters and pagination. */
983
+ list(params?: QuoteListParams): Promise<{
984
+ data: QuoteSummary[];
985
+ pagination?: PaginationMeta$2;
986
+ }>;
987
+ /** Get full details for a single quote. */
988
+ get(quoteId: string): Promise<QuoteDetail>;
989
+ /** Create a new quote from line items. */
990
+ create(quote: QuoteCreateParams): Promise<QuoteDetail>;
991
+ /** Update a draft quote (line items, expiry, notes). */
992
+ update(quoteId: string, fields: QuoteUpdateParams): Promise<QuoteDetail>;
993
+ /** Delete a draft quote (irreversible). */
994
+ delete(quoteId: string): Promise<{
995
+ data: {
996
+ deleted: boolean;
997
+ };
998
+ }>;
999
+ /** Duplicate an existing quote (all line items copied into a new draft). */
1000
+ duplicate(quoteId: string): Promise<QuoteDetail>;
1001
+ /** Convert a signed / sent quote back to editable draft state. */
1002
+ editAsDraft(quoteId: string): Promise<{
1003
+ data: {
1004
+ id: string;
1005
+ status: string;
1006
+ };
1007
+ }>;
1008
+ /** Send a quote to its recipient via email (with signature + optional payment link). */
1009
+ send(quoteId: string, params: QuoteSendParams): Promise<QuoteDetail>;
1010
+ /** List products available for line items. */
1011
+ products(): Promise<{
1012
+ data: QuotableProduct[];
1013
+ }>;
1014
+ /** Get org-level quote settings (currency, tax rate, payment providers, logo). */
1015
+ settings(): Promise<QuoteSettings>;
1016
+ /** Get all quotes associated with a contact. */
1017
+ forContact(contactId: number): Promise<{
1018
+ data: QuoteSummary[];
1019
+ }>;
1020
+ /** Get all quotes associated with a company. */
1021
+ forCompany(companyId: number): Promise<{
1022
+ data: QuoteSummary[];
1023
+ }>;
1024
+ };
1025
+
1026
+ /**
1027
+ * Inbox channel — `email`, `sms`, or `linkedin` (HeyReach internally).
1028
+ * Defaults to `email` on routes that accept this as a query param.
1029
+ */
1030
+ type InboxChannel = "email" | "sms" | "linkedin";
1031
+ interface InboxContact {
1032
+ name?: string | null;
1033
+ email?: string | null;
1034
+ company?: string | null;
1035
+ [key: string]: unknown;
1036
+ }
1037
+ interface InboxTag {
1038
+ id: string;
1039
+ name: string;
1040
+ }
1041
+ interface InboxAssignee {
1042
+ email: string;
1043
+ name?: string | null;
1044
+ [key: string]: unknown;
1045
+ }
1046
+ interface InboxMessage {
1047
+ message_id: string | null;
1048
+ from_address: string | null;
1049
+ to_addresses: string[];
1050
+ content: string | null;
1051
+ /** "USER", "AI", or "OTHER". */
1052
+ responder: string | null;
1053
+ date: string | null;
1054
+ is_draft: boolean;
1055
+ }
1056
+ interface InboxThread {
1057
+ id: string;
1058
+ /** "email", "sms", or "linkedin". */
1059
+ channel: string;
1060
+ subject: string | null;
1061
+ contact: InboxContact | null;
1062
+ messages: InboxMessage[];
1063
+ /** "open", "responded", "ai_responded", etc. */
1064
+ status: string | null;
1065
+ tags: InboxTag[];
1066
+ assignees: InboxAssignee[];
1067
+ created_at: string | null;
1068
+ updated_at: string | null;
1069
+ }
1070
+ interface InboxListParams {
1071
+ channel?: InboxChannel;
1072
+ sequence_id?: string;
1073
+ /** Filter by thread status (e.g. "open", "responded", "ai_responded"). */
1074
+ status?: string;
1075
+ /** Filter by assignee email. */
1076
+ assignee?: string;
1077
+ /** Filter by tag ID. */
1078
+ tag?: string;
1079
+ page?: number;
1080
+ /** Default 50, max 100. */
1081
+ page_size?: number;
1082
+ }
1083
+ interface InboxAssignResult {
1084
+ assigned: boolean;
1085
+ assignee: string;
1086
+ count: number;
1087
+ [key: string]: unknown;
1088
+ }
1089
+ interface InboxTagResult {
1090
+ tagged: boolean;
1091
+ tag_count: number;
1092
+ [key: string]: unknown;
1093
+ }
1094
+ interface InboxDraft {
1095
+ /** HTML body. */
1096
+ content: string;
1097
+ /** Plain-text alternative, if available. */
1098
+ plain_content: string | null;
1099
+ /** Credits charged for AI generation. */
1100
+ credits_charged: number;
1101
+ }
1102
+ interface InboxSendParams {
1103
+ body: string;
1104
+ channel: InboxChannel;
1105
+ subject?: string;
1106
+ /** Recipient override — email, phone, or LinkedIn ID. */
1107
+ to?: string;
1108
+ /** Sender override — mailbox email, Twilio number, or LinkedIn account ID. */
1109
+ from_address?: string;
1110
+ }
1111
+ interface InboxSendResult {
1112
+ message_id: string | null;
1113
+ status: string;
1114
+ channel: string;
1115
+ }
1116
+ /**
1117
+ * Inbox API — read + reply to multi-channel inbox threads (email, SMS, LinkedIn/HeyReach).
1118
+ * Requires API key (server-side).
1119
+ *
1120
+ * Backed by:
1121
+ * GET /api/v1/inbox
1122
+ * GET /api/v1/inbox/{reply_id}
1123
+ * POST /api/v1/inbox/{reply_id}/assign
1124
+ * POST /api/v1/inbox/{reply_id}/tag
1125
+ * GET /api/v1/inbox/{reply_id}/draft (charges credits, 402 on insufficient balance)
1126
+ * POST /api/v1/inbox/{reply_id}/send
1127
+ */
1128
+ declare const createInboxClient: (apiKey: string, apiUrl?: string) => {
1129
+ /** List inbox threads across email, SMS, and LinkedIn. */
1130
+ list(params?: InboxListParams): Promise<{
1131
+ data: InboxThread[];
1132
+ }>;
1133
+ /** Get a single inbox thread. Defaults to email channel. */
1134
+ get(replyId: string, channel?: InboxChannel): Promise<InboxThread>;
1135
+ /** Assign a user to an inbox thread. */
1136
+ assign(replyId: string, assigneeEmail: string, channel?: InboxChannel): Promise<InboxAssignResult>;
1137
+ /** Attach tag IDs to an inbox thread. */
1138
+ tag(replyId: string, tagIds: string[], channel?: InboxChannel): Promise<InboxTagResult>;
1139
+ /**
1140
+ * Generate an AI draft reply for a thread.
1141
+ * Charges credits — server returns 402 if balance is insufficient.
1142
+ */
1143
+ draft(replyId: string, channel?: InboxChannel): Promise<InboxDraft>;
1144
+ /** Send a reply through email, SMS, or LinkedIn. */
1145
+ send(replyId: string, payload: InboxSendParams): Promise<InboxSendResult>;
1146
+ };
1147
+
5
1148
  interface Deal {
6
1149
  id: string | null;
7
1150
  name: string | null;
@@ -81,7 +1224,7 @@ interface ContactDeal {
81
1224
  owner_id: string | null;
82
1225
  created_at: string | null;
83
1226
  }
84
- interface PaginationMeta {
1227
+ interface PaginationMeta$1 {
85
1228
  page: number;
86
1229
  limit: number;
87
1230
  total: number;
@@ -108,7 +1251,7 @@ declare const createDealsClient: (apiKey: string, apiUrl?: string) => {
108
1251
  /** List deals org-wide with optional filters and pagination. */
109
1252
  list(params?: DealListParams): Promise<{
110
1253
  data: Deal[];
111
- pagination?: PaginationMeta;
1254
+ pagination?: PaginationMeta$1;
112
1255
  }>;
113
1256
  /** Create a new deal. */
114
1257
  create(deal: DealCreateParams): Promise<Deal>;
@@ -624,20 +1767,314 @@ interface CallAnalysis {
624
1767
  }
625
1768
  type VoiceEvent = "connected" | "transcription" | "ended" | "error";
626
1769
  type VoiceCallback = (data: Record<string, unknown>) => void;
1770
+ interface VoicePagination {
1771
+ total_items: number;
1772
+ total_pages: number;
1773
+ current_page: number;
1774
+ page_size: number;
1775
+ }
1776
+ interface DialerSessionSummary {
1777
+ session_id: string;
1778
+ status: string | null;
1779
+ user_id: string | null;
1780
+ user_email: string | null;
1781
+ org_id: string | null;
1782
+ from_phone: string | null;
1783
+ campaign_id: string | null;
1784
+ campaign_builder_campaign_id: string | null;
1785
+ name: string | null;
1786
+ session_metadata: Record<string, unknown> | null;
1787
+ total_calls: number | null;
1788
+ created_at: string | null;
1789
+ updated_at: string | null;
1790
+ contact_ids: unknown[];
1791
+ }
1792
+ interface DialerSessionsListResult {
1793
+ sessions: DialerSessionSummary[];
1794
+ pagination: VoicePagination;
1795
+ }
1796
+ interface DialerSessionsListParams {
1797
+ page?: number;
1798
+ /** Default 50, max 200. */
1799
+ page_size?: number;
1800
+ /** Comma-separated status list (e.g. "ACTIVE,PAUSED"). */
1801
+ status?: string;
1802
+ user_email?: string;
1803
+ /** Substring search on session name. */
1804
+ name?: string;
1805
+ campaign_id?: string;
1806
+ list_id?: string;
1807
+ list_name?: string;
1808
+ /** ISO 8601 timestamp. */
1809
+ date_from?: string;
1810
+ /** ISO 8601 timestamp. */
1811
+ date_to?: string;
1812
+ sort_by?: string;
1813
+ /** Default "desc". */
1814
+ sort_order?: "asc" | "desc";
1815
+ }
1816
+ interface DialerStatsParams {
1817
+ session_id?: string;
1818
+ user_email?: string;
1819
+ /** YYYY-MM-DD. */
1820
+ date_from?: string;
1821
+ /** YYYY-MM-DD. */
1822
+ date_to?: string;
1823
+ /** Default "DAILY". */
1824
+ aggregation?: "DAILY" | "TOTAL";
1825
+ }
1826
+ interface DialerReportFilters {
1827
+ session_id: string | null;
1828
+ user_email: string | null;
1829
+ org_id: string | null;
1830
+ date_from: string | null;
1831
+ date_to: string | null;
1832
+ aggregation: string | null;
1833
+ }
1834
+ interface DialerReportMetric {
1835
+ date: string | null;
1836
+ sdr_name: string | null;
1837
+ org_id: string | null;
1838
+ list_title: string | null;
1839
+ total_dials: number;
1840
+ total_connections: number;
1841
+ connection_rate: number;
1842
+ total_voicemails: number;
1843
+ voicemail_rate: number;
1844
+ talk_time_minutes: number;
1845
+ avg_call_duration_minutes: number;
1846
+ dispositions: Record<string, unknown> | null;
1847
+ success_rate: number;
1848
+ unique_sessions: number;
1849
+ avg_calls_per_session: number;
1850
+ redial_count: number;
1851
+ redial_success_rate: number | null;
1852
+ peak_calling_hour: number | null;
1853
+ total_callbacks: number;
1854
+ }
1855
+ interface DialerStatsResult {
1856
+ filters: DialerReportFilters;
1857
+ metrics: DialerReportMetric[];
1858
+ summary: DialerReportMetric | null;
1859
+ }
1860
+ interface DialerNumberInfo {
1861
+ number: string;
1862
+ /** Default "ai". */
1863
+ inbound_type: string;
1864
+ /** Default "twilio". */
1865
+ telephony_provider: string;
1866
+ calls_today: number;
1867
+ calls_7d: number;
1868
+ connect_rate_7d: number;
1869
+ is_valid: boolean;
1870
+ daily_limit: number;
1871
+ assigned_to: string | null;
1872
+ created_at: string | null;
1873
+ }
1874
+ interface DialerNumbersListResult {
1875
+ numbers: DialerNumberInfo[];
1876
+ }
1877
+ interface MissedCallback {
1878
+ id: string | number | null;
1879
+ caller_phone: string | null;
1880
+ inbound_number: string | null;
1881
+ first_name: string | null;
1882
+ last_name: string | null;
1883
+ email: string | null;
1884
+ contact_id: string | number | null;
1885
+ parallel_session_id: string | null;
1886
+ created_at: string | null;
1887
+ call_duration: number | null;
1888
+ is_callback: boolean;
1889
+ }
1890
+ interface MissedCallbacksResult {
1891
+ missed_callbacks: MissedCallback[];
1892
+ count: number;
1893
+ }
1894
+ interface CallGradingResult {
1895
+ room_name: string;
1896
+ /** "ready" or "pending". */
1897
+ status: string;
1898
+ grading: Record<string, unknown> | null;
1899
+ reviewed: boolean;
1900
+ reviewed_at: string | null;
1901
+ }
1902
+ interface DialerAgentSummary {
1903
+ agent_id: string;
1904
+ agent_name: string | null;
1905
+ /** "SDR", etc. */
1906
+ role: string | null;
1907
+ agent_status: string | null;
1908
+ /** "agent" or "twin". */
1909
+ entity_type: string | null;
1910
+ description: string | null;
1911
+ phone: string | null;
1912
+ is_template: boolean;
1913
+ }
1914
+ interface DialerAgentsListResult {
1915
+ agents: DialerAgentSummary[];
1916
+ total_count: number;
1917
+ }
1918
+ interface DialerAgentsListParams {
1919
+ /** e.g. "SDR". */
1920
+ role?: string;
1921
+ agent_status?: string;
1922
+ /** "agent" or "twin". */
1923
+ entity_type?: "agent" | "twin";
1924
+ /** Substring filter on name/description. */
1925
+ search?: string;
1926
+ }
1927
+ interface DialerSessionCreateParams {
1928
+ /** 1-200 chars. */
1929
+ name: string;
1930
+ /** Org's dialer phone (E.164, 9-16 chars). */
1931
+ from_phone: string;
1932
+ /** Contact list ID (stored in session metadata). */
1933
+ list_id?: string;
1934
+ /** Display title for the source list. */
1935
+ list_title?: string;
1936
+ /** V2 agent UUID. */
1937
+ agent_id?: string;
1938
+ /** V1 fallback name. Defaults to "default_agent". */
1939
+ agent_name?: string;
1940
+ /** "agent" or "twin". */
1941
+ entity_type?: "agent" | "twin";
1942
+ /** Campaign Builder UUID. */
1943
+ studio_campaign_id?: string;
1944
+ /** IANA timezone (e.g. "America/New_York"). */
1945
+ user_timezone?: string;
1946
+ /** Per-session voicemail-skip override. null/omit = use SDR default. */
1947
+ skip_voicemails?: boolean;
1948
+ }
1949
+ interface DialerSessionCreateResult {
1950
+ session_id: string;
1951
+ status: string;
1952
+ name: string | null;
1953
+ org_id: string | null;
1954
+ user_id: string | null;
1955
+ user_email: string | null;
1956
+ from_phone: string | null;
1957
+ session_metadata: Record<string, unknown> | null;
1958
+ total_calls: number;
1959
+ created_at: string | null;
1960
+ message: string | null;
1961
+ }
1962
+ /** "ACTIVE" resumes, "PAUSED" pauses, "COMPLETED" stops. "FAILED" is rejected. */
1963
+ type DialerSessionStatus = "ACTIVE" | "PAUSED" | "COMPLETED";
1964
+ interface DialerSessionStatusUpdateResult {
1965
+ session_id: string;
1966
+ status: string;
1967
+ message: string | null;
1968
+ name: string | null;
1969
+ org_id: string | null;
1970
+ user_id: string | null;
1971
+ user_email: string | null;
1972
+ from_phone: string | null;
1973
+ session_metadata: Record<string, unknown> | null;
1974
+ total_calls: number;
1975
+ created_at: string | null;
1976
+ updated_at: string | null;
1977
+ }
1978
+ interface DialerSessionResumeResult extends DialerSessionStatusUpdateResult {
1979
+ /** Contacts actually placed in this batch (voice caps at 4). */
1980
+ dialed_count: number;
1981
+ }
627
1982
  /**
628
- * Voice AI - start AI voice calls, get transcriptions and analysis. Requires API key.
1983
+ * Voice AI start AI voice calls, get transcriptions and analysis.
1984
+ * Plus full parallel-dialer session control via the `dialer` namespace.
1985
+ * Requires API key (server-side).
1986
+ *
1987
+ * Backed by:
1988
+ * GET /api/v1/voice/dialer/sessions
1989
+ * POST /api/v1/voice/dialer/sessions
1990
+ * PATCH /api/v1/voice/dialer/sessions/{session_id}/status
1991
+ * POST /api/v1/voice/dialer/sessions/{session_id}/resume
1992
+ * GET /api/v1/voice/dialer/stats
1993
+ * GET /api/v1/voice/dialer/numbers
1994
+ * GET /api/v1/voice/dialer/missed-callbacks
1995
+ * GET /api/v1/voice/dialer/calls/{room_name}/grading
1996
+ * GET /api/v1/voice/dialer/agents
629
1997
  */
630
1998
  declare const createVoiceClient: (apiKey: string, apiUrl?: string) => {
631
- /** Start an AI voice session. */
1999
+ /**
2000
+ * Start an AI voice session.
2001
+ * @deprecated Preview surface — for parallel-dialer flows use `voice.dialer.createSession()`.
2002
+ */
632
2003
  start(config: {
633
2004
  agent?: string;
634
2005
  contactId?: number;
635
2006
  context?: Record<string, unknown>;
636
2007
  }): Promise<VoiceSession>;
637
- /** Get call analysis for a completed session. */
2008
+ /**
2009
+ * Get call analysis for a completed session.
2010
+ * @deprecated Preview surface — for dialer-call grading use `voice.dialer.callGrading(roomName)`.
2011
+ */
638
2012
  analysis(sessionId: string): Promise<CallAnalysis>;
639
2013
  /** Listen for voice events. */
640
2014
  on(event: VoiceEvent, callback: VoiceCallback): void;
2015
+ /** Parallel-dialer session control + analytics. */
2016
+ dialer: {
2017
+ /** List parallel-dialer sessions with filters + pagination. */
2018
+ listSessions(params?: DialerSessionsListParams): Promise<DialerSessionsListResult>;
2019
+ /** Create a parallel-dialer session in PAUSED state. SDR opens UI to start dialing. */
2020
+ createSession(payload: DialerSessionCreateParams): Promise<DialerSessionCreateResult>;
2021
+ /** Pause / resume / stop a dialer session via status flip. */
2022
+ updateSessionStatus(sessionId: string, status: DialerSessionStatus): Promise<DialerSessionStatusUpdateResult>;
2023
+ /**
2024
+ * Resume a PAUSED dialer session. Auto-fetches the next batch from the source list,
2025
+ * filters already-called + phoneless rows, and forwards to voice's start-session.
2026
+ * @param maxContacts 1-4 (voice caps parallel dialing at 4). Default 4.
2027
+ */
2028
+ resumeSession(sessionId: string, maxContacts?: number): Promise<DialerSessionResumeResult>;
2029
+ /** Aggregated dialer analytics (daily breakdown or total). */
2030
+ stats(params?: DialerStatsParams): Promise<DialerStatsResult>;
2031
+ /** List dialer-eligible phone numbers with 7-day stats + daily limits. */
2032
+ numbers(userEmail?: string): Promise<DialerNumbersListResult>;
2033
+ /** List missed inbound callbacks with caller / contact info. */
2034
+ missedCallbacks(limit?: number): Promise<MissedCallbacksResult>;
2035
+ /** AI grading for a single dialer call (returns "pending" while in progress). */
2036
+ callGrading(roomName: string): Promise<CallGradingResult>;
2037
+ /** List voice agents available for dialer sessions (capped at 100; no pagination). */
2038
+ agents(params?: DialerAgentsListParams): Promise<DialerAgentsListResult>;
2039
+ /** Fetch the full transcript for a single dialer call. */
2040
+ callTranscript(roomName: string): Promise<{
2041
+ data: {
2042
+ status: string;
2043
+ transcript: Array<{
2044
+ speaker: string;
2045
+ text: string;
2046
+ timestamp: number;
2047
+ }>;
2048
+ };
2049
+ }>;
2050
+ /** List dialer calls — pass `contact_id` or `user_email` to scope. */
2051
+ listCalls(params?: {
2052
+ contact_id?: number;
2053
+ user_email?: string;
2054
+ campaign_id?: string;
2055
+ date_from?: string;
2056
+ date_to?: string;
2057
+ limit?: number;
2058
+ page?: number;
2059
+ }): Promise<{
2060
+ data: Array<Record<string, unknown>>;
2061
+ pagination?: VoicePagination;
2062
+ }>;
2063
+ /** Convenience: list calls for a single contact. */
2064
+ listCallsForContact(contactId: number, extra?: {
2065
+ limit?: number;
2066
+ }): Promise<{
2067
+ data: Array<Record<string, unknown>>;
2068
+ }>;
2069
+ /** Convenience: list calls placed by a specific SDR. */
2070
+ listCallsForSdr(userEmail: string, extra?: {
2071
+ limit?: number;
2072
+ date_from?: string;
2073
+ date_to?: string;
2074
+ }): Promise<{
2075
+ data: Array<Record<string, unknown>>;
2076
+ }>;
2077
+ };
641
2078
  };
642
2079
 
643
2080
  interface AnalyticsOverview {
@@ -728,24 +2165,210 @@ declare const createCampaignsClient: (apiKey: string, apiUrl?: string) => {
728
2165
  stats(campaignId: string): Promise<CampaignStats>;
729
2166
  };
730
2167
 
731
- interface Sequence {
732
- id: string;
733
- name: string;
734
- status: string;
735
- step_count: number | null;
736
- contact_count: number | null;
737
- }
738
2168
  interface AddToSequenceConfig {
739
2169
  sequenceId: string;
740
2170
  contactIds: number[];
741
2171
  listId: number;
742
2172
  }
2173
+ interface SequenceListItem {
2174
+ id: string;
2175
+ name: string | null;
2176
+ status: string | null;
2177
+ user_email: string | null;
2178
+ step_count: number | null;
2179
+ contact_count: number | null;
2180
+ sequence_kind: string | null;
2181
+ associated_list_id: number | null;
2182
+ created_at: string | null;
2183
+ updated_at: string | null;
2184
+ }
2185
+ interface SequenceListParams {
2186
+ page?: number;
2187
+ limit?: number;
2188
+ /** Filter by sequence status (e.g. "live", "draft", "paused"). */
2189
+ status?: string;
2190
+ }
2191
+ interface SequenceDetail {
2192
+ id: string;
2193
+ name: string | null;
2194
+ description: string | null;
2195
+ status: string | null;
2196
+ user_email: string | null;
2197
+ associated_list_id: number | null;
2198
+ finish_on_reply: boolean;
2199
+ send_in_same_thread: boolean;
2200
+ wait_for_new_contacts: boolean;
2201
+ paused_at: string | null;
2202
+ resumed_at: string | null;
2203
+ created_at: string | null;
2204
+ updated_at: string | null;
2205
+ }
2206
+ interface SequenceContactItem {
2207
+ id: string | null;
2208
+ contact_id: number | null;
2209
+ state: string | null;
2210
+ current_step_order: number | null;
2211
+ created_at: string | null;
2212
+ updated_at: string | null;
2213
+ }
2214
+ interface SequenceContactsParams {
2215
+ page?: number;
2216
+ limit?: number;
2217
+ /** Filter by contact state (e.g. "active", "completed", "replied"). */
2218
+ state?: string;
2219
+ }
2220
+ interface SequenceActionResult {
2221
+ sequence_id: string;
2222
+ status: string;
2223
+ contacts_affected: number;
2224
+ }
2225
+ /**
2226
+ * Step type. Note: LinkedIn flows use "HEYREACH" — there is no "LINKEDIN" step type.
2227
+ * Server is case-insensitive on input but stores uppercase.
2228
+ */
2229
+ type SequenceStepType = "EMAIL" | "PHONE" | "SMS" | "WHATSAPP" | "HEYREACH" | "MANUAL_DIALER";
2230
+ type SequenceStepInputType = "ON_DEMAND" | "MANUAL_TEMPLATE" | "AI_GENERATED_TEMPLATE";
2231
+ interface SequenceStepConfig {
2232
+ step_order: number;
2233
+ step_type: SequenceStepType | string;
2234
+ /** Defaults to "ON_DEMAND". */
2235
+ input_type?: SequenceStepInputType | string;
2236
+ /** Wait time before this step in seconds. Defaults to 0. */
2237
+ time_interval?: number;
2238
+ /** Template body, AI prompt, or other step-type-specific config. */
2239
+ step_data?: Record<string, unknown>;
2240
+ }
2241
+ interface SequenceChannelConfig {
2242
+ channel_id: number;
2243
+ channel_value: string;
2244
+ channel_type: string;
2245
+ channel_data?: Record<string, unknown>;
2246
+ }
2247
+ interface SequenceCreateParams {
2248
+ name: string;
2249
+ user_email: string;
2250
+ description?: string;
2251
+ finish_on_reply?: boolean;
2252
+ send_in_same_thread?: boolean;
2253
+ wait_for_new_contacts?: boolean;
2254
+ associated_list_id?: number;
2255
+ steps?: SequenceStepConfig[];
2256
+ channels?: SequenceChannelConfig[];
2257
+ campaign_id?: string;
2258
+ }
2259
+ interface SequenceCreateResult {
2260
+ id: string;
2261
+ name: string;
2262
+ status: string;
2263
+ created_at: string | null;
2264
+ }
2265
+ interface SequenceUpdateParams {
2266
+ name?: string;
2267
+ description?: string;
2268
+ is_shared?: boolean;
2269
+ finish_on_reply?: boolean;
2270
+ send_in_same_thread?: boolean;
2271
+ wait_for_new_contacts?: boolean;
2272
+ schedule_id?: string;
2273
+ appointment_id?: number;
2274
+ }
2275
+ interface SequenceStepUpdateParams {
2276
+ step_data?: Record<string, unknown>;
2277
+ time_interval?: number;
2278
+ step_type?: SequenceStepType | string;
2279
+ input_type?: SequenceStepInputType | string;
2280
+ }
2281
+ interface SequencePreviewStep {
2282
+ id: string;
2283
+ step_order: number;
2284
+ step_type: string;
2285
+ input_type: string;
2286
+ time_interval: number | null;
2287
+ step_data: Record<string, unknown> | null;
2288
+ }
2289
+ interface SequencePreviewChannel {
2290
+ id: string;
2291
+ channel_id: number | null;
2292
+ channel_value: string | null;
2293
+ channel_type: string | null;
2294
+ }
2295
+ interface SequencePreview {
2296
+ id: string;
2297
+ name: string | null;
2298
+ status: string | null;
2299
+ description: string | null;
2300
+ steps: SequencePreviewStep[];
2301
+ channels: SequencePreviewChannel[];
2302
+ }
2303
+ interface SequenceAnalytics {
2304
+ overview: Record<string, unknown>;
2305
+ performance: Record<string, unknown>;
2306
+ engagement: Record<string, unknown>;
2307
+ timeline: Record<string, unknown>[];
2308
+ contact_distribution: Record<string, unknown>;
2309
+ step_breakdown: Record<string, unknown>[];
2310
+ step_creation_methods: Record<string, unknown>[];
2311
+ sender_distribution: Record<string, unknown>[];
2312
+ }
2313
+ interface PaginationMeta {
2314
+ page: number;
2315
+ limit: number;
2316
+ total: number;
2317
+ has_next: boolean;
2318
+ }
743
2319
  /**
744
- * Sequences - manage outbound sequences. Requires API key (server-side).
2320
+ * Sequences API list, create, run, pause, update, analyze multi-channel sequences.
2321
+ * Requires API key (server-side).
2322
+ *
2323
+ * Backed by:
2324
+ * GET /api/v1/sequences
2325
+ * POST /api/v1/sequences
2326
+ * GET /api/v1/sequences/{sequence_id}
2327
+ * PATCH /api/v1/sequences/{sequence_id}
2328
+ * DELETE /api/v1/sequences/{sequence_id}
2329
+ * GET /api/v1/sequences/{sequence_id}/contacts
2330
+ * POST /api/v1/sequences/{sequence_id}/contacts
2331
+ * POST /api/v1/sequences/{sequence_id}/run
2332
+ * POST /api/v1/sequences/{sequence_id}/pause
2333
+ * POST /api/v1/sequences/{sequence_id}/resume
2334
+ * PATCH /api/v1/sequences/{sequence_id}/steps/{step_id}
2335
+ * GET /api/v1/sequences/{sequence_id}/preview
2336
+ * GET /api/v1/sequences/{sequence_id}/analytics
745
2337
  */
746
2338
  declare const createSequencesClient: (apiKey: string, apiUrl?: string) => {
747
- list(page?: number, limit?: number): Promise<Sequence[]>;
748
- add(config: AddToSequenceConfig): Promise<void>;
2339
+ /** List sequences with pagination + optional status filter. */
2340
+ list: {
2341
+ (): Promise<SequenceListItem[]>;
2342
+ (page: number, limit?: number): Promise<SequenceListItem[]>;
2343
+ (params: SequenceListParams): Promise<SequenceListItem[]>;
2344
+ };
2345
+ /** Get full sequence details by ID. */
2346
+ get(sequenceId: string): Promise<SequenceDetail>;
2347
+ /** List contacts enrolled in a sequence. Filter by state (e.g. "active", "replied"). */
2348
+ contacts(sequenceId: string, params?: SequenceContactsParams): Promise<{
2349
+ data: SequenceContactItem[];
2350
+ pagination?: PaginationMeta;
2351
+ }>;
2352
+ /** Add contacts to a sequence (V2 queuing). Live or drafted sequences only. */
2353
+ add(config: AddToSequenceConfig): Promise<SequenceActionResult>;
2354
+ /** Create a new sequence with optional steps + channels. */
2355
+ create(payload: SequenceCreateParams): Promise<SequenceCreateResult>;
2356
+ /** Update sequence metadata. Rejected (409) if sequence is in a transitional status. */
2357
+ update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
2358
+ /** Update a single step within a sequence. */
2359
+ updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
2360
+ /** Soft-delete (archive) a sequence. */
2361
+ delete(sequenceId: string): Promise<SequenceActionResult>;
2362
+ /** Run/start a DRAFTED sequence (V2 orchestration). */
2363
+ run(sequenceId: string): Promise<SequenceActionResult>;
2364
+ /** Pause a live sequence. */
2365
+ pause(sequenceId: string): Promise<SequenceActionResult>;
2366
+ /** Resume a paused sequence. */
2367
+ resume(sequenceId: string): Promise<SequenceActionResult>;
2368
+ /** Read-only sequence preview with all steps + channels (no enrollment). */
2369
+ preview(sequenceId: string): Promise<SequencePreview>;
2370
+ /** Comprehensive analytics for a sequence. */
2371
+ analytics(sequenceId: string): Promise<SequenceAnalytics>;
749
2372
  };
750
2373
 
751
2374
  interface PersonEnrichment {
@@ -1076,6 +2699,14 @@ declare const useG8: () => {
1076
2699
  _tasks: ReturnType<typeof createTasksClient> | null;
1077
2700
  _fields: ReturnType<typeof createFieldsClient> | null;
1078
2701
  _deals: ReturnType<typeof createDealsClient> | null;
2702
+ _inbox: ReturnType<typeof createInboxClient> | null;
2703
+ _quotes: ReturnType<typeof createQuotesClient> | null;
2704
+ _pipelines: ReturnType<typeof createPipelinesClient> | null;
2705
+ _workflows: ReturnType<typeof createWorkflowsClient> | null;
2706
+ _skills: ReturnType<typeof createSkillsClient> | null;
2707
+ _intent: ReturnType<typeof createIntentClient> | null;
2708
+ _studio: ReturnType<typeof createStudioClient> | null;
2709
+ _meetings: ReturnType<typeof createMeetingsClient> | null;
1079
2710
  init(config: G8Config): void;
1080
2711
  track(event: string, properties?: TrackProperties): void;
1081
2712
  identify(userId: string, properties?: IdentifyProperties): void;
@@ -1129,8 +2760,26 @@ declare const useG8: () => {
1129
2760
  search(filters: SearchFilter[], page?: number, limit?: number): Promise<SearchResults>;
1130
2761
  };
1131
2762
  get sequences(): {
1132
- list(page?: number, limit?: number): Promise<Sequence[]>;
1133
- add(config: AddToSequenceConfig): Promise<void>;
2763
+ list: {
2764
+ (): Promise<SequenceListItem[]>;
2765
+ (page: number, limit?: number): Promise<SequenceListItem[]>;
2766
+ (params: SequenceListParams): Promise<SequenceListItem[]>;
2767
+ };
2768
+ get(sequenceId: string): Promise<SequenceDetail>;
2769
+ contacts(sequenceId: string, params?: SequenceContactsParams): Promise<{
2770
+ data: SequenceContactItem[];
2771
+ pagination?: PaginationMeta;
2772
+ }>;
2773
+ add(config: AddToSequenceConfig): Promise<SequenceActionResult>;
2774
+ create(payload: SequenceCreateParams): Promise<SequenceCreateResult>;
2775
+ update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
2776
+ updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
2777
+ delete(sequenceId: string): Promise<SequenceActionResult>;
2778
+ run(sequenceId: string): Promise<SequenceActionResult>;
2779
+ pause(sequenceId: string): Promise<SequenceActionResult>;
2780
+ resume(sequenceId: string): Promise<SequenceActionResult>;
2781
+ preview(sequenceId: string): Promise<SequencePreview>;
2782
+ analytics(sequenceId: string): Promise<SequenceAnalytics>;
1134
2783
  };
1135
2784
  get campaigns(): {
1136
2785
  list(page?: number, limit?: number): Promise<Campaign[]>;
@@ -1164,6 +2813,51 @@ declare const useG8: () => {
1164
2813
  }): Promise<VoiceSession>;
1165
2814
  analysis(sessionId: string): Promise<CallAnalysis>;
1166
2815
  on(event: "error" | "ended" | "connected" | "transcription", callback: (data: Record<string, unknown>) => void): void;
2816
+ dialer: {
2817
+ listSessions(params?: DialerSessionsListParams): Promise<DialerSessionsListResult>;
2818
+ createSession(payload: DialerSessionCreateParams): Promise<DialerSessionCreateResult>;
2819
+ updateSessionStatus(sessionId: string, status: DialerSessionStatus): Promise<DialerSessionStatusUpdateResult>;
2820
+ resumeSession(sessionId: string, maxContacts?: number): Promise<DialerSessionResumeResult>;
2821
+ stats(params?: DialerStatsParams): Promise<DialerStatsResult>;
2822
+ numbers(userEmail?: string): Promise<DialerNumbersListResult>;
2823
+ missedCallbacks(limit?: number): Promise<MissedCallbacksResult>;
2824
+ callGrading(roomName: string): Promise<CallGradingResult>;
2825
+ agents(params?: DialerAgentsListParams): Promise<DialerAgentsListResult>;
2826
+ callTranscript(roomName: string): Promise<{
2827
+ data: {
2828
+ status: string;
2829
+ transcript: Array<{
2830
+ speaker: string;
2831
+ text: string;
2832
+ timestamp: number;
2833
+ }>;
2834
+ };
2835
+ }>;
2836
+ listCalls(params?: {
2837
+ contact_id?: number;
2838
+ user_email?: string;
2839
+ campaign_id?: string;
2840
+ date_from?: string;
2841
+ date_to?: string;
2842
+ limit?: number;
2843
+ page?: number;
2844
+ }): Promise<{
2845
+ data: Array<Record<string, unknown>>;
2846
+ pagination?: VoicePagination;
2847
+ }>;
2848
+ listCallsForContact(contactId: number, extra?: {
2849
+ limit?: number;
2850
+ }): Promise<{
2851
+ data: Array<Record<string, unknown>>;
2852
+ }>;
2853
+ listCallsForSdr(userEmail: string, extra?: {
2854
+ limit?: number;
2855
+ date_from?: string;
2856
+ date_to?: string;
2857
+ }): Promise<{
2858
+ data: Array<Record<string, unknown>>;
2859
+ }>;
2860
+ };
1167
2861
  };
1168
2862
  get pages(): {
1169
2863
  clone(url: string): Promise<LandingPage>;
@@ -1294,7 +2988,7 @@ declare const useG8: () => {
1294
2988
  }>;
1295
2989
  list(params?: DealListParams): Promise<{
1296
2990
  data: Deal[];
1297
- pagination?: PaginationMeta;
2991
+ pagination?: PaginationMeta$1;
1298
2992
  }>;
1299
2993
  create(deal: DealCreateParams): Promise<Deal>;
1300
2994
  get(dealId: string): Promise<Deal>;
@@ -1311,6 +3005,361 @@ declare const useG8: () => {
1311
3005
  data: ContactDeal[];
1312
3006
  }>;
1313
3007
  };
3008
+ get inbox(): {
3009
+ list(params?: InboxListParams): Promise<{
3010
+ data: InboxThread[];
3011
+ }>;
3012
+ get(replyId: string, channel?: InboxChannel): Promise<InboxThread>;
3013
+ assign(replyId: string, assigneeEmail: string, channel?: InboxChannel): Promise<InboxAssignResult>;
3014
+ tag(replyId: string, tagIds: string[], channel?: InboxChannel): Promise<InboxTagResult>;
3015
+ draft(replyId: string, channel?: InboxChannel): Promise<InboxDraft>;
3016
+ send(replyId: string, payload: InboxSendParams): Promise<InboxSendResult>;
3017
+ };
3018
+ get quotes(): {
3019
+ list(params?: QuoteListParams): Promise<{
3020
+ data: QuoteSummary[];
3021
+ pagination?: PaginationMeta$2;
3022
+ }>;
3023
+ get(quoteId: string): Promise<QuoteDetail>;
3024
+ create(quote: QuoteCreateParams): Promise<QuoteDetail>;
3025
+ update(quoteId: string, fields: QuoteUpdateParams): Promise<QuoteDetail>;
3026
+ delete(quoteId: string): Promise<{
3027
+ data: {
3028
+ deleted: boolean;
3029
+ };
3030
+ }>;
3031
+ duplicate(quoteId: string): Promise<QuoteDetail>;
3032
+ editAsDraft(quoteId: string): Promise<{
3033
+ data: {
3034
+ id: string;
3035
+ status: string;
3036
+ };
3037
+ }>;
3038
+ send(quoteId: string, params: QuoteSendParams): Promise<QuoteDetail>;
3039
+ products(): Promise<{
3040
+ data: QuotableProduct[];
3041
+ }>;
3042
+ settings(): Promise<QuoteSettings>;
3043
+ forContact(contactId: number): Promise<{
3044
+ data: QuoteSummary[];
3045
+ }>;
3046
+ forCompany(companyId: number): Promise<{
3047
+ data: QuoteSummary[];
3048
+ }>;
3049
+ };
3050
+ get pipelines(): {
3051
+ list(): Promise<{
3052
+ data: StagePipeline[];
3053
+ }>;
3054
+ get(pipelineId: string): Promise<StagePipeline>;
3055
+ evidenceLibrary(): Promise<{
3056
+ data: EvidenceKey[];
3057
+ }>;
3058
+ create(params: StagePipelineCreateParams): Promise<StagePipeline>;
3059
+ update(pipelineId: string, fields: StagePipelineUpdateParams): Promise<StagePipeline>;
3060
+ delete(pipelineId: string): Promise<{
3061
+ data: {
3062
+ deleted: boolean;
3063
+ };
3064
+ }>;
3065
+ createStage(pipelineId: string, stage: StageCreateParams): Promise<StagePipelineStage>;
3066
+ updateStage(pipelineId: string, stageId: string, fields: StageUpdateParams): Promise<StagePipelineStage>;
3067
+ reorderStages(pipelineId: string, stageIds: string[]): Promise<{
3068
+ data: StagePipelineStage[];
3069
+ }>;
3070
+ deleteStage(pipelineId: string, stageId: string): Promise<{
3071
+ data: {
3072
+ deleted: boolean;
3073
+ };
3074
+ }>;
3075
+ suggest(): Promise<{
3076
+ data: PipelineSuggestion;
3077
+ }>;
3078
+ fromSuggestion(suggestionId: string, overrides?: Partial<{
3079
+ name: string;
3080
+ target: string;
3081
+ }>): Promise<StagePipeline>;
3082
+ };
3083
+ get workflows(): {
3084
+ list(params?: WorkflowListParams): Promise<{
3085
+ data: Workflow[];
3086
+ }>;
3087
+ get(workflowId: string): Promise<Workflow>;
3088
+ create(params: WorkflowCreateParams): Promise<Workflow>;
3089
+ update(workflowId: string, fields: WorkflowUpdateParams): Promise<Workflow>;
3090
+ delete(workflowId: string): Promise<{
3091
+ data: {
3092
+ deleted: boolean;
3093
+ };
3094
+ }>;
3095
+ validate(workflow: {
3096
+ config: WorkflowConfig;
3097
+ trigger_config?: Record<string, unknown>;
3098
+ }): Promise<{
3099
+ data: {
3100
+ valid: boolean;
3101
+ errors: Array<{
3102
+ node_id?: string;
3103
+ field?: string;
3104
+ message: string;
3105
+ }>;
3106
+ };
3107
+ }>;
3108
+ execute(workflowId: string, triggerPayload?: Record<string, unknown>): Promise<WorkflowExecution>;
3109
+ getExecution(executionId: string): Promise<WorkflowExecution>;
3110
+ pauseExecution(executionId: string): Promise<{
3111
+ data: {
3112
+ paused: boolean;
3113
+ };
3114
+ }>;
3115
+ resumeExecution(executionId: string): Promise<{
3116
+ data: {
3117
+ resumed: boolean;
3118
+ };
3119
+ }>;
3120
+ stopExecution(executionId: string): Promise<{
3121
+ data: {
3122
+ stopped: boolean;
3123
+ };
3124
+ }>;
3125
+ getTriggerStatus(workflowId: string): Promise<{
3126
+ data: {
3127
+ status: string;
3128
+ details: Record<string, unknown>;
3129
+ };
3130
+ }>;
3131
+ resetTrigger(workflowId: string): Promise<{
3132
+ data: {
3133
+ reset: boolean;
3134
+ };
3135
+ }>;
3136
+ nodeTypes(params?: {
3137
+ type?: string;
3138
+ }): Promise<{
3139
+ data: NodeTypeSchema[];
3140
+ }>;
3141
+ listSlackUsers(): Promise<{
3142
+ data: Array<{
3143
+ id: string;
3144
+ name: string;
3145
+ email: string | null;
3146
+ }>;
3147
+ }>;
3148
+ listSlackChannels(): Promise<{
3149
+ data: Array<{
3150
+ id: string;
3151
+ name: string;
3152
+ is_private: boolean;
3153
+ }>;
3154
+ }>;
3155
+ listRoamUsers(): Promise<{
3156
+ data: Array<{
3157
+ id: string;
3158
+ name: string;
3159
+ email: string | null;
3160
+ }>;
3161
+ }>;
3162
+ listRoamGroups(): Promise<{
3163
+ data: Array<{
3164
+ id: string;
3165
+ name: string;
3166
+ }>;
3167
+ }>;
3168
+ listMcpServers(): Promise<{
3169
+ data: Array<{
3170
+ id: string;
3171
+ name: string;
3172
+ url: string;
3173
+ }>;
3174
+ }>;
3175
+ listDispositions(): Promise<{
3176
+ data: Array<{
3177
+ id: string;
3178
+ label: string;
3179
+ }>;
3180
+ }>;
3181
+ listFormFields(formId: string): Promise<{
3182
+ data: Array<{
3183
+ name: string;
3184
+ type: string;
3185
+ required: boolean;
3186
+ }>;
3187
+ }>;
3188
+ };
3189
+ get skills(): {
3190
+ list(params?: SkillListParams): Promise<{
3191
+ data: Skill[];
3192
+ }>;
3193
+ get(skillId: string): Promise<Skill>;
3194
+ getVariables(skillId: string): Promise<{
3195
+ data: SkillInputField[];
3196
+ }>;
3197
+ listModels(): Promise<{
3198
+ data: Array<{
3199
+ id: string;
3200
+ label: string;
3201
+ provider: string;
3202
+ }>;
3203
+ }>;
3204
+ listTemplates(params?: {
3205
+ type?: SkillType;
3206
+ }): Promise<{
3207
+ data: SkillTemplate[];
3208
+ }>;
3209
+ createLLM(params: SkillCreateLLMParams): Promise<Skill>;
3210
+ createAPI(params: SkillCreateAPIParams): Promise<Skill>;
3211
+ createFromTemplate(params: {
3212
+ title: string;
3213
+ template_id: string;
3214
+ overrides?: Record<string, unknown>;
3215
+ }): Promise<Skill>;
3216
+ createFromNode(params: {
3217
+ title: string;
3218
+ description?: string;
3219
+ node_id: string;
3220
+ input_mapping?: Record<string, string>;
3221
+ output_mapping?: Record<string, string>;
3222
+ }): Promise<Skill>;
3223
+ updateLLM(skillId: string, fields: SkillUpdateLLMParams): Promise<Skill>;
3224
+ updateAPI(skillId: string, fields: SkillUpdateAPIParams): Promise<Skill>;
3225
+ delete(skillId: string): Promise<{
3226
+ data: {
3227
+ deleted: boolean;
3228
+ };
3229
+ }>;
3230
+ validate(skill: Partial<Skill>): Promise<{
3231
+ data: {
3232
+ valid: boolean;
3233
+ errors: string[];
3234
+ };
3235
+ }>;
3236
+ execute(skillId: string, inputPayload: Record<string, unknown>): Promise<{
3237
+ data: {
3238
+ output: Record<string, unknown>;
3239
+ latency_ms: number;
3240
+ tokens?: number;
3241
+ error: string | null;
3242
+ };
3243
+ }>;
3244
+ };
3245
+ get intent(): {
3246
+ stats(): Promise<{
3247
+ data: IntentStats;
3248
+ }>;
3249
+ listKeywords(params?: {
3250
+ page?: number;
3251
+ limit?: number;
3252
+ search?: string;
3253
+ }): Promise<{
3254
+ data: IntentKeyword[];
3255
+ }>;
3256
+ createFromDomain(domain: string): Promise<{
3257
+ data: IntentKeyword;
3258
+ }>;
3259
+ deleteKeyword(keywordId: string): Promise<{
3260
+ data: {
3261
+ deleted: boolean;
3262
+ };
3263
+ }>;
3264
+ keywordCompanies(keywordId: string, params?: {
3265
+ limit?: number;
3266
+ date_from?: string;
3267
+ date_to?: string;
3268
+ }): Promise<{
3269
+ data: IntentCompany[];
3270
+ }>;
3271
+ keywordContacts(keywordId: string, params?: {
3272
+ limit?: number;
3273
+ date_from?: string;
3274
+ date_to?: string;
3275
+ }): Promise<{
3276
+ data: IntentContact[];
3277
+ }>;
3278
+ keywordUrls(keywordId: string, params?: {
3279
+ limit?: number;
3280
+ }): Promise<{
3281
+ data: IntentPage[];
3282
+ }>;
3283
+ pagesByDomain(domain: string, params?: {
3284
+ limit?: number;
3285
+ }): Promise<{
3286
+ data: IntentPage[];
3287
+ }>;
3288
+ searchPages(query: string, params?: {
3289
+ limit?: number;
3290
+ }): Promise<{
3291
+ data: IntentPage[];
3292
+ }>;
3293
+ pageVisitors(pageUrl: string, params?: {
3294
+ limit?: number;
3295
+ date_from?: string;
3296
+ date_to?: string;
3297
+ }): Promise<{
3298
+ data: IntentVisitor[];
3299
+ }>;
3300
+ pageContacts(pageUrl: string, params?: {
3301
+ limit?: number;
3302
+ }): Promise<{
3303
+ data: IntentContact[];
3304
+ }>;
3305
+ pageVisitorCounts(urls: string[]): Promise<{
3306
+ data: Array<{
3307
+ url: string;
3308
+ visitor_count: number;
3309
+ }>;
3310
+ }>;
3311
+ urlCompanies(url: string, params?: {
3312
+ limit?: number;
3313
+ date_from?: string;
3314
+ date_to?: string;
3315
+ }): Promise<{
3316
+ data: IntentCompany[];
3317
+ }>;
3318
+ };
3319
+ get studio(): {
3320
+ globalContext(params?: {
3321
+ category?: string;
3322
+ limit?: number;
3323
+ }): Promise<{
3324
+ data: GlobalContextDocument[];
3325
+ }>;
3326
+ icps(params?: {
3327
+ status?: string;
3328
+ limit?: number;
3329
+ }): Promise<{
3330
+ data: ICP[];
3331
+ }>;
3332
+ personas(params?: {
3333
+ status?: string;
3334
+ limit?: number;
3335
+ }): Promise<{
3336
+ data: Persona[];
3337
+ }>;
3338
+ intelligenceData(params?: {
3339
+ source_type?: string;
3340
+ limit?: number;
3341
+ }): Promise<{
3342
+ data: IntelligenceData[];
3343
+ }>;
3344
+ researchReports(params?: {
3345
+ category?: string;
3346
+ limit?: number;
3347
+ }): Promise<{
3348
+ data: ResearchReport[];
3349
+ }>;
3350
+ };
3351
+ get meetings(): {
3352
+ list(params?: MeetingListParams): Promise<{
3353
+ data: MeetingSummary[];
3354
+ pagination?: {
3355
+ page: number;
3356
+ limit: number;
3357
+ total: number;
3358
+ has_next: boolean;
3359
+ };
3360
+ }>;
3361
+ get(meetingId: string): Promise<MeetingDetail>;
3362
+ };
1314
3363
  get initialized(): boolean;
1315
3364
  _assertInit(): void;
1316
3365
  _assertKey(module: string): void;