@graph8/sdk 0.7.1 → 0.11.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/README.md +21 -44
- package/dist/index.d.mts +224 -179
- package/dist/index.d.ts +224 -179
- package/dist/index.js +149 -193
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +149 -193
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +219 -171
- package/dist/react.d.ts +219 -171
- package/dist/react.js +149 -193
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +149 -193
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.d.ts
CHANGED
|
@@ -436,11 +436,11 @@ interface ResearchReport {
|
|
|
436
436
|
* Requires API key (server-side).
|
|
437
437
|
*
|
|
438
438
|
* Backed by:
|
|
439
|
-
* GET
|
|
440
|
-
* GET /api/v1/icps
|
|
441
|
-
* GET /api/v1/personas
|
|
442
|
-
* GET
|
|
443
|
-
* GET
|
|
439
|
+
* GET /api/v1/global-context/documents
|
|
440
|
+
* GET /api/v1/icps POST /api/v1/icps PATCH /api/v1/icps/{id} POST /api/v1/icps/{id}/archive
|
|
441
|
+
* GET /api/v1/personas POST /api/v1/personas PATCH /api/v1/personas/{id} POST /api/v1/personas/{id}/archive
|
|
442
|
+
* GET /api/v1/intelligence-data
|
|
443
|
+
* GET /api/v1/research-reports
|
|
444
444
|
*/
|
|
445
445
|
declare const createStudioClient: (apiKey: string, apiUrl?: string) => {
|
|
446
446
|
/** Org-level Studio documents (brand_brief, value_props, messaging_house, etc.).
|
|
@@ -481,6 +481,66 @@ declare const createStudioClient: (apiKey: string, apiUrl?: string) => {
|
|
|
481
481
|
}): Promise<{
|
|
482
482
|
data: ResearchReport[];
|
|
483
483
|
}>;
|
|
484
|
+
/** Create an ICP manually (no AI scoring). Requires name + website_url. */
|
|
485
|
+
createIcp(body: {
|
|
486
|
+
name: string;
|
|
487
|
+
website_url: string;
|
|
488
|
+
description?: string;
|
|
489
|
+
firmographics?: Record<string, unknown>;
|
|
490
|
+
tech_stack?: Record<string, unknown>;
|
|
491
|
+
buying_signals?: unknown[];
|
|
492
|
+
estimated_market_size?: number;
|
|
493
|
+
}): Promise<{
|
|
494
|
+
data: ICP;
|
|
495
|
+
}>;
|
|
496
|
+
/** Update an ICP (partial - send only fields to change). */
|
|
497
|
+
updateIcp(icpId: string, body: {
|
|
498
|
+
name?: string;
|
|
499
|
+
description?: string;
|
|
500
|
+
firmographics?: Record<string, unknown>;
|
|
501
|
+
tech_stack?: Record<string, unknown>;
|
|
502
|
+
buying_signals?: unknown[];
|
|
503
|
+
estimated_market_size?: number;
|
|
504
|
+
}): Promise<{
|
|
505
|
+
data: ICP;
|
|
506
|
+
}>;
|
|
507
|
+
/** Archive an ICP (soft delete - sets status to "archived"). */
|
|
508
|
+
archiveIcp(icpId: string): Promise<{
|
|
509
|
+
data: ICP;
|
|
510
|
+
}>;
|
|
511
|
+
/** Create a buyer persona manually (no AI generation). Requires title + website_url. */
|
|
512
|
+
createPersona(body: {
|
|
513
|
+
title: string;
|
|
514
|
+
website_url: string;
|
|
515
|
+
priority?: number;
|
|
516
|
+
confidence?: string;
|
|
517
|
+
why_target?: string;
|
|
518
|
+
key_signals?: unknown[];
|
|
519
|
+
expected_receptivity?: string;
|
|
520
|
+
campaign_approach?: string;
|
|
521
|
+
recommended_goal?: string;
|
|
522
|
+
source?: string;
|
|
523
|
+
}): Promise<{
|
|
524
|
+
data: Persona;
|
|
525
|
+
}>;
|
|
526
|
+
/** Update a persona (partial). Passing status "archived" is equivalent to archivePersona. */
|
|
527
|
+
updatePersona(personaId: string, body: {
|
|
528
|
+
title?: string;
|
|
529
|
+
priority?: number;
|
|
530
|
+
confidence?: string;
|
|
531
|
+
why_target?: string;
|
|
532
|
+
key_signals?: unknown[];
|
|
533
|
+
expected_receptivity?: string;
|
|
534
|
+
campaign_approach?: string;
|
|
535
|
+
recommended_goal?: string;
|
|
536
|
+
status?: string;
|
|
537
|
+
}): Promise<{
|
|
538
|
+
data: Persona;
|
|
539
|
+
}>;
|
|
540
|
+
/** Archive a persona (soft delete - sets status to "archived"). */
|
|
541
|
+
archivePersona(personaId: string): Promise<{
|
|
542
|
+
data: Persona;
|
|
543
|
+
}>;
|
|
484
544
|
};
|
|
485
545
|
|
|
486
546
|
interface IntentKeyword {
|
|
@@ -1479,7 +1539,20 @@ interface Deal {
|
|
|
1479
1539
|
}
|
|
1480
1540
|
interface DealCreateParams {
|
|
1481
1541
|
name: string;
|
|
1482
|
-
/**
|
|
1542
|
+
/**
|
|
1543
|
+
* Deal owner (user id or email). Required.
|
|
1544
|
+
*/
|
|
1545
|
+
owner_id: string;
|
|
1546
|
+
/**
|
|
1547
|
+
* mashup_contact_ids to attach. Required, at least one. Every contact must
|
|
1548
|
+
* belong to the same company, and that company becomes the deal's company.
|
|
1549
|
+
* Same id space as the contacts API. Attach is idempotent.
|
|
1550
|
+
*/
|
|
1551
|
+
contact_ids: number[];
|
|
1552
|
+
/**
|
|
1553
|
+
* Deprecated: the company is derived from `contact_ids`. If supplied it must
|
|
1554
|
+
* match the contacts' company, otherwise omit it.
|
|
1555
|
+
*/
|
|
1483
1556
|
company_id?: number;
|
|
1484
1557
|
description?: string;
|
|
1485
1558
|
amount?: number;
|
|
@@ -1491,6 +1564,11 @@ interface DealCreateParams {
|
|
|
1491
1564
|
pipeline_id?: string;
|
|
1492
1565
|
/** ISO 8601 close date. */
|
|
1493
1566
|
close_date?: string;
|
|
1567
|
+
/**
|
|
1568
|
+
* Set true to create a deal even if one already exists for the company.
|
|
1569
|
+
* By default the API rejects a duplicate with HTTP 409.
|
|
1570
|
+
*/
|
|
1571
|
+
allow_duplicate?: boolean;
|
|
1494
1572
|
}
|
|
1495
1573
|
interface DealUpdateParams {
|
|
1496
1574
|
name?: string;
|
|
@@ -1500,6 +1578,16 @@ interface DealUpdateParams {
|
|
|
1500
1578
|
stage_id?: string;
|
|
1501
1579
|
/** ISO 8601 close date. */
|
|
1502
1580
|
close_date?: string;
|
|
1581
|
+
/** Reassign the deal owner (user id or email). Pass null to clear. */
|
|
1582
|
+
owner_id?: string | null;
|
|
1583
|
+
/**
|
|
1584
|
+
* mashup_contact_ids to link. Must belong to the deal's company (if the deal
|
|
1585
|
+
* has none yet, the added contacts' company is adopted); a cross-company add
|
|
1586
|
+
* is rejected. Idempotent.
|
|
1587
|
+
*/
|
|
1588
|
+
add_contact_ids?: number[];
|
|
1589
|
+
/** mashup_contact_ids to unlink. Idempotent. */
|
|
1590
|
+
remove_contact_ids?: number[];
|
|
1503
1591
|
}
|
|
1504
1592
|
interface DealListParams {
|
|
1505
1593
|
page?: number;
|
|
@@ -2061,7 +2149,7 @@ declare const createContactsClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2061
2149
|
* adds events. ``WebhookEvent`` also accepts any string so a newly-added
|
|
2062
2150
|
* backend event never breaks a client that hasn't upgraded.
|
|
2063
2151
|
*/
|
|
2064
|
-
declare const KNOWN_WEBHOOK_EVENTS: readonly ["campaign.created", "campaign.updated", "campaign.deleted", "campaign.launched", "campaign.paused", "campaign.completed", "campaign.status_changed", "campaign.content_ready", "document.generated", "document.failed", "intelligence.completed", "intelligence.failed", "company.enriched", "company_intelligence.completed", "audience.ready", "audience.failed", "sequence.
|
|
2152
|
+
declare const KNOWN_WEBHOOK_EVENTS: readonly ["campaign.created", "campaign.updated", "campaign.deleted", "campaign.launched", "campaign.paused", "campaign.completed", "campaign.status_changed", "campaign.content_ready", "document.generated", "document.failed", "intelligence.completed", "intelligence.failed", "company.enriched", "company_intelligence.completed", "audience.ready", "audience.failed", "sequence.draft_created", "sequence.started", "sequence.paused", "sequence.completed", "engagement.email_sent", "engagement.email_replied", "engagement.email_bounced", "engagement.email_skipped", "engagement.call_dispatched", "engagement.sms_sent", "engagement.sms_replied", "engagement.whatsapp_sent", "engagement.linkedin_connection_sent", "engagement.linkedin_message_sent", "engagement.linkedin_inmail_sent", "engagement.linkedin_reply_received", "engagement.linkedin_connection_accepted", "meeting.booked", "meeting.cancelled", "meeting.rescheduled"];
|
|
2065
2153
|
type WebhookEvent = (typeof KNOWN_WEBHOOK_EVENTS)[number] | (string & {});
|
|
2066
2154
|
/** The decoded body graph8 delivers to a webhook endpoint. */
|
|
2067
2155
|
interface WebhookEventPayload {
|
|
@@ -2088,56 +2176,11 @@ declare const createWebhooksClient: (_apiKey: string, apiUrl?: string) => {
|
|
|
2088
2176
|
/** Base URL the webhook subscription API lives under. */
|
|
2089
2177
|
baseUrl: string;
|
|
2090
2178
|
/** Known event types (for autocomplete / validation). */
|
|
2091
|
-
knownEvents: readonly ["campaign.created", "campaign.updated", "campaign.deleted", "campaign.launched", "campaign.paused", "campaign.completed", "campaign.status_changed", "campaign.content_ready", "document.generated", "document.failed", "intelligence.completed", "intelligence.failed", "company.enriched", "company_intelligence.completed", "audience.ready", "audience.failed", "sequence.
|
|
2179
|
+
knownEvents: readonly ["campaign.created", "campaign.updated", "campaign.deleted", "campaign.launched", "campaign.paused", "campaign.completed", "campaign.status_changed", "campaign.content_ready", "document.generated", "document.failed", "intelligence.completed", "intelligence.failed", "company.enriched", "company_intelligence.completed", "audience.ready", "audience.failed", "sequence.draft_created", "sequence.started", "sequence.paused", "sequence.completed", "engagement.email_sent", "engagement.email_replied", "engagement.email_bounced", "engagement.email_skipped", "engagement.call_dispatched", "engagement.sms_sent", "engagement.sms_replied", "engagement.whatsapp_sent", "engagement.linkedin_connection_sent", "engagement.linkedin_message_sent", "engagement.linkedin_inmail_sent", "engagement.linkedin_reply_received", "engagement.linkedin_connection_accepted", "meeting.booked", "meeting.cancelled", "meeting.rescheduled"];
|
|
2092
2180
|
/** Verify an incoming webhook's HMAC signature and return the parsed event. */
|
|
2093
2181
|
constructEvent(payload: string, signature: string, timestamp: string | number, secret: string, opts?: ConstructEventOptions): WebhookEventPayload;
|
|
2094
2182
|
};
|
|
2095
2183
|
|
|
2096
|
-
interface LandingPage {
|
|
2097
|
-
id: string;
|
|
2098
|
-
title: string;
|
|
2099
|
-
slug: string;
|
|
2100
|
-
status: string;
|
|
2101
|
-
published_url: string | null;
|
|
2102
|
-
}
|
|
2103
|
-
/**
|
|
2104
|
-
* Landing pages - clone, create, publish. Requires API key (server-side). On the
|
|
2105
|
-
* hardened HTTP core: throws a typed `G8Error` on failure and retries transient
|
|
2106
|
-
* errors.
|
|
2107
|
-
*/
|
|
2108
|
-
declare const createPagesClient: (apiKey: string, apiUrl?: string) => {
|
|
2109
|
-
/** Clone a landing page from any URL. */
|
|
2110
|
-
clone(url: string): Promise<LandingPage>;
|
|
2111
|
-
/** Create a landing page from a template. */
|
|
2112
|
-
create(config: {
|
|
2113
|
-
template?: string;
|
|
2114
|
-
title?: string;
|
|
2115
|
-
content?: Record<string, unknown>;
|
|
2116
|
-
}): Promise<LandingPage>;
|
|
2117
|
-
/** Publish a landing page to CDN. */
|
|
2118
|
-
publish(pageId: string): Promise<{
|
|
2119
|
-
url: string;
|
|
2120
|
-
}>;
|
|
2121
|
-
};
|
|
2122
|
-
|
|
2123
|
-
interface VoiceSession {
|
|
2124
|
-
id: string;
|
|
2125
|
-
status: string;
|
|
2126
|
-
agent: string;
|
|
2127
|
-
started_at: string;
|
|
2128
|
-
}
|
|
2129
|
-
interface CallAnalysis {
|
|
2130
|
-
duration_seconds: number;
|
|
2131
|
-
sentiment: "positive" | "neutral" | "negative";
|
|
2132
|
-
summary: string;
|
|
2133
|
-
next_steps: string[];
|
|
2134
|
-
objections: string[];
|
|
2135
|
-
transcript: Array<{
|
|
2136
|
-
speaker: string;
|
|
2137
|
-
text: string;
|
|
2138
|
-
timestamp: number;
|
|
2139
|
-
}>;
|
|
2140
|
-
}
|
|
2141
2184
|
type VoiceEvent = "connected" | "transcription" | "ended" | "error";
|
|
2142
2185
|
type VoiceCallback = (data: Record<string, unknown>) => void;
|
|
2143
2186
|
interface VoicePagination {
|
|
@@ -2369,20 +2412,6 @@ interface DialerSessionResumeResult extends DialerSessionStatusUpdateResult {
|
|
|
2369
2412
|
* GET /api/v1/voice/dialer/agents
|
|
2370
2413
|
*/
|
|
2371
2414
|
declare const createVoiceClient: (apiKey: string, apiUrl?: string) => {
|
|
2372
|
-
/**
|
|
2373
|
-
* Start an AI voice session.
|
|
2374
|
-
* @deprecated Preview surface — for parallel-dialer flows use `voice.dialer.createSession()`.
|
|
2375
|
-
*/
|
|
2376
|
-
start(config: {
|
|
2377
|
-
agent?: string;
|
|
2378
|
-
contactId?: number;
|
|
2379
|
-
context?: Record<string, unknown>;
|
|
2380
|
-
}): Promise<VoiceSession>;
|
|
2381
|
-
/**
|
|
2382
|
-
* Get call analysis for a completed session.
|
|
2383
|
-
* @deprecated Preview surface — for dialer-call grading use `voice.dialer.callGrading(roomName)`.
|
|
2384
|
-
*/
|
|
2385
|
-
analysis(sessionId: string): Promise<CallAnalysis>;
|
|
2386
2415
|
/** Listen for voice events. */
|
|
2387
2416
|
on(event: VoiceEvent, callback: VoiceCallback): void;
|
|
2388
2417
|
/** Parallel-dialer session control + analytics. */
|
|
@@ -2450,31 +2479,6 @@ declare const createVoiceClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2450
2479
|
};
|
|
2451
2480
|
};
|
|
2452
2481
|
|
|
2453
|
-
interface AnalyticsOverview {
|
|
2454
|
-
visitors: number;
|
|
2455
|
-
contacts_created: number;
|
|
2456
|
-
emails_sent: number;
|
|
2457
|
-
emails_opened: number;
|
|
2458
|
-
replies: number;
|
|
2459
|
-
meetings_booked: number;
|
|
2460
|
-
period: string;
|
|
2461
|
-
}
|
|
2462
|
-
/**
|
|
2463
|
-
* Analytics - dashboard data and metrics. Requires API key (server-side).
|
|
2464
|
-
*
|
|
2465
|
-
* On the hardened HTTP core: throws a typed `G8Error` on failure and retries
|
|
2466
|
-
* transient errors. Note the deliberate behavior change vs the preview client —
|
|
2467
|
-
* a non-2xx response now **throws** instead of silently returning an all-zeros
|
|
2468
|
-
* overview, so callers can distinguish genuinely-zero activity from an auth/5xx
|
|
2469
|
-
* failure.
|
|
2470
|
-
*/
|
|
2471
|
-
declare const createAnalyticsClient: (apiKey: string, apiUrl?: string) => {
|
|
2472
|
-
overview(config?: {
|
|
2473
|
-
period?: string;
|
|
2474
|
-
metrics?: string[];
|
|
2475
|
-
}): Promise<AnalyticsOverview>;
|
|
2476
|
-
};
|
|
2477
|
-
|
|
2478
2482
|
interface IntentSignals {
|
|
2479
2483
|
domain: string;
|
|
2480
2484
|
score: number;
|
|
@@ -2492,25 +2496,6 @@ declare const createSignalsClient: (key: string, isApiKey: boolean, apiUrl?: str
|
|
|
2492
2496
|
stream(domains: string[], callback: (signals: IntentSignals[]) => void): () => void;
|
|
2493
2497
|
};
|
|
2494
2498
|
|
|
2495
|
-
interface Integration {
|
|
2496
|
-
id: string;
|
|
2497
|
-
provider: string;
|
|
2498
|
-
status: string;
|
|
2499
|
-
connected_at: string | null;
|
|
2500
|
-
}
|
|
2501
|
-
/**
|
|
2502
|
-
* Integrations - connect CRM platforms, trigger syncs. Requires API key
|
|
2503
|
-
* (server-side). On the hardened HTTP core: throws a typed `G8Error` on failure
|
|
2504
|
-
* and retries transient errors.
|
|
2505
|
-
*/
|
|
2506
|
-
declare const createIntegrationsClient: (apiKey: string, apiUrl?: string) => {
|
|
2507
|
-
list(): Promise<Integration[]>;
|
|
2508
|
-
connect(provider: string, config?: Record<string, unknown>): Promise<void>;
|
|
2509
|
-
sync(provider: string, config?: {
|
|
2510
|
-
direction?: "inbound" | "outbound" | "bidirectional";
|
|
2511
|
-
}): Promise<void>;
|
|
2512
|
-
};
|
|
2513
|
-
|
|
2514
2499
|
interface Campaign {
|
|
2515
2500
|
id: string;
|
|
2516
2501
|
name: string;
|
|
@@ -2529,11 +2514,37 @@ interface CampaignCreateConfig {
|
|
|
2529
2514
|
target_persona?: string;
|
|
2530
2515
|
goal?: string;
|
|
2531
2516
|
}
|
|
2532
|
-
interface
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2517
|
+
interface CampaignLaunchExecution {
|
|
2518
|
+
status: string;
|
|
2519
|
+
contacts_total?: number;
|
|
2520
|
+
contacts_scheduled?: number;
|
|
2521
|
+
contacts_queued?: number;
|
|
2522
|
+
job_id?: string;
|
|
2523
|
+
polling_url?: string;
|
|
2524
|
+
orchestrator_version?: string;
|
|
2525
|
+
}
|
|
2526
|
+
interface CampaignLaunchResult {
|
|
2527
|
+
status: string;
|
|
2528
|
+
campaign_id: string;
|
|
2529
|
+
sequence_id: string;
|
|
2530
|
+
sequence_name: string;
|
|
2531
|
+
steps_created: number;
|
|
2532
|
+
link_id: string;
|
|
2533
|
+
warnings: string[];
|
|
2534
|
+
channels_attached: Array<{
|
|
2535
|
+
mailbox_id: number;
|
|
2536
|
+
email: string;
|
|
2537
|
+
channel_type: string;
|
|
2538
|
+
auto_picked: boolean;
|
|
2539
|
+
}>;
|
|
2540
|
+
agent_assigned: {
|
|
2541
|
+
textual_agent_name: string | null;
|
|
2542
|
+
voice_agent_name: string | null;
|
|
2543
|
+
};
|
|
2544
|
+
schedule_id: string | null;
|
|
2545
|
+
appointment_id: number | null;
|
|
2546
|
+
execution: CampaignLaunchExecution;
|
|
2547
|
+
message: string;
|
|
2537
2548
|
}
|
|
2538
2549
|
/**
|
|
2539
2550
|
* Campaigns - create, manage, launch campaigns. Requires API key (server-side).
|
|
@@ -2544,8 +2555,7 @@ declare const createCampaignsClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2544
2555
|
list(page?: number, limit?: number): Promise<Campaign[]>;
|
|
2545
2556
|
get(campaignId: string): Promise<Campaign>;
|
|
2546
2557
|
create(config: CampaignCreateConfig): Promise<Campaign>;
|
|
2547
|
-
launch(campaignId: string): Promise<
|
|
2548
|
-
stats(campaignId: string): Promise<CampaignStats>;
|
|
2558
|
+
launch(campaignId: string): Promise<CampaignLaunchResult>;
|
|
2549
2559
|
};
|
|
2550
2560
|
|
|
2551
2561
|
interface AddToSequenceConfig {
|
|
@@ -2757,22 +2767,40 @@ declare const createSequencesClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2757
2767
|
data: SequenceContactItem[];
|
|
2758
2768
|
pagination?: PaginationMeta;
|
|
2759
2769
|
}>;
|
|
2760
|
-
/**
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2770
|
+
/**
|
|
2771
|
+
* Add contacts to a sequence (V2 queuing). Live or drafted sequences only.
|
|
2772
|
+
* Pass `idempotencyKey` to make a retry safe — the same key returns the
|
|
2773
|
+
* first result instead of re-enrolling on a 5xx-then-success (A6).
|
|
2774
|
+
*/
|
|
2775
|
+
add(config: AddToSequenceConfig, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2776
|
+
/**
|
|
2777
|
+
* Create a new sequence with optional steps + channels. Pass `idempotencyKey`
|
|
2778
|
+
* to make a retry safe — the same key returns the first result instead of
|
|
2779
|
+
* creating a duplicate sequence on a 5xx-then-success (A6).
|
|
2780
|
+
*/
|
|
2781
|
+
create(payload: SequenceCreateParams, idempotencyKey?: string): Promise<SequenceCreateResult>;
|
|
2764
2782
|
/** Update sequence metadata. Rejected (409) if sequence is in a transitional status. */
|
|
2765
2783
|
update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
|
|
2766
2784
|
/** Update a single step within a sequence. */
|
|
2767
2785
|
updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
|
|
2768
2786
|
/** Soft-delete (archive) a sequence. */
|
|
2769
2787
|
delete(sequenceId: string): Promise<SequenceActionResult>;
|
|
2770
|
-
/**
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2788
|
+
/**
|
|
2789
|
+
* Run/start a DRAFTED sequence (V2 orchestration). Pass `idempotencyKey` to
|
|
2790
|
+
* make a retry safe — the same key won't re-trigger the run on a
|
|
2791
|
+
* 5xx-then-success (A6).
|
|
2792
|
+
*/
|
|
2793
|
+
run(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2794
|
+
/**
|
|
2795
|
+
* Pause a live sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
2796
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
2797
|
+
*/
|
|
2798
|
+
pause(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2799
|
+
/**
|
|
2800
|
+
* Resume a paused sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
2801
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
2802
|
+
*/
|
|
2803
|
+
resume(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2776
2804
|
/** Read-only sequence preview with all steps + channels (no enrollment). */
|
|
2777
2805
|
preview(sequenceId: string): Promise<SequencePreview>;
|
|
2778
2806
|
/** Comprehensive analytics for a sequence. */
|
|
@@ -2827,7 +2855,7 @@ declare const createEnrichClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2827
2855
|
}): Promise<CompanyEnrichment>;
|
|
2828
2856
|
/** Verify an email address. Costs 1 credit. */
|
|
2829
2857
|
verifyEmail(email: string): Promise<EmailVerification>;
|
|
2830
|
-
/** Search
|
|
2858
|
+
/** Search 700M+ contacts with filters. Credits charged per result. */
|
|
2831
2859
|
search(filters: SearchFilter[], page?: number, limit?: number): Promise<SearchResults>;
|
|
2832
2860
|
};
|
|
2833
2861
|
|
|
@@ -3056,7 +3084,7 @@ interface G8ProviderProps {
|
|
|
3056
3084
|
* graph8 React provider. Initializes the SDK once and provides it to all children.
|
|
3057
3085
|
*
|
|
3058
3086
|
* Usage:
|
|
3059
|
-
* import { G8Provider } from '@graph8/
|
|
3087
|
+
* import { G8Provider } from '@graph8/sdk/react';
|
|
3060
3088
|
*
|
|
3061
3089
|
* <G8Provider writeKey="your_write_key">
|
|
3062
3090
|
* <App />
|
|
@@ -3095,11 +3123,8 @@ declare const useG8: () => {
|
|
|
3095
3123
|
_enrich: ReturnType<typeof createEnrichClient> | null;
|
|
3096
3124
|
_sequences: ReturnType<typeof createSequencesClient> | null;
|
|
3097
3125
|
_campaigns: ReturnType<typeof createCampaignsClient> | null;
|
|
3098
|
-
_integrations: ReturnType<typeof createIntegrationsClient> | null;
|
|
3099
3126
|
_signals: ReturnType<typeof createSignalsClient> | null;
|
|
3100
|
-
_analytics: ReturnType<typeof createAnalyticsClient> | null;
|
|
3101
3127
|
_voice: ReturnType<typeof createVoiceClient> | null;
|
|
3102
|
-
_pages: ReturnType<typeof createPagesClient> | null;
|
|
3103
3128
|
_webhooks: ReturnType<typeof createWebhooksClient> | null;
|
|
3104
3129
|
_contacts: ReturnType<typeof createContactsClient> | null;
|
|
3105
3130
|
_companies: ReturnType<typeof createCompaniesClient> | null;
|
|
@@ -3184,14 +3209,14 @@ declare const useG8: () => {
|
|
|
3184
3209
|
data: SequenceContactItem[];
|
|
3185
3210
|
pagination?: PaginationMeta;
|
|
3186
3211
|
}>;
|
|
3187
|
-
add(config: AddToSequenceConfig): Promise<SequenceActionResult>;
|
|
3188
|
-
create(payload: SequenceCreateParams): Promise<SequenceCreateResult>;
|
|
3212
|
+
add(config: AddToSequenceConfig, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3213
|
+
create(payload: SequenceCreateParams, idempotencyKey?: string): Promise<SequenceCreateResult>;
|
|
3189
3214
|
update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
|
|
3190
3215
|
updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
|
|
3191
3216
|
delete(sequenceId: string): Promise<SequenceActionResult>;
|
|
3192
|
-
run(sequenceId: string): Promise<SequenceActionResult>;
|
|
3193
|
-
pause(sequenceId: string): Promise<SequenceActionResult>;
|
|
3194
|
-
resume(sequenceId: string): Promise<SequenceActionResult>;
|
|
3217
|
+
run(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3218
|
+
pause(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3219
|
+
resume(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3195
3220
|
preview(sequenceId: string): Promise<SequencePreview>;
|
|
3196
3221
|
analytics(sequenceId: string): Promise<SequenceAnalytics>;
|
|
3197
3222
|
};
|
|
@@ -3199,33 +3224,13 @@ declare const useG8: () => {
|
|
|
3199
3224
|
list(page?: number, limit?: number): Promise<Campaign[]>;
|
|
3200
3225
|
get(campaignId: string): Promise<Campaign>;
|
|
3201
3226
|
create(config: CampaignCreateConfig): Promise<Campaign>;
|
|
3202
|
-
launch(campaignId: string): Promise<
|
|
3203
|
-
stats(campaignId: string): Promise<CampaignStats>;
|
|
3204
|
-
};
|
|
3205
|
-
get integrations(): {
|
|
3206
|
-
list(): Promise<Integration[]>;
|
|
3207
|
-
connect(provider: string, config?: Record<string, unknown>): Promise<void>;
|
|
3208
|
-
sync(provider: string, config?: {
|
|
3209
|
-
direction?: "inbound" | "outbound" | "bidirectional";
|
|
3210
|
-
}): Promise<void>;
|
|
3227
|
+
launch(campaignId: string): Promise<CampaignLaunchResult>;
|
|
3211
3228
|
};
|
|
3212
3229
|
get signals(): {
|
|
3213
3230
|
company(domain: string): Promise<IntentSignals>;
|
|
3214
3231
|
stream(domains: string[], callback: (signals: IntentSignals[]) => void): () => void;
|
|
3215
3232
|
};
|
|
3216
|
-
get analytics(): {
|
|
3217
|
-
overview(config?: {
|
|
3218
|
-
period?: string;
|
|
3219
|
-
metrics?: string[];
|
|
3220
|
-
}): Promise<AnalyticsOverview>;
|
|
3221
|
-
};
|
|
3222
3233
|
get voice(): {
|
|
3223
|
-
start(config: {
|
|
3224
|
-
agent?: string;
|
|
3225
|
-
contactId?: number;
|
|
3226
|
-
context?: Record<string, unknown>;
|
|
3227
|
-
}): Promise<VoiceSession>;
|
|
3228
|
-
analysis(sessionId: string): Promise<CallAnalysis>;
|
|
3229
3234
|
on(event: "error" | "ended" | "connected" | "transcription", callback: (data: Record<string, unknown>) => void): void;
|
|
3230
3235
|
dialer: {
|
|
3231
3236
|
listSessions(params?: DialerSessionsListParams): Promise<DialerSessionsListResult>;
|
|
@@ -3273,20 +3278,9 @@ declare const useG8: () => {
|
|
|
3273
3278
|
}>;
|
|
3274
3279
|
};
|
|
3275
3280
|
};
|
|
3276
|
-
get pages(): {
|
|
3277
|
-
clone(url: string): Promise<LandingPage>;
|
|
3278
|
-
create(config: {
|
|
3279
|
-
template?: string;
|
|
3280
|
-
title?: string;
|
|
3281
|
-
content?: Record<string, unknown>;
|
|
3282
|
-
}): Promise<LandingPage>;
|
|
3283
|
-
publish(pageId: string): Promise<{
|
|
3284
|
-
url: string;
|
|
3285
|
-
}>;
|
|
3286
|
-
};
|
|
3287
3281
|
get webhooks(): {
|
|
3288
3282
|
baseUrl: string;
|
|
3289
|
-
knownEvents: readonly ["campaign.created", "campaign.updated", "campaign.deleted", "campaign.launched", "campaign.paused", "campaign.completed", "campaign.status_changed", "campaign.content_ready", "document.generated", "document.failed", "intelligence.completed", "intelligence.failed", "company.enriched", "company_intelligence.completed", "audience.ready", "audience.failed", "sequence.
|
|
3283
|
+
knownEvents: readonly ["campaign.created", "campaign.updated", "campaign.deleted", "campaign.launched", "campaign.paused", "campaign.completed", "campaign.status_changed", "campaign.content_ready", "document.generated", "document.failed", "intelligence.completed", "intelligence.failed", "company.enriched", "company_intelligence.completed", "audience.ready", "audience.failed", "sequence.draft_created", "sequence.started", "sequence.paused", "sequence.completed", "engagement.email_sent", "engagement.email_replied", "engagement.email_bounced", "engagement.email_skipped", "engagement.call_dispatched", "engagement.sms_sent", "engagement.sms_replied", "engagement.whatsapp_sent", "engagement.linkedin_connection_sent", "engagement.linkedin_message_sent", "engagement.linkedin_inmail_sent", "engagement.linkedin_reply_received", "engagement.linkedin_connection_accepted", "meeting.booked", "meeting.cancelled", "meeting.rescheduled"];
|
|
3290
3284
|
constructEvent(payload: string, signature: string, timestamp: string | number, secret: string, opts?: ConstructEventOptions): WebhookEventPayload;
|
|
3291
3285
|
};
|
|
3292
3286
|
get contacts(): {
|
|
@@ -3763,6 +3757,60 @@ declare const useG8: () => {
|
|
|
3763
3757
|
}): Promise<{
|
|
3764
3758
|
data: ResearchReport[];
|
|
3765
3759
|
}>;
|
|
3760
|
+
createIcp(body: {
|
|
3761
|
+
name: string;
|
|
3762
|
+
website_url: string;
|
|
3763
|
+
description?: string;
|
|
3764
|
+
firmographics?: Record<string, unknown>;
|
|
3765
|
+
tech_stack?: Record<string, unknown>;
|
|
3766
|
+
buying_signals?: unknown[];
|
|
3767
|
+
estimated_market_size?: number;
|
|
3768
|
+
}): Promise<{
|
|
3769
|
+
data: ICP;
|
|
3770
|
+
}>;
|
|
3771
|
+
updateIcp(icpId: string, body: {
|
|
3772
|
+
name?: string;
|
|
3773
|
+
description?: string;
|
|
3774
|
+
firmographics?: Record<string, unknown>;
|
|
3775
|
+
tech_stack?: Record<string, unknown>;
|
|
3776
|
+
buying_signals?: unknown[];
|
|
3777
|
+
estimated_market_size?: number;
|
|
3778
|
+
}): Promise<{
|
|
3779
|
+
data: ICP;
|
|
3780
|
+
}>;
|
|
3781
|
+
archiveIcp(icpId: string): Promise<{
|
|
3782
|
+
data: ICP;
|
|
3783
|
+
}>;
|
|
3784
|
+
createPersona(body: {
|
|
3785
|
+
title: string;
|
|
3786
|
+
website_url: string;
|
|
3787
|
+
priority?: number;
|
|
3788
|
+
confidence?: string;
|
|
3789
|
+
why_target?: string;
|
|
3790
|
+
key_signals?: unknown[];
|
|
3791
|
+
expected_receptivity?: string;
|
|
3792
|
+
campaign_approach?: string;
|
|
3793
|
+
recommended_goal?: string;
|
|
3794
|
+
source?: string;
|
|
3795
|
+
}): Promise<{
|
|
3796
|
+
data: Persona;
|
|
3797
|
+
}>;
|
|
3798
|
+
updatePersona(personaId: string, body: {
|
|
3799
|
+
title?: string;
|
|
3800
|
+
priority?: number;
|
|
3801
|
+
confidence?: string;
|
|
3802
|
+
why_target?: string;
|
|
3803
|
+
key_signals?: unknown[];
|
|
3804
|
+
expected_receptivity?: string;
|
|
3805
|
+
campaign_approach?: string;
|
|
3806
|
+
recommended_goal?: string;
|
|
3807
|
+
status?: string;
|
|
3808
|
+
}): Promise<{
|
|
3809
|
+
data: Persona;
|
|
3810
|
+
}>;
|
|
3811
|
+
archivePersona(personaId: string): Promise<{
|
|
3812
|
+
data: Persona;
|
|
3813
|
+
}>;
|
|
3766
3814
|
};
|
|
3767
3815
|
get meetings(): {
|
|
3768
3816
|
list(params?: MeetingListParams): Promise<{
|