@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.
Files changed (350) hide show
  1. package/README.md +9 -2
  2. package/dist/cli.js +216 -0
  3. package/dist/index.d.mts +105 -7
  4. package/dist/index.d.ts +105 -7
  5. package/dist/index.js +44 -3
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +44 -3
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/react.d.mts +103 -7
  10. package/dist/react.d.ts +103 -7
  11. package/dist/react.js +62 -11
  12. package/dist/react.js.map +1 -1
  13. package/dist/react.mjs +53 -12
  14. package/dist/react.mjs.map +1 -1
  15. package/dist/types/README.md +7 -0
  16. package/dist/types/agency.d.ts +20 -0
  17. package/dist/types/agentSetup.d.ts +57 -0
  18. package/dist/types/api.d.ts +127 -0
  19. package/dist/types/appClient.d.ts +99 -0
  20. package/dist/types/appPlatform.d.ts +269 -0
  21. package/dist/types/appTokens.d.ts +125 -0
  22. package/dist/types/apps.d.ts +130 -0
  23. package/dist/types/audiences.d.ts +88 -0
  24. package/dist/types/calendar.d.ts +55 -0
  25. package/dist/types/campaigns.d.ts +61 -0
  26. package/dist/types/chat.d.ts +35 -0
  27. package/dist/types/cli.d.ts +14 -0
  28. package/dist/types/companies.d.ts +123 -0
  29. package/dist/types/contacts.d.ts +200 -0
  30. package/dist/types/copilot.d.ts +31 -0
  31. package/dist/types/core.d.ts +1052 -0
  32. package/dist/types/deals.d.ts +215 -0
  33. package/dist/types/enrich.d.ts +51 -0
  34. package/dist/types/fields.d.ts +84 -0
  35. package/dist/types/forms.d.ts +16 -0
  36. package/dist/types/http.d.ts +141 -0
  37. package/dist/types/inbox.d.ts +123 -0
  38. package/dist/types/index.d.ts +63 -0
  39. package/dist/types/intent.d.ts +196 -0
  40. package/dist/types/lists.d.ts +44 -0
  41. package/dist/types/mailboxes.d.ts +240 -0
  42. package/dist/types/marketplace.d.ts +62 -0
  43. package/dist/types/meetings.d.ts +70 -0
  44. package/dist/types/newsletter.d.ts +212 -0
  45. package/dist/types/notes.d.ts +57 -0
  46. package/dist/types/objects.d.ts +281 -0
  47. package/dist/types/pipelines.d.ts +135 -0
  48. package/dist/types/quotes.d.ts +143 -0
  49. package/dist/types/react.d.ts +978 -0
  50. package/dist/types/search.d.ts +99 -0
  51. package/dist/types/sequences.d.ts +255 -0
  52. package/dist/types/signals.d.ts +28 -0
  53. package/dist/types/skills.d.ts +176 -0
  54. package/dist/types/snippet.d.ts +24 -0
  55. package/dist/types/studio.d.ts +161 -0
  56. package/dist/types/tasks.d.ts +101 -0
  57. package/dist/types/types.d.ts +45 -0
  58. package/dist/types/utils.d.ts +21 -0
  59. package/dist/types/version.d.ts +10 -0
  60. package/dist/types/visitors.d.ts +29 -0
  61. package/dist/types/voice.d.ts +304 -0
  62. package/dist/types/webhooks.d.ts +71 -0
  63. package/dist/types/workflows.d.ts +229 -0
  64. package/docs/agents.md +748 -0
  65. package/docs/api/README.md +165 -0
  66. package/docs/api/accounts.d.ts +396 -0
  67. package/docs/api/accounts.md +644 -0
  68. package/docs/api/adCampaigns.d.ts +707 -0
  69. package/docs/api/adCampaigns.md +1091 -0
  70. package/docs/api/adCreatives.d.ts +996 -0
  71. package/docs/api/adCreatives.md +1708 -0
  72. package/docs/api/agency.d.ts +556 -0
  73. package/docs/api/agency.md +845 -0
  74. package/docs/api/agent.d.ts +330 -0
  75. package/docs/api/agent.md +514 -0
  76. package/docs/api/agents.d.ts +1622 -0
  77. package/docs/api/agents.md +2860 -0
  78. package/docs/api/aiInbox.d.ts +1984 -0
  79. package/docs/api/aiInbox.md +3490 -0
  80. package/docs/api/analytics.d.ts +1273 -0
  81. package/docs/api/analytics.md +2095 -0
  82. package/docs/api/apiKeys.d.ts +252 -0
  83. package/docs/api/apiKeys.md +318 -0
  84. package/docs/api/appDeployments.d.ts +236 -0
  85. package/docs/api/appDeployments.md +471 -0
  86. package/docs/api/appDomains.d.ts +171 -0
  87. package/docs/api/appDomains.md +281 -0
  88. package/docs/api/appLogs.d.ts +120 -0
  89. package/docs/api/appLogs.md +159 -0
  90. package/docs/api/appObjects.d.ts +415 -0
  91. package/docs/api/appObjects.md +568 -0
  92. package/docs/api/appPages.d.ts +557 -0
  93. package/docs/api/appPages.md +796 -0
  94. package/docs/api/appPlatformTokens.d.ts +123 -0
  95. package/docs/api/appPlatformTokens.md +172 -0
  96. package/docs/api/appointments.d.ts +2361 -0
  97. package/docs/api/appointments.md +3917 -0
  98. package/docs/api/apps.d.ts +822 -0
  99. package/docs/api/apps.md +1342 -0
  100. package/docs/api/assertUpsert.d.ts +286 -0
  101. package/docs/api/assertUpsert.md +370 -0
  102. package/docs/api/audienceSyncs.d.ts +259 -0
  103. package/docs/api/audienceSyncs.md +395 -0
  104. package/docs/api/brandKit.d.ts +686 -0
  105. package/docs/api/brandKit.md +1133 -0
  106. package/docs/api/bugReports.d.ts +181 -0
  107. package/docs/api/bugReports.md +268 -0
  108. package/docs/api/by-path.md +3260 -0
  109. package/docs/api/calendarInvites.d.ts +117 -0
  110. package/docs/api/calendarInvites.md +148 -0
  111. package/docs/api/campaignWorkflows.d.ts +152 -0
  112. package/docs/api/campaignWorkflows.md +200 -0
  113. package/docs/api/campaigns.d.ts +721 -0
  114. package/docs/api/campaigns.md +1236 -0
  115. package/docs/api/channels.d.ts +171 -0
  116. package/docs/api/channels.md +235 -0
  117. package/docs/api/cliCampaigns.d.ts +205 -0
  118. package/docs/api/cliCampaigns.md +256 -0
  119. package/docs/api/cliPipelines.d.ts +324 -0
  120. package/docs/api/cliPipelines.md +562 -0
  121. package/docs/api/clickHouse.d.ts +115 -0
  122. package/docs/api/clickHouse.md +138 -0
  123. package/docs/api/companies.d.ts +1636 -0
  124. package/docs/api/companies.md +2211 -0
  125. package/docs/api/companyIntelligence.d.ts +299 -0
  126. package/docs/api/companyIntelligence.md +488 -0
  127. package/docs/api/contacts.d.ts +2173 -0
  128. package/docs/api/contacts.md +3143 -0
  129. package/docs/api/content.d.ts +968 -0
  130. package/docs/api/content.md +1667 -0
  131. package/docs/api/contentGridSkills.d.ts +177 -0
  132. package/docs/api/contentGridSkills.md +271 -0
  133. package/docs/api/copilot.d.ts +1017 -0
  134. package/docs/api/copilot.md +1765 -0
  135. package/docs/api/crmSyncs.d.ts +215 -0
  136. package/docs/api/crmSyncs.md +301 -0
  137. package/docs/api/customerSuccess.d.ts +491 -0
  138. package/docs/api/customerSuccess.md +776 -0
  139. package/docs/api/deals.d.ts +1697 -0
  140. package/docs/api/deals.md +2436 -0
  141. package/docs/api/deliverability.d.ts +418 -0
  142. package/docs/api/deliverability.md +677 -0
  143. package/docs/api/desk.d.ts +1765 -0
  144. package/docs/api/desk.md +3007 -0
  145. package/docs/api/dialer.d.ts +1185 -0
  146. package/docs/api/dialer.md +2166 -0
  147. package/docs/api/dialerAnalytics.d.ts +187 -0
  148. package/docs/api/dialerAnalytics.md +257 -0
  149. package/docs/api/documents.d.ts +895 -0
  150. package/docs/api/documents.md +1440 -0
  151. package/docs/api/duplicates.d.ts +195 -0
  152. package/docs/api/duplicates.md +315 -0
  153. package/docs/api/eSign.d.ts +38 -0
  154. package/docs/api/eSign.md +54 -0
  155. package/docs/api/eSignature.d.ts +242 -0
  156. package/docs/api/eSignature.md +341 -0
  157. package/docs/api/enrichment.d.ts +3207 -0
  158. package/docs/api/enrichment.md +5225 -0
  159. package/docs/api/events.d.ts +115 -0
  160. package/docs/api/events.md +105 -0
  161. package/docs/api/fields.d.ts +482 -0
  162. package/docs/api/fields.md +566 -0
  163. package/docs/api/forms.d.ts +1012 -0
  164. package/docs/api/forms.md +1542 -0
  165. package/docs/api/gtmCampaigns.d.ts +662 -0
  166. package/docs/api/gtmCampaigns.md +1044 -0
  167. package/docs/api/gtmContext.d.ts +1187 -0
  168. package/docs/api/gtmContext.md +2112 -0
  169. package/docs/api/gtmDeliverability.d.ts +60 -0
  170. package/docs/api/gtmDeliverability.md +63 -0
  171. package/docs/api/gtmKnowledgeBase.d.ts +76 -0
  172. package/docs/api/gtmKnowledgeBase.md +91 -0
  173. package/docs/api/gtmLaunchHelpers.d.ts +123 -0
  174. package/docs/api/gtmLaunchHelpers.md +148 -0
  175. package/docs/api/gtmLibrary.d.ts +448 -0
  176. package/docs/api/gtmLibrary.md +780 -0
  177. package/docs/api/health.d.ts +39 -0
  178. package/docs/api/health.md +58 -0
  179. package/docs/api/imageLibrary.d.ts +341 -0
  180. package/docs/api/imageLibrary.md +569 -0
  181. package/docs/api/imports.d.ts +157 -0
  182. package/docs/api/imports.md +174 -0
  183. package/docs/api/inbox.d.ts +709 -0
  184. package/docs/api/inbox.md +1067 -0
  185. package/docs/api/install.d.ts +213 -0
  186. package/docs/api/install.md +317 -0
  187. package/docs/api/installedApps.d.ts +131 -0
  188. package/docs/api/installedApps.md +241 -0
  189. package/docs/api/integrationStatus.d.ts +142 -0
  190. package/docs/api/integrationStatus.md +205 -0
  191. package/docs/api/integrations.d.ts +2327 -0
  192. package/docs/api/integrations.md +3791 -0
  193. package/docs/api/intent.d.ts +482 -0
  194. package/docs/api/intent.md +858 -0
  195. package/docs/api/knowledge.d.ts +501 -0
  196. package/docs/api/knowledge.md +843 -0
  197. package/docs/api/knowledgeBase.d.ts +84 -0
  198. package/docs/api/knowledgeBase.md +96 -0
  199. package/docs/api/landingPages.d.ts +1411 -0
  200. package/docs/api/landingPages.md +2488 -0
  201. package/docs/api/leads.d.ts +133 -0
  202. package/docs/api/leads.md +180 -0
  203. package/docs/api/library.d.ts +217 -0
  204. package/docs/api/library.md +338 -0
  205. package/docs/api/linkedIn.d.ts +227 -0
  206. package/docs/api/linkedIn.md +289 -0
  207. package/docs/api/linkedInOutreach.d.ts +727 -0
  208. package/docs/api/linkedInOutreach.md +990 -0
  209. package/docs/api/lists.d.ts +1106 -0
  210. package/docs/api/lists.md +1609 -0
  211. package/docs/api/logs.d.ts +71 -0
  212. package/docs/api/logs.md +70 -0
  213. package/docs/api/mailboxes.d.ts +1050 -0
  214. package/docs/api/mailboxes.md +1690 -0
  215. package/docs/api/marketingIntelligence.d.ts +256 -0
  216. package/docs/api/marketingIntelligence.md +454 -0
  217. package/docs/api/marketplace.d.ts +3173 -0
  218. package/docs/api/marketplace.md +5953 -0
  219. package/docs/api/mcp.d.ts +69 -0
  220. package/docs/api/mcp.md +69 -0
  221. package/docs/api/me.d.ts +54 -0
  222. package/docs/api/me.md +56 -0
  223. package/docs/api/meetings.d.ts +539 -0
  224. package/docs/api/meetings.md +747 -0
  225. package/docs/api/newsletter.d.ts +1613 -0
  226. package/docs/api/newsletter.md +2746 -0
  227. package/docs/api/notes.d.ts +517 -0
  228. package/docs/api/notes.md +888 -0
  229. package/docs/api/notifications.d.ts +94 -0
  230. package/docs/api/notifications.md +105 -0
  231. package/docs/api/objects.d.ts +621 -0
  232. package/docs/api/objects.md +1098 -0
  233. package/docs/api/openSearch.d.ts +234 -0
  234. package/docs/api/openSearch.md +297 -0
  235. package/docs/api/ops.d.ts +299 -0
  236. package/docs/api/ops.md +339 -0
  237. package/docs/api/orgGovernance.d.ts +393 -0
  238. package/docs/api/orgGovernance.md +623 -0
  239. package/docs/api/orgVideos.d.ts +184 -0
  240. package/docs/api/orgVideos.md +252 -0
  241. package/docs/api/organizationSettings.d.ts +626 -0
  242. package/docs/api/organizationSettings.md +911 -0
  243. package/docs/api/phoneNumbers.d.ts +484 -0
  244. package/docs/api/phoneNumbers.md +777 -0
  245. package/docs/api/profile.d.ts +329 -0
  246. package/docs/api/profile.md +540 -0
  247. package/docs/api/programmaticPages.d.ts +400 -0
  248. package/docs/api/programmaticPages.md +626 -0
  249. package/docs/api/providerDomains.d.ts +866 -0
  250. package/docs/api/providerDomains.md +1446 -0
  251. package/docs/api/providerUsage.d.ts +129 -0
  252. package/docs/api/providerUsage.md +186 -0
  253. package/docs/api/public.d.ts +69 -0
  254. package/docs/api/public.md +78 -0
  255. package/docs/api/publicCopilot.d.ts +67 -0
  256. package/docs/api/publicCopilot.md +80 -0
  257. package/docs/api/publicSignals.d.ts +66 -0
  258. package/docs/api/publicSignals.md +71 -0
  259. package/docs/api/publicVisitors.d.ts +97 -0
  260. package/docs/api/publicVisitors.md +118 -0
  261. package/docs/api/quotes.d.ts +1564 -0
  262. package/docs/api/quotes.md +2553 -0
  263. package/docs/api/radar.d.ts +808 -0
  264. package/docs/api/radar.md +1431 -0
  265. package/docs/api/radarReports.d.ts +208 -0
  266. package/docs/api/radarReports.md +306 -0
  267. package/docs/api/recordRoles.d.ts +143 -0
  268. package/docs/api/recordRoles.md +175 -0
  269. package/docs/api/repos.d.ts +146 -0
  270. package/docs/api/repos.md +211 -0
  271. package/docs/api/research.d.ts +295 -0
  272. package/docs/api/research.md +534 -0
  273. package/docs/api/revenue.d.ts +402 -0
  274. package/docs/api/revenue.md +608 -0
  275. package/docs/api/revenueAnalytics.d.ts +147 -0
  276. package/docs/api/revenueAnalytics.md +212 -0
  277. package/docs/api/revenueLifecycle.d.ts +207 -0
  278. package/docs/api/revenueLifecycle.md +274 -0
  279. package/docs/api/revenueRecords.d.ts +372 -0
  280. package/docs/api/revenueRecords.md +563 -0
  281. package/docs/api/roles.d.ts +431 -0
  282. package/docs/api/roles.md +812 -0
  283. package/docs/api/salesCoach.d.ts +877 -0
  284. package/docs/api/salesCoach.md +1540 -0
  285. package/docs/api/sandbox.d.ts +210 -0
  286. package/docs/api/sandbox.md +380 -0
  287. package/docs/api/scans.d.ts +104 -0
  288. package/docs/api/scans.md +136 -0
  289. package/docs/api/scheduleBuy.d.ts +293 -0
  290. package/docs/api/scheduleBuy.md +431 -0
  291. package/docs/api/scraping.d.ts +266 -0
  292. package/docs/api/scraping.md +383 -0
  293. package/docs/api/sdrAnalytics.d.ts +138 -0
  294. package/docs/api/sdrAnalytics.md +246 -0
  295. package/docs/api/search.d.ts +598 -0
  296. package/docs/api/search.md +866 -0
  297. package/docs/api/seo.d.ts +447 -0
  298. package/docs/api/seo.md +660 -0
  299. package/docs/api/sequenceLifecycle.d.ts +439 -0
  300. package/docs/api/sequenceLifecycle.md +513 -0
  301. package/docs/api/sequences.d.ts +1936 -0
  302. package/docs/api/sequences.md +3232 -0
  303. package/docs/api/settings.d.ts +448 -0
  304. package/docs/api/settings.md +731 -0
  305. package/docs/api/signals.d.ts +1441 -0
  306. package/docs/api/signals.md +2526 -0
  307. package/docs/api/signatures.d.ts +719 -0
  308. package/docs/api/signatures.md +1247 -0
  309. package/docs/api/skills.d.ts +230 -0
  310. package/docs/api/skills.md +466 -0
  311. package/docs/api/snippet.d.ts +85 -0
  312. package/docs/api/snippet.md +106 -0
  313. package/docs/api/socialPublishing.d.ts +824 -0
  314. package/docs/api/socialPublishing.md +1245 -0
  315. package/docs/api/studioDocuments.d.ts +244 -0
  316. package/docs/api/studioDocuments.md +348 -0
  317. package/docs/api/support.d.ts +90 -0
  318. package/docs/api/support.md +76 -0
  319. package/docs/api/suppressions.d.ts +241 -0
  320. package/docs/api/suppressions.md +343 -0
  321. package/docs/api/surveys.d.ts +847 -0
  322. package/docs/api/surveys.md +1223 -0
  323. package/docs/api/tasks.d.ts +813 -0
  324. package/docs/api/tasks.md +1344 -0
  325. package/docs/api/teamMembers.d.ts +668 -0
  326. package/docs/api/teamMembers.md +1040 -0
  327. package/docs/api/teams.d.ts +784 -0
  328. package/docs/api/teams.md +1395 -0
  329. package/docs/api/usage.d.ts +277 -0
  330. package/docs/api/usage.md +389 -0
  331. package/docs/api/visitors.d.ts +690 -0
  332. package/docs/api/visitors.md +1075 -0
  333. package/docs/api/voice.d.ts +4661 -0
  334. package/docs/api/voice.md +7905 -0
  335. package/docs/api/webAnalytics.d.ts +964 -0
  336. package/docs/api/webAnalytics.md +1452 -0
  337. package/docs/api/webChat.d.ts +1704 -0
  338. package/docs/api/webChat.md +2048 -0
  339. package/docs/api/webhooks.d.ts +251 -0
  340. package/docs/api/webhooks.md +386 -0
  341. package/docs/api/websiteEditor.d.ts +324 -0
  342. package/docs/api/websiteEditor.md +517 -0
  343. package/docs/api/work.d.ts +2298 -0
  344. package/docs/api/work.md +3096 -0
  345. package/docs/api/workbench.d.ts +2962 -0
  346. package/docs/api/workbench.md +4884 -0
  347. package/docs/api/workflows.d.ts +1218 -0
  348. package/docs/api/workflows.md +2302 -0
  349. package/docs/sdk-clients.md +4339 -0
  350. package/package.json +10 -3
@@ -0,0 +1,4339 @@
1
+ <!-- Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. -->
2
+
3
+ # Hand-written clients
4
+
5
+ The ergonomic layer: 289 hand-written methods on `g8`. They unwrap the `data` envelope, accept friendlier arguments, and document the gotchas of their endpoint. Use one when it exists; fall back to `g8.api.*` ([api/README.md](api/README.md)) for everything else.
6
+
7
+ Signatures are exactly what your editor shows. Each method links to the REST operation it calls.
8
+
9
+ ## Modules
10
+
11
+ | Module | Methods | Credential |
12
+ |---|---|---|
13
+ | `g8` (init, tracking, identity) | 5 | write key (browser-safe) |
14
+ | [`g8.agency`](#g8-agency) | 2 | API key (server-side) |
15
+ | [`g8.appPlatform`](#g8-appplatform) | 19 | API key (server-side) |
16
+ | [`g8.apps`](#g8-apps) | 7 | API key (server-side) |
17
+ | [`g8.audiences`](#g8-audiences) | 8 | API key (server-side) |
18
+ | [`g8.calendar`](#g8-calendar) | 5 | write key (browser-safe) |
19
+ | [`g8.campaigns`](#g8-campaigns) | 4 | API key (server-side) |
20
+ | [`g8.chat`](#g8-chat) | 5 | write key (browser-safe) |
21
+ | [`g8.companies`](#g8-companies) | 8 | API key (server-side) |
22
+ | [`g8.contacts`](#g8-contacts) | 10 | API key (server-side) |
23
+ | [`g8.copilot`](#g8-copilot) | 5 | write key (browser-safe) |
24
+ | [`g8.deals`](#g8-deals) | 8 | API key (server-side) |
25
+ | [`g8.enrich`](#g8-enrich) | 4 | API key (server-side) |
26
+ | [`g8.fields`](#g8-fields) | 5 | API key (server-side) |
27
+ | [`g8.forms`](#g8-forms) | 1 | write key (browser-safe) |
28
+ | [`g8.inbox`](#g8-inbox) | 6 | API key (server-side) |
29
+ | [`g8.intent`](#g8-intent) | 13 | API key (server-side) |
30
+ | [`g8.lists`](#g8-lists) | 6 | API key (server-side) |
31
+ | [`g8.mailboxes`](#g8-mailboxes) | 7 | API key (server-side) |
32
+ | [`g8.marketplace`](#g8-marketplace) | 5 | API key (server-side) |
33
+ | [`g8.meetings`](#g8-meetings) | 2 | API key (server-side) |
34
+ | [`g8.newsletter`](#g8-newsletter) | 15 | API key (server-side) |
35
+ | [`g8.notes`](#g8-notes) | 8 | API key (server-side) |
36
+ | [`g8.objects`](#g8-objects) | 18 | API key (server-side) |
37
+ | [`g8.pipelines`](#g8-pipelines) | 12 | API key (server-side) |
38
+ | [`g8.quotes`](#g8-quotes) | 12 | API key (server-side) |
39
+ | [`g8.search`](#g8-search) | 4 | API key (server-side) |
40
+ | [`g8.sequences`](#g8-sequences) | 13 | API key (server-side) |
41
+ | [`g8.signals`](#g8-signals) | 2 | write key (browser-safe) |
42
+ | [`g8.skills`](#g8-skills) | 14 | API key (server-side) |
43
+ | [`g8.snippet`](#g8-snippet) | 1 | API key (server-side) |
44
+ | [`g8.studio`](#g8-studio) | 11 | API key (server-side) |
45
+ | [`g8.tasks`](#g8-tasks) | 5 | API key (server-side) |
46
+ | [`g8.visitors`](#g8-visitors) | 3 | write key (browser-safe) |
47
+ | [`g8.voice`](#g8-voice) | 14 | API key (server-side) |
48
+ | [`g8.webhooks`](#g8-webhooks) | 1 | API key (server-side) |
49
+ | [`g8.workflows`](#g8-workflows) | 21 | API key (server-side) |
50
+
51
+ ---
52
+
53
+ <a id="g8"></a>
54
+
55
+ ## `g8`
56
+
57
+ Types: `dist/types/core.d.ts`
58
+
59
+ <a id="g8-identify"></a>
60
+
61
+ ### `g8.identify`
62
+
63
+ ```ts
64
+ g8.identify: (userId: string, properties?: IdentifyProperties) => void
65
+ ```
66
+
67
+ Identify a user with properties.
68
+
69
+ - Source: `src/core.ts`
70
+
71
+ <a id="g8-init"></a>
72
+
73
+ ### `g8.init`
74
+
75
+ ```ts
76
+ g8.init: (config: G8Config) => void
77
+ ```
78
+
79
+ Initialize the graph8 SDK. Must be called before any other method. Safe to call on the server (SSR) - becomes a no-op for tracking.
80
+
81
+ - Source: `src/core.ts`
82
+
83
+ <a id="g8-page"></a>
84
+
85
+ ### `g8.page`
86
+
87
+ ```ts
88
+ g8.page: (properties?: TrackProperties) => void
89
+ ```
90
+
91
+ Track a page view.
92
+
93
+ - Source: `src/core.ts`
94
+
95
+ <a id="g8-reset"></a>
96
+
97
+ ### `g8.reset`
98
+
99
+ ```ts
100
+ g8.reset: () => void
101
+ ```
102
+
103
+ Clear user identity (on logout).
104
+
105
+ - Source: `src/core.ts`
106
+
107
+ <a id="g8-track"></a>
108
+
109
+ ### `g8.track`
110
+
111
+ ```ts
112
+ g8.track: (event: string, properties?: TrackProperties) => void
113
+ ```
114
+
115
+ Track a custom event.
116
+
117
+ - Source: `src/core.ts`
118
+
119
+ ---
120
+
121
+ <a id="g8-agency"></a>
122
+
123
+ ## `g8.agency`
124
+
125
+ Types: `dist/types/agency.d.ts`
126
+
127
+ <a id="g8-agency-clients"></a>
128
+
129
+ ### `g8.agency.clients`
130
+
131
+ ```ts
132
+ g8.agency.clients: () => Promise<{ data: AgencyClient[]; }>
133
+ ```
134
+
135
+ List the client orgs this agency key may target via `X-Target-Org-Id`.
136
+
137
+ - Calls `GET /api/v1/agency/clients` ([`g8.api.agency.listAgencyClients`](api/agency.md#op-listagencyclients), tier `read`, scope `account:read`)
138
+
139
+ - Source: `src/agency.ts`
140
+
141
+ <a id="g8-agency-me"></a>
142
+
143
+ ### `g8.agency.me`
144
+
145
+ ```ts
146
+ g8.agency.me: () => Promise<AgencyInfo>
147
+ ```
148
+
149
+ Describe the agency credential: agency org + authorized client count.
150
+
151
+ - Calls `GET /api/v1/agency/me` ([`g8.api.agency.getAgencyMe`](api/agency.md#op-getagencyme), tier `read`, scope `account:read`)
152
+
153
+ - Source: `src/agency.ts`
154
+
155
+ ---
156
+
157
+ <a id="g8-appplatform"></a>
158
+
159
+ ## `g8.appPlatform`
160
+
161
+ Types: `dist/types/appPlatform.d.ts`
162
+
163
+ <a id="g8-appplatform-activedeployment"></a>
164
+
165
+ ### `g8.appPlatform.activeDeployment`
166
+
167
+ ```ts
168
+ g8.appPlatform.activeDeployment: (appId: string) => Promise<Deployment | null>
169
+ ```
170
+
171
+ The deployment currently serving traffic, or `null`. `null` is a real answer with a 200, not a 404: "this app has never shipped" is information, while a 404 would read as "no such app".
172
+
173
+ - Calls `GET /api/v1/apps/{app_id}/deployments/active` ([`g8.api.appDeployments.getActiveDeployment`](api/appDeployments.md#op-getactivedeployment), tier `read`, scope `apps:read`)
174
+
175
+ - Source: `src/appPlatform.ts`
176
+
177
+ <a id="g8-appplatform-claimdomain"></a>
178
+
179
+ ### `g8.appPlatform.claimDomain`
180
+
181
+ ```ts
182
+ g8.appPlatform.claimDomain: (appId: string, hostname: string) => Promise<DomainVerificationInstructions>
183
+ ```
184
+
185
+ Claim a hostname and get the TXT record that proves you own it. Returns `201`, and the domain is NESTED at `data.domain` -- this is the one route on the surface whose payload is not the record itself. Hostnames are globally unique, so a host another app holds is refused.
186
+
187
+ - Calls `POST /api/v1/apps/{app_id}/domains` ([`g8.api.appDomains.claimAppDomain`](api/appDomains.md#op-claimappdomain), tier `write`, scope `apps:write`)
188
+
189
+ - Source: `src/appPlatform.ts`
190
+
191
+ <a id="g8-appplatform-clearsource"></a>
192
+
193
+ ### `g8.appPlatform.clearSource`
194
+
195
+ ```ts
196
+ g8.appPlatform.clearSource: (appId: string) => Promise<Record<string, unknown>>
197
+ ```
198
+
199
+ Unbind the source. Returns the full app with every source field null.
200
+
201
+ - Calls `DELETE /api/v1/apps/{app_id}/source` ([`g8.api.apps.clearAppSource`](api/apps.md#op-clearappsource), tier `destructive`, scope `apps:delete`)
202
+
203
+ - Source: `src/appPlatform.ts`
204
+
205
+ <a id="g8-appplatform-deletesecret"></a>
206
+
207
+ ### `g8.appPlatform.deleteSecret`
208
+
209
+ ```ts
210
+ g8.appPlatform.deleteSecret: (appId: string, secretKey: string) => Promise<{ secret_key: string; removed: boolean; }>
211
+ ```
212
+
213
+ Undeclare a secret. A key the app never declared is a 404, so a typo is never reported as a successful removal.
214
+
215
+ - Calls `DELETE /api/v1/apps/{app_id}/secrets/{secret_key}` ([`g8.api.apps.deleteAppSecret`](api/apps.md#op-deleteappsecret), tier `destructive`, scope `apps:delete`)
216
+
217
+ - Source: `src/appPlatform.ts`
218
+
219
+ <a id="g8-appplatform-deploy"></a>
220
+
221
+ ### `g8.appPlatform.deploy`
222
+
223
+ ```ts
224
+ g8.appPlatform.deploy: (appId: string, params: CreateDeploymentParams) => Promise<Deployment>
225
+ ```
226
+
227
+ Queue a deployment. Returns `201` with `status: "queued"` -- nothing builds as a side effect of this call; the build controller picks it up. NOT idempotent: two identical calls create two deployments.
228
+
229
+ - Calls `POST /api/v1/apps/{app_id}/deployments` ([`g8.api.appDeployments.createAppDeployment`](api/appDeployments.md#op-createappdeployment), tier `write`, scope `apps:write`)
230
+
231
+ - Source: `src/appPlatform.ts`
232
+
233
+ <a id="g8-appplatform-deploymentlogs"></a>
234
+
235
+ ### `g8.appPlatform.deploymentLogs`
236
+
237
+ ```ts
238
+ g8.appPlatform.deploymentLogs: (appId: string, deploymentId: string, tailLines?: number) => Promise<AppLogs>
239
+ ```
240
+
241
+ Why a build failed. Returns every step of the build pod in the order Kubernetes runs them; a step that has not started yet is omitted rather than returned empty. An empty `containers` list is not an error -- build pods are reaped an hour after they finish, so logs for an older deployment are genuinely gone. `last_error_sanitized` on the deployment is what survives. `503` means graph8 could not reach the cluster, which is deliberately different from an empty `200`: one means we could not look, the other means your build produced no output.
242
+
243
+ - Calls `GET /api/v1/apps/{app_id}/deployments/{deployment_id}/logs` ([`g8.api.appLogs.getDeploymentLogs`](api/appLogs.md#op-getdeploymentlogs), tier `read`, scope `apps:read`)
244
+
245
+ - Source: `src/appPlatform.ts`
246
+
247
+ <a id="g8-appplatform-getdeployment"></a>
248
+
249
+ ### `g8.appPlatform.getDeployment`
250
+
251
+ ```ts
252
+ g8.appPlatform.getDeployment: (appId: string, deploymentId: string) => Promise<Deployment>
253
+ ```
254
+
255
+ Fetch one deployment. The polling endpoint for a build loop.
256
+
257
+ - Calls `GET /api/v1/apps/{app_id}/deployments/{deployment_id}` ([`g8.api.appDeployments.getDeployment`](api/appDeployments.md#op-getdeployment), tier `read`, scope `apps:read`)
258
+
259
+ - Source: `src/appPlatform.ts`
260
+
261
+ <a id="g8-appplatform-listdeployments"></a>
262
+
263
+ ### `g8.appPlatform.listDeployments`
264
+
265
+ ```ts
266
+ g8.appPlatform.listDeployments: (appId: string) => Promise<{ data: Deployment[]; }>
267
+ ```
268
+
269
+ Every deployment for this app, newest first. Never 404s for an app with none.
270
+
271
+ - Calls `GET /api/v1/apps/{app_id}/deployments` ([`g8.api.appDeployments.listAppDeployments`](api/appDeployments.md#op-listappdeployments), tier `read`, scope `apps:read`)
272
+
273
+ - Source: `src/appPlatform.ts`
274
+
275
+ <a id="g8-appplatform-listdomains"></a>
276
+
277
+ ### `g8.appPlatform.listDomains`
278
+
279
+ ```ts
280
+ g8.appPlatform.listDomains: (appId: string) => Promise<{ data: AppDomain[]; }>
281
+ ```
282
+
283
+ Every hostname claimed for this app, whatever its verification state.
284
+
285
+ - Calls `GET /api/v1/apps/{app_id}/domains` ([`g8.api.appDomains.listAppDomains`](api/appDomains.md#op-listappdomains), tier `read`, scope `apps:read`)
286
+
287
+ - Source: `src/appPlatform.ts`
288
+
289
+ <a id="g8-appplatform-listschemaversions"></a>
290
+
291
+ ### `g8.appPlatform.listSchemaVersions`
292
+
293
+ ```ts
294
+ g8.appPlatform.listSchemaVersions: (appId: string) => Promise<{ data: SchemaVersion[]; }>
295
+ ```
296
+
297
+ Every schema version this app has published. Empty array, never 404.
298
+
299
+ - Calls `GET /api/v1/apps/{app_id}/schema-versions` ([`g8.api.apps.listAppSchemaVersions`](api/apps.md#op-listappschemaversions), tier `read`, scope `apps:read`)
300
+
301
+ - Source: `src/appPlatform.ts`
302
+
303
+ <a id="g8-appplatform-listsecrets"></a>
304
+
305
+ ### `g8.appPlatform.listSecrets`
306
+
307
+ ```ts
308
+ g8.appPlatform.listSecrets: (appId: string) => Promise<{ data: AppSecretMetadata[]; }>
309
+ ```
310
+
311
+ Which secrets this app declares, and when each was last rotated. NEVER returns a value. graph8 stores a POINTER into your secret manager and has no column for the secret itself.
312
+
313
+ - Calls `GET /api/v1/apps/{app_id}/secrets` ([`g8.api.apps.listAppSecrets`](api/apps.md#op-listappsecrets), tier `read`, scope `apps:read`)
314
+
315
+ - Source: `src/appPlatform.ts`
316
+
317
+ <a id="g8-appplatform-logs"></a>
318
+
319
+ ### `g8.appPlatform.logs`
320
+
321
+ ```ts
322
+ g8.appPlatform.logs: (appId: string, tailLines?: number) => Promise<AppLogs>
323
+ ```
324
+
325
+ What the running app is printing. The app's own pods only -- the per-app egress proxy shares the namespace and is deliberately excluded. Empty until a deployment reaches `deployed`.
326
+
327
+ - Calls `GET /api/v1/apps/{app_id}/logs` ([`g8.api.appLogs.getAppLogs`](api/appLogs.md#op-getapplogs), tier `read`, scope `apps:read`)
328
+
329
+ - Source: `src/appPlatform.ts`
330
+
331
+ <a id="g8-appplatform-promote"></a>
332
+
333
+ ### `g8.appPlatform.promote`
334
+
335
+ ```ts
336
+ g8.appPlatform.promote: (appId: string, deploymentId: string, imageDigest: string) => Promise<Deployment>
337
+ ```
338
+
339
+ Promote a built deployment to serve traffic. Anything it displaces moves to `rolled_back` in the same transaction, so there is never a moment with two live deployments. `409` when the state machine forbids it -- a deployment cannot become `deployed` without having been built, and a `failed` one cannot be revived. A retry is a new deployment, not a resurrection.
340
+
341
+ - Calls `POST /api/v1/apps/{app_id}/deployments/{deployment_id}/promote` ([`g8.api.appDeployments.promoteDeployment`](api/appDeployments.md#op-promotedeployment), tier `write`, scope `apps:write`)
342
+
343
+ - Source: `src/appPlatform.ts`
344
+
345
+ <a id="g8-appplatform-publishschemaversion"></a>
346
+
347
+ ### `g8.appPlatform.publishSchemaVersion`
348
+
349
+ ```ts
350
+ g8.appPlatform.publishSchemaVersion: (appId: string, objects: unknown[]) => Promise<{ version: SchemaVersion; }>
351
+ ```
352
+
353
+ Publish a custom-object schema version. Returns `201`. Takes only the `objects` list, not a whole `graph8.app.yaml`: the rest of that file is app metadata the control plane already holds, and accepting it here would create a second place for it to disagree.
354
+
355
+ - Calls `POST /api/v1/apps/{app_id}/schema-versions` ([`g8.api.apps.publishAppSchemaVersion`](api/apps.md#op-publishappschemaversion), tier `write`, scope `apps:write`)
356
+
357
+ - Source: `src/appPlatform.ts`
358
+
359
+ <a id="g8-appplatform-putsecret"></a>
360
+
361
+ ### `g8.appPlatform.putSecret`
362
+
363
+ ```ts
364
+ g8.appPlatform.putSecret: (appId: string, secretKey: string, providerRef?: string) => Promise<AppSecretMetadata>
365
+ ```
366
+
367
+ Declare a secret, or rotate the pointer to it. `providerRef` is a REFERENCE, and the server rejects anything that looks like a credential -- a value starting `bearer `, `sk-`, `ghp_`, `xox` and friends is a 422. That refusal is the feature: it catches the mistake of pasting the secret where its address belongs.
368
+
369
+ - Calls `PUT /api/v1/apps/{app_id}/secrets/{secret_key}` ([`g8.api.apps.putAppSecret`](api/apps.md#op-putappsecret), tier `write`, scope `apps:write`)
370
+
371
+ - Source: `src/appPlatform.ts`
372
+
373
+ <a id="g8-appplatform-releasedomain"></a>
374
+
375
+ ### `g8.appPlatform.releaseDomain`
376
+
377
+ ```ts
378
+ g8.appPlatform.releaseDomain: (appId: string, hostname: string) => Promise<{ hostname: string; released: boolean; }>
379
+ ```
380
+
381
+ Release a claimed hostname. A HARD delete. Hostnames are globally unique, so a row left behind in any status keeps the host burned for every other builder. Releasing one you already released is a `404`, because after the first call the claim genuinely does not exist. Returns the NORMALIZED hostname, which may differ from what you passed.
382
+
383
+ - Calls `DELETE /api/v1/apps/{app_id}/domains/{hostname}` ([`g8.api.appDomains.releaseAppDomain`](api/appDomains.md#op-releaseappdomain), tier `destructive`, scope `apps:delete`)
384
+
385
+ - Source: `src/appPlatform.ts`
386
+
387
+ <a id="g8-appplatform-rollback"></a>
388
+
389
+ ### `g8.appPlatform.rollback`
390
+
391
+ ```ts
392
+ g8.appPlatform.rollback: (appId: string, deploymentId: string) => Promise<Deployment>
393
+ ```
394
+
395
+ Roll back a deployment that is currently serving. Only a `deployed` one may be.
396
+
397
+ - Calls `POST /api/v1/apps/{app_id}/deployments/{deployment_id}/rollback` ([`g8.api.appDeployments.rollbackDeployment`](api/appDeployments.md#op-rollbackdeployment), tier `write`, scope `apps:write`)
398
+
399
+ - Source: `src/appPlatform.ts`
400
+
401
+ <a id="g8-appplatform-setsource"></a>
402
+
403
+ ### `g8.appPlatform.setSource`
404
+
405
+ ```ts
406
+ g8.appPlatform.setSource: (appId: string, params: AppSourceParams) => Promise<Record<string, unknown>>
407
+ ```
408
+
409
+ Bind the repository an app builds from. `repo_url` must be fetchable -- `https://`, `ssh://` or `git@`, with no whitespace. A `file://` or bare path is refused with 422, because a build that can read the builder's filesystem is a build that can read ours. `credential_ref` is a POINTER into your secret manager, not a token.
410
+
411
+ - Calls `PUT /api/v1/apps/{app_id}/source` ([`g8.api.apps.setAppSource`](api/apps.md#op-setappsource), tier `write`, scope `apps:write`)
412
+
413
+ - Source: `src/appPlatform.ts`
414
+
415
+ <a id="g8-appplatform-verifydomain"></a>
416
+
417
+ ### `g8.appPlatform.verifyDomain`
418
+
419
+ ```ts
420
+ g8.appPlatform.verifyDomain: (appId: string, hostname: string) => Promise<AppDomain>
421
+ ```
422
+
423
+ Check DNS for the TXT record and advance the domain to `verified`. Idempotent: verifying an already-verified domain re-checks and stays verified, so it is safe to re-run after a DNS change. Send no body -- the record in DNS is the payload.
424
+
425
+ - Calls `POST /api/v1/apps/{app_id}/domains/{hostname}/verify` ([`g8.api.appDomains.verifyAppDomain`](api/appDomains.md#op-verifyappdomain), tier `write`, scope `apps:write`)
426
+
427
+ - Source: `src/appPlatform.ts`
428
+
429
+ ---
430
+
431
+ <a id="g8-apps"></a>
432
+
433
+ ## `g8.apps`
434
+
435
+ Types: `dist/types/apps.d.ts`
436
+
437
+ <a id="g8-apps-create"></a>
438
+
439
+ ### `g8.apps.create`
440
+
441
+ ```ts
442
+ g8.apps.create: (params: AppCreateParams) => Promise<App>
443
+ ```
444
+
445
+ Create an app. It starts in `draft` and serves no traffic until published. Throws `G8Error` (409) when the slug is already taken in your org.
446
+
447
+ - Calls `POST /api/v1/apps` ([`g8.api.apps.createApp`](api/apps.md#op-createapp), tier `write`, scope `apps:write`)
448
+
449
+ - Source: `src/apps.ts`
450
+
451
+ <a id="g8-apps-get"></a>
452
+
453
+ ### `g8.apps.get`
454
+
455
+ ```ts
456
+ g8.apps.get: (appId: string) => Promise<App>
457
+ ```
458
+
459
+ Fetch one of your apps. Throws `G8Error` (404) if it is not yours.
460
+
461
+ - Calls `GET /api/v1/apps/{app_id}` ([`g8.api.apps.getApp`](api/apps.md#op-getapp), tier `read`, scope `apps:read`)
462
+
463
+ - Source: `src/apps.ts`
464
+
465
+ <a id="g8-apps-getlimit"></a>
466
+
467
+ ### `g8.apps.getLimit`
468
+
469
+ ```ts
470
+ g8.apps.getLimit: (appId: string) => Promise<AppLimit | null>
471
+ ```
472
+
473
+ This app's hard credit cap, or `null` when it is uncapped. `null` is the real answer, not an empty object: there is no "unlimited" sentinel, so an accidental zero can never read as "no limit".
474
+
475
+ - Calls `GET /api/v1/apps/{app_id}/limit` ([`g8.api.apps.getAppLimit`](api/apps.md#op-getapplimit), tier `read`, scope `apps:read`)
476
+
477
+ - Source: `src/apps.ts`
478
+
479
+ <a id="g8-apps-list"></a>
480
+
481
+ ### `g8.apps.list`
482
+
483
+ ```ts
484
+ g8.apps.list: () => Promise<{ data: App[]; }>
485
+ ```
486
+
487
+ List your organization's apps, newest first.
488
+
489
+ - Calls `GET /api/v1/apps` ([`g8.api.apps.listApps`](api/apps.md#op-listapps), tier `read`, scope `apps:read`)
490
+
491
+ - Source: `src/apps.ts`
492
+
493
+ <a id="g8-apps-listinstalls"></a>
494
+
495
+ ### `g8.apps.listInstalls`
496
+
497
+ ```ts
498
+ g8.apps.listInstalls: (appId: string) => Promise<{ data: AppInstallation[]; }>
499
+ ```
500
+
501
+ The client organizations that installed this app, and their consent state. Includes `pending` and `revoked` installs — if your app cannot reach a tenant, this is where you see why.
502
+
503
+ - Calls `GET /api/v1/apps/{app_id}/installs` ([`g8.api.apps.listAppInstalls`](api/apps.md#op-listappinstalls), tier `read`, scope `apps:read`)
504
+
505
+ - Source: `src/apps.ts`
506
+
507
+ <a id="g8-apps-setstatus"></a>
508
+
509
+ ### `g8.apps.setStatus`
510
+
511
+ ```ts
512
+ g8.apps.setStatus: (appId: string, status: Exclude<AppStatus, "suspended">) => Promise<App>
513
+ ```
514
+
515
+ Move an app through its lifecycle: `draft` → `published` → `archived`. `suspended` is excluded from the parameter type on purpose: it is the platform's kill switch for an abusive app, the backend refuses it with a 403, and a builder who could set it could also unset it.
516
+
517
+ - Calls `POST /api/v1/apps/{app_id}/status` ([`g8.api.apps.setAppStatus`](api/apps.md#op-setappstatus), tier `write`, scope `apps:write`)
518
+
519
+ - Source: `src/apps.ts`
520
+
521
+ <a id="g8-apps-usage"></a>
522
+
523
+ ### `g8.apps.usage`
524
+
525
+ ```ts
526
+ g8.apps.usage: (appId: string, period?: string) => Promise<AppUsageSummary>
527
+ ```
528
+
529
+ Credits this app consumed in a calendar month, broken down per client org. Defaults to the current month. A month with no usage returns zeroes, not a 404 — "nothing happened" is an answer.
530
+
531
+ - Calls `GET /api/v1/apps/{app_id}/usage` ([`g8.api.apps.getAppUsage`](api/apps.md#op-getappusage), tier `read`, scope `apps:read`)
532
+
533
+ - Source: `src/apps.ts`
534
+
535
+ ---
536
+
537
+ <a id="g8-audiences"></a>
538
+
539
+ ## `g8.audiences`
540
+
541
+ Types: `dist/types/audiences.d.ts`
542
+
543
+ <a id="g8-audiences-create"></a>
544
+
545
+ ### `g8.audiences.create`
546
+
547
+ ```ts
548
+ g8.audiences.create: (params: AudienceSyncCreateParams) => Promise<AudienceSync>
549
+ ```
550
+
551
+ Create a new audience sync to an ad platform.
552
+
553
+ - Calls `POST /api/v1/audience-syncs` ([`g8.api.audienceSyncs.createAudienceSync`](api/audienceSyncs.md#op-createaudiencesync), tier `external`, scope `integrations:run`)
554
+
555
+ - Source: `src/audiences.ts`
556
+
557
+ <a id="g8-audiences-delete"></a>
558
+
559
+ ### `g8.audiences.delete`
560
+
561
+ ```ts
562
+ g8.audiences.delete: (configId: number) => Promise<{ data: Record<string, unknown>; }>
563
+ ```
564
+
565
+ Delete an audience sync.
566
+
567
+ - Calls `DELETE /api/v1/audience-syncs/{config_id}` ([`g8.api.audienceSyncs.deleteAudienceSync`](api/audienceSyncs.md#op-deleteaudiencesync), tier `destructive`, scope `integrations:delete`)
568
+
569
+ - Source: `src/audiences.ts`
570
+
571
+ <a id="g8-audiences-errors"></a>
572
+
573
+ ### `g8.audiences.errors`
574
+
575
+ ```ts
576
+ g8.audiences.errors: (configId: number) => Promise<{ data: AudienceSyncError[]; }>
577
+ ```
578
+
579
+ List recent sync errors for a config.
580
+
581
+ - Calls `GET /api/v1/audience-syncs/{config_id}/errors` ([`g8.api.audienceSyncs.listSyncErrors`](api/audienceSyncs.md#op-listsyncerrors), tier `read`, scope `integrations:read`)
582
+
583
+ - Source: `src/audiences.ts`
584
+
585
+ <a id="g8-audiences-get"></a>
586
+
587
+ ### `g8.audiences.get`
588
+
589
+ ```ts
590
+ g8.audiences.get: (configId: number) => Promise<AudienceSync>
591
+ ```
592
+
593
+ Get a single audience sync by ID.
594
+
595
+ - Calls `GET /api/v1/audience-syncs/{config_id}` ([`g8.api.audienceSyncs.getAudienceSync`](api/audienceSyncs.md#op-getaudiencesync), tier `read`, scope `integrations:read`)
596
+
597
+ - Source: `src/audiences.ts`
598
+
599
+ <a id="g8-audiences-list"></a>
600
+
601
+ ### `g8.audiences.list`
602
+
603
+ ```ts
604
+ g8.audiences.list: () => Promise<{ data: AudienceSync[]; }>
605
+ ```
606
+
607
+ List all audience syncs for the organization.
608
+
609
+ - Calls `GET /api/v1/audience-syncs` ([`g8.api.audienceSyncs.listAudienceSyncs`](api/audienceSyncs.md#op-listaudiencesyncs), tier `read`, scope `integrations:read`)
610
+
611
+ - Source: `src/audiences.ts`
612
+
613
+ <a id="g8-audiences-runs"></a>
614
+
615
+ ### `g8.audiences.runs`
616
+
617
+ ```ts
618
+ g8.audiences.runs: (configId: number) => Promise<{ data: AudienceSyncRun[]; }>
619
+ ```
620
+
621
+ List recent sync runs for a config (most recent first).
622
+
623
+ - Calls `GET /api/v1/audience-syncs/{config_id}/runs` ([`g8.api.audienceSyncs.listSyncRuns`](api/audienceSyncs.md#op-listsyncruns), tier `billable`, scope `integrations:run`)
624
+
625
+ - Source: `src/audiences.ts`
626
+
627
+ <a id="g8-audiences-trigger"></a>
628
+
629
+ ### `g8.audiences.trigger`
630
+
631
+ ```ts
632
+ g8.audiences.trigger: (configId: number) => Promise<{ data: Record<string, unknown>; }>
633
+ ```
634
+
635
+ Trigger an immediate sync run for a config.
636
+
637
+ - Calls `POST /api/v1/audience-syncs/{config_id}/trigger` ([`g8.api.audienceSyncs.triggerAudienceSync`](api/audienceSyncs.md#op-triggeraudiencesync), tier `external`, scope `integrations:run`)
638
+
639
+ - Source: `src/audiences.ts`
640
+
641
+ <a id="g8-audiences-update"></a>
642
+
643
+ ### `g8.audiences.update`
644
+
645
+ ```ts
646
+ g8.audiences.update: (configId: number, fields: AudienceSyncUpdateParams) => Promise<AudienceSync>
647
+ ```
648
+
649
+ Update an audience sync (partial).
650
+
651
+ - Calls `PATCH /api/v1/audience-syncs/{config_id}` ([`g8.api.audienceSyncs.updateAudienceSync`](api/audienceSyncs.md#op-updateaudiencesync), tier `external`, scope `integrations:run`)
652
+
653
+ - Source: `src/audiences.ts`
654
+
655
+ ---
656
+
657
+ <a id="g8-calendar"></a>
658
+
659
+ ## `g8.calendar`
660
+
661
+ Types: `dist/types/calendar.d.ts`
662
+
663
+ <a id="g8-calendar-book"></a>
664
+
665
+ ### `g8.calendar.book`
666
+
667
+ ```ts
668
+ g8.calendar.book: (request: BookingRequest) => Promise<Booking | null>
669
+ ```
670
+
671
+ Book a meeting programmatically.
672
+
673
+ - Calls `POST /appointments/public/bookings` (outside the `/api/v1` contract)
674
+
675
+ - Source: `src/calendar.ts`
676
+
677
+ <a id="g8-calendar-embed"></a>
678
+
679
+ ### `g8.calendar.embed`
680
+
681
+ ```ts
682
+ g8.calendar.embed: (selector: string, config: CalendarConfig) => void
683
+ ```
684
+
685
+ Embed booking widget inline in a container element.
686
+
687
+ - Source: `src/calendar.ts`
688
+
689
+ <a id="g8-calendar-on"></a>
690
+
691
+ ### `g8.calendar.on`
692
+
693
+ ```ts
694
+ g8.calendar.on: (event: CalendarEvent, callback: CalendarCallback) => void
695
+ ```
696
+
697
+ Listen for calendar events.
698
+
699
+ - Source: `src/calendar.ts`
700
+
701
+ <a id="g8-calendar-show"></a>
702
+
703
+ ### `g8.calendar.show`
704
+
705
+ ```ts
706
+ g8.calendar.show: (config: CalendarConfig) => void
707
+ ```
708
+
709
+ Show a booking modal overlay.
710
+
711
+ - Source: `src/calendar.ts`
712
+
713
+ <a id="g8-calendar-slots"></a>
714
+
715
+ ### `g8.calendar.slots`
716
+
717
+ ```ts
718
+ g8.calendar.slots: (username: string, eventSlug: string, range: { start: string; end: string; }) => Promise<TimeSlot[]>
719
+ ```
720
+
721
+ Get available time slots for an event type.
722
+
723
+ - Calls `GET /appointments/public/slots` (outside the `/api/v1` contract)
724
+
725
+ - Source: `src/calendar.ts`
726
+
727
+ ---
728
+
729
+ <a id="g8-campaigns"></a>
730
+
731
+ ## `g8.campaigns`
732
+
733
+ Types: `dist/types/campaigns.d.ts`
734
+
735
+ <a id="g8-campaigns-create"></a>
736
+
737
+ ### `g8.campaigns.create`
738
+
739
+ ```ts
740
+ g8.campaigns.create: (config: CampaignCreateConfig) => Promise<Campaign>
741
+ ```
742
+
743
+ - Calls `POST /api/v1/campaigns` ([`g8.api.gtmCampaigns.createCampaign`](api/gtmCampaigns.md#op-createcampaign), tier `external`, scope `campaigns:run`)
744
+
745
+ - Source: `src/campaigns.ts`
746
+
747
+ <a id="g8-campaigns-get"></a>
748
+
749
+ ### `g8.campaigns.get`
750
+
751
+ ```ts
752
+ g8.campaigns.get: (campaignId: string) => Promise<Campaign>
753
+ ```
754
+
755
+ - Calls `GET /api/v1/campaigns/{campaign_id}` ([`g8.api.gtmCampaigns.getCampaign`](api/gtmCampaigns.md#op-getcampaign), tier `read`, scope `campaigns:read`)
756
+
757
+ - Source: `src/campaigns.ts`
758
+
759
+ <a id="g8-campaigns-launch"></a>
760
+
761
+ ### `g8.campaigns.launch`
762
+
763
+ ```ts
764
+ g8.campaigns.launch: (campaignId: string) => Promise<CampaignLaunchResult>
765
+ ```
766
+
767
+ - Calls `POST /api/v1/campaigns/{campaign_id}/launch` ([`g8.api.gtmCampaigns.launchCampaign`](api/gtmCampaigns.md#op-launchcampaign), tier `external`, scope `campaigns:launch`)
768
+
769
+ - Source: `src/campaigns.ts`
770
+
771
+ <a id="g8-campaigns-list"></a>
772
+
773
+ ### `g8.campaigns.list`
774
+
775
+ ```ts
776
+ g8.campaigns.list: (page?: number, limit?: number) => Promise<Campaign[]>
777
+ ```
778
+
779
+ - Calls `GET /api/v1/campaigns` ([`g8.api.gtmCampaigns.listCampaigns`](api/gtmCampaigns.md#op-listcampaigns), tier `read`, scope `campaigns:read`)
780
+
781
+ - Source: `src/campaigns.ts`
782
+
783
+ ---
784
+
785
+ <a id="g8-chat"></a>
786
+
787
+ ## `g8.chat`
788
+
789
+ Types: `dist/types/chat.d.ts`
790
+
791
+ <a id="g8-chat-close"></a>
792
+
793
+ ### `g8.chat.close`
794
+
795
+ ```ts
796
+ g8.chat.close: () => void
797
+ ```
798
+
799
+ Close the chat widget.
800
+
801
+ - Source: `src/chat.ts`
802
+
803
+ <a id="g8-chat-configure"></a>
804
+
805
+ ### `g8.chat.configure`
806
+
807
+ ```ts
808
+ g8.chat.configure: (config: Partial<ChatConfig>) => void
809
+ ```
810
+
811
+ Configure the chat appearance.
812
+
813
+ - Source: `src/chat.ts`
814
+
815
+ <a id="g8-chat-on"></a>
816
+
817
+ ### `g8.chat.on`
818
+
819
+ ```ts
820
+ g8.chat.on: (event: ChatEvent, callback: ChatCallback) => void
821
+ ```
822
+
823
+ Listen for chat events.
824
+
825
+ - Source: `src/chat.ts`
826
+
827
+ <a id="g8-chat-open"></a>
828
+
829
+ ### `g8.chat.open`
830
+
831
+ ```ts
832
+ g8.chat.open: (config?: ChatConfig) => void
833
+ ```
834
+
835
+ Open the chat widget.
836
+
837
+ - Source: `src/chat.ts`
838
+
839
+ <a id="g8-chat-send"></a>
840
+
841
+ ### `g8.chat.send`
842
+
843
+ ```ts
844
+ g8.chat.send: (message: string) => void
845
+ ```
846
+
847
+ Send a message.
848
+
849
+ - Source: `src/chat.ts`
850
+
851
+ ---
852
+
853
+ <a id="g8-companies"></a>
854
+
855
+ ## `g8.companies`
856
+
857
+ Types: `dist/types/companies.d.ts`
858
+
859
+ <a id="g8-companies-contacts"></a>
860
+
861
+ ### `g8.companies.contacts`
862
+
863
+ ```ts
864
+ g8.companies.contacts: (companyId: number, limit?: number, offset?: number) => Promise<{ data: CompanyContact[]; total: number; }>
865
+ ```
866
+
867
+ Get contacts belonging to a company.
868
+
869
+ - Calls `GET /api/v1/companies/{company_id}/contacts` ([`g8.api.companies.getCompanyContacts`](api/companies.md#op-getcompanycontacts), tier `read`, scope `companies:read`)
870
+
871
+ - Source: `src/companies.ts`
872
+
873
+ <a id="g8-companies-create"></a>
874
+
875
+ ### `g8.companies.create`
876
+
877
+ ```ts
878
+ g8.companies.create: (params: CompanyCreateParams) => Promise<CompanyCreateResult>
879
+ ```
880
+
881
+ Create a company. `domain` is required and drives dedup — an existing company with the same domain is reused (`merged: true`) rather than duplicated. Routes to the same handler the in-app "add company" flow uses.
882
+
883
+ - Calls `POST /api/v1/companies` ([`g8.api.companies.createCompany`](api/companies.md#op-createcompany), tier `write`, scope `companies:write`)
884
+
885
+ - Source: `src/companies.ts`
886
+
887
+ <a id="g8-companies-createcolumn"></a>
888
+
889
+ ### `g8.companies.createColumn`
890
+
891
+ ```ts
892
+ g8.companies.createColumn: (params: CompanyColumnCreateParams) => Promise<CompanyColumn>
893
+ ```
894
+
895
+ Create a custom company column. Global if list_id is omitted, list-scoped otherwise.
896
+
897
+ - Calls `POST /api/v1/companies/columns/create` ([`g8.api.companies.createCompanyColumn`](api/companies.md#op-createcompanycolumn), tier `write`, scope `companies:write`)
898
+
899
+ - Source: `src/companies.ts`
900
+
901
+ <a id="g8-companies-delete"></a>
902
+
903
+ ### `g8.companies.delete`
904
+
905
+ ```ts
906
+ g8.companies.delete: (companyId: number) => Promise<{ deleted: boolean; }>
907
+ ```
908
+
909
+ Delete a company (soft-delete).
910
+
911
+ - Calls `DELETE /api/v1/companies/{company_id}` ([`g8.api.companies.deleteCompany`](api/companies.md#op-deletecompany), tier `destructive`, scope `companies:delete`)
912
+
913
+ - Source: `src/companies.ts`
914
+
915
+ <a id="g8-companies-get"></a>
916
+
917
+ ### `g8.companies.get`
918
+
919
+ ```ts
920
+ g8.companies.get: (companyId: number) => Promise<Company>
921
+ ```
922
+
923
+ Get a single company by ID.
924
+
925
+ - Calls `GET /api/v1/companies/{company_id}` ([`g8.api.companies.getCompany`](api/companies.md#op-getcompany), tier `read`, scope `companies:read`)
926
+
927
+ - Source: `src/companies.ts`
928
+
929
+ <a id="g8-companies-list"></a>
930
+
931
+ ### `g8.companies.list`
932
+
933
+ ```ts
934
+ g8.companies.list: (params?: CompanyListParams) => Promise<{ data: Company[]; total: number; }>
935
+ ```
936
+
937
+ List companies with optional filters.
938
+
939
+ - Calls `GET /api/v1/companies` ([`g8.api.companies.listCompanies`](api/companies.md#op-listcompanies), tier `read`, scope `companies:read`)
940
+
941
+ - Source: `src/companies.ts`
942
+
943
+ <a id="g8-companies-listcolumns"></a>
944
+
945
+ ### `g8.companies.listColumns`
946
+
947
+ ```ts
948
+ g8.companies.listColumns: (listId?: number) => Promise<{ data: CompanyColumn[]; }>
949
+ ```
950
+
951
+ List custom company columns. Pass listId to include list-specific columns.
952
+
953
+ - Calls `GET /api/v1/companies/columns` ([`g8.api.companies.listCompanyColumns`](api/companies.md#op-listcompanycolumns), tier `read`, scope `companies:read`)
954
+
955
+ - Source: `src/companies.ts`
956
+
957
+ <a id="g8-companies-update"></a>
958
+
959
+ ### `g8.companies.update`
960
+
961
+ ```ts
962
+ g8.companies.update: (companyId: number, fields: CompanyUpdateParams) => Promise<{ updated: number; }>
963
+ ```
964
+
965
+ Update a company (partial).
966
+
967
+ - Calls `PATCH /api/v1/companies/{company_id}` ([`g8.api.companies.updateCompany`](api/companies.md#op-updatecompany), tier `write`, scope `companies:write`)
968
+
969
+ - Source: `src/companies.ts`
970
+
971
+ ---
972
+
973
+ <a id="g8-contacts"></a>
974
+
975
+ ## `g8.contacts`
976
+
977
+ Types: `dist/types/contacts.d.ts`
978
+
979
+ <a id="g8-contacts-create"></a>
980
+
981
+ ### `g8.contacts.create`
982
+
983
+ ```ts
984
+ g8.contacts.create: (contact: ContactCreateParams, idempotencyKey?: string) => Promise<Contact>
985
+ ```
986
+
987
+ Create a new contact. Pass `idempotencyKey` to make a retry safe — the same key returns the first result instead of creating a duplicate (A6). Create-only: if a contact with the same work_email / linkedin_url exists, this throws a 409 `G8Error` whose `detail.hint` / `detail.upsert` name the create-or-update route. When the contact may already exist, use `upsert()`.
988
+
989
+ - Calls `POST /api/v1/contacts` ([`g8.api.contacts.createContacts`](api/contacts.md#op-createcontacts), tier `write`, scope `contacts:write`)
990
+
991
+ - Source: `src/contacts.ts`
992
+
993
+ <a id="g8-contacts-createcolumn"></a>
994
+
995
+ ### `g8.contacts.createColumn`
996
+
997
+ ```ts
998
+ g8.contacts.createColumn: (params: ContactColumnCreateParams) => Promise<ContactColumn>
999
+ ```
1000
+
1001
+ Create a custom contact column. Global if list_id is omitted, list-scoped otherwise.
1002
+
1003
+ - Calls `POST /api/v1/contacts/columns/create` ([`g8.api.contacts.createContactColumn`](api/contacts.md#op-createcontactcolumn), tier `write`, scope `contacts:write`)
1004
+
1005
+ - Source: `src/contacts.ts`
1006
+
1007
+ <a id="g8-contacts-delete"></a>
1008
+
1009
+ ### `g8.contacts.delete`
1010
+
1011
+ ```ts
1012
+ g8.contacts.delete: (contactId: number) => Promise<{ deleted: boolean; }>
1013
+ ```
1014
+
1015
+ Delete a contact (soft-delete).
1016
+
1017
+ - Calls `DELETE /api/v1/contacts/{contact_id}` ([`g8.api.contacts.deleteContact`](api/contacts.md#op-deletecontact), tier `destructive`, scope `contacts:delete`)
1018
+
1019
+ - Source: `src/contacts.ts`
1020
+
1021
+ <a id="g8-contacts-get"></a>
1022
+
1023
+ ### `g8.contacts.get`
1024
+
1025
+ ```ts
1026
+ g8.contacts.get: (contactId: number) => Promise<Contact>
1027
+ ```
1028
+
1029
+ Get a single contact by ID.
1030
+
1031
+ - Calls `GET /api/v1/contacts/{contact_id}` ([`g8.api.contacts.getContact`](api/contacts.md#op-getcontact), tier `read`, scope `contacts:read`)
1032
+
1033
+ - Source: `src/contacts.ts`
1034
+
1035
+ <a id="g8-contacts-getmany"></a>
1036
+
1037
+ ### `g8.contacts.getMany`
1038
+
1039
+ ```ts
1040
+ g8.contacts.getMany: (contactIds: number[], options?: { includeCustomFields?: boolean; }) => Promise<ContactBulkGetItem[]>
1041
+ ```
1042
+
1043
+ Full records for many contacts (`POST /api/v1/contacts/bulk-get`), in input order. Any number of ids: they are sent 100 per request, so 1,000 ids cost 10 requests instead of 1,000 `get()` calls. Missing or out-of-scope ids come back `found: false` rather than throwing. Duplicate ids are read once.
1044
+
1045
+ - Source: `src/contacts.ts`
1046
+
1047
+ <a id="g8-contacts-list"></a>
1048
+
1049
+ ### `g8.contacts.list`
1050
+
1051
+ ```ts
1052
+ g8.contacts.list: (params?: ContactListParams) => Promise<{ data: Contact[]; total: number; }>
1053
+ ```
1054
+
1055
+ List contacts with optional filters.
1056
+
1057
+ - Calls `GET /api/v1/contacts` ([`g8.api.contacts.listContacts`](api/contacts.md#op-listcontacts), tier `read`, scope `contacts:read`)
1058
+
1059
+ - Source: `src/contacts.ts`
1060
+
1061
+ <a id="g8-contacts-listcolumns"></a>
1062
+
1063
+ ### `g8.contacts.listColumns`
1064
+
1065
+ ```ts
1066
+ g8.contacts.listColumns: (listId?: number) => Promise<{ data: ContactColumn[]; }>
1067
+ ```
1068
+
1069
+ List custom contact columns. Pass listId to include list-specific columns.
1070
+
1071
+ - Calls `GET /api/v1/contacts/columns` ([`g8.api.contacts.listContactColumns`](api/contacts.md#op-listcontactcolumns), tier `read`, scope `contacts:read`)
1072
+
1073
+ - Source: `src/contacts.ts`
1074
+
1075
+ <a id="g8-contacts-listdetailed"></a>
1076
+
1077
+ ### `g8.contacts.listDetailed`
1078
+
1079
+ ```ts
1080
+ g8.contacts.listDetailed: (params?: ContactListParams, options?: { includeCustomFields?: boolean; }) => Promise<{ data: ContactDetail[]; total: number; missing: number[]; }>
1081
+ ```
1082
+
1083
+ One page of `list()`, with every contact's FULL record (`created_at`, `updated_at`, `full_name`, `personal_emails`, `company`, ...). `list()` returns a leaner shape. Costs one `list()` request plus one `getMany()` request per 100 contacts on the page. `missing` holds ids that were listed but could not be read (for example deleted in between).
1084
+
1085
+ - Calls `GET /api/v1/contacts` ([`g8.api.contacts.listContacts`](api/contacts.md#op-listcontacts), tier `read`, scope `contacts:read`)
1086
+
1087
+ - Source: `src/contacts.ts`
1088
+
1089
+ <a id="g8-contacts-update"></a>
1090
+
1091
+ ### `g8.contacts.update`
1092
+
1093
+ ```ts
1094
+ g8.contacts.update: (contactId: number, fields: ContactUpdateParams) => Promise<{ updated: number; }>
1095
+ ```
1096
+
1097
+ Update a contact (partial).
1098
+
1099
+ - Calls `PATCH /api/v1/contacts/{contact_id}` ([`g8.api.contacts.updateContact`](api/contacts.md#op-updatecontact), tier `write`, scope `contacts:write`)
1100
+
1101
+ - Source: `src/contacts.ts`
1102
+
1103
+ <a id="g8-contacts-upsert"></a>
1104
+
1105
+ ### `g8.contacts.upsert`
1106
+
1107
+ ```ts
1108
+ g8.contacts.upsert: (contact: ContactUpsertParams) => Promise<ContactUpsertResult>
1109
+ ```
1110
+
1111
+ Create or update a contact in one idempotent call (`PUT /contacts/assert`). Matches by `work_email`, then `linkedin_url`. Prefer this over `create()` when the contact may already exist: `create()` returns a 409 for a duplicate, while `upsert()` updates it. Safe to retry. The server answers 400 (a `G8Error`) when neither `work_email` nor `linkedin_url` is given.
1112
+
1113
+ - Calls `PUT /api/v1/contacts/assert` ([`g8.api.assertUpsert.assertContact`](api/assertUpsert.md#op-assertcontact), tier `write`, scope `contacts:write`)
1114
+
1115
+ - Source: `src/contacts.ts`
1116
+
1117
+ ---
1118
+
1119
+ <a id="g8-copilot"></a>
1120
+
1121
+ ## `g8.copilot`
1122
+
1123
+ Types: `dist/types/copilot.d.ts`
1124
+
1125
+ <a id="g8-copilot-ask"></a>
1126
+
1127
+ ### `g8.copilot.ask`
1128
+
1129
+ ```ts
1130
+ g8.copilot.ask: (message: string) => Promise<string>
1131
+ ```
1132
+
1133
+ Send a message to the copilot programmatically.
1134
+
1135
+ - Calls `POST /api/v1/public/copilot/chat` ([`g8.api.publicCopilot.publicCopilotChat`](api/publicCopilot.md#op-publiccopilotchat), tier `write`)
1136
+
1137
+ - Source: `src/copilot.ts`
1138
+
1139
+ <a id="g8-copilot-close"></a>
1140
+
1141
+ ### `g8.copilot.close`
1142
+
1143
+ ```ts
1144
+ g8.copilot.close: () => void
1145
+ ```
1146
+
1147
+ Close the copilot widget.
1148
+
1149
+ - Source: `src/copilot.ts`
1150
+
1151
+ <a id="g8-copilot-on"></a>
1152
+
1153
+ ### `g8.copilot.on`
1154
+
1155
+ ```ts
1156
+ g8.copilot.on: (event: CopilotEvent, callback: CopilotCallback) => void
1157
+ ```
1158
+
1159
+ Listen for copilot events.
1160
+
1161
+ - Source: `src/copilot.ts`
1162
+
1163
+ <a id="g8-copilot-open"></a>
1164
+
1165
+ ### `g8.copilot.open`
1166
+
1167
+ ```ts
1168
+ g8.copilot.open: (config?: CopilotConfig) => void
1169
+ ```
1170
+
1171
+ Open the copilot widget.
1172
+
1173
+ - Source: `src/copilot.ts`
1174
+
1175
+ <a id="g8-copilot-registeraction"></a>
1176
+
1177
+ ### `g8.copilot.registerAction`
1178
+
1179
+ ```ts
1180
+ g8.copilot.registerAction: (name: string, handler: ActionHandler) => void
1181
+ ```
1182
+
1183
+ Register a custom action the copilot can trigger.
1184
+
1185
+ - Source: `src/copilot.ts`
1186
+
1187
+ ---
1188
+
1189
+ <a id="g8-deals"></a>
1190
+
1191
+ ## `g8.deals`
1192
+
1193
+ Types: `dist/types/deals.d.ts`
1194
+
1195
+ <a id="g8-deals-create"></a>
1196
+
1197
+ ### `g8.deals.create`
1198
+
1199
+ ```ts
1200
+ g8.deals.create: (deal: DealCreateParams) => Promise<Deal>
1201
+ ```
1202
+
1203
+ Create a new deal.
1204
+
1205
+ - Calls `POST /api/v1/deals` ([`g8.api.deals.createDeal`](api/deals.md#op-createdeal), tier `write`, scope `deals:write`)
1206
+
1207
+ - Source: `src/deals.ts`
1208
+
1209
+ <a id="g8-deals-delete"></a>
1210
+
1211
+ ### `g8.deals.delete`
1212
+
1213
+ ```ts
1214
+ g8.deals.delete: (dealId: string) => Promise<{ data: { deleted: boolean; }; }>
1215
+ ```
1216
+
1217
+ Delete a deal.
1218
+
1219
+ - Calls `DELETE /api/v1/deals/{deal_id}` ([`g8.api.deals.deleteDeal`](api/deals.md#op-deletedeal), tier `destructive`, scope `deals:delete`)
1220
+
1221
+ - Source: `src/deals.ts`
1222
+
1223
+ <a id="g8-deals-forcompany"></a>
1224
+
1225
+ ### `g8.deals.forCompany`
1226
+
1227
+ ```ts
1228
+ g8.deals.forCompany: (companyId: number) => Promise<{ data: ContactDeal[]; }>
1229
+ ```
1230
+
1231
+ Get all deals associated with a company.
1232
+
1233
+ - Calls `GET /api/v1/companies/{company_id}/deals` ([`g8.api.deals.getCompanyDeals`](api/deals.md#op-getcompanydeals), tier `read`, scope `deals:read`)
1234
+
1235
+ - Source: `src/deals.ts`
1236
+
1237
+ <a id="g8-deals-forcontact"></a>
1238
+
1239
+ ### `g8.deals.forContact`
1240
+
1241
+ ```ts
1242
+ g8.deals.forContact: (contactId: number) => Promise<{ data: ContactDeal[]; }>
1243
+ ```
1244
+
1245
+ Get all deals associated with a contact.
1246
+
1247
+ - Calls `GET /api/v1/contacts/{contact_id}/deals` ([`g8.api.deals.getContactDeals`](api/deals.md#op-getcontactdeals), tier `read`, scope `deals:read`)
1248
+
1249
+ - Source: `src/deals.ts`
1250
+
1251
+ <a id="g8-deals-get"></a>
1252
+
1253
+ ### `g8.deals.get`
1254
+
1255
+ ```ts
1256
+ g8.deals.get: (dealId: string) => Promise<Deal>
1257
+ ```
1258
+
1259
+ Get a single deal by ID.
1260
+
1261
+ - Calls `GET /api/v1/deals/{deal_id}` ([`g8.api.deals.getDeal`](api/deals.md#op-getdeal), tier `read`, scope `deals:read`)
1262
+
1263
+ - Source: `src/deals.ts`
1264
+
1265
+ <a id="g8-deals-list"></a>
1266
+
1267
+ ### `g8.deals.list`
1268
+
1269
+ ```ts
1270
+ g8.deals.list: (params?: DealListParams) => Promise<{ data: Deal[]; pagination?: PaginationMeta; }>
1271
+ ```
1272
+
1273
+ List deals org-wide with optional filters and pagination.
1274
+
1275
+ - Calls `GET /api/v1/deals` ([`g8.api.deals.listDeals`](api/deals.md#op-listdeals), tier `read`, scope `deals:read`)
1276
+
1277
+ - Source: `src/deals.ts`
1278
+
1279
+ <a id="g8-deals-pipelines"></a>
1280
+
1281
+ ### `g8.deals.pipelines`
1282
+
1283
+ ```ts
1284
+ g8.deals.pipelines: () => Promise<{ data: Pipeline[]; }>
1285
+ ```
1286
+
1287
+ List all deal pipelines and their stages.
1288
+
1289
+ - Calls `GET /api/v1/deals/pipelines` ([`g8.api.deals.listPipelines`](api/deals.md#op-listpipelines), tier `read`, scope `deals:read`)
1290
+
1291
+ - Source: `src/deals.ts`
1292
+
1293
+ <a id="g8-deals-update"></a>
1294
+
1295
+ ### `g8.deals.update`
1296
+
1297
+ ```ts
1298
+ g8.deals.update: (dealId: string, fields: DealUpdateParams) => Promise<Deal>
1299
+ ```
1300
+
1301
+ Update a deal (partial).
1302
+
1303
+ - Calls `PATCH /api/v1/deals/{deal_id}` ([`g8.api.deals.updateDeal`](api/deals.md#op-updatedeal), tier `write`, scope `deals:write`)
1304
+
1305
+ - Source: `src/deals.ts`
1306
+
1307
+ ---
1308
+
1309
+ <a id="g8-enrich"></a>
1310
+
1311
+ ## `g8.enrich`
1312
+
1313
+ Types: `dist/types/enrich.d.ts`
1314
+
1315
+ <a id="g8-enrich-company"></a>
1316
+
1317
+ ### `g8.enrich.company`
1318
+
1319
+ ```ts
1320
+ g8.enrich.company: (params: { domain?: string; name?: string; }) => Promise<CompanyEnrichment>
1321
+ ```
1322
+
1323
+ Look up a company by domain or name. Costs 1 credit.
1324
+
1325
+ - Calls `POST /api/v1/enrichment/lookup/company` ([`g8.api.enrichment.lookupCompany`](api/enrichment.md#op-lookupcompany), tier `billable`, scope `enrichment:run`)
1326
+
1327
+ - Source: `src/enrich.ts`
1328
+
1329
+ <a id="g8-enrich-person"></a>
1330
+
1331
+ ### `g8.enrich.person`
1332
+
1333
+ ```ts
1334
+ g8.enrich.person: (params: { email?: string; linkedin_url?: string; first_name?: string; last_name?: string; company_domain?: string; }) => Promise<PersonEnrichment>
1335
+ ```
1336
+
1337
+ Look up a person by email, LinkedIn, or name + company. Costs 1 credit.
1338
+
1339
+ - Calls `POST /api/v1/enrichment/lookup/person` ([`g8.api.enrichment.lookupPerson`](api/enrichment.md#op-lookupperson), tier `billable`, scope `enrichment:run`)
1340
+
1341
+ - Source: `src/enrich.ts`
1342
+
1343
+ <a id="g8-enrich-search"></a>
1344
+
1345
+ ### `g8.enrich.search`
1346
+
1347
+ ```ts
1348
+ g8.enrich.search: (filters: SearchFilter[], page?: number, limit?: number) => Promise<SearchResults>
1349
+ ```
1350
+
1351
+ Search 700M+ contacts with filters. Credits charged per result.
1352
+
1353
+ - Calls `POST /api/v1/search/contacts` ([`g8.api.search.searchContacts`](api/search.md#op-searchcontacts), tier `billable`, scope `search:run`)
1354
+
1355
+ - Source: `src/enrich.ts`
1356
+
1357
+ <a id="g8-enrich-verifyemail"></a>
1358
+
1359
+ ### `g8.enrich.verifyEmail`
1360
+
1361
+ ```ts
1362
+ g8.enrich.verifyEmail: (email: string) => Promise<EmailVerification>
1363
+ ```
1364
+
1365
+ Verify an email address. Costs 1 credit.
1366
+
1367
+ - Calls `POST /api/v1/enrichment/verify-email` ([`g8.api.enrichment.verifyEmail`](api/enrichment.md#op-verifyemail), tier `billable`, scope `enrichment:run`)
1368
+
1369
+ - Source: `src/enrich.ts`
1370
+
1371
+ ---
1372
+
1373
+ <a id="g8-fields"></a>
1374
+
1375
+ ## `g8.fields`
1376
+
1377
+ Types: `dist/types/fields.d.ts`
1378
+
1379
+ <a id="g8-fields-create"></a>
1380
+
1381
+ ### `g8.fields.create`
1382
+
1383
+ ```ts
1384
+ g8.fields.create: (params: FieldCreateParams) => Promise<CreatedField>
1385
+ ```
1386
+
1387
+ Create a custom field on contacts (default) or companies.
1388
+
1389
+ - Calls `POST /api/v1/fields` ([`g8.api.fields.createField`](api/fields.md#op-createfield), tier `write`, scope `fields:write`)
1390
+
1391
+ - Source: `src/fields.ts`
1392
+
1393
+ <a id="g8-fields-delete"></a>
1394
+
1395
+ ### `g8.fields.delete`
1396
+
1397
+ ```ts
1398
+ g8.fields.delete: (columnId: number, params?: FieldDeleteParams) => Promise<{ data: { column_id: number; deleted: boolean; }; }>
1399
+ ```
1400
+
1401
+ Delete a custom field (soft-delete). Pass list_id to scope-guard against cross-list deletion.
1402
+
1403
+ - Calls `DELETE /api/v1/fields/{column_id}` ([`g8.api.fields.deleteField`](api/fields.md#op-deletefield), tier `destructive`, scope `fields:delete`)
1404
+
1405
+ - Source: `src/fields.ts`
1406
+
1407
+ <a id="g8-fields-listcompanyfields"></a>
1408
+
1409
+ ### `g8.fields.listCompanyFields`
1410
+
1411
+ ```ts
1412
+ g8.fields.listCompanyFields: (listId?: number) => Promise<{ data: Field[]; }>
1413
+ ```
1414
+
1415
+ List company fields (base + custom). Pass listId to include list-specific custom fields.
1416
+
1417
+ - Calls `GET /api/v1/fields/companies` ([`g8.api.fields.listCompanyFields`](api/fields.md#op-listcompanyfields), tier `read`, scope `fields:read`)
1418
+
1419
+ - Source: `src/fields.ts`
1420
+
1421
+ <a id="g8-fields-listcontactfields"></a>
1422
+
1423
+ ### `g8.fields.listContactFields`
1424
+
1425
+ ```ts
1426
+ g8.fields.listContactFields: (listId?: number) => Promise<{ data: Field[]; }>
1427
+ ```
1428
+
1429
+ List contact fields (base + custom). Pass listId to include list-specific custom fields.
1430
+
1431
+ - Calls `GET /api/v1/fields` ([`g8.api.fields.listContactFields`](api/fields.md#op-listcontactfields), tier `read`, scope `fields:read`)
1432
+
1433
+ - Source: `src/fields.ts`
1434
+
1435
+ <a id="g8-fields-setvalue"></a>
1436
+
1437
+ ### `g8.fields.setValue`
1438
+
1439
+ ```ts
1440
+ g8.fields.setValue: (columnId: number, params: SetFieldValueParams) => Promise<{ data: { column_id: number; record_id: number; updated: boolean; }; }>
1441
+ ```
1442
+
1443
+ Set a custom field value on a single contact or company row. Pass value=null to clear.
1444
+
1445
+ - Calls `PATCH /api/v1/fields/{column_id}/values` ([`g8.api.fields.setFieldValue`](api/fields.md#op-setfieldvalue), tier `write`, scope `fields:write`)
1446
+
1447
+ - Source: `src/fields.ts`
1448
+
1449
+ ---
1450
+
1451
+ <a id="g8-forms"></a>
1452
+
1453
+ ## `g8.forms`
1454
+
1455
+ Types: `dist/types/forms.d.ts`
1456
+
1457
+ <a id="g8-forms-lookup"></a>
1458
+
1459
+ ### `g8.forms.lookup`
1460
+
1461
+ ```ts
1462
+ g8.forms.lookup: (email: string) => Promise<EnrichLookupResult>
1463
+ ```
1464
+
1465
+ Look up known fields for an email address. Use this in progressive forms: after the user enters their email, check what graph8 already knows and only show missing fields.
1466
+
1467
+ - Calls `POST /api/v1/public/enrich/lookup` ([`g8.api.public.publicEnrichLookup`](api/public.md#op-publicenrichlookup), tier `billable`)
1468
+
1469
+ - Source: `src/forms.ts`
1470
+
1471
+ ---
1472
+
1473
+ <a id="g8-inbox"></a>
1474
+
1475
+ ## `g8.inbox`
1476
+
1477
+ Types: `dist/types/inbox.d.ts`
1478
+
1479
+ <a id="g8-inbox-assign"></a>
1480
+
1481
+ ### `g8.inbox.assign`
1482
+
1483
+ ```ts
1484
+ g8.inbox.assign: (replyId: string, assigneeEmail: string, channel?: InboxChannel) => Promise<InboxAssignResult>
1485
+ ```
1486
+
1487
+ Assign a user to an inbox thread.
1488
+
1489
+ - Calls `POST /api/v1/inbox/{reply_id}/assign` ([`g8.api.inbox.assignReply`](api/inbox.md#op-assignreply), tier `external`, scope `inbox:run`)
1490
+
1491
+ - Source: `src/inbox.ts`
1492
+
1493
+ <a id="g8-inbox-draft"></a>
1494
+
1495
+ ### `g8.inbox.draft`
1496
+
1497
+ ```ts
1498
+ g8.inbox.draft: (replyId: string, channel?: InboxChannel) => Promise<InboxDraft>
1499
+ ```
1500
+
1501
+ Generate an AI draft reply for a thread. Charges credits — server returns 402 if balance is insufficient.
1502
+
1503
+ - Calls `GET /api/v1/inbox/{reply_id}/draft` ([`g8.api.inbox.getDraft`](api/inbox.md#op-getdraft), tier `read`, scope `inbox:read`)
1504
+
1505
+ - Source: `src/inbox.ts`
1506
+
1507
+ <a id="g8-inbox-get"></a>
1508
+
1509
+ ### `g8.inbox.get`
1510
+
1511
+ ```ts
1512
+ g8.inbox.get: (replyId: string, channel?: InboxChannel) => Promise<InboxThread>
1513
+ ```
1514
+
1515
+ Get a single inbox thread. Defaults to email channel.
1516
+
1517
+ - Calls `GET /api/v1/inbox/{reply_id}` ([`g8.api.inbox.getReply`](api/inbox.md#op-getreply), tier `read`, scope `inbox:read`)
1518
+
1519
+ - Source: `src/inbox.ts`
1520
+
1521
+ <a id="g8-inbox-list"></a>
1522
+
1523
+ ### `g8.inbox.list`
1524
+
1525
+ ```ts
1526
+ g8.inbox.list: (params?: InboxListParams) => Promise<{ data: InboxThread[]; }>
1527
+ ```
1528
+
1529
+ List inbox threads across email, SMS, and LinkedIn.
1530
+
1531
+ - Calls `GET /api/v1/inbox` ([`g8.api.inbox.listInbox`](api/inbox.md#op-listinbox), tier `read`, scope `inbox:read`)
1532
+
1533
+ - Source: `src/inbox.ts`
1534
+
1535
+ <a id="g8-inbox-send"></a>
1536
+
1537
+ ### `g8.inbox.send`
1538
+
1539
+ ```ts
1540
+ g8.inbox.send: (replyId: string, payload: InboxSendParams) => Promise<InboxSendResult>
1541
+ ```
1542
+
1543
+ Send a reply through email, SMS, or LinkedIn.
1544
+
1545
+ - Calls `POST /api/v1/inbox/{reply_id}/send` ([`g8.api.inbox.sendReply`](api/inbox.md#op-sendreply), tier `external`, scope `inbox:run`)
1546
+
1547
+ - Source: `src/inbox.ts`
1548
+
1549
+ <a id="g8-inbox-tag"></a>
1550
+
1551
+ ### `g8.inbox.tag`
1552
+
1553
+ ```ts
1554
+ g8.inbox.tag: (replyId: string, tagIds: string[], channel?: InboxChannel) => Promise<InboxTagResult>
1555
+ ```
1556
+
1557
+ Attach tag IDs to an inbox thread.
1558
+
1559
+ - Calls `POST /api/v1/inbox/{reply_id}/tag` ([`g8.api.inbox.tagReply`](api/inbox.md#op-tagreply), tier `external`, scope `inbox:run`)
1560
+
1561
+ - Source: `src/inbox.ts`
1562
+
1563
+ ---
1564
+
1565
+ <a id="g8-intent"></a>
1566
+
1567
+ ## `g8.intent`
1568
+
1569
+ Types: `dist/types/intent.d.ts`
1570
+
1571
+ <a id="g8-intent-createfromdomain"></a>
1572
+
1573
+ ### `g8.intent.createFromDomain`
1574
+
1575
+ ```ts
1576
+ g8.intent.createFromDomain: (domain: string) => Promise<{ data: IntentKeyword; }>
1577
+ ```
1578
+
1579
+ Create a keyword group from a domain (auto-tracks all pages).
1580
+
1581
+ - Calls `POST /api/v1/intent/keywords/create-from-domain` ([`g8.api.intent.keywordsCreateFromDomain`](api/intent.md#op-keywordscreatefromdomain), tier `billable`, scope `intent:run`)
1582
+
1583
+ - Source: `src/intent.ts`
1584
+
1585
+ <a id="g8-intent-deletekeyword"></a>
1586
+
1587
+ ### `g8.intent.deleteKeyword`
1588
+
1589
+ ```ts
1590
+ g8.intent.deleteKeyword: (keywordId: string) => Promise<{ data: { deleted: boolean; }; }>
1591
+ ```
1592
+
1593
+ Stop tracking a keyword (irreversible — historical data is retained).
1594
+
1595
+ - Calls `DELETE /api/v1/intent/keywords/{keyword_id}` ([`g8.api.intent.keywordsDelete`](api/intent.md#op-keywordsdelete), tier `destructive`, scope `intent:delete`)
1596
+
1597
+ - Source: `src/intent.ts`
1598
+
1599
+ <a id="g8-intent-keywordcompanies"></a>
1600
+
1601
+ ### `g8.intent.keywordCompanies`
1602
+
1603
+ ```ts
1604
+ g8.intent.keywordCompanies: (keywordId: string, params?: { limit?: number; date_from?: string; date_to?: string; }) => Promise<{ data: IntentCompany[]; }>
1605
+ ```
1606
+
1607
+ Companies showing interest in a tracked keyword.
1608
+
1609
+ - Calls `POST /api/v1/intent/keywords/{keyword_id}/companies` ([`g8.api.intent.keywordCompanies`](api/intent.md#op-keywordcompanies), tier `billable`, scope `intent:run`)
1610
+
1611
+ - Source: `src/intent.ts`
1612
+
1613
+ <a id="g8-intent-keywordcontacts"></a>
1614
+
1615
+ ### `g8.intent.keywordContacts`
1616
+
1617
+ ```ts
1618
+ g8.intent.keywordContacts: (keywordId: string, params?: { limit?: number; date_from?: string; date_to?: string; }) => Promise<{ data: IntentContact[]; }>
1619
+ ```
1620
+
1621
+ Contacts showing interest in a tracked keyword.
1622
+
1623
+ - Calls `POST /api/v1/intent/keywords/{keyword_id}/contacts` ([`g8.api.intent.keywordContacts`](api/intent.md#op-keywordcontacts), tier `billable`, scope `intent:run`)
1624
+
1625
+ - Source: `src/intent.ts`
1626
+
1627
+ <a id="g8-intent-keywordurls"></a>
1628
+
1629
+ ### `g8.intent.keywordUrls`
1630
+
1631
+ ```ts
1632
+ g8.intent.keywordUrls: (keywordId: string, params?: { limit?: number; }) => Promise<{ data: IntentPage[]; }>
1633
+ ```
1634
+
1635
+ URLs associated with a keyword (pages visitors landed on while interested).
1636
+
1637
+ - Calls `POST /api/v1/intent/keywords/{keyword_id}/urls` ([`g8.api.intent.keywordUrls`](api/intent.md#op-keywordurls), tier `billable`, scope `intent:run`)
1638
+
1639
+ - Source: `src/intent.ts`
1640
+
1641
+ <a id="g8-intent-listkeywords"></a>
1642
+
1643
+ ### `g8.intent.listKeywords`
1644
+
1645
+ ```ts
1646
+ g8.intent.listKeywords: (params?: { page?: number; limit?: number; search?: string; }) => Promise<{ data: IntentKeyword[]; }>
1647
+ ```
1648
+
1649
+ List tracked keywords with optional pagination.
1650
+
1651
+ - Calls `POST /api/v1/intent/keywords/list` ([`g8.api.intent.keywordsList`](api/intent.md#op-keywordslist), tier `billable`, scope `intent:run`)
1652
+
1653
+ - Source: `src/intent.ts`
1654
+
1655
+ <a id="g8-intent-pagecontacts"></a>
1656
+
1657
+ ### `g8.intent.pageContacts`
1658
+
1659
+ ```ts
1660
+ g8.intent.pageContacts: (pageUrl: string, params?: { limit?: number; }) => Promise<{ data: IntentContact[]; }>
1661
+ ```
1662
+
1663
+ Get contacts who visited a specific page URL.
1664
+
1665
+ - Calls `POST /api/v1/intent/pages/contacts` ([`g8.api.intent.pagesContacts`](api/intent.md#op-pagescontacts), tier `billable`, scope `intent:run`)
1666
+
1667
+ - Source: `src/intent.ts`
1668
+
1669
+ <a id="g8-intent-pagevisitorcounts"></a>
1670
+
1671
+ ### `g8.intent.pageVisitorCounts`
1672
+
1673
+ ```ts
1674
+ g8.intent.pageVisitorCounts: (urls: string[]) => Promise<{ data: Array<{ url: string; visitor_count: number; }>; }>
1675
+ ```
1676
+
1677
+ Visitor count aggregates by page (pass an array of URLs).
1678
+
1679
+ - Calls `POST /api/v1/intent/pages/visitor-counts` ([`g8.api.intent.pagesVisitorCounts`](api/intent.md#op-pagesvisitorcounts), tier `billable`, scope `intent:run`)
1680
+
1681
+ - Source: `src/intent.ts`
1682
+
1683
+ <a id="g8-intent-pagevisitors"></a>
1684
+
1685
+ ### `g8.intent.pageVisitors`
1686
+
1687
+ ```ts
1688
+ g8.intent.pageVisitors: (pageUrl: string, params?: { limit?: number; date_from?: string; date_to?: string; }) => Promise<{ data: IntentVisitor[]; }>
1689
+ ```
1690
+
1691
+ Get visitor records for a specific page URL.
1692
+
1693
+ - Calls `POST /api/v1/intent/pages/visitors` ([`g8.api.intent.pagesVisitors`](api/intent.md#op-pagesvisitors), tier `billable`, scope `intent:run`)
1694
+
1695
+ - Source: `src/intent.ts`
1696
+
1697
+ <a id="g8-intent-pagesbydomain"></a>
1698
+
1699
+ ### `g8.intent.pagesByDomain`
1700
+
1701
+ ```ts
1702
+ g8.intent.pagesByDomain: (domain: string, params?: { limit?: number; }) => Promise<{ data: IntentPage[]; }>
1703
+ ```
1704
+
1705
+ Pages tracked on a specific domain.
1706
+
1707
+ - Calls `POST /api/v1/intent/pages-by-domain` ([`g8.api.intent.pagesByDomain`](api/intent.md#op-pagesbydomain), tier `billable`, scope `intent:run`)
1708
+
1709
+ - Source: `src/intent.ts`
1710
+
1711
+ <a id="g8-intent-searchpages"></a>
1712
+
1713
+ ### `g8.intent.searchPages`
1714
+
1715
+ ```ts
1716
+ g8.intent.searchPages: (query: string, params?: { limit?: number; }) => Promise<{ data: IntentPage[]; }>
1717
+ ```
1718
+
1719
+ Search tracked pages by URL fragment or keyword.
1720
+
1721
+ - Calls `POST /api/v1/intent/pages/search` ([`g8.api.intent.pagesSearch`](api/intent.md#op-pagessearch), tier `billable`, scope `intent:run`)
1722
+
1723
+ - Source: `src/intent.ts`
1724
+
1725
+ <a id="g8-intent-stats"></a>
1726
+
1727
+ ### `g8.intent.stats`
1728
+
1729
+ ```ts
1730
+ g8.intent.stats: () => Promise<{ data: IntentStats; }>
1731
+ ```
1732
+
1733
+ Org-level intent stats (totals over the last 30 days).
1734
+
1735
+ - Calls `GET /api/v1/intent/stats` ([`g8.api.intent.intentStats`](api/intent.md#op-intentstats), tier `read`, scope `intent:read`)
1736
+
1737
+ - Source: `src/intent.ts`
1738
+
1739
+ <a id="g8-intent-urlcompanies"></a>
1740
+
1741
+ ### `g8.intent.urlCompanies`
1742
+
1743
+ ```ts
1744
+ g8.intent.urlCompanies: (url: string, params?: { limit?: number; days?: number; date_from?: string; date_to?: string; }) => Promise<IntentUrlCompaniesResponse>
1745
+ ```
1746
+
1747
+ Find companies whose users visited a specific URL (intent search). Previously posted to the bare-host `/intent-search/url-companies`, bypassing the shared `post()` helper. That route is JWT-only, so this method could never actually work with an API key. It now goes through `/api/v1/intent/url-companies` like the rest of the intent surface (g8 issue #16536). Returns a bare aggregate, NOT the `{ data }` envelope — the previous `{ data: IntentCompany[] }` signature never matched what the API sends. `date_from` / `date_to` are accepted for backwards compatibility but have never been read by this endpoint; use `days` to set the lookback window.
1748
+
1749
+ - Calls `POST /api/v1/intent/url-companies` ([`g8.api.intent.urlCompanies`](api/intent.md#op-urlcompanies), tier `read`, scope `intent:read`)
1750
+
1751
+ - Source: `src/intent.ts`
1752
+
1753
+ ---
1754
+
1755
+ <a id="g8-lists"></a>
1756
+
1757
+ ## `g8.lists`
1758
+
1759
+ Types: `dist/types/lists.d.ts`
1760
+
1761
+ <a id="g8-lists-addcontacts"></a>
1762
+
1763
+ ### `g8.lists.addContacts`
1764
+
1765
+ ```ts
1766
+ g8.lists.addContacts: (listId: number, contactIds: number[]) => Promise<{ added: number; }>
1767
+ ```
1768
+
1769
+ Add contacts to a list.
1770
+
1771
+ - Calls `POST /api/v1/lists/{list_id}/contacts` ([`g8.api.lists.addContactsToList`](api/lists.md#op-addcontactstolist), tier `write`, scope `lists:write`)
1772
+
1773
+ - Source: `src/lists.ts`
1774
+
1775
+ <a id="g8-lists-contacts"></a>
1776
+
1777
+ ### `g8.lists.contacts`
1778
+
1779
+ ```ts
1780
+ g8.lists.contacts: (listId: number, page?: number, limit?: number) => Promise<{ data: ListContact[]; total: number; }>
1781
+ ```
1782
+
1783
+ Get contacts in a list.
1784
+
1785
+ - Calls `GET /api/v1/lists/{list_id}/contacts` ([`g8.api.lists.getListContacts`](api/lists.md#op-getlistcontacts), tier `read`, scope `lists:read`)
1786
+
1787
+ - Source: `src/lists.ts`
1788
+
1789
+ <a id="g8-lists-create"></a>
1790
+
1791
+ ### `g8.lists.create`
1792
+
1793
+ ```ts
1794
+ g8.lists.create: (title: string, type?: "contacts" | "companies") => Promise<ContactList>
1795
+ ```
1796
+
1797
+ Create a new list.
1798
+
1799
+ - Calls `POST /api/v1/lists` ([`g8.api.lists.createList`](api/lists.md#op-createlist), tier `write`, scope `lists:write`)
1800
+
1801
+ - Source: `src/lists.ts`
1802
+
1803
+ <a id="g8-lists-delete"></a>
1804
+
1805
+ ### `g8.lists.delete`
1806
+
1807
+ ```ts
1808
+ g8.lists.delete: (listId: number) => Promise<{ deleted: boolean; }>
1809
+ ```
1810
+
1811
+ Delete a list (soft-delete).
1812
+
1813
+ - Calls `DELETE /api/v1/lists/{list_id}` ([`g8.api.lists.deleteList`](api/lists.md#op-deletelist), tier `destructive`, scope `lists:delete`)
1814
+
1815
+ - Source: `src/lists.ts`
1816
+
1817
+ <a id="g8-lists-list"></a>
1818
+
1819
+ ### `g8.lists.list`
1820
+
1821
+ ```ts
1822
+ g8.lists.list: (page?: number, limit?: number) => Promise<{ data: ContactList[]; total: number; }>
1823
+ ```
1824
+
1825
+ List all lists.
1826
+
1827
+ - Calls `GET /api/v1/lists` ([`g8.api.lists.listLists`](api/lists.md#op-listlists), tier `read`, scope `lists:read`)
1828
+
1829
+ - Source: `src/lists.ts`
1830
+
1831
+ <a id="g8-lists-removecontacts"></a>
1832
+
1833
+ ### `g8.lists.removeContacts`
1834
+
1835
+ ```ts
1836
+ g8.lists.removeContacts: (listId: number, contactIds: number[]) => Promise<{ removed: number; }>
1837
+ ```
1838
+
1839
+ Remove contacts from a list.
1840
+
1841
+ - Calls `DELETE /api/v1/lists/{list_id}/contacts` ([`g8.api.lists.removeContactsFromList`](api/lists.md#op-removecontactsfromlist), tier `destructive`, scope `lists:delete`)
1842
+
1843
+ - Source: `src/lists.ts`
1844
+
1845
+ ---
1846
+
1847
+ <a id="g8-mailboxes"></a>
1848
+
1849
+ ## `g8.mailboxes`
1850
+
1851
+ Types: `dist/types/mailboxes.d.ts`
1852
+
1853
+ <a id="g8-mailboxes-create"></a>
1854
+
1855
+ ### `g8.mailboxes.create`
1856
+
1857
+ ```ts
1858
+ g8.mailboxes.create: (params: MailboxCreateParams) => Promise<Mailbox>
1859
+ ```
1860
+
1861
+ Connect an existing mailbox over IMAP/SMTP.
1862
+
1863
+ - Calls `POST /api/v1/mailboxes` ([`g8.api.mailboxes.createMailbox`](api/mailboxes.md#op-createmailbox), tier `write`, scope `campaigns:write`)
1864
+
1865
+ - Source: `src/mailboxes.ts`
1866
+
1867
+ <a id="g8-mailboxes-delete"></a>
1868
+
1869
+ ### `g8.mailboxes.delete`
1870
+
1871
+ ```ts
1872
+ g8.mailboxes.delete: (mailboxId: number) => Promise<MailboxDeleteResult>
1873
+ ```
1874
+
1875
+ Delete a mailbox. Sequences already referencing it stop being able to send from it.
1876
+
1877
+ - Calls `DELETE /api/v1/mailboxes/{mailbox_id}` ([`g8.api.mailboxes.deleteMailbox`](api/mailboxes.md#op-deletemailbox), tier `destructive`, scope `campaigns:delete`)
1878
+
1879
+ - Source: `src/mailboxes.ts`
1880
+
1881
+ <a id="g8-mailboxes-get"></a>
1882
+
1883
+ ### `g8.mailboxes.get`
1884
+
1885
+ ```ts
1886
+ g8.mailboxes.get: (mailboxId: number) => Promise<Mailbox>
1887
+ ```
1888
+
1889
+ Get a single mailbox by id. Credentials are never included.
1890
+
1891
+ - Calls `GET /api/v1/mailboxes/{mailbox_id}` ([`g8.api.mailboxes.getMailbox`](api/mailboxes.md#op-getmailbox), tier `read`, scope `campaigns:read`)
1892
+
1893
+ - Source: `src/mailboxes.ts`
1894
+
1895
+ <a id="g8-mailboxes-list"></a>
1896
+
1897
+ ### `g8.mailboxes.list`
1898
+
1899
+ ```ts
1900
+ g8.mailboxes.list: (params?: MailboxListParams) => Promise<{ data: MailboxListItem[]; }>
1901
+ ```
1902
+
1903
+ List sending mailboxes in the org.
1904
+
1905
+ - Calls `GET /api/v1/mailboxes` ([`g8.api.gtmContext.listMailboxes`](api/gtmContext.md#op-listmailboxes), tier `read`, scope `campaigns:read`)
1906
+
1907
+ - Source: `src/mailboxes.ts`
1908
+
1909
+ <a id="g8-mailboxes-testconnection"></a>
1910
+
1911
+ ### `g8.mailboxes.testConnection`
1912
+
1913
+ ```ts
1914
+ g8.mailboxes.testConnection: (mailboxId: number, params?: MailboxTestConnectionParams) => Promise<MailboxTestConnectionResult>
1915
+ ```
1916
+
1917
+ Verify a mailbox's IMAP/SMTP credentials and refresh its connection status. Call with no params (or `{}`) to test what is stored; supply overrides to test candidate values without saving them.
1918
+
1919
+ - Calls `POST /api/v1/mailboxes/{mailbox_id}/test-connection` ([`g8.api.mailboxes.testMailboxConnection`](api/mailboxes.md#op-testmailboxconnection), tier `write`, scope `campaigns:write`)
1920
+
1921
+ - Source: `src/mailboxes.ts`
1922
+
1923
+ <a id="g8-mailboxes-update"></a>
1924
+
1925
+ ### `g8.mailboxes.update`
1926
+
1927
+ ```ts
1928
+ g8.mailboxes.update: (mailboxId: number, params: MailboxUpdateParams) => Promise<Mailbox>
1929
+ ```
1930
+
1931
+ Update a mailbox. Only supplied fields change; omitted fields are untouched.
1932
+
1933
+ - Calls `PATCH /api/v1/mailboxes/{mailbox_id}` ([`g8.api.mailboxes.updateMailbox`](api/mailboxes.md#op-updatemailbox), tier `write`, scope `campaigns:write`)
1934
+
1935
+ - Source: `src/mailboxes.ts`
1936
+
1937
+ <a id="g8-mailboxes-warmup"></a>
1938
+
1939
+ ### `g8.mailboxes.warmup`
1940
+
1941
+ ```ts
1942
+ g8.mailboxes.warmup: (mailboxId: number) => Promise<MailboxWarmupAnalytics>
1943
+ ```
1944
+
1945
+ Get live warmup analytics for a single mailbox (a provider HTTP round-trip, ~300-800ms).
1946
+
1947
+ - Calls `GET /api/v1/mailboxes/{mailbox_id}/warmup` ([`g8.api.gtmContext.getMailboxWarmupAnalytics`](api/gtmContext.md#op-getmailboxwarmupanalytics), tier `read`, scope `campaigns:read`)
1948
+
1949
+ - Source: `src/mailboxes.ts`
1950
+
1951
+ ---
1952
+
1953
+ <a id="g8-marketplace"></a>
1954
+
1955
+ ## `g8.marketplace`
1956
+
1957
+ Types: `dist/types/marketplace.d.ts`
1958
+
1959
+ <a id="g8-marketplace-acceptoffer"></a>
1960
+
1961
+ ### `g8.marketplace.acceptOffer`
1962
+
1963
+ ```ts
1964
+ g8.marketplace.acceptOffer: (hiringId: string) => Promise<Record<string, unknown>>
1965
+ ```
1966
+
1967
+ Accept a pending hire offer (by hiring id).
1968
+
1969
+ - Calls `POST /api/v1/marketplace/me/offers/{hiring_id}/accept` ([`g8.api.marketplace.acceptMyOffer`](api/marketplace.md#op-acceptmyoffer), tier `billable`, scope `marketplace:run`)
1970
+
1971
+ - Source: `src/marketplace.ts`
1972
+
1973
+ <a id="g8-marketplace-hirings"></a>
1974
+
1975
+ ### `g8.marketplace.hirings`
1976
+
1977
+ ```ts
1978
+ g8.marketplace.hirings: () => Promise<{ hirings: MarketplaceHiring[]; count: number; }>
1979
+ ```
1980
+
1981
+ Your active hiring contracts.
1982
+
1983
+ - Calls `GET /api/v1/marketplace/me/hirings` ([`g8.api.marketplace.listMyMarketplaceHirings`](api/marketplace.md#op-listmymarketplacehirings), tier `read`, scope `marketplace:read`)
1984
+
1985
+ - Source: `src/marketplace.ts`
1986
+
1987
+ <a id="g8-marketplace-offers"></a>
1988
+
1989
+ ### `g8.marketplace.offers`
1990
+
1991
+ ```ts
1992
+ g8.marketplace.offers: () => Promise<{ offers: MarketplaceOffer[]; count: number; }>
1993
+ ```
1994
+
1995
+ Pending hire offers you can accept or reject.
1996
+
1997
+ - Calls `GET /api/v1/marketplace/me/offers` ([`g8.api.marketplace.listMyMarketplaceOffers`](api/marketplace.md#op-listmymarketplaceoffers), tier `read`, scope `marketplace:read`)
1998
+
1999
+ - Source: `src/marketplace.ts`
2000
+
2001
+ <a id="g8-marketplace-profile"></a>
2002
+
2003
+ ### `g8.marketplace.profile`
2004
+
2005
+ ```ts
2006
+ g8.marketplace.profile: () => Promise<MarketplaceProfile>
2007
+ ```
2008
+
2009
+ Your own marketplace SDR profile.
2010
+
2011
+ - Calls `GET /api/v1/marketplace/me/profile` ([`g8.api.marketplace.getMyMarketplaceProfile`](api/marketplace.md#op-getmymarketplaceprofile), tier `read`, scope `marketplace:read`)
2012
+
2013
+ - Source: `src/marketplace.ts`
2014
+
2015
+ <a id="g8-marketplace-rejectoffer"></a>
2016
+
2017
+ ### `g8.marketplace.rejectOffer`
2018
+
2019
+ ```ts
2020
+ g8.marketplace.rejectOffer: (hiringId: string) => Promise<Record<string, unknown>>
2021
+ ```
2022
+
2023
+ Reject a pending hire offer (by hiring id).
2024
+
2025
+ - Calls `POST /api/v1/marketplace/me/offers/{hiring_id}/reject` ([`g8.api.marketplace.rejectMyOffer`](api/marketplace.md#op-rejectmyoffer), tier `billable`, scope `marketplace:run`)
2026
+
2027
+ - Source: `src/marketplace.ts`
2028
+
2029
+ ---
2030
+
2031
+ <a id="g8-meetings"></a>
2032
+
2033
+ ## `g8.meetings`
2034
+
2035
+ Types: `dist/types/meetings.d.ts`
2036
+
2037
+ <a id="g8-meetings-get"></a>
2038
+
2039
+ ### `g8.meetings.get`
2040
+
2041
+ ```ts
2042
+ g8.meetings.get: (meetingId: string) => Promise<MeetingDetail>
2043
+ ```
2044
+
2045
+ Get full meeting detail including transcript + AI analysis (transcript available 1-5 min after meeting ends).
2046
+
2047
+ - Calls `GET /api/v1/inbox/meetings/{meeting_id}` ([`g8.api.meetings.getMeeting`](api/meetings.md#op-getmeeting), tier `read`, scope `meetings:read`)
2048
+
2049
+ - Source: `src/meetings.ts`
2050
+
2051
+ <a id="g8-meetings-list"></a>
2052
+
2053
+ ### `g8.meetings.list`
2054
+
2055
+ ```ts
2056
+ g8.meetings.list: (params?: MeetingListParams) => Promise<{ data: MeetingSummary[]; pagination?: { page: number; limit: number; total: number; has_next: boolean; }; }>
2057
+ ```
2058
+
2059
+ List meetings with optional filters. Returns summary rows without transcript / analysis.
2060
+
2061
+ - Calls `GET /api/v1/inbox/meetings` ([`g8.api.meetings.listMeetings`](api/meetings.md#op-listmeetings), tier `read`, scope `meetings:read`)
2062
+
2063
+ - Source: `src/meetings.ts`
2064
+
2065
+ ---
2066
+
2067
+ <a id="g8-newsletter"></a>
2068
+
2069
+ ## `g8.newsletter`
2070
+
2071
+ Types: `dist/types/newsletter.d.ts`
2072
+
2073
+ <a id="g8-newsletter-addsubscriber"></a>
2074
+
2075
+ ### `g8.newsletter.addSubscriber`
2076
+
2077
+ ```ts
2078
+ g8.newsletter.addSubscriber: (newsletterId: string, email: string, opts?: { first_name?: string; last_name?: string; }) => Promise<NewsletterSubscriber>
2079
+ ```
2080
+
2081
+ Add a subscriber to a newsletter. Mirrors `SubscriberAddRequest` (newsletter.py:77) — `email` required, `first_name`/`last_name` optional.
2082
+
2083
+ - Calls `POST /api/v1/newsletters/{newsletter_id}/subscribers` ([`g8.api.newsletter.addSubscriber`](api/newsletter.md#op-addsubscriber), tier `external`, scope `newsletter:run`)
2084
+
2085
+ - Source: `src/newsletter.ts`
2086
+
2087
+ <a id="g8-newsletter-create"></a>
2088
+
2089
+ ### `g8.newsletter.create`
2090
+
2091
+ ```ts
2092
+ g8.newsletter.create: (params: NewsletterCreateParams) => Promise<Newsletter>
2093
+ ```
2094
+
2095
+ Create a newsletter. Mirrors `NewsletterCreateRequest` (newsletter.py:29).
2096
+
2097
+ - Calls `POST /api/v1/newsletters` ([`g8.api.newsletter.createNewsletter`](api/newsletter.md#op-createnewsletter), tier `external`, scope `newsletter:run`)
2098
+
2099
+ - Source: `src/newsletter.ts`
2100
+
2101
+ <a id="g8-newsletter-createissue"></a>
2102
+
2103
+ ### `g8.newsletter.createIssue`
2104
+
2105
+ ```ts
2106
+ g8.newsletter.createIssue: (newsletterId: string, params: NewsletterIssueCreateParams) => Promise<NewsletterIssue>
2107
+ ```
2108
+
2109
+ Create an issue on a newsletter. Mirrors `IssueCreateRequest` (newsletter.py:42).
2110
+
2111
+ - Calls `POST /api/v1/newsletters/{newsletter_id}/issues` ([`g8.api.newsletter.createIssue`](api/newsletter.md#op-createissue), tier `external`, scope `newsletter:run`)
2112
+
2113
+ - Source: `src/newsletter.ts`
2114
+
2115
+ <a id="g8-newsletter-duplicateissue"></a>
2116
+
2117
+ ### `g8.newsletter.duplicateIssue`
2118
+
2119
+ ```ts
2120
+ g8.newsletter.duplicateIssue: (newsletterId: string, issueId: string) => Promise<NewsletterIssue>
2121
+ ```
2122
+
2123
+ Duplicate an issue into a new draft.
2124
+
2125
+ - Calls `POST /api/v1/newsletters/{newsletter_id}/issues/{issue_id}/duplicate` ([`g8.api.newsletter.duplicateIssue`](api/newsletter.md#op-duplicateissue), tier `external`, scope `newsletter:run`)
2126
+
2127
+ - Source: `src/newsletter.ts`
2128
+
2129
+ <a id="g8-newsletter-get"></a>
2130
+
2131
+ ### `g8.newsletter.get`
2132
+
2133
+ ```ts
2134
+ g8.newsletter.get: (newsletterId: string) => Promise<Newsletter>
2135
+ ```
2136
+
2137
+ Get a single newsletter.
2138
+
2139
+ - Calls `GET /api/v1/newsletters/{newsletter_id}` ([`g8.api.newsletter.getNewsletter`](api/newsletter.md#op-getnewsletter), tier `read`, scope `newsletter:read`)
2140
+
2141
+ - Source: `src/newsletter.ts`
2142
+
2143
+ <a id="g8-newsletter-getissue"></a>
2144
+
2145
+ ### `g8.newsletter.getIssue`
2146
+
2147
+ ```ts
2148
+ g8.newsletter.getIssue: (newsletterId: string, issueId: string) => Promise<NewsletterIssue>
2149
+ ```
2150
+
2151
+ Get a single issue.
2152
+
2153
+ - Calls `GET /api/v1/newsletters/{newsletter_id}/issues/{issue_id}` ([`g8.api.newsletter.getIssue`](api/newsletter.md#op-getissue), tier `read`, scope `newsletter:read`)
2154
+
2155
+ - Source: `src/newsletter.ts`
2156
+
2157
+ <a id="g8-newsletter-issuekpis"></a>
2158
+
2159
+ ### `g8.newsletter.issueKpis`
2160
+
2161
+ ```ts
2162
+ g8.newsletter.issueKpis: (newsletterId: string, issueId: string) => Promise<NewsletterIssueKpis>
2163
+ ```
2164
+
2165
+ Engagement KPIs for a sent issue.
2166
+
2167
+ - Calls `GET /api/v1/newsletters/{newsletter_id}/issues/{issue_id}/analytics/kpis` ([`g8.api.newsletter.getIssueAnalyticsKpis`](api/newsletter.md#op-getissueanalyticskpis), tier `read`, scope `newsletter:read`)
2168
+
2169
+ - Source: `src/newsletter.ts`
2170
+
2171
+ <a id="g8-newsletter-list"></a>
2172
+
2173
+ ### `g8.newsletter.list`
2174
+
2175
+ ```ts
2176
+ g8.newsletter.list: (params?: NewsletterListParams) => Promise<{ data: Newsletter[]; }>
2177
+ ```
2178
+
2179
+ List newsletters for the org.
2180
+
2181
+ - Calls `GET /api/v1/newsletters` ([`g8.api.newsletter.listNewsletters`](api/newsletter.md#op-listnewsletters), tier `read`, scope `newsletter:read`)
2182
+
2183
+ - Source: `src/newsletter.ts`
2184
+
2185
+ <a id="g8-newsletter-listissues"></a>
2186
+
2187
+ ### `g8.newsletter.listIssues`
2188
+
2189
+ ```ts
2190
+ g8.newsletter.listIssues: (newsletterId: string) => Promise<{ data: NewsletterIssue[]; }>
2191
+ ```
2192
+
2193
+ List issues of a newsletter.
2194
+
2195
+ - Calls `GET /api/v1/newsletters/{newsletter_id}/issues` ([`g8.api.newsletter.listIssues`](api/newsletter.md#op-listissues), tier `read`, scope `newsletter:read`)
2196
+
2197
+ - Source: `src/newsletter.ts`
2198
+
2199
+ <a id="g8-newsletter-listsubscribers"></a>
2200
+
2201
+ ### `g8.newsletter.listSubscribers`
2202
+
2203
+ ```ts
2204
+ g8.newsletter.listSubscribers: (newsletterId: string, params?: NewsletterListParams) => Promise<{ data: NewsletterSubscriber[]; }>
2205
+ ```
2206
+
2207
+ List subscribers of a newsletter.
2208
+
2209
+ - Calls `GET /api/v1/newsletters/{newsletter_id}/subscribers` ([`g8.api.newsletter.listSubscribers`](api/newsletter.md#op-listsubscribers), tier `read`, scope `newsletter:read`)
2210
+
2211
+ - Source: `src/newsletter.ts`
2212
+
2213
+ <a id="g8-newsletter-sendissue"></a>
2214
+
2215
+ ### `g8.newsletter.sendIssue`
2216
+
2217
+ ```ts
2218
+ g8.newsletter.sendIssue: (newsletterId: string, issueId: string, opts?: { idempotencyKey?: string; scheduled_at?: string; }) => Promise<{ data: unknown; }>
2219
+ ```
2220
+
2221
+ Send an issue to its subscribers. This sends real email — pass an `idempotencyKey` so a retry cannot double-send. `scheduled_at` mirrors `IssueSendRequest.scheduled_at` (newsletter.py:70); omitted (or left undefined) sends immediately, matching the DTO's own default. Note `idempotencyKey` is a transport header (`Idempotency-Key`), not a body field, so it is not part of the `IssueSendRequest` mirror.
2222
+
2223
+ - Calls `POST /api/v1/newsletters/{newsletter_id}/issues/{issue_id}/send` ([`g8.api.newsletter.sendIssue`](api/newsletter.md#op-sendissue), tier `external`, scope `newsletter:run`)
2224
+
2225
+ - Source: `src/newsletter.ts`
2226
+
2227
+ <a id="g8-newsletter-sendtestemail"></a>
2228
+
2229
+ ### `g8.newsletter.sendTestEmail`
2230
+
2231
+ ```ts
2232
+ g8.newsletter.sendTestEmail: (newsletterId: string, issueId: string, testEmail: string) => Promise<{ data: unknown; }>
2233
+ ```
2234
+
2235
+ Send a test copy of an issue to a single address. Mirrors `IssueSendTestRequest` (newsletter.py:73): ONE required `test_email` string, not a `recipients` array — the previous shape here always 422'd against the real API.
2236
+
2237
+ - Calls `POST /api/v1/newsletters/{newsletter_id}/issues/{issue_id}/send-test` ([`g8.api.newsletter.sendTestEmail`](api/newsletter.md#op-sendtestemail), tier `external`, scope `newsletter:run`)
2238
+
2239
+ - Source: `src/newsletter.ts`
2240
+
2241
+ <a id="g8-newsletter-templates"></a>
2242
+
2243
+ ### `g8.newsletter.templates`
2244
+
2245
+ ```ts
2246
+ g8.newsletter.templates: () => Promise<{ data: NewsletterTemplate[]; }>
2247
+ ```
2248
+
2249
+ List available newsletter templates.
2250
+
2251
+ - Calls `GET /api/v1/newsletters/templates` ([`g8.api.newsletter.listTemplates`](api/newsletter.md#op-listtemplates), tier `read`, scope `newsletter:read`)
2252
+
2253
+ - Source: `src/newsletter.ts`
2254
+
2255
+ <a id="g8-newsletter-unsubscribe"></a>
2256
+
2257
+ ### `g8.newsletter.unsubscribe`
2258
+
2259
+ ```ts
2260
+ g8.newsletter.unsubscribe: (newsletterId: string, subscriberId: string) => Promise<{ data: unknown; }>
2261
+ ```
2262
+
2263
+ Unsubscribe a subscriber.
2264
+
2265
+ - Calls `PATCH /api/v1/newsletters/{newsletter_id}/subscribers/{subscriber_id}/unsubscribe` ([`g8.api.newsletter.unsubscribeSubscriber`](api/newsletter.md#op-unsubscribesubscriber), tier `external`, scope `newsletter:run`)
2266
+
2267
+ - Source: `src/newsletter.ts`
2268
+
2269
+ <a id="g8-newsletter-updateissue"></a>
2270
+
2271
+ ### `g8.newsletter.updateIssue`
2272
+
2273
+ ```ts
2274
+ g8.newsletter.updateIssue: (newsletterId: string, issueId: string, params: NewsletterIssueUpdateParams) => Promise<NewsletterIssue>
2275
+ ```
2276
+
2277
+ Update fields on a draft issue. Partial — only the fields you pass are changed. Mirrors `IssueUpdateRequest` (newsletter.py:52), NOT `IssueCreateRequest`: every field is optional here even though the transport verb is PUT.
2278
+
2279
+ - Calls `PUT /api/v1/newsletters/{newsletter_id}/issues/{issue_id}` ([`g8.api.newsletter.updateIssue`](api/newsletter.md#op-updateissue), tier `external`, scope `newsletter:run`)
2280
+
2281
+ - Source: `src/newsletter.ts`
2282
+
2283
+ ---
2284
+
2285
+ <a id="g8-notes"></a>
2286
+
2287
+ ## `g8.notes`
2288
+
2289
+ Types: `dist/types/notes.d.ts`
2290
+
2291
+ <a id="g8-notes-create"></a>
2292
+
2293
+ ### `g8.notes.create`
2294
+
2295
+ ```ts
2296
+ g8.notes.create: (contactId: number, content: string) => Promise<Note>
2297
+ ```
2298
+
2299
+ Create a note on a contact.
2300
+
2301
+ - Calls `POST /api/v1/contacts/{contact_id}/notes` ([`g8.api.notes.createNote`](api/notes.md#op-createnote), tier `write`, scope `notes:write`)
2302
+
2303
+ - Source: `src/notes.ts`
2304
+
2305
+ <a id="g8-notes-createforcompany"></a>
2306
+
2307
+ ### `g8.notes.createForCompany`
2308
+
2309
+ ```ts
2310
+ g8.notes.createForCompany: (companyId: number, content: string) => Promise<Note>
2311
+ ```
2312
+
2313
+ Create a note on a company.
2314
+
2315
+ - Calls `POST /api/v1/companies/{company_id}/notes` ([`g8.api.notes.createCompanyNote`](api/notes.md#op-createcompanynote), tier `write`, scope `notes:write`)
2316
+
2317
+ - Source: `src/notes.ts`
2318
+
2319
+ <a id="g8-notes-createfordeal"></a>
2320
+
2321
+ ### `g8.notes.createForDeal`
2322
+
2323
+ ```ts
2324
+ g8.notes.createForDeal: (dealId: string, content: string) => Promise<Note>
2325
+ ```
2326
+
2327
+ Create a note on a deal. `dealId` is a UUID string, not a number.
2328
+
2329
+ - Calls `POST /api/v1/deals/{deal_id}/notes` ([`g8.api.notes.createDealNote`](api/notes.md#op-createdealnote), tier `write`, scope `notes:write`)
2330
+
2331
+ - Source: `src/notes.ts`
2332
+
2333
+ <a id="g8-notes-delete"></a>
2334
+
2335
+ ### `g8.notes.delete`
2336
+
2337
+ ```ts
2338
+ g8.notes.delete: (noteId: string) => Promise<{ data: { deleted: boolean; }; }>
2339
+ ```
2340
+
2341
+ Delete a note.
2342
+
2343
+ - Calls `DELETE /api/v1/notes/{note_id}` ([`g8.api.notes.deleteNote`](api/notes.md#op-deletenote), tier `destructive`, scope `notes:delete`)
2344
+
2345
+ - Source: `src/notes.ts`
2346
+
2347
+ <a id="g8-notes-list"></a>
2348
+
2349
+ ### `g8.notes.list`
2350
+
2351
+ ```ts
2352
+ g8.notes.list: (contactId: number) => Promise<{ data: Note[]; }>
2353
+ ```
2354
+
2355
+ List all notes on a contact.
2356
+
2357
+ - Calls `GET /api/v1/contacts/{contact_id}/notes` ([`g8.api.notes.listNotes`](api/notes.md#op-listnotes), tier `read`, scope `notes:read`)
2358
+
2359
+ - Source: `src/notes.ts`
2360
+
2361
+ <a id="g8-notes-listforcompany"></a>
2362
+
2363
+ ### `g8.notes.listForCompany`
2364
+
2365
+ ```ts
2366
+ g8.notes.listForCompany: (companyId: number) => Promise<{ data: Note[]; }>
2367
+ ```
2368
+
2369
+ List all notes on a company.
2370
+
2371
+ - Calls `GET /api/v1/companies/{company_id}/notes` ([`g8.api.notes.listCompanyNotes`](api/notes.md#op-listcompanynotes), tier `read`, scope `notes:read`)
2372
+
2373
+ - Source: `src/notes.ts`
2374
+
2375
+ <a id="g8-notes-listfordeal"></a>
2376
+
2377
+ ### `g8.notes.listForDeal`
2378
+
2379
+ ```ts
2380
+ g8.notes.listForDeal: (dealId: string) => Promise<{ data: Note[]; }>
2381
+ ```
2382
+
2383
+ List all notes on a deal. `dealId` is a UUID string, not a number.
2384
+
2385
+ - Calls `GET /api/v1/deals/{deal_id}/notes` ([`g8.api.notes.listDealNotes`](api/notes.md#op-listdealnotes), tier `read`, scope `notes:read`)
2386
+
2387
+ - Source: `src/notes.ts`
2388
+
2389
+ <a id="g8-notes-update"></a>
2390
+
2391
+ ### `g8.notes.update`
2392
+
2393
+ ```ts
2394
+ g8.notes.update: (noteId: string, content: string) => Promise<Note>
2395
+ ```
2396
+
2397
+ Update a note's content. Works for contact, company and deal notes.
2398
+
2399
+ - Calls `PATCH /api/v1/notes/{note_id}` ([`g8.api.notes.updateNote`](api/notes.md#op-updatenote), tier `write`, scope `notes:write`)
2400
+
2401
+ - Source: `src/notes.ts`
2402
+
2403
+ ---
2404
+
2405
+ <a id="g8-objects"></a>
2406
+
2407
+ ## `g8.objects`
2408
+
2409
+ Types: `dist/types/objects.d.ts`
2410
+
2411
+ <a id="g8-objects-archive"></a>
2412
+
2413
+ ### `g8.objects.archive`
2414
+
2415
+ ```ts
2416
+ g8.objects.archive: (objectSlug: string) => Promise<CustomObject>
2417
+ ```
2418
+
2419
+ Archive the object without deleting records; restore with update({ is_archived: false }).
2420
+
2421
+ - Calls `DELETE /api/v1/objects/{object_slug}` ([`g8.api.objects.archiveObject`](api/objects.md#op-archiveobject), tier `destructive`, scope `objects:manage`)
2422
+
2423
+ - Source: `src/objects.ts`
2424
+
2425
+ <a id="g8-objects-archiveattribute"></a>
2426
+
2427
+ ### `g8.objects.archiveAttribute`
2428
+
2429
+ ```ts
2430
+ g8.objects.archiveAttribute: (objectSlug: string, attributeSlug: string) => Promise<CustomObjectAttribute>
2431
+ ```
2432
+
2433
+ Archive without deleting values; restore with updateAttribute({ is_archived: false }).
2434
+
2435
+ - Calls `DELETE /api/v1/objects/{object_slug}/attributes/{attr_slug}` ([`g8.api.objects.archiveAttribute`](api/objects.md#op-archiveattribute), tier `destructive`, scope `objects:manage`)
2436
+
2437
+ - Source: `src/objects.ts`
2438
+
2439
+ <a id="g8-objects-archiverecord"></a>
2440
+
2441
+ ### `g8.objects.archiveRecord`
2442
+
2443
+ ```ts
2444
+ g8.objects.archiveRecord: (objectSlug: string, recordId: string) => Promise<CustomObjectRecord>
2445
+ ```
2446
+
2447
+ Archive a record. It leaves listings, stays readable by id, and keeps its history and associations. Nothing is destroyed.
2448
+
2449
+ - Calls `DELETE /api/v1/objects/{object_slug}/records/{record_id}` ([`g8.api.objects.archiveObjectRecord`](api/objects.md#op-archiveobjectrecord), tier `destructive`, scope `objects:delete`)
2450
+
2451
+ - Source: `src/objects.ts`
2452
+
2453
+ <a id="g8-objects-changes"></a>
2454
+
2455
+ ### `g8.objects.changes`
2456
+
2457
+ ```ts
2458
+ g8.objects.changes: (objectSlug: string, recordId: string, options?: { limit?: number; cursor?: string; }) => Promise<CustomObjectMutations>
2459
+ ```
2460
+
2461
+ Recorded custom-record or canonical contact/company mutations. Pass next_cursor to continue. Canonical history respects current access/privacy; archived records and older unrecorded writes are not reconstructed. Store unavailability returns 503.
2462
+
2463
+ - Calls `GET /api/v1/objects/{object_slug}/records/{record_id}/changes` ([`g8.api.objects.getObjectRecordChanges`](api/objects.md#op-getobjectrecordchanges), tier `read`, scope `objects:read`)
2464
+
2465
+ - Source: `src/objects.ts`
2466
+
2467
+ <a id="g8-objects-create"></a>
2468
+
2469
+ ### `g8.objects.create`
2470
+
2471
+ ```ts
2472
+ g8.objects.create: (input: CreateCustomObject) => Promise<CustomObject>
2473
+ ```
2474
+
2475
+ Create a native custom object. Requires objects:manage and Admin access.
2476
+
2477
+ - Calls `POST /api/v1/objects` ([`g8.api.objects.createObject`](api/objects.md#op-createobject), tier `write`, scope `objects:manage`)
2478
+
2479
+ - Source: `src/objects.ts`
2480
+
2481
+ <a id="g8-objects-createattribute"></a>
2482
+
2483
+ ### `g8.objects.createAttribute`
2484
+
2485
+ ```ts
2486
+ g8.objects.createAttribute: (objectSlug: string, input: CreateCustomObjectAttribute) => Promise<CustomObjectAttribute>
2487
+ ```
2488
+
2489
+ Create a field using the same schema rules as the customer UI.
2490
+
2491
+ - Calls `POST /api/v1/objects/{object_slug}/attributes` ([`g8.api.objects.createAttribute`](api/objects.md#op-createattribute), tier `write`, scope `objects:manage`)
2492
+
2493
+ - Source: `src/objects.ts`
2494
+
2495
+ <a id="g8-objects-createrecord"></a>
2496
+
2497
+ ### `g8.objects.createRecord`
2498
+
2499
+ ```ts
2500
+ g8.objects.createRecord: (objectSlug: string, values: Record<string, unknown>) => Promise<CustomObjectRecord>
2501
+ ```
2502
+
2503
+ Create a record. Every field is validated against the object's attributes; an unknown one is a 422 listing every problem at once, and a collision on a unique attribute is a 409.
2504
+
2505
+ - Calls `POST /api/v1/objects/{object_slug}/records` ([`g8.api.objects.createObjectRecord`](api/objects.md#op-createobjectrecord), tier `write`, scope `objects:write`)
2506
+
2507
+ - Source: `src/objects.ts`
2508
+
2509
+ <a id="g8-objects-get"></a>
2510
+
2511
+ ### `g8.objects.get`
2512
+
2513
+ ```ts
2514
+ g8.objects.get: (objectSlug: string) => Promise<CustomObject>
2515
+ ```
2516
+
2517
+ Fetch one object type by slug.
2518
+
2519
+ - Calls `GET /api/v1/objects/{object_slug}` ([`g8.api.objects.getObject`](api/objects.md#op-getobject), tier `read`, scope `objects:read`)
2520
+
2521
+ - Source: `src/objects.ts`
2522
+
2523
+ <a id="g8-objects-getrecord"></a>
2524
+
2525
+ ### `g8.objects.getRecord`
2526
+
2527
+ ```ts
2528
+ g8.objects.getRecord: (objectSlug: string, recordId: string) => Promise<CustomObjectRecord>
2529
+ ```
2530
+
2531
+ Fetch one custom record, canonical contact/company, or deal by its stable graph8 ID. Deals retain their UUIDs and expose company, primary-contact and contact_ids references only when permitted. Generic deal mutations are not yet supported.
2532
+
2533
+ - Calls `GET /api/v1/objects/{object_slug}/records/{record_id}` ([`g8.api.objects.getObjectRecord`](api/objects.md#op-getobjectrecord), tier `read`, scope `objects:read`)
2534
+
2535
+ - Source: `src/objects.ts`
2536
+
2537
+ <a id="g8-objects-history"></a>
2538
+
2539
+ ### `g8.objects.history`
2540
+
2541
+ ```ts
2542
+ g8.objects.history: (objectSlug: string, recordId: string, limit?: number) => Promise<CustomObjectHistory>
2543
+ ```
2544
+
2545
+ A record's value timeline, newest first. An entry whose `active_until` is null is the value currently in force.
2546
+
2547
+ - Calls `GET /api/v1/objects/{object_slug}/records/{record_id}/history` ([`g8.api.objects.getObjectRecordHistory`](api/objects.md#op-getobjectrecordhistory), tier `read`, scope `objects:read`)
2548
+
2549
+ - Source: `src/objects.ts`
2550
+
2551
+ <a id="g8-objects-list"></a>
2552
+
2553
+ ### `g8.objects.list`
2554
+
2555
+ ```ts
2556
+ g8.objects.list: (params?: { include_archived?: boolean; }) => Promise<{ data: CustomObject[]; }>
2557
+ ```
2558
+
2559
+ List the custom object types in your workspace.
2560
+
2561
+ - Calls `GET /api/v1/objects` ([`g8.api.objects.listObjects`](api/objects.md#op-listobjects), tier `read`, scope `objects:read`)
2562
+
2563
+ - Source: `src/objects.ts`
2564
+
2565
+ <a id="g8-objects-listattributes"></a>
2566
+
2567
+ ### `g8.objects.listAttributes`
2568
+
2569
+ ```ts
2570
+ g8.objects.listAttributes: (objectSlug: string, params?: { include_archived?: boolean; }) => Promise<{ data: CustomObjectAttribute[]; }>
2571
+ ```
2572
+
2573
+ The object's attributes — the schema its records must satisfy.
2574
+
2575
+ - Calls `GET /api/v1/objects/{object_slug}/attributes` ([`g8.api.objects.listObjectAttributes`](api/objects.md#op-listobjectattributes), tier `read`, scope `objects:read`)
2576
+
2577
+ - Source: `src/objects.ts`
2578
+
2579
+ <a id="g8-objects-listrecords"></a>
2580
+
2581
+ ### `g8.objects.listRecords`
2582
+
2583
+ ```ts
2584
+ g8.objects.listRecords: (objectSlug: string, params?: ListRecordsParams) => Promise<{ data: CustomObjectRecord[]; pagination?: ObjectPagination; }>
2585
+ ```
2586
+
2587
+ Paginated custom records or canonical deals with current values and revisions. Deal totals and related references respect current record access.
2588
+
2589
+ - Calls `GET /api/v1/objects/{object_slug}/records` ([`g8.api.objects.listObjectRecords`](api/objects.md#op-listobjectrecords), tier `read`, scope `objects:read`)
2590
+
2591
+ - Source: `src/objects.ts`
2592
+
2593
+ <a id="g8-objects-restorerecord"></a>
2594
+
2595
+ ### `g8.objects.restoreRecord`
2596
+
2597
+ ```ts
2598
+ g8.objects.restoreRecord: (objectSlug: string, recordId: string) => Promise<CustomObjectRecord>
2599
+ ```
2600
+
2601
+ Restore archived values under current constraints. Conflicts leave the record archived.
2602
+
2603
+ - Calls `POST /api/v1/objects/{object_slug}/records/{record_id}/restore` ([`g8.api.objects.restoreObjectRecord`](api/objects.md#op-restoreobjectrecord), tier `write`, scope `objects:write`)
2604
+
2605
+ - Source: `src/objects.ts`
2606
+
2607
+ <a id="g8-objects-update"></a>
2608
+
2609
+ ### `g8.objects.update`
2610
+
2611
+ ```ts
2612
+ g8.objects.update: (objectSlug: string, input: UpdateCustomObject) => Promise<CustomObject>
2613
+ ```
2614
+
2615
+ Rename, archive or restore an object while preserving its slug and data.
2616
+
2617
+ - Calls `PATCH /api/v1/objects/{object_slug}` ([`g8.api.objects.updateObject`](api/objects.md#op-updateobject), tier `write`, scope `objects:manage`)
2618
+
2619
+ - Source: `src/objects.ts`
2620
+
2621
+ <a id="g8-objects-updateattribute"></a>
2622
+
2623
+ ### `g8.objects.updateAttribute`
2624
+
2625
+ ```ts
2626
+ g8.objects.updateAttribute: (objectSlug: string, attributeSlug: string, input: UpdateCustomObjectAttribute) => Promise<CustomObjectAttribute>
2627
+ ```
2628
+
2629
+ Edit or restore a field; its type and slug are immutable.
2630
+
2631
+ - Calls `PATCH /api/v1/objects/{object_slug}/attributes/{attr_slug}` ([`g8.api.objects.updateAttribute`](api/objects.md#op-updateattribute), tier `write`, scope `objects:manage`)
2632
+
2633
+ - Source: `src/objects.ts`
2634
+
2635
+ <a id="g8-objects-updaterecord"></a>
2636
+
2637
+ ### `g8.objects.updateRecord`
2638
+
2639
+ ```ts
2640
+ g8.objects.updateRecord: (objectSlug: string, recordId: string, values: Record<string, unknown>, options?: { expectedRevision?: number; appendValues?: Record<string, unknown[]>; removeValues?: Record<string, unknown[]>; }) => Promise<CustomObjectRecord>
2641
+ ```
2642
+
2643
+ Update a record. PARTIAL: only the attributes you send are touched, so required attributes you omit are left alone rather than reported missing. Sending an explicit `null` CLEARS that attribute. Custom values retain generations through `history`. Canonical contacts and companies require expectedRevision from a fresh read and expose recorded mutations through `changes`. They do not yet support appendValues/removeValues.
2644
+
2645
+ - Calls `PATCH /api/v1/objects/{object_slug}/records/{record_id}` ([`g8.api.objects.updateObjectRecord`](api/objects.md#op-updateobjectrecord), tier `write`, scope `objects:write`)
2646
+
2647
+ - Source: `src/objects.ts`
2648
+
2649
+ <a id="g8-objects-upsertrecord"></a>
2650
+
2651
+ ### `g8.objects.upsertRecord`
2652
+
2653
+ ```ts
2654
+ g8.objects.upsertRecord: (objectSlug: string, matchingAttribute: string, values: Record<string, unknown>, options?: { expectedRevision?: number; }) => Promise<CustomObjectRecord>
2655
+ ```
2656
+
2657
+ Match a unique single-value key, creating or updating while preserving omitted fields.
2658
+
2659
+ - Calls `POST /api/v1/objects/{object_slug}/records/upsert` ([`g8.api.objects.upsertObjectRecord`](api/objects.md#op-upsertobjectrecord), tier `write`, scope `objects:write`)
2660
+
2661
+ - Source: `src/objects.ts`
2662
+
2663
+ ---
2664
+
2665
+ <a id="g8-pipelines"></a>
2666
+
2667
+ ## `g8.pipelines`
2668
+
2669
+ Types: `dist/types/pipelines.d.ts`
2670
+
2671
+ <a id="g8-pipelines-create"></a>
2672
+
2673
+ ### `g8.pipelines.create`
2674
+
2675
+ ```ts
2676
+ g8.pipelines.create: (params: StagePipelineCreateParams) => Promise<StagePipeline>
2677
+ ```
2678
+
2679
+ Create a new pipeline. Defaults to a templated set of stages; pass blank=true for empty.
2680
+
2681
+ - Calls `POST /api/v1/pipelines` ([`g8.api.cliPipelines.createPipeline`](api/cliPipelines.md#op-createpipeline), tier `write`, scope `campaigns:write`)
2682
+
2683
+ - Source: `src/pipelines.ts`
2684
+
2685
+ <a id="g8-pipelines-createstage"></a>
2686
+
2687
+ ### `g8.pipelines.createStage`
2688
+
2689
+ ```ts
2690
+ g8.pipelines.createStage: (pipelineId: string, stage: StageCreateParams) => Promise<StagePipelineStage>
2691
+ ```
2692
+
2693
+ Add a new stage to a pipeline.
2694
+
2695
+ - Calls `POST /api/v1/pipelines/{pipeline_id}/stages` ([`g8.api.cliPipelines.createStage`](api/cliPipelines.md#op-createstage), tier `write`, scope `campaigns:write`)
2696
+
2697
+ - Source: `src/pipelines.ts`
2698
+
2699
+ <a id="g8-pipelines-delete"></a>
2700
+
2701
+ ### `g8.pipelines.delete`
2702
+
2703
+ ```ts
2704
+ g8.pipelines.delete: (pipelineId: string) => Promise<{ data: { deleted: boolean; }; }>
2705
+ ```
2706
+
2707
+ Delete a pipeline. Only allowed when no deals reference it.
2708
+
2709
+ - Calls `DELETE /api/v1/pipelines/{pipeline_id}` ([`g8.api.cliPipelines.deletePipeline`](api/cliPipelines.md#op-deletepipeline), tier `destructive`, scope `campaigns:delete`)
2710
+
2711
+ - Source: `src/pipelines.ts`
2712
+
2713
+ <a id="g8-pipelines-deletestage"></a>
2714
+
2715
+ ### `g8.pipelines.deleteStage`
2716
+
2717
+ ```ts
2718
+ g8.pipelines.deleteStage: (pipelineId: string, stageId: string) => Promise<{ data: { deleted: boolean; }; }>
2719
+ ```
2720
+
2721
+ Delete a stage from a pipeline.
2722
+
2723
+ - Calls `DELETE /api/v1/pipelines/{pipeline_id}/stages/{stage_id}` ([`g8.api.cliPipelines.deleteStage`](api/cliPipelines.md#op-deletestage), tier `destructive`, scope `campaigns:delete`)
2724
+
2725
+ - Source: `src/pipelines.ts`
2726
+
2727
+ <a id="g8-pipelines-evidencelibrary"></a>
2728
+
2729
+ ### `g8.pipelines.evidenceLibrary`
2730
+
2731
+ ```ts
2732
+ g8.pipelines.evidenceLibrary: () => Promise<{ data: EvidenceKey[]; }>
2733
+ ```
2734
+
2735
+ Get the canonical evidence-key library (used when defining stages).
2736
+
2737
+ - Calls `GET /api/v1/pipelines/evidence-library` ([`g8.api.cliPipelines.listStageEvidenceLibrary`](api/cliPipelines.md#op-liststageevidencelibrary), tier `read`, scope `campaigns:read`)
2738
+
2739
+ - Source: `src/pipelines.ts`
2740
+
2741
+ <a id="g8-pipelines-fromsuggestion"></a>
2742
+
2743
+ ### `g8.pipelines.fromSuggestion`
2744
+
2745
+ ```ts
2746
+ g8.pipelines.fromSuggestion: (suggestionId: string, overrides?: Partial<{ name: string; target: string; }>) => Promise<StagePipeline>
2747
+ ```
2748
+
2749
+ Create a real pipeline from an AI suggestion (optionally with overrides).
2750
+
2751
+ - Calls `POST /api/v1/pipelines/from-suggestion` ([`g8.api.cliPipelines.createPipelineFromSuggestion`](api/cliPipelines.md#op-createpipelinefromsuggestion), tier `write`, scope `campaigns:write`)
2752
+
2753
+ - Source: `src/pipelines.ts`
2754
+
2755
+ <a id="g8-pipelines-get"></a>
2756
+
2757
+ ### `g8.pipelines.get`
2758
+
2759
+ ```ts
2760
+ g8.pipelines.get: (pipelineId: string) => Promise<StagePipeline>
2761
+ ```
2762
+
2763
+ Get a single pipeline by ID.
2764
+
2765
+ - Calls `GET /api/v1/pipelines/{pipeline_id}` ([`g8.api.cliPipelines.getPipeline`](api/cliPipelines.md#op-getpipeline), tier `read`, scope `campaigns:read`)
2766
+
2767
+ - Source: `src/pipelines.ts`
2768
+
2769
+ <a id="g8-pipelines-list"></a>
2770
+
2771
+ ### `g8.pipelines.list`
2772
+
2773
+ ```ts
2774
+ g8.pipelines.list: () => Promise<{ data: StagePipeline[]; }>
2775
+ ```
2776
+
2777
+ List all stage-checklist pipelines with stages, evidence, scripts.
2778
+
2779
+ - Calls `GET /api/v1/pipelines` ([`g8.api.cliPipelines.listPipelines`](api/cliPipelines.md#op-listpipelines), tier `read`, scope `campaigns:read`)
2780
+
2781
+ - Source: `src/pipelines.ts`
2782
+
2783
+ <a id="g8-pipelines-reorderstages"></a>
2784
+
2785
+ ### `g8.pipelines.reorderStages`
2786
+
2787
+ ```ts
2788
+ g8.pipelines.reorderStages: (pipelineId: string, stageIds: string[]) => Promise<{ data: StagePipelineStage[]; }>
2789
+ ```
2790
+
2791
+ Reorder stages within a pipeline (pass full ordered list of stage IDs).
2792
+
2793
+ - Calls `PUT /api/v1/pipelines/{pipeline_id}/stages/reorder` ([`g8.api.cliPipelines.reorderStages`](api/cliPipelines.md#op-reorderstages), tier `write`, scope `campaigns:write`)
2794
+
2795
+ - Source: `src/pipelines.ts`
2796
+
2797
+ <a id="g8-pipelines-suggest"></a>
2798
+
2799
+ ### `g8.pipelines.suggest`
2800
+
2801
+ ```ts
2802
+ g8.pipelines.suggest: () => Promise<{ data: PipelineSuggestion; }>
2803
+ ```
2804
+
2805
+ Get an AI-suggested pipeline based on org context (brand, ICP, messaging).
2806
+
2807
+ - Calls `POST /api/v1/pipelines/suggest` ([`g8.api.cliPipelines.suggestPipeline`](api/cliPipelines.md#op-suggestpipeline), tier `billable`, scope `campaigns:run`)
2808
+
2809
+ - Source: `src/pipelines.ts`
2810
+
2811
+ <a id="g8-pipelines-update"></a>
2812
+
2813
+ ### `g8.pipelines.update`
2814
+
2815
+ ```ts
2816
+ g8.pipelines.update: (pipelineId: string, fields: StagePipelineUpdateParams) => Promise<StagePipeline>
2817
+ ```
2818
+
2819
+ Update pipeline metadata (name, target).
2820
+
2821
+ - Calls `PUT /api/v1/pipelines/{pipeline_id}` ([`g8.api.cliPipelines.updatePipeline`](api/cliPipelines.md#op-updatepipeline), tier `write`, scope `campaigns:write`)
2822
+
2823
+ - Source: `src/pipelines.ts`
2824
+
2825
+ <a id="g8-pipelines-updatestage"></a>
2826
+
2827
+ ### `g8.pipelines.updateStage`
2828
+
2829
+ ```ts
2830
+ g8.pipelines.updateStage: (pipelineId: string, stageId: string, fields: StageUpdateParams) => Promise<StagePipelineStage>
2831
+ ```
2832
+
2833
+ Update a stage (evidence, scripts, position).
2834
+
2835
+ - Calls `PUT /api/v1/pipelines/{pipeline_id}/stages/{stage_id}` ([`g8.api.cliPipelines.updateStage`](api/cliPipelines.md#op-updatestage), tier `write`, scope `campaigns:write`)
2836
+
2837
+ - Source: `src/pipelines.ts`
2838
+
2839
+ ---
2840
+
2841
+ <a id="g8-quotes"></a>
2842
+
2843
+ ## `g8.quotes`
2844
+
2845
+ Types: `dist/types/quotes.d.ts`
2846
+
2847
+ <a id="g8-quotes-create"></a>
2848
+
2849
+ ### `g8.quotes.create`
2850
+
2851
+ ```ts
2852
+ g8.quotes.create: (quote: QuoteCreateParams) => Promise<QuoteDetail>
2853
+ ```
2854
+
2855
+ Create a new quote from line items.
2856
+
2857
+ - Calls `POST /api/v1/quotes` ([`g8.api.quotes.createQuote`](api/quotes.md#op-createquote), tier `external`, scope `quotes:run`)
2858
+
2859
+ - Source: `src/quotes.ts`
2860
+
2861
+ <a id="g8-quotes-delete"></a>
2862
+
2863
+ ### `g8.quotes.delete`
2864
+
2865
+ ```ts
2866
+ g8.quotes.delete: (quoteId: string) => Promise<{ data: { deleted: boolean; }; }>
2867
+ ```
2868
+
2869
+ Delete a draft quote (irreversible).
2870
+
2871
+ - Calls `DELETE /api/v1/quotes/{quote_id}` ([`g8.api.quotes.deleteQuote`](api/quotes.md#op-deletequote), tier `destructive`, scope `quotes:delete`)
2872
+
2873
+ - Source: `src/quotes.ts`
2874
+
2875
+ <a id="g8-quotes-duplicate"></a>
2876
+
2877
+ ### `g8.quotes.duplicate`
2878
+
2879
+ ```ts
2880
+ g8.quotes.duplicate: (quoteId: string) => Promise<QuoteDetail>
2881
+ ```
2882
+
2883
+ Duplicate an existing quote (all line items copied into a new draft).
2884
+
2885
+ - Calls `POST /api/v1/quotes/{quote_id}/duplicate` ([`g8.api.quotes.duplicateQuote`](api/quotes.md#op-duplicatequote), tier `external`, scope `quotes:run`)
2886
+
2887
+ - Source: `src/quotes.ts`
2888
+
2889
+ <a id="g8-quotes-editasdraft"></a>
2890
+
2891
+ ### `g8.quotes.editAsDraft`
2892
+
2893
+ ```ts
2894
+ g8.quotes.editAsDraft: (quoteId: string) => Promise<{ data: { id: string; status: string; }; }>
2895
+ ```
2896
+
2897
+ Convert a signed / sent quote back to editable draft state.
2898
+
2899
+ - Calls `POST /api/v1/quotes/{quote_id}/edit-as-draft` ([`g8.api.quotes.editQuoteAsDraft`](api/quotes.md#op-editquoteasdraft), tier `external`, scope `quotes:run`)
2900
+
2901
+ - Source: `src/quotes.ts`
2902
+
2903
+ <a id="g8-quotes-forcompany"></a>
2904
+
2905
+ ### `g8.quotes.forCompany`
2906
+
2907
+ ```ts
2908
+ g8.quotes.forCompany: (companyId: number) => Promise<{ data: QuoteSummary[]; }>
2909
+ ```
2910
+
2911
+ Get all quotes associated with a company.
2912
+
2913
+ - Calls `GET /api/v1/companies/{company_id}/quotes` ([`g8.api.quotes.getCompanyQuotes`](api/quotes.md#op-getcompanyquotes), tier `read`, scope `quotes:read`)
2914
+
2915
+ - Source: `src/quotes.ts`
2916
+
2917
+ <a id="g8-quotes-forcontact"></a>
2918
+
2919
+ ### `g8.quotes.forContact`
2920
+
2921
+ ```ts
2922
+ g8.quotes.forContact: (contactId: number) => Promise<{ data: QuoteSummary[]; }>
2923
+ ```
2924
+
2925
+ Get all quotes associated with a contact.
2926
+
2927
+ - Calls `GET /api/v1/contacts/{contact_id}/quotes` ([`g8.api.quotes.getContactQuotes`](api/quotes.md#op-getcontactquotes), tier `read`, scope `quotes:read`)
2928
+
2929
+ - Source: `src/quotes.ts`
2930
+
2931
+ <a id="g8-quotes-get"></a>
2932
+
2933
+ ### `g8.quotes.get`
2934
+
2935
+ ```ts
2936
+ g8.quotes.get: (quoteId: string) => Promise<QuoteDetail>
2937
+ ```
2938
+
2939
+ Get full details for a single quote.
2940
+
2941
+ - Calls `GET /api/v1/quotes/{quote_id}` ([`g8.api.quotes.getQuote`](api/quotes.md#op-getquote), tier `read`, scope `quotes:read`)
2942
+
2943
+ - Source: `src/quotes.ts`
2944
+
2945
+ <a id="g8-quotes-list"></a>
2946
+
2947
+ ### `g8.quotes.list`
2948
+
2949
+ ```ts
2950
+ g8.quotes.list: (params?: QuoteListParams) => Promise<{ data: QuoteSummary[]; pagination?: PaginationMeta; }>
2951
+ ```
2952
+
2953
+ List quotes org-wide with optional filters and pagination.
2954
+
2955
+ - Calls `GET /api/v1/quotes` ([`g8.api.quotes.listQuotes`](api/quotes.md#op-listquotes), tier `read`, scope `quotes:read`)
2956
+
2957
+ - Source: `src/quotes.ts`
2958
+
2959
+ <a id="g8-quotes-products"></a>
2960
+
2961
+ ### `g8.quotes.products`
2962
+
2963
+ ```ts
2964
+ g8.quotes.products: () => Promise<{ data: QuotableProduct[]; }>
2965
+ ```
2966
+
2967
+ List products available for line items.
2968
+
2969
+ - Calls `GET /api/v1/quotable-products` ([`g8.api.quotes.listQuotableProducts`](api/quotes.md#op-listquotableproducts), tier `read`, scope `quotes:read`)
2970
+
2971
+ - Source: `src/quotes.ts`
2972
+
2973
+ <a id="g8-quotes-send"></a>
2974
+
2975
+ ### `g8.quotes.send`
2976
+
2977
+ ```ts
2978
+ g8.quotes.send: (quoteId: string, params: QuoteSendParams) => Promise<QuoteDetail>
2979
+ ```
2980
+
2981
+ Send a quote to its recipient via email (with signature + optional payment link).
2982
+
2983
+ - Calls `POST /api/v1/quotes/{quote_id}/send` ([`g8.api.quotes.sendQuote`](api/quotes.md#op-sendquote), tier `external`, scope `quotes:run`)
2984
+
2985
+ - Source: `src/quotes.ts`
2986
+
2987
+ <a id="g8-quotes-settings"></a>
2988
+
2989
+ ### `g8.quotes.settings`
2990
+
2991
+ ```ts
2992
+ g8.quotes.settings: () => Promise<QuoteSettings>
2993
+ ```
2994
+
2995
+ Get org-level quote settings (currency, tax rate, payment providers, logo).
2996
+
2997
+ - Calls `GET /api/v1/quote-settings` ([`g8.api.quotes.getQuoteSettings`](api/quotes.md#op-getquotesettings), tier `read`, scope `quotes:read`)
2998
+
2999
+ - Source: `src/quotes.ts`
3000
+
3001
+ <a id="g8-quotes-update"></a>
3002
+
3003
+ ### `g8.quotes.update`
3004
+
3005
+ ```ts
3006
+ g8.quotes.update: (quoteId: string, fields: QuoteUpdateParams) => Promise<QuoteDetail>
3007
+ ```
3008
+
3009
+ Update a draft quote (line items, expiry, notes).
3010
+
3011
+ - Calls `PUT /api/v1/quotes/{quote_id}` ([`g8.api.quotes.updateQuotePut`](api/quotes.md#op-updatequoteput), tier `external`, scope `quotes:run`)
3012
+
3013
+ - Source: `src/quotes.ts`
3014
+
3015
+ ---
3016
+
3017
+ <a id="g8-search"></a>
3018
+
3019
+ ## `g8.search`
3020
+
3021
+ Types: `dist/types/search.d.ts`
3022
+
3023
+ <a id="g8-search-companies"></a>
3024
+
3025
+ ### `g8.search.companies`
3026
+
3027
+ ```ts
3028
+ g8.search.companies: (params?: SearchParams) => Promise<{ data: SearchCompanyItem[]; }>
3029
+ ```
3030
+
3031
+ Search open-data companies by filter.
3032
+
3033
+ - Calls `POST /api/v1/search/companies` ([`g8.api.search.searchCompanies`](api/search.md#op-searchcompanies), tier `billable`, scope `search:run`)
3034
+
3035
+ - Source: `src/search.ts`
3036
+
3037
+ <a id="g8-search-contacts"></a>
3038
+
3039
+ ### `g8.search.contacts`
3040
+
3041
+ ```ts
3042
+ g8.search.contacts: (params?: SearchParams) => Promise<{ data: SearchContactItem[]; }>
3043
+ ```
3044
+
3045
+ Search open-data contacts by filter.
3046
+
3047
+ - Calls `POST /api/v1/search/contacts` ([`g8.api.search.searchContacts`](api/search.md#op-searchcontacts), tier `billable`, scope `search:run`)
3048
+
3049
+ - Source: `src/search.ts`
3050
+
3051
+ <a id="g8-search-savecompanies"></a>
3052
+
3053
+ ### `g8.search.saveCompanies`
3054
+
3055
+ ```ts
3056
+ g8.search.saveCompanies: (params: SearchSaveParams) => Promise<SearchSaveResult>
3057
+ ```
3058
+
3059
+ Search companies and save the matches into a new list.
3060
+
3061
+ - Calls `POST /api/v1/search/companies/save` ([`g8.api.search.saveCompanySearch`](api/search.md#op-savecompanysearch), tier `billable`, scope `search:run`)
3062
+
3063
+ - Source: `src/search.ts`
3064
+
3065
+ <a id="g8-search-savecontacts"></a>
3066
+
3067
+ ### `g8.search.saveContacts`
3068
+
3069
+ ```ts
3070
+ g8.search.saveContacts: (params: SearchSaveParams) => Promise<SearchSaveResult>
3071
+ ```
3072
+
3073
+ Search contacts and save the matches into a new list.
3074
+
3075
+ - Calls `POST /api/v1/search/contacts/save` ([`g8.api.search.saveContactSearch`](api/search.md#op-savecontactsearch), tier `billable`, scope `search:run`)
3076
+
3077
+ - Source: `src/search.ts`
3078
+
3079
+ ---
3080
+
3081
+ <a id="g8-sequences"></a>
3082
+
3083
+ ## `g8.sequences`
3084
+
3085
+ Types: `dist/types/sequences.d.ts`
3086
+
3087
+ <a id="g8-sequences-add"></a>
3088
+
3089
+ ### `g8.sequences.add`
3090
+
3091
+ ```ts
3092
+ g8.sequences.add: (config: AddToSequenceConfig, idempotencyKey?: string) => Promise<SequenceActionResult>
3093
+ ```
3094
+
3095
+ Add contacts to a sequence (V2 queuing). Live or drafted sequences only. Pass `idempotencyKey` to make a retry safe — the same key returns the first result instead of re-enrolling on a 5xx-then-success (A6).
3096
+
3097
+ - Calls `POST /api/v1/sequences/{sequence_id}/contacts` ([`g8.api.sequences.addContactsToSequence`](api/sequences.md#op-addcontactstosequence), tier `external`, scope `sequences:run`)
3098
+
3099
+ - Source: `src/sequences.ts`
3100
+
3101
+ <a id="g8-sequences-analytics"></a>
3102
+
3103
+ ### `g8.sequences.analytics`
3104
+
3105
+ ```ts
3106
+ g8.sequences.analytics: (sequenceId: string) => Promise<SequenceAnalytics>
3107
+ ```
3108
+
3109
+ Comprehensive analytics for a sequence.
3110
+
3111
+ - Calls `GET /api/v1/sequences/{sequence_id}/analytics` ([`g8.api.sequenceLifecycle.getSequenceAnalytics`](api/sequenceLifecycle.md#op-getsequenceanalytics), tier `read`, scope `sequences:read`)
3112
+
3113
+ - Source: `src/sequences.ts`
3114
+
3115
+ <a id="g8-sequences-contacts"></a>
3116
+
3117
+ ### `g8.sequences.contacts`
3118
+
3119
+ ```ts
3120
+ g8.sequences.contacts: (sequenceId: string, params?: SequenceContactsParams) => Promise<{ data: SequenceContactItem[]; pagination?: PaginationMeta; }>
3121
+ ```
3122
+
3123
+ List contacts enrolled in a sequence. Filter by state (e.g. "active", "replied").
3124
+
3125
+ - Calls `GET /api/v1/sequences/{sequence_id}/contacts` ([`g8.api.sequences.listSequenceContacts`](api/sequences.md#op-listsequencecontacts), tier `read`, scope `sequences:read`)
3126
+
3127
+ - Source: `src/sequences.ts`
3128
+
3129
+ <a id="g8-sequences-create"></a>
3130
+
3131
+ ### `g8.sequences.create`
3132
+
3133
+ ```ts
3134
+ g8.sequences.create: (payload: SequenceCreateParams, idempotencyKey?: string) => Promise<SequenceCreateResult>
3135
+ ```
3136
+
3137
+ Create a new sequence with optional steps + channels. Pass `idempotencyKey` to make a retry safe — the same key returns the first result instead of creating a duplicate sequence on a 5xx-then-success (A6).
3138
+
3139
+ - Calls `POST /api/v1/sequences` ([`g8.api.sequenceLifecycle.createSequence`](api/sequenceLifecycle.md#op-createsequence), tier `external`, scope `sequences:run`)
3140
+
3141
+ - Source: `src/sequences.ts`
3142
+
3143
+ <a id="g8-sequences-delete"></a>
3144
+
3145
+ ### `g8.sequences.delete`
3146
+
3147
+ ```ts
3148
+ g8.sequences.delete: (sequenceId: string) => Promise<SequenceActionResult>
3149
+ ```
3150
+
3151
+ Soft-delete (archive) a sequence.
3152
+
3153
+ - Calls `DELETE /api/v1/sequences/{sequence_id}` ([`g8.api.sequenceLifecycle.deleteSequence`](api/sequenceLifecycle.md#op-deletesequence), tier `destructive`, scope `sequences:delete`)
3154
+
3155
+ - Source: `src/sequences.ts`
3156
+
3157
+ <a id="g8-sequences-get"></a>
3158
+
3159
+ ### `g8.sequences.get`
3160
+
3161
+ ```ts
3162
+ g8.sequences.get: (sequenceId: string) => Promise<SequenceDetail>
3163
+ ```
3164
+
3165
+ Get full sequence details by ID.
3166
+
3167
+ - Calls `GET /api/v1/sequences/{sequence_id}` ([`g8.api.sequences.getSequence`](api/sequences.md#op-getsequence), tier `read`, scope `sequences:read`)
3168
+
3169
+ - Source: `src/sequences.ts`
3170
+
3171
+ <a id="g8-sequences-list"></a>
3172
+
3173
+ ### `g8.sequences.list`
3174
+
3175
+ ```ts
3176
+ g8.sequences.list: () => Promise<SequenceListItem[]>
3177
+ ```
3178
+
3179
+ List sequences with pagination + optional status filter.
3180
+
3181
+ - Source: `src/sequences.ts`
3182
+
3183
+ <a id="g8-sequences-pause"></a>
3184
+
3185
+ ### `g8.sequences.pause`
3186
+
3187
+ ```ts
3188
+ g8.sequences.pause: (sequenceId: string, idempotencyKey?: string) => Promise<SequenceActionResult>
3189
+ ```
3190
+
3191
+ Pause a live sequence. Pass `idempotencyKey` to make a retry safe — the same key won't double-apply on a 5xx-then-success (A6).
3192
+
3193
+ - Calls `POST /api/v1/sequences/{sequence_id}/pause` ([`g8.api.sequences.pauseSequence`](api/sequences.md#op-pausesequence), tier `external`, scope `sequences:run`)
3194
+
3195
+ - Source: `src/sequences.ts`
3196
+
3197
+ <a id="g8-sequences-preview"></a>
3198
+
3199
+ ### `g8.sequences.preview`
3200
+
3201
+ ```ts
3202
+ g8.sequences.preview: (sequenceId: string) => Promise<SequencePreview>
3203
+ ```
3204
+
3205
+ Read-only sequence preview with all steps + channels (no enrollment).
3206
+
3207
+ - Calls `GET /api/v1/sequences/{sequence_id}/preview` ([`g8.api.sequenceLifecycle.previewSequence`](api/sequenceLifecycle.md#op-previewsequence), tier `read`, scope `sequences:read`)
3208
+
3209
+ - Source: `src/sequences.ts`
3210
+
3211
+ <a id="g8-sequences-resume"></a>
3212
+
3213
+ ### `g8.sequences.resume`
3214
+
3215
+ ```ts
3216
+ g8.sequences.resume: (sequenceId: string, idempotencyKey?: string) => Promise<SequenceActionResult>
3217
+ ```
3218
+
3219
+ Resume a paused sequence. Pass `idempotencyKey` to make a retry safe — the same key won't double-apply on a 5xx-then-success (A6).
3220
+
3221
+ - Calls `POST /api/v1/sequences/{sequence_id}/resume` ([`g8.api.sequences.resumeSequence`](api/sequences.md#op-resumesequence), tier `external`, scope `sequences:run`)
3222
+
3223
+ - Source: `src/sequences.ts`
3224
+
3225
+ <a id="g8-sequences-run"></a>
3226
+
3227
+ ### `g8.sequences.run`
3228
+
3229
+ ```ts
3230
+ g8.sequences.run: (sequenceId: string, idempotencyKey?: string) => Promise<SequenceActionResult>
3231
+ ```
3232
+
3233
+ Run/start a DRAFTED sequence (V2 orchestration). Pass `idempotencyKey` to make a retry safe — the same key won't re-trigger the run on a 5xx-then-success (A6).
3234
+
3235
+ - Calls `POST /api/v1/sequences/{sequence_id}/run` ([`g8.api.sequences.runSequence`](api/sequences.md#op-runsequence), tier `external`, scope `sequences:run`)
3236
+
3237
+ - Source: `src/sequences.ts`
3238
+
3239
+ <a id="g8-sequences-update"></a>
3240
+
3241
+ ### `g8.sequences.update`
3242
+
3243
+ ```ts
3244
+ g8.sequences.update: (sequenceId: string, fields: SequenceUpdateParams) => Promise<SequenceActionResult>
3245
+ ```
3246
+
3247
+ Update sequence metadata. Rejected (409) if sequence is in a transitional status.
3248
+
3249
+ - Calls `PATCH /api/v1/sequences/{sequence_id}` ([`g8.api.sequenceLifecycle.updateSequence`](api/sequenceLifecycle.md#op-updatesequence), tier `external`, scope `sequences:run`)
3250
+
3251
+ - Source: `src/sequences.ts`
3252
+
3253
+ <a id="g8-sequences-updatestep"></a>
3254
+
3255
+ ### `g8.sequences.updateStep`
3256
+
3257
+ ```ts
3258
+ g8.sequences.updateStep: (sequenceId: string, stepId: string, fields: SequenceStepUpdateParams) => Promise<SequenceActionResult>
3259
+ ```
3260
+
3261
+ Update a single step within a sequence.
3262
+
3263
+ - Calls `PATCH /api/v1/sequences/{sequence_id}/steps/{step_id}` ([`g8.api.sequenceLifecycle.updateSequenceStep`](api/sequenceLifecycle.md#op-updatesequencestep), tier `external`, scope `sequences:run`)
3264
+
3265
+ - Source: `src/sequences.ts`
3266
+
3267
+ ---
3268
+
3269
+ <a id="g8-signals"></a>
3270
+
3271
+ ## `g8.signals`
3272
+
3273
+ Types: `dist/types/signals.d.ts`
3274
+
3275
+ <a id="g8-signals-company"></a>
3276
+
3277
+ ### `g8.signals.company`
3278
+
3279
+ ```ts
3280
+ g8.signals.company: (domain: string) => Promise<IntentSignals>
3281
+ ```
3282
+
3283
+ Get intent signals for a specific company domain. With an API key this throws a `G8Error` on any failure; a 403 means the key lacks the `intent:read` scope. With a write key only, a failure still resolves to an all-zeros result (legacy browser behaviour).
3284
+
3285
+ - Calls `GET /api/v1/public/signals/company` ([`g8.api.publicSignals.publicSignalsCompany`](api/publicSignals.md#op-publicsignalscompany), tier `read`, scope `intent:read`)
3286
+
3287
+ - Source: `src/signals.ts`
3288
+
3289
+ <a id="g8-signals-stream"></a>
3290
+
3291
+ ### `g8.signals.stream`
3292
+
3293
+ ```ts
3294
+ g8.signals.stream: (domains: string[], callback: (signals: IntentSignals[]) => void) => () => void
3295
+ ```
3296
+
3297
+ Stream intent signals - calls callback every 30s with latest data. A failed poll is skipped. An auth failure (401/403) cannot fix itself by waiting, so it stops the stream and is logged once instead of polling a forbidden route every 30s forever.
3298
+
3299
+ - Source: `src/signals.ts`
3300
+
3301
+ ---
3302
+
3303
+ <a id="g8-skills"></a>
3304
+
3305
+ ## `g8.skills`
3306
+
3307
+ Types: `dist/types/skills.d.ts`
3308
+
3309
+ <a id="g8-skills-createapi"></a>
3310
+
3311
+ ### `g8.skills.createAPI`
3312
+
3313
+ ```ts
3314
+ g8.skills.createAPI: (params: SkillCreateAPIParams) => Promise<Skill>
3315
+ ```
3316
+
3317
+ Create an API skill (HTTP request wrapper).
3318
+
3319
+ - Calls `POST /api/v1/skills` ([`g8.api.skills.createSkill`](api/skills.md#op-createskill), tier `write`, scope `workflows:write`)
3320
+
3321
+ - Source: `src/skills.ts`
3322
+
3323
+ <a id="g8-skills-createfromnode"></a>
3324
+
3325
+ ### `g8.skills.createFromNode`
3326
+
3327
+ ```ts
3328
+ g8.skills.createFromNode: (params: { title: string; description?: string; node_id: string; input_mapping?: Record<string, string>; output_mapping?: Record<string, string>; }) => Promise<Skill>
3329
+ ```
3330
+
3331
+ Lift a workflow node into a reusable skill.
3332
+
3333
+ - Calls `POST /api/v1/skills/from-node` ([`g8.api.skills.createFromNode`](api/skills.md#op-createfromnode), tier `write`, scope `workflows:write`)
3334
+
3335
+ - Source: `src/skills.ts`
3336
+
3337
+ <a id="g8-skills-createfromtemplate"></a>
3338
+
3339
+ ### `g8.skills.createFromTemplate`
3340
+
3341
+ ```ts
3342
+ g8.skills.createFromTemplate: (params: { title: string; template_id: string; overrides?: Record<string, unknown>; }) => Promise<Skill>
3343
+ ```
3344
+
3345
+ Create a skill from a built-in template.
3346
+
3347
+ - Calls `POST /api/v1/skills/from-template` ([`g8.api.skills.createFromTemplate`](api/skills.md#op-createfromtemplate), tier `write`, scope `workflows:write`)
3348
+
3349
+ - Source: `src/skills.ts`
3350
+
3351
+ <a id="g8-skills-createllm"></a>
3352
+
3353
+ ### `g8.skills.createLLM`
3354
+
3355
+ ```ts
3356
+ g8.skills.createLLM: (params: SkillCreateLLMParams) => Promise<Skill>
3357
+ ```
3358
+
3359
+ Create an LLM skill (prompt + model + schemas).
3360
+
3361
+ - Calls `POST /api/v1/skills` ([`g8.api.skills.createSkill`](api/skills.md#op-createskill), tier `write`, scope `workflows:write`)
3362
+
3363
+ - Source: `src/skills.ts`
3364
+
3365
+ <a id="g8-skills-delete"></a>
3366
+
3367
+ ### `g8.skills.delete`
3368
+
3369
+ ```ts
3370
+ g8.skills.delete: (skillId: string) => Promise<{ data: { deleted: boolean; }; }>
3371
+ ```
3372
+
3373
+ Delete a skill (irreversible if in-use workflows exist).
3374
+
3375
+ - Calls `DELETE /api/v1/skills/{action_id}` ([`g8.api.skills.deleteSkill`](api/skills.md#op-deleteskill), tier `destructive`, scope `workflows:delete`)
3376
+
3377
+ - Source: `src/skills.ts`
3378
+
3379
+ <a id="g8-skills-execute"></a>
3380
+
3381
+ ### `g8.skills.execute`
3382
+
3383
+ ```ts
3384
+ g8.skills.execute: (skillId: string, inputPayload: Record<string, unknown>) => Promise<{ data: { output: Record<string, unknown>; latency_ms: number; tokens?: number; error: string | null; }; }>
3385
+ ```
3386
+
3387
+ Execute a skill immediately with an input payload (test / preview).
3388
+
3389
+ - Calls `POST /api/v1/skills/{action_id}/execute` ([`g8.api.skills.executeSkill`](api/skills.md#op-executeskill), tier `external`, scope `workflows:run`)
3390
+
3391
+ - Source: `src/skills.ts`
3392
+
3393
+ <a id="g8-skills-get"></a>
3394
+
3395
+ ### `g8.skills.get`
3396
+
3397
+ ```ts
3398
+ g8.skills.get: (skillId: string) => Promise<Skill>
3399
+ ```
3400
+
3401
+ Get a skill by ID.
3402
+
3403
+ - Calls `GET /api/v1/skills/{action_id}` ([`g8.api.skills.getSkill`](api/skills.md#op-getskill), tier `read`, scope `workflows:read`)
3404
+
3405
+ - Source: `src/skills.ts`
3406
+
3407
+ <a id="g8-skills-getvariables"></a>
3408
+
3409
+ ### `g8.skills.getVariables`
3410
+
3411
+ ```ts
3412
+ g8.skills.getVariables: (skillId: string) => Promise<{ data: SkillInputField[]; }>
3413
+ ```
3414
+
3415
+ Get the variables required by a skill (extracted from prompt or body template).
3416
+
3417
+ - Calls `GET /api/v1/skills/{action_id}/variables` ([`g8.api.skills.extractVariables`](api/skills.md#op-extractvariables), tier `read`, scope `workflows:read`)
3418
+
3419
+ - Source: `src/skills.ts`
3420
+
3421
+ <a id="g8-skills-list"></a>
3422
+
3423
+ ### `g8.skills.list`
3424
+
3425
+ ```ts
3426
+ g8.skills.list: (params?: SkillListParams) => Promise<{ data: Skill[]; }>
3427
+ ```
3428
+
3429
+ List skills.
3430
+
3431
+ - Calls `GET /api/v1/skills` ([`g8.api.skills.listSkills`](api/skills.md#op-listskills), tier `read`, scope `workflows:read`)
3432
+
3433
+ - Source: `src/skills.ts`
3434
+
3435
+ <a id="g8-skills-listmodels"></a>
3436
+
3437
+ ### `g8.skills.listModels`
3438
+
3439
+ ```ts
3440
+ g8.skills.listModels: () => Promise<{ data: Array<{ id: string; label: string; provider: string; }>; }>
3441
+ ```
3442
+
3443
+ List available LLM models.
3444
+
3445
+ - Calls `GET /api/v1/skills/models` ([`g8.api.skills.listModels`](api/skills.md#op-listmodels), tier `read`, scope `workflows:read`)
3446
+
3447
+ - Source: `src/skills.ts`
3448
+
3449
+ <a id="g8-skills-listtemplates"></a>
3450
+
3451
+ ### `g8.skills.listTemplates`
3452
+
3453
+ ```ts
3454
+ g8.skills.listTemplates: (params?: { type?: SkillType; }) => Promise<{ data: SkillTemplate[]; }>
3455
+ ```
3456
+
3457
+ List skill templates.
3458
+
3459
+ - Calls `GET /api/v1/skills/templates` ([`g8.api.skills.listTemplates`](api/skills.md#op-listtemplates), tier `read`, scope `workflows:read`)
3460
+
3461
+ - Source: `src/skills.ts`
3462
+
3463
+ <a id="g8-skills-updateapi"></a>
3464
+
3465
+ ### `g8.skills.updateAPI`
3466
+
3467
+ ```ts
3468
+ g8.skills.updateAPI: (skillId: string, fields: SkillUpdateAPIParams) => Promise<Skill>
3469
+ ```
3470
+
3471
+ Update an API skill.
3472
+
3473
+ - Calls `PUT /api/v1/skills/{action_id}` ([`g8.api.skills.updateSkill`](api/skills.md#op-updateskill), tier `write`, scope `workflows:write`)
3474
+
3475
+ - Source: `src/skills.ts`
3476
+
3477
+ <a id="g8-skills-updatellm"></a>
3478
+
3479
+ ### `g8.skills.updateLLM`
3480
+
3481
+ ```ts
3482
+ g8.skills.updateLLM: (skillId: string, fields: SkillUpdateLLMParams) => Promise<Skill>
3483
+ ```
3484
+
3485
+ Update an LLM skill.
3486
+
3487
+ - Calls `PUT /api/v1/skills/{action_id}` ([`g8.api.skills.updateSkill`](api/skills.md#op-updateskill), tier `write`, scope `workflows:write`)
3488
+
3489
+ - Source: `src/skills.ts`
3490
+
3491
+ <a id="g8-skills-validate"></a>
3492
+
3493
+ ### `g8.skills.validate`
3494
+
3495
+ ```ts
3496
+ g8.skills.validate: (skill: Partial<Skill>) => Promise<{ data: { valid: boolean; errors: string[]; }; }>
3497
+ ```
3498
+
3499
+ Validate a skill definition (without saving).
3500
+
3501
+ - Calls `POST /api/v1/skills/validate` ([`g8.api.skills.validateTemplate`](api/skills.md#op-validatetemplate), tier `write`, scope `workflows:write`)
3502
+
3503
+ - Source: `src/skills.ts`
3504
+
3505
+ ---
3506
+
3507
+ <a id="g8-snippet"></a>
3508
+
3509
+ ## `g8.snippet`
3510
+
3511
+ Types: `dist/types/snippet.d.ts`
3512
+
3513
+ <a id="g8-snippet-get"></a>
3514
+
3515
+ ### `g8.snippet.get`
3516
+
3517
+ ```ts
3518
+ g8.snippet.get: () => Promise<Snippet>
3519
+ ```
3520
+
3521
+ Get your org's tracking snippet (write key + React/script-tag embeds + config).
3522
+
3523
+ - Calls `GET /api/v1/snippet` ([`g8.api.snippet.getOrgSnippet`](api/snippet.md#op-getorgsnippet), tier `read`, scope `integrations:read`)
3524
+
3525
+ - Source: `src/snippet.ts`
3526
+
3527
+ ---
3528
+
3529
+ <a id="g8-studio"></a>
3530
+
3531
+ ## `g8.studio`
3532
+
3533
+ Types: `dist/types/studio.d.ts`
3534
+
3535
+ <a id="g8-studio-archiveicp"></a>
3536
+
3537
+ ### `g8.studio.archiveIcp`
3538
+
3539
+ ```ts
3540
+ g8.studio.archiveIcp: (icpId: string) => Promise<{ data: ICP; }>
3541
+ ```
3542
+
3543
+ Archive an ICP (soft delete - sets status to "archived").
3544
+
3545
+ - Calls `POST /api/v1/icps/{icp_id}/archive` ([`g8.api.gtmContext.archiveIcp`](api/gtmContext.md#op-archiveicp), tier `destructive`, scope `campaigns:delete`)
3546
+
3547
+ - Source: `src/studio.ts`
3548
+
3549
+ <a id="g8-studio-archivepersona"></a>
3550
+
3551
+ ### `g8.studio.archivePersona`
3552
+
3553
+ ```ts
3554
+ g8.studio.archivePersona: (personaId: string) => Promise<{ data: Persona; }>
3555
+ ```
3556
+
3557
+ Archive a persona (soft delete - sets status to "archived").
3558
+
3559
+ - Calls `POST /api/v1/personas/{persona_id}/archive` ([`g8.api.gtmContext.archivePersona`](api/gtmContext.md#op-archivepersona), tier `destructive`, scope `campaigns:delete`)
3560
+
3561
+ - Source: `src/studio.ts`
3562
+
3563
+ <a id="g8-studio-createicp"></a>
3564
+
3565
+ ### `g8.studio.createIcp`
3566
+
3567
+ ```ts
3568
+ g8.studio.createIcp: (body: { name: string; website_url: string; description?: string; firmographics?: Record<string, unknown>; tech_stack?: Record<string, unknown>; buying_signals?: unknown[]; estimated_market_size?: number; }) => Promise<{ data: ICP; }>
3569
+ ```
3570
+
3571
+ Create an ICP manually (no AI scoring). Requires name + website_url.
3572
+
3573
+ - Calls `POST /api/v1/icps` ([`g8.api.gtmContext.createIcp`](api/gtmContext.md#op-createicp), tier `write`, scope `campaigns:write`)
3574
+
3575
+ - Source: `src/studio.ts`
3576
+
3577
+ <a id="g8-studio-createpersona"></a>
3578
+
3579
+ ### `g8.studio.createPersona`
3580
+
3581
+ ```ts
3582
+ g8.studio.createPersona: (body: { title: string; website_url: string; priority?: number; confidence?: string; why_target?: string; key_signals?: unknown[]; expected_receptivity?: string; campaign_approach?: string; recommended_goal?: string; source?: string; }) => Promise<{ data: Persona; }>
3583
+ ```
3584
+
3585
+ Create a buyer persona manually (no AI generation). Requires title + website_url.
3586
+
3587
+ - Calls `POST /api/v1/personas` ([`g8.api.gtmContext.createPersona`](api/gtmContext.md#op-createpersona), tier `write`, scope `campaigns:write`)
3588
+
3589
+ - Source: `src/studio.ts`
3590
+
3591
+ <a id="g8-studio-globalcontext"></a>
3592
+
3593
+ ### `g8.studio.globalContext`
3594
+
3595
+ ```ts
3596
+ g8.studio.globalContext: (params?: { category?: string; limit?: number; include_content?: boolean; }) => Promise<{ data: GlobalContextDocument[]; }>
3597
+ ```
3598
+
3599
+ Org-level Studio documents (brand_brief, value_props, messaging_house, etc.). `include_content` defaults to true server-side, so each document includes its `content` body unless you explicitly pass `include_content: false`.
3600
+
3601
+ - Calls `GET /api/v1/global-context/documents` ([`g8.api.gtmContext.listGlobalContextDocuments`](api/gtmContext.md#op-listglobalcontextdocuments), tier `read`, scope `campaigns:read`)
3602
+
3603
+ - Source: `src/studio.ts`
3604
+
3605
+ <a id="g8-studio-icps"></a>
3606
+
3607
+ ### `g8.studio.icps`
3608
+
3609
+ ```ts
3610
+ g8.studio.icps: (params?: { status?: string; limit?: number; }) => Promise<{ data: ICP[]; }>
3611
+ ```
3612
+
3613
+ ICP definitions.
3614
+
3615
+ - Calls `GET /api/v1/icps` ([`g8.api.gtmContext.listIcps`](api/gtmContext.md#op-listicps), tier `read`, scope `campaigns:read`)
3616
+
3617
+ - Source: `src/studio.ts`
3618
+
3619
+ <a id="g8-studio-intelligencedata"></a>
3620
+
3621
+ ### `g8.studio.intelligenceData`
3622
+
3623
+ ```ts
3624
+ g8.studio.intelligenceData: (params?: { source_type?: string; limit?: number; }) => Promise<{ data: IntelligenceData[]; }>
3625
+ ```
3626
+
3627
+ Intelligence data (website scrapes, enrichment, competitor research).
3628
+
3629
+ - Calls `GET /api/v1/intelligence-data` ([`g8.api.gtmContext.listIntelligenceData`](api/gtmContext.md#op-listintelligencedata), tier `read`, scope `campaigns:read`)
3630
+
3631
+ - Source: `src/studio.ts`
3632
+
3633
+ <a id="g8-studio-personas"></a>
3634
+
3635
+ ### `g8.studio.personas`
3636
+
3637
+ ```ts
3638
+ g8.studio.personas: (params?: { status?: string; limit?: number; }) => Promise<{ data: Persona[]; }>
3639
+ ```
3640
+
3641
+ Buyer persona definitions.
3642
+
3643
+ - Calls `GET /api/v1/personas` ([`g8.api.gtmContext.listPersonas`](api/gtmContext.md#op-listpersonas), tier `read`, scope `campaigns:read`)
3644
+
3645
+ - Source: `src/studio.ts`
3646
+
3647
+ <a id="g8-studio-researchreports"></a>
3648
+
3649
+ ### `g8.studio.researchReports`
3650
+
3651
+ ```ts
3652
+ g8.studio.researchReports: (params?: { category?: string; limit?: number; }) => Promise<{ data: ResearchReport[]; }>
3653
+ ```
3654
+
3655
+ AI research reports (buyer psychology, competitive teardown, GTM channel, etc.).
3656
+
3657
+ - Calls `GET /api/v1/research-reports` ([`g8.api.gtmContext.listResearchReports`](api/gtmContext.md#op-listresearchreports), tier `read`, scope `campaigns:read`)
3658
+
3659
+ - Source: `src/studio.ts`
3660
+
3661
+ <a id="g8-studio-updateicp"></a>
3662
+
3663
+ ### `g8.studio.updateIcp`
3664
+
3665
+ ```ts
3666
+ g8.studio.updateIcp: (icpId: string, body: { name?: string; description?: string; firmographics?: Record<string, unknown>; tech_stack?: Record<string, unknown>; buying_signals?: unknown[]; estimated_market_size?: number; }) => Promise<{ data: ICP; }>
3667
+ ```
3668
+
3669
+ Update an ICP (partial - send only fields to change).
3670
+
3671
+ - Calls `PATCH /api/v1/icps/{icp_id}` ([`g8.api.gtmContext.updateIcp`](api/gtmContext.md#op-updateicp), tier `write`, scope `campaigns:write`)
3672
+
3673
+ - Source: `src/studio.ts`
3674
+
3675
+ <a id="g8-studio-updatepersona"></a>
3676
+
3677
+ ### `g8.studio.updatePersona`
3678
+
3679
+ ```ts
3680
+ g8.studio.updatePersona: (personaId: string, body: { title?: string; priority?: number; confidence?: string; why_target?: string; key_signals?: unknown[]; expected_receptivity?: string; campaign_approach?: string; recommended_goal?: string; status?: string; }) => Promise<{ data: Persona; }>
3681
+ ```
3682
+
3683
+ Update a persona (partial). Passing status "archived" is equivalent to archivePersona.
3684
+
3685
+ - Calls `PATCH /api/v1/personas/{persona_id}` ([`g8.api.gtmContext.updatePersona`](api/gtmContext.md#op-updatepersona), tier `write`, scope `campaigns:write`)
3686
+
3687
+ - Source: `src/studio.ts`
3688
+
3689
+ ---
3690
+
3691
+ <a id="g8-tasks"></a>
3692
+
3693
+ ## `g8.tasks`
3694
+
3695
+ Types: `dist/types/tasks.d.ts`
3696
+
3697
+ <a id="g8-tasks-create"></a>
3698
+
3699
+ ### `g8.tasks.create`
3700
+
3701
+ ```ts
3702
+ g8.tasks.create: (contactId: number, task: TaskCreateParams) => Promise<Task>
3703
+ ```
3704
+
3705
+ Create a task on a contact.
3706
+
3707
+ - Calls `POST /api/v1/contacts/{contact_id}/tasks` ([`g8.api.tasks.createTask`](api/tasks.md#op-createtask), tier `write`, scope `tasks:write`)
3708
+
3709
+ - Source: `src/tasks.ts`
3710
+
3711
+ <a id="g8-tasks-delete"></a>
3712
+
3713
+ ### `g8.tasks.delete`
3714
+
3715
+ ```ts
3716
+ g8.tasks.delete: (taskId: string) => Promise<{ data: { deleted: boolean; }; }>
3717
+ ```
3718
+
3719
+ Delete a task.
3720
+
3721
+ - Calls `DELETE /api/v1/tasks/{task_id}` ([`g8.api.tasks.deleteTask`](api/tasks.md#op-deletetask), tier `destructive`, scope `tasks:delete`)
3722
+
3723
+ - Source: `src/tasks.ts`
3724
+
3725
+ <a id="g8-tasks-list"></a>
3726
+
3727
+ ### `g8.tasks.list`
3728
+
3729
+ ```ts
3730
+ g8.tasks.list: (params?: TaskListParams) => Promise<{ data: Task[]; }>
3731
+ ```
3732
+
3733
+ List all tasks org-wide with optional filters.
3734
+
3735
+ - Calls `GET /api/v1/tasks` ([`g8.api.tasks.listAllTasks`](api/tasks.md#op-listalltasks), tier `read`, scope `tasks:read`)
3736
+
3737
+ - Source: `src/tasks.ts`
3738
+
3739
+ <a id="g8-tasks-listforcontact"></a>
3740
+
3741
+ ### `g8.tasks.listForContact`
3742
+
3743
+ ```ts
3744
+ g8.tasks.listForContact: (contactId: number, status?: string) => Promise<{ data: Task[]; }>
3745
+ ```
3746
+
3747
+ List tasks on a single contact. Optional status filter ("open" | "completed").
3748
+
3749
+ - Calls `GET /api/v1/contacts/{contact_id}/tasks` ([`g8.api.tasks.listContactTasks`](api/tasks.md#op-listcontacttasks), tier `read`, scope `tasks:read`)
3750
+
3751
+ - Source: `src/tasks.ts`
3752
+
3753
+ <a id="g8-tasks-update"></a>
3754
+
3755
+ ### `g8.tasks.update`
3756
+
3757
+ ```ts
3758
+ g8.tasks.update: (taskId: string, fields: TaskUpdateParams) => Promise<Task>
3759
+ ```
3760
+
3761
+ Update a task (partial).
3762
+
3763
+ - Calls `PATCH /api/v1/tasks/{task_id}` ([`g8.api.tasks.updateTask`](api/tasks.md#op-updatetask), tier `write`, scope `tasks:write`)
3764
+
3765
+ - Source: `src/tasks.ts`
3766
+
3767
+ ---
3768
+
3769
+ <a id="g8-visitors"></a>
3770
+
3771
+ ## `g8.visitors`
3772
+
3773
+ Types: `dist/types/visitors.d.ts`
3774
+
3775
+ <a id="g8-visitors-identify"></a>
3776
+
3777
+ ### `g8.visitors.identify`
3778
+
3779
+ ```ts
3780
+ g8.visitors.identify: () => Promise<VisitorCompany>
3781
+ ```
3782
+
3783
+ Identify the current visitor's company from their IP address.
3784
+
3785
+ - Calls `GET /api/v1/public/visitors/company` ([`g8.api.publicVisitors.publicVisitorCompany`](api/publicVisitors.md#op-publicvisitorcompany), tier `read`, scope `intent:read`)
3786
+
3787
+ - Source: `src/visitors.ts`
3788
+
3789
+ <a id="g8-visitors-onintent"></a>
3790
+
3791
+ ### `g8.visitors.onIntent`
3792
+
3793
+ ```ts
3794
+ g8.visitors.onIntent: (level: "low" | "medium" | "high", callback: IntentCallback) => () => void
3795
+ ```
3796
+
3797
+ Listen for visitors matching an intent level. Polls every 30 seconds.
3798
+
3799
+ - Source: `src/visitors.ts`
3800
+
3801
+ <a id="g8-visitors-score"></a>
3802
+
3803
+ ### `g8.visitors.score`
3804
+
3805
+ ```ts
3806
+ g8.visitors.score: () => Promise<VisitorScore>
3807
+ ```
3808
+
3809
+ Get engagement score for the current visitor.
3810
+
3811
+ - Calls `GET /api/v1/public/visitors/score` ([`g8.api.publicVisitors.publicVisitorScore`](api/publicVisitors.md#op-publicvisitorscore), tier `read`, scope `intent:read`)
3812
+
3813
+ - Source: `src/visitors.ts`
3814
+
3815
+ ---
3816
+
3817
+ <a id="g8-voice"></a>
3818
+
3819
+ ## `g8.voice`
3820
+
3821
+ Types: `dist/types/voice.d.ts`
3822
+
3823
+ <a id="g8-voice-dialer-agents"></a>
3824
+
3825
+ ### `g8.voice.dialer.agents`
3826
+
3827
+ ```ts
3828
+ g8.voice.dialer.agents: (params?: DialerAgentsListParams) => Promise<DialerAgentsListResult>
3829
+ ```
3830
+
3831
+ List voice agents available for dialer sessions (capped at 100; no pagination).
3832
+
3833
+ - Calls `GET /api/v1/voice/dialer/agents` ([`g8.api.voice.listDialerAgents`](api/voice.md#op-listdialeragents), tier `read`, scope `voice:read`)
3834
+
3835
+ - Source: `src/voice.ts`
3836
+
3837
+ <a id="g8-voice-dialer-callgrading"></a>
3838
+
3839
+ ### `g8.voice.dialer.callGrading`
3840
+
3841
+ ```ts
3842
+ g8.voice.dialer.callGrading: (roomName: string) => Promise<CallGradingResult>
3843
+ ```
3844
+
3845
+ AI grading for a single dialer call (returns "pending" while in progress).
3846
+
3847
+ - Calls `GET /api/v1/voice/dialer/calls/{room_name}/grading` ([`g8.api.voice.getCallGrading`](api/voice.md#op-getcallgrading), tier `read`, scope `voice:read`)
3848
+
3849
+ - Source: `src/voice.ts`
3850
+
3851
+ <a id="g8-voice-dialer-calltranscript"></a>
3852
+
3853
+ ### `g8.voice.dialer.callTranscript`
3854
+
3855
+ ```ts
3856
+ g8.voice.dialer.callTranscript: (roomName: string) => Promise<{ data: { status: string; transcript: Array<{ speaker: string; text: string; timestamp: number; }>; }; }>
3857
+ ```
3858
+
3859
+ Fetch the full transcript for a single dialer call.
3860
+
3861
+ - Calls `GET /api/v1/voice/dialer/calls/{room_name}/transcript` ([`g8.api.voice.getCallTranscript`](api/voice.md#op-getcalltranscript), tier `read`, scope `voice:read`)
3862
+
3863
+ - Source: `src/voice.ts`
3864
+
3865
+ <a id="g8-voice-dialer-createsession"></a>
3866
+
3867
+ ### `g8.voice.dialer.createSession`
3868
+
3869
+ ```ts
3870
+ g8.voice.dialer.createSession: (payload: DialerSessionCreateParams) => Promise<DialerSessionCreateResult>
3871
+ ```
3872
+
3873
+ Create a parallel-dialer session in PAUSED state. SDR opens UI to start dialing.
3874
+
3875
+ - Calls `POST /api/v1/voice/dialer/sessions` ([`g8.api.voice.createDialerSession`](api/voice.md#op-createdialersession), tier `external`, scope `voice:run`)
3876
+
3877
+ - Source: `src/voice.ts`
3878
+
3879
+ <a id="g8-voice-dialer-listcalls"></a>
3880
+
3881
+ ### `g8.voice.dialer.listCalls`
3882
+
3883
+ ```ts
3884
+ g8.voice.dialer.listCalls: (params?: { contact_id?: number; user_email?: string; campaign_id?: string; date_from?: string; date_to?: string; limit?: number; page?: number; }) => Promise<{ data: Array<Record<string, unknown>>; pagination?: VoicePagination; }>
3885
+ ```
3886
+
3887
+ List dialer calls — pass `contact_id` or `user_email` to scope.
3888
+
3889
+ - Calls `GET /api/v1/voice/dialer/calls` ([`g8.api.voice.listCallsForContact`](api/voice.md#op-listcallsforcontact), tier `read`, scope `voice:read`)
3890
+
3891
+ - Source: `src/voice.ts`
3892
+
3893
+ <a id="g8-voice-dialer-listcallsforcontact"></a>
3894
+
3895
+ ### `g8.voice.dialer.listCallsForContact`
3896
+
3897
+ ```ts
3898
+ g8.voice.dialer.listCallsForContact: (contactId: number, extra?: { limit?: number; }) => Promise<{ data: Array<Record<string, unknown>>; }>
3899
+ ```
3900
+
3901
+ Convenience: list calls for a single contact.
3902
+
3903
+ - Calls `GET /api/v1/voice/dialer/calls` ([`g8.api.voice.listCallsForContact`](api/voice.md#op-listcallsforcontact), tier `read`, scope `voice:read`)
3904
+
3905
+ - Source: `src/voice.ts`
3906
+
3907
+ <a id="g8-voice-dialer-listcallsforsdr"></a>
3908
+
3909
+ ### `g8.voice.dialer.listCallsForSdr`
3910
+
3911
+ ```ts
3912
+ g8.voice.dialer.listCallsForSdr: (userEmail: string, extra?: { limit?: number; date_from?: string; date_to?: string; }) => Promise<{ data: Array<Record<string, unknown>>; }>
3913
+ ```
3914
+
3915
+ Convenience: list calls placed by a specific SDR.
3916
+
3917
+ - Calls `GET /api/v1/voice/dialer/calls` ([`g8.api.voice.listCallsForContact`](api/voice.md#op-listcallsforcontact), tier `read`, scope `voice:read`)
3918
+
3919
+ - Source: `src/voice.ts`
3920
+
3921
+ <a id="g8-voice-dialer-listsessions"></a>
3922
+
3923
+ ### `g8.voice.dialer.listSessions`
3924
+
3925
+ ```ts
3926
+ g8.voice.dialer.listSessions: (params?: DialerSessionsListParams) => Promise<DialerSessionsListResult>
3927
+ ```
3928
+
3929
+ List parallel-dialer sessions with filters + pagination.
3930
+
3931
+ - Calls `GET /api/v1/voice/dialer/sessions` ([`g8.api.voice.listDialerSessions`](api/voice.md#op-listdialersessions), tier `read`, scope `voice:read`)
3932
+
3933
+ - Source: `src/voice.ts`
3934
+
3935
+ <a id="g8-voice-dialer-missedcallbacks"></a>
3936
+
3937
+ ### `g8.voice.dialer.missedCallbacks`
3938
+
3939
+ ```ts
3940
+ g8.voice.dialer.missedCallbacks: (limit?: number) => Promise<MissedCallbacksResult>
3941
+ ```
3942
+
3943
+ List missed inbound callbacks with caller / contact info.
3944
+
3945
+ - Calls `GET /api/v1/voice/dialer/missed-callbacks` ([`g8.api.voice.listMissedCallbacks`](api/voice.md#op-listmissedcallbacks), tier `read`, scope `voice:read`)
3946
+
3947
+ - Source: `src/voice.ts`
3948
+
3949
+ <a id="g8-voice-dialer-numbers"></a>
3950
+
3951
+ ### `g8.voice.dialer.numbers`
3952
+
3953
+ ```ts
3954
+ g8.voice.dialer.numbers: (userEmail?: string) => Promise<DialerNumbersListResult>
3955
+ ```
3956
+
3957
+ List dialer-eligible phone numbers with 7-day stats + daily limits.
3958
+
3959
+ - Calls `GET /api/v1/voice/dialer/numbers` ([`g8.api.voice.listDialerNumbers`](api/voice.md#op-listdialernumbers), tier `read`, scope `voice:read`)
3960
+
3961
+ - Source: `src/voice.ts`
3962
+
3963
+ <a id="g8-voice-dialer-resumesession"></a>
3964
+
3965
+ ### `g8.voice.dialer.resumeSession`
3966
+
3967
+ ```ts
3968
+ g8.voice.dialer.resumeSession: (sessionId: string, maxContacts?: number) => Promise<DialerSessionResumeResult>
3969
+ ```
3970
+
3971
+ **Deprecated**: The server route is retired and answers 410 (it never dialed: it forwarded to a voice path that did not exist, and the LiveKit dialer it targeted has been removed). Resume with `g8.api.call("dial_next_batch_dialer_sessions__session_id__next_batch_post", { path: { session_id }, body: { resume_intent: true } })`; the rep must have the dialer open to take the calls.
3972
+
3973
+ Resume a PAUSED dialer session.
3974
+
3975
+ - Calls `POST /api/v1/voice/dialer/sessions/{session_id}/resume` ([`g8.api.voice.resumeDialerSession`](api/voice.md#op-resumedialersession), tier `external`, scope `voice:run`)
3976
+
3977
+ - Source: `src/voice.ts`
3978
+
3979
+ <a id="g8-voice-dialer-stats"></a>
3980
+
3981
+ ### `g8.voice.dialer.stats`
3982
+
3983
+ ```ts
3984
+ g8.voice.dialer.stats: (params?: DialerStatsParams) => Promise<DialerStatsResult>
3985
+ ```
3986
+
3987
+ Aggregated dialer analytics (daily breakdown or total).
3988
+
3989
+ - Calls `GET /api/v1/voice/dialer/stats` ([`g8.api.voice.getDialerStats`](api/voice.md#op-getdialerstats), tier `read`, scope `voice:read`)
3990
+
3991
+ - Source: `src/voice.ts`
3992
+
3993
+ <a id="g8-voice-dialer-updatesessionstatus"></a>
3994
+
3995
+ ### `g8.voice.dialer.updateSessionStatus`
3996
+
3997
+ ```ts
3998
+ g8.voice.dialer.updateSessionStatus: (sessionId: string, status: DialerSessionStatus) => Promise<DialerSessionStatusUpdateResult>
3999
+ ```
4000
+
4001
+ Pause / resume / stop a dialer session via status flip.
4002
+
4003
+ - Calls `PATCH /api/v1/voice/dialer/sessions/{session_id}/status` ([`g8.api.voice.updateDialerSessionStatus`](api/voice.md#op-updatedialersessionstatus), tier `external`, scope `voice:run`)
4004
+
4005
+ - Source: `src/voice.ts`
4006
+
4007
+ <a id="g8-voice-on"></a>
4008
+
4009
+ ### `g8.voice.on`
4010
+
4011
+ ```ts
4012
+ g8.voice.on: (event: VoiceEvent, callback: VoiceCallback) => void
4013
+ ```
4014
+
4015
+ Listen for voice events.
4016
+
4017
+ - Source: `src/voice.ts`
4018
+
4019
+ ---
4020
+
4021
+ <a id="g8-webhooks"></a>
4022
+
4023
+ ## `g8.webhooks`
4024
+
4025
+ Types: `dist/types/webhooks.d.ts`
4026
+
4027
+ <a id="g8-webhooks-constructevent"></a>
4028
+
4029
+ ### `g8.webhooks.constructEvent`
4030
+
4031
+ ```ts
4032
+ g8.webhooks.constructEvent: (payload: string, signature: string, timestamp: string | number, secret: string, opts?: ConstructEventOptions) => WebhookEventPayload
4033
+ ```
4034
+
4035
+ Verify an incoming webhook's HMAC signature and return the parsed event.
4036
+
4037
+ - Source: `src/webhooks.ts`
4038
+
4039
+ ---
4040
+
4041
+ <a id="g8-workflows"></a>
4042
+
4043
+ ## `g8.workflows`
4044
+
4045
+ Types: `dist/types/workflows.d.ts`
4046
+
4047
+ <a id="g8-workflows-create"></a>
4048
+
4049
+ ### `g8.workflows.create`
4050
+
4051
+ ```ts
4052
+ g8.workflows.create: (params: WorkflowCreateParams) => Promise<Workflow>
4053
+ ```
4054
+
4055
+ Create a new workflow.
4056
+
4057
+ - Calls `POST /api/v1/workflows` ([`g8.api.workflows.createWorkflow`](api/workflows.md#op-createworkflow), tier `external`, scope `workflows:run`)
4058
+
4059
+ - Source: `src/workflows.ts`
4060
+
4061
+ <a id="g8-workflows-delete"></a>
4062
+
4063
+ ### `g8.workflows.delete`
4064
+
4065
+ ```ts
4066
+ g8.workflows.delete: (workflowId: string) => Promise<{ data: { deleted: boolean; }; }>
4067
+ ```
4068
+
4069
+ Delete a workflow.
4070
+
4071
+ - Calls `DELETE /api/v1/workflows/{action_id}` ([`g8.api.workflows.deleteWorkflow`](api/workflows.md#op-deleteworkflow), tier `destructive`, scope `workflows:delete`)
4072
+
4073
+ - Source: `src/workflows.ts`
4074
+
4075
+ <a id="g8-workflows-execute"></a>
4076
+
4077
+ ### `g8.workflows.execute`
4078
+
4079
+ ```ts
4080
+ g8.workflows.execute: (workflowId: string, triggerPayload?: Record<string, unknown>) => Promise<WorkflowExecution>
4081
+ ```
4082
+
4083
+ Execute a workflow immediately with a trigger payload.
4084
+
4085
+ - Calls `POST /api/v1/workflows/{action_id}/execute` ([`g8.api.workflows.executeWorkflow`](api/workflows.md#op-executeworkflow), tier `external`, scope `workflows:run`)
4086
+
4087
+ - Source: `src/workflows.ts`
4088
+
4089
+ <a id="g8-workflows-get"></a>
4090
+
4091
+ ### `g8.workflows.get`
4092
+
4093
+ ```ts
4094
+ g8.workflows.get: (workflowId: string) => Promise<Workflow>
4095
+ ```
4096
+
4097
+ Get full workflow definition (nodes, connections, trigger, execution state).
4098
+
4099
+ - Calls `GET /api/v1/workflows/{action_id}` ([`g8.api.workflows.getWorkflow`](api/workflows.md#op-getworkflow), tier `read`, scope `workflows:read`)
4100
+
4101
+ - Source: `src/workflows.ts`
4102
+
4103
+ <a id="g8-workflows-getexecution"></a>
4104
+
4105
+ ### `g8.workflows.getExecution`
4106
+
4107
+ ```ts
4108
+ g8.workflows.getExecution: (executionId: string) => Promise<WorkflowExecution>
4109
+ ```
4110
+
4111
+ Get the status + outputs of a single execution.
4112
+
4113
+ - Calls `GET /api/v1/workflows/executions/{execution_id}` ([`g8.api.workflows.getExecution`](api/workflows.md#op-getexecution), tier `read`, scope `workflows:read`)
4114
+
4115
+ - Source: `src/workflows.ts`
4116
+
4117
+ <a id="g8-workflows-gettriggerstatus"></a>
4118
+
4119
+ ### `g8.workflows.getTriggerStatus`
4120
+
4121
+ ```ts
4122
+ g8.workflows.getTriggerStatus: (workflowId: string) => Promise<{ data: { status: string; details: Record<string, unknown>; }; }>
4123
+ ```
4124
+
4125
+ Get the trigger status (e.g. schedule / webhook wiring) for a workflow.
4126
+
4127
+ - Calls `GET /api/v1/workflows/{action_id}/trigger-status` ([`g8.api.workflows.getTriggerStatus`](api/workflows.md#op-gettriggerstatus), tier `read`, scope `workflows:read`)
4128
+
4129
+ - Source: `src/workflows.ts`
4130
+
4131
+ <a id="g8-workflows-list"></a>
4132
+
4133
+ ### `g8.workflows.list`
4134
+
4135
+ ```ts
4136
+ g8.workflows.list: (params?: WorkflowListParams) => Promise<{ data: Workflow[]; }>
4137
+ ```
4138
+
4139
+ List workflows org-wide.
4140
+
4141
+ - Calls `GET /api/v1/workflows` ([`g8.api.workflows.listWorkflows`](api/workflows.md#op-listworkflows), tier `read`, scope `workflows:read`)
4142
+
4143
+ - Source: `src/workflows.ts`
4144
+
4145
+ <a id="g8-workflows-listdispositions"></a>
4146
+
4147
+ ### `g8.workflows.listDispositions`
4148
+
4149
+ ```ts
4150
+ g8.workflows.listDispositions: () => Promise<{ data: Array<{ id: string; label: string; }>; }>
4151
+ ```
4152
+
4153
+ Disposition options available to workflow nodes.
4154
+
4155
+ - Calls `GET /api/v1/workflows/dispositions` ([`g8.api.workflows.listDispositions`](api/workflows.md#op-listdispositions), tier `read`, scope `workflows:read`)
4156
+
4157
+ - Source: `src/workflows.ts`
4158
+
4159
+ <a id="g8-workflows-listformfields"></a>
4160
+
4161
+ ### `g8.workflows.listFormFields`
4162
+
4163
+ ```ts
4164
+ g8.workflows.listFormFields: (formId: string) => Promise<{ data: Array<{ name: string; type: string; required: boolean; }>; }>
4165
+ ```
4166
+
4167
+ Form field definitions for a given form (used by form-trigger nodes).
4168
+
4169
+ - Calls `GET /api/v1/workflows/forms/{form_id}/fields` ([`g8.api.workflows.describeFormFields`](api/workflows.md#op-describeformfields), tier `read`, scope `workflows:read`)
4170
+
4171
+ - Source: `src/workflows.ts`
4172
+
4173
+ <a id="g8-workflows-listmcpservers"></a>
4174
+
4175
+ ### `g8.workflows.listMcpServers`
4176
+
4177
+ ```ts
4178
+ g8.workflows.listMcpServers: () => Promise<{ data: Array<{ id: string; name: string; url: string; }>; }>
4179
+ ```
4180
+
4181
+ MCP servers available to workflow nodes.
4182
+
4183
+ - Calls `GET /api/v1/workflows/mcp-servers` ([`g8.api.workflows.listMcpServers`](api/workflows.md#op-listmcpservers), tier `read`, scope `workflows:read`)
4184
+
4185
+ - Source: `src/workflows.ts`
4186
+
4187
+ <a id="g8-workflows-listroamgroups"></a>
4188
+
4189
+ ### `g8.workflows.listRoamGroups`
4190
+
4191
+ ```ts
4192
+ g8.workflows.listRoamGroups: () => Promise<{ data: Array<{ id: string; name: string; }>; }>
4193
+ ```
4194
+
4195
+ Roam groups available to workflow nodes.
4196
+
4197
+ - Calls `GET /api/v1/workflows/integrations/roam/groups` ([`g8.api.workflows.listRoamGroups`](api/workflows.md#op-listroamgroups), tier `read`, scope `workflows:read`)
4198
+
4199
+ - Source: `src/workflows.ts`
4200
+
4201
+ <a id="g8-workflows-listroamusers"></a>
4202
+
4203
+ ### `g8.workflows.listRoamUsers`
4204
+
4205
+ ```ts
4206
+ g8.workflows.listRoamUsers: () => Promise<{ data: Array<{ id: string; name: string; email: string | null; }>; }>
4207
+ ```
4208
+
4209
+ Roam users available to workflow nodes.
4210
+
4211
+ - Calls `GET /api/v1/workflows/integrations/roam/users` ([`g8.api.workflows.listRoamUsers`](api/workflows.md#op-listroamusers), tier `read`, scope `workflows:read`)
4212
+
4213
+ - Source: `src/workflows.ts`
4214
+
4215
+ <a id="g8-workflows-listslackchannels"></a>
4216
+
4217
+ ### `g8.workflows.listSlackChannels`
4218
+
4219
+ ```ts
4220
+ g8.workflows.listSlackChannels: () => Promise<{ data: Array<{ id: string; name: string; is_private: boolean; }>; }>
4221
+ ```
4222
+
4223
+ Slack channels available to workflow nodes.
4224
+
4225
+ - Calls `GET /api/v1/workflows/integrations/slack/channels` ([`g8.api.workflows.listSlackChannels`](api/workflows.md#op-listslackchannels), tier `read`, scope `workflows:read`)
4226
+
4227
+ - Source: `src/workflows.ts`
4228
+
4229
+ <a id="g8-workflows-listslackusers"></a>
4230
+
4231
+ ### `g8.workflows.listSlackUsers`
4232
+
4233
+ ```ts
4234
+ g8.workflows.listSlackUsers: () => Promise<{ data: Array<{ id: string; name: string; email: string | null; }>; }>
4235
+ ```
4236
+
4237
+ Slack users available to workflow nodes.
4238
+
4239
+ - Calls `GET /api/v1/workflows/integrations/slack/users` ([`g8.api.workflows.listSlackUsers`](api/workflows.md#op-listslackusers), tier `read`, scope `workflows:read`)
4240
+
4241
+ - Source: `src/workflows.ts`
4242
+
4243
+ <a id="g8-workflows-nodetypes"></a>
4244
+
4245
+ ### `g8.workflows.nodeTypes`
4246
+
4247
+ ```ts
4248
+ g8.workflows.nodeTypes: (params?: { type?: string; }) => Promise<{ data: NodeTypeSchema[]; }>
4249
+ ```
4250
+
4251
+ Catalog of available workflow node types with config + output schemas.
4252
+
4253
+ - Calls `GET /api/v1/workflows/node-types/schema` ([`g8.api.workflows.getNodeTypesSchema`](api/workflows.md#op-getnodetypesschema), tier `read`, scope `workflows:read`)
4254
+
4255
+ - Source: `src/workflows.ts`
4256
+
4257
+ <a id="g8-workflows-pauseexecution"></a>
4258
+
4259
+ ### `g8.workflows.pauseExecution`
4260
+
4261
+ ```ts
4262
+ g8.workflows.pauseExecution: (executionId: string) => Promise<{ data: { paused: boolean; }; }>
4263
+ ```
4264
+
4265
+ Pause a running execution.
4266
+
4267
+ - Calls `POST /api/v1/workflows/executions/{execution_id}/pause` ([`g8.api.workflows.pauseExecution`](api/workflows.md#op-pauseexecution), tier `external`, scope `workflows:run`)
4268
+
4269
+ - Source: `src/workflows.ts`
4270
+
4271
+ <a id="g8-workflows-resettrigger"></a>
4272
+
4273
+ ### `g8.workflows.resetTrigger`
4274
+
4275
+ ```ts
4276
+ g8.workflows.resetTrigger: (workflowId: string) => Promise<{ data: { reset: boolean; }; }>
4277
+ ```
4278
+
4279
+ Reset a workflow's trigger cursor / state.
4280
+
4281
+ - Calls `POST /api/v1/workflows/{action_id}/trigger-reset` ([`g8.api.workflows.resetTriggerCursor`](api/workflows.md#op-resettriggercursor), tier `external`, scope `workflows:run`)
4282
+
4283
+ - Source: `src/workflows.ts`
4284
+
4285
+ <a id="g8-workflows-resumeexecution"></a>
4286
+
4287
+ ### `g8.workflows.resumeExecution`
4288
+
4289
+ ```ts
4290
+ g8.workflows.resumeExecution: (executionId: string) => Promise<{ data: { resumed: boolean; }; }>
4291
+ ```
4292
+
4293
+ Resume a paused execution.
4294
+
4295
+ - Calls `POST /api/v1/workflows/executions/{execution_id}/resume` ([`g8.api.workflows.resumeExecution`](api/workflows.md#op-resumeexecution), tier `external`, scope `workflows:run`)
4296
+
4297
+ - Source: `src/workflows.ts`
4298
+
4299
+ <a id="g8-workflows-stopexecution"></a>
4300
+
4301
+ ### `g8.workflows.stopExecution`
4302
+
4303
+ ```ts
4304
+ g8.workflows.stopExecution: (executionId: string) => Promise<{ data: { stopped: boolean; }; }>
4305
+ ```
4306
+
4307
+ Stop an execution.
4308
+
4309
+ - Calls `POST /api/v1/workflows/executions/{execution_id}/stop` ([`g8.api.workflows.stopExecution`](api/workflows.md#op-stopexecution), tier `external`, scope `workflows:run`)
4310
+
4311
+ - Source: `src/workflows.ts`
4312
+
4313
+ <a id="g8-workflows-update"></a>
4314
+
4315
+ ### `g8.workflows.update`
4316
+
4317
+ ```ts
4318
+ g8.workflows.update: (workflowId: string, fields: WorkflowUpdateParams) => Promise<Workflow>
4319
+ ```
4320
+
4321
+ Update a workflow. Pass the full `config` (nodes + connections) to edit the graph — node-level CRUD is performed client-side by mutating the config and submitting the updated record.
4322
+
4323
+ - Calls `PUT /api/v1/workflows/{action_id}` ([`g8.api.workflows.updateWorkflow`](api/workflows.md#op-updateworkflow), tier `external`, scope `workflows:run`)
4324
+
4325
+ - Source: `src/workflows.ts`
4326
+
4327
+ <a id="g8-workflows-validate"></a>
4328
+
4329
+ ### `g8.workflows.validate`
4330
+
4331
+ ```ts
4332
+ g8.workflows.validate: (workflow: { config: WorkflowConfig; trigger_config?: Record<string, unknown>; }) => Promise<{ data: { valid: boolean; errors: Array<{ node_id?: string; field?: string; message: string; }>; }; }>
4333
+ ```
4334
+
4335
+ Validate a workflow definition (orphans, dangling connections, required fields).
4336
+
4337
+ - Calls `POST /api/v1/workflows/validate` ([`g8.api.workflows.validateWorkflow`](api/workflows.md#op-validateworkflow), tier `external`, scope `workflows:run`)
4338
+
4339
+ - Source: `src/workflows.ts`