@graph8/sdk 0.251.0 → 0.260.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 +104 -7
  4. package/dist/index.d.ts +104 -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 +102 -7
  10. package/dist/react.d.ts +102 -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 +1696 -0
  140. package/docs/api/deals.md +2432 -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,1704 @@
1
+ /* Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. */
2
+
3
+ /**
4
+ * Types for `g8.api.webChat` (Web Chat): 46 operations.
5
+ *
6
+ * For reading. In code, import from the package instead:
7
+ * import type { ApiInput, ApiOutput, G8Contract } from "@graph8/sdk";
8
+ * type In = ApiInput<"add_webchat_handoff_pool_teams_webchat_handoff_pool_teams_post">;
9
+ *
10
+ * Reference with examples: webChat.md
11
+ */
12
+ /* eslint-disable */
13
+
14
+ /** `g8.api.webChat.<member>` -> the operationId it calls. */
15
+ export interface WebChatMembers {
16
+ addWebchatHandoffPoolTeams: "add_webchat_handoff_pool_teams_webchat_handoff_pool_teams_post";
17
+ addWebchatHandoffPoolUsers: "add_webchat_handoff_pool_users_webchat_handoff_pool_users_post";
18
+ createAssessment: "create_assessment_webchat_assessments_post";
19
+ createChatBot: "create_chat_bot_webchat_chat_bots_post";
20
+ createWebchatAgent: "create_webchat_agent_webchat_agents_post";
21
+ createWebchatBlog: "create_webchat_blog_webchat_blogs_post";
22
+ createWebchatButton: "create_webchat_button_webchat_buttons_post";
23
+ createWebchatQuestion: "create_webchat_question_webchat_questions_post";
24
+ createWebchatSettings: "create_webchat_settings_webchat_settings_post";
25
+ deleteAssessment: "delete_assessment_webchat_assessments__assessment_id__delete";
26
+ deleteChatBot: "delete_chat_bot_webchat_chat_bots__bot_id__delete";
27
+ deleteWebchatAgent: "delete_webchat_agent_webchat_agents__agent_id__delete";
28
+ deleteWebchatBlog: "delete_webchat_blog_webchat_blogs__blog_id__delete";
29
+ deleteWebchatButton: "delete_webchat_button_webchat_buttons__button_id__delete";
30
+ deleteWebchatQuestion: "delete_webchat_question_webchat_questions__question_id__delete";
31
+ deleteWebchatSettings: "delete_webchat_settings_webchat_settings_delete";
32
+ fetchWebchatBlogMetadata: "fetch_webchat_blog_metadata_webchat_blogs_fetch_metadata_post";
33
+ getAssessment: "get_assessment_webchat_assessments__assessment_id__get";
34
+ getWebchatHandoffPool: "get_webchat_handoff_pool_webchat_handoff_pool_get";
35
+ getWebchatHandoffPoolStatus: "get_webchat_handoff_pool_status_webchat_handoff_pool_status_get";
36
+ getWebchatHumanAvailability: "get_webchat_human_availability_webchat_human_availability_get";
37
+ getWebchatSettings: "get_webchat_settings_webchat_settings_get";
38
+ getWebchatVisitorFunnel: "get_webchat_visitor_funnel_webchat_visitors_funnel_get";
39
+ listAssessments: "list_assessments_webchat_assessments_get";
40
+ listChatBots: "list_chat_bots_webchat_chat_bots_get";
41
+ listWebchatAgents: "list_webchat_agents_webchat_agents_get";
42
+ listWebchatBlogs: "list_webchat_blogs_webchat_blogs_get";
43
+ listWebchatButtons: "list_webchat_buttons_webchat_buttons_get";
44
+ listWebchatQuestions: "list_webchat_questions_webchat_questions_get";
45
+ listWebchatTeamEventTypes: "list_webchat_team_event_types_webchat_teams__team_id__event_types_get";
46
+ listWebchatTeams: "list_webchat_teams_webchat_teams_get";
47
+ listWebchatVisitors: "list_webchat_visitors_webchat_visitors_get";
48
+ promoteChatBotToDefault: "promote_chat_bot_to_default_webchat_chat_bots__bot_id__promote_default_post";
49
+ putWebchatHumanAvailability: "put_webchat_human_availability_webchat_human_availability_put";
50
+ removeWebchatHandoffPoolTeam: "remove_webchat_handoff_pool_team_webchat_handoff_pool_teams__team_id__delete";
51
+ removeWebchatHandoffPoolUser: "remove_webchat_handoff_pool_user_webchat_handoff_pool_users__user_id__delete";
52
+ updateAssessment: "update_assessment_webchat_assessments__assessment_id__patch";
53
+ updateChatBot: "update_chat_bot_webchat_chat_bots__bot_id__patch";
54
+ updateWebchatAgent: "update_webchat_agent_webchat_agents__agent_id__patch";
55
+ updateWebchatBlog: "update_webchat_blog_webchat_blogs__blog_id__patch";
56
+ updateWebchatButton: "update_webchat_button_webchat_buttons__button_id__patch";
57
+ updateWebchatHandoffPoolTeamScope: "update_webchat_handoff_pool_team_scope_webchat_handoff_pool_teams__team_id__scope_patch";
58
+ updateWebchatHandoffPoolUserScope: "update_webchat_handoff_pool_user_scope_webchat_handoff_pool_users__user_id__scope_patch";
59
+ updateWebchatQuestion: "update_webchat_question_webchat_questions__question_id__patch";
60
+ updateWebchatSettings: "update_webchat_settings_webchat_settings_patch";
61
+ uploadWebchatImage: "upload_webchat_image_webchat_images_post";
62
+ }
63
+
64
+ /** Input and output of every `g8.api.webChat` operation, keyed by operationId. */
65
+ export interface WebChatOperations {
66
+ /**
67
+ * POST /webchat/handoff-pool/teams
68
+ * Add Webchat Handoff Pool Teams
69
+ * tier: write · scope: inbox:write
70
+ */
71
+ add_webchat_handoff_pool_teams_webchat_handoff_pool_teams_post: {
72
+ input: {
73
+ headers?: {
74
+ "X-Target-Org-Id"?: string | null;
75
+ };
76
+ body: HandoffPoolTeamsRequest;
77
+ };
78
+ output: ApiResponse_WebchatPayload_;
79
+ };
80
+ /**
81
+ * POST /webchat/handoff-pool/users
82
+ * Add Webchat Handoff Pool Users
83
+ * tier: write · scope: inbox:write
84
+ */
85
+ add_webchat_handoff_pool_users_webchat_handoff_pool_users_post: {
86
+ input: {
87
+ headers?: {
88
+ "X-Target-Org-Id"?: string | null;
89
+ };
90
+ body: HandoffPoolUsersRequest;
91
+ };
92
+ output: ApiResponse_WebchatPayload_;
93
+ };
94
+ /**
95
+ * POST /webchat/assessments
96
+ * Create Assessment
97
+ * tier: write · scope: inbox:write
98
+ */
99
+ create_assessment_webchat_assessments_post: {
100
+ input: {
101
+ query: {
102
+ /** Owning chat bot id (UUID). */
103
+ chat_bot_id: string;
104
+ };
105
+ headers?: {
106
+ /** Retry-safety key. Replaying it returns the FIRST result. */
107
+ "Idempotency-Key"?: string | null;
108
+ "X-Target-Org-Id"?: string | null;
109
+ };
110
+ body: AssessmentCreateRequest;
111
+ };
112
+ output: ApiResponse_WebchatPayload_;
113
+ };
114
+ /**
115
+ * POST /webchat/chat-bots
116
+ * Create Chat Bot
117
+ * tier: write · scope: inbox:write
118
+ */
119
+ create_chat_bot_webchat_chat_bots_post: {
120
+ input: {
121
+ headers?: {
122
+ /** Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. */
123
+ "Idempotency-Key"?: string | null;
124
+ "X-Target-Org-Id"?: string | null;
125
+ };
126
+ body: ChatBotCreateRequest;
127
+ };
128
+ output: ApiResponse_WebchatPayload_;
129
+ };
130
+ /**
131
+ * POST /webchat/agents
132
+ * Create Webchat Agent
133
+ * tier: write · scope: inbox:write
134
+ */
135
+ create_webchat_agent_webchat_agents_post: {
136
+ input: {
137
+ headers?: {
138
+ /** Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. */
139
+ "Idempotency-Key"?: string | null;
140
+ "X-Target-Org-Id"?: string | null;
141
+ };
142
+ body: AgentCreateRequest;
143
+ };
144
+ output: ApiResponse_WebchatPayload_;
145
+ };
146
+ /**
147
+ * POST /webchat/blogs
148
+ * Create Webchat Blog
149
+ * tier: write · scope: inbox:write
150
+ */
151
+ create_webchat_blog_webchat_blogs_post: {
152
+ input: {
153
+ headers?: {
154
+ /** Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. */
155
+ "Idempotency-Key"?: string | null;
156
+ "X-Target-Org-Id"?: string | null;
157
+ };
158
+ body: BlogCreateRequest;
159
+ };
160
+ output: ApiResponse_WebchatPayload_;
161
+ };
162
+ /**
163
+ * POST /webchat/buttons
164
+ * Create Webchat Button
165
+ * tier: write · scope: inbox:write
166
+ */
167
+ create_webchat_button_webchat_buttons_post: {
168
+ input: {
169
+ headers?: {
170
+ /** Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. */
171
+ "Idempotency-Key"?: string | null;
172
+ "X-Target-Org-Id"?: string | null;
173
+ };
174
+ body: ButtonCreateRequest;
175
+ };
176
+ output: ApiResponse_WebchatPayload_;
177
+ };
178
+ /**
179
+ * POST /webchat/questions
180
+ * Create Webchat Question
181
+ * tier: write · scope: inbox:write
182
+ */
183
+ create_webchat_question_webchat_questions_post: {
184
+ input: {
185
+ headers?: {
186
+ /** Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. */
187
+ "Idempotency-Key"?: string | null;
188
+ "X-Target-Org-Id"?: string | null;
189
+ };
190
+ body: QuestionCreateRequest;
191
+ };
192
+ output: ApiResponse_WebchatPayload_;
193
+ };
194
+ /**
195
+ * POST /webchat/settings
196
+ * Create Webchat Settings
197
+ * tier: write · scope: inbox:write
198
+ */
199
+ create_webchat_settings_webchat_settings_post: {
200
+ input: {
201
+ headers?: {
202
+ /** Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. */
203
+ "Idempotency-Key"?: string | null;
204
+ "X-Target-Org-Id"?: string | null;
205
+ };
206
+ body: SettingsCreateRequest;
207
+ };
208
+ output: ApiResponse_WebchatPayload_;
209
+ };
210
+ /**
211
+ * DELETE /webchat/assessments/{assessment_id}
212
+ * Delete Assessment
213
+ * tier: destructive · scope: inbox:delete
214
+ */
215
+ delete_assessment_webchat_assessments__assessment_id__delete: {
216
+ input: {
217
+ path: {
218
+ /** Assessment id. */
219
+ assessment_id: string;
220
+ };
221
+ headers?: {
222
+ "X-Target-Org-Id"?: string | null;
223
+ };
224
+ };
225
+ output: ApiResponse_WebchatPayload_;
226
+ };
227
+ /**
228
+ * DELETE /webchat/chat-bots/{bot_id}
229
+ * Delete Chat Bot
230
+ * tier: destructive · scope: inbox:delete
231
+ */
232
+ delete_chat_bot_webchat_chat_bots__bot_id__delete: {
233
+ input: {
234
+ path: {
235
+ /** Chat bot id (UUID). */
236
+ bot_id: string;
237
+ };
238
+ query?: {
239
+ /** Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. */
240
+ expected_revision?: number | null;
241
+ };
242
+ headers?: {
243
+ "X-Target-Org-Id"?: string | null;
244
+ };
245
+ };
246
+ output: ApiResponse_WebchatPayload_;
247
+ };
248
+ /**
249
+ * DELETE /webchat/agents/{agent_id}
250
+ * Delete Webchat Agent
251
+ * tier: destructive · scope: inbox:delete
252
+ */
253
+ delete_webchat_agent_webchat_agents__agent_id__delete: {
254
+ input: {
255
+ path: {
256
+ /** Agent row id. */
257
+ agent_id: string;
258
+ };
259
+ query: {
260
+ /** Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. */
261
+ chat_bot_id: string;
262
+ /** Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. */
263
+ expected_revision?: number | null;
264
+ };
265
+ headers?: {
266
+ "X-Target-Org-Id"?: string | null;
267
+ };
268
+ };
269
+ output: ApiResponse_WebchatPayload_;
270
+ };
271
+ /**
272
+ * DELETE /webchat/blogs/{blog_id}
273
+ * Delete Webchat Blog
274
+ * tier: destructive · scope: inbox:delete
275
+ */
276
+ delete_webchat_blog_webchat_blogs__blog_id__delete: {
277
+ input: {
278
+ path: {
279
+ /** Article card id. */
280
+ blog_id: string;
281
+ };
282
+ query: {
283
+ /** Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. */
284
+ chat_bot_id: string;
285
+ /** Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. */
286
+ expected_revision?: number | null;
287
+ };
288
+ headers?: {
289
+ "X-Target-Org-Id"?: string | null;
290
+ };
291
+ };
292
+ output: ApiResponse_WebchatPayload_;
293
+ };
294
+ /**
295
+ * DELETE /webchat/buttons/{button_id}
296
+ * Delete Webchat Button
297
+ * tier: destructive · scope: inbox:delete
298
+ */
299
+ delete_webchat_button_webchat_buttons__button_id__delete: {
300
+ input: {
301
+ path: {
302
+ /** Button id. */
303
+ button_id: string;
304
+ };
305
+ query: {
306
+ /** Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. */
307
+ chat_bot_id: string;
308
+ /** Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. */
309
+ expected_revision?: number | null;
310
+ };
311
+ headers?: {
312
+ "X-Target-Org-Id"?: string | null;
313
+ };
314
+ };
315
+ output: ApiResponse_WebchatPayload_;
316
+ };
317
+ /**
318
+ * DELETE /webchat/questions/{question_id}
319
+ * Delete Webchat Question
320
+ * tier: destructive · scope: inbox:delete
321
+ */
322
+ delete_webchat_question_webchat_questions__question_id__delete: {
323
+ input: {
324
+ path: {
325
+ /** Question id. */
326
+ question_id: string;
327
+ };
328
+ query: {
329
+ /** Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. */
330
+ chat_bot_id: string;
331
+ /** Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. */
332
+ expected_revision?: number | null;
333
+ };
334
+ headers?: {
335
+ "X-Target-Org-Id"?: string | null;
336
+ };
337
+ };
338
+ output: ApiResponse_WebchatPayload_;
339
+ };
340
+ /**
341
+ * DELETE /webchat/settings
342
+ * Delete Webchat Settings
343
+ * tier: destructive · scope: inbox:delete
344
+ */
345
+ delete_webchat_settings_webchat_settings_delete: {
346
+ input: {
347
+ query: {
348
+ /** Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. */
349
+ chat_bot_id: string;
350
+ /** Which widget: `external` (the customer-facing embed) or `internal` (graph8's own support widget). Omitted means `external`. */
351
+ surface?: ("external" | "internal") | null;
352
+ /** Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. */
353
+ expected_revision?: number | null;
354
+ };
355
+ headers?: {
356
+ "X-Target-Org-Id"?: string | null;
357
+ };
358
+ };
359
+ output: ApiResponse_WebchatPayload_;
360
+ };
361
+ /**
362
+ * POST /webchat/blogs/fetch-metadata
363
+ * Fetch Webchat Blog Metadata
364
+ * tier: write · scope: inbox:write
365
+ */
366
+ fetch_webchat_blog_metadata_webchat_blogs_fetch_metadata_post: {
367
+ input: {
368
+ headers?: {
369
+ "X-Target-Org-Id"?: string | null;
370
+ };
371
+ body: BlogMetadataRequest;
372
+ };
373
+ output: ApiResponse_WebchatPayload_;
374
+ };
375
+ /**
376
+ * GET /webchat/assessments/{assessment_id}
377
+ * Get Assessment
378
+ * tier: read · scope: inbox:read
379
+ */
380
+ get_assessment_webchat_assessments__assessment_id__get: {
381
+ input: {
382
+ path: {
383
+ /** Assessment id. */
384
+ assessment_id: string;
385
+ };
386
+ headers?: {
387
+ "X-Target-Org-Id"?: string | null;
388
+ };
389
+ };
390
+ output: ApiResponse_WebchatPayload_;
391
+ };
392
+ /**
393
+ * GET /webchat/handoff-pool
394
+ * Get Webchat Handoff Pool
395
+ * tier: read · scope: inbox:read
396
+ */
397
+ get_webchat_handoff_pool_webchat_handoff_pool_get: {
398
+ input: {
399
+ headers?: {
400
+ "X-Target-Org-Id"?: string | null;
401
+ };
402
+ };
403
+ output: ApiResponse_WebchatPayload_;
404
+ };
405
+ /**
406
+ * GET /webchat/handoff-pool-status
407
+ * Get Webchat Handoff Pool Status
408
+ * tier: read · scope: inbox:read
409
+ */
410
+ get_webchat_handoff_pool_status_webchat_handoff_pool_status_get: {
411
+ input: {
412
+ query?: {
413
+ /** Chat bot the widget serves; the pool is scoped per bot. */
414
+ chat_bot_id?: string | null;
415
+ };
416
+ headers?: {
417
+ "X-Target-Org-Id"?: string | null;
418
+ };
419
+ };
420
+ output: ApiResponse_WebchatPayload_;
421
+ };
422
+ /**
423
+ * GET /webchat/human-availability
424
+ * Get Webchat Human Availability
425
+ * tier: read · scope: inbox:read
426
+ */
427
+ get_webchat_human_availability_webchat_human_availability_get: {
428
+ input: {
429
+ query?: {
430
+ /** Chat bot id. OMIT for the org-wide default schedule. */
431
+ chat_bot_id?: string | null;
432
+ /** Which widget: `external` (the customer-facing embed) or `internal` (graph8's own support widget). Omitted means `external`. */
433
+ surface?: ("external" | "internal") | null;
434
+ };
435
+ headers?: {
436
+ "X-Target-Org-Id"?: string | null;
437
+ };
438
+ };
439
+ output: ApiResponse_WebchatPayload_;
440
+ };
441
+ /**
442
+ * GET /webchat/settings
443
+ * Get Webchat Settings
444
+ * tier: read · scope: inbox:read
445
+ */
446
+ get_webchat_settings_webchat_settings_get: {
447
+ input: {
448
+ query: {
449
+ /** Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. */
450
+ chat_bot_id: string;
451
+ /** Which widget: `external` (the customer-facing embed) or `internal` (graph8's own support widget). Omitted means `external`. */
452
+ surface?: ("external" | "internal") | null;
453
+ };
454
+ headers?: {
455
+ "X-Target-Org-Id"?: string | null;
456
+ };
457
+ };
458
+ output: ApiResponse_WebchatPayload_;
459
+ };
460
+ /**
461
+ * GET /webchat/visitors/funnel
462
+ * Get Webchat Visitor Funnel
463
+ * tier: read · scope: inbox:read
464
+ */
465
+ get_webchat_visitor_funnel_webchat_visitors_funnel_get: {
466
+ input: {
467
+ query?: {
468
+ bot_id?: string | null;
469
+ page_url?: string | null;
470
+ /** ISO date, inclusive. */
471
+ date_from?: string | null;
472
+ /** ISO date, inclusive. */
473
+ date_to?: string | null;
474
+ /** Validated and echoed back; not yet applied to any figure. */
475
+ abandonment_window_minutes?: number;
476
+ };
477
+ headers?: {
478
+ "X-Target-Org-Id"?: string | null;
479
+ };
480
+ };
481
+ output: ApiResponse_WebchatPayload_;
482
+ };
483
+ /**
484
+ * GET /webchat/assessments
485
+ * List Assessments
486
+ * tier: read · scope: inbox:read
487
+ */
488
+ list_assessments_webchat_assessments_get: {
489
+ input: {
490
+ query?: {
491
+ /** Filter to one bot. OPTIONAL here, unlike the other webchat content routes - omitted returns every assessment in the org. */
492
+ chat_bot_id?: string | null;
493
+ };
494
+ headers?: {
495
+ "X-Target-Org-Id"?: string | null;
496
+ };
497
+ };
498
+ output: ApiResponse_WebchatListPayload_;
499
+ };
500
+ /**
501
+ * GET /webchat/chat-bots
502
+ * List Chat Bots
503
+ * tier: read · scope: inbox:read
504
+ */
505
+ list_chat_bots_webchat_chat_bots_get: {
506
+ input: {
507
+ headers?: {
508
+ "X-Target-Org-Id"?: string | null;
509
+ };
510
+ };
511
+ output: ApiResponse_WebchatListPayload_;
512
+ };
513
+ /**
514
+ * GET /webchat/agents
515
+ * List Webchat Agents
516
+ * tier: read · scope: inbox:read
517
+ */
518
+ list_webchat_agents_webchat_agents_get: {
519
+ input: {
520
+ query: {
521
+ /** Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. */
522
+ chat_bot_id: string;
523
+ };
524
+ headers?: {
525
+ "X-Target-Org-Id"?: string | null;
526
+ };
527
+ };
528
+ output: ApiResponse_WebchatListPayload_;
529
+ };
530
+ /**
531
+ * GET /webchat/blogs
532
+ * List Webchat Blogs
533
+ * tier: read · scope: inbox:read
534
+ */
535
+ list_webchat_blogs_webchat_blogs_get: {
536
+ input: {
537
+ query: {
538
+ /** Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. */
539
+ chat_bot_id: string;
540
+ };
541
+ headers?: {
542
+ "X-Target-Org-Id"?: string | null;
543
+ };
544
+ };
545
+ output: ApiResponse_WebchatListPayload_;
546
+ };
547
+ /**
548
+ * GET /webchat/buttons
549
+ * List Webchat Buttons
550
+ * tier: read · scope: inbox:read
551
+ */
552
+ list_webchat_buttons_webchat_buttons_get: {
553
+ input: {
554
+ query: {
555
+ /** Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. */
556
+ chat_bot_id: string;
557
+ };
558
+ headers?: {
559
+ "X-Target-Org-Id"?: string | null;
560
+ };
561
+ };
562
+ output: ApiResponse_WebchatListPayload_;
563
+ };
564
+ /**
565
+ * GET /webchat/questions
566
+ * List Webchat Questions
567
+ * tier: read · scope: inbox:read
568
+ */
569
+ list_webchat_questions_webchat_questions_get: {
570
+ input: {
571
+ query: {
572
+ /** Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. */
573
+ chat_bot_id: string;
574
+ };
575
+ headers?: {
576
+ "X-Target-Org-Id"?: string | null;
577
+ };
578
+ };
579
+ output: ApiResponse_WebchatListPayload_;
580
+ };
581
+ /**
582
+ * GET /webchat/teams/{team_id}/event-types
583
+ * List Webchat Team Event Types
584
+ * tier: read · scope: inbox:read
585
+ */
586
+ list_webchat_team_event_types_webchat_teams__team_id__event_types_get: {
587
+ input: {
588
+ path: {
589
+ /** Scheduling team id. */
590
+ team_id: string;
591
+ };
592
+ headers?: {
593
+ "X-Target-Org-Id"?: string | null;
594
+ };
595
+ };
596
+ output: ApiResponse_WebchatListPayload_;
597
+ };
598
+ /**
599
+ * GET /webchat/teams
600
+ * List Webchat Teams
601
+ * tier: read · scope: inbox:read
602
+ */
603
+ list_webchat_teams_webchat_teams_get: {
604
+ input: {
605
+ headers?: {
606
+ "X-Target-Org-Id"?: string | null;
607
+ };
608
+ };
609
+ output: ApiResponse_WebchatListPayload_;
610
+ };
611
+ /**
612
+ * GET /webchat/visitors
613
+ * List Webchat Visitors
614
+ * tier: read · scope: inbox:read
615
+ */
616
+ list_webchat_visitors_webchat_visitors_get: {
617
+ input: {
618
+ query?: {
619
+ page?: number;
620
+ page_size?: number;
621
+ /** Only visitors the widget managed to identify. */
622
+ identified_only?: boolean;
623
+ search?: string | null;
624
+ };
625
+ headers?: {
626
+ "X-Target-Org-Id"?: string | null;
627
+ };
628
+ };
629
+ output: ApiResponse_WebchatListPayload_;
630
+ };
631
+ /**
632
+ * POST /webchat/chat-bots/{bot_id}/promote-default
633
+ * Promote Chat Bot To Default
634
+ * tier: write · scope: inbox:write
635
+ */
636
+ promote_chat_bot_to_default_webchat_chat_bots__bot_id__promote_default_post: {
637
+ input: {
638
+ path: {
639
+ /** Chat bot id (UUID). */
640
+ bot_id: string;
641
+ };
642
+ query?: {
643
+ /** Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. */
644
+ expected_revision?: number | null;
645
+ };
646
+ headers?: {
647
+ "X-Target-Org-Id"?: string | null;
648
+ };
649
+ };
650
+ output: ApiResponse_WebchatPayload_;
651
+ };
652
+ /**
653
+ * PUT /webchat/human-availability
654
+ * Put Webchat Human Availability
655
+ * tier: write · scope: inbox:write
656
+ */
657
+ put_webchat_human_availability_webchat_human_availability_put: {
658
+ input: {
659
+ headers?: {
660
+ "X-Target-Org-Id"?: string | null;
661
+ };
662
+ body: HumanAvailabilityRequest;
663
+ };
664
+ output: ApiResponse_WebchatPayload_;
665
+ };
666
+ /**
667
+ * DELETE /webchat/handoff-pool/teams/{team_id}
668
+ * Remove Webchat Handoff Pool Team
669
+ * tier: destructive · scope: inbox:delete
670
+ */
671
+ remove_webchat_handoff_pool_team_webchat_handoff_pool_teams__team_id__delete: {
672
+ input: {
673
+ path: {
674
+ /** Team id (UUID). */
675
+ team_id: string;
676
+ };
677
+ query?: {
678
+ /** Only the row in this pool. Omitted removes the person or team from every pool. `internal` is graph8's own support widget. */
679
+ pool?: ("external" | "internal") | null;
680
+ /** Only the row scoped to this chat bot. Omitted removes it across every bot. */
681
+ chat_bot_id?: string | null;
682
+ };
683
+ headers?: {
684
+ "X-Target-Org-Id"?: string | null;
685
+ };
686
+ };
687
+ output: ApiResponse_WebchatPayload_;
688
+ };
689
+ /**
690
+ * DELETE /webchat/handoff-pool/users/{user_id}
691
+ * Remove Webchat Handoff Pool User
692
+ * tier: destructive · scope: inbox:delete
693
+ */
694
+ remove_webchat_handoff_pool_user_webchat_handoff_pool_users__user_id__delete: {
695
+ input: {
696
+ path: {
697
+ /** Member user id. */
698
+ user_id: string;
699
+ };
700
+ query?: {
701
+ /** Only the row in this pool. Omitted removes the person or team from every pool. `internal` is graph8's own support widget. */
702
+ pool?: ("external" | "internal") | null;
703
+ /** Only the row scoped to this chat bot. Omitted removes it across every bot. */
704
+ chat_bot_id?: string | null;
705
+ };
706
+ headers?: {
707
+ "X-Target-Org-Id"?: string | null;
708
+ };
709
+ };
710
+ output: ApiResponse_WebchatPayload_;
711
+ };
712
+ /**
713
+ * PATCH /webchat/assessments/{assessment_id}
714
+ * Update Assessment
715
+ * tier: write · scope: inbox:write
716
+ */
717
+ update_assessment_webchat_assessments__assessment_id__patch: {
718
+ input: {
719
+ path: {
720
+ /** Assessment id. */
721
+ assessment_id: string;
722
+ };
723
+ headers?: {
724
+ "X-Target-Org-Id"?: string | null;
725
+ };
726
+ body: AssessmentUpdateRequest;
727
+ };
728
+ output: ApiResponse_WebchatPayload_;
729
+ };
730
+ /**
731
+ * PATCH /webchat/chat-bots/{bot_id}
732
+ * Update Chat Bot
733
+ * tier: write · scope: inbox:write
734
+ */
735
+ update_chat_bot_webchat_chat_bots__bot_id__patch: {
736
+ input: {
737
+ path: {
738
+ /** Chat bot id (UUID). */
739
+ bot_id: string;
740
+ };
741
+ headers?: {
742
+ "X-Target-Org-Id"?: string | null;
743
+ };
744
+ body: ChatBotUpdateRequest;
745
+ };
746
+ output: ApiResponse_WebchatPayload_;
747
+ };
748
+ /**
749
+ * PATCH /webchat/agents/{agent_id}
750
+ * Update Webchat Agent
751
+ * tier: write · scope: inbox:write
752
+ */
753
+ update_webchat_agent_webchat_agents__agent_id__patch: {
754
+ input: {
755
+ path: {
756
+ /** Agent row id. */
757
+ agent_id: string;
758
+ };
759
+ headers?: {
760
+ "X-Target-Org-Id"?: string | null;
761
+ };
762
+ body: AgentUpdateRequest;
763
+ };
764
+ output: ApiResponse_WebchatPayload_;
765
+ };
766
+ /**
767
+ * PATCH /webchat/blogs/{blog_id}
768
+ * Update Webchat Blog
769
+ * tier: write · scope: inbox:write
770
+ */
771
+ update_webchat_blog_webchat_blogs__blog_id__patch: {
772
+ input: {
773
+ path: {
774
+ /** Article card id. */
775
+ blog_id: string;
776
+ };
777
+ headers?: {
778
+ "X-Target-Org-Id"?: string | null;
779
+ };
780
+ body: BlogUpdateRequest;
781
+ };
782
+ output: ApiResponse_WebchatPayload_;
783
+ };
784
+ /**
785
+ * PATCH /webchat/buttons/{button_id}
786
+ * Update Webchat Button
787
+ * tier: write · scope: inbox:write
788
+ */
789
+ update_webchat_button_webchat_buttons__button_id__patch: {
790
+ input: {
791
+ path: {
792
+ /** Button id. */
793
+ button_id: string;
794
+ };
795
+ headers?: {
796
+ "X-Target-Org-Id"?: string | null;
797
+ };
798
+ body: ButtonUpdateRequest;
799
+ };
800
+ output: ApiResponse_WebchatPayload_;
801
+ };
802
+ /**
803
+ * PATCH /webchat/handoff-pool/teams/{team_id}/scope
804
+ * Update Webchat Handoff Pool Team Scope
805
+ * tier: write · scope: inbox:write
806
+ */
807
+ update_webchat_handoff_pool_team_scope_webchat_handoff_pool_teams__team_id__scope_patch: {
808
+ input: {
809
+ path: {
810
+ /** Team id (UUID). */
811
+ team_id: string;
812
+ };
813
+ query?: {
814
+ /** Pool to re-scope. Only `external` is accepted by the app: the internal pool is not per-bot. */
815
+ pool?: "external" | "internal";
816
+ };
817
+ headers?: {
818
+ "X-Target-Org-Id"?: string | null;
819
+ };
820
+ body: HandoffPoolScopeRequest;
821
+ };
822
+ output: ApiResponse_WebchatPayload_;
823
+ };
824
+ /**
825
+ * PATCH /webchat/handoff-pool/users/{user_id}/scope
826
+ * Update Webchat Handoff Pool User Scope
827
+ * tier: write · scope: inbox:write
828
+ */
829
+ update_webchat_handoff_pool_user_scope_webchat_handoff_pool_users__user_id__scope_patch: {
830
+ input: {
831
+ path: {
832
+ /** Member user id. */
833
+ user_id: string;
834
+ };
835
+ query?: {
836
+ /** Pool to re-scope. Only `external` is accepted by the app: the internal pool is not per-bot. */
837
+ pool?: "external" | "internal";
838
+ };
839
+ headers?: {
840
+ "X-Target-Org-Id"?: string | null;
841
+ };
842
+ body: HandoffPoolScopeRequest;
843
+ };
844
+ output: ApiResponse_WebchatPayload_;
845
+ };
846
+ /**
847
+ * PATCH /webchat/questions/{question_id}
848
+ * Update Webchat Question
849
+ * tier: write · scope: inbox:write
850
+ */
851
+ update_webchat_question_webchat_questions__question_id__patch: {
852
+ input: {
853
+ path: {
854
+ /** Question id. */
855
+ question_id: string;
856
+ };
857
+ headers?: {
858
+ "X-Target-Org-Id"?: string | null;
859
+ };
860
+ body: QuestionUpdateRequest;
861
+ };
862
+ output: ApiResponse_WebchatPayload_;
863
+ };
864
+ /**
865
+ * PATCH /webchat/settings
866
+ * Update Webchat Settings
867
+ * tier: write · scope: inbox:write
868
+ */
869
+ update_webchat_settings_webchat_settings_patch: {
870
+ input: {
871
+ headers?: {
872
+ "X-Target-Org-Id"?: string | null;
873
+ };
874
+ body: SettingsUpdateRequest;
875
+ };
876
+ output: ApiResponse_WebchatPayload_;
877
+ };
878
+ /**
879
+ * POST /webchat/images
880
+ * Upload Webchat Image
881
+ * tier: write · scope: inbox:write
882
+ */
883
+ upload_webchat_image_webchat_images_post: {
884
+ input: {
885
+ query?: {
886
+ /** `header` (the widget header image) or `avatar` (the assistant avatar). Only selects where the file is stored. */
887
+ purpose?: "header" | "avatar";
888
+ };
889
+ headers?: {
890
+ "X-Target-Org-Id"?: string | null;
891
+ };
892
+ };
893
+ output: ApiResponse_WebchatPayload_;
894
+ };
895
+ }
896
+
897
+ // 45 schemas referenced above (the same as G8Contract.<Name>).
898
+
899
+ /** Map an AI agent onto the URLs it should answer on. */
900
+ export interface AgentCreateRequest {
901
+ active?: boolean;
902
+ /** Agent id from agent settings. */
903
+ agent_id?: string | null;
904
+ agent_name: string;
905
+ /** Owning chat bot id (UUID). */
906
+ chat_bot_id: string;
907
+ /** Used when no URL filter matches. */
908
+ default?: boolean;
909
+ surface?: ("external" | "internal") | null;
910
+ /** URL paths where this agent is active. */
911
+ url_filter?: Array<string>;
912
+ }
913
+
914
+ /**
915
+ * Partial edit of an agent mapping. `chat_bot_id` stays required.
916
+ *
917
+ * It is not a field being changed - it is how the app FINDS the row, because
918
+ * agent ids are unique per bot rather than per org.
919
+ */
920
+ export interface AgentUpdateRequest {
921
+ active?: boolean | null;
922
+ agent_id?: string | null;
923
+ agent_name?: string | null;
924
+ /** Owning chat bot id (UUID). */
925
+ chat_bot_id: string;
926
+ default?: boolean | null;
927
+ expected_revision?: number | null;
928
+ surface?: ("external" | "internal") | null;
929
+ url_filter?: Array<string> | null;
930
+ }
931
+
932
+ export interface ApiResponse_WebchatListPayload_ {
933
+ data: WebchatListPayload;
934
+ pagination?: PaginationMeta | null;
935
+ }
936
+
937
+ export interface ApiResponse_WebchatPayload_ {
938
+ data: WebchatPayload;
939
+ pagination?: PaginationMeta | null;
940
+ }
941
+
942
+ /** A single selectable answer within an assessment step. */
943
+ export interface AssessmentAnswerDef {
944
+ id: string;
945
+ next_step_id?: string | null;
946
+ result_id?: string | null;
947
+ text: string;
948
+ }
949
+
950
+ /**
951
+ * A guided question flow the widget can run with a visitor.
952
+ *
953
+ * `definition` is the flow itself - a start step, the steps, and the results
954
+ * they lead to. It is the app's own `AssessmentDefinition`, so a graph that
955
+ * names a step it does not define is a 422 here rather than a dead end the
956
+ * visitor walks into.
957
+ */
958
+ export interface AssessmentCreateRequest {
959
+ /** The flow: `{start_step_id, steps[], results[]}`. */
960
+ definition: AssessmentDefinition;
961
+ description?: string | null;
962
+ name: string;
963
+ surface?: ("external" | "internal") | null;
964
+ }
965
+
966
+ /** Complete branching graph stored as JSONB in chat_assessments.definition. */
967
+ export interface AssessmentDefinition {
968
+ results?: Array<AssessmentResultDef>;
969
+ start_step_id: string;
970
+ steps?: Array<AssessmentStepDef>;
971
+ }
972
+
973
+ /** A terminal result node — shown when the visitor's path leads here. */
974
+ export interface AssessmentResultDef {
975
+ body?: string;
976
+ booking_enabled?: boolean;
977
+ handoff_enabled?: boolean;
978
+ id: string;
979
+ links?: Array<AssessmentResultLink>;
980
+ title: string;
981
+ }
982
+
983
+ export interface AssessmentResultLink {
984
+ label: string;
985
+ url: string;
986
+ }
987
+
988
+ /** One question-and-answers step in the assessment flow. */
989
+ export interface AssessmentStepDef {
990
+ allow_free_text?: boolean;
991
+ answers?: Array<AssessmentAnswerDef>;
992
+ id: string;
993
+ question: string;
994
+ }
995
+
996
+ /**
997
+ * Partial edit of an assessment.
998
+ *
999
+ * `revision` is this model's optimistic-concurrency field. Note it is spelled
1000
+ * `revision` here and `expected_revision` on every other webchat model - that
1001
+ * is the app's own inconsistency, and it is mirrored rather than tidied,
1002
+ * because renaming it would send the app a field it does not read and the
1003
+ * concurrency check would silently stop happening.
1004
+ */
1005
+ export interface AssessmentUpdateRequest {
1006
+ active?: boolean | null;
1007
+ definition?: AssessmentDefinition | null;
1008
+ description?: string | null;
1009
+ name?: string | null;
1010
+ /** Revision you last read. See the note above on the name. */
1011
+ revision?: number | null;
1012
+ surface?: ("external" | "internal") | null;
1013
+ }
1014
+
1015
+ /** A weekly recurring window. `day` is 0-6 with Monday = 0. */
1016
+ export interface AvailabilityInterval {
1017
+ day: number;
1018
+ end: string;
1019
+ start: string;
1020
+ }
1021
+
1022
+ /**
1023
+ * A single calendar date whose windows REPLACE that weekday's windows.
1024
+ *
1025
+ * An empty `intervals` list means closed all day — that is the whole point of an
1026
+ * override, so it is not treated as "unset". Window `day` values are ignored
1027
+ * here (the date already fixes the day), and a client that sends one has it
1028
+ * dropped by Pydantic's default `extra="ignore"`.
1029
+ */
1030
+ export interface AvailabilityOverride {
1031
+ date: string;
1032
+ intervals?: Array<AvailabilityWindow>;
1033
+ }
1034
+
1035
+ /**
1036
+ * One open window inside a single day, as wall-clock `HH:MM`.
1037
+ *
1038
+ * `end <= start` means the window crosses midnight into the next day; `"24:00"`
1039
+ * is a legal `end` only and means end-of-day.
1040
+ *
1041
+ * Both fields pin an exact LENGTH as well as a pattern, because a container's
1042
+ * `max_length` bounds the element COUNT and never a nested string — the bound on
1043
+ * the string itself has to live here.
1044
+ *
1045
+ * The length pin is redundant against today's engine and kept anyway: pydantic
1046
+ * compiles this pattern with the Rust regex crate, whose `$` matches only at the
1047
+ * end of the haystack, so "09:00\n" is already rejected. Python's `re`, which
1048
+ * pydantic falls back to for patterns the Rust engine cannot compile, matches `$`
1049
+ * BEFORE a trailing newline and would let it through. Five characters cannot hold
1050
+ * a newline either way, so the pin makes the guarantee engine-independent.
1051
+ */
1052
+ export interface AvailabilityWindow {
1053
+ end: string;
1054
+ start: string;
1055
+ }
1056
+
1057
+ /**
1058
+ * An article card in the widget's rail.
1059
+ *
1060
+ * `url` and `image_url` are validated by the app to be http/https; a scheme
1061
+ * it refuses is a 422 here rather than a broken card later.
1062
+ */
1063
+ export interface BlogCreateRequest {
1064
+ active?: boolean;
1065
+ /** Owning chat bot id (UUID). */
1066
+ chat_bot_id: string;
1067
+ description?: string | null;
1068
+ /** Lower sorts first; ties break newest-first. */
1069
+ display_order?: number;
1070
+ image_url?: string | null;
1071
+ paths?: Array<string>;
1072
+ surface?: ("external" | "internal") | null;
1073
+ title: string;
1074
+ url: string;
1075
+ }
1076
+
1077
+ /**
1078
+ * A URL to read Open Graph metadata from.
1079
+ *
1080
+ * Persists NOTHING. It fetches the page and returns its `og:title`,
1081
+ * `og:description` and `og:image` so a caller can pre-fill an article card
1082
+ * instead of typing it - which is why it is tiered a read despite the verb.
1083
+ */
1084
+ export interface BlogMetadataRequest {
1085
+ /** Page to read og:title / og:description / og:image from. */
1086
+ url: string;
1087
+ }
1088
+
1089
+ /** Partial edit of an article card. `chat_bot_id` locates the row. */
1090
+ export interface BlogUpdateRequest {
1091
+ active?: boolean | null;
1092
+ /** Owning chat bot id (UUID). */
1093
+ chat_bot_id: string;
1094
+ description?: string | null;
1095
+ display_order?: number | null;
1096
+ expected_revision?: number | null;
1097
+ image_url?: string | null;
1098
+ paths?: Array<string> | null;
1099
+ surface?: ("external" | "internal") | null;
1100
+ title?: string | null;
1101
+ url?: string | null;
1102
+ }
1103
+
1104
+ /**
1105
+ * A quick-action button in the widget.
1106
+ *
1107
+ * `value` means something different per `action`: a URL for `link`, the
1108
+ * question text for `question`, a calendar slug for `calendar`. Sending the
1109
+ * wrong kind is accepted here and fails at the widget, so it is spelled out
1110
+ * rather than left to be discovered.
1111
+ */
1112
+ export interface ButtonCreateRequest {
1113
+ action: "link" | "question" | "calendar";
1114
+ active?: boolean;
1115
+ category: string;
1116
+ /** Owning chat bot id (UUID). */
1117
+ chat_bot_id: string;
1118
+ icon?: string | null;
1119
+ label: string;
1120
+ /** URL paths where the button appears. */
1121
+ paths?: Array<string>;
1122
+ /** NULL shows it on BOTH widgets. */
1123
+ surface?: ("external" | "internal") | null;
1124
+ /** URL for `link`, question text for `question`, slug for `calendar`. */
1125
+ value: string;
1126
+ }
1127
+
1128
+ /** Partial edit of a button. `chat_bot_id` locates the row. */
1129
+ export interface ButtonUpdateRequest {
1130
+ action?: ("link" | "question" | "calendar") | null;
1131
+ active?: boolean | null;
1132
+ category?: string | null;
1133
+ /** Owning chat bot id (UUID). */
1134
+ chat_bot_id: string;
1135
+ expected_revision?: number | null;
1136
+ icon?: string | null;
1137
+ label?: string | null;
1138
+ paths?: Array<string> | null;
1139
+ surface?: ("external" | "internal") | null;
1140
+ value?: string | null;
1141
+ }
1142
+
1143
+ /**
1144
+ * A new chat bot.
1145
+ *
1146
+ * An org can run several. `chat_bot_id` is REQUIRED on almost every other
1147
+ * call on this surface because the same org's agents, buttons, questions,
1148
+ * blogs and theme are all per-bot - so create one of these first, or read the
1149
+ * org's existing bots from `GET /webchat/chat-bots`.
1150
+ */
1151
+ export interface ChatBotCreateRequest {
1152
+ /** Optional voice/text agent id used to seed the new bot's external chat agent. When omitted, no agent row is created. */
1153
+ agent_id?: string | null;
1154
+ /** Display name of the selected agent. Stored on the agent row so the widget shows the AGENT's name, not the bot's. Falls back to the bot name when omitted. */
1155
+ agent_name?: string | null;
1156
+ name: string;
1157
+ }
1158
+
1159
+ /**
1160
+ * Rename a chat bot.
1161
+ *
1162
+ * `name` is REQUIRED even though this is a PATCH - it is the only mutable
1163
+ * field, and the app's model requires it. `expected_revision` is the
1164
+ * optimistic-concurrency check: send the revision you read, and a concurrent
1165
+ * edit comes back 409 rather than silently overwriting.
1166
+ */
1167
+ export interface ChatBotUpdateRequest {
1168
+ /** Revision you last read. Omit to overwrite unconditionally. */
1169
+ expected_revision?: number | null;
1170
+ name: string;
1171
+ }
1172
+
1173
+ /** Unread launcher-badge colors (hex-validated). */
1174
+ export interface DesignTokenBadge {
1175
+ background?: string | null;
1176
+ text?: string | null;
1177
+ }
1178
+
1179
+ /**
1180
+ * Color slots consumed by the widget's --wcw-* CSS var vocabulary.
1181
+ *
1182
+ * LIGHT-mode and mode-invariant leaves ONLY. Per-mode dark variants live on the
1183
+ * sibling ``DesignTokenColorsDark`` group (``designTokens.colorsDark``), NOT as
1184
+ * ``*Dark`` twins here (Phase G). The ``@field_validator("*")`` hex guard below
1185
+ * is exactly WHY the dark palette must be a sibling group rather than a nested
1186
+ * ``colors.dark`` object — a nested dict would be fed to ``_require_hex_color``
1187
+ * and 422 the save (the same force that made ``DesignTokenHeader`` separate).
1188
+ * A legacy stored ``colors.<name>Dark`` leaf is lifted into ``colorsDark`` at
1189
+ * parse time by ``DesignTokens._lift_legacy_dark_leaves`` — no data migration.
1190
+ */
1191
+ export interface DesignTokenColors {
1192
+ /** Quick-action card bg (light) */
1193
+ actionCardBg?: string | null;
1194
+ /** Quick-action card border (light) */
1195
+ actionCardBorder?: string | null;
1196
+ /** Quick-action icon-circle tint (light) */
1197
+ actionCardIconTint?: string | null;
1198
+ /** Quick-action card label (light) */
1199
+ actionCardText?: string | null;
1200
+ /** Human-agent bubble bg (light) */
1201
+ agentBubbleBg?: string | null;
1202
+ /** Human-agent bubble border (light) */
1203
+ agentBubbleBorder?: string | null;
1204
+ /** Human-agent bubble text (light) */
1205
+ agentBubbleText?: string | null;
1206
+ /** Ask-a-question card bg (light) */
1207
+ askCardBg?: string | null;
1208
+ /** Ask-a-question card border (light) */
1209
+ askCardBorder?: string | null;
1210
+ /** Ask-a-question card text (light) */
1211
+ askCardText?: string | null;
1212
+ border?: string | null;
1213
+ bubbleAssistantBg?: string | null;
1214
+ bubbleAssistantText?: string | null;
1215
+ bubbleUserBg?: string | null;
1216
+ bubbleUserText?: string | null;
1217
+ headerGradientFrom?: string | null;
1218
+ headerGradientTo?: string | null;
1219
+ /** Home hero greeting text */
1220
+ heroText?: string | null;
1221
+ /** Home hero subtitle text */
1222
+ heroTextMuted?: string | null;
1223
+ launcherBg?: string | null;
1224
+ launcherIcon?: string | null;
1225
+ link?: string | null;
1226
+ /** Messages search bar bg (light) */
1227
+ messagesSearchBg?: string | null;
1228
+ /** Messages search bar border (opt-in) */
1229
+ messagesSearchBorder?: string | null;
1230
+ /** Messages search text (light) */
1231
+ messagesSearchText?: string | null;
1232
+ /** Messages screen title text */
1233
+ messagesTitleText?: string | null;
1234
+ /** Composer send-button bg */
1235
+ sendButtonBg?: string | null;
1236
+ /** Composer send-button icon */
1237
+ sendButtonIcon?: string | null;
1238
+ /** Slot-picker chip bg (light) */
1239
+ slotChipBg?: string | null;
1240
+ /** Slot-picker chip hover bg (light) */
1241
+ slotChipHoverBg?: string | null;
1242
+ /** Slot-picker chip hover border (light) */
1243
+ slotChipHoverBorder?: string | null;
1244
+ /** Slot-picker chip text (light) */
1245
+ slotChipText?: string | null;
1246
+ /** Widget body bg (light) */
1247
+ surface?: string | null;
1248
+ textPrimary?: string | null;
1249
+ textSecondary?: string | null;
1250
+ /** Typing-indicator dot (light) */
1251
+ typingDot?: string | null;
1252
+ }
1253
+
1254
+ /**
1255
+ * Per-mode DARK colour overrides (``designTokens.colorsDark``, Phase G).
1256
+ *
1257
+ * A sibling of ``DesignTokenColors`` holding the dark variant of every colour
1258
+ * leaf that renders differently in dark mode. ABSENT ⇒ the widget renders
1259
+ * exactly as it did before this group existed (the dark literal, or — for a
1260
+ * leaf an org set in ``colors`` and that historically painted both modes — that
1261
+ * ``colors`` value). Only leaves with a genuine dark render path live here; a
1262
+ * mode-invariant leaf (launcher, header gradient, send button, hero) has no
1263
+ * entry, so no dead tokens are introduced.
1264
+ *
1265
+ * Field names carry NO ``Dark`` suffix — the group is the mode. The 13 leaves
1266
+ * that previously lived as ``colors.<name>Dark`` twins were migrated here; the
1267
+ * upconverter on ``DesignTokens`` lifts any legacy value so no row regresses.
1268
+ */
1269
+ export interface DesignTokenColorsDark {
1270
+ /** Quick-action card bg (dark) */
1271
+ actionCardBg?: string | null;
1272
+ /** Quick-action card border (dark) */
1273
+ actionCardBorder?: string | null;
1274
+ /** Quick-action icon-circle tint (dark) */
1275
+ actionCardIconTint?: string | null;
1276
+ /** Quick-action card label (dark) */
1277
+ actionCardText?: string | null;
1278
+ /** Human-agent bubble bg (dark) */
1279
+ agentBubbleBg?: string | null;
1280
+ /** Human-agent bubble border (dark) */
1281
+ agentBubbleBorder?: string | null;
1282
+ /** Human-agent bubble text (dark) */
1283
+ agentBubbleText?: string | null;
1284
+ /** Ask-a-question card bg (dark) */
1285
+ askCardBg?: string | null;
1286
+ /** Ask-a-question card border (dark) */
1287
+ askCardBorder?: string | null;
1288
+ /** Ask-a-question card text (dark) */
1289
+ askCardText?: string | null;
1290
+ /** Borders & dividers (dark) */
1291
+ border?: string | null;
1292
+ /** Bot bubble bg (dark) */
1293
+ bubbleAssistantBg?: string | null;
1294
+ /** Bot bubble text (dark) */
1295
+ bubbleAssistantText?: string | null;
1296
+ /** Composer emoji-popover bg (dark) */
1297
+ composerPopoverBg?: string | null;
1298
+ /** Composer emoji-popover border (dark) */
1299
+ composerPopoverBorder?: string | null;
1300
+ /** Messages search bar bg (dark) */
1301
+ messagesSearchBg?: string | null;
1302
+ /** Messages search text (dark) */
1303
+ messagesSearchText?: string | null;
1304
+ /** Slot-picker chip bg (dark) */
1305
+ slotChipBg?: string | null;
1306
+ /** Slot-picker chip hover bg (dark) */
1307
+ slotChipHoverBg?: string | null;
1308
+ /** Slot-picker chip hover border (dark) */
1309
+ slotChipHoverBorder?: string | null;
1310
+ /** Slot-picker chip text (dark) */
1311
+ slotChipText?: string | null;
1312
+ /** Widget body bg (dark) */
1313
+ surface?: string | null;
1314
+ /** Message text (dark) */
1315
+ textPrimary?: string | null;
1316
+ /** Timestamps & meta text (dark) */
1317
+ textSecondary?: string | null;
1318
+ /** Typing-indicator dot (dark) */
1319
+ typingDot?: string | null;
1320
+ }
1321
+
1322
+ /**
1323
+ * RFC Phase E4 — launcher / panel / badge / chip geometry, CLAMPED.
1324
+ *
1325
+ * The most locked-down group in the model, because `chat-script` injects these
1326
+ * into the CUSTOMER's page rather than into the widget iframe (RFC §17.1).
1327
+ * Unclamped geometry on a host page is a defacement vector, so every leaf is
1328
+ * whole-pixel-only and range-bounded — see `_require_px_in_range`.
1329
+ *
1330
+ * Ranges for `launcherSize` / `launcherOffset*` are INHERITED from the ratified
1331
+ * product decision (RFC §19 decision 4: "launcher geometry in scope with
1332
+ * clamped ranges — size ~36-64px, offsets ~8-48px"), not invented here.
1333
+ *
1334
+ * Widget COLLAPSED WIDTH is deliberately absent: it is already plumbed as the
1335
+ * flat `chatWidth` column and read at runtime by the deployed bundle, so a
1336
+ * token would be a second writer for one property.
1337
+ *
1338
+ * ── TWO CLAMPS ARE ONE-DIRECTIONAL (max pinned at today's value) ────────────
1339
+ * `widgetWidthExpanded` (max 640) and `launcherOffsetX` (max 20) may only ever
1340
+ * SHRINK. This is not conservatism, it is a live constraint:
1341
+ *
1342
+ * The expanded panel needs a `widgetWidthExpanded + launcherOffsetX` viewport
1343
+ * to fit, but the mobile veto that hides the expand control is the hardcoded
1344
+ * `MOBILE_BREAKPOINT_PX = 560` (`chat-script/src/components/container.ts`,
1345
+ * mirrored as a literal `@media (max-width: 560px)` in `styles.ts`). Today's
1346
+ * 640 + 20 = 660 already exceeds it, so viewports 561-659px ALREADY render an
1347
+ * overflowing panel — a pre-existing defect (GH #12173). Letting either value
1348
+ * GROW would widen that band onto more real devices.
1349
+ *
1350
+ * A media-query CONDITION cannot read a custom property, so the guard cannot be
1351
+ * derived the way the panel's `bottom` is; correcting it means making
1352
+ * `MOBILE_BREAKPOINT_PX` config-derived across `container.ts` + `expand.ts` +
1353
+ * the emitted media query. That is GH #12173, and it is what lifts these two
1354
+ * ceilings. Until it lands, 640 and 20 are load-bearing — do not raise them.
1355
+ *
1356
+ * THE RULE, so it is applied correctly next time: an axis needs a
1357
+ * one-directional clamp exactly when it has NO viewport clamp. The horizontal
1358
+ * axis has none. The vertical axis has `calc(100dvh - 140px)`, and the worst
1359
+ * case under these ranges is `launcherOffsetY(48) + launcherSize(64) + gap(11)
1360
+ * = 123px`, which stays inside that 140px reserve with 17px to spare at every
1361
+ * viewport height — which is why `launcherOffsetY`, `launcherSize`, `badgeSize`
1362
+ * and `chipGap` are free to grow. Any future range change must preserve
1363
+ * `launcherOffsetY + launcherSize + 11 <= 140`.
1364
+ */
1365
+ export interface DesignTokenGeometry {
1366
+ badgeSize?: string | null;
1367
+ chipGap?: string | null;
1368
+ launcherOffsetX?: string | null;
1369
+ launcherOffsetY?: string | null;
1370
+ launcherSize?: string | null;
1371
+ widgetHeight?: string | null;
1372
+ widgetHeightExpanded?: string | null;
1373
+ widgetWidthExpanded?: string | null;
1374
+ }
1375
+
1376
+ /**
1377
+ * How the header surface is painted — mode + gradient blend point.
1378
+ *
1379
+ * A SEPARATE group, not new `DesignTokenColors` slots, and that is forced:
1380
+ * `DesignTokenColors` hex-validates EVERY field (`@field_validator("*")`), so a
1381
+ * `"solid"` mode or a numeric stop there would 422 the whole save.
1382
+ *
1383
+ * Both leaves are ABSENT by default and absence is meaningful — it means
1384
+ * "render exactly as this org rendered before this group existed":
1385
+ *
1386
+ * * ``mode`` absent -> gradient (today's only behaviour).
1387
+ * * ``fromStop`` absent -> no interpolation hint is emitted at all, so the CSS
1388
+ * is byte-identical to the legacy string (see `buildWidgetCssVars`). The
1389
+ * 50/50 default is therefore expressed as ABSENCE, never as a written 50 —
1390
+ * existing rows keep rendering without relying on hint-equivalence.
1391
+ */
1392
+ export interface DesignTokenHeader {
1393
+ angle?: number | null;
1394
+ fromStop?: number | null;
1395
+ mode?: ("solid" | "gradient") | null;
1396
+ }
1397
+
1398
+ /** Composer input surface colors (hex-validated). */
1399
+ export interface DesignTokenInput {
1400
+ background?: string | null;
1401
+ borderColor?: string | null;
1402
+ focusBorderColor?: string | null;
1403
+ }
1404
+
1405
+ /** Interaction motion — one duration (<time>) + one timing-function. */
1406
+ export interface DesignTokenMotion {
1407
+ duration?: string | null;
1408
+ easing?: string | null;
1409
+ }
1410
+
1411
+ /** Border-radius slots (CSS dimensions; launcher is typically 50%). */
1412
+ export interface DesignTokenRadius {
1413
+ bubble?: string | null;
1414
+ control?: string | null;
1415
+ input?: string | null;
1416
+ launcher?: string | null;
1417
+ widget?: string | null;
1418
+ }
1419
+
1420
+ /** box-shadow slots — charset-restricted, see _require_css_shadow. */
1421
+ export interface DesignTokenShadows {
1422
+ bubble?: string | null;
1423
+ launcher?: string | null;
1424
+ launcherHover?: string | null;
1425
+ suggested?: string | null;
1426
+ widget?: string | null;
1427
+ }
1428
+
1429
+ /** Spacing slots — padding shorthand (1-4 dims) and single-dim gaps. */
1430
+ export interface DesignTokenSpacing {
1431
+ bubblePadding?: string | null;
1432
+ sectionGap?: string | null;
1433
+ }
1434
+
1435
+ /**
1436
+ * RFC Phase E3 — interaction transform SCALES (unitless multipliers).
1437
+ *
1438
+ * Motion *timing* (duration + easing) already shipped as `DesignTokenMotion`;
1439
+ * this is the other half of E3. Every leaf is optional and absence means "the
1440
+ * literal `chat-script/src/styles.ts` ships today", so `transform` absent =
1441
+ * byte-identical rendering.
1442
+ *
1443
+ * Each leaf carries its OWN range because the ranges are semantic, not
1444
+ * cosmetic: a "grow" interaction above ~1.2 reads as a glitch rather than
1445
+ * feedback, and a "press" interaction must stay at or below 1.0 or the element
1446
+ * grows when pushed.
1447
+ *
1448
+ * Rotation is deliberately NOT here. RFC §16 scopes E3 to *scales*, and the
1449
+ * launcher's icon swap uses a ±90deg PAIR that must stay symmetric — one leaf
1450
+ * would invite an asymmetric swap, two would invite a broken one.
1451
+ */
1452
+ export interface DesignTokenTransform {
1453
+ chipActive?: string | null;
1454
+ chipHover?: string | null;
1455
+ launcherActive?: string | null;
1456
+ launcherHover?: string | null;
1457
+ rippleFrom?: string | null;
1458
+ rippleTo?: string | null;
1459
+ windowEnter?: string | null;
1460
+ }
1461
+
1462
+ /** Font family / weights. fontUrl is an optional CSS URL (Google Fonts css2). */
1463
+ export interface DesignTokenTypography {
1464
+ bodyWeight?: number | null;
1465
+ fontFamily?: string | null;
1466
+ fontSize?: string | null;
1467
+ fontUrl?: string | null;
1468
+ headingWeight?: number | null;
1469
+ letterSpacing?: string | null;
1470
+ lineHeight?: string | null;
1471
+ }
1472
+
1473
+ /**
1474
+ * Extended widget theme tokens stored in chat_widget_settings.designTokens.
1475
+ *
1476
+ * Shape is the shared FE/BE contract — the TypeScript twin lives in
1477
+ * frontend/features/webchat/widget-preview/chat-design-settings.ts.
1478
+ */
1479
+ export interface DesignTokens {
1480
+ badge?: DesignTokenBadge | null;
1481
+ colors?: DesignTokenColors | null;
1482
+ colorsDark?: DesignTokenColorsDark | null;
1483
+ geometry?: DesignTokenGeometry | null;
1484
+ header?: DesignTokenHeader | null;
1485
+ input?: DesignTokenInput | null;
1486
+ motion?: DesignTokenMotion | null;
1487
+ radius?: DesignTokenRadius | null;
1488
+ shadows?: DesignTokenShadows | null;
1489
+ spacing?: DesignTokenSpacing | null;
1490
+ transform?: DesignTokenTransform | null;
1491
+ typography?: DesignTokenTypography | null;
1492
+ version?: number;
1493
+ }
1494
+
1495
+ /** The COMPLETE new bot scope. Empty list = every bot; bots left out are dropped. */
1496
+ export interface HandoffPoolScopeRequest {
1497
+ chat_bot_ids?: Array<string>;
1498
+ }
1499
+
1500
+ /** Teams to add to the handoff pool. Same bot-scoping rules as people. */
1501
+ export interface HandoffPoolTeamsRequest {
1502
+ chat_bot_ids?: Array<string>;
1503
+ pool?: "external" | "internal";
1504
+ team_ids: Array<string>;
1505
+ }
1506
+
1507
+ /**
1508
+ * People to add to the handoff pool.
1509
+ *
1510
+ * `chat_bot_ids` empty means EVERY bot. Non-empty is valid only for the
1511
+ * `external` pool - the internal pool is not per-bot, and the app refuses
1512
+ * the combination with a 422. Both lists are capped at 200 by the app to
1513
+ * bound the per-person-per-bot rows one call can write.
1514
+ */
1515
+ export interface HandoffPoolUsersRequest {
1516
+ chat_bot_ids?: Array<string>;
1517
+ pool?: "external" | "internal";
1518
+ user_ids: Array<string>;
1519
+ }
1520
+
1521
+ /**
1522
+ * When a human is available to take a handed-off conversation.
1523
+ *
1524
+ * THIS IS WHAT DECIDES WHETHER A VISITOR IS OFFERED A PERSON. Turning it on
1525
+ * with no reachable interval is worse than leaving it off: the widget offers
1526
+ * a handover nobody answers. The app refuses the unreachable shapes; this
1527
+ * forwards its answer.
1528
+ *
1529
+ * `intervals` and `overrides` use the app's own window models, which reject a
1530
+ * zero-length window and refuse overlapping ones - see the module docstring.
1531
+ */
1532
+ export interface HumanAvailabilityRequest {
1533
+ /** Bot this schedule applies to. NULL is the org default. */
1534
+ chat_bot_id?: string | null;
1535
+ enabled?: boolean;
1536
+ /** Weekly windows: `{day: 0-6, start: 'HH:MM', end: 'HH:MM'}`. */
1537
+ intervals?: Array<AvailabilityInterval>;
1538
+ /** Date overrides: `{date: 'YYYY-MM-DD', intervals: [...]}`. */
1539
+ overrides?: Array<AvailabilityOverride>;
1540
+ surface?: ("external" | "internal") | null;
1541
+ /** IANA zone the intervals are expressed in. */
1542
+ timezone?: string;
1543
+ }
1544
+
1545
+ export interface PaginationMeta {
1546
+ /** Whether there are more pages */
1547
+ has_next: boolean;
1548
+ /** Items per page */
1549
+ limit: number;
1550
+ /** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
1551
+ next_cursor?: string | null;
1552
+ /** Current page number (1-indexed) */
1553
+ page: number;
1554
+ /** Total number of items */
1555
+ total: number;
1556
+ }
1557
+
1558
+ /**
1559
+ * A preset question the widget offers.
1560
+ *
1561
+ * `placements` NULL or empty means ALL placements, not none - the app treats
1562
+ * the absent case as unrestricted, and reading it the other way would hide
1563
+ * every question a caller created without naming one.
1564
+ */
1565
+ export interface QuestionCreateRequest {
1566
+ active?: boolean;
1567
+ category?: string | null;
1568
+ /** Owning chat bot id (UUID). */
1569
+ chat_bot_id: string;
1570
+ paths?: Array<string>;
1571
+ /** NULL or [] means every placement. */
1572
+ placements?: (Array<"launcher" | "home" | "conversation">) | null;
1573
+ question: string;
1574
+ /** Order within a placement. NULL sorts last. */
1575
+ sort_order?: number | null;
1576
+ /** NULL shows it on BOTH widgets. */
1577
+ surface?: ("external" | "internal") | null;
1578
+ }
1579
+
1580
+ /** Partial edit of a preset question. `chat_bot_id` locates the row. */
1581
+ export interface QuestionUpdateRequest {
1582
+ active?: boolean | null;
1583
+ category?: string | null;
1584
+ /** Owning chat bot id (UUID). */
1585
+ chat_bot_id: string;
1586
+ expected_revision?: number | null;
1587
+ paths?: Array<string> | null;
1588
+ placements?: (Array<"launcher" | "home" | "conversation">) | null;
1589
+ question?: string | null;
1590
+ sort_order?: number | null;
1591
+ surface?: ("external" | "internal") | null;
1592
+ }
1593
+
1594
+ /**
1595
+ * The widget's whole appearance and behaviour, for one bot and surface.
1596
+ *
1597
+ * Every colour is validated as a hex value, every dimension as a CSS length,
1598
+ * and two MODEL-level guards reject an illegible text/background pair and an
1599
+ * absurd design-token magnitude. All of those live in the app's model, which
1600
+ * is what this mirrors - see the module docstring on why `designTokens` is
1601
+ * imported rather than re-declared.
1602
+ *
1603
+ * ONE SETTINGS ROW PER (bot, surface). Creating a second is a 409, not a
1604
+ * second row; use `PATCH /webchat/settings` to change one that exists.
1605
+ */
1606
+ export interface SettingsCreateRequest {
1607
+ assistantMessageBgColor?: string;
1608
+ assistantMessageTextColor?: string;
1609
+ assistantName?: string;
1610
+ borderRadius?: string;
1611
+ botAvatarCustomUrl?: string | null;
1612
+ botAvatarMode?: "agent" | "preset" | "custom";
1613
+ botAvatarPresetUrl?: string | null;
1614
+ botIconType?: string;
1615
+ chatWidth?: string;
1616
+ /** Owning chat bot id (UUID). */
1617
+ chat_bot_id: string;
1618
+ copyOverrides?: Record<string, string> | null;
1619
+ darkMode?: boolean;
1620
+ /** Design-token tree. The app's own model, so the magnitude guard runs here rather than inside the proxy. */
1621
+ designTokens?: DesignTokens | null;
1622
+ fontFamily?: string;
1623
+ fontSize?: string;
1624
+ headerImageUrlExternal?: string | null;
1625
+ headerImageUrlInternal?: string | null;
1626
+ headerTextColor?: string;
1627
+ primaryColor?: string;
1628
+ robotIconColor?: string;
1629
+ robotIconType?: string;
1630
+ secondaryColor?: string;
1631
+ showHeader?: boolean;
1632
+ showQuickActions?: boolean;
1633
+ showSuggestedQuestions?: boolean;
1634
+ suggestedQuestionsBgColor?: string;
1635
+ suggestedQuestionsSectionBgColor?: string;
1636
+ /** Which widget this theme applies to. Omitted means `external`. `internal` is graph8's own support widget and is refused for any other org. */
1637
+ surface?: ("external" | "internal") | null;
1638
+ themeSource?: "default" | "brand_kit" | "custom";
1639
+ userMessageBgColor?: string;
1640
+ userMessageTextColor?: string;
1641
+ }
1642
+
1643
+ /**
1644
+ * Partial edit of the widget theme. An unset field is left untouched.
1645
+ *
1646
+ * `themeOverridesRemove` is the only way to DELETE a token override rather
1647
+ * than set it to something - sending `null` for a token would be "unset in
1648
+ * this request", which the partial-update rule reads as "leave it alone".
1649
+ */
1650
+ export interface SettingsUpdateRequest {
1651
+ assistantMessageBgColor?: string | null;
1652
+ assistantMessageTextColor?: string | null;
1653
+ assistantName?: string | null;
1654
+ borderRadius?: string | null;
1655
+ botAvatarCustomUrl?: string | null;
1656
+ botAvatarMode?: ("agent" | "preset" | "custom") | null;
1657
+ botAvatarPresetUrl?: string | null;
1658
+ botIconType?: string | null;
1659
+ chatWidth?: string | null;
1660
+ /** Owning chat bot id (UUID). */
1661
+ chat_bot_id: string;
1662
+ conversationQuestionLimit?: number | null;
1663
+ conversationQuestionsAfterFirstMessage?: ("hide" | "remain" | "collapse") | null;
1664
+ copyOverrides?: Record<string, string> | null;
1665
+ darkMode?: boolean | null;
1666
+ designTokens?: DesignTokens | null;
1667
+ expected_revision?: number | null;
1668
+ fontFamily?: string | null;
1669
+ fontSize?: string | null;
1670
+ headerImageUrlExternal?: string | null;
1671
+ headerImageUrlInternal?: string | null;
1672
+ headerTextColor?: string | null;
1673
+ homeQuestionLimit?: number | null;
1674
+ launcherQuestionLimit?: number | null;
1675
+ primaryColor?: string | null;
1676
+ robotIconColor?: string | null;
1677
+ robotIconType?: string | null;
1678
+ secondaryColor?: string | null;
1679
+ showHeader?: boolean | null;
1680
+ showQuickActions?: boolean | null;
1681
+ showSuggestedQuestions?: boolean | null;
1682
+ suggestedQuestionsBgColor?: string | null;
1683
+ suggestedQuestionsSectionBgColor?: string | null;
1684
+ surface?: ("external" | "internal") | null;
1685
+ /** Token paths to REMOVE. Unsetting a token is not the same as this. */
1686
+ themeOverridesRemove?: Array<string> | null;
1687
+ themeSource?: ("default" | "brand_kit" | "custom") | null;
1688
+ userMessageBgColor?: string | null;
1689
+ userMessageTextColor?: string | null;
1690
+ }
1691
+
1692
+ /** An open envelope for a LIST result, so a bare list keeps its shape. */
1693
+ export interface WebchatListPayload {
1694
+ items?: Array<unknown>;
1695
+ [key: string]: unknown;
1696
+ }
1697
+
1698
+ /**
1699
+ * An open envelope for one webchat object.
1700
+ *
1701
+ * Open because the widget's config grows a field per product decision and a
1702
+ * pinned schema would DROP it. Same choice the desk surface made.
1703
+ */
1704
+ export type WebchatPayload = Record<string, unknown>;