@graph8/sdk 0.251.0 → 0.262.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 +9 -2
- package/dist/cli.js +216 -0
- package/dist/index.d.mts +105 -7
- package/dist/index.d.ts +105 -7
- package/dist/index.js +44 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +103 -7
- package/dist/react.d.ts +103 -7
- package/dist/react.js +62 -11
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +53 -12
- package/dist/react.mjs.map +1 -1
- package/dist/types/README.md +7 -0
- package/dist/types/agency.d.ts +20 -0
- package/dist/types/agentSetup.d.ts +57 -0
- package/dist/types/api.d.ts +127 -0
- package/dist/types/appClient.d.ts +99 -0
- package/dist/types/appPlatform.d.ts +269 -0
- package/dist/types/appTokens.d.ts +125 -0
- package/dist/types/apps.d.ts +130 -0
- package/dist/types/audiences.d.ts +88 -0
- package/dist/types/calendar.d.ts +55 -0
- package/dist/types/campaigns.d.ts +61 -0
- package/dist/types/chat.d.ts +35 -0
- package/dist/types/cli.d.ts +14 -0
- package/dist/types/companies.d.ts +123 -0
- package/dist/types/contacts.d.ts +200 -0
- package/dist/types/copilot.d.ts +31 -0
- package/dist/types/core.d.ts +1052 -0
- package/dist/types/deals.d.ts +215 -0
- package/dist/types/enrich.d.ts +51 -0
- package/dist/types/fields.d.ts +84 -0
- package/dist/types/forms.d.ts +16 -0
- package/dist/types/http.d.ts +141 -0
- package/dist/types/inbox.d.ts +123 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/intent.d.ts +196 -0
- package/dist/types/lists.d.ts +44 -0
- package/dist/types/mailboxes.d.ts +240 -0
- package/dist/types/marketplace.d.ts +62 -0
- package/dist/types/meetings.d.ts +70 -0
- package/dist/types/newsletter.d.ts +212 -0
- package/dist/types/notes.d.ts +57 -0
- package/dist/types/objects.d.ts +281 -0
- package/dist/types/pipelines.d.ts +135 -0
- package/dist/types/quotes.d.ts +143 -0
- package/dist/types/react.d.ts +978 -0
- package/dist/types/search.d.ts +99 -0
- package/dist/types/sequences.d.ts +255 -0
- package/dist/types/signals.d.ts +28 -0
- package/dist/types/skills.d.ts +176 -0
- package/dist/types/snippet.d.ts +24 -0
- package/dist/types/studio.d.ts +161 -0
- package/dist/types/tasks.d.ts +101 -0
- package/dist/types/types.d.ts +45 -0
- package/dist/types/utils.d.ts +21 -0
- package/dist/types/version.d.ts +10 -0
- package/dist/types/visitors.d.ts +29 -0
- package/dist/types/voice.d.ts +304 -0
- package/dist/types/webhooks.d.ts +71 -0
- package/dist/types/workflows.d.ts +229 -0
- package/docs/agents.md +748 -0
- package/docs/api/README.md +165 -0
- package/docs/api/accounts.d.ts +396 -0
- package/docs/api/accounts.md +644 -0
- package/docs/api/adCampaigns.d.ts +707 -0
- package/docs/api/adCampaigns.md +1091 -0
- package/docs/api/adCreatives.d.ts +996 -0
- package/docs/api/adCreatives.md +1708 -0
- package/docs/api/agency.d.ts +556 -0
- package/docs/api/agency.md +845 -0
- package/docs/api/agent.d.ts +330 -0
- package/docs/api/agent.md +514 -0
- package/docs/api/agents.d.ts +1622 -0
- package/docs/api/agents.md +2860 -0
- package/docs/api/aiInbox.d.ts +1984 -0
- package/docs/api/aiInbox.md +3490 -0
- package/docs/api/analytics.d.ts +1273 -0
- package/docs/api/analytics.md +2095 -0
- package/docs/api/apiKeys.d.ts +252 -0
- package/docs/api/apiKeys.md +318 -0
- package/docs/api/appDeployments.d.ts +236 -0
- package/docs/api/appDeployments.md +471 -0
- package/docs/api/appDomains.d.ts +171 -0
- package/docs/api/appDomains.md +281 -0
- package/docs/api/appLogs.d.ts +120 -0
- package/docs/api/appLogs.md +159 -0
- package/docs/api/appObjects.d.ts +415 -0
- package/docs/api/appObjects.md +568 -0
- package/docs/api/appPages.d.ts +557 -0
- package/docs/api/appPages.md +796 -0
- package/docs/api/appPlatformTokens.d.ts +123 -0
- package/docs/api/appPlatformTokens.md +172 -0
- package/docs/api/appointments.d.ts +2361 -0
- package/docs/api/appointments.md +3917 -0
- package/docs/api/apps.d.ts +822 -0
- package/docs/api/apps.md +1342 -0
- package/docs/api/assertUpsert.d.ts +286 -0
- package/docs/api/assertUpsert.md +370 -0
- package/docs/api/audienceSyncs.d.ts +259 -0
- package/docs/api/audienceSyncs.md +395 -0
- package/docs/api/brandKit.d.ts +686 -0
- package/docs/api/brandKit.md +1133 -0
- package/docs/api/bugReports.d.ts +181 -0
- package/docs/api/bugReports.md +268 -0
- package/docs/api/by-path.md +3260 -0
- package/docs/api/calendarInvites.d.ts +117 -0
- package/docs/api/calendarInvites.md +148 -0
- package/docs/api/campaignWorkflows.d.ts +152 -0
- package/docs/api/campaignWorkflows.md +200 -0
- package/docs/api/campaigns.d.ts +721 -0
- package/docs/api/campaigns.md +1236 -0
- package/docs/api/channels.d.ts +171 -0
- package/docs/api/channels.md +235 -0
- package/docs/api/cliCampaigns.d.ts +205 -0
- package/docs/api/cliCampaigns.md +256 -0
- package/docs/api/cliPipelines.d.ts +324 -0
- package/docs/api/cliPipelines.md +562 -0
- package/docs/api/clickHouse.d.ts +115 -0
- package/docs/api/clickHouse.md +138 -0
- package/docs/api/companies.d.ts +1636 -0
- package/docs/api/companies.md +2211 -0
- package/docs/api/companyIntelligence.d.ts +299 -0
- package/docs/api/companyIntelligence.md +488 -0
- package/docs/api/contacts.d.ts +2173 -0
- package/docs/api/contacts.md +3143 -0
- package/docs/api/content.d.ts +968 -0
- package/docs/api/content.md +1667 -0
- package/docs/api/contentGridSkills.d.ts +177 -0
- package/docs/api/contentGridSkills.md +271 -0
- package/docs/api/copilot.d.ts +1017 -0
- package/docs/api/copilot.md +1765 -0
- package/docs/api/crmSyncs.d.ts +215 -0
- package/docs/api/crmSyncs.md +301 -0
- package/docs/api/customerSuccess.d.ts +491 -0
- package/docs/api/customerSuccess.md +776 -0
- package/docs/api/deals.d.ts +1697 -0
- package/docs/api/deals.md +2436 -0
- package/docs/api/deliverability.d.ts +418 -0
- package/docs/api/deliverability.md +677 -0
- package/docs/api/desk.d.ts +1765 -0
- package/docs/api/desk.md +3007 -0
- package/docs/api/dialer.d.ts +1185 -0
- package/docs/api/dialer.md +2166 -0
- package/docs/api/dialerAnalytics.d.ts +187 -0
- package/docs/api/dialerAnalytics.md +257 -0
- package/docs/api/documents.d.ts +895 -0
- package/docs/api/documents.md +1440 -0
- package/docs/api/duplicates.d.ts +195 -0
- package/docs/api/duplicates.md +315 -0
- package/docs/api/eSign.d.ts +38 -0
- package/docs/api/eSign.md +54 -0
- package/docs/api/eSignature.d.ts +242 -0
- package/docs/api/eSignature.md +341 -0
- package/docs/api/enrichment.d.ts +3207 -0
- package/docs/api/enrichment.md +5225 -0
- package/docs/api/events.d.ts +115 -0
- package/docs/api/events.md +105 -0
- package/docs/api/fields.d.ts +482 -0
- package/docs/api/fields.md +566 -0
- package/docs/api/forms.d.ts +1012 -0
- package/docs/api/forms.md +1542 -0
- package/docs/api/gtmCampaigns.d.ts +662 -0
- package/docs/api/gtmCampaigns.md +1044 -0
- package/docs/api/gtmContext.d.ts +1187 -0
- package/docs/api/gtmContext.md +2112 -0
- package/docs/api/gtmDeliverability.d.ts +60 -0
- package/docs/api/gtmDeliverability.md +63 -0
- package/docs/api/gtmKnowledgeBase.d.ts +76 -0
- package/docs/api/gtmKnowledgeBase.md +91 -0
- package/docs/api/gtmLaunchHelpers.d.ts +123 -0
- package/docs/api/gtmLaunchHelpers.md +148 -0
- package/docs/api/gtmLibrary.d.ts +448 -0
- package/docs/api/gtmLibrary.md +780 -0
- package/docs/api/health.d.ts +39 -0
- package/docs/api/health.md +58 -0
- package/docs/api/imageLibrary.d.ts +341 -0
- package/docs/api/imageLibrary.md +569 -0
- package/docs/api/imports.d.ts +157 -0
- package/docs/api/imports.md +174 -0
- package/docs/api/inbox.d.ts +709 -0
- package/docs/api/inbox.md +1067 -0
- package/docs/api/install.d.ts +213 -0
- package/docs/api/install.md +317 -0
- package/docs/api/installedApps.d.ts +131 -0
- package/docs/api/installedApps.md +241 -0
- package/docs/api/integrationStatus.d.ts +142 -0
- package/docs/api/integrationStatus.md +205 -0
- package/docs/api/integrations.d.ts +2327 -0
- package/docs/api/integrations.md +3791 -0
- package/docs/api/intent.d.ts +482 -0
- package/docs/api/intent.md +858 -0
- package/docs/api/knowledge.d.ts +501 -0
- package/docs/api/knowledge.md +843 -0
- package/docs/api/knowledgeBase.d.ts +84 -0
- package/docs/api/knowledgeBase.md +96 -0
- package/docs/api/landingPages.d.ts +1411 -0
- package/docs/api/landingPages.md +2488 -0
- package/docs/api/leads.d.ts +133 -0
- package/docs/api/leads.md +180 -0
- package/docs/api/library.d.ts +217 -0
- package/docs/api/library.md +338 -0
- package/docs/api/linkedIn.d.ts +227 -0
- package/docs/api/linkedIn.md +289 -0
- package/docs/api/linkedInOutreach.d.ts +727 -0
- package/docs/api/linkedInOutreach.md +990 -0
- package/docs/api/lists.d.ts +1106 -0
- package/docs/api/lists.md +1609 -0
- package/docs/api/logs.d.ts +71 -0
- package/docs/api/logs.md +70 -0
- package/docs/api/mailboxes.d.ts +1050 -0
- package/docs/api/mailboxes.md +1690 -0
- package/docs/api/marketingIntelligence.d.ts +256 -0
- package/docs/api/marketingIntelligence.md +454 -0
- package/docs/api/marketplace.d.ts +3173 -0
- package/docs/api/marketplace.md +5953 -0
- package/docs/api/mcp.d.ts +69 -0
- package/docs/api/mcp.md +69 -0
- package/docs/api/me.d.ts +54 -0
- package/docs/api/me.md +56 -0
- package/docs/api/meetings.d.ts +539 -0
- package/docs/api/meetings.md +747 -0
- package/docs/api/newsletter.d.ts +1613 -0
- package/docs/api/newsletter.md +2746 -0
- package/docs/api/notes.d.ts +517 -0
- package/docs/api/notes.md +888 -0
- package/docs/api/notifications.d.ts +94 -0
- package/docs/api/notifications.md +105 -0
- package/docs/api/objects.d.ts +621 -0
- package/docs/api/objects.md +1098 -0
- package/docs/api/openSearch.d.ts +234 -0
- package/docs/api/openSearch.md +297 -0
- package/docs/api/ops.d.ts +299 -0
- package/docs/api/ops.md +339 -0
- package/docs/api/orgGovernance.d.ts +393 -0
- package/docs/api/orgGovernance.md +623 -0
- package/docs/api/orgVideos.d.ts +184 -0
- package/docs/api/orgVideos.md +252 -0
- package/docs/api/organizationSettings.d.ts +626 -0
- package/docs/api/organizationSettings.md +911 -0
- package/docs/api/phoneNumbers.d.ts +484 -0
- package/docs/api/phoneNumbers.md +777 -0
- package/docs/api/profile.d.ts +329 -0
- package/docs/api/profile.md +540 -0
- package/docs/api/programmaticPages.d.ts +400 -0
- package/docs/api/programmaticPages.md +626 -0
- package/docs/api/providerDomains.d.ts +866 -0
- package/docs/api/providerDomains.md +1446 -0
- package/docs/api/providerUsage.d.ts +129 -0
- package/docs/api/providerUsage.md +186 -0
- package/docs/api/public.d.ts +69 -0
- package/docs/api/public.md +78 -0
- package/docs/api/publicCopilot.d.ts +67 -0
- package/docs/api/publicCopilot.md +80 -0
- package/docs/api/publicSignals.d.ts +66 -0
- package/docs/api/publicSignals.md +71 -0
- package/docs/api/publicVisitors.d.ts +97 -0
- package/docs/api/publicVisitors.md +118 -0
- package/docs/api/quotes.d.ts +1564 -0
- package/docs/api/quotes.md +2553 -0
- package/docs/api/radar.d.ts +808 -0
- package/docs/api/radar.md +1431 -0
- package/docs/api/radarReports.d.ts +208 -0
- package/docs/api/radarReports.md +306 -0
- package/docs/api/recordRoles.d.ts +143 -0
- package/docs/api/recordRoles.md +175 -0
- package/docs/api/repos.d.ts +146 -0
- package/docs/api/repos.md +211 -0
- package/docs/api/research.d.ts +295 -0
- package/docs/api/research.md +534 -0
- package/docs/api/revenue.d.ts +402 -0
- package/docs/api/revenue.md +608 -0
- package/docs/api/revenueAnalytics.d.ts +147 -0
- package/docs/api/revenueAnalytics.md +212 -0
- package/docs/api/revenueLifecycle.d.ts +207 -0
- package/docs/api/revenueLifecycle.md +274 -0
- package/docs/api/revenueRecords.d.ts +372 -0
- package/docs/api/revenueRecords.md +563 -0
- package/docs/api/roles.d.ts +431 -0
- package/docs/api/roles.md +812 -0
- package/docs/api/salesCoach.d.ts +877 -0
- package/docs/api/salesCoach.md +1540 -0
- package/docs/api/sandbox.d.ts +210 -0
- package/docs/api/sandbox.md +380 -0
- package/docs/api/scans.d.ts +104 -0
- package/docs/api/scans.md +136 -0
- package/docs/api/scheduleBuy.d.ts +293 -0
- package/docs/api/scheduleBuy.md +431 -0
- package/docs/api/scraping.d.ts +266 -0
- package/docs/api/scraping.md +383 -0
- package/docs/api/sdrAnalytics.d.ts +138 -0
- package/docs/api/sdrAnalytics.md +246 -0
- package/docs/api/search.d.ts +598 -0
- package/docs/api/search.md +866 -0
- package/docs/api/seo.d.ts +447 -0
- package/docs/api/seo.md +660 -0
- package/docs/api/sequenceLifecycle.d.ts +439 -0
- package/docs/api/sequenceLifecycle.md +513 -0
- package/docs/api/sequences.d.ts +1936 -0
- package/docs/api/sequences.md +3232 -0
- package/docs/api/settings.d.ts +448 -0
- package/docs/api/settings.md +731 -0
- package/docs/api/signals.d.ts +1441 -0
- package/docs/api/signals.md +2526 -0
- package/docs/api/signatures.d.ts +719 -0
- package/docs/api/signatures.md +1247 -0
- package/docs/api/skills.d.ts +230 -0
- package/docs/api/skills.md +466 -0
- package/docs/api/snippet.d.ts +85 -0
- package/docs/api/snippet.md +106 -0
- package/docs/api/socialPublishing.d.ts +824 -0
- package/docs/api/socialPublishing.md +1245 -0
- package/docs/api/studioDocuments.d.ts +244 -0
- package/docs/api/studioDocuments.md +348 -0
- package/docs/api/support.d.ts +90 -0
- package/docs/api/support.md +76 -0
- package/docs/api/suppressions.d.ts +241 -0
- package/docs/api/suppressions.md +343 -0
- package/docs/api/surveys.d.ts +847 -0
- package/docs/api/surveys.md +1223 -0
- package/docs/api/tasks.d.ts +813 -0
- package/docs/api/tasks.md +1344 -0
- package/docs/api/teamMembers.d.ts +668 -0
- package/docs/api/teamMembers.md +1040 -0
- package/docs/api/teams.d.ts +784 -0
- package/docs/api/teams.md +1395 -0
- package/docs/api/usage.d.ts +277 -0
- package/docs/api/usage.md +389 -0
- package/docs/api/visitors.d.ts +690 -0
- package/docs/api/visitors.md +1075 -0
- package/docs/api/voice.d.ts +4661 -0
- package/docs/api/voice.md +7905 -0
- package/docs/api/webAnalytics.d.ts +964 -0
- package/docs/api/webAnalytics.md +1452 -0
- package/docs/api/webChat.d.ts +1704 -0
- package/docs/api/webChat.md +2048 -0
- package/docs/api/webhooks.d.ts +251 -0
- package/docs/api/webhooks.md +386 -0
- package/docs/api/websiteEditor.d.ts +324 -0
- package/docs/api/websiteEditor.md +517 -0
- package/docs/api/work.d.ts +2298 -0
- package/docs/api/work.md +3096 -0
- package/docs/api/workbench.d.ts +2962 -0
- package/docs/api/workbench.md +4884 -0
- package/docs/api/workflows.d.ts +1218 -0
- package/docs/api/workflows.md +2302 -0
- package/docs/sdk-clients.md +4339 -0
- package/package.json +10 -3
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/** Filter operators supported by open-data search. */
|
|
2
|
+
export type SearchOperator = "any_of" | "contains" | "all_of" | "none_of" | "is_empty" | "is_not_empty" | "between" | "exists";
|
|
3
|
+
/** A single search filter condition (named to avoid colliding with enrich's `SearchFilter`). */
|
|
4
|
+
export interface SearchCondition {
|
|
5
|
+
/** Field to filter on, e.g. "job_title", "country", "industry". */
|
|
6
|
+
field: string;
|
|
7
|
+
operator: SearchOperator;
|
|
8
|
+
/** Filter values (operator-dependent; e.g. `["VP", "Director"]` for any_of). */
|
|
9
|
+
value?: unknown[];
|
|
10
|
+
}
|
|
11
|
+
export interface SearchParams {
|
|
12
|
+
/** Filter conditions, combined with AND. */
|
|
13
|
+
filters?: SearchCondition[];
|
|
14
|
+
/** Page number, 1-indexed (1-100). */
|
|
15
|
+
page?: number;
|
|
16
|
+
/** Results per page (1-100, default 25). */
|
|
17
|
+
limit?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface SearchSaveParams extends SearchParams {
|
|
20
|
+
/** Title for the new list the matched records are saved into. */
|
|
21
|
+
list_title: string;
|
|
22
|
+
/** Max records to save (1-10,000, default 1,000). */
|
|
23
|
+
max_results?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface SearchContactItem {
|
|
26
|
+
first_name?: string | null;
|
|
27
|
+
last_name?: string | null;
|
|
28
|
+
middle_name?: string | null;
|
|
29
|
+
work_email?: string | null;
|
|
30
|
+
personal_emails?: string | null;
|
|
31
|
+
direct_phone?: string | null;
|
|
32
|
+
mobile_phone?: string | null;
|
|
33
|
+
job_title?: string | null;
|
|
34
|
+
job_department?: string | null;
|
|
35
|
+
seniority_level?: string | null;
|
|
36
|
+
role?: string | null;
|
|
37
|
+
linkedin_url?: string | null;
|
|
38
|
+
linkedin_headline?: string | null;
|
|
39
|
+
city?: string | null;
|
|
40
|
+
state?: string | null;
|
|
41
|
+
country?: string | null;
|
|
42
|
+
company_name?: string | null;
|
|
43
|
+
company_domain?: string | null;
|
|
44
|
+
company_industry?: string | null;
|
|
45
|
+
company_employee_count?: string | null;
|
|
46
|
+
company_country?: string | null;
|
|
47
|
+
confidence_score?: number | null;
|
|
48
|
+
}
|
|
49
|
+
export interface SearchCompanyItem {
|
|
50
|
+
name?: string | null;
|
|
51
|
+
domain?: string | null;
|
|
52
|
+
website?: string | null;
|
|
53
|
+
description?: string | null;
|
|
54
|
+
industry?: string | null;
|
|
55
|
+
industry_group?: string | null;
|
|
56
|
+
employee_count?: string | null;
|
|
57
|
+
revenue?: string | null;
|
|
58
|
+
founded_year?: number | null;
|
|
59
|
+
phone?: string | null;
|
|
60
|
+
address?: string | null;
|
|
61
|
+
city?: string | null;
|
|
62
|
+
state?: string | null;
|
|
63
|
+
country?: string | null;
|
|
64
|
+
zip?: number | null;
|
|
65
|
+
linkedin_url?: string | null;
|
|
66
|
+
linkedin_followers?: string | null;
|
|
67
|
+
facebook_url?: string | null;
|
|
68
|
+
twitter_url?: string | null;
|
|
69
|
+
crunchbase_url?: string | null;
|
|
70
|
+
logo_url?: string | null;
|
|
71
|
+
}
|
|
72
|
+
export interface SearchSaveResult {
|
|
73
|
+
list_id: number;
|
|
74
|
+
list_title: string;
|
|
75
|
+
estimated_total: number;
|
|
76
|
+
status: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Search API — prospect the open-data graph for new contacts and companies by
|
|
80
|
+
* filter, and optionally save the matches straight into a list. Requires API
|
|
81
|
+
* key (server-side). Built on the hardened HTTP core, so every method throws a
|
|
82
|
+
* typed `G8Error` on failure and retries transient errors.
|
|
83
|
+
*
|
|
84
|
+
* Backed by `/api/v1/search`.
|
|
85
|
+
*/
|
|
86
|
+
export declare const createSearchClient: (apiKey: string, apiUrl?: string) => {
|
|
87
|
+
/** Search open-data contacts by filter. */
|
|
88
|
+
contacts(params?: SearchParams): Promise<{
|
|
89
|
+
data: SearchContactItem[];
|
|
90
|
+
}>;
|
|
91
|
+
/** Search open-data companies by filter. */
|
|
92
|
+
companies(params?: SearchParams): Promise<{
|
|
93
|
+
data: SearchCompanyItem[];
|
|
94
|
+
}>;
|
|
95
|
+
/** Search contacts and save the matches into a new list. */
|
|
96
|
+
saveContacts(params: SearchSaveParams): Promise<SearchSaveResult>;
|
|
97
|
+
/** Search companies and save the matches into a new list. */
|
|
98
|
+
saveCompanies(params: SearchSaveParams): Promise<SearchSaveResult>;
|
|
99
|
+
};
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
export interface Sequence {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
status: string;
|
|
5
|
+
step_count: number | null;
|
|
6
|
+
contact_count: number | null;
|
|
7
|
+
}
|
|
8
|
+
export interface AddToSequenceConfig {
|
|
9
|
+
sequenceId: string;
|
|
10
|
+
contactIds: number[];
|
|
11
|
+
listId: number;
|
|
12
|
+
}
|
|
13
|
+
export interface SequenceListItem {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string | null;
|
|
16
|
+
status: string | null;
|
|
17
|
+
user_email: string | null;
|
|
18
|
+
step_count: number | null;
|
|
19
|
+
contact_count: number | null;
|
|
20
|
+
sequence_kind: string | null;
|
|
21
|
+
associated_list_id: number | null;
|
|
22
|
+
created_at: string | null;
|
|
23
|
+
updated_at: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface SequenceListParams {
|
|
26
|
+
page?: number;
|
|
27
|
+
limit?: number;
|
|
28
|
+
/** Filter by sequence status (e.g. "live", "draft", "paused"). */
|
|
29
|
+
status?: string;
|
|
30
|
+
/** Filter by sequence kind ("cold_outbound" or "nurture"). Omit to list all kinds. */
|
|
31
|
+
sequence_kind?: SequenceKind;
|
|
32
|
+
}
|
|
33
|
+
export interface SequenceDetail {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string | null;
|
|
36
|
+
description: string | null;
|
|
37
|
+
status: string | null;
|
|
38
|
+
user_email: string | null;
|
|
39
|
+
associated_list_id: number | null;
|
|
40
|
+
finish_on_reply: boolean;
|
|
41
|
+
send_in_same_thread: boolean;
|
|
42
|
+
wait_for_new_contacts: boolean;
|
|
43
|
+
paused_at: string | null;
|
|
44
|
+
resumed_at: string | null;
|
|
45
|
+
/** Sequence kind. Immutable after creation. "cold_outbound" (default) or "nurture". */
|
|
46
|
+
sequence_kind?: string | null;
|
|
47
|
+
/** Pinned mailbox for nurture sequences; null for cold_outbound. Immutable. */
|
|
48
|
+
pinned_mailbox_id?: number | null;
|
|
49
|
+
created_at: string | null;
|
|
50
|
+
updated_at: string | null;
|
|
51
|
+
}
|
|
52
|
+
export interface SequenceContactItem {
|
|
53
|
+
id: string | null;
|
|
54
|
+
contact_id: number | null;
|
|
55
|
+
state: string | null;
|
|
56
|
+
current_step_order: number | null;
|
|
57
|
+
created_at: string | null;
|
|
58
|
+
updated_at: string | null;
|
|
59
|
+
}
|
|
60
|
+
export interface SequenceContactsParams {
|
|
61
|
+
page?: number;
|
|
62
|
+
limit?: number;
|
|
63
|
+
/** Filter by contact state (e.g. "active", "completed", "replied"). */
|
|
64
|
+
state?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface SequenceActionResult {
|
|
67
|
+
sequence_id: string;
|
|
68
|
+
status: string;
|
|
69
|
+
contacts_affected: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Step type. Note: LinkedIn flows use "HEYREACH" — there is no "LINKEDIN" step type.
|
|
73
|
+
* Server is case-insensitive on input but stores uppercase.
|
|
74
|
+
*/
|
|
75
|
+
export type SequenceStepType = "EMAIL" | "PHONE" | "SMS" | "WHATSAPP" | "HEYREACH" | "MANUAL_DIALER";
|
|
76
|
+
export type SequenceStepInputType = "ON_DEMAND" | "MANUAL_TEMPLATE" | "AI_GENERATED_TEMPLATE";
|
|
77
|
+
export interface SequenceStepConfig {
|
|
78
|
+
step_order: number;
|
|
79
|
+
step_type: SequenceStepType | string;
|
|
80
|
+
/** Defaults to "ON_DEMAND". */
|
|
81
|
+
input_type?: SequenceStepInputType | string;
|
|
82
|
+
/** Wait time before this step in seconds. Defaults to 0. */
|
|
83
|
+
time_interval?: number;
|
|
84
|
+
/** Template body, AI prompt, or other step-type-specific config. */
|
|
85
|
+
step_data?: Record<string, unknown>;
|
|
86
|
+
}
|
|
87
|
+
export interface SequenceChannelConfig {
|
|
88
|
+
channel_id: number;
|
|
89
|
+
channel_value: string;
|
|
90
|
+
channel_type: string;
|
|
91
|
+
channel_data?: Record<string, unknown>;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Sequence kind. A "nurture" is an ordinary sequence with `sequence_kind:
|
|
95
|
+
* "nurture"` — same step types as cold outreach, but pinned to a single mailbox
|
|
96
|
+
* with a higher daily email cap. There is no separate nurture client; create one
|
|
97
|
+
* via `sequences.create({ sequence_kind: "nurture", pinned_mailbox_id })`.
|
|
98
|
+
*/
|
|
99
|
+
export type SequenceKind = "cold_outbound" | "nurture";
|
|
100
|
+
export interface SequenceCreateParams {
|
|
101
|
+
name: string;
|
|
102
|
+
user_email: string;
|
|
103
|
+
description?: string;
|
|
104
|
+
finish_on_reply?: boolean;
|
|
105
|
+
send_in_same_thread?: boolean;
|
|
106
|
+
wait_for_new_contacts?: boolean;
|
|
107
|
+
associated_list_id?: number;
|
|
108
|
+
steps?: SequenceStepConfig[];
|
|
109
|
+
channels?: SequenceChannelConfig[];
|
|
110
|
+
campaign_id?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Sequence kind. Defaults to "cold_outbound" server-side. Immutable after
|
|
113
|
+
* creation. "nurture" requires `pinned_mailbox_id` and is gated by the
|
|
114
|
+
* ENABLE_NURTURE feature flag.
|
|
115
|
+
*/
|
|
116
|
+
sequence_kind?: SequenceKind;
|
|
117
|
+
/**
|
|
118
|
+
* Mailbox to pin for a nurture sequence. Required when
|
|
119
|
+
* `sequence_kind: "nurture"`; all email channels must use this mailbox.
|
|
120
|
+
* Ignored for cold_outbound sequences.
|
|
121
|
+
*/
|
|
122
|
+
pinned_mailbox_id?: number;
|
|
123
|
+
}
|
|
124
|
+
export interface SequenceCreateResult {
|
|
125
|
+
id: string;
|
|
126
|
+
name: string;
|
|
127
|
+
status: string;
|
|
128
|
+
created_at: string | null;
|
|
129
|
+
}
|
|
130
|
+
export interface SequenceUpdateParams {
|
|
131
|
+
name?: string;
|
|
132
|
+
description?: string;
|
|
133
|
+
is_shared?: boolean;
|
|
134
|
+
finish_on_reply?: boolean;
|
|
135
|
+
send_in_same_thread?: boolean;
|
|
136
|
+
wait_for_new_contacts?: boolean;
|
|
137
|
+
schedule_id?: string;
|
|
138
|
+
appointment_id?: number;
|
|
139
|
+
}
|
|
140
|
+
export interface SequenceStepUpdateParams {
|
|
141
|
+
step_data?: Record<string, unknown>;
|
|
142
|
+
time_interval?: number;
|
|
143
|
+
step_type?: SequenceStepType | string;
|
|
144
|
+
input_type?: SequenceStepInputType | string;
|
|
145
|
+
}
|
|
146
|
+
export interface SequencePreviewStep {
|
|
147
|
+
id: string;
|
|
148
|
+
step_order: number;
|
|
149
|
+
step_type: string;
|
|
150
|
+
input_type: string;
|
|
151
|
+
time_interval: number | null;
|
|
152
|
+
step_data: Record<string, unknown> | null;
|
|
153
|
+
}
|
|
154
|
+
export interface SequencePreviewChannel {
|
|
155
|
+
id: string;
|
|
156
|
+
channel_id: number | null;
|
|
157
|
+
channel_value: string | null;
|
|
158
|
+
channel_type: string | null;
|
|
159
|
+
}
|
|
160
|
+
export interface SequencePreview {
|
|
161
|
+
id: string;
|
|
162
|
+
name: string | null;
|
|
163
|
+
status: string | null;
|
|
164
|
+
description: string | null;
|
|
165
|
+
steps: SequencePreviewStep[];
|
|
166
|
+
channels: SequencePreviewChannel[];
|
|
167
|
+
}
|
|
168
|
+
export interface SequenceAnalytics {
|
|
169
|
+
overview: Record<string, unknown>;
|
|
170
|
+
performance: Record<string, unknown>;
|
|
171
|
+
engagement: Record<string, unknown>;
|
|
172
|
+
timeline: Record<string, unknown>[];
|
|
173
|
+
contact_distribution: Record<string, unknown>;
|
|
174
|
+
step_breakdown: Record<string, unknown>[];
|
|
175
|
+
step_creation_methods: Record<string, unknown>[];
|
|
176
|
+
sender_distribution: Record<string, unknown>[];
|
|
177
|
+
}
|
|
178
|
+
export interface PaginationMeta {
|
|
179
|
+
page: number;
|
|
180
|
+
limit: number;
|
|
181
|
+
total: number;
|
|
182
|
+
has_next: boolean;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Sequences API — list, create, run, pause, update, analyze multi-channel sequences.
|
|
186
|
+
* Requires API key (server-side).
|
|
187
|
+
*
|
|
188
|
+
* Backed by:
|
|
189
|
+
* GET /api/v1/sequences
|
|
190
|
+
* POST /api/v1/sequences
|
|
191
|
+
* GET /api/v1/sequences/{sequence_id}
|
|
192
|
+
* PATCH /api/v1/sequences/{sequence_id}
|
|
193
|
+
* DELETE /api/v1/sequences/{sequence_id}
|
|
194
|
+
* GET /api/v1/sequences/{sequence_id}/contacts
|
|
195
|
+
* POST /api/v1/sequences/{sequence_id}/contacts
|
|
196
|
+
* POST /api/v1/sequences/{sequence_id}/run
|
|
197
|
+
* POST /api/v1/sequences/{sequence_id}/pause
|
|
198
|
+
* POST /api/v1/sequences/{sequence_id}/resume
|
|
199
|
+
* PATCH /api/v1/sequences/{sequence_id}/steps/{step_id}
|
|
200
|
+
* GET /api/v1/sequences/{sequence_id}/preview
|
|
201
|
+
* GET /api/v1/sequences/{sequence_id}/analytics
|
|
202
|
+
*/
|
|
203
|
+
export declare const createSequencesClient: (apiKey: string, apiUrl?: string) => {
|
|
204
|
+
/** List sequences with pagination + optional status filter. */
|
|
205
|
+
list: {
|
|
206
|
+
(): Promise<SequenceListItem[]>;
|
|
207
|
+
(page: number, limit?: number): Promise<SequenceListItem[]>;
|
|
208
|
+
(params: SequenceListParams): Promise<SequenceListItem[]>;
|
|
209
|
+
};
|
|
210
|
+
/** Get full sequence details by ID. */
|
|
211
|
+
get(sequenceId: string): Promise<SequenceDetail>;
|
|
212
|
+
/** List contacts enrolled in a sequence. Filter by state (e.g. "active", "replied"). */
|
|
213
|
+
contacts(sequenceId: string, params?: SequenceContactsParams): Promise<{
|
|
214
|
+
data: SequenceContactItem[];
|
|
215
|
+
pagination?: PaginationMeta;
|
|
216
|
+
}>;
|
|
217
|
+
/**
|
|
218
|
+
* Add contacts to a sequence (V2 queuing). Live or drafted sequences only.
|
|
219
|
+
* Pass `idempotencyKey` to make a retry safe — the same key returns the
|
|
220
|
+
* first result instead of re-enrolling on a 5xx-then-success (A6).
|
|
221
|
+
*/
|
|
222
|
+
add(config: AddToSequenceConfig, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
223
|
+
/**
|
|
224
|
+
* Create a new sequence with optional steps + channels. Pass `idempotencyKey`
|
|
225
|
+
* to make a retry safe — the same key returns the first result instead of
|
|
226
|
+
* creating a duplicate sequence on a 5xx-then-success (A6).
|
|
227
|
+
*/
|
|
228
|
+
create(payload: SequenceCreateParams, idempotencyKey?: string): Promise<SequenceCreateResult>;
|
|
229
|
+
/** Update sequence metadata. Rejected (409) if sequence is in a transitional status. */
|
|
230
|
+
update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
|
|
231
|
+
/** Update a single step within a sequence. */
|
|
232
|
+
updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
|
|
233
|
+
/** Soft-delete (archive) a sequence. */
|
|
234
|
+
delete(sequenceId: string): Promise<SequenceActionResult>;
|
|
235
|
+
/**
|
|
236
|
+
* Run/start a DRAFTED sequence (V2 orchestration). Pass `idempotencyKey` to
|
|
237
|
+
* make a retry safe — the same key won't re-trigger the run on a
|
|
238
|
+
* 5xx-then-success (A6).
|
|
239
|
+
*/
|
|
240
|
+
run(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
241
|
+
/**
|
|
242
|
+
* Pause a live sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
243
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
244
|
+
*/
|
|
245
|
+
pause(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
246
|
+
/**
|
|
247
|
+
* Resume a paused sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
248
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
249
|
+
*/
|
|
250
|
+
resume(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
251
|
+
/** Read-only sequence preview with all steps + channels (no enrollment). */
|
|
252
|
+
preview(sequenceId: string): Promise<SequencePreview>;
|
|
253
|
+
/** Comprehensive analytics for a sequence. */
|
|
254
|
+
analytics(sequenceId: string): Promise<SequenceAnalytics>;
|
|
255
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IntentSignals {
|
|
2
|
+
domain: string;
|
|
3
|
+
score: number;
|
|
4
|
+
intent: "low" | "medium" | "high";
|
|
5
|
+
signals: string[];
|
|
6
|
+
last_seen: string | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Intent signals - company-level buying signals. Write key for public, API key for full access.
|
|
10
|
+
*/
|
|
11
|
+
export declare const createSignalsClient: (key: string, isApiKey: boolean, apiUrl?: string) => {
|
|
12
|
+
/**
|
|
13
|
+
* Get intent signals for a specific company domain.
|
|
14
|
+
*
|
|
15
|
+
* With an API key this throws a `G8Error` on any failure; a 403 means the
|
|
16
|
+
* key lacks the `intent:read` scope. With a write key only, a failure still
|
|
17
|
+
* resolves to an all-zeros result (legacy browser behaviour).
|
|
18
|
+
*/
|
|
19
|
+
company(domain: string): Promise<IntentSignals>;
|
|
20
|
+
/**
|
|
21
|
+
* Stream intent signals - calls callback every 30s with latest data.
|
|
22
|
+
*
|
|
23
|
+
* A failed poll is skipped. An auth failure (401/403) cannot fix itself by
|
|
24
|
+
* waiting, so it stops the stream and is logged once instead of polling a
|
|
25
|
+
* forbidden route every 30s forever.
|
|
26
|
+
*/
|
|
27
|
+
stream(domains: string[], callback: (signals: IntentSignals[]) => void): () => void;
|
|
28
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
export type SkillType = "llm" | "api";
|
|
2
|
+
export interface SkillInputField {
|
|
3
|
+
name: string;
|
|
4
|
+
type: string;
|
|
5
|
+
required: boolean;
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface Skill {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string | null;
|
|
12
|
+
type: SkillType;
|
|
13
|
+
/** Only present on `type=llm`. */
|
|
14
|
+
prompt?: string;
|
|
15
|
+
/** Only present on `type=llm`. */
|
|
16
|
+
model?: string;
|
|
17
|
+
/** Only present on `type=api`. */
|
|
18
|
+
method?: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
19
|
+
/** Only present on `type=api`. */
|
|
20
|
+
url?: string;
|
|
21
|
+
/** Only present on `type=api`. */
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
/** Only present on `type=api`. */
|
|
24
|
+
body_template?: string;
|
|
25
|
+
input_schema: {
|
|
26
|
+
fields: SkillInputField[];
|
|
27
|
+
};
|
|
28
|
+
output_schema: Record<string, unknown> | null;
|
|
29
|
+
created_at: string | null;
|
|
30
|
+
updated_at: string | null;
|
|
31
|
+
}
|
|
32
|
+
export interface SkillCreateLLMParams {
|
|
33
|
+
title: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
prompt: string;
|
|
36
|
+
model: string;
|
|
37
|
+
input_schema: {
|
|
38
|
+
fields: SkillInputField[];
|
|
39
|
+
};
|
|
40
|
+
output_schema?: Record<string, unknown>;
|
|
41
|
+
}
|
|
42
|
+
export interface SkillCreateAPIParams {
|
|
43
|
+
title: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
method: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
46
|
+
url: string;
|
|
47
|
+
headers?: Record<string, string>;
|
|
48
|
+
body_template?: string;
|
|
49
|
+
response_mapping?: Record<string, string>;
|
|
50
|
+
input_schema: {
|
|
51
|
+
fields: SkillInputField[];
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface SkillUpdateLLMParams {
|
|
55
|
+
title?: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
prompt?: string;
|
|
58
|
+
model?: string;
|
|
59
|
+
input_schema?: {
|
|
60
|
+
fields: SkillInputField[];
|
|
61
|
+
};
|
|
62
|
+
output_schema?: Record<string, unknown>;
|
|
63
|
+
}
|
|
64
|
+
export interface SkillUpdateAPIParams {
|
|
65
|
+
title?: string;
|
|
66
|
+
description?: string;
|
|
67
|
+
method?: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
68
|
+
url?: string;
|
|
69
|
+
headers?: Record<string, string>;
|
|
70
|
+
body_template?: string;
|
|
71
|
+
response_mapping?: Record<string, string>;
|
|
72
|
+
input_schema?: {
|
|
73
|
+
fields: SkillInputField[];
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface SkillTemplate {
|
|
77
|
+
id: string;
|
|
78
|
+
title: string;
|
|
79
|
+
description: string;
|
|
80
|
+
type: SkillType;
|
|
81
|
+
use_cases: string[];
|
|
82
|
+
}
|
|
83
|
+
export interface SkillListParams {
|
|
84
|
+
page?: number;
|
|
85
|
+
limit?: number;
|
|
86
|
+
type?: SkillType;
|
|
87
|
+
search?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Skills API - LLM and API building blocks that workflows compose into runs.
|
|
91
|
+
* Requires API key (server-side).
|
|
92
|
+
*
|
|
93
|
+
* Backed by:
|
|
94
|
+
* GET /api/v1/skills
|
|
95
|
+
* GET /api/v1/skills/{id}
|
|
96
|
+
* GET /api/v1/skills/{id}/variables
|
|
97
|
+
* GET /api/v1/skills/models
|
|
98
|
+
* GET /api/v1/skills/templates
|
|
99
|
+
* POST /api/v1/skills (both llm + api types via `type` field)
|
|
100
|
+
* POST /api/v1/skills/from-template
|
|
101
|
+
* POST /api/v1/skills/from-node
|
|
102
|
+
* PUT /api/v1/skills/{id}
|
|
103
|
+
* DELETE /api/v1/skills/{id}
|
|
104
|
+
* POST /api/v1/skills/validate
|
|
105
|
+
* POST /api/v1/skills/{id}/execute
|
|
106
|
+
*/
|
|
107
|
+
export declare const createSkillsClient: (apiKey: string, apiUrl?: string) => {
|
|
108
|
+
/** List skills. */
|
|
109
|
+
list(params?: SkillListParams): Promise<{
|
|
110
|
+
data: Skill[];
|
|
111
|
+
}>;
|
|
112
|
+
/** Get a skill by ID. */
|
|
113
|
+
get(skillId: string): Promise<Skill>;
|
|
114
|
+
/** Get the variables required by a skill (extracted from prompt or body template). */
|
|
115
|
+
getVariables(skillId: string): Promise<{
|
|
116
|
+
data: SkillInputField[];
|
|
117
|
+
}>;
|
|
118
|
+
/** List available LLM models. */
|
|
119
|
+
listModels(): Promise<{
|
|
120
|
+
data: Array<{
|
|
121
|
+
id: string;
|
|
122
|
+
label: string;
|
|
123
|
+
provider: string;
|
|
124
|
+
}>;
|
|
125
|
+
}>;
|
|
126
|
+
/** List skill templates. */
|
|
127
|
+
listTemplates(params?: {
|
|
128
|
+
type?: SkillType;
|
|
129
|
+
}): Promise<{
|
|
130
|
+
data: SkillTemplate[];
|
|
131
|
+
}>;
|
|
132
|
+
/** Create an LLM skill (prompt + model + schemas). */
|
|
133
|
+
createLLM(params: SkillCreateLLMParams): Promise<Skill>;
|
|
134
|
+
/** Create an API skill (HTTP request wrapper). */
|
|
135
|
+
createAPI(params: SkillCreateAPIParams): Promise<Skill>;
|
|
136
|
+
/** Create a skill from a built-in template. */
|
|
137
|
+
createFromTemplate(params: {
|
|
138
|
+
title: string;
|
|
139
|
+
template_id: string;
|
|
140
|
+
overrides?: Record<string, unknown>;
|
|
141
|
+
}): Promise<Skill>;
|
|
142
|
+
/** Lift a workflow node into a reusable skill. */
|
|
143
|
+
createFromNode(params: {
|
|
144
|
+
title: string;
|
|
145
|
+
description?: string;
|
|
146
|
+
node_id: string;
|
|
147
|
+
input_mapping?: Record<string, string>;
|
|
148
|
+
output_mapping?: Record<string, string>;
|
|
149
|
+
}): Promise<Skill>;
|
|
150
|
+
/** Update an LLM skill. */
|
|
151
|
+
updateLLM(skillId: string, fields: SkillUpdateLLMParams): Promise<Skill>;
|
|
152
|
+
/** Update an API skill. */
|
|
153
|
+
updateAPI(skillId: string, fields: SkillUpdateAPIParams): Promise<Skill>;
|
|
154
|
+
/** Delete a skill (irreversible if in-use workflows exist). */
|
|
155
|
+
delete(skillId: string): Promise<{
|
|
156
|
+
data: {
|
|
157
|
+
deleted: boolean;
|
|
158
|
+
};
|
|
159
|
+
}>;
|
|
160
|
+
/** Validate a skill definition (without saving). */
|
|
161
|
+
validate(skill: Partial<Skill>): Promise<{
|
|
162
|
+
data: {
|
|
163
|
+
valid: boolean;
|
|
164
|
+
errors: string[];
|
|
165
|
+
};
|
|
166
|
+
}>;
|
|
167
|
+
/** Execute a skill immediately with an input payload (test / preview). */
|
|
168
|
+
execute(skillId: string, inputPayload: Record<string, unknown>): Promise<{
|
|
169
|
+
data: {
|
|
170
|
+
output: Record<string, unknown>;
|
|
171
|
+
latency_ms: number;
|
|
172
|
+
tokens?: number;
|
|
173
|
+
error: string | null;
|
|
174
|
+
};
|
|
175
|
+
}>;
|
|
176
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface Snippet {
|
|
2
|
+
write_key: string;
|
|
3
|
+
tracking_host: string;
|
|
4
|
+
domains: string[];
|
|
5
|
+
/** Ready-to-use React component import for @graph8/nextjs. */
|
|
6
|
+
react_snippet: string;
|
|
7
|
+
/** Vanilla JS script tag for non-React apps. */
|
|
8
|
+
script_tag: string;
|
|
9
|
+
/** Full configuration object (gtm/config.json). */
|
|
10
|
+
config: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Snippet API — fetch your org's graph8 tracking snippet programmatically, to
|
|
14
|
+
* embed the tracker into an app or a customer's site (the write key, a React
|
|
15
|
+
* component, a vanilla `<script>` tag, allowed domains, and the full config).
|
|
16
|
+
* Requires an API key (server-side). Built on the hardened HTTP core, so it
|
|
17
|
+
* throws a typed `G8Error` on failure and retries transient errors.
|
|
18
|
+
*
|
|
19
|
+
* Backed by `GET /api/v1/snippet`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const createSnippetClient: (apiKey: string, apiUrl?: string) => {
|
|
22
|
+
/** Get your org's tracking snippet (write key + React/script-tag embeds + config). */
|
|
23
|
+
get(): Promise<Snippet>;
|
|
24
|
+
};
|