@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/index.d.mts
CHANGED
|
@@ -434,11 +434,11 @@ interface ResearchReport {
|
|
|
434
434
|
* Requires API key (server-side).
|
|
435
435
|
*
|
|
436
436
|
* Backed by:
|
|
437
|
-
* GET
|
|
438
|
-
* GET /api/v1/icps
|
|
439
|
-
* GET /api/v1/personas
|
|
440
|
-
* GET
|
|
441
|
-
* GET
|
|
437
|
+
* GET /api/v1/global-context/documents
|
|
438
|
+
* GET /api/v1/icps POST /api/v1/icps PATCH /api/v1/icps/{id} POST /api/v1/icps/{id}/archive
|
|
439
|
+
* GET /api/v1/personas POST /api/v1/personas PATCH /api/v1/personas/{id} POST /api/v1/personas/{id}/archive
|
|
440
|
+
* GET /api/v1/intelligence-data
|
|
441
|
+
* GET /api/v1/research-reports
|
|
442
442
|
*/
|
|
443
443
|
declare const createStudioClient: (apiKey: string, apiUrl?: string) => {
|
|
444
444
|
/** Org-level Studio documents (brand_brief, value_props, messaging_house, etc.).
|
|
@@ -479,6 +479,66 @@ declare const createStudioClient: (apiKey: string, apiUrl?: string) => {
|
|
|
479
479
|
}): Promise<{
|
|
480
480
|
data: ResearchReport[];
|
|
481
481
|
}>;
|
|
482
|
+
/** Create an ICP manually (no AI scoring). Requires name + website_url. */
|
|
483
|
+
createIcp(body: {
|
|
484
|
+
name: string;
|
|
485
|
+
website_url: string;
|
|
486
|
+
description?: string;
|
|
487
|
+
firmographics?: Record<string, unknown>;
|
|
488
|
+
tech_stack?: Record<string, unknown>;
|
|
489
|
+
buying_signals?: unknown[];
|
|
490
|
+
estimated_market_size?: number;
|
|
491
|
+
}): Promise<{
|
|
492
|
+
data: ICP;
|
|
493
|
+
}>;
|
|
494
|
+
/** Update an ICP (partial - send only fields to change). */
|
|
495
|
+
updateIcp(icpId: string, body: {
|
|
496
|
+
name?: string;
|
|
497
|
+
description?: string;
|
|
498
|
+
firmographics?: Record<string, unknown>;
|
|
499
|
+
tech_stack?: Record<string, unknown>;
|
|
500
|
+
buying_signals?: unknown[];
|
|
501
|
+
estimated_market_size?: number;
|
|
502
|
+
}): Promise<{
|
|
503
|
+
data: ICP;
|
|
504
|
+
}>;
|
|
505
|
+
/** Archive an ICP (soft delete - sets status to "archived"). */
|
|
506
|
+
archiveIcp(icpId: string): Promise<{
|
|
507
|
+
data: ICP;
|
|
508
|
+
}>;
|
|
509
|
+
/** Create a buyer persona manually (no AI generation). Requires title + website_url. */
|
|
510
|
+
createPersona(body: {
|
|
511
|
+
title: string;
|
|
512
|
+
website_url: string;
|
|
513
|
+
priority?: number;
|
|
514
|
+
confidence?: string;
|
|
515
|
+
why_target?: string;
|
|
516
|
+
key_signals?: unknown[];
|
|
517
|
+
expected_receptivity?: string;
|
|
518
|
+
campaign_approach?: string;
|
|
519
|
+
recommended_goal?: string;
|
|
520
|
+
source?: string;
|
|
521
|
+
}): Promise<{
|
|
522
|
+
data: Persona;
|
|
523
|
+
}>;
|
|
524
|
+
/** Update a persona (partial). Passing status "archived" is equivalent to archivePersona. */
|
|
525
|
+
updatePersona(personaId: string, body: {
|
|
526
|
+
title?: string;
|
|
527
|
+
priority?: number;
|
|
528
|
+
confidence?: string;
|
|
529
|
+
why_target?: string;
|
|
530
|
+
key_signals?: unknown[];
|
|
531
|
+
expected_receptivity?: string;
|
|
532
|
+
campaign_approach?: string;
|
|
533
|
+
recommended_goal?: string;
|
|
534
|
+
status?: string;
|
|
535
|
+
}): Promise<{
|
|
536
|
+
data: Persona;
|
|
537
|
+
}>;
|
|
538
|
+
/** Archive a persona (soft delete - sets status to "archived"). */
|
|
539
|
+
archivePersona(personaId: string): Promise<{
|
|
540
|
+
data: Persona;
|
|
541
|
+
}>;
|
|
482
542
|
};
|
|
483
543
|
|
|
484
544
|
interface IntentKeyword {
|
|
@@ -1477,7 +1537,20 @@ interface Deal {
|
|
|
1477
1537
|
}
|
|
1478
1538
|
interface DealCreateParams {
|
|
1479
1539
|
name: string;
|
|
1480
|
-
/**
|
|
1540
|
+
/**
|
|
1541
|
+
* Deal owner (user id or email). Required.
|
|
1542
|
+
*/
|
|
1543
|
+
owner_id: string;
|
|
1544
|
+
/**
|
|
1545
|
+
* mashup_contact_ids to attach. Required, at least one. Every contact must
|
|
1546
|
+
* belong to the same company, and that company becomes the deal's company.
|
|
1547
|
+
* Same id space as the contacts API. Attach is idempotent.
|
|
1548
|
+
*/
|
|
1549
|
+
contact_ids: number[];
|
|
1550
|
+
/**
|
|
1551
|
+
* Deprecated: the company is derived from `contact_ids`. If supplied it must
|
|
1552
|
+
* match the contacts' company, otherwise omit it.
|
|
1553
|
+
*/
|
|
1481
1554
|
company_id?: number;
|
|
1482
1555
|
description?: string;
|
|
1483
1556
|
amount?: number;
|
|
@@ -1489,6 +1562,11 @@ interface DealCreateParams {
|
|
|
1489
1562
|
pipeline_id?: string;
|
|
1490
1563
|
/** ISO 8601 close date. */
|
|
1491
1564
|
close_date?: string;
|
|
1565
|
+
/**
|
|
1566
|
+
* Set true to create a deal even if one already exists for the company.
|
|
1567
|
+
* By default the API rejects a duplicate with HTTP 409.
|
|
1568
|
+
*/
|
|
1569
|
+
allow_duplicate?: boolean;
|
|
1492
1570
|
}
|
|
1493
1571
|
interface DealUpdateParams {
|
|
1494
1572
|
name?: string;
|
|
@@ -1498,6 +1576,16 @@ interface DealUpdateParams {
|
|
|
1498
1576
|
stage_id?: string;
|
|
1499
1577
|
/** ISO 8601 close date. */
|
|
1500
1578
|
close_date?: string;
|
|
1579
|
+
/** Reassign the deal owner (user id or email). Pass null to clear. */
|
|
1580
|
+
owner_id?: string | null;
|
|
1581
|
+
/**
|
|
1582
|
+
* mashup_contact_ids to link. Must belong to the deal's company (if the deal
|
|
1583
|
+
* has none yet, the added contacts' company is adopted); a cross-company add
|
|
1584
|
+
* is rejected. Idempotent.
|
|
1585
|
+
*/
|
|
1586
|
+
add_contact_ids?: number[];
|
|
1587
|
+
/** mashup_contact_ids to unlink. Idempotent. */
|
|
1588
|
+
remove_contact_ids?: number[];
|
|
1501
1589
|
}
|
|
1502
1590
|
interface DealListParams {
|
|
1503
1591
|
page?: number;
|
|
@@ -2059,7 +2147,7 @@ declare const createContactsClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2059
2147
|
* adds events. ``WebhookEvent`` also accepts any string so a newly-added
|
|
2060
2148
|
* backend event never breaks a client that hasn't upgraded.
|
|
2061
2149
|
*/
|
|
2062
|
-
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.
|
|
2150
|
+
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"];
|
|
2063
2151
|
type WebhookEvent = (typeof KNOWN_WEBHOOK_EVENTS)[number] | (string & {});
|
|
2064
2152
|
/** The decoded body graph8 delivers to a webhook endpoint. */
|
|
2065
2153
|
interface WebhookEventPayload {
|
|
@@ -2118,56 +2206,11 @@ declare const createWebhooksClient: (_apiKey: string, apiUrl?: string) => {
|
|
|
2118
2206
|
/** Base URL the webhook subscription API lives under. */
|
|
2119
2207
|
baseUrl: string;
|
|
2120
2208
|
/** Known event types (for autocomplete / validation). */
|
|
2121
|
-
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.
|
|
2209
|
+
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"];
|
|
2122
2210
|
/** Verify an incoming webhook's HMAC signature and return the parsed event. */
|
|
2123
2211
|
constructEvent(payload: string, signature: string, timestamp: string | number, secret: string, opts?: ConstructEventOptions): WebhookEventPayload;
|
|
2124
2212
|
};
|
|
2125
2213
|
|
|
2126
|
-
interface LandingPage {
|
|
2127
|
-
id: string;
|
|
2128
|
-
title: string;
|
|
2129
|
-
slug: string;
|
|
2130
|
-
status: string;
|
|
2131
|
-
published_url: string | null;
|
|
2132
|
-
}
|
|
2133
|
-
/**
|
|
2134
|
-
* Landing pages - clone, create, publish. Requires API key (server-side). On the
|
|
2135
|
-
* hardened HTTP core: throws a typed `G8Error` on failure and retries transient
|
|
2136
|
-
* errors.
|
|
2137
|
-
*/
|
|
2138
|
-
declare const createPagesClient: (apiKey: string, apiUrl?: string) => {
|
|
2139
|
-
/** Clone a landing page from any URL. */
|
|
2140
|
-
clone(url: string): Promise<LandingPage>;
|
|
2141
|
-
/** Create a landing page from a template. */
|
|
2142
|
-
create(config: {
|
|
2143
|
-
template?: string;
|
|
2144
|
-
title?: string;
|
|
2145
|
-
content?: Record<string, unknown>;
|
|
2146
|
-
}): Promise<LandingPage>;
|
|
2147
|
-
/** Publish a landing page to CDN. */
|
|
2148
|
-
publish(pageId: string): Promise<{
|
|
2149
|
-
url: string;
|
|
2150
|
-
}>;
|
|
2151
|
-
};
|
|
2152
|
-
|
|
2153
|
-
interface VoiceSession {
|
|
2154
|
-
id: string;
|
|
2155
|
-
status: string;
|
|
2156
|
-
agent: string;
|
|
2157
|
-
started_at: string;
|
|
2158
|
-
}
|
|
2159
|
-
interface CallAnalysis {
|
|
2160
|
-
duration_seconds: number;
|
|
2161
|
-
sentiment: "positive" | "neutral" | "negative";
|
|
2162
|
-
summary: string;
|
|
2163
|
-
next_steps: string[];
|
|
2164
|
-
objections: string[];
|
|
2165
|
-
transcript: Array<{
|
|
2166
|
-
speaker: string;
|
|
2167
|
-
text: string;
|
|
2168
|
-
timestamp: number;
|
|
2169
|
-
}>;
|
|
2170
|
-
}
|
|
2171
2214
|
type VoiceEvent = "connected" | "transcription" | "ended" | "error";
|
|
2172
2215
|
type VoiceCallback = (data: Record<string, unknown>) => void;
|
|
2173
2216
|
interface VoicePagination {
|
|
@@ -2399,20 +2442,6 @@ interface DialerSessionResumeResult extends DialerSessionStatusUpdateResult {
|
|
|
2399
2442
|
* GET /api/v1/voice/dialer/agents
|
|
2400
2443
|
*/
|
|
2401
2444
|
declare const createVoiceClient: (apiKey: string, apiUrl?: string) => {
|
|
2402
|
-
/**
|
|
2403
|
-
* Start an AI voice session.
|
|
2404
|
-
* @deprecated Preview surface — for parallel-dialer flows use `voice.dialer.createSession()`.
|
|
2405
|
-
*/
|
|
2406
|
-
start(config: {
|
|
2407
|
-
agent?: string;
|
|
2408
|
-
contactId?: number;
|
|
2409
|
-
context?: Record<string, unknown>;
|
|
2410
|
-
}): Promise<VoiceSession>;
|
|
2411
|
-
/**
|
|
2412
|
-
* Get call analysis for a completed session.
|
|
2413
|
-
* @deprecated Preview surface — for dialer-call grading use `voice.dialer.callGrading(roomName)`.
|
|
2414
|
-
*/
|
|
2415
|
-
analysis(sessionId: string): Promise<CallAnalysis>;
|
|
2416
2445
|
/** Listen for voice events. */
|
|
2417
2446
|
on(event: VoiceEvent, callback: VoiceCallback): void;
|
|
2418
2447
|
/** Parallel-dialer session control + analytics. */
|
|
@@ -2480,31 +2509,6 @@ declare const createVoiceClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2480
2509
|
};
|
|
2481
2510
|
};
|
|
2482
2511
|
|
|
2483
|
-
interface AnalyticsOverview {
|
|
2484
|
-
visitors: number;
|
|
2485
|
-
contacts_created: number;
|
|
2486
|
-
emails_sent: number;
|
|
2487
|
-
emails_opened: number;
|
|
2488
|
-
replies: number;
|
|
2489
|
-
meetings_booked: number;
|
|
2490
|
-
period: string;
|
|
2491
|
-
}
|
|
2492
|
-
/**
|
|
2493
|
-
* Analytics - dashboard data and metrics. Requires API key (server-side).
|
|
2494
|
-
*
|
|
2495
|
-
* On the hardened HTTP core: throws a typed `G8Error` on failure and retries
|
|
2496
|
-
* transient errors. Note the deliberate behavior change vs the preview client —
|
|
2497
|
-
* a non-2xx response now **throws** instead of silently returning an all-zeros
|
|
2498
|
-
* overview, so callers can distinguish genuinely-zero activity from an auth/5xx
|
|
2499
|
-
* failure.
|
|
2500
|
-
*/
|
|
2501
|
-
declare const createAnalyticsClient: (apiKey: string, apiUrl?: string) => {
|
|
2502
|
-
overview(config?: {
|
|
2503
|
-
period?: string;
|
|
2504
|
-
metrics?: string[];
|
|
2505
|
-
}): Promise<AnalyticsOverview>;
|
|
2506
|
-
};
|
|
2507
|
-
|
|
2508
2512
|
interface IntentSignals {
|
|
2509
2513
|
domain: string;
|
|
2510
2514
|
score: number;
|
|
@@ -2522,25 +2526,6 @@ declare const createSignalsClient: (key: string, isApiKey: boolean, apiUrl?: str
|
|
|
2522
2526
|
stream(domains: string[], callback: (signals: IntentSignals[]) => void): () => void;
|
|
2523
2527
|
};
|
|
2524
2528
|
|
|
2525
|
-
interface Integration {
|
|
2526
|
-
id: string;
|
|
2527
|
-
provider: string;
|
|
2528
|
-
status: string;
|
|
2529
|
-
connected_at: string | null;
|
|
2530
|
-
}
|
|
2531
|
-
/**
|
|
2532
|
-
* Integrations - connect CRM platforms, trigger syncs. Requires API key
|
|
2533
|
-
* (server-side). On the hardened HTTP core: throws a typed `G8Error` on failure
|
|
2534
|
-
* and retries transient errors.
|
|
2535
|
-
*/
|
|
2536
|
-
declare const createIntegrationsClient: (apiKey: string, apiUrl?: string) => {
|
|
2537
|
-
list(): Promise<Integration[]>;
|
|
2538
|
-
connect(provider: string, config?: Record<string, unknown>): Promise<void>;
|
|
2539
|
-
sync(provider: string, config?: {
|
|
2540
|
-
direction?: "inbound" | "outbound" | "bidirectional";
|
|
2541
|
-
}): Promise<void>;
|
|
2542
|
-
};
|
|
2543
|
-
|
|
2544
2529
|
interface Campaign {
|
|
2545
2530
|
id: string;
|
|
2546
2531
|
name: string;
|
|
@@ -2559,11 +2544,37 @@ interface CampaignCreateConfig {
|
|
|
2559
2544
|
target_persona?: string;
|
|
2560
2545
|
goal?: string;
|
|
2561
2546
|
}
|
|
2562
|
-
interface
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2547
|
+
interface CampaignLaunchExecution {
|
|
2548
|
+
status: string;
|
|
2549
|
+
contacts_total?: number;
|
|
2550
|
+
contacts_scheduled?: number;
|
|
2551
|
+
contacts_queued?: number;
|
|
2552
|
+
job_id?: string;
|
|
2553
|
+
polling_url?: string;
|
|
2554
|
+
orchestrator_version?: string;
|
|
2555
|
+
}
|
|
2556
|
+
interface CampaignLaunchResult {
|
|
2557
|
+
status: string;
|
|
2558
|
+
campaign_id: string;
|
|
2559
|
+
sequence_id: string;
|
|
2560
|
+
sequence_name: string;
|
|
2561
|
+
steps_created: number;
|
|
2562
|
+
link_id: string;
|
|
2563
|
+
warnings: string[];
|
|
2564
|
+
channels_attached: Array<{
|
|
2565
|
+
mailbox_id: number;
|
|
2566
|
+
email: string;
|
|
2567
|
+
channel_type: string;
|
|
2568
|
+
auto_picked: boolean;
|
|
2569
|
+
}>;
|
|
2570
|
+
agent_assigned: {
|
|
2571
|
+
textual_agent_name: string | null;
|
|
2572
|
+
voice_agent_name: string | null;
|
|
2573
|
+
};
|
|
2574
|
+
schedule_id: string | null;
|
|
2575
|
+
appointment_id: number | null;
|
|
2576
|
+
execution: CampaignLaunchExecution;
|
|
2577
|
+
message: string;
|
|
2567
2578
|
}
|
|
2568
2579
|
/**
|
|
2569
2580
|
* Campaigns - create, manage, launch campaigns. Requires API key (server-side).
|
|
@@ -2574,8 +2585,7 @@ declare const createCampaignsClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2574
2585
|
list(page?: number, limit?: number): Promise<Campaign[]>;
|
|
2575
2586
|
get(campaignId: string): Promise<Campaign>;
|
|
2576
2587
|
create(config: CampaignCreateConfig): Promise<Campaign>;
|
|
2577
|
-
launch(campaignId: string): Promise<
|
|
2578
|
-
stats(campaignId: string): Promise<CampaignStats>;
|
|
2588
|
+
launch(campaignId: string): Promise<CampaignLaunchResult>;
|
|
2579
2589
|
};
|
|
2580
2590
|
|
|
2581
2591
|
interface Sequence {
|
|
@@ -2794,22 +2804,40 @@ declare const createSequencesClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2794
2804
|
data: SequenceContactItem[];
|
|
2795
2805
|
pagination?: PaginationMeta;
|
|
2796
2806
|
}>;
|
|
2797
|
-
/**
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2807
|
+
/**
|
|
2808
|
+
* Add contacts to a sequence (V2 queuing). Live or drafted sequences only.
|
|
2809
|
+
* Pass `idempotencyKey` to make a retry safe — the same key returns the
|
|
2810
|
+
* first result instead of re-enrolling on a 5xx-then-success (A6).
|
|
2811
|
+
*/
|
|
2812
|
+
add(config: AddToSequenceConfig, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2813
|
+
/**
|
|
2814
|
+
* Create a new sequence with optional steps + channels. Pass `idempotencyKey`
|
|
2815
|
+
* to make a retry safe — the same key returns the first result instead of
|
|
2816
|
+
* creating a duplicate sequence on a 5xx-then-success (A6).
|
|
2817
|
+
*/
|
|
2818
|
+
create(payload: SequenceCreateParams, idempotencyKey?: string): Promise<SequenceCreateResult>;
|
|
2801
2819
|
/** Update sequence metadata. Rejected (409) if sequence is in a transitional status. */
|
|
2802
2820
|
update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
|
|
2803
2821
|
/** Update a single step within a sequence. */
|
|
2804
2822
|
updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
|
|
2805
2823
|
/** Soft-delete (archive) a sequence. */
|
|
2806
2824
|
delete(sequenceId: string): Promise<SequenceActionResult>;
|
|
2807
|
-
/**
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2825
|
+
/**
|
|
2826
|
+
* Run/start a DRAFTED sequence (V2 orchestration). Pass `idempotencyKey` to
|
|
2827
|
+
* make a retry safe — the same key won't re-trigger the run on a
|
|
2828
|
+
* 5xx-then-success (A6).
|
|
2829
|
+
*/
|
|
2830
|
+
run(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2831
|
+
/**
|
|
2832
|
+
* Pause a live sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
2833
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
2834
|
+
*/
|
|
2835
|
+
pause(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2836
|
+
/**
|
|
2837
|
+
* Resume a paused sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
2838
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
2839
|
+
*/
|
|
2840
|
+
resume(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2813
2841
|
/** Read-only sequence preview with all steps + channels (no enrollment). */
|
|
2814
2842
|
preview(sequenceId: string): Promise<SequencePreview>;
|
|
2815
2843
|
/** Comprehensive analytics for a sequence. */
|
|
@@ -2864,7 +2892,7 @@ declare const createEnrichClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2864
2892
|
}): Promise<CompanyEnrichment>;
|
|
2865
2893
|
/** Verify an email address. Costs 1 credit. */
|
|
2866
2894
|
verifyEmail(email: string): Promise<EmailVerification>;
|
|
2867
|
-
/** Search
|
|
2895
|
+
/** Search 700M+ contacts with filters. Credits charged per result. */
|
|
2868
2896
|
search(filters: SearchFilter[], page?: number, limit?: number): Promise<SearchResults>;
|
|
2869
2897
|
};
|
|
2870
2898
|
|
|
@@ -3086,7 +3114,7 @@ declare const createFormsClient: (writeKey: string, apiUrl?: string) => {
|
|
|
3086
3114
|
* Handles event tracking, identity, and progressive forms.
|
|
3087
3115
|
*
|
|
3088
3116
|
* Usage:
|
|
3089
|
-
* import { g8 } from '@graph8/
|
|
3117
|
+
* import { g8 } from '@graph8/sdk';
|
|
3090
3118
|
* g8.init({ writeKey: 'your_write_key' });
|
|
3091
3119
|
* g8.track('page_view', { page: '/pricing' });
|
|
3092
3120
|
* g8.identify('user@acme.com', { name: 'John', company: 'Acme' });
|
|
@@ -3102,11 +3130,8 @@ declare class G8 {
|
|
|
3102
3130
|
/** @internal */ _enrich: ReturnType<typeof createEnrichClient> | null;
|
|
3103
3131
|
/** @internal */ _sequences: ReturnType<typeof createSequencesClient> | null;
|
|
3104
3132
|
/** @internal */ _campaigns: ReturnType<typeof createCampaignsClient> | null;
|
|
3105
|
-
/** @internal */ _integrations: ReturnType<typeof createIntegrationsClient> | null;
|
|
3106
3133
|
/** @internal */ _signals: ReturnType<typeof createSignalsClient> | null;
|
|
3107
|
-
/** @internal */ _analytics: ReturnType<typeof createAnalyticsClient> | null;
|
|
3108
3134
|
/** @internal */ _voice: ReturnType<typeof createVoiceClient> | null;
|
|
3109
|
-
/** @internal */ _pages: ReturnType<typeof createPagesClient> | null;
|
|
3110
3135
|
/** @internal */ _webhooks: ReturnType<typeof createWebhooksClient> | null;
|
|
3111
3136
|
/** @internal */ _contacts: ReturnType<typeof createContactsClient> | null;
|
|
3112
3137
|
/** @internal */ _companies: ReturnType<typeof createCompaniesClient> | null;
|
|
@@ -3206,14 +3231,14 @@ declare class G8 {
|
|
|
3206
3231
|
data: SequenceContactItem[];
|
|
3207
3232
|
pagination?: PaginationMeta;
|
|
3208
3233
|
}>;
|
|
3209
|
-
add(config: AddToSequenceConfig): Promise<SequenceActionResult>;
|
|
3210
|
-
create(payload: SequenceCreateParams): Promise<SequenceCreateResult>;
|
|
3234
|
+
add(config: AddToSequenceConfig, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3235
|
+
create(payload: SequenceCreateParams, idempotencyKey?: string): Promise<SequenceCreateResult>;
|
|
3211
3236
|
update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
|
|
3212
3237
|
updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
|
|
3213
3238
|
delete(sequenceId: string): Promise<SequenceActionResult>;
|
|
3214
|
-
run(sequenceId: string): Promise<SequenceActionResult>;
|
|
3215
|
-
pause(sequenceId: string): Promise<SequenceActionResult>;
|
|
3216
|
-
resume(sequenceId: string): Promise<SequenceActionResult>;
|
|
3239
|
+
run(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3240
|
+
pause(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3241
|
+
resume(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3217
3242
|
preview(sequenceId: string): Promise<SequencePreview>;
|
|
3218
3243
|
analytics(sequenceId: string): Promise<SequenceAnalytics>;
|
|
3219
3244
|
};
|
|
@@ -3222,37 +3247,15 @@ declare class G8 {
|
|
|
3222
3247
|
list(page?: number, limit?: number): Promise<Campaign[]>;
|
|
3223
3248
|
get(campaignId: string): Promise<Campaign>;
|
|
3224
3249
|
create(config: CampaignCreateConfig): Promise<Campaign>;
|
|
3225
|
-
launch(campaignId: string): Promise<
|
|
3226
|
-
stats(campaignId: string): Promise<CampaignStats>;
|
|
3227
|
-
};
|
|
3228
|
-
/** CRM integrations (requires API key). */
|
|
3229
|
-
get integrations(): {
|
|
3230
|
-
list(): Promise<Integration[]>;
|
|
3231
|
-
connect(provider: string, config?: Record<string, unknown>): Promise<void>;
|
|
3232
|
-
sync(provider: string, config?: {
|
|
3233
|
-
direction?: "inbound" | "outbound" | "bidirectional";
|
|
3234
|
-
}): Promise<void>;
|
|
3250
|
+
launch(campaignId: string): Promise<CampaignLaunchResult>;
|
|
3235
3251
|
};
|
|
3236
3252
|
/** Intent signals. */
|
|
3237
3253
|
get signals(): {
|
|
3238
3254
|
company(domain: string): Promise<IntentSignals>;
|
|
3239
3255
|
stream(domains: string[], callback: (signals: IntentSignals[]) => void): () => void;
|
|
3240
3256
|
};
|
|
3241
|
-
/** Analytics (requires API key). */
|
|
3242
|
-
get analytics(): {
|
|
3243
|
-
overview(config?: {
|
|
3244
|
-
period?: string;
|
|
3245
|
-
metrics?: string[];
|
|
3246
|
-
}): Promise<AnalyticsOverview>;
|
|
3247
|
-
};
|
|
3248
3257
|
/** Voice AI (requires API key). */
|
|
3249
3258
|
get voice(): {
|
|
3250
|
-
start(config: {
|
|
3251
|
-
agent?: string;
|
|
3252
|
-
contactId?: number;
|
|
3253
|
-
context?: Record<string, unknown>;
|
|
3254
|
-
}): Promise<VoiceSession>;
|
|
3255
|
-
analysis(sessionId: string): Promise<CallAnalysis>;
|
|
3256
3259
|
on(event: "error" | "ended" | "connected" | "transcription", callback: (data: Record<string, unknown>) => void): void;
|
|
3257
3260
|
dialer: {
|
|
3258
3261
|
listSessions(params?: DialerSessionsListParams): Promise<DialerSessionsListResult>;
|
|
@@ -3278,7 +3281,7 @@ declare class G8 {
|
|
|
3278
3281
|
contact_id?: number;
|
|
3279
3282
|
user_email?: string;
|
|
3280
3283
|
campaign_id?: string;
|
|
3281
|
-
date_from
|
|
3284
|
+
date_from? /** Marketplace — for SDR/AE talent: profile, hire offers (accept/reject), active hirings (requires API key). */: string;
|
|
3282
3285
|
date_to?: string;
|
|
3283
3286
|
limit?: number;
|
|
3284
3287
|
page?: number;
|
|
@@ -3300,22 +3303,10 @@ declare class G8 {
|
|
|
3300
3303
|
}>;
|
|
3301
3304
|
};
|
|
3302
3305
|
};
|
|
3303
|
-
/** Landing pages (requires API key). */
|
|
3304
|
-
get pages(): {
|
|
3305
|
-
clone(url: string): Promise<LandingPage>;
|
|
3306
|
-
create(config: {
|
|
3307
|
-
template?: string;
|
|
3308
|
-
title?: string;
|
|
3309
|
-
content?: Record<string, unknown>;
|
|
3310
|
-
}): Promise<LandingPage>;
|
|
3311
|
-
publish(pageId: string): Promise<{
|
|
3312
|
-
url: string;
|
|
3313
|
-
}>;
|
|
3314
|
-
};
|
|
3315
3306
|
/** Webhook event listeners (requires API key). */
|
|
3316
3307
|
get webhooks(): {
|
|
3317
3308
|
baseUrl: string;
|
|
3318
|
-
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.
|
|
3309
|
+
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"];
|
|
3319
3310
|
constructEvent(payload: string, signature: string, timestamp: string | number, secret: string, opts?: ConstructEventOptions): WebhookEventPayload;
|
|
3320
3311
|
};
|
|
3321
3312
|
/** Contacts CRUD (requires API key). */
|
|
@@ -3589,7 +3580,7 @@ declare class G8 {
|
|
|
3589
3580
|
};
|
|
3590
3581
|
}>;
|
|
3591
3582
|
nodeTypes(params?: {
|
|
3592
|
-
type
|
|
3583
|
+
type? /** Identify a user with properties. */: string;
|
|
3593
3584
|
}): Promise<{
|
|
3594
3585
|
data: NodeTypeSchema[];
|
|
3595
3586
|
}>;
|
|
@@ -3726,7 +3717,7 @@ declare class G8 {
|
|
|
3726
3717
|
data: IntentCompany[];
|
|
3727
3718
|
}>;
|
|
3728
3719
|
keywordContacts(keywordId: string, params?: {
|
|
3729
|
-
limit
|
|
3720
|
+
limit? /** @internal */: number;
|
|
3730
3721
|
date_from?: string;
|
|
3731
3722
|
date_to?: string;
|
|
3732
3723
|
}): Promise<{
|
|
@@ -3790,7 +3781,7 @@ declare class G8 {
|
|
|
3790
3781
|
}>;
|
|
3791
3782
|
personas(params?: {
|
|
3792
3783
|
status?: string;
|
|
3793
|
-
limit
|
|
3784
|
+
limit?: number;
|
|
3794
3785
|
}): Promise<{
|
|
3795
3786
|
data: Persona[];
|
|
3796
3787
|
}>;
|
|
@@ -3806,6 +3797,60 @@ declare class G8 {
|
|
|
3806
3797
|
}): Promise<{
|
|
3807
3798
|
data: ResearchReport[];
|
|
3808
3799
|
}>;
|
|
3800
|
+
createIcp(body: {
|
|
3801
|
+
name: string;
|
|
3802
|
+
website_url: string;
|
|
3803
|
+
description?: string;
|
|
3804
|
+
firmographics?: Record<string, unknown>;
|
|
3805
|
+
tech_stack?: Record<string, unknown>;
|
|
3806
|
+
buying_signals?: unknown[];
|
|
3807
|
+
estimated_market_size?: number;
|
|
3808
|
+
}): Promise<{
|
|
3809
|
+
data: ICP;
|
|
3810
|
+
}>;
|
|
3811
|
+
updateIcp(icpId: string, body: {
|
|
3812
|
+
name?: string;
|
|
3813
|
+
description?: string;
|
|
3814
|
+
firmographics?: Record<string, unknown>;
|
|
3815
|
+
tech_stack?: Record<string, unknown>;
|
|
3816
|
+
buying_signals?: unknown[];
|
|
3817
|
+
estimated_market_size?: number;
|
|
3818
|
+
}): Promise<{
|
|
3819
|
+
data: ICP;
|
|
3820
|
+
}>;
|
|
3821
|
+
archiveIcp(icpId: string): Promise<{
|
|
3822
|
+
data: ICP;
|
|
3823
|
+
}>;
|
|
3824
|
+
createPersona(body: {
|
|
3825
|
+
title: string;
|
|
3826
|
+
website_url: string;
|
|
3827
|
+
priority?: number;
|
|
3828
|
+
confidence?: string;
|
|
3829
|
+
why_target?: string;
|
|
3830
|
+
key_signals?: unknown[];
|
|
3831
|
+
expected_receptivity?: string;
|
|
3832
|
+
campaign_approach?: string;
|
|
3833
|
+
recommended_goal?: string;
|
|
3834
|
+
source?: string;
|
|
3835
|
+
}): Promise<{
|
|
3836
|
+
data: Persona;
|
|
3837
|
+
}>;
|
|
3838
|
+
updatePersona(personaId: string, body: {
|
|
3839
|
+
title?: string;
|
|
3840
|
+
priority?: number;
|
|
3841
|
+
confidence?: string;
|
|
3842
|
+
why_target?: string;
|
|
3843
|
+
key_signals?: unknown[];
|
|
3844
|
+
expected_receptivity?: string;
|
|
3845
|
+
campaign_approach?: string;
|
|
3846
|
+
recommended_goal?: string;
|
|
3847
|
+
status?: string;
|
|
3848
|
+
}): Promise<{
|
|
3849
|
+
data: Persona;
|
|
3850
|
+
}>;
|
|
3851
|
+
archivePersona(personaId: string): Promise<{
|
|
3852
|
+
data: Persona;
|
|
3853
|
+
}>;
|
|
3809
3854
|
};
|
|
3810
3855
|
/** Meetings — read scheduled, completed, cancelled meetings with transcripts + AI analysis (requires API key). */
|
|
3811
3856
|
get meetings(): {
|
|
@@ -3971,4 +4016,4 @@ interface PaginatedResponse<T> {
|
|
|
3971
4016
|
*/
|
|
3972
4017
|
declare function paginate<T>(fetchPage: (cursor?: string) => Promise<PaginatedResponse<T>>): AsyncGenerator<T, void, unknown>;
|
|
3973
4018
|
|
|
3974
|
-
export { type AddToSequenceConfig, type AgencyClient, type AgencyInfo, type
|
|
4019
|
+
export { type AddToSequenceConfig, type AgencyClient, type AgencyInfo, type AudienceSync, type AudienceSyncCreateParams, type AudienceSyncError, type AudienceSyncMode, type AudienceSyncPlatform, type AudienceSyncRun, type AudienceSyncUpdateParams, type Booking, type BookingRequest, type CalendarConfig, type CallGradingResult, type Campaign, type CampaignCreateConfig, type CampaignLaunchExecution, type CampaignLaunchResult, type ChatConfig, type Company, type CompanyColumn, type CompanyColumnCreateParams, type CompanyContact, type CompanyEnrichment, type CompanyListParams, type CompanyUpdateParams, type ConstructEventOptions, type Contact, type ContactColumn, type ContactColumnCreateParams, type ContactCreateParams, type ContactDeal, type ContactList, type ContactListParams, type ContactUpdateParams, type CopilotConfig, type CreatedField, type Deal, type DealCreateParams, type DealListParams, type DealUpdateParams, type DialerAgentSummary, type DialerAgentsListParams, type DialerAgentsListResult, type DialerNumberInfo, type DialerNumbersListResult, type DialerReportFilters, type DialerReportMetric, type DialerSessionCreateParams, type DialerSessionCreateResult, type DialerSessionResumeResult, type DialerSessionStatus, type DialerSessionStatusUpdateResult, type DialerSessionSummary, type DialerSessionsListParams, type DialerSessionsListResult, type DialerStatsParams, type DialerStatsResult, type EmailVerification, type EnrichLookupResult, type EvidenceKey, type Field, type FieldCreateParams, type FieldDeleteParams, type G8Config, G8Error, type G8PrivacyConfig, type GlobalContextDocument, type ICP, type IdentifyProperties, type InboxAssignResult, type InboxAssignee, type InboxChannel, type InboxContact, type InboxDraft, type InboxListParams, type InboxMessage, type InboxSendParams, type InboxSendResult, type InboxTag, type InboxTagResult, type InboxThread, type IntelligenceData, type IntentCompany, type IntentContact, type IntentKeyword, type IntentPage, type IntentSignals, type IntentStats, type IntentVisitor, KNOWN_WEBHOOK_EVENTS, type ListContact, type MarketplaceHiring, type MarketplaceOffer, type MarketplaceProfile, type MeetingAnalysis, type MeetingAttendee, type MeetingDetail, type MeetingListParams, type MeetingSummary, type MeetingTranscriptLine, type MissedCallback, type MissedCallbacksResult, type NodeTypeSchema, type Note, type PaginatedResponse, type PaginationMeta$1 as PaginationMeta, type PersonEnrichment, type Persona, type Pipeline, type PipelineStage, type PipelineSuggestion, type QuotableProduct, type QuoteCreateParams, type QuoteDetail, type QuoteLineItem, type QuoteListParams, type QuoteSendParams, type QuoteSettings, type QuoteStatus, type QuoteSummary, type QuoteUpdateParams, type RequestOptions, type ResearchReport, type SearchCompanyItem, type SearchCondition, type SearchContactItem, type SearchFilter, type SearchOperator, type SearchParams, type SearchResults, type SearchSaveParams, type SearchSaveResult, type Sequence, type SequenceActionResult, type SequenceAnalytics, type SequenceChannelConfig, type SequenceContactItem, type SequenceContactsParams, type SequenceCreateParams, type SequenceCreateResult, type SequenceDetail, type SequenceKind, type SequenceListItem, type SequenceListParams, type SequencePreview, type SequencePreviewChannel, type SequencePreviewStep, type SequenceStepConfig, type SequenceStepInputType, type SequenceStepType, type SequenceStepUpdateParams, type SequenceUpdateParams, type SetFieldValueParams, type Skill, type SkillCreateAPIParams, type SkillCreateLLMParams, type SkillInputField, type SkillListParams, type SkillTemplate, type SkillType, type SkillUpdateAPIParams, type SkillUpdateLLMParams, type Snippet, type StageCreateParams, type StagePipeline, type StagePipelineCreateParams, type StagePipelineStage, type StagePipelineUpdateParams, type StageUpdateParams, type Task, type TaskCreateParams, type TaskListParams, type TaskUpdateParams, type TimeSlot, type TrackProperties, type VisitorCompany, type VisitorScore, type VoicePagination, type WebhookEvent, type WebhookEventPayload, WebhookSignatureError, type Workflow, type WorkflowConfig, type WorkflowConnection, type WorkflowCreateParams, type WorkflowExecution, type WorkflowListParams, type WorkflowNode, type WorkflowUpdateParams, backoffDelayMs, constructEvent, g8, isRetryableStatus, paginate, parseRetryAfter, request };
|