@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.
- package/README.md +9 -2
- package/dist/cli.js +216 -0
- package/dist/index.d.mts +104 -7
- package/dist/index.d.ts +104 -7
- package/dist/index.js +44 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +102 -7
- package/dist/react.d.ts +102 -7
- package/dist/react.js +62 -11
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +53 -12
- package/dist/react.mjs.map +1 -1
- package/dist/types/README.md +7 -0
- package/dist/types/agency.d.ts +20 -0
- package/dist/types/agentSetup.d.ts +57 -0
- package/dist/types/api.d.ts +127 -0
- package/dist/types/appClient.d.ts +99 -0
- package/dist/types/appPlatform.d.ts +269 -0
- package/dist/types/appTokens.d.ts +125 -0
- package/dist/types/apps.d.ts +130 -0
- package/dist/types/audiences.d.ts +88 -0
- package/dist/types/calendar.d.ts +55 -0
- package/dist/types/campaigns.d.ts +61 -0
- package/dist/types/chat.d.ts +35 -0
- package/dist/types/cli.d.ts +14 -0
- package/dist/types/companies.d.ts +123 -0
- package/dist/types/contacts.d.ts +200 -0
- package/dist/types/copilot.d.ts +31 -0
- package/dist/types/core.d.ts +1052 -0
- package/dist/types/deals.d.ts +215 -0
- package/dist/types/enrich.d.ts +51 -0
- package/dist/types/fields.d.ts +84 -0
- package/dist/types/forms.d.ts +16 -0
- package/dist/types/http.d.ts +141 -0
- package/dist/types/inbox.d.ts +123 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/intent.d.ts +196 -0
- package/dist/types/lists.d.ts +44 -0
- package/dist/types/mailboxes.d.ts +240 -0
- package/dist/types/marketplace.d.ts +62 -0
- package/dist/types/meetings.d.ts +70 -0
- package/dist/types/newsletter.d.ts +212 -0
- package/dist/types/notes.d.ts +57 -0
- package/dist/types/objects.d.ts +281 -0
- package/dist/types/pipelines.d.ts +135 -0
- package/dist/types/quotes.d.ts +143 -0
- package/dist/types/react.d.ts +978 -0
- package/dist/types/search.d.ts +99 -0
- package/dist/types/sequences.d.ts +255 -0
- package/dist/types/signals.d.ts +28 -0
- package/dist/types/skills.d.ts +176 -0
- package/dist/types/snippet.d.ts +24 -0
- package/dist/types/studio.d.ts +161 -0
- package/dist/types/tasks.d.ts +101 -0
- package/dist/types/types.d.ts +45 -0
- package/dist/types/utils.d.ts +21 -0
- package/dist/types/version.d.ts +10 -0
- package/dist/types/visitors.d.ts +29 -0
- package/dist/types/voice.d.ts +304 -0
- package/dist/types/webhooks.d.ts +71 -0
- package/dist/types/workflows.d.ts +229 -0
- package/docs/agents.md +748 -0
- package/docs/api/README.md +165 -0
- package/docs/api/accounts.d.ts +396 -0
- package/docs/api/accounts.md +644 -0
- package/docs/api/adCampaigns.d.ts +707 -0
- package/docs/api/adCampaigns.md +1091 -0
- package/docs/api/adCreatives.d.ts +996 -0
- package/docs/api/adCreatives.md +1708 -0
- package/docs/api/agency.d.ts +556 -0
- package/docs/api/agency.md +845 -0
- package/docs/api/agent.d.ts +330 -0
- package/docs/api/agent.md +514 -0
- package/docs/api/agents.d.ts +1622 -0
- package/docs/api/agents.md +2860 -0
- package/docs/api/aiInbox.d.ts +1984 -0
- package/docs/api/aiInbox.md +3490 -0
- package/docs/api/analytics.d.ts +1273 -0
- package/docs/api/analytics.md +2095 -0
- package/docs/api/apiKeys.d.ts +252 -0
- package/docs/api/apiKeys.md +318 -0
- package/docs/api/appDeployments.d.ts +236 -0
- package/docs/api/appDeployments.md +471 -0
- package/docs/api/appDomains.d.ts +171 -0
- package/docs/api/appDomains.md +281 -0
- package/docs/api/appLogs.d.ts +120 -0
- package/docs/api/appLogs.md +159 -0
- package/docs/api/appObjects.d.ts +415 -0
- package/docs/api/appObjects.md +568 -0
- package/docs/api/appPages.d.ts +557 -0
- package/docs/api/appPages.md +796 -0
- package/docs/api/appPlatformTokens.d.ts +123 -0
- package/docs/api/appPlatformTokens.md +172 -0
- package/docs/api/appointments.d.ts +2361 -0
- package/docs/api/appointments.md +3917 -0
- package/docs/api/apps.d.ts +822 -0
- package/docs/api/apps.md +1342 -0
- package/docs/api/assertUpsert.d.ts +286 -0
- package/docs/api/assertUpsert.md +370 -0
- package/docs/api/audienceSyncs.d.ts +259 -0
- package/docs/api/audienceSyncs.md +395 -0
- package/docs/api/brandKit.d.ts +686 -0
- package/docs/api/brandKit.md +1133 -0
- package/docs/api/bugReports.d.ts +181 -0
- package/docs/api/bugReports.md +268 -0
- package/docs/api/by-path.md +3260 -0
- package/docs/api/calendarInvites.d.ts +117 -0
- package/docs/api/calendarInvites.md +148 -0
- package/docs/api/campaignWorkflows.d.ts +152 -0
- package/docs/api/campaignWorkflows.md +200 -0
- package/docs/api/campaigns.d.ts +721 -0
- package/docs/api/campaigns.md +1236 -0
- package/docs/api/channels.d.ts +171 -0
- package/docs/api/channels.md +235 -0
- package/docs/api/cliCampaigns.d.ts +205 -0
- package/docs/api/cliCampaigns.md +256 -0
- package/docs/api/cliPipelines.d.ts +324 -0
- package/docs/api/cliPipelines.md +562 -0
- package/docs/api/clickHouse.d.ts +115 -0
- package/docs/api/clickHouse.md +138 -0
- package/docs/api/companies.d.ts +1636 -0
- package/docs/api/companies.md +2211 -0
- package/docs/api/companyIntelligence.d.ts +299 -0
- package/docs/api/companyIntelligence.md +488 -0
- package/docs/api/contacts.d.ts +2173 -0
- package/docs/api/contacts.md +3143 -0
- package/docs/api/content.d.ts +968 -0
- package/docs/api/content.md +1667 -0
- package/docs/api/contentGridSkills.d.ts +177 -0
- package/docs/api/contentGridSkills.md +271 -0
- package/docs/api/copilot.d.ts +1017 -0
- package/docs/api/copilot.md +1765 -0
- package/docs/api/crmSyncs.d.ts +215 -0
- package/docs/api/crmSyncs.md +301 -0
- package/docs/api/customerSuccess.d.ts +491 -0
- package/docs/api/customerSuccess.md +776 -0
- package/docs/api/deals.d.ts +1696 -0
- package/docs/api/deals.md +2432 -0
- package/docs/api/deliverability.d.ts +418 -0
- package/docs/api/deliverability.md +677 -0
- package/docs/api/desk.d.ts +1765 -0
- package/docs/api/desk.md +3007 -0
- package/docs/api/dialer.d.ts +1185 -0
- package/docs/api/dialer.md +2166 -0
- package/docs/api/dialerAnalytics.d.ts +187 -0
- package/docs/api/dialerAnalytics.md +257 -0
- package/docs/api/documents.d.ts +895 -0
- package/docs/api/documents.md +1440 -0
- package/docs/api/duplicates.d.ts +195 -0
- package/docs/api/duplicates.md +315 -0
- package/docs/api/eSign.d.ts +38 -0
- package/docs/api/eSign.md +54 -0
- package/docs/api/eSignature.d.ts +242 -0
- package/docs/api/eSignature.md +341 -0
- package/docs/api/enrichment.d.ts +3207 -0
- package/docs/api/enrichment.md +5225 -0
- package/docs/api/events.d.ts +115 -0
- package/docs/api/events.md +105 -0
- package/docs/api/fields.d.ts +482 -0
- package/docs/api/fields.md +566 -0
- package/docs/api/forms.d.ts +1012 -0
- package/docs/api/forms.md +1542 -0
- package/docs/api/gtmCampaigns.d.ts +662 -0
- package/docs/api/gtmCampaigns.md +1044 -0
- package/docs/api/gtmContext.d.ts +1187 -0
- package/docs/api/gtmContext.md +2112 -0
- package/docs/api/gtmDeliverability.d.ts +60 -0
- package/docs/api/gtmDeliverability.md +63 -0
- package/docs/api/gtmKnowledgeBase.d.ts +76 -0
- package/docs/api/gtmKnowledgeBase.md +91 -0
- package/docs/api/gtmLaunchHelpers.d.ts +123 -0
- package/docs/api/gtmLaunchHelpers.md +148 -0
- package/docs/api/gtmLibrary.d.ts +448 -0
- package/docs/api/gtmLibrary.md +780 -0
- package/docs/api/health.d.ts +39 -0
- package/docs/api/health.md +58 -0
- package/docs/api/imageLibrary.d.ts +341 -0
- package/docs/api/imageLibrary.md +569 -0
- package/docs/api/imports.d.ts +157 -0
- package/docs/api/imports.md +174 -0
- package/docs/api/inbox.d.ts +709 -0
- package/docs/api/inbox.md +1067 -0
- package/docs/api/install.d.ts +213 -0
- package/docs/api/install.md +317 -0
- package/docs/api/installedApps.d.ts +131 -0
- package/docs/api/installedApps.md +241 -0
- package/docs/api/integrationStatus.d.ts +142 -0
- package/docs/api/integrationStatus.md +205 -0
- package/docs/api/integrations.d.ts +2327 -0
- package/docs/api/integrations.md +3791 -0
- package/docs/api/intent.d.ts +482 -0
- package/docs/api/intent.md +858 -0
- package/docs/api/knowledge.d.ts +501 -0
- package/docs/api/knowledge.md +843 -0
- package/docs/api/knowledgeBase.d.ts +84 -0
- package/docs/api/knowledgeBase.md +96 -0
- package/docs/api/landingPages.d.ts +1411 -0
- package/docs/api/landingPages.md +2488 -0
- package/docs/api/leads.d.ts +133 -0
- package/docs/api/leads.md +180 -0
- package/docs/api/library.d.ts +217 -0
- package/docs/api/library.md +338 -0
- package/docs/api/linkedIn.d.ts +227 -0
- package/docs/api/linkedIn.md +289 -0
- package/docs/api/linkedInOutreach.d.ts +727 -0
- package/docs/api/linkedInOutreach.md +990 -0
- package/docs/api/lists.d.ts +1106 -0
- package/docs/api/lists.md +1609 -0
- package/docs/api/logs.d.ts +71 -0
- package/docs/api/logs.md +70 -0
- package/docs/api/mailboxes.d.ts +1050 -0
- package/docs/api/mailboxes.md +1690 -0
- package/docs/api/marketingIntelligence.d.ts +256 -0
- package/docs/api/marketingIntelligence.md +454 -0
- package/docs/api/marketplace.d.ts +3173 -0
- package/docs/api/marketplace.md +5953 -0
- package/docs/api/mcp.d.ts +69 -0
- package/docs/api/mcp.md +69 -0
- package/docs/api/me.d.ts +54 -0
- package/docs/api/me.md +56 -0
- package/docs/api/meetings.d.ts +539 -0
- package/docs/api/meetings.md +747 -0
- package/docs/api/newsletter.d.ts +1613 -0
- package/docs/api/newsletter.md +2746 -0
- package/docs/api/notes.d.ts +517 -0
- package/docs/api/notes.md +888 -0
- package/docs/api/notifications.d.ts +94 -0
- package/docs/api/notifications.md +105 -0
- package/docs/api/objects.d.ts +621 -0
- package/docs/api/objects.md +1098 -0
- package/docs/api/openSearch.d.ts +234 -0
- package/docs/api/openSearch.md +297 -0
- package/docs/api/ops.d.ts +299 -0
- package/docs/api/ops.md +339 -0
- package/docs/api/orgGovernance.d.ts +393 -0
- package/docs/api/orgGovernance.md +623 -0
- package/docs/api/orgVideos.d.ts +184 -0
- package/docs/api/orgVideos.md +252 -0
- package/docs/api/organizationSettings.d.ts +626 -0
- package/docs/api/organizationSettings.md +911 -0
- package/docs/api/phoneNumbers.d.ts +484 -0
- package/docs/api/phoneNumbers.md +777 -0
- package/docs/api/profile.d.ts +329 -0
- package/docs/api/profile.md +540 -0
- package/docs/api/programmaticPages.d.ts +400 -0
- package/docs/api/programmaticPages.md +626 -0
- package/docs/api/providerDomains.d.ts +866 -0
- package/docs/api/providerDomains.md +1446 -0
- package/docs/api/providerUsage.d.ts +129 -0
- package/docs/api/providerUsage.md +186 -0
- package/docs/api/public.d.ts +69 -0
- package/docs/api/public.md +78 -0
- package/docs/api/publicCopilot.d.ts +67 -0
- package/docs/api/publicCopilot.md +80 -0
- package/docs/api/publicSignals.d.ts +66 -0
- package/docs/api/publicSignals.md +71 -0
- package/docs/api/publicVisitors.d.ts +97 -0
- package/docs/api/publicVisitors.md +118 -0
- package/docs/api/quotes.d.ts +1564 -0
- package/docs/api/quotes.md +2553 -0
- package/docs/api/radar.d.ts +808 -0
- package/docs/api/radar.md +1431 -0
- package/docs/api/radarReports.d.ts +208 -0
- package/docs/api/radarReports.md +306 -0
- package/docs/api/recordRoles.d.ts +143 -0
- package/docs/api/recordRoles.md +175 -0
- package/docs/api/repos.d.ts +146 -0
- package/docs/api/repos.md +211 -0
- package/docs/api/research.d.ts +295 -0
- package/docs/api/research.md +534 -0
- package/docs/api/revenue.d.ts +402 -0
- package/docs/api/revenue.md +608 -0
- package/docs/api/revenueAnalytics.d.ts +147 -0
- package/docs/api/revenueAnalytics.md +212 -0
- package/docs/api/revenueLifecycle.d.ts +207 -0
- package/docs/api/revenueLifecycle.md +274 -0
- package/docs/api/revenueRecords.d.ts +372 -0
- package/docs/api/revenueRecords.md +563 -0
- package/docs/api/roles.d.ts +431 -0
- package/docs/api/roles.md +812 -0
- package/docs/api/salesCoach.d.ts +877 -0
- package/docs/api/salesCoach.md +1540 -0
- package/docs/api/sandbox.d.ts +210 -0
- package/docs/api/sandbox.md +380 -0
- package/docs/api/scans.d.ts +104 -0
- package/docs/api/scans.md +136 -0
- package/docs/api/scheduleBuy.d.ts +293 -0
- package/docs/api/scheduleBuy.md +431 -0
- package/docs/api/scraping.d.ts +266 -0
- package/docs/api/scraping.md +383 -0
- package/docs/api/sdrAnalytics.d.ts +138 -0
- package/docs/api/sdrAnalytics.md +246 -0
- package/docs/api/search.d.ts +598 -0
- package/docs/api/search.md +866 -0
- package/docs/api/seo.d.ts +447 -0
- package/docs/api/seo.md +660 -0
- package/docs/api/sequenceLifecycle.d.ts +439 -0
- package/docs/api/sequenceLifecycle.md +513 -0
- package/docs/api/sequences.d.ts +1936 -0
- package/docs/api/sequences.md +3232 -0
- package/docs/api/settings.d.ts +448 -0
- package/docs/api/settings.md +731 -0
- package/docs/api/signals.d.ts +1441 -0
- package/docs/api/signals.md +2526 -0
- package/docs/api/signatures.d.ts +719 -0
- package/docs/api/signatures.md +1247 -0
- package/docs/api/skills.d.ts +230 -0
- package/docs/api/skills.md +466 -0
- package/docs/api/snippet.d.ts +85 -0
- package/docs/api/snippet.md +106 -0
- package/docs/api/socialPublishing.d.ts +824 -0
- package/docs/api/socialPublishing.md +1245 -0
- package/docs/api/studioDocuments.d.ts +244 -0
- package/docs/api/studioDocuments.md +348 -0
- package/docs/api/support.d.ts +90 -0
- package/docs/api/support.md +76 -0
- package/docs/api/suppressions.d.ts +241 -0
- package/docs/api/suppressions.md +343 -0
- package/docs/api/surveys.d.ts +847 -0
- package/docs/api/surveys.md +1223 -0
- package/docs/api/tasks.d.ts +813 -0
- package/docs/api/tasks.md +1344 -0
- package/docs/api/teamMembers.d.ts +668 -0
- package/docs/api/teamMembers.md +1040 -0
- package/docs/api/teams.d.ts +784 -0
- package/docs/api/teams.md +1395 -0
- package/docs/api/usage.d.ts +277 -0
- package/docs/api/usage.md +389 -0
- package/docs/api/visitors.d.ts +690 -0
- package/docs/api/visitors.md +1075 -0
- package/docs/api/voice.d.ts +4661 -0
- package/docs/api/voice.md +7905 -0
- package/docs/api/webAnalytics.d.ts +964 -0
- package/docs/api/webAnalytics.md +1452 -0
- package/docs/api/webChat.d.ts +1704 -0
- package/docs/api/webChat.md +2048 -0
- package/docs/api/webhooks.d.ts +251 -0
- package/docs/api/webhooks.md +386 -0
- package/docs/api/websiteEditor.d.ts +324 -0
- package/docs/api/websiteEditor.md +517 -0
- package/docs/api/work.d.ts +2298 -0
- package/docs/api/work.md +3096 -0
- package/docs/api/workbench.d.ts +2962 -0
- package/docs/api/workbench.md +4884 -0
- package/docs/api/workflows.d.ts +1218 -0
- package/docs/api/workflows.md +2302 -0
- package/docs/sdk-clients.md +4339 -0
- package/package.json +10 -3
package/docs/api/desk.md
ADDED
|
@@ -0,0 +1,3007 @@
|
|
|
1
|
+
<!-- Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. -->
|
|
2
|
+
|
|
3
|
+
# `g8.api.desk`: Desk
|
|
4
|
+
|
|
5
|
+
71 operations (38 read, 15 write, 10 billable, 8 external).
|
|
6
|
+
|
|
7
|
+
No hand-written client covers this area. Call it through `g8.api.desk.*` as shown below, or by operationId with `g8.api.call(operationId, input)`.
|
|
8
|
+
|
|
9
|
+
Every example below assumes this setup (server-side, API key):
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { g8 } from "@graph8/sdk";
|
|
13
|
+
|
|
14
|
+
g8.init({ apiKey: process.env.G8_API_KEY! });
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Example values are placeholders that match each field's type. Only required fields are shown. Every example is type-checked against the SDK in CI.
|
|
18
|
+
|
|
19
|
+
Exact TypeScript types for every operation on this page, and every schema they use: [desk.d.ts](desk.d.ts).
|
|
20
|
+
|
|
21
|
+
## Operations
|
|
22
|
+
|
|
23
|
+
| Call | HTTP | Tier | Scope | Summary |
|
|
24
|
+
|---|---|---|---|---|
|
|
25
|
+
| [`applyAccountPlan`](#op-applyaccountplan) | `POST /api/v1/desk/accounts/{account_id}/plan/apply` | write | `deals:write` | Apply Account Plan |
|
|
26
|
+
| [`askDesk`](#op-askdesk) | `POST /api/v1/desk/ask` | billable | `deals:run` | Ask Desk |
|
|
27
|
+
| [`checkCommitteePlay`](#op-checkcommitteeplay) | `GET /api/v1/desk/accounts/{account_id}/committee/plays/{action_id}/check` | read | `deals:read` | Check Committee Play |
|
|
28
|
+
| [`checkDeskPlanStageSweep`](#op-checkdeskplanstagesweep) | `GET /api/v1/desk/org-settings/plan-stages/check` | read | `deals:read` | Check Desk Plan Stage Sweep |
|
|
29
|
+
| [`createOrReplanAccountPlan`](#op-createorreplanaccountplan) | `POST /api/v1/desk/accounts/{account_id}/plan` | write | `deals:write` | Create Or Replan Account Plan |
|
|
30
|
+
| [`decideDeskPlayApproval`](#op-decidedeskplayapproval) | `POST /api/v1/desk/plays/approvals/{execution_id}/decide` | external | `deals:run` | Decide Desk Play Approval |
|
|
31
|
+
| [`draftAccountPlan`](#op-draftaccountplan) | `POST /api/v1/desk/accounts/{account_id}/plan/draft` | billable | `deals:run` | Draft Account Plan |
|
|
32
|
+
| [`editAccountCommittee`](#op-editaccountcommittee) | `POST /api/v1/desk/accounts/{account_id}/committee` | write | `deals:write` | Edit Account Committee |
|
|
33
|
+
| [`findCommitteeMemberLinkedin`](#op-findcommitteememberlinkedin) | `POST /api/v1/desk/accounts/{account_id}/committee/{contact_id}/find-linkedin` | billable | `deals:run` | Find Committee Member Linkedin |
|
|
34
|
+
| [`getAccountContext`](#op-getaccountcontext) | `GET /api/v1/desk/accounts/{account_id}/context` | read | `deals:read` | Get Account Context |
|
|
35
|
+
| [`getAccountPlan`](#op-getaccountplan) | `GET /api/v1/desk/accounts/{account_id}/plan` | read | `deals:read` | Get Account Plan |
|
|
36
|
+
| [`getAccountPlanHistory`](#op-getaccountplanhistory) | `GET /api/v1/desk/accounts/{account_id}/plan/history` | read | `deals:read` | Get Account Plan History |
|
|
37
|
+
| [`getDeskAutonomy`](#op-getdeskautonomy) | `GET /api/v1/desk/autonomy` | read | `deals:read` | Get Desk Autonomy |
|
|
38
|
+
| [`getDeskBatch`](#op-getdeskbatch) | `GET /api/v1/desk/batch` | read | `deals:read` | Get Desk Batch |
|
|
39
|
+
| [`getDeskBlockQueue`](#op-getdeskblockqueue) | `GET /api/v1/desk/blocks/{list_id}/queue` | read | `deals:read` | Get Desk Block Queue |
|
|
40
|
+
| [`getDeskCallTarget`](#op-getdeskcalltarget) | `POST /api/v1/desk/decisions/{decision_id}/call-target` | read | `deals:read` | Get Desk Call Target |
|
|
41
|
+
| [`getDeskCommitteeHeat`](#op-getdeskcommitteeheat) | `GET /api/v1/desk/committee-heat` | read | `deals:read` | Get Desk Committee Heat |
|
|
42
|
+
| [`getDeskCommitteeTargets`](#op-getdeskcommitteetargets) | `GET /api/v1/desk/committee-targets` | read | `deals:read` | Get Desk Committee Targets |
|
|
43
|
+
| [`getDeskComplianceSummary`](#op-getdeskcompliancesummary) | `GET /api/v1/desk/compliance-summary` | read | `deals:read` | Get Desk Compliance Summary |
|
|
44
|
+
| [`getDeskContactCallTarget`](#op-getdeskcontactcalltarget) | `POST /api/v1/desk/contacts/{contact_id}/call-target` | read | `deals:read` | Get Desk Contact Call Target |
|
|
45
|
+
| [`getDeskCoverage`](#op-getdeskcoverage) | `GET /api/v1/desk/coverage` | read | `deals:read` | Get Desk Coverage |
|
|
46
|
+
| [`getDeskDecisionBrief`](#op-getdeskdecisionbrief) | `GET /api/v1/desk/decisions/{decision_id}/brief` | read | `deals:read` | Get Desk Decision Brief |
|
|
47
|
+
| [`getDeskDecisionCardContext`](#op-getdeskdecisioncardcontext) | `GET /api/v1/desk/decisions/{decision_id}/card-context` | read | `deals:read` | Get Desk Decision Card Context |
|
|
48
|
+
| [`getDeskDecisionConversation`](#op-getdeskdecisionconversation) | `GET /api/v1/desk/decisions/{decision_id}/conversation` | read | `deals:read` | Get Desk Decision Conversation |
|
|
49
|
+
| [`getDeskHomeSummary`](#op-getdeskhomesummary) | `GET /api/v1/desk/home-summary` | read | `deals:read` | Get Desk Home Summary |
|
|
50
|
+
| [`getDeskKickoff`](#op-getdeskkickoff) | `GET /api/v1/desk/kickoff` | billable | `deals:run` | Get Desk Kickoff |
|
|
51
|
+
| [`getDeskKickoffAudio`](#op-getdeskkickoffaudio) | `GET /api/v1/desk/kickoff/audio` | billable | `deals:run` | Get Desk Kickoff Audio |
|
|
52
|
+
| [`getDeskLinkedinSender`](#op-getdesklinkedinsender) | `GET /api/v1/desk/linkedin-sender` | read | `deals:read` | Get Desk Linkedin Sender |
|
|
53
|
+
| [`getDeskListGoals`](#op-getdesklistgoals) | `GET /api/v1/desk/list-goals` | read | `deals:read` | Get Desk List Goals |
|
|
54
|
+
| [`getDeskListGroupOverride`](#op-getdesklistgroupoverride) | `GET /api/v1/desk/list-group-override` | read | `deals:read` | Get Desk List Group Override |
|
|
55
|
+
| [`getDeskListPriority`](#op-getdesklistpriority) | `GET /api/v1/desk/list-priority` | read | `deals:read` | Get Desk List Priority |
|
|
56
|
+
| [`getDeskNextBest`](#op-getdesknextbest) | `GET /api/v1/desk/next-best` | read | `deals:read` | Get Desk Next Best |
|
|
57
|
+
| [`getDeskOrgSettings`](#op-getdeskorgsettings) | `GET /api/v1/desk/org-settings` | read | `deals:read` | Get Desk Org Settings |
|
|
58
|
+
| [`getDeskPlayExecution`](#op-getdeskplayexecution) | `GET /api/v1/desk/plays/executions/{execution_id}` | read | `deals:read` | Get Desk Play Execution |
|
|
59
|
+
| [`getDeskPulse`](#op-getdeskpulse) | `GET /api/v1/desk/pulse` | read | `deals:read` | Get Desk Pulse |
|
|
60
|
+
| [`getDeskReplyTarget`](#op-getdeskreplytarget) | `POST /api/v1/desk/decisions/{decision_id}/reply-target` | read | `deals:read` | Get Desk Reply Target |
|
|
61
|
+
| [`getDeskSmsTarget`](#op-getdesksmstarget) | `POST /api/v1/desk/decisions/{decision_id}/sms-target` | read | `deals:read` | Get Desk Sms Target |
|
|
62
|
+
| [`getDeskWrapped`](#op-getdeskwrapped) | `GET /api/v1/desk/wrapped` | read | `deals:read` | Get Desk Wrapped |
|
|
63
|
+
| [`improveDeskEmail`](#op-improvedeskemail) | `POST /api/v1/desk/email-improve` | billable | `deals:run` | Improve Desk Email |
|
|
64
|
+
| [`listAccountPlans`](#op-listaccountplans) | `GET /api/v1/desk/accounts/plans` | read | `deals:read` | List Account Plans |
|
|
65
|
+
| [`listCommitteePlays`](#op-listcommitteeplays) | `GET /api/v1/desk/accounts/{account_id}/committee/plays` | read | `deals:read` | List Committee Plays |
|
|
66
|
+
| [`listCompletedDeskDecisions`](#op-listcompleteddeskdecisions) | `GET /api/v1/desk/decisions/completed` | read | `deals:read` | List Completed Desk Decisions |
|
|
67
|
+
| [`listDeskBlocks`](#op-listdeskblocks) | `GET /api/v1/desk/blocks` | read | `deals:read` | List Desk Blocks |
|
|
68
|
+
| [`listDeskCardPlays`](#op-listdeskcardplays) | `GET /api/v1/desk/decisions/{decision_id}/plays` | read | `deals:read` | List Desk Card Plays |
|
|
69
|
+
| [`listDeskDecisions`](#op-listdeskdecisions) | `GET /api/v1/desk/decisions` | read | `deals:read` | List Desk Decisions |
|
|
70
|
+
| [`listDeskPlayApprovals`](#op-listdeskplayapprovals) | `GET /api/v1/desk/plays/approvals` | read | `deals:read` | List Desk Play Approvals |
|
|
71
|
+
| [`listDeskUpcoming`](#op-listdeskupcoming) | `GET /api/v1/desk/upcoming` | read | `deals:read` | List Desk Upcoming |
|
|
72
|
+
| [`markDeskKickoffPlayed`](#op-markdeskkickoffplayed) | `POST /api/v1/desk/kickoff/played` | write | `deals:write` | Mark Desk Kickoff Played |
|
|
73
|
+
| [`postDeskVoiceMemo`](#op-postdeskvoicememo) | `POST /api/v1/desk/voice-memo` | billable | `deals:run` | Post Desk Voice Memo |
|
|
74
|
+
| [`previewAccountPlan`](#op-previewaccountplan) | `POST /api/v1/desk/accounts/{account_id}/plan/preview` | read | `deals:read` | Preview Account Plan |
|
|
75
|
+
| [`pullDeskBatch`](#op-pulldeskbatch) | `POST /api/v1/desk/batch/pull` | write | `deals:write` | Pull Desk Batch |
|
|
76
|
+
| [`replanDeskDecision`](#op-replandeskdecision) | `POST /api/v1/desk/decisions/{decision_id}/replan` | billable | `deals:run` | Replan Desk Decision |
|
|
77
|
+
| [`resolveDeskDecision`](#op-resolvedeskdecision) | `POST /api/v1/desk/decisions/{decision_id}/resolve` | write | `deals:write` | Resolve Desk Decision |
|
|
78
|
+
| [`reviveDeskListGoal`](#op-revivedesklistgoal) | `POST /api/v1/desk/list-goals/{list_id}/revive` | write | `deals:write` | Revive Desk List Goal |
|
|
79
|
+
| [`runCommitteePlay`](#op-runcommitteeplay) | `POST /api/v1/desk/accounts/{account_id}/committee/plays/{action_id}/run` | external | `deals:run` | Run Committee Play |
|
|
80
|
+
| [`runDeskCardPlay`](#op-rundeskcardplay) | `POST /api/v1/desk/decisions/{decision_id}/plays/{action_id}/run` | external | `deals:run` | Run Desk Card Play |
|
|
81
|
+
| [`runDeskPlanStageSweep`](#op-rundeskplanstagesweep) | `POST /api/v1/desk/org-settings/plan-stages/run` | billable | `deals:run` | Run Desk Plan Stage Sweep |
|
|
82
|
+
| [`scoreDeskEmail`](#op-scoredeskemail) | `POST /api/v1/desk/email-score` | billable | `deals:run` | Score Desk Email |
|
|
83
|
+
| [`sendCommitteeLinkedinInvite`](#op-sendcommitteelinkedininvite) | `POST /api/v1/desk/accounts/{account_id}/committee/{contact_id}/linkedin-invite` | external | `deals:run` | Send Committee Linkedin Invite |
|
|
84
|
+
| [`sendDeskReply`](#op-senddeskreply) | `POST /api/v1/desk/decisions/{decision_id}/send-reply` | external | `deals:run` | Send Desk Reply |
|
|
85
|
+
| [`sendDeskSms`](#op-senddesksms) | `POST /api/v1/desk/decisions/{decision_id}/send-sms` | external | `deals:run` | Send Desk Sms |
|
|
86
|
+
| [`startDeskBatch`](#op-startdeskbatch) | `POST /api/v1/desk/batch/start` | write | `deals:write` | Start Desk Batch |
|
|
87
|
+
| [`undoDeskDecision`](#op-undodeskdecision) | `POST /api/v1/desk/decisions/{decision_id}/undo` | write | `deals:write` | Undo Desk Decision |
|
|
88
|
+
| [`unsnoozeDeskDecision`](#op-unsnoozedeskdecision) | `POST /api/v1/desk/decisions/{decision_id}/unsnooze` | write | `deals:write` | Unsnooze Desk Decision |
|
|
89
|
+
| [`updateAccountPlanStep`](#op-updateaccountplanstep) | `PUT /api/v1/desk/accounts/{account_id}/plan/steps/{step_id}` | write | `deals:write` | Update Account Plan Step |
|
|
90
|
+
| [`updateDeskAutonomy`](#op-updatedeskautonomy) | `PUT /api/v1/desk/autonomy` | external | `deals:run` | Update Desk Autonomy |
|
|
91
|
+
| [`updateDeskLinkedinSender`](#op-updatedesklinkedinsender) | `PUT /api/v1/desk/linkedin-sender` | write | `deals:write` | Update Desk Linkedin Sender |
|
|
92
|
+
| [`updateDeskListGoal`](#op-updatedesklistgoal) | `PUT /api/v1/desk/list-goals` | write | `deals:write` | Update Desk List Goal |
|
|
93
|
+
| [`updateDeskListGroupOverride`](#op-updatedesklistgroupoverride) | `PUT /api/v1/desk/list-group-override` | write | `deals:write` | Update Desk List Group Override |
|
|
94
|
+
| [`updateDeskListPriority`](#op-updatedesklistpriority) | `PUT /api/v1/desk/list-priority` | write | `deals:write` | Update Desk List Priority |
|
|
95
|
+
| [`updateDeskOrgSettings`](#op-updatedeskorgsettings) | `PUT /api/v1/desk/org-settings` | external | `deals:run` | Update Desk Org Settings |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
<a id="op-applyaccountplan"></a>
|
|
100
|
+
|
|
101
|
+
### `g8.api.desk.applyAccountPlan(input)`
|
|
102
|
+
|
|
103
|
+
**Apply Account Plan**
|
|
104
|
+
|
|
105
|
+
- HTTP: `POST /api/v1/desk/accounts/{account_id}/plan/apply`
|
|
106
|
+
- operationId: `apply_account_plan_desk_accounts__account_id__plan_apply_post` (also callable as `g8.api.call("apply_account_plan_desk_accounts__account_id__plan_apply_post", input)`)
|
|
107
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
108
|
+
- API-key scope: `deals:write`
|
|
109
|
+
|
|
110
|
+
Persist the approved steps as a NEW plan version, and return the diff.
|
|
111
|
+
|
|
112
|
+
`proposed_plan` must be non-empty. Apply REPLACES the account's steps, so
|
|
113
|
+
an empty proposal would blank an active plan; the app answers 400 rather
|
|
114
|
+
than doing it. Prior versions stay immutable and readable.
|
|
115
|
+
|
|
116
|
+
**Input**
|
|
117
|
+
|
|
118
|
+
| Field | Type | Required | Description |
|
|
119
|
+
|---|---|---|---|
|
|
120
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
121
|
+
| `body` | `AccountPlanApplyRequest` | yes | Request body; fields below. |
|
|
122
|
+
|
|
123
|
+
Body fields (`AccountPlanApplyRequest`):
|
|
124
|
+
|
|
125
|
+
| Field | Type | Required | Description |
|
|
126
|
+
|---|---|---|---|
|
|
127
|
+
| `body.instruction` | `string \| null` | no | |
|
|
128
|
+
| `body.proposed_plan` | `Array<AccountPlanStep>` | no | |
|
|
129
|
+
| `body.rationale` | `string \| null` | no | |
|
|
130
|
+
| `body.status` | `string \| null` | no | draft \| active \| paused \| archived. |
|
|
131
|
+
| `body.trigger` | `string` | no | What caused this (re)plan. default `"manual"` |
|
|
132
|
+
|
|
133
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
134
|
+
|
|
135
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
136
|
+
|
|
137
|
+
**Example**
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
const result = await g8.api.desk.applyAccountPlan({ path: { account_id: 1 }, body: {} });
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
<a id="op-askdesk"></a>
|
|
146
|
+
|
|
147
|
+
### `g8.api.desk.askDesk(input)`
|
|
148
|
+
|
|
149
|
+
**Ask Desk**
|
|
150
|
+
|
|
151
|
+
- HTTP: `POST /api/v1/desk/ask`
|
|
152
|
+
- operationId: `ask_desk_desk_ask_post` (also callable as `g8.api.call("ask_desk_desk_ask_post", input)`)
|
|
153
|
+
- Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
|
|
154
|
+
- API-key scope: `deals:run`
|
|
155
|
+
|
|
156
|
+
Ask a grounded question about a card or a deal.
|
|
157
|
+
|
|
158
|
+
FAIL-SOFT: with the org's `ai_briefs` switch off it returns a canned answer
|
|
159
|
+
and HTTP 200, not an error. A caller that needs to know whether it got a
|
|
160
|
+
real answer should look at the payload, not the status code.
|
|
161
|
+
|
|
162
|
+
**Input**
|
|
163
|
+
|
|
164
|
+
| Field | Type | Required | Description |
|
|
165
|
+
|---|---|---|---|
|
|
166
|
+
| `body` | `DeskAskRequest` | yes | Request body; fields below. |
|
|
167
|
+
|
|
168
|
+
Body fields (`DeskAskRequest`):
|
|
169
|
+
|
|
170
|
+
| Field | Type | Required | Description |
|
|
171
|
+
|---|---|---|---|
|
|
172
|
+
| `body.question` | `string` | yes | min length 1, max length 2000 |
|
|
173
|
+
| `body.deal_id` | `string \| null` | no | Ground the answer in this deal. max length 255 |
|
|
174
|
+
| `body.decision_id` | `string (uuid) \| null` | no | Ground the answer in this decision card. |
|
|
175
|
+
|
|
176
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
177
|
+
|
|
178
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
179
|
+
|
|
180
|
+
**Example**
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
// billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
|
|
184
|
+
const result = await g8.api.desk.askDesk({ body: { question: "example" } });
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
<a id="op-checkcommitteeplay"></a>
|
|
190
|
+
|
|
191
|
+
### `g8.api.desk.checkCommitteePlay(input)`
|
|
192
|
+
|
|
193
|
+
**Check Committee Play**
|
|
194
|
+
|
|
195
|
+
- HTTP: `GET /api/v1/desk/accounts/{account_id}/committee/plays/{action_id}/check`
|
|
196
|
+
- operationId: `check_committee_play_desk_accounts__account_id__committee_plays__action_id__check_get` (also callable as `g8.api.call("check_committee_play_desk_accounts__account_id__committee_plays__action_id__check_get", input)`)
|
|
197
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
198
|
+
- API-key scope: `deals:read`
|
|
199
|
+
|
|
200
|
+
What running this workflow at this committee would DO, in plain words.
|
|
201
|
+
|
|
202
|
+
Its effects, who it would run for, who it already ran for, and whether the
|
|
203
|
+
desk refuses it. Read-only; runs nothing and spends nothing. This is the
|
|
204
|
+
call to make before the run below.
|
|
205
|
+
|
|
206
|
+
**Input**
|
|
207
|
+
|
|
208
|
+
| Field | Type | Required | Description |
|
|
209
|
+
|---|---|---|---|
|
|
210
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
211
|
+
| `path.action_id` | `string` | yes | Play id, from `.../committee/plays`. |
|
|
212
|
+
|
|
213
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
214
|
+
|
|
215
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
216
|
+
|
|
217
|
+
**Example**
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
const result = await g8.api.desk.checkCommitteePlay({ path: { account_id: 1, action_id: "id" } });
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
<a id="op-checkdeskplanstagesweep"></a>
|
|
226
|
+
|
|
227
|
+
### `g8.api.desk.checkDeskPlanStageSweep(input?)`
|
|
228
|
+
|
|
229
|
+
**Check Desk Plan Stage Sweep**
|
|
230
|
+
|
|
231
|
+
- HTTP: `GET /api/v1/desk/org-settings/plan-stages/check`
|
|
232
|
+
- operationId: `check_desk_plan_stage_sweep_desk_org_settings_plan_stages_check_get` (also callable as `g8.api.call("check_desk_plan_stage_sweep_desk_org_settings_plan_stages_check_get", input)`)
|
|
233
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
234
|
+
- API-key scope: `deals:read`
|
|
235
|
+
|
|
236
|
+
How many open deals the sweep below WOULD plan, and why the rest not.
|
|
237
|
+
|
|
238
|
+
SPENDS NOTHING. A GET behind a write permission, which is the app's choice
|
|
239
|
+
and the right one: this exists to be read immediately before the charged
|
|
240
|
+
run, by the person allowed to fire it.
|
|
241
|
+
|
|
242
|
+
Read `cap`, `cap_exhausted` and `eligible` before running - they are what
|
|
243
|
+
tell you whether the press will do anything.
|
|
244
|
+
|
|
245
|
+
**Input**: none.
|
|
246
|
+
|
|
247
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
248
|
+
|
|
249
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
250
|
+
|
|
251
|
+
**Example**
|
|
252
|
+
|
|
253
|
+
```ts
|
|
254
|
+
const result = await g8.api.desk.checkDeskPlanStageSweep();
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
<a id="op-createorreplanaccountplan"></a>
|
|
260
|
+
|
|
261
|
+
### `g8.api.desk.createOrReplanAccountPlan(input)`
|
|
262
|
+
|
|
263
|
+
**Create Or Replan Account Plan**
|
|
264
|
+
|
|
265
|
+
- HTTP: `POST /api/v1/desk/accounts/{account_id}/plan`
|
|
266
|
+
- operationId: `create_or_replan_account_plan_desk_accounts__account_id__plan_post` (also callable as `g8.api.call("create_or_replan_account_plan_desk_accounts__account_id__plan_post", input)`)
|
|
267
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
268
|
+
- API-key scope: `deals:write`
|
|
269
|
+
|
|
270
|
+
Write this account's plan, from a plan the CALLER authored.
|
|
271
|
+
|
|
272
|
+
Create and replan are the same operation because a plan is versioned: this
|
|
273
|
+
inserts a new version and bumps `plan_version` whether or not one existed.
|
|
274
|
+
Nothing is generated and nothing is charged - the steps come from the
|
|
275
|
+
request body. For the desk to draft them instead, use `/plan/draft`.
|
|
276
|
+
|
|
277
|
+
**Input**
|
|
278
|
+
|
|
279
|
+
| Field | Type | Required | Description |
|
|
280
|
+
|---|---|---|---|
|
|
281
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
282
|
+
| `body` | `AccountPlanUpsertRequest` | yes | Request body; fields below. |
|
|
283
|
+
|
|
284
|
+
Body fields (`AccountPlanUpsertRequest`):
|
|
285
|
+
|
|
286
|
+
| Field | Type | Required | Description |
|
|
287
|
+
|---|---|---|---|
|
|
288
|
+
| `body.buying_committee_id` | `string (uuid) \| null` | no | |
|
|
289
|
+
| `body.buying_committee_members` | `Array<Record<string, unknown>> \| null` | no | |
|
|
290
|
+
| `body.current_plan` | `Array<AccountPlanStep>` | no | |
|
|
291
|
+
| `body.deep_research_summary` | `string \| null` | no | |
|
|
292
|
+
| `body.goal` | `string \| null` | no | |
|
|
293
|
+
| `body.rationale` | `string \| null` | no | Optional why-now, recorded in the trigger history. |
|
|
294
|
+
| `body.status` | `string \| null` | no | draft \| active \| paused \| archived. |
|
|
295
|
+
| `body.trigger` | `string` | no | What caused this (re)plan. default `"manual"` |
|
|
296
|
+
|
|
297
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
298
|
+
|
|
299
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
300
|
+
|
|
301
|
+
**Example**
|
|
302
|
+
|
|
303
|
+
```ts
|
|
304
|
+
const result = await g8.api.desk.createOrReplanAccountPlan({ path: { account_id: 1 }, body: {} });
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
<a id="op-decidedeskplayapproval"></a>
|
|
310
|
+
|
|
311
|
+
### `g8.api.desk.decideDeskPlayApproval(input)`
|
|
312
|
+
|
|
313
|
+
**Decide Desk Play Approval**
|
|
314
|
+
|
|
315
|
+
- HTTP: `POST /api/v1/desk/plays/approvals/{execution_id}/decide`
|
|
316
|
+
- operationId: `decide_desk_play_approval_desk_plays_approvals__execution_id__decide_post` (also callable as `g8.api.call("decide_desk_play_approval_desk_plays_approvals__execution_id__decide_post", input)`)
|
|
317
|
+
- Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
|
|
318
|
+
- API-key scope: `deals:run`
|
|
319
|
+
|
|
320
|
+
Approve or reject one paused run, AS THIS REP.
|
|
321
|
+
|
|
322
|
+
Approving RESUMES the run, and what it then does is whatever the workflow
|
|
323
|
+
does - which can include sending. The identity matters: the workflow's
|
|
324
|
+
author may have named an approver list, and a caller not on it gets a 403
|
|
325
|
+
rather than a silent no-op.
|
|
326
|
+
|
|
327
|
+
403 means "not your decision to make", 404 means the run is no longer
|
|
328
|
+
waiting. Neither is a retryable error.
|
|
329
|
+
|
|
330
|
+
**Input**
|
|
331
|
+
|
|
332
|
+
| Field | Type | Required | Description |
|
|
333
|
+
|---|---|---|---|
|
|
334
|
+
| `path.execution_id` | `string` | yes | Paused workflow execution id. |
|
|
335
|
+
| `body` | `DeskApprovalDecisionRequest` | yes | Request body; fields below. |
|
|
336
|
+
|
|
337
|
+
Body fields (`DeskApprovalDecisionRequest`):
|
|
338
|
+
|
|
339
|
+
| Field | Type | Required | Description |
|
|
340
|
+
|---|---|---|---|
|
|
341
|
+
| `body.decision` | `"approve" \| "reject"` | yes | |
|
|
342
|
+
| `body.note` | `string \| null` | no | Optional note. The engine records it as `notes` on an approval and `reason` on a rejection. max length 2000 |
|
|
343
|
+
|
|
344
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
345
|
+
|
|
346
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
347
|
+
|
|
348
|
+
**Example**
|
|
349
|
+
|
|
350
|
+
```ts
|
|
351
|
+
// external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
|
|
352
|
+
const result = await g8.api.desk.decideDeskPlayApproval({ path: { execution_id: "id" }, body: { decision: "approve" } });
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
<a id="op-draftaccountplan"></a>
|
|
358
|
+
|
|
359
|
+
### `g8.api.desk.draftAccountPlan(input)`
|
|
360
|
+
|
|
361
|
+
**Draft Account Plan**
|
|
362
|
+
|
|
363
|
+
- HTTP: `POST /api/v1/desk/accounts/{account_id}/plan/draft`
|
|
364
|
+
- operationId: `draft_account_plan_desk_accounts__account_id__plan_draft_post` (also callable as `g8.api.call("draft_account_plan_desk_accounts__account_id__plan_draft_post", input)`)
|
|
365
|
+
- Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
|
|
366
|
+
- API-key scope: `deals:run`
|
|
367
|
+
|
|
368
|
+
SPENDS CREDITS. Let the desk draft the committee and the first steps.
|
|
369
|
+
|
|
370
|
+
This runs the same producer the desk runs automatically, and it counts
|
|
371
|
+
against the org's `max_auto_account_plans_per_day` cap - which is what
|
|
372
|
+
makes it a spend rather than a write.
|
|
373
|
+
|
|
374
|
+
409 when a plan already exists: this only creates a FIRST version. Replan
|
|
375
|
+
an existing one with `POST .../plan` (caller-authored, free) or from a
|
|
376
|
+
review card with `POST /desk/decisions/{id}/replan` (charged).
|
|
377
|
+
422 when the company has no contacts to plan around yet.
|
|
378
|
+
|
|
379
|
+
**Input**
|
|
380
|
+
|
|
381
|
+
| Field | Type | Required | Description |
|
|
382
|
+
|---|---|---|---|
|
|
383
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
384
|
+
|
|
385
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
386
|
+
|
|
387
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
388
|
+
|
|
389
|
+
**Example**
|
|
390
|
+
|
|
391
|
+
```ts
|
|
392
|
+
// billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
|
|
393
|
+
const result = await g8.api.desk.draftAccountPlan({ path: { account_id: 1 } });
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
<a id="op-editaccountcommittee"></a>
|
|
399
|
+
|
|
400
|
+
### `g8.api.desk.editAccountCommittee(input)`
|
|
401
|
+
|
|
402
|
+
**Edit Account Committee**
|
|
403
|
+
|
|
404
|
+
- HTTP: `POST /api/v1/desk/accounts/{account_id}/committee`
|
|
405
|
+
- operationId: `edit_account_committee_desk_accounts__account_id__committee_post` (also callable as `g8.api.call("edit_account_committee_desk_accounts__account_id__committee_post", input)`)
|
|
406
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
407
|
+
- API-key scope: `deals:write`
|
|
408
|
+
|
|
409
|
+
Add and remove buying-committee members.
|
|
410
|
+
|
|
411
|
+
Rides plan versioning like everything else: it persists a NEW plan version
|
|
412
|
+
preserving the existing steps, rather than mutating the committee in place.
|
|
413
|
+
Both lists apply in the same version, so the committee is never left
|
|
414
|
+
half-changed.
|
|
415
|
+
|
|
416
|
+
**Input**
|
|
417
|
+
|
|
418
|
+
| Field | Type | Required | Description |
|
|
419
|
+
|---|---|---|---|
|
|
420
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
421
|
+
| `body` | `CommitteeEditRequest` | yes | Request body; fields below. |
|
|
422
|
+
|
|
423
|
+
Body fields (`CommitteeEditRequest`):
|
|
424
|
+
|
|
425
|
+
| Field | Type | Required | Description |
|
|
426
|
+
|---|---|---|---|
|
|
427
|
+
| `body.add` | `Array<CommitteeMemberInput>` | no | |
|
|
428
|
+
| `body.remove` | `Array<integer>` | no | Contact ids to take off the committee. |
|
|
429
|
+
|
|
430
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
431
|
+
|
|
432
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
433
|
+
|
|
434
|
+
**Example**
|
|
435
|
+
|
|
436
|
+
```ts
|
|
437
|
+
const result = await g8.api.desk.editAccountCommittee({ path: { account_id: 1 }, body: {} });
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
<a id="op-findcommitteememberlinkedin"></a>
|
|
443
|
+
|
|
444
|
+
### `g8.api.desk.findCommitteeMemberLinkedin(input)`
|
|
445
|
+
|
|
446
|
+
**Find Committee Member Linkedin**
|
|
447
|
+
|
|
448
|
+
- HTTP: `POST /api/v1/desk/accounts/{account_id}/committee/{contact_id}/find-linkedin`
|
|
449
|
+
- operationId: `find_committee_member_linkedin_desk_accounts__account_id__committee__contact_id__find_linkedin_post` (also callable as `g8.api.call("find_committee_member_linkedin_desk_accounts__account_id__committee__contact_id__find_linkedin_post", input)`)
|
|
450
|
+
- Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
|
|
451
|
+
- API-key scope: `deals:run`
|
|
452
|
+
|
|
453
|
+
SPENDS CREDITS. Find ONE committee member's LinkedIn profile.
|
|
454
|
+
|
|
455
|
+
About five credits per attempt, CHARGED ON A MISS AS WELL AS A HIT - both
|
|
456
|
+
providers in the pipeline bill on no-match, at a measured 58% hit rate. So
|
|
457
|
+
the cost is per call, not per result.
|
|
458
|
+
|
|
459
|
+
Deliberately ONE contact per call, and the contact must be on THIS
|
|
460
|
+
account's committee. There is no bulk entry point and this surface does not
|
|
461
|
+
add one: pointed at contacts generally it would be a seven-figure credit
|
|
462
|
+
button.
|
|
463
|
+
|
|
464
|
+
Queues an ASYNC lookup - the result lands on the contact record afterwards,
|
|
465
|
+
so read it back from `/desk/committee-targets`.
|
|
466
|
+
|
|
467
|
+
**Input**
|
|
468
|
+
|
|
469
|
+
| Field | Type | Required | Description |
|
|
470
|
+
|---|---|---|---|
|
|
471
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
472
|
+
| `path.contact_id` | `integer` | yes | The committee member to look up. |
|
|
473
|
+
|
|
474
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
475
|
+
|
|
476
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
477
|
+
|
|
478
|
+
**Example**
|
|
479
|
+
|
|
480
|
+
```ts
|
|
481
|
+
// billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
|
|
482
|
+
const result = await g8.api.desk.findCommitteeMemberLinkedin({ path: { account_id: 1, contact_id: 123 } });
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
<a id="op-getaccountcontext"></a>
|
|
488
|
+
|
|
489
|
+
### `g8.api.desk.getAccountContext(input)`
|
|
490
|
+
|
|
491
|
+
**Get Account Context**
|
|
492
|
+
|
|
493
|
+
- HTTP: `GET /api/v1/desk/accounts/{account_id}/context`
|
|
494
|
+
- operationId: `get_account_context_desk_accounts__account_id__context_get` (also callable as `g8.api.call("get_account_context_desk_accounts__account_id__context_get", input)`)
|
|
495
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
496
|
+
- API-key scope: `deals:read`
|
|
497
|
+
|
|
498
|
+
Why this account is here: summary, timeline, deal state, committee.
|
|
499
|
+
|
|
500
|
+
Read-only; never writes. This is the evidence a plan is built from, so it
|
|
501
|
+
is the right read before proposing one.
|
|
502
|
+
|
|
503
|
+
**Input**
|
|
504
|
+
|
|
505
|
+
| Field | Type | Required | Description |
|
|
506
|
+
|---|---|---|---|
|
|
507
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
508
|
+
| `query.activity_limit` | `integer` | no | default `50` |
|
|
509
|
+
|
|
510
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
511
|
+
|
|
512
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
513
|
+
|
|
514
|
+
**Example**
|
|
515
|
+
|
|
516
|
+
```ts
|
|
517
|
+
const result = await g8.api.desk.getAccountContext({ path: { account_id: 1 } });
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
---
|
|
521
|
+
|
|
522
|
+
<a id="op-getaccountplan"></a>
|
|
523
|
+
|
|
524
|
+
### `g8.api.desk.getAccountPlan(input)`
|
|
525
|
+
|
|
526
|
+
**Get Account Plan**
|
|
527
|
+
|
|
528
|
+
- HTTP: `GET /api/v1/desk/accounts/{account_id}/plan`
|
|
529
|
+
- operationId: `get_account_plan_desk_accounts__account_id__plan_get` (also callable as `g8.api.call("get_account_plan_desk_accounts__account_id__plan_get", input)`)
|
|
530
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
531
|
+
- API-key scope: `deals:read`
|
|
532
|
+
|
|
533
|
+
The LATEST plan version for this account.
|
|
534
|
+
|
|
535
|
+
**Input**
|
|
536
|
+
|
|
537
|
+
| Field | Type | Required | Description |
|
|
538
|
+
|---|---|---|---|
|
|
539
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
540
|
+
|
|
541
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
542
|
+
|
|
543
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
544
|
+
|
|
545
|
+
**Example**
|
|
546
|
+
|
|
547
|
+
```ts
|
|
548
|
+
const result = await g8.api.desk.getAccountPlan({ path: { account_id: 1 } });
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
<a id="op-getaccountplanhistory"></a>
|
|
554
|
+
|
|
555
|
+
### `g8.api.desk.getAccountPlanHistory(input)`
|
|
556
|
+
|
|
557
|
+
**Get Account Plan History**
|
|
558
|
+
|
|
559
|
+
- HTTP: `GET /api/v1/desk/accounts/{account_id}/plan/history`
|
|
560
|
+
- operationId: `get_account_plan_history_desk_accounts__account_id__plan_history_get` (also callable as `g8.api.call("get_account_plan_history_desk_accounts__account_id__plan_history_get", input)`)
|
|
561
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
562
|
+
- API-key scope: `deals:read`
|
|
563
|
+
|
|
564
|
+
Every version of this account's plan, newest first.
|
|
565
|
+
|
|
566
|
+
Versions are immutable, so this is the audit trail: what the plan said
|
|
567
|
+
before each replan, and what triggered it.
|
|
568
|
+
|
|
569
|
+
**Input**
|
|
570
|
+
|
|
571
|
+
| Field | Type | Required | Description |
|
|
572
|
+
|---|---|---|---|
|
|
573
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
574
|
+
| `query.limit` | `integer` | no | default `20` |
|
|
575
|
+
|
|
576
|
+
**Returns** `ApiResponse_AccountPlanListPayload_`: the envelope `{ data: AccountPlanListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
577
|
+
|
|
578
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
579
|
+
|
|
580
|
+
`AccountPlanListPayload` fields:
|
|
581
|
+
|
|
582
|
+
| Field | Type | Required | Description |
|
|
583
|
+
|---|---|---|---|
|
|
584
|
+
| `items` | `Array<unknown>` | no | |
|
|
585
|
+
|
|
586
|
+
**Example**
|
|
587
|
+
|
|
588
|
+
```ts
|
|
589
|
+
const result = await g8.api.desk.getAccountPlanHistory({ path: { account_id: 1 } });
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
---
|
|
593
|
+
|
|
594
|
+
<a id="op-getdeskautonomy"></a>
|
|
595
|
+
|
|
596
|
+
### `g8.api.desk.getDeskAutonomy(input?)`
|
|
597
|
+
|
|
598
|
+
**Get Desk Autonomy**
|
|
599
|
+
|
|
600
|
+
- HTTP: `GET /api/v1/desk/autonomy`
|
|
601
|
+
- operationId: `get_desk_autonomy_desk_autonomy_get` (also callable as `g8.api.call("get_desk_autonomy_desk_autonomy_get", input)`)
|
|
602
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
603
|
+
- API-key scope: `deals:read`
|
|
604
|
+
|
|
605
|
+
This rep's autonomy lanes, and which decision types can be automated.
|
|
606
|
+
|
|
607
|
+
`autopilot_capable_types` is the useful half: a type not in it cannot be
|
|
608
|
+
put on autopilot, and asking for it is silently DOWNGRADED rather than
|
|
609
|
+
refused, so read this before writing lanes.
|
|
610
|
+
|
|
611
|
+
**Input**: none.
|
|
612
|
+
|
|
613
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
614
|
+
|
|
615
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
616
|
+
|
|
617
|
+
**Example**
|
|
618
|
+
|
|
619
|
+
```ts
|
|
620
|
+
const result = await g8.api.desk.getDeskAutonomy();
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
---
|
|
624
|
+
|
|
625
|
+
<a id="op-getdeskbatch"></a>
|
|
626
|
+
|
|
627
|
+
### `g8.api.desk.getDeskBatch(input?)`
|
|
628
|
+
|
|
629
|
+
**Get Desk Batch**
|
|
630
|
+
|
|
631
|
+
- HTTP: `GET /api/v1/desk/batch`
|
|
632
|
+
- operationId: `get_desk_batch_desk_batch_get` (also callable as `g8.api.call("get_desk_batch_desk_batch_get", input)`)
|
|
633
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
634
|
+
- API-key scope: `deals:read`
|
|
635
|
+
|
|
636
|
+
This rep's batch for their local day.
|
|
637
|
+
|
|
638
|
+
`data` is NULL when no batch has been started today. That is different
|
|
639
|
+
from a batch with nothing left in it, and the difference decides whether a
|
|
640
|
+
UI shows "start your day" or "you are done" - so it is preserved rather
|
|
641
|
+
than flattened into an empty batch.
|
|
642
|
+
|
|
643
|
+
The app's `include=overview` composite is deliberately not exposed: it
|
|
644
|
+
returns a different response shape from the same path, which is a shell
|
|
645
|
+
optimisation rather than a contract a rebuilder should depend on.
|
|
646
|
+
|
|
647
|
+
**Input**
|
|
648
|
+
|
|
649
|
+
| Field | Type | Required | Description |
|
|
650
|
+
|---|---|---|---|
|
|
651
|
+
| `query.tz_offset` | `integer` | no | The rep's UTC offset in MINUTES (local = UTC + tz_offset). A batch is scoped to the rep's local day; a wrong offset silently returns the wrong day rather than erroring. default `0` |
|
|
652
|
+
|
|
653
|
+
**Returns** `ApiResponse_Union_DeskBatch__NoneType__`: the envelope `{ data: DeskBatch | null, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
654
|
+
|
|
655
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
656
|
+
|
|
657
|
+
`data` fields:
|
|
658
|
+
|
|
659
|
+
| Field | Type | Required | Description |
|
|
660
|
+
|---|---|---|---|
|
|
661
|
+
| `completed` | `integer \| null` | no | |
|
|
662
|
+
| `completed_at` | `string (date-time) \| null` | no | |
|
|
663
|
+
| `id` | `string \| null` | no | |
|
|
664
|
+
| `item_ids` | `Array<string>` | no | |
|
|
665
|
+
| `remaining` | `integer \| null` | no | |
|
|
666
|
+
| `started_at` | `string (date-time) \| null` | no | |
|
|
667
|
+
| `status` | `string \| null` | no | |
|
|
668
|
+
| `total` | `integer \| null` | no | |
|
|
669
|
+
|
|
670
|
+
**Example**
|
|
671
|
+
|
|
672
|
+
```ts
|
|
673
|
+
const result = await g8.api.desk.getDeskBatch();
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
---
|
|
677
|
+
|
|
678
|
+
<a id="op-getdeskblockqueue"></a>
|
|
679
|
+
|
|
680
|
+
### `g8.api.desk.getDeskBlockQueue(input)`
|
|
681
|
+
|
|
682
|
+
**Get Desk Block Queue**
|
|
683
|
+
|
|
684
|
+
- HTTP: `GET /api/v1/desk/blocks/{list_id}/queue`
|
|
685
|
+
- operationId: `get_desk_block_queue_desk_blocks__list_id__queue_get` (also callable as `g8.api.call("get_desk_block_queue_desk_blocks__list_id__queue_get", input)`)
|
|
686
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
687
|
+
- API-key scope: `deals:read`
|
|
688
|
+
|
|
689
|
+
The ordered work set behind one dial block.
|
|
690
|
+
|
|
691
|
+
Always 200, including for a list with nothing due - an empty queue is an
|
|
692
|
+
answer, not an error. The ladder and the ownership rules are applied here,
|
|
693
|
+
which is why `/desk/contacts/{contact_id}/call-target` can then resolve a
|
|
694
|
+
number for any stop it produced.
|
|
695
|
+
|
|
696
|
+
**Input**
|
|
697
|
+
|
|
698
|
+
| Field | Type | Required | Description |
|
|
699
|
+
|---|---|---|---|
|
|
700
|
+
| `path.list_id` | `integer` | yes | Dial list (audience) id. |
|
|
701
|
+
| `query.redial_only` | `boolean` | no | Only the contacts whose redial day is up, never the not-yet-called half. default `false` |
|
|
702
|
+
|
|
703
|
+
**Returns** `ApiResponse_DeskListPayload_`: the envelope `{ data: DeskListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
704
|
+
|
|
705
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
706
|
+
|
|
707
|
+
`DeskListPayload` fields:
|
|
708
|
+
|
|
709
|
+
| Field | Type | Required | Description |
|
|
710
|
+
|---|---|---|---|
|
|
711
|
+
| `items` | `Array<unknown>` | no | |
|
|
712
|
+
|
|
713
|
+
**Example**
|
|
714
|
+
|
|
715
|
+
```ts
|
|
716
|
+
const result = await g8.api.desk.getDeskBlockQueue({ path: { list_id: 123 } });
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
---
|
|
720
|
+
|
|
721
|
+
<a id="op-getdeskcalltarget"></a>
|
|
722
|
+
|
|
723
|
+
### `g8.api.desk.getDeskCallTarget(input)`
|
|
724
|
+
|
|
725
|
+
**Get Desk Call Target**
|
|
726
|
+
|
|
727
|
+
- HTTP: `POST /api/v1/desk/decisions/{decision_id}/call-target`
|
|
728
|
+
- operationId: `get_desk_call_target_desk_decisions__decision_id__call_target_post` (also callable as `g8.api.call("get_desk_call_target_desk_decisions__decision_id__call_target_post", input)`)
|
|
729
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
730
|
+
- API-key scope: `deals:read`
|
|
731
|
+
|
|
732
|
+
Resolve the dialable number for a CARD, after the opt-out check.
|
|
733
|
+
|
|
734
|
+
Same always-200 contract as the contact route above. The difference is
|
|
735
|
+
ownership: this one checks the card belongs to the calling rep, because a
|
|
736
|
+
card names a specific person to call.
|
|
737
|
+
|
|
738
|
+
**Input**
|
|
739
|
+
|
|
740
|
+
| Field | Type | Required | Description |
|
|
741
|
+
|---|---|---|---|
|
|
742
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
743
|
+
|
|
744
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
745
|
+
|
|
746
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
747
|
+
|
|
748
|
+
**Example**
|
|
749
|
+
|
|
750
|
+
```ts
|
|
751
|
+
const result = await g8.api.desk.getDeskCallTarget({ path: { decision_id: "id" } });
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
---
|
|
755
|
+
|
|
756
|
+
<a id="op-getdeskcommitteeheat"></a>
|
|
757
|
+
|
|
758
|
+
### `g8.api.desk.getDeskCommitteeHeat(input)`
|
|
759
|
+
|
|
760
|
+
**Get Desk Committee Heat**
|
|
761
|
+
|
|
762
|
+
- HTTP: `GET /api/v1/desk/committee-heat`
|
|
763
|
+
- operationId: `get_desk_committee_heat_desk_committee_heat_get` (also callable as `g8.api.call("get_desk_committee_heat_desk_committee_heat_get", input)`)
|
|
764
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
765
|
+
- API-key scope: `deals:read`
|
|
766
|
+
|
|
767
|
+
Four-week engagement heatmap for an account's buying committee.
|
|
768
|
+
|
|
769
|
+
Read-only and no model call. Fails SOFT to an empty member list rather
|
|
770
|
+
than erroring, so a dashboard degrades instead of breaking.
|
|
771
|
+
|
|
772
|
+
**Input**
|
|
773
|
+
|
|
774
|
+
| Field | Type | Required | Description |
|
|
775
|
+
|---|---|---|---|
|
|
776
|
+
| `query.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
777
|
+
|
|
778
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
779
|
+
|
|
780
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
781
|
+
|
|
782
|
+
**Example**
|
|
783
|
+
|
|
784
|
+
```ts
|
|
785
|
+
const result = await g8.api.desk.getDeskCommitteeHeat({ query: { account_id: 1 } });
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
---
|
|
789
|
+
|
|
790
|
+
<a id="op-getdeskcommitteetargets"></a>
|
|
791
|
+
|
|
792
|
+
### `g8.api.desk.getDeskCommitteeTargets(input)`
|
|
793
|
+
|
|
794
|
+
**Get Desk Committee Targets**
|
|
795
|
+
|
|
796
|
+
- HTTP: `GET /api/v1/desk/committee-targets`
|
|
797
|
+
- operationId: `get_desk_committee_targets_desk_committee_targets_get` (also callable as `g8.api.call("get_desk_committee_targets_desk_committee_targets_get", input)`)
|
|
798
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
799
|
+
- API-key scope: `deals:read`
|
|
800
|
+
|
|
801
|
+
Who on the committee is reachable on LinkedIn, and why not when not.
|
|
802
|
+
|
|
803
|
+
Reads only: it never sends and never writes. The send is
|
|
804
|
+
`POST /desk/accounts/{account_id}/committee/{contact_id}/linkedin-invite`.
|
|
805
|
+
|
|
806
|
+
**Input**
|
|
807
|
+
|
|
808
|
+
| Field | Type | Required | Description |
|
|
809
|
+
|---|---|---|---|
|
|
810
|
+
| `query.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
811
|
+
|
|
812
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
813
|
+
|
|
814
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
815
|
+
|
|
816
|
+
**Example**
|
|
817
|
+
|
|
818
|
+
```ts
|
|
819
|
+
const result = await g8.api.desk.getDeskCommitteeTargets({ query: { account_id: 1 } });
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
---
|
|
823
|
+
|
|
824
|
+
<a id="op-getdeskcompliancesummary"></a>
|
|
825
|
+
|
|
826
|
+
### `g8.api.desk.getDeskComplianceSummary(input?)`
|
|
827
|
+
|
|
828
|
+
**Get Desk Compliance Summary**
|
|
829
|
+
|
|
830
|
+
- HTTP: `GET /api/v1/desk/compliance-summary`
|
|
831
|
+
- operationId: `get_desk_compliance_summary_desk_compliance_summary_get` (also callable as `g8.api.call("get_desk_compliance_summary_desk_compliance_summary_get", input)`)
|
|
832
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
833
|
+
- API-key scope: `deals:read`
|
|
834
|
+
|
|
835
|
+
Stage-checklist readiness aggregated across this rep's open deals.
|
|
836
|
+
|
|
837
|
+
**Input**
|
|
838
|
+
|
|
839
|
+
| Field | Type | Required | Description |
|
|
840
|
+
|---|---|---|---|
|
|
841
|
+
| `query.limit` | `integer` | no | Open deals to aggregate over. default `50` |
|
|
842
|
+
|
|
843
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
844
|
+
|
|
845
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
846
|
+
|
|
847
|
+
**Example**
|
|
848
|
+
|
|
849
|
+
```ts
|
|
850
|
+
const result = await g8.api.desk.getDeskComplianceSummary();
|
|
851
|
+
```
|
|
852
|
+
|
|
853
|
+
---
|
|
854
|
+
|
|
855
|
+
<a id="op-getdeskcontactcalltarget"></a>
|
|
856
|
+
|
|
857
|
+
### `g8.api.desk.getDeskContactCallTarget(input)`
|
|
858
|
+
|
|
859
|
+
**Get Desk Contact Call Target**
|
|
860
|
+
|
|
861
|
+
- HTTP: `POST /api/v1/desk/contacts/{contact_id}/call-target`
|
|
862
|
+
- operationId: `get_desk_contact_call_target_desk_contacts__contact_id__call_target_post` (also callable as `g8.api.call("get_desk_contact_call_target_desk_contacts__contact_id__call_target_post", input)`)
|
|
863
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
864
|
+
- API-key scope: `deals:read`
|
|
865
|
+
|
|
866
|
+
Resolve the dialable number for one contact, after the opt-out check.
|
|
867
|
+
|
|
868
|
+
ALWAYS 200. "No number on file" and "this person opted out" are ordinary
|
|
869
|
+
answers carried in the payload as `is_dialable: false` with a reason, not
|
|
870
|
+
errors - a caller that treats a non-200 as the only failure mode will dial
|
|
871
|
+
people who asked not to be called.
|
|
872
|
+
|
|
873
|
+
POST rather than GET is the app's choice: it consults the suppression
|
|
874
|
+
ledger, and pressing Call is an intent to contact someone, which should not
|
|
875
|
+
be firable by a prefetch. It resolves and writes nothing, which is why it
|
|
876
|
+
is tiered a READ.
|
|
877
|
+
|
|
878
|
+
**Input**
|
|
879
|
+
|
|
880
|
+
| Field | Type | Required | Description |
|
|
881
|
+
|---|---|---|---|
|
|
882
|
+
| `path.contact_id` | `integer` | yes | Contact id. |
|
|
883
|
+
|
|
884
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
885
|
+
|
|
886
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
887
|
+
|
|
888
|
+
**Example**
|
|
889
|
+
|
|
890
|
+
```ts
|
|
891
|
+
const result = await g8.api.desk.getDeskContactCallTarget({ path: { contact_id: 123 } });
|
|
892
|
+
```
|
|
893
|
+
|
|
894
|
+
---
|
|
895
|
+
|
|
896
|
+
<a id="op-getdeskcoverage"></a>
|
|
897
|
+
|
|
898
|
+
### `g8.api.desk.getDeskCoverage(input?)`
|
|
899
|
+
|
|
900
|
+
**Get Desk Coverage**
|
|
901
|
+
|
|
902
|
+
- HTTP: `GET /api/v1/desk/coverage`
|
|
903
|
+
- operationId: `get_desk_coverage_desk_coverage_get` (also callable as `g8.api.call("get_desk_coverage_desk_coverage_get", input)`)
|
|
904
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
905
|
+
- API-key scope: `deals:read`
|
|
906
|
+
|
|
907
|
+
Quarterly open-pipeline coverage against target.
|
|
908
|
+
|
|
909
|
+
`{"enabled": false}` when the org has set no quarterly target - a 200 with
|
|
910
|
+
a reason rather than a 404, so a dashboard can say "not configured".
|
|
911
|
+
|
|
912
|
+
**Input**: none.
|
|
913
|
+
|
|
914
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
915
|
+
|
|
916
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
917
|
+
|
|
918
|
+
**Example**
|
|
919
|
+
|
|
920
|
+
```ts
|
|
921
|
+
const result = await g8.api.desk.getDeskCoverage();
|
|
922
|
+
```
|
|
923
|
+
|
|
924
|
+
---
|
|
925
|
+
|
|
926
|
+
<a id="op-getdeskdecisionbrief"></a>
|
|
927
|
+
|
|
928
|
+
### `g8.api.desk.getDeskDecisionBrief(input)`
|
|
929
|
+
|
|
930
|
+
**Get Desk Decision Brief**
|
|
931
|
+
|
|
932
|
+
- HTTP: `GET /api/v1/desk/decisions/{decision_id}/brief`
|
|
933
|
+
- operationId: `get_desk_decision_brief_desk_decisions__decision_id__brief_get` (also callable as `g8.api.call("get_desk_decision_brief_desk_decisions__decision_id__brief_get", input)`)
|
|
934
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
935
|
+
- API-key scope: `deals:read`
|
|
936
|
+
|
|
937
|
+
Enriched brief for a card - what the slide-over panel shows.
|
|
938
|
+
|
|
939
|
+
Returned as an open object: the app types this `-> dict` and assembles it
|
|
940
|
+
from several upstreams, so pinning a schema here would silently DROP a
|
|
941
|
+
field the moment one is added.
|
|
942
|
+
|
|
943
|
+
**Input**
|
|
944
|
+
|
|
945
|
+
| Field | Type | Required | Description |
|
|
946
|
+
|---|---|---|---|
|
|
947
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
948
|
+
|
|
949
|
+
**Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
950
|
+
|
|
951
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
952
|
+
|
|
953
|
+
**Example**
|
|
954
|
+
|
|
955
|
+
```ts
|
|
956
|
+
const result = await g8.api.desk.getDeskDecisionBrief({ path: { decision_id: "id" } });
|
|
957
|
+
```
|
|
958
|
+
|
|
959
|
+
---
|
|
960
|
+
|
|
961
|
+
<a id="op-getdeskdecisioncardcontext"></a>
|
|
962
|
+
|
|
963
|
+
### `g8.api.desk.getDeskDecisionCardContext(input)`
|
|
964
|
+
|
|
965
|
+
**Get Desk Decision Card Context**
|
|
966
|
+
|
|
967
|
+
- HTTP: `GET /api/v1/desk/decisions/{decision_id}/card-context`
|
|
968
|
+
- operationId: `get_desk_decision_card_context_desk_decisions__decision_id__card_context_get` (also callable as `g8.api.call("get_desk_decision_card_context_desk_decisions__decision_id__card_context_get", input)`)
|
|
969
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
970
|
+
- API-key scope: `deals:read`
|
|
971
|
+
|
|
972
|
+
Everything needed to render the card: the entity, its history, the ask.
|
|
973
|
+
|
|
974
|
+
**Input**
|
|
975
|
+
|
|
976
|
+
| Field | Type | Required | Description |
|
|
977
|
+
|---|---|---|---|
|
|
978
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
979
|
+
|
|
980
|
+
**Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
981
|
+
|
|
982
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
983
|
+
|
|
984
|
+
**Example**
|
|
985
|
+
|
|
986
|
+
```ts
|
|
987
|
+
const result = await g8.api.desk.getDeskDecisionCardContext({ path: { decision_id: "id" } });
|
|
988
|
+
```
|
|
989
|
+
|
|
990
|
+
---
|
|
991
|
+
|
|
992
|
+
<a id="op-getdeskdecisionconversation"></a>
|
|
993
|
+
|
|
994
|
+
### `g8.api.desk.getDeskDecisionConversation(input)`
|
|
995
|
+
|
|
996
|
+
**Get Desk Decision Conversation**
|
|
997
|
+
|
|
998
|
+
- HTTP: `GET /api/v1/desk/decisions/{decision_id}/conversation`
|
|
999
|
+
- operationId: `get_desk_decision_conversation_desk_decisions__decision_id__conversation_get` (also callable as `g8.api.call("get_desk_decision_conversation_desk_decisions__decision_id__conversation_get", input)`)
|
|
1000
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1001
|
+
- API-key scope: `deals:read`
|
|
1002
|
+
|
|
1003
|
+
The thread behind the card - what has already been said.
|
|
1004
|
+
|
|
1005
|
+
**Input**
|
|
1006
|
+
|
|
1007
|
+
| Field | Type | Required | Description |
|
|
1008
|
+
|---|---|---|---|
|
|
1009
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
1010
|
+
|
|
1011
|
+
**Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1012
|
+
|
|
1013
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1014
|
+
|
|
1015
|
+
**Example**
|
|
1016
|
+
|
|
1017
|
+
```ts
|
|
1018
|
+
const result = await g8.api.desk.getDeskDecisionConversation({ path: { decision_id: "id" } });
|
|
1019
|
+
```
|
|
1020
|
+
|
|
1021
|
+
---
|
|
1022
|
+
|
|
1023
|
+
<a id="op-getdeskhomesummary"></a>
|
|
1024
|
+
|
|
1025
|
+
### `g8.api.desk.getDeskHomeSummary(input?)`
|
|
1026
|
+
|
|
1027
|
+
**Get Desk Home Summary**
|
|
1028
|
+
|
|
1029
|
+
- HTTP: `GET /api/v1/desk/home-summary`
|
|
1030
|
+
- operationId: `get_desk_home_summary_desk_home_summary_get` (also callable as `g8.api.call("get_desk_home_summary_desk_home_summary_get", input)`)
|
|
1031
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1032
|
+
- API-key scope: `deals:read`
|
|
1033
|
+
|
|
1034
|
+
Goal progress, streak, digest and tomorrow's preview, in one read.
|
|
1035
|
+
|
|
1036
|
+
`since` narrows the digest lookback in the app. It is not published: it
|
|
1037
|
+
defaults to the last 24 hours, is capped at seven days, and exposing it
|
|
1038
|
+
would publish a knob whose only effect is to skip a 60-second cache.
|
|
1039
|
+
|
|
1040
|
+
**Input**
|
|
1041
|
+
|
|
1042
|
+
| Field | Type | Required | Description |
|
|
1043
|
+
|---|---|---|---|
|
|
1044
|
+
| `query.tz_offset` | `integer` | no | The rep's UTC offset in MINUTES (local = UTC + tz_offset). The desk day is the rep's LOCAL day; a wrong offset silently returns the wrong day rather than erroring. default `0` |
|
|
1045
|
+
|
|
1046
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1047
|
+
|
|
1048
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1049
|
+
|
|
1050
|
+
**Example**
|
|
1051
|
+
|
|
1052
|
+
```ts
|
|
1053
|
+
const result = await g8.api.desk.getDeskHomeSummary();
|
|
1054
|
+
```
|
|
1055
|
+
|
|
1056
|
+
---
|
|
1057
|
+
|
|
1058
|
+
<a id="op-getdeskkickoff"></a>
|
|
1059
|
+
|
|
1060
|
+
### `g8.api.desk.getDeskKickoff(input?)`
|
|
1061
|
+
|
|
1062
|
+
**Get Desk Kickoff**
|
|
1063
|
+
|
|
1064
|
+
- HTTP: `GET /api/v1/desk/kickoff`
|
|
1065
|
+
- operationId: `get_desk_kickoff_desk_kickoff_get` (also callable as `g8.api.call("get_desk_kickoff_desk_kickoff_get", input)`)
|
|
1066
|
+
- Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
|
|
1067
|
+
- API-key scope: `deals:run`
|
|
1068
|
+
|
|
1069
|
+
The rep's 60-second AI daily briefing, cached per local day.
|
|
1070
|
+
|
|
1071
|
+
SPENDS CREDITS ON THE FIRST READ OF THE DAY: a cache miss builds the
|
|
1072
|
+
briefing with a charged model call; every later read that day is served
|
|
1073
|
+
from the cache. That is why this GET is tiered `billable`, not `read`.
|
|
1074
|
+
|
|
1075
|
+
`{"enabled": false}` when the org's `morning_kickoff` switch is off.
|
|
1076
|
+
|
|
1077
|
+
The app's `force=true` rebuild is NOT published, and that is a spend
|
|
1078
|
+
decision rather than a tidiness one: the briefing is one model call per rep
|
|
1079
|
+
per local day, and a published `force` turns a dashboard poll into a
|
|
1080
|
+
charged call per request. Read the cached one; it is the same briefing the
|
|
1081
|
+
rep sees. (`force=False` is passed EXPLICITLY below - the app's default is
|
|
1082
|
+
a `Query` instance, which is truthy, so omitting it would force a rebuild
|
|
1083
|
+
on every single call.)
|
|
1084
|
+
|
|
1085
|
+
**Input**
|
|
1086
|
+
|
|
1087
|
+
| Field | Type | Required | Description |
|
|
1088
|
+
|---|---|---|---|
|
|
1089
|
+
| `query.tz_offset` | `integer` | no | The rep's UTC offset in MINUTES (local = UTC + tz_offset). The desk day is the rep's LOCAL day; a wrong offset silently returns the wrong day rather than erroring. default `0` |
|
|
1090
|
+
|
|
1091
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1092
|
+
|
|
1093
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1094
|
+
|
|
1095
|
+
**Example**
|
|
1096
|
+
|
|
1097
|
+
```ts
|
|
1098
|
+
// billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
|
|
1099
|
+
const result = await g8.api.desk.getDeskKickoff();
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
---
|
|
1103
|
+
|
|
1104
|
+
<a id="op-getdeskkickoffaudio"></a>
|
|
1105
|
+
|
|
1106
|
+
### `g8.api.desk.getDeskKickoffAudio(input?)`
|
|
1107
|
+
|
|
1108
|
+
**Get Desk Kickoff Audio**
|
|
1109
|
+
|
|
1110
|
+
- HTTP: `GET /api/v1/desk/kickoff/audio`
|
|
1111
|
+
- operationId: `get_desk_kickoff_audio_desk_kickoff_audio_get` (also callable as `g8.api.call("get_desk_kickoff_audio_desk_kickoff_audio_get", input)`)
|
|
1112
|
+
- Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
|
|
1113
|
+
- API-key scope: `deals:run`
|
|
1114
|
+
|
|
1115
|
+
Today's kickoff script, SPOKEN: an `audio/mpeg` body.
|
|
1116
|
+
|
|
1117
|
+
The one desk operation that does not answer in the JSON envelope - the
|
|
1118
|
+
payload is the MP3 itself, exactly as the app serves it. The script it
|
|
1119
|
+
speaks is `GET /desk/kickoff`. The speech call is platform cost, but the
|
|
1120
|
+
script behind it is BUILT here on a cache miss - a charged model call, the
|
|
1121
|
+
same one `GET /desk/kickoff` makes - so this GET is tiered `billable`.
|
|
1122
|
+
|
|
1123
|
+
**Input**
|
|
1124
|
+
|
|
1125
|
+
| Field | Type | Required | Description |
|
|
1126
|
+
|---|---|---|---|
|
|
1127
|
+
| `query.tz_offset` | `integer` | no | The rep's UTC offset in MINUTES (local = UTC + tz_offset). The desk day is the rep's LOCAL day; a wrong offset silently returns the wrong day rather than erroring. default `0` |
|
|
1128
|
+
|
|
1129
|
+
**Returns**: no JSON body is declared for the success response.
|
|
1130
|
+
|
|
1131
|
+
**Example**
|
|
1132
|
+
|
|
1133
|
+
```ts
|
|
1134
|
+
// billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
|
|
1135
|
+
const result = await g8.api.desk.getDeskKickoffAudio();
|
|
1136
|
+
```
|
|
1137
|
+
|
|
1138
|
+
---
|
|
1139
|
+
|
|
1140
|
+
<a id="op-getdesklinkedinsender"></a>
|
|
1141
|
+
|
|
1142
|
+
### `g8.api.desk.getDeskLinkedinSender(input?)`
|
|
1143
|
+
|
|
1144
|
+
**Get Desk Linkedin Sender**
|
|
1145
|
+
|
|
1146
|
+
- HTTP: `GET /api/v1/desk/linkedin-sender`
|
|
1147
|
+
- operationId: `get_desk_linkedin_sender_desk_linkedin_sender_get` (also callable as `g8.api.call("get_desk_linkedin_sender_desk_linkedin_sender_get", input)`)
|
|
1148
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1149
|
+
- API-key scope: `deals:read`
|
|
1150
|
+
|
|
1151
|
+
Which LinkedIn account this rep sends desk invites from.
|
|
1152
|
+
|
|
1153
|
+
Returns the rep's own pick plus every account in the org and who holds it,
|
|
1154
|
+
so a caller can see what is free before claiming one.
|
|
1155
|
+
|
|
1156
|
+
**Input**: none.
|
|
1157
|
+
|
|
1158
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1159
|
+
|
|
1160
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1161
|
+
|
|
1162
|
+
**Example**
|
|
1163
|
+
|
|
1164
|
+
```ts
|
|
1165
|
+
const result = await g8.api.desk.getDeskLinkedinSender();
|
|
1166
|
+
```
|
|
1167
|
+
|
|
1168
|
+
---
|
|
1169
|
+
|
|
1170
|
+
<a id="op-getdesklistgoals"></a>
|
|
1171
|
+
|
|
1172
|
+
### `g8.api.desk.getDeskListGoals(input?)`
|
|
1173
|
+
|
|
1174
|
+
**Get Desk List Goals**
|
|
1175
|
+
|
|
1176
|
+
- HTTP: `GET /api/v1/desk/list-goals`
|
|
1177
|
+
- operationId: `get_desk_list_goals_desk_list_goals_get` (also callable as `g8.api.call("get_desk_list_goals_desk_list_goals_get", input)`)
|
|
1178
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1179
|
+
- API-key scope: `deals:read`
|
|
1180
|
+
|
|
1181
|
+
The rep's per-list daily dial targets, and progress against them.
|
|
1182
|
+
|
|
1183
|
+
**Input**: none.
|
|
1184
|
+
|
|
1185
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1186
|
+
|
|
1187
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1188
|
+
|
|
1189
|
+
**Example**
|
|
1190
|
+
|
|
1191
|
+
```ts
|
|
1192
|
+
const result = await g8.api.desk.getDeskListGoals();
|
|
1193
|
+
```
|
|
1194
|
+
|
|
1195
|
+
---
|
|
1196
|
+
|
|
1197
|
+
<a id="op-getdesklistgroupoverride"></a>
|
|
1198
|
+
|
|
1199
|
+
### `g8.api.desk.getDeskListGroupOverride(input?)`
|
|
1200
|
+
|
|
1201
|
+
**Get Desk List Group Override**
|
|
1202
|
+
|
|
1203
|
+
- HTTP: `GET /api/v1/desk/list-group-override`
|
|
1204
|
+
- operationId: `get_desk_list_group_override_desk_list_group_override_get` (also callable as `g8.api.call("get_desk_list_group_override_desk_list_group_override_get", input)`)
|
|
1205
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1206
|
+
- API-key scope: `deals:read`
|
|
1207
|
+
|
|
1208
|
+
The rep's own moves of dial lists into a band, keyed by list id.
|
|
1209
|
+
|
|
1210
|
+
**Input**: none.
|
|
1211
|
+
|
|
1212
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1213
|
+
|
|
1214
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1215
|
+
|
|
1216
|
+
**Example**
|
|
1217
|
+
|
|
1218
|
+
```ts
|
|
1219
|
+
const result = await g8.api.desk.getDeskListGroupOverride();
|
|
1220
|
+
```
|
|
1221
|
+
|
|
1222
|
+
---
|
|
1223
|
+
|
|
1224
|
+
<a id="op-getdesklistpriority"></a>
|
|
1225
|
+
|
|
1226
|
+
### `g8.api.desk.getDeskListPriority(input?)`
|
|
1227
|
+
|
|
1228
|
+
**Get Desk List Priority**
|
|
1229
|
+
|
|
1230
|
+
- HTTP: `GET /api/v1/desk/list-priority`
|
|
1231
|
+
- operationId: `get_desk_list_priority_desk_list_priority_get` (also callable as `g8.api.call("get_desk_list_priority_desk_list_priority_get", input)`)
|
|
1232
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1233
|
+
- API-key scope: `deals:read`
|
|
1234
|
+
|
|
1235
|
+
The rep's pinned dial lists, most important first.
|
|
1236
|
+
|
|
1237
|
+
**Input**: none.
|
|
1238
|
+
|
|
1239
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1240
|
+
|
|
1241
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1242
|
+
|
|
1243
|
+
**Example**
|
|
1244
|
+
|
|
1245
|
+
```ts
|
|
1246
|
+
const result = await g8.api.desk.getDeskListPriority();
|
|
1247
|
+
```
|
|
1248
|
+
|
|
1249
|
+
---
|
|
1250
|
+
|
|
1251
|
+
<a id="op-getdesknextbest"></a>
|
|
1252
|
+
|
|
1253
|
+
### `g8.api.desk.getDeskNextBest(input?)`
|
|
1254
|
+
|
|
1255
|
+
**Get Desk Next Best**
|
|
1256
|
+
|
|
1257
|
+
- HTTP: `GET /api/v1/desk/next-best`
|
|
1258
|
+
- operationId: `get_desk_next_best_desk_next_best_get` (also callable as `g8.api.call("get_desk_next_best_desk_next_best_get", input)`)
|
|
1259
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1260
|
+
- API-key scope: `deals:read`
|
|
1261
|
+
|
|
1262
|
+
Next-best account suggestions. At most three; cached for an hour.
|
|
1263
|
+
|
|
1264
|
+
**Input**: none.
|
|
1265
|
+
|
|
1266
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1267
|
+
|
|
1268
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1269
|
+
|
|
1270
|
+
**Example**
|
|
1271
|
+
|
|
1272
|
+
```ts
|
|
1273
|
+
const result = await g8.api.desk.getDeskNextBest();
|
|
1274
|
+
```
|
|
1275
|
+
|
|
1276
|
+
---
|
|
1277
|
+
|
|
1278
|
+
<a id="op-getdeskorgsettings"></a>
|
|
1279
|
+
|
|
1280
|
+
### `g8.api.desk.getDeskOrgSettings(input?)`
|
|
1281
|
+
|
|
1282
|
+
**Get Desk Org Settings**
|
|
1283
|
+
|
|
1284
|
+
- HTTP: `GET /api/v1/desk/org-settings`
|
|
1285
|
+
- operationId: `get_desk_org_settings_desk_org_settings_get` (also callable as `g8.api.call("get_desk_org_settings_desk_org_settings_get", input)`)
|
|
1286
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1287
|
+
- API-key scope: `deals:read`
|
|
1288
|
+
|
|
1289
|
+
Effective org-level desk settings: kill switches, thresholds and caps.
|
|
1290
|
+
|
|
1291
|
+
UNGATED on purpose, matching the app. This is the always-on desk home read
|
|
1292
|
+
("watching N signals"), so requiring `settings:read` would break it for
|
|
1293
|
+
every SDR and AE. The admin surface is the PUT below.
|
|
1294
|
+
|
|
1295
|
+
**Input**: none.
|
|
1296
|
+
|
|
1297
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1298
|
+
|
|
1299
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1300
|
+
|
|
1301
|
+
**Example**
|
|
1302
|
+
|
|
1303
|
+
```ts
|
|
1304
|
+
const result = await g8.api.desk.getDeskOrgSettings();
|
|
1305
|
+
```
|
|
1306
|
+
|
|
1307
|
+
---
|
|
1308
|
+
|
|
1309
|
+
<a id="op-getdeskplayexecution"></a>
|
|
1310
|
+
|
|
1311
|
+
### `g8.api.desk.getDeskPlayExecution(input)`
|
|
1312
|
+
|
|
1313
|
+
**Get Desk Play Execution**
|
|
1314
|
+
|
|
1315
|
+
- HTTP: `GET /api/v1/desk/plays/executions/{execution_id}`
|
|
1316
|
+
- operationId: `get_desk_play_execution_desk_plays_executions__execution_id__get` (also callable as `g8.api.call("get_desk_play_execution_desk_plays_executions__execution_id__get", input)`)
|
|
1317
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1318
|
+
- API-key scope: `deals:read`
|
|
1319
|
+
|
|
1320
|
+
Live state of one play run.
|
|
1321
|
+
|
|
1322
|
+
Pass `decision_id` only if you want the card updated when the run reaches a
|
|
1323
|
+
terminal state; that is what the desk's own status chip does as it polls.
|
|
1324
|
+
|
|
1325
|
+
**Input**
|
|
1326
|
+
|
|
1327
|
+
| Field | Type | Required | Description |
|
|
1328
|
+
|---|---|---|---|
|
|
1329
|
+
| `path.execution_id` | `string` | yes | Workflow execution id. |
|
|
1330
|
+
| `query.decision_id` | `string \| null` | no | Card this run belongs to. When given, a TERMINAL status is persisted onto the card - so this read has a write side, and omitting it keeps the read pure. |
|
|
1331
|
+
| `query.action_id` | `string \| null` | no | Play this run belongs to. |
|
|
1332
|
+
|
|
1333
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1334
|
+
|
|
1335
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1336
|
+
|
|
1337
|
+
**Example**
|
|
1338
|
+
|
|
1339
|
+
```ts
|
|
1340
|
+
const result = await g8.api.desk.getDeskPlayExecution({ path: { execution_id: "id" } });
|
|
1341
|
+
```
|
|
1342
|
+
|
|
1343
|
+
---
|
|
1344
|
+
|
|
1345
|
+
<a id="op-getdeskpulse"></a>
|
|
1346
|
+
|
|
1347
|
+
### `g8.api.desk.getDeskPulse(input?)`
|
|
1348
|
+
|
|
1349
|
+
**Get Desk Pulse**
|
|
1350
|
+
|
|
1351
|
+
- HTTP: `GET /api/v1/desk/pulse`
|
|
1352
|
+
- operationId: `get_desk_pulse_desk_pulse_get` (also callable as `g8.api.call("get_desk_pulse_desk_pulse_get", input)`)
|
|
1353
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1354
|
+
- API-key scope: `deals:read`
|
|
1355
|
+
|
|
1356
|
+
Queue counts, the type breakdown, and the nudge.
|
|
1357
|
+
|
|
1358
|
+
**Input**
|
|
1359
|
+
|
|
1360
|
+
| Field | Type | Required | Description |
|
|
1361
|
+
|---|---|---|---|
|
|
1362
|
+
| `query.tz_offset` | `integer` | no | The rep's UTC offset in MINUTES (local = UTC + tz_offset). The desk day is the rep's LOCAL day; a wrong offset silently returns the wrong day rather than erroring. default `0` |
|
|
1363
|
+
|
|
1364
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1365
|
+
|
|
1366
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1367
|
+
|
|
1368
|
+
**Example**
|
|
1369
|
+
|
|
1370
|
+
```ts
|
|
1371
|
+
const result = await g8.api.desk.getDeskPulse();
|
|
1372
|
+
```
|
|
1373
|
+
|
|
1374
|
+
---
|
|
1375
|
+
|
|
1376
|
+
<a id="op-getdeskreplytarget"></a>
|
|
1377
|
+
|
|
1378
|
+
### `g8.api.desk.getDeskReplyTarget(input)`
|
|
1379
|
+
|
|
1380
|
+
**Get Desk Reply Target**
|
|
1381
|
+
|
|
1382
|
+
- HTTP: `POST /api/v1/desk/decisions/{decision_id}/reply-target`
|
|
1383
|
+
- operationId: `get_desk_reply_target_desk_decisions__decision_id__reply_target_post` (also callable as `g8.api.call("get_desk_reply_target_desk_decisions__decision_id__reply_target_post", input)`)
|
|
1384
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1385
|
+
- API-key scope: `deals:read`
|
|
1386
|
+
|
|
1387
|
+
Who this card replies TO, and which mailbox it replies FROM.
|
|
1388
|
+
|
|
1389
|
+
ALWAYS 200: no address on file, no authorised mailbox and an opt-out all
|
|
1390
|
+
come back as `is_sendable: false` with a reason.
|
|
1391
|
+
|
|
1392
|
+
Resolving is not sending, and this route does neither a write nor a send.
|
|
1393
|
+
Call `/desk/decisions/{id}/send-reply` for that - it re-runs the opt-out
|
|
1394
|
+
check, because this answer is only as fresh as the moment it was asked.
|
|
1395
|
+
|
|
1396
|
+
**Input**
|
|
1397
|
+
|
|
1398
|
+
| Field | Type | Required | Description |
|
|
1399
|
+
|---|---|---|---|
|
|
1400
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
1401
|
+
|
|
1402
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1403
|
+
|
|
1404
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1405
|
+
|
|
1406
|
+
**Example**
|
|
1407
|
+
|
|
1408
|
+
```ts
|
|
1409
|
+
const result = await g8.api.desk.getDeskReplyTarget({ path: { decision_id: "id" } });
|
|
1410
|
+
```
|
|
1411
|
+
|
|
1412
|
+
---
|
|
1413
|
+
|
|
1414
|
+
<a id="op-getdesksmstarget"></a>
|
|
1415
|
+
|
|
1416
|
+
### `g8.api.desk.getDeskSmsTarget(input)`
|
|
1417
|
+
|
|
1418
|
+
**Get Desk Sms Target**
|
|
1419
|
+
|
|
1420
|
+
- HTTP: `POST /api/v1/desk/decisions/{decision_id}/sms-target`
|
|
1421
|
+
- operationId: `get_desk_sms_target_desk_decisions__decision_id__sms_target_post` (also callable as `g8.api.call("get_desk_sms_target_desk_decisions__decision_id__sms_target_post", input)`)
|
|
1422
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1423
|
+
- API-key scope: `deals:read`
|
|
1424
|
+
|
|
1425
|
+
Which number this card texts, and which number it texts FROM.
|
|
1426
|
+
|
|
1427
|
+
Always 200, same as the other two targets. Resolves; never sends.
|
|
1428
|
+
|
|
1429
|
+
**Input**
|
|
1430
|
+
|
|
1431
|
+
| Field | Type | Required | Description |
|
|
1432
|
+
|---|---|---|---|
|
|
1433
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
1434
|
+
|
|
1435
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1436
|
+
|
|
1437
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1438
|
+
|
|
1439
|
+
**Example**
|
|
1440
|
+
|
|
1441
|
+
```ts
|
|
1442
|
+
const result = await g8.api.desk.getDeskSmsTarget({ path: { decision_id: "id" } });
|
|
1443
|
+
```
|
|
1444
|
+
|
|
1445
|
+
---
|
|
1446
|
+
|
|
1447
|
+
<a id="op-getdeskwrapped"></a>
|
|
1448
|
+
|
|
1449
|
+
### `g8.api.desk.getDeskWrapped(input?)`
|
|
1450
|
+
|
|
1451
|
+
**Get Desk Wrapped**
|
|
1452
|
+
|
|
1453
|
+
- HTTP: `GET /api/v1/desk/wrapped`
|
|
1454
|
+
- operationId: `get_desk_wrapped_desk_wrapped_get` (also callable as `g8.api.call("get_desk_wrapped_desk_wrapped_get", input)`)
|
|
1455
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1456
|
+
- API-key scope: `deals:read`
|
|
1457
|
+
|
|
1458
|
+
This local ISO WEEK's numbers, best email and personal records.
|
|
1459
|
+
|
|
1460
|
+
Weekly, not daily, and the week boundary follows `tz_offset` - so a wrong
|
|
1461
|
+
offset can return last week's numbers around the weekend.
|
|
1462
|
+
|
|
1463
|
+
**Input**
|
|
1464
|
+
|
|
1465
|
+
| Field | Type | Required | Description |
|
|
1466
|
+
|---|---|---|---|
|
|
1467
|
+
| `query.tz_offset` | `integer` | no | The rep's UTC offset in MINUTES (local = UTC + tz_offset). The desk day is the rep's LOCAL day; a wrong offset silently returns the wrong day rather than erroring. default `0` |
|
|
1468
|
+
|
|
1469
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1470
|
+
|
|
1471
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1472
|
+
|
|
1473
|
+
**Example**
|
|
1474
|
+
|
|
1475
|
+
```ts
|
|
1476
|
+
const result = await g8.api.desk.getDeskWrapped();
|
|
1477
|
+
```
|
|
1478
|
+
|
|
1479
|
+
---
|
|
1480
|
+
|
|
1481
|
+
<a id="op-improvedeskemail"></a>
|
|
1482
|
+
|
|
1483
|
+
### `g8.api.desk.improveDeskEmail(input)`
|
|
1484
|
+
|
|
1485
|
+
**Improve Desk Email**
|
|
1486
|
+
|
|
1487
|
+
- HTTP: `POST /api/v1/desk/email-improve`
|
|
1488
|
+
- operationId: `improve_desk_email_desk_email_improve_post` (also callable as `g8.api.call("improve_desk_email_desk_email_improve_post", input)`)
|
|
1489
|
+
- Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
|
|
1490
|
+
- API-key scope: `deals:run`
|
|
1491
|
+
|
|
1492
|
+
Rewrite a draft, targeting the subscores it is failing.
|
|
1493
|
+
|
|
1494
|
+
Unlike `/desk/email-score` this one has no heuristic fallback: it is a
|
|
1495
|
+
model call or nothing. 400 when the org's `ai_briefs` switch is off, 502
|
|
1496
|
+
when the model could not answer.
|
|
1497
|
+
|
|
1498
|
+
**Input**
|
|
1499
|
+
|
|
1500
|
+
| Field | Type | Required | Description |
|
|
1501
|
+
|---|---|---|---|
|
|
1502
|
+
| `body` | `DeskEmailImproveRequest` | yes | Request body; fields below. |
|
|
1503
|
+
|
|
1504
|
+
Body fields (`DeskEmailImproveRequest`):
|
|
1505
|
+
|
|
1506
|
+
| Field | Type | Required | Description |
|
|
1507
|
+
|---|---|---|---|
|
|
1508
|
+
| `body.body` | `string` | yes | max length 50000 |
|
|
1509
|
+
| `body.subject` | `string` | no | default `""`, max length 1000 |
|
|
1510
|
+
|
|
1511
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1512
|
+
|
|
1513
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1514
|
+
|
|
1515
|
+
**Example**
|
|
1516
|
+
|
|
1517
|
+
```ts
|
|
1518
|
+
// billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
|
|
1519
|
+
const result = await g8.api.desk.improveDeskEmail({ body: { body: "example" } });
|
|
1520
|
+
```
|
|
1521
|
+
|
|
1522
|
+
---
|
|
1523
|
+
|
|
1524
|
+
<a id="op-listaccountplans"></a>
|
|
1525
|
+
|
|
1526
|
+
### `g8.api.desk.listAccountPlans(input?)`
|
|
1527
|
+
|
|
1528
|
+
**List Account Plans**
|
|
1529
|
+
|
|
1530
|
+
- HTTP: `GET /api/v1/desk/accounts/plans`
|
|
1531
|
+
- operationId: `list_account_plans_desk_accounts_plans_get` (also callable as `g8.api.call("list_account_plans_desk_accounts_plans_get", input)`)
|
|
1532
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1533
|
+
- API-key scope: `deals:read`
|
|
1534
|
+
|
|
1535
|
+
The Account Board: the latest plan version per account.
|
|
1536
|
+
|
|
1537
|
+
`mine=true` is resolved against the caller's own identity. For a MACHINE
|
|
1538
|
+
key that is nobody, so it returns nothing - which is correct rather than
|
|
1539
|
+
broken, and is why the default is false.
|
|
1540
|
+
|
|
1541
|
+
**Input**
|
|
1542
|
+
|
|
1543
|
+
| Field | Type | Required | Description |
|
|
1544
|
+
|---|---|---|---|
|
|
1545
|
+
| `query.status` | `"draft" \| "active" \| "paused" \| "archived" \| null` | no | Only plans in this status. |
|
|
1546
|
+
| `query.source` | `"all" \| "deals" \| "campaign" \| null` | no | Which board: `deals` (accounts with an open deal), `campaign` (requires `campaign_id`), or `all`. Omitted means all. |
|
|
1547
|
+
| `query.campaign_id` | `string \| null` | no | REQUIRED when `source=campaign`. |
|
|
1548
|
+
| `query.mine` | `boolean` | no | Only accounts this caller owns. Ownership is resolved BEFORE paging, so this changes the total rather than filtering a page. default `false` |
|
|
1549
|
+
| `query.limit` | `integer` | no | default `100` |
|
|
1550
|
+
| `query.offset` | `integer` | no | default `0` |
|
|
1551
|
+
|
|
1552
|
+
**Returns** `ApiResponse_AccountPlanListPayload_`: the envelope `{ data: AccountPlanListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1553
|
+
|
|
1554
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1555
|
+
|
|
1556
|
+
`AccountPlanListPayload` fields:
|
|
1557
|
+
|
|
1558
|
+
| Field | Type | Required | Description |
|
|
1559
|
+
|---|---|---|---|
|
|
1560
|
+
| `items` | `Array<unknown>` | no | |
|
|
1561
|
+
|
|
1562
|
+
**Example**
|
|
1563
|
+
|
|
1564
|
+
```ts
|
|
1565
|
+
const result = await g8.api.desk.listAccountPlans();
|
|
1566
|
+
```
|
|
1567
|
+
|
|
1568
|
+
---
|
|
1569
|
+
|
|
1570
|
+
<a id="op-listcommitteeplays"></a>
|
|
1571
|
+
|
|
1572
|
+
### `g8.api.desk.listCommitteePlays(input)`
|
|
1573
|
+
|
|
1574
|
+
**List Committee Plays**
|
|
1575
|
+
|
|
1576
|
+
- HTTP: `GET /api/v1/desk/accounts/{account_id}/committee/plays`
|
|
1577
|
+
- operationId: `list_committee_plays_desk_accounts__account_id__committee_plays_get` (also callable as `g8.api.call("list_committee_plays_desk_accounts__account_id__committee_plays_get", input)`)
|
|
1578
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1579
|
+
- API-key scope: `deals:read`
|
|
1580
|
+
|
|
1581
|
+
Workflows that can be fired at this account's committee.
|
|
1582
|
+
|
|
1583
|
+
Only the ones the desk would actually run - the listing applies the same
|
|
1584
|
+
filter the run does. Read-only; runs nothing.
|
|
1585
|
+
|
|
1586
|
+
**Input**
|
|
1587
|
+
|
|
1588
|
+
| Field | Type | Required | Description |
|
|
1589
|
+
|---|---|---|---|
|
|
1590
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
1591
|
+
|
|
1592
|
+
**Returns** `ApiResponse_AccountPlanListPayload_`: the envelope `{ data: AccountPlanListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1593
|
+
|
|
1594
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1595
|
+
|
|
1596
|
+
`AccountPlanListPayload` fields:
|
|
1597
|
+
|
|
1598
|
+
| Field | Type | Required | Description |
|
|
1599
|
+
|---|---|---|---|
|
|
1600
|
+
| `items` | `Array<unknown>` | no | |
|
|
1601
|
+
|
|
1602
|
+
**Example**
|
|
1603
|
+
|
|
1604
|
+
```ts
|
|
1605
|
+
const result = await g8.api.desk.listCommitteePlays({ path: { account_id: 1 } });
|
|
1606
|
+
```
|
|
1607
|
+
|
|
1608
|
+
---
|
|
1609
|
+
|
|
1610
|
+
<a id="op-listcompleteddeskdecisions"></a>
|
|
1611
|
+
|
|
1612
|
+
### `g8.api.desk.listCompletedDeskDecisions(input?)`
|
|
1613
|
+
|
|
1614
|
+
**List Completed Desk Decisions**
|
|
1615
|
+
|
|
1616
|
+
- HTTP: `GET /api/v1/desk/decisions/completed`
|
|
1617
|
+
- operationId: `list_completed_desk_decisions_desk_decisions_completed_get` (also callable as `g8.api.call("list_completed_desk_decisions_desk_decisions_completed_get", input)`)
|
|
1618
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1619
|
+
- API-key scope: `deals:read`
|
|
1620
|
+
|
|
1621
|
+
What this rep finished today, in their local day.
|
|
1622
|
+
|
|
1623
|
+
**Input**
|
|
1624
|
+
|
|
1625
|
+
| Field | Type | Required | Description |
|
|
1626
|
+
|---|---|---|---|
|
|
1627
|
+
| `query.limit` | `integer` | no | default `20` |
|
|
1628
|
+
| `query.tz_offset` | `integer` | no | The rep's UTC offset in MINUTES (local = UTC + tz_offset). A batch is scoped to the rep's local day; a wrong offset silently returns the wrong day rather than erroring. default `0` |
|
|
1629
|
+
|
|
1630
|
+
**Returns** `ApiResponse_DeskDecisionListResponse_`: the envelope `{ data: DeskDecisionListResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1631
|
+
|
|
1632
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1633
|
+
|
|
1634
|
+
`DeskDecisionListResponse` fields:
|
|
1635
|
+
|
|
1636
|
+
| Field | Type | Required | Description |
|
|
1637
|
+
|---|---|---|---|
|
|
1638
|
+
| `decisions` | `Array<DeskDecision>` | no | |
|
|
1639
|
+
| `total` | `integer` | no | default `0` |
|
|
1640
|
+
|
|
1641
|
+
**Example**
|
|
1642
|
+
|
|
1643
|
+
```ts
|
|
1644
|
+
const result = await g8.api.desk.listCompletedDeskDecisions();
|
|
1645
|
+
```
|
|
1646
|
+
|
|
1647
|
+
---
|
|
1648
|
+
|
|
1649
|
+
<a id="op-listdeskblocks"></a>
|
|
1650
|
+
|
|
1651
|
+
### `g8.api.desk.listDeskBlocks(input?)`
|
|
1652
|
+
|
|
1653
|
+
**List Desk Blocks**
|
|
1654
|
+
|
|
1655
|
+
- HTTP: `GET /api/v1/desk/blocks`
|
|
1656
|
+
- operationId: `list_desk_blocks_desk_blocks_get` (also callable as `g8.api.call("list_desk_blocks_desk_blocks_get", input)`)
|
|
1657
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1658
|
+
- API-key scope: `deals:read`
|
|
1659
|
+
|
|
1660
|
+
Dial passes due per list, from the redial ladder over call activity.
|
|
1661
|
+
|
|
1662
|
+
A "block" is batched calling work: one of the rep's pinned lists, plus how
|
|
1663
|
+
many of its contacts the ladder says are due a call today.
|
|
1664
|
+
|
|
1665
|
+
**Input**
|
|
1666
|
+
|
|
1667
|
+
| Field | Type | Required | Description |
|
|
1668
|
+
|---|---|---|---|
|
|
1669
|
+
| `query.tz_offset` | `integer` | no | The rep's UTC offset in MINUTES (local = UTC + tz_offset). The desk day is the rep's LOCAL day; a wrong offset silently returns the wrong day rather than erroring. default `0` |
|
|
1670
|
+
|
|
1671
|
+
**Returns** `ApiResponse_DeskListPayload_`: the envelope `{ data: DeskListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1672
|
+
|
|
1673
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1674
|
+
|
|
1675
|
+
`DeskListPayload` fields:
|
|
1676
|
+
|
|
1677
|
+
| Field | Type | Required | Description |
|
|
1678
|
+
|---|---|---|---|
|
|
1679
|
+
| `items` | `Array<unknown>` | no | |
|
|
1680
|
+
|
|
1681
|
+
**Example**
|
|
1682
|
+
|
|
1683
|
+
```ts
|
|
1684
|
+
const result = await g8.api.desk.listDeskBlocks();
|
|
1685
|
+
```
|
|
1686
|
+
|
|
1687
|
+
---
|
|
1688
|
+
|
|
1689
|
+
<a id="op-listdeskcardplays"></a>
|
|
1690
|
+
|
|
1691
|
+
### `g8.api.desk.listDeskCardPlays(input)`
|
|
1692
|
+
|
|
1693
|
+
**List Desk Card Plays**
|
|
1694
|
+
|
|
1695
|
+
- HTTP: `GET /api/v1/desk/decisions/{decision_id}/plays`
|
|
1696
|
+
- operationId: `list_desk_card_plays_desk_decisions__decision_id__plays_get` (also callable as `g8.api.call("list_desk_card_plays_desk_decisions__decision_id__plays_get", input)`)
|
|
1697
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1698
|
+
- API-key scope: `deals:read`
|
|
1699
|
+
|
|
1700
|
+
Workflows this card can run against its contact or company.
|
|
1701
|
+
|
|
1702
|
+
404 when the org has not enabled plays. Each entry carries the effects the
|
|
1703
|
+
play would have in plain words, which is what makes the run below a
|
|
1704
|
+
deliberate act rather than a guess.
|
|
1705
|
+
|
|
1706
|
+
**Input**
|
|
1707
|
+
|
|
1708
|
+
| Field | Type | Required | Description |
|
|
1709
|
+
|---|---|---|---|
|
|
1710
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
1711
|
+
|
|
1712
|
+
**Returns** `ApiResponse_DeskListPayload_`: the envelope `{ data: DeskListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1713
|
+
|
|
1714
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1715
|
+
|
|
1716
|
+
`DeskListPayload` fields:
|
|
1717
|
+
|
|
1718
|
+
| Field | Type | Required | Description |
|
|
1719
|
+
|---|---|---|---|
|
|
1720
|
+
| `items` | `Array<unknown>` | no | |
|
|
1721
|
+
|
|
1722
|
+
**Example**
|
|
1723
|
+
|
|
1724
|
+
```ts
|
|
1725
|
+
const result = await g8.api.desk.listDeskCardPlays({ path: { decision_id: "id" } });
|
|
1726
|
+
```
|
|
1727
|
+
|
|
1728
|
+
---
|
|
1729
|
+
|
|
1730
|
+
<a id="op-listdeskdecisions"></a>
|
|
1731
|
+
|
|
1732
|
+
### `g8.api.desk.listDeskDecisions(input?)`
|
|
1733
|
+
|
|
1734
|
+
**List Desk Decisions**
|
|
1735
|
+
|
|
1736
|
+
- HTTP: `GET /api/v1/desk/decisions`
|
|
1737
|
+
- operationId: `list_desk_decisions_desk_decisions_get` (also callable as `g8.api.call("list_desk_decisions_desk_decisions_get", input)`)
|
|
1738
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1739
|
+
- API-key scope: `deals:read`
|
|
1740
|
+
|
|
1741
|
+
This rep's pending queue, ranked.
|
|
1742
|
+
|
|
1743
|
+
`source_group` and `source` are a family/exact pair, not synonyms:
|
|
1744
|
+
`source_group=forms` matches every form signal, `source=form_submitted`
|
|
1745
|
+
matches one.
|
|
1746
|
+
|
|
1747
|
+
An omitted filter is passed as a real `None`. The app's own comment warns
|
|
1748
|
+
that a `Query(None)` sentinel is TRUTHY and would reach the repository as
|
|
1749
|
+
a filter value - so absent must stay absent all the way down.
|
|
1750
|
+
|
|
1751
|
+
**Input**
|
|
1752
|
+
|
|
1753
|
+
| Field | Type | Required | Description |
|
|
1754
|
+
|---|---|---|---|
|
|
1755
|
+
| `query.decision_type` | `string \| null` | no | Filter by decision type. |
|
|
1756
|
+
| `query.source_group` | `string \| null` | no | Filter by signal FAMILY, e.g. "forms" or "website". |
|
|
1757
|
+
| `query.source` | `string \| null` | no | Filter by EXACT signal id, e.g. "form_submitted". |
|
|
1758
|
+
| `query.limit` | `integer` | no | default `20` |
|
|
1759
|
+
| `query.offset` | `integer` | no | default `0` |
|
|
1760
|
+
|
|
1761
|
+
**Returns** `ApiResponse_DeskDecisionListResponse_`: the envelope `{ data: DeskDecisionListResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1762
|
+
|
|
1763
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1764
|
+
|
|
1765
|
+
`DeskDecisionListResponse` fields:
|
|
1766
|
+
|
|
1767
|
+
| Field | Type | Required | Description |
|
|
1768
|
+
|---|---|---|---|
|
|
1769
|
+
| `decisions` | `Array<DeskDecision>` | no | |
|
|
1770
|
+
| `total` | `integer` | no | default `0` |
|
|
1771
|
+
|
|
1772
|
+
**Example**
|
|
1773
|
+
|
|
1774
|
+
```ts
|
|
1775
|
+
const result = await g8.api.desk.listDeskDecisions();
|
|
1776
|
+
```
|
|
1777
|
+
|
|
1778
|
+
---
|
|
1779
|
+
|
|
1780
|
+
<a id="op-listdeskplayapprovals"></a>
|
|
1781
|
+
|
|
1782
|
+
### `g8.api.desk.listDeskPlayApprovals(input?)`
|
|
1783
|
+
|
|
1784
|
+
**List Desk Play Approvals**
|
|
1785
|
+
|
|
1786
|
+
- HTTP: `GET /api/v1/desk/plays/approvals`
|
|
1787
|
+
- operationId: `list_desk_play_approvals_desk_plays_approvals_get` (also callable as `g8.api.call("list_desk_play_approvals_desk_plays_approvals_get", input)`)
|
|
1788
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1789
|
+
- API-key scope: `deals:read`
|
|
1790
|
+
|
|
1791
|
+
Workflow runs THIS rep started that are paused for a human decision.
|
|
1792
|
+
|
|
1793
|
+
Empty list when the org has not enabled plays - this is a read, so a gated
|
|
1794
|
+
org gets a quiet 200 empty list rather than a 404 (g8 #19786; the paired
|
|
1795
|
+
`decide` action still 404s for a gated org). A reachable-but-unhappy engine
|
|
1796
|
+
instead returns an empty list with `engine_unreachable: true`, so "nothing
|
|
1797
|
+
waiting" and "cannot tell" are distinguishable rather than both rendering as
|
|
1798
|
+
a quiet panel.
|
|
1799
|
+
|
|
1800
|
+
**Input**: none.
|
|
1801
|
+
|
|
1802
|
+
**Returns** `ApiResponse_DeskListPayload_`: the envelope `{ data: DeskListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1803
|
+
|
|
1804
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1805
|
+
|
|
1806
|
+
`DeskListPayload` fields:
|
|
1807
|
+
|
|
1808
|
+
| Field | Type | Required | Description |
|
|
1809
|
+
|---|---|---|---|
|
|
1810
|
+
| `items` | `Array<unknown>` | no | |
|
|
1811
|
+
|
|
1812
|
+
**Example**
|
|
1813
|
+
|
|
1814
|
+
```ts
|
|
1815
|
+
const result = await g8.api.desk.listDeskPlayApprovals();
|
|
1816
|
+
```
|
|
1817
|
+
|
|
1818
|
+
---
|
|
1819
|
+
|
|
1820
|
+
<a id="op-listdeskupcoming"></a>
|
|
1821
|
+
|
|
1822
|
+
### `g8.api.desk.listDeskUpcoming(input?)`
|
|
1823
|
+
|
|
1824
|
+
**List Desk Upcoming**
|
|
1825
|
+
|
|
1826
|
+
- HTTP: `GET /api/v1/desk/upcoming`
|
|
1827
|
+
- operationId: `list_desk_upcoming_desk_upcoming_get` (also callable as `g8.api.call("list_desk_upcoming_desk_upcoming_get", input)`)
|
|
1828
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1829
|
+
- API-key scope: `deals:read`
|
|
1830
|
+
|
|
1831
|
+
Plan steps beyond the card horizon - what lands after today.
|
|
1832
|
+
|
|
1833
|
+
Empty when nothing is ahead, which is a different statement from an empty
|
|
1834
|
+
QUEUE: the queue is what is due now, this is what is coming.
|
|
1835
|
+
|
|
1836
|
+
**Input**: none.
|
|
1837
|
+
|
|
1838
|
+
**Returns** `ApiResponse_DeskListPayload_`: the envelope `{ data: DeskListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1839
|
+
|
|
1840
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1841
|
+
|
|
1842
|
+
`DeskListPayload` fields:
|
|
1843
|
+
|
|
1844
|
+
| Field | Type | Required | Description |
|
|
1845
|
+
|---|---|---|---|
|
|
1846
|
+
| `items` | `Array<unknown>` | no | |
|
|
1847
|
+
|
|
1848
|
+
**Example**
|
|
1849
|
+
|
|
1850
|
+
```ts
|
|
1851
|
+
const result = await g8.api.desk.listDeskUpcoming();
|
|
1852
|
+
```
|
|
1853
|
+
|
|
1854
|
+
---
|
|
1855
|
+
|
|
1856
|
+
<a id="op-markdeskkickoffplayed"></a>
|
|
1857
|
+
|
|
1858
|
+
### `g8.api.desk.markDeskKickoffPlayed(input?)`
|
|
1859
|
+
|
|
1860
|
+
**Mark Desk Kickoff Played**
|
|
1861
|
+
|
|
1862
|
+
- HTTP: `POST /api/v1/desk/kickoff/played`
|
|
1863
|
+
- operationId: `mark_desk_kickoff_played_desk_kickoff_played_post` (also callable as `g8.api.call("mark_desk_kickoff_played_desk_kickoff_played_post", input)`)
|
|
1864
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1865
|
+
- API-key scope: `deals:write`
|
|
1866
|
+
|
|
1867
|
+
Mark today's kickoff as played, so it does not auto-replay.
|
|
1868
|
+
|
|
1869
|
+
A 48-hour flag, not a permanent one.
|
|
1870
|
+
|
|
1871
|
+
**Input**
|
|
1872
|
+
|
|
1873
|
+
| Field | Type | Required | Description |
|
|
1874
|
+
|---|---|---|---|
|
|
1875
|
+
| `query.tz_offset` | `integer` | no | The rep's UTC offset in MINUTES (local = UTC + tz_offset). The desk day is the rep's LOCAL day; a wrong offset silently returns the wrong day rather than erroring. default `0` |
|
|
1876
|
+
|
|
1877
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1878
|
+
|
|
1879
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1880
|
+
|
|
1881
|
+
**Example**
|
|
1882
|
+
|
|
1883
|
+
```ts
|
|
1884
|
+
const result = await g8.api.desk.markDeskKickoffPlayed();
|
|
1885
|
+
```
|
|
1886
|
+
|
|
1887
|
+
---
|
|
1888
|
+
|
|
1889
|
+
<a id="op-postdeskvoicememo"></a>
|
|
1890
|
+
|
|
1891
|
+
### `g8.api.desk.postDeskVoiceMemo(input?)`
|
|
1892
|
+
|
|
1893
|
+
**Post Desk Voice Memo**
|
|
1894
|
+
|
|
1895
|
+
- HTTP: `POST /api/v1/desk/voice-memo`
|
|
1896
|
+
- operationId: `post_desk_voice_memo_desk_voice_memo_post` (also callable as `g8.api.call("post_desk_voice_memo_desk_voice_memo_post", input)`)
|
|
1897
|
+
- Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
|
|
1898
|
+
- API-key scope: `deals:run`
|
|
1899
|
+
|
|
1900
|
+
SPENDS CREDITS. Transcribe a voice memo and turn it into desk actions.
|
|
1901
|
+
|
|
1902
|
+
Multipart, like the app. The memo is transcribed, its actions extracted by
|
|
1903
|
+
a model, and the result materialised as cards and tasks for this rep - the
|
|
1904
|
+
credits are charged per memo. 400 on an empty upload, 413 over 5 MB, 403
|
|
1905
|
+
when `deal_id` names a deal this rep may not write, 502 when transcription
|
|
1906
|
+
or extraction failed (nothing is materialised then).
|
|
1907
|
+
|
|
1908
|
+
**Input**: none.
|
|
1909
|
+
|
|
1910
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1911
|
+
|
|
1912
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1913
|
+
|
|
1914
|
+
**Example**
|
|
1915
|
+
|
|
1916
|
+
```ts
|
|
1917
|
+
// billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
|
|
1918
|
+
const result = await g8.api.desk.postDeskVoiceMemo();
|
|
1919
|
+
```
|
|
1920
|
+
|
|
1921
|
+
---
|
|
1922
|
+
|
|
1923
|
+
<a id="op-previewaccountplan"></a>
|
|
1924
|
+
|
|
1925
|
+
### `g8.api.desk.previewAccountPlan(input)`
|
|
1926
|
+
|
|
1927
|
+
**Preview Account Plan**
|
|
1928
|
+
|
|
1929
|
+
- HTTP: `POST /api/v1/desk/accounts/{account_id}/plan/preview`
|
|
1930
|
+
- operationId: `preview_account_plan_desk_accounts__account_id__plan_preview_post` (also callable as `g8.api.call("preview_account_plan_desk_accounts__account_id__plan_preview_post", input)`)
|
|
1931
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1932
|
+
- API-key scope: `deals:read`
|
|
1933
|
+
|
|
1934
|
+
Diff a proposed plan against the current version. WRITES NOTHING.
|
|
1935
|
+
|
|
1936
|
+
POST only because the proposed plan is a body. It persists nothing, spends
|
|
1937
|
+
nothing and does not consume the signal-replanner cooldown, so it is tiered
|
|
1938
|
+
a READ - a read-only key must be able to see what an apply would change
|
|
1939
|
+
before anyone applies it.
|
|
1940
|
+
|
|
1941
|
+
**Input**
|
|
1942
|
+
|
|
1943
|
+
| Field | Type | Required | Description |
|
|
1944
|
+
|---|---|---|---|
|
|
1945
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
1946
|
+
| `body` | `AccountPlanPreviewRequest` | yes | Request body; fields below. |
|
|
1947
|
+
|
|
1948
|
+
Body fields (`AccountPlanPreviewRequest`):
|
|
1949
|
+
|
|
1950
|
+
| Field | Type | Required | Description |
|
|
1951
|
+
|---|---|---|---|
|
|
1952
|
+
| `body.instruction` | `string \| null` | no | Free-text note echoed back with the diff. |
|
|
1953
|
+
| `body.proposed_plan` | `Array<AccountPlanStep>` | no | |
|
|
1954
|
+
|
|
1955
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1956
|
+
|
|
1957
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1958
|
+
|
|
1959
|
+
**Example**
|
|
1960
|
+
|
|
1961
|
+
```ts
|
|
1962
|
+
const result = await g8.api.desk.previewAccountPlan({ path: { account_id: 1 }, body: {} });
|
|
1963
|
+
```
|
|
1964
|
+
|
|
1965
|
+
---
|
|
1966
|
+
|
|
1967
|
+
<a id="op-pulldeskbatch"></a>
|
|
1968
|
+
|
|
1969
|
+
### `g8.api.desk.pullDeskBatch(input)`
|
|
1970
|
+
|
|
1971
|
+
**Pull Desk Batch**
|
|
1972
|
+
|
|
1973
|
+
- HTTP: `POST /api/v1/desk/batch/pull`
|
|
1974
|
+
- operationId: `pull_desk_batch_desk_batch_pull_post` (also callable as `g8.api.call("pull_desk_batch_desk_batch_pull_post", input)`)
|
|
1975
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1976
|
+
- API-key scope: `deals:write`
|
|
1977
|
+
|
|
1978
|
+
Append more cards to today's existing batch.
|
|
1979
|
+
|
|
1980
|
+
Capped lower than `start` (40 vs 80) on purpose: pulling is a top-up, not
|
|
1981
|
+
a second day.
|
|
1982
|
+
|
|
1983
|
+
**Input**
|
|
1984
|
+
|
|
1985
|
+
| Field | Type | Required | Description |
|
|
1986
|
+
|---|---|---|---|
|
|
1987
|
+
| `body` | `DeskBatchPullRequest` | yes | Request body; fields below. |
|
|
1988
|
+
|
|
1989
|
+
Body fields (`DeskBatchPullRequest`):
|
|
1990
|
+
|
|
1991
|
+
| Field | Type | Required | Description |
|
|
1992
|
+
|---|---|---|---|
|
|
1993
|
+
| `body.item_ids` | `Array<string (uuid)>` | yes | Decision ids to append. 1-40 - a smaller cap than start, by design. min items 1, max items 40 |
|
|
1994
|
+
| `body.tz_offset` | `integer` | no | The rep's UTC offset in minutes. default `0`, min -840, max 840 |
|
|
1995
|
+
|
|
1996
|
+
**Returns** `ApiResponse_DeskBatch_`: the envelope `{ data: DeskBatch, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1997
|
+
|
|
1998
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1999
|
+
|
|
2000
|
+
`DeskBatch` fields:
|
|
2001
|
+
|
|
2002
|
+
| Field | Type | Required | Description |
|
|
2003
|
+
|---|---|---|---|
|
|
2004
|
+
| `completed` | `integer \| null` | no | |
|
|
2005
|
+
| `completed_at` | `string (date-time) \| null` | no | |
|
|
2006
|
+
| `id` | `string \| null` | no | |
|
|
2007
|
+
| `item_ids` | `Array<string>` | no | |
|
|
2008
|
+
| `remaining` | `integer \| null` | no | |
|
|
2009
|
+
| `started_at` | `string (date-time) \| null` | no | |
|
|
2010
|
+
| `status` | `string \| null` | no | |
|
|
2011
|
+
| `total` | `integer \| null` | no | |
|
|
2012
|
+
|
|
2013
|
+
**Example**
|
|
2014
|
+
|
|
2015
|
+
```ts
|
|
2016
|
+
const result = await g8.api.desk.pullDeskBatch({ body: { item_ids: ["00000000-0000-0000-0000-000000000000"] } });
|
|
2017
|
+
```
|
|
2018
|
+
|
|
2019
|
+
---
|
|
2020
|
+
|
|
2021
|
+
<a id="op-replandeskdecision"></a>
|
|
2022
|
+
|
|
2023
|
+
### `g8.api.desk.replanDeskDecision(input)`
|
|
2024
|
+
|
|
2025
|
+
**Replan Desk Decision**
|
|
2026
|
+
|
|
2027
|
+
- HTTP: `POST /api/v1/desk/decisions/{decision_id}/replan`
|
|
2028
|
+
- operationId: `replan_desk_decision_desk_decisions__decision_id__replan_post` (also callable as `g8.api.call("replan_desk_decision_desk_decisions__decision_id__replan_post", input)`)
|
|
2029
|
+
- Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
|
|
2030
|
+
- API-key scope: `deals:run`
|
|
2031
|
+
|
|
2032
|
+
SPENDS CREDITS. Gather fresh evidence and write a NEW plan version.
|
|
2033
|
+
|
|
2034
|
+
Rep-pressed only; nothing automatic reaches this. It rides the org's
|
|
2035
|
+
existing `account_plan_replan` switch, the per-account 24-hour cooldown and
|
|
2036
|
+
the org's daily cap, and a press cannot bypass any of them.
|
|
2037
|
+
|
|
2038
|
+
A refusal from a gate is a 409 and costs NOTHING. A failure after the model
|
|
2039
|
+
answered may already have been charged, and says so in the response. There
|
|
2040
|
+
is no retry anywhere in this path, so a 409 means stop rather than try
|
|
2041
|
+
again.
|
|
2042
|
+
|
|
2043
|
+
**Input**
|
|
2044
|
+
|
|
2045
|
+
| Field | Type | Required | Description |
|
|
2046
|
+
|---|---|---|---|
|
|
2047
|
+
| `path.decision_id` | `string` | yes | Plan-review decision id (UUID). |
|
|
2048
|
+
|
|
2049
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2050
|
+
|
|
2051
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2052
|
+
|
|
2053
|
+
**Example**
|
|
2054
|
+
|
|
2055
|
+
```ts
|
|
2056
|
+
// billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
|
|
2057
|
+
const result = await g8.api.desk.replanDeskDecision({ path: { decision_id: "id" } });
|
|
2058
|
+
```
|
|
2059
|
+
|
|
2060
|
+
---
|
|
2061
|
+
|
|
2062
|
+
<a id="op-resolvedeskdecision"></a>
|
|
2063
|
+
|
|
2064
|
+
### `g8.api.desk.resolveDeskDecision(input)`
|
|
2065
|
+
|
|
2066
|
+
**Resolve Desk Decision**
|
|
2067
|
+
|
|
2068
|
+
- HTTP: `POST /api/v1/desk/decisions/{decision_id}/resolve`
|
|
2069
|
+
- operationId: `resolve_desk_decision_desk_decisions__decision_id__resolve_post` (also callable as `g8.api.call("resolve_desk_decision_desk_decisions__decision_id__resolve_post", input)`)
|
|
2070
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
2071
|
+
- API-key scope: `deals:write`
|
|
2072
|
+
|
|
2073
|
+
Resolve a pending card.
|
|
2074
|
+
|
|
2075
|
+
`snoozed_until` is REQUIRED when `status=snoozed` - it is the fallback
|
|
2076
|
+
timeout even when `wake_condition` is set, so a snooze can never be
|
|
2077
|
+
indefinite. The app enforces that; this surface does not second-guess it,
|
|
2078
|
+
it forwards the request and lets the single enforcement point answer.
|
|
2079
|
+
|
|
2080
|
+
**Input**
|
|
2081
|
+
|
|
2082
|
+
| Field | Type | Required | Description |
|
|
2083
|
+
|---|---|---|---|
|
|
2084
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
2085
|
+
| `body` | `DeskResolveRequest` | yes | Request body; fields below. |
|
|
2086
|
+
|
|
2087
|
+
Body fields (`DeskResolveRequest`):
|
|
2088
|
+
|
|
2089
|
+
| Field | Type | Required | Description |
|
|
2090
|
+
|---|---|---|---|
|
|
2091
|
+
| `body.status` | `string` | yes | approved, edited, skipped, deferred, snoozed or done_already. A status the app does not accept is a 400 rather than being silently dropped, which is why this is an open string and not an enum this surface would have to keep in lock-step. `done_already` resolves the card AND records the work on its entity. |
|
|
2092
|
+
| `body.action_taken` | `Record<string, unknown> \| null` | no | Action payload, e.g. the edited email body. |
|
|
2093
|
+
| `body.snoozed_until` | `string (date-time) \| null` | no | REQUIRED when status=snoozed. Wake time, UTC. |
|
|
2094
|
+
| `body.wake_condition` | `string \| null` | no | Early-wake condition, valid only with status=snoozed: reply \| site_visit \| stage_change. `snoozed_until` stays required as the fallback timeout. `stage_change` is accepted but only wakes via that timeout today - no deal-stage-change event reaches the desk signal consumer yet. |
|
|
2095
|
+
|
|
2096
|
+
**Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2097
|
+
|
|
2098
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2099
|
+
|
|
2100
|
+
**Example**
|
|
2101
|
+
|
|
2102
|
+
```ts
|
|
2103
|
+
const result = await g8.api.desk.resolveDeskDecision({ path: { decision_id: "id" }, body: { status: "example" } });
|
|
2104
|
+
```
|
|
2105
|
+
|
|
2106
|
+
---
|
|
2107
|
+
|
|
2108
|
+
<a id="op-revivedesklistgoal"></a>
|
|
2109
|
+
|
|
2110
|
+
### `g8.api.desk.reviveDeskListGoal(input)`
|
|
2111
|
+
|
|
2112
|
+
**Revive Desk List Goal**
|
|
2113
|
+
|
|
2114
|
+
- HTTP: `POST /api/v1/desk/list-goals/{list_id}/revive`
|
|
2115
|
+
- operationId: `revive_desk_list_goal_desk_list_goals__list_id__revive_post` (also callable as `g8.api.call("revive_desk_list_goal_desk_list_goals__list_id__revive_post", input)`)
|
|
2116
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
2117
|
+
- API-key scope: `deals:write`
|
|
2118
|
+
|
|
2119
|
+
"I am carrying on today" - keep dialling past a met goal.
|
|
2120
|
+
|
|
2121
|
+
Does NOT clear or raise the target. The goal stays what it was and stays
|
|
2122
|
+
met; this only stops the desk treating the list as finished for the rest
|
|
2123
|
+
of the rep's local day.
|
|
2124
|
+
|
|
2125
|
+
**Input**
|
|
2126
|
+
|
|
2127
|
+
| Field | Type | Required | Description |
|
|
2128
|
+
|---|---|---|---|
|
|
2129
|
+
| `path.list_id` | `integer` | yes | Dial list (audience) id. |
|
|
2130
|
+
| `query.tz_offset` | `integer` | no | The rep's UTC offset in MINUTES (local = UTC + tz_offset). The desk day is the rep's LOCAL day; a wrong offset silently returns the wrong day rather than erroring. default `0` |
|
|
2131
|
+
|
|
2132
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2133
|
+
|
|
2134
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2135
|
+
|
|
2136
|
+
**Example**
|
|
2137
|
+
|
|
2138
|
+
```ts
|
|
2139
|
+
const result = await g8.api.desk.reviveDeskListGoal({ path: { list_id: 123 } });
|
|
2140
|
+
```
|
|
2141
|
+
|
|
2142
|
+
---
|
|
2143
|
+
|
|
2144
|
+
<a id="op-runcommitteeplay"></a>
|
|
2145
|
+
|
|
2146
|
+
### `g8.api.desk.runCommitteePlay(input)`
|
|
2147
|
+
|
|
2148
|
+
**Run Committee Play**
|
|
2149
|
+
|
|
2150
|
+
- HTTP: `POST /api/v1/desk/accounts/{account_id}/committee/plays/{action_id}/run`
|
|
2151
|
+
- operationId: `run_committee_play_desk_accounts__account_id__committee_plays__action_id__run_post` (also callable as `g8.api.call("run_committee_play_desk_accounts__account_id__committee_plays__action_id__run_post", input)`)
|
|
2152
|
+
- Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
|
|
2153
|
+
- API-key scope: `deals:run`
|
|
2154
|
+
|
|
2155
|
+
Fire one workflow at EVERY REACHABLE COMMITTEE MEMBER. One run each.
|
|
2156
|
+
|
|
2157
|
+
This is the fan-out on this surface, and it is why the operation is not a
|
|
2158
|
+
plain write: one call becomes one workflow execution per person, and a
|
|
2159
|
+
workflow can email or message. Read `.../check` first - it names exactly
|
|
2160
|
+
who this would reach.
|
|
2161
|
+
|
|
2162
|
+
IDEMPOTENT per (org, account, play, member) for one hour, so a retried
|
|
2163
|
+
press does not double up on anyone. 409 is a refusal with nothing fired,
|
|
2164
|
+
not a failure.
|
|
2165
|
+
|
|
2166
|
+
**Input**
|
|
2167
|
+
|
|
2168
|
+
| Field | Type | Required | Description |
|
|
2169
|
+
|---|---|---|---|
|
|
2170
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
2171
|
+
| `path.action_id` | `string` | yes | Play id, from `.../committee/plays`. |
|
|
2172
|
+
|
|
2173
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2174
|
+
|
|
2175
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2176
|
+
|
|
2177
|
+
**Example**
|
|
2178
|
+
|
|
2179
|
+
```ts
|
|
2180
|
+
// external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
|
|
2181
|
+
const result = await g8.api.desk.runCommitteePlay({ path: { account_id: 1, action_id: "id" } });
|
|
2182
|
+
```
|
|
2183
|
+
|
|
2184
|
+
---
|
|
2185
|
+
|
|
2186
|
+
<a id="op-rundeskcardplay"></a>
|
|
2187
|
+
|
|
2188
|
+
### `g8.api.desk.runDeskCardPlay(input)`
|
|
2189
|
+
|
|
2190
|
+
**Run Desk Card Play**
|
|
2191
|
+
|
|
2192
|
+
- HTTP: `POST /api/v1/desk/decisions/{decision_id}/plays/{action_id}/run`
|
|
2193
|
+
- operationId: `run_desk_card_play_desk_decisions__decision_id__plays__action_id__run_post` (also callable as `g8.api.call("run_desk_card_play_desk_decisions__decision_id__plays__action_id__run_post", input)`)
|
|
2194
|
+
- Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
|
|
2195
|
+
- API-key scope: `deals:run`
|
|
2196
|
+
|
|
2197
|
+
Run one play against this card's entity. REACHES THE OUTSIDE WORLD.
|
|
2198
|
+
|
|
2199
|
+
A play is a workflow, and a workflow can email, send a LinkedIn message or
|
|
2200
|
+
push to a third party. That is why this is not a plain write: the grant to
|
|
2201
|
+
fire one is the grant to have graph8 act on a customer's behalf.
|
|
2202
|
+
|
|
2203
|
+
IDEMPOTENT per (org, card, play) for one hour, so a retried press does not
|
|
2204
|
+
fire twice. The play is re-validated against this card's own eligible list,
|
|
2205
|
+
so an `action_id` the listing hides cannot be run by posting it directly,
|
|
2206
|
+
and the workflow's steps are re-read fresh on every press rather than from
|
|
2207
|
+
the listing's cache.
|
|
2208
|
+
|
|
2209
|
+
409 is a refusal, not a failure: the workflow exists and the caller may see
|
|
2210
|
+
it, the desk just will not fire it - and nothing has spent at that point.
|
|
2211
|
+
|
|
2212
|
+
**Input**
|
|
2213
|
+
|
|
2214
|
+
| Field | Type | Required | Description |
|
|
2215
|
+
|---|---|---|---|
|
|
2216
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
2217
|
+
| `path.action_id` | `string` | yes | Play id, from `/desk/decisions/{id}/plays`. |
|
|
2218
|
+
|
|
2219
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2220
|
+
|
|
2221
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2222
|
+
|
|
2223
|
+
**Example**
|
|
2224
|
+
|
|
2225
|
+
```ts
|
|
2226
|
+
// external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
|
|
2227
|
+
const result = await g8.api.desk.runDeskCardPlay({ path: { decision_id: "id", action_id: "id" } });
|
|
2228
|
+
```
|
|
2229
|
+
|
|
2230
|
+
---
|
|
2231
|
+
|
|
2232
|
+
<a id="op-rundeskplanstagesweep"></a>
|
|
2233
|
+
|
|
2234
|
+
### `g8.api.desk.runDeskPlanStageSweep(input?)`
|
|
2235
|
+
|
|
2236
|
+
**Run Desk Plan Stage Sweep**
|
|
2237
|
+
|
|
2238
|
+
- HTTP: `POST /api/v1/desk/org-settings/plan-stages/run`
|
|
2239
|
+
- operationId: `run_desk_plan_stage_sweep_desk_org_settings_plan_stages_run_post` (also callable as `g8.api.call("run_desk_plan_stage_sweep_desk_org_settings_plan_stages_run_post", input)`)
|
|
2240
|
+
- Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
|
|
2241
|
+
- API-key scope: `deals:run`
|
|
2242
|
+
|
|
2243
|
+
CHARGED, AND IT ACTS ON MANY DEALS AT ONCE.
|
|
2244
|
+
|
|
2245
|
+
One model call per plan, capped at 100 credits each, for every open deal
|
|
2246
|
+
already sitting in the org's plan-required stages - stopping at the org's
|
|
2247
|
+
daily cap. That is the difference between this and every other write on
|
|
2248
|
+
the desk: the spend scales with the org's pipeline rather than being one
|
|
2249
|
+
unit of work.
|
|
2250
|
+
|
|
2251
|
+
Call `/desk/org-settings/plan-stages/check` first; it counts and costs
|
|
2252
|
+
nothing. A second press inside the hour buys nothing (the per-deal
|
|
2253
|
+
cooldown), and a press while a sweep is running returns
|
|
2254
|
+
`stopped: "already_running"` having written nothing.
|
|
2255
|
+
|
|
2256
|
+
**Input**
|
|
2257
|
+
|
|
2258
|
+
| Field | Type | Required | Description |
|
|
2259
|
+
|---|---|---|---|
|
|
2260
|
+
| `query.limit` | `integer \| null` | no | Plan at most this many deals in this press. Omitted means up to the daily cap. |
|
|
2261
|
+
|
|
2262
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2263
|
+
|
|
2264
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2265
|
+
|
|
2266
|
+
**Example**
|
|
2267
|
+
|
|
2268
|
+
```ts
|
|
2269
|
+
// billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
|
|
2270
|
+
const result = await g8.api.desk.runDeskPlanStageSweep();
|
|
2271
|
+
```
|
|
2272
|
+
|
|
2273
|
+
---
|
|
2274
|
+
|
|
2275
|
+
<a id="op-scoredeskemail"></a>
|
|
2276
|
+
|
|
2277
|
+
### `g8.api.desk.scoreDeskEmail(input)`
|
|
2278
|
+
|
|
2279
|
+
**Score Desk Email**
|
|
2280
|
+
|
|
2281
|
+
- HTTP: `POST /api/v1/desk/email-score`
|
|
2282
|
+
- operationId: `score_desk_email_desk_email_score_post` (also callable as `g8.api.call("score_desk_email_desk_email_score_post", input)`)
|
|
2283
|
+
- Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
|
|
2284
|
+
- API-key scope: `deals:run`
|
|
2285
|
+
|
|
2286
|
+
Score a draft 0-100: heuristics for 60%, a model read for 40%.
|
|
2287
|
+
|
|
2288
|
+
Never fails for model reasons - with the org's `ai_briefs` switch off, or
|
|
2289
|
+
the model unavailable, it returns the heuristic score alone rather than an
|
|
2290
|
+
error. So a 200 here does not prove the AI half ran.
|
|
2291
|
+
|
|
2292
|
+
**Input**
|
|
2293
|
+
|
|
2294
|
+
| Field | Type | Required | Description |
|
|
2295
|
+
|---|---|---|---|
|
|
2296
|
+
| `body` | `DeskEmailScoreRequest` | yes | Request body; fields below. |
|
|
2297
|
+
|
|
2298
|
+
Body fields (`DeskEmailScoreRequest`):
|
|
2299
|
+
|
|
2300
|
+
| Field | Type | Required | Description |
|
|
2301
|
+
|---|---|---|---|
|
|
2302
|
+
| `body.body` | `string` | yes | max length 50000 |
|
|
2303
|
+
| `body.contact_name` | `string \| null` | no | Recipient name, used for the personalisation subscore. max length 200 |
|
|
2304
|
+
| `body.subject` | `string` | no | default `""`, max length 1000 |
|
|
2305
|
+
|
|
2306
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2307
|
+
|
|
2308
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2309
|
+
|
|
2310
|
+
**Example**
|
|
2311
|
+
|
|
2312
|
+
```ts
|
|
2313
|
+
// billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
|
|
2314
|
+
const result = await g8.api.desk.scoreDeskEmail({ body: { body: "example" } });
|
|
2315
|
+
```
|
|
2316
|
+
|
|
2317
|
+
---
|
|
2318
|
+
|
|
2319
|
+
<a id="op-sendcommitteelinkedininvite"></a>
|
|
2320
|
+
|
|
2321
|
+
### `g8.api.desk.sendCommitteeLinkedinInvite(input)`
|
|
2322
|
+
|
|
2323
|
+
**Send Committee Linkedin Invite**
|
|
2324
|
+
|
|
2325
|
+
- HTTP: `POST /api/v1/desk/accounts/{account_id}/committee/{contact_id}/linkedin-invite`
|
|
2326
|
+
- operationId: `send_committee_linkedin_invite_desk_accounts__account_id__committee__contact_id__linkedin_invite_post` (also callable as `g8.api.call("send_committee_linkedin_invite_desk_accounts__account_id__committee__contact_id__linkedin_invite_post", input)`)
|
|
2327
|
+
- Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
|
|
2328
|
+
- API-key scope: `deals:run`
|
|
2329
|
+
|
|
2330
|
+
REACHES A REAL PERSON on LinkedIn, from the rep's own account.
|
|
2331
|
+
|
|
2332
|
+
Costs no credits, and that is not the point: a connection request arrives
|
|
2333
|
+
in someone's notifications under a named human's identity and CANNOT BE
|
|
2334
|
+
WITHDRAWN. That is why it is tiered alongside the sends rather than with
|
|
2335
|
+
the writes.
|
|
2336
|
+
|
|
2337
|
+
The sender is the rep's OWN claimed LinkedIn account, resolved strictly -
|
|
2338
|
+
it fails closed rather than falling back to whichever account the org
|
|
2339
|
+
connected first. Claim one with `PUT /desk/linkedin-sender`.
|
|
2340
|
+
|
|
2341
|
+
409 on every refusal, with nothing queued: no sender picked, the account is
|
|
2342
|
+
not connected, the person is not on this committee, or an invite is already
|
|
2343
|
+
queued for them.
|
|
2344
|
+
|
|
2345
|
+
**Input**
|
|
2346
|
+
|
|
2347
|
+
| Field | Type | Required | Description |
|
|
2348
|
+
|---|---|---|---|
|
|
2349
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
2350
|
+
| `path.contact_id` | `integer` | yes | The committee member to invite. |
|
|
2351
|
+
| `body` | `CommitteeLinkedInInviteRequest` | yes | Request body; fields below. |
|
|
2352
|
+
|
|
2353
|
+
Body fields (`CommitteeLinkedInInviteRequest`):
|
|
2354
|
+
|
|
2355
|
+
| Field | Type | Required | Description |
|
|
2356
|
+
|---|---|---|---|
|
|
2357
|
+
| `body.note` | `string \| null` | no | Optional invite note. Capped by LinkedIn at 300 characters. max length 300 |
|
|
2358
|
+
|
|
2359
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2360
|
+
|
|
2361
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2362
|
+
|
|
2363
|
+
**Example**
|
|
2364
|
+
|
|
2365
|
+
```ts
|
|
2366
|
+
// external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
|
|
2367
|
+
const result = await g8.api.desk.sendCommitteeLinkedinInvite({ path: { account_id: 1, contact_id: 123 }, body: {} });
|
|
2368
|
+
```
|
|
2369
|
+
|
|
2370
|
+
---
|
|
2371
|
+
|
|
2372
|
+
<a id="op-senddeskreply"></a>
|
|
2373
|
+
|
|
2374
|
+
### `g8.api.desk.sendDeskReply(input)`
|
|
2375
|
+
|
|
2376
|
+
**Send Desk Reply**
|
|
2377
|
+
|
|
2378
|
+
- HTTP: `POST /api/v1/desk/decisions/{decision_id}/send-reply`
|
|
2379
|
+
- operationId: `send_desk_reply_desk_decisions__decision_id__send_reply_post` (also callable as `g8.api.call("send_desk_reply_desk_decisions__decision_id__send_reply_post", input)`)
|
|
2380
|
+
- Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
|
|
2381
|
+
- API-key scope: `deals:run`
|
|
2382
|
+
|
|
2383
|
+
SENDS AN EMAIL to a real person, then resolves the card.
|
|
2384
|
+
|
|
2385
|
+
Not idempotent, and it cannot be: the inbox send path carries no request
|
|
2386
|
+
id and no dedupe key. What protects a caller instead is the CARD: it is
|
|
2387
|
+
claimed before the send, guarded on still being pending, so only one
|
|
2388
|
+
request can win and a second gets a 409 having sent nothing.
|
|
2389
|
+
|
|
2390
|
+
A retry after a timeout is therefore safe in the usual case and silent in
|
|
2391
|
+
one: a crash between the claim and the send leaves a resolved card whose
|
|
2392
|
+
mail never went. That is deliberate - recoverable by a human, unlike a
|
|
2393
|
+
duplicate email, which cannot be recalled.
|
|
2394
|
+
|
|
2395
|
+
The opt-out check runs AGAIN here. `reply-target` already asked, but that
|
|
2396
|
+
answer is as old as the caller's editing session and a STOP that arrived
|
|
2397
|
+
meanwhile must not be sent through.
|
|
2398
|
+
|
|
2399
|
+
**Input**
|
|
2400
|
+
|
|
2401
|
+
| Field | Type | Required | Description |
|
|
2402
|
+
|---|---|---|---|
|
|
2403
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
2404
|
+
| `body` | `DeskSendReplyRequest` | yes | Request body; fields below. |
|
|
2405
|
+
|
|
2406
|
+
Body fields (`DeskSendReplyRequest`):
|
|
2407
|
+
|
|
2408
|
+
| Field | Type | Required | Description |
|
|
2409
|
+
|---|---|---|---|
|
|
2410
|
+
| `body.body` | `string` | yes | The reply body. Reaches a real person. min length 1 |
|
|
2411
|
+
| `body.subject` | `string \| null` | no | max length 500 |
|
|
2412
|
+
|
|
2413
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2414
|
+
|
|
2415
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2416
|
+
|
|
2417
|
+
**Example**
|
|
2418
|
+
|
|
2419
|
+
```ts
|
|
2420
|
+
// external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
|
|
2421
|
+
const result = await g8.api.desk.sendDeskReply({ path: { decision_id: "id" }, body: { body: "example" } });
|
|
2422
|
+
```
|
|
2423
|
+
|
|
2424
|
+
---
|
|
2425
|
+
|
|
2426
|
+
<a id="op-senddesksms"></a>
|
|
2427
|
+
|
|
2428
|
+
### `g8.api.desk.sendDeskSms(input)`
|
|
2429
|
+
|
|
2430
|
+
**Send Desk Sms**
|
|
2431
|
+
|
|
2432
|
+
- HTTP: `POST /api/v1/desk/decisions/{decision_id}/send-sms`
|
|
2433
|
+
- operationId: `send_desk_sms_desk_decisions__decision_id__send_sms_post` (also callable as `g8.api.call("send_desk_sms_desk_decisions__decision_id__send_sms_post", input)`)
|
|
2434
|
+
- Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
|
|
2435
|
+
- API-key scope: `deals:run`
|
|
2436
|
+
|
|
2437
|
+
SENDS A TEXT MESSAGE to a real phone, then resolves the card.
|
|
2438
|
+
|
|
2439
|
+
Carrier spend, and unrecallable once gone. Same claim-then-send ordering
|
|
2440
|
+
and the same re-run of the opt-out check as `send-reply` - see that
|
|
2441
|
+
docstring for why a retry is safe and where it is not.
|
|
2442
|
+
|
|
2443
|
+
**Input**
|
|
2444
|
+
|
|
2445
|
+
| Field | Type | Required | Description |
|
|
2446
|
+
|---|---|---|---|
|
|
2447
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
2448
|
+
| `body` | `DeskSendSmsRequest` | yes | Request body; fields below. |
|
|
2449
|
+
|
|
2450
|
+
Body fields (`DeskSendSmsRequest`):
|
|
2451
|
+
|
|
2452
|
+
| Field | Type | Required | Description |
|
|
2453
|
+
|---|---|---|---|
|
|
2454
|
+
| `body.body` | `string` | yes | The message. Reaches a real phone and costs carrier spend. min length 1, max length 1600 |
|
|
2455
|
+
|
|
2456
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2457
|
+
|
|
2458
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2459
|
+
|
|
2460
|
+
**Example**
|
|
2461
|
+
|
|
2462
|
+
```ts
|
|
2463
|
+
// external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
|
|
2464
|
+
const result = await g8.api.desk.sendDeskSms({ path: { decision_id: "id" }, body: { body: "example" } });
|
|
2465
|
+
```
|
|
2466
|
+
|
|
2467
|
+
---
|
|
2468
|
+
|
|
2469
|
+
<a id="op-startdeskbatch"></a>
|
|
2470
|
+
|
|
2471
|
+
### `g8.api.desk.startDeskBatch(input)`
|
|
2472
|
+
|
|
2473
|
+
**Start Desk Batch**
|
|
2474
|
+
|
|
2475
|
+
- HTTP: `POST /api/v1/desk/batch/start`
|
|
2476
|
+
- operationId: `start_desk_batch_desk_batch_start_post` (also callable as `g8.api.call("start_desk_batch_desk_batch_start_post", input)`)
|
|
2477
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
2478
|
+
- API-key scope: `deals:write`
|
|
2479
|
+
|
|
2480
|
+
Freeze a ranked slice of the queue into today's batch.
|
|
2481
|
+
|
|
2482
|
+
This is what makes the day finite. Cards added to the queue afterwards do
|
|
2483
|
+
NOT join the batch on their own - use `/batch/pull` to take more.
|
|
2484
|
+
|
|
2485
|
+
**Input**
|
|
2486
|
+
|
|
2487
|
+
| Field | Type | Required | Description |
|
|
2488
|
+
|---|---|---|---|
|
|
2489
|
+
| `body` | `DeskBatchStartRequest` | yes | Request body; fields below. |
|
|
2490
|
+
|
|
2491
|
+
Body fields (`DeskBatchStartRequest`):
|
|
2492
|
+
|
|
2493
|
+
| Field | Type | Required | Description |
|
|
2494
|
+
|---|---|---|---|
|
|
2495
|
+
| `body.item_ids` | `Array<string (uuid)>` | yes | Decision ids to freeze into the batch. 1-80 - the cap is the app's. min items 1, max items 80 |
|
|
2496
|
+
| `body.tz_offset` | `integer` | no | The rep's UTC offset in MINUTES (local = UTC + tz_offset). A batch is scoped to the rep's local day, so a wrong offset returns yesterday's batch or starts a second one. default `0`, min -840, max 840 |
|
|
2497
|
+
|
|
2498
|
+
**Returns** `ApiResponse_DeskBatch_`: the envelope `{ data: DeskBatch, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2499
|
+
|
|
2500
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2501
|
+
|
|
2502
|
+
`DeskBatch` fields:
|
|
2503
|
+
|
|
2504
|
+
| Field | Type | Required | Description |
|
|
2505
|
+
|---|---|---|---|
|
|
2506
|
+
| `completed` | `integer \| null` | no | |
|
|
2507
|
+
| `completed_at` | `string (date-time) \| null` | no | |
|
|
2508
|
+
| `id` | `string \| null` | no | |
|
|
2509
|
+
| `item_ids` | `Array<string>` | no | |
|
|
2510
|
+
| `remaining` | `integer \| null` | no | |
|
|
2511
|
+
| `started_at` | `string (date-time) \| null` | no | |
|
|
2512
|
+
| `status` | `string \| null` | no | |
|
|
2513
|
+
| `total` | `integer \| null` | no | |
|
|
2514
|
+
|
|
2515
|
+
**Example**
|
|
2516
|
+
|
|
2517
|
+
```ts
|
|
2518
|
+
const result = await g8.api.desk.startDeskBatch({ body: { item_ids: ["00000000-0000-0000-0000-000000000000"] } });
|
|
2519
|
+
```
|
|
2520
|
+
|
|
2521
|
+
---
|
|
2522
|
+
|
|
2523
|
+
<a id="op-undodeskdecision"></a>
|
|
2524
|
+
|
|
2525
|
+
### `g8.api.desk.undoDeskDecision(input)`
|
|
2526
|
+
|
|
2527
|
+
**Undo Desk Decision**
|
|
2528
|
+
|
|
2529
|
+
- HTTP: `POST /api/v1/desk/decisions/{decision_id}/undo`
|
|
2530
|
+
- operationId: `undo_desk_decision_desk_decisions__decision_id__undo_post` (also callable as `g8.api.call("undo_desk_decision_desk_decisions__decision_id__undo_post", input)`)
|
|
2531
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
2532
|
+
- API-key scope: `deals:write`
|
|
2533
|
+
|
|
2534
|
+
Undo an AUTO-EXECUTED decision.
|
|
2535
|
+
|
|
2536
|
+
This is the autopilot escape hatch, not a general undo: it reverses
|
|
2537
|
+
something the desk did on the rep's behalf. Reversing a card the rep
|
|
2538
|
+
resolved themselves is not what this does.
|
|
2539
|
+
|
|
2540
|
+
**Input**
|
|
2541
|
+
|
|
2542
|
+
| Field | Type | Required | Description |
|
|
2543
|
+
|---|---|---|---|
|
|
2544
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
2545
|
+
|
|
2546
|
+
**Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2547
|
+
|
|
2548
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2549
|
+
|
|
2550
|
+
**Example**
|
|
2551
|
+
|
|
2552
|
+
```ts
|
|
2553
|
+
const result = await g8.api.desk.undoDeskDecision({ path: { decision_id: "id" } });
|
|
2554
|
+
```
|
|
2555
|
+
|
|
2556
|
+
---
|
|
2557
|
+
|
|
2558
|
+
<a id="op-unsnoozedeskdecision"></a>
|
|
2559
|
+
|
|
2560
|
+
### `g8.api.desk.unsnoozeDeskDecision(input)`
|
|
2561
|
+
|
|
2562
|
+
**Unsnooze Desk Decision**
|
|
2563
|
+
|
|
2564
|
+
- HTTP: `POST /api/v1/desk/decisions/{decision_id}/unsnooze`
|
|
2565
|
+
- operationId: `unsnooze_desk_decision_desk_decisions__decision_id__unsnooze_post` (also callable as `g8.api.call("unsnooze_desk_decision_desk_decisions__decision_id__unsnooze_post", input)`)
|
|
2566
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
2567
|
+
- API-key scope: `deals:write`
|
|
2568
|
+
|
|
2569
|
+
Wake a snoozed card now, restoring it to the pending queue.
|
|
2570
|
+
|
|
2571
|
+
**Input**
|
|
2572
|
+
|
|
2573
|
+
| Field | Type | Required | Description |
|
|
2574
|
+
|---|---|---|---|
|
|
2575
|
+
| `path.decision_id` | `string` | yes | Decision id (UUID). |
|
|
2576
|
+
|
|
2577
|
+
**Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2578
|
+
|
|
2579
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2580
|
+
|
|
2581
|
+
**Example**
|
|
2582
|
+
|
|
2583
|
+
```ts
|
|
2584
|
+
const result = await g8.api.desk.unsnoozeDeskDecision({ path: { decision_id: "id" } });
|
|
2585
|
+
```
|
|
2586
|
+
|
|
2587
|
+
---
|
|
2588
|
+
|
|
2589
|
+
<a id="op-updateaccountplanstep"></a>
|
|
2590
|
+
|
|
2591
|
+
### `g8.api.desk.updateAccountPlanStep(input)`
|
|
2592
|
+
|
|
2593
|
+
**Update Account Plan Step**
|
|
2594
|
+
|
|
2595
|
+
- HTTP: `PUT /api/v1/desk/accounts/{account_id}/plan/steps/{step_id}`
|
|
2596
|
+
- operationId: `update_account_plan_step_desk_accounts__account_id__plan_steps__step_id__put` (also callable as `g8.api.call("update_account_plan_step_desk_accounts__account_id__plan_steps__step_id__put", input)`)
|
|
2597
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
2598
|
+
- API-key scope: `deals:write`
|
|
2599
|
+
|
|
2600
|
+
Approve, reject or edit ONE step on the latest plan version.
|
|
2601
|
+
|
|
2602
|
+
The only in-place edit on this surface. Approving a step does not SEND it -
|
|
2603
|
+
it marks it ready, and the desk raises it as a card when its time comes.
|
|
2604
|
+
|
|
2605
|
+
**Input**
|
|
2606
|
+
|
|
2607
|
+
| Field | Type | Required | Description |
|
|
2608
|
+
|---|---|---|---|
|
|
2609
|
+
| `path.account_id` | `integer` | yes | The account's mashup company id (`cb_account_plans.account_id`). |
|
|
2610
|
+
| `path.step_id` | `string` | yes | Step id, as carried on the plan. |
|
|
2611
|
+
| `body` | `AccountPlanStepUpdateRequest` | yes | Request body; fields below. |
|
|
2612
|
+
|
|
2613
|
+
Body fields (`AccountPlanStepUpdateRequest`):
|
|
2614
|
+
|
|
2615
|
+
| Field | Type | Required | Description |
|
|
2616
|
+
|---|---|---|---|
|
|
2617
|
+
| `body.action` | `"approve" \| "reject" \| "edit"` | yes | |
|
|
2618
|
+
| `body.draft_content` | `string \| null` | no | |
|
|
2619
|
+
| `body.scheduled_at` | `string \| null` | no | |
|
|
2620
|
+
|
|
2621
|
+
**Returns** `ApiResponse_AccountPlanPayload_`: the envelope `{ data: AccountPlanPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2622
|
+
|
|
2623
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2624
|
+
|
|
2625
|
+
**Example**
|
|
2626
|
+
|
|
2627
|
+
```ts
|
|
2628
|
+
const result = await g8.api.desk.updateAccountPlanStep({
|
|
2629
|
+
path: { account_id: 1, step_id: "id" },
|
|
2630
|
+
body: { action: "approve" },
|
|
2631
|
+
});
|
|
2632
|
+
```
|
|
2633
|
+
|
|
2634
|
+
---
|
|
2635
|
+
|
|
2636
|
+
<a id="op-updatedeskautonomy"></a>
|
|
2637
|
+
|
|
2638
|
+
### `g8.api.desk.updateDeskAutonomy(input)`
|
|
2639
|
+
|
|
2640
|
+
**Update Desk Autonomy**
|
|
2641
|
+
|
|
2642
|
+
- HTTP: `PUT /api/v1/desk/autonomy`
|
|
2643
|
+
- operationId: `update_desk_autonomy_desk_autonomy_put` (also callable as `g8.api.call("update_desk_autonomy_desk_autonomy_put", input)`)
|
|
2644
|
+
- Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
|
|
2645
|
+
- API-key scope: `deals:run`
|
|
2646
|
+
|
|
2647
|
+
Decide what the desk may do WITHOUT asking this rep first.
|
|
2648
|
+
|
|
2649
|
+
This is not a preference. A lane of `autopilot` means the desk executes
|
|
2650
|
+
that decision type on the rep's behalf, and the types that can be automated
|
|
2651
|
+
include ones that reach a real person - which is why `POST /desk/decisions/
|
|
2652
|
+
{id}/undo` exists at all, and why this operation is not tiered a plain
|
|
2653
|
+
`write`.
|
|
2654
|
+
|
|
2655
|
+
`lanes` MERGES into the stored map rather than replacing it, and a lane
|
|
2656
|
+
asking for autopilot on a type with no executor is downgraded rather than
|
|
2657
|
+
refused - so a bulk save echoing back a stale lane still succeeds. An
|
|
2658
|
+
omitted `autonomy_families` leaves the family answers alone; an explicit
|
|
2659
|
+
`{}` clears them.
|
|
2660
|
+
|
|
2661
|
+
**Input**
|
|
2662
|
+
|
|
2663
|
+
| Field | Type | Required | Description |
|
|
2664
|
+
|---|---|---|---|
|
|
2665
|
+
| `body` | `DeskAutonomyUpdate` | yes | Request body; fields below. |
|
|
2666
|
+
|
|
2667
|
+
Body fields (`DeskAutonomyUpdate`):
|
|
2668
|
+
|
|
2669
|
+
| Field | Type | Required | Description |
|
|
2670
|
+
|---|---|---|---|
|
|
2671
|
+
| `body.lanes` | `Record<string, string>` | yes | Map of decision_type -> lane (autopilot/approve/off). |
|
|
2672
|
+
| `body.autonomy_families` | `Record<string, string> \| null` | no | Map of lane family -> lane (plan_work/outreach/hygiene_and_alerts). Omit to leave family answers untouched; send `{}` to clear them. |
|
|
2673
|
+
|
|
2674
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2675
|
+
|
|
2676
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2677
|
+
|
|
2678
|
+
**Example**
|
|
2679
|
+
|
|
2680
|
+
```ts
|
|
2681
|
+
// external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
|
|
2682
|
+
const result = await g8.api.desk.updateDeskAutonomy({ body: { lanes: {} } });
|
|
2683
|
+
```
|
|
2684
|
+
|
|
2685
|
+
---
|
|
2686
|
+
|
|
2687
|
+
<a id="op-updatedesklinkedinsender"></a>
|
|
2688
|
+
|
|
2689
|
+
### `g8.api.desk.updateDeskLinkedinSender(input)`
|
|
2690
|
+
|
|
2691
|
+
**Update Desk Linkedin Sender**
|
|
2692
|
+
|
|
2693
|
+
- HTTP: `PUT /api/v1/desk/linkedin-sender`
|
|
2694
|
+
- operationId: `update_desk_linkedin_sender_desk_linkedin_sender_put` (also callable as `g8.api.call("update_desk_linkedin_sender_desk_linkedin_sender_put", input)`)
|
|
2695
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
2696
|
+
- API-key scope: `deals:write`
|
|
2697
|
+
|
|
2698
|
+
Claim a LinkedIn account for this rep, or release the claim with null.
|
|
2699
|
+
|
|
2700
|
+
The claim is EXCLUSIVE and enforced by unique constraints, not by a
|
|
2701
|
+
permission: claiming an account a colleague holds is a 409. Sending null
|
|
2702
|
+
gives the claim up, which is the only way to hand an account over.
|
|
2703
|
+
|
|
2704
|
+
No admin gate, deliberately, and the app says why: this is a per-user
|
|
2705
|
+
identity rather than an org decision, and an admin permission here would
|
|
2706
|
+
stop reps doing the one thing they were told to do.
|
|
2707
|
+
|
|
2708
|
+
**Input**
|
|
2709
|
+
|
|
2710
|
+
| Field | Type | Required | Description |
|
|
2711
|
+
|---|---|---|---|
|
|
2712
|
+
| `body` | `DeskLinkedInSenderUpdate` | yes | Request body; fields below. |
|
|
2713
|
+
|
|
2714
|
+
Body fields (`DeskLinkedInSenderUpdate`):
|
|
2715
|
+
|
|
2716
|
+
| Field | Type | Required | Description |
|
|
2717
|
+
|---|---|---|---|
|
|
2718
|
+
| `body.provider_member_id` | `string \| null` | no | The LinkedIn account to claim. NULL releases the current claim. |
|
|
2719
|
+
|
|
2720
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2721
|
+
|
|
2722
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2723
|
+
|
|
2724
|
+
**Example**
|
|
2725
|
+
|
|
2726
|
+
```ts
|
|
2727
|
+
const result = await g8.api.desk.updateDeskLinkedinSender({ body: {} });
|
|
2728
|
+
```
|
|
2729
|
+
|
|
2730
|
+
---
|
|
2731
|
+
|
|
2732
|
+
<a id="op-updatedesklistgoal"></a>
|
|
2733
|
+
|
|
2734
|
+
### `g8.api.desk.updateDeskListGoal(input)`
|
|
2735
|
+
|
|
2736
|
+
**Update Desk List Goal**
|
|
2737
|
+
|
|
2738
|
+
- HTTP: `PUT /api/v1/desk/list-goals`
|
|
2739
|
+
- operationId: `update_desk_list_goal_desk_list_goals_put` (also callable as `g8.api.call("update_desk_list_goal_desk_list_goals_put", input)`)
|
|
2740
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
2741
|
+
- API-key scope: `deals:write`
|
|
2742
|
+
|
|
2743
|
+
Set or clear ONE list's daily dial target.
|
|
2744
|
+
|
|
2745
|
+
Unlike `/desk/list-priority` this is a single-list edit, and a null
|
|
2746
|
+
`target` CLEARS the goal rather than setting it to zero - a cleared goal
|
|
2747
|
+
stops the counter, a zero would be a goal that is already met.
|
|
2748
|
+
|
|
2749
|
+
**Input**
|
|
2750
|
+
|
|
2751
|
+
| Field | Type | Required | Description |
|
|
2752
|
+
|---|---|---|---|
|
|
2753
|
+
| `body` | `DeskListGoalUpdate` | yes | Request body; fields below. |
|
|
2754
|
+
|
|
2755
|
+
Body fields (`DeskListGoalUpdate`):
|
|
2756
|
+
|
|
2757
|
+
| Field | Type | Required | Description |
|
|
2758
|
+
|---|---|---|---|
|
|
2759
|
+
| `body.audience_id` | `integer` | yes | The dial list this target belongs to. |
|
|
2760
|
+
| `body.target` | `integer \| null` | no | Dials per day. NULL CLEARS the target rather than setting zero. min 1 |
|
|
2761
|
+
|
|
2762
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2763
|
+
|
|
2764
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2765
|
+
|
|
2766
|
+
**Example**
|
|
2767
|
+
|
|
2768
|
+
```ts
|
|
2769
|
+
const result = await g8.api.desk.updateDeskListGoal({ body: { audience_id: 123 } });
|
|
2770
|
+
```
|
|
2771
|
+
|
|
2772
|
+
---
|
|
2773
|
+
|
|
2774
|
+
<a id="op-updatedesklistgroupoverride"></a>
|
|
2775
|
+
|
|
2776
|
+
### `g8.api.desk.updateDeskListGroupOverride(input)`
|
|
2777
|
+
|
|
2778
|
+
**Update Desk List Group Override**
|
|
2779
|
+
|
|
2780
|
+
- HTTP: `PUT /api/v1/desk/list-group-override`
|
|
2781
|
+
- operationId: `update_desk_list_group_override_desk_list_group_override_put` (also callable as `g8.api.call("update_desk_list_group_override_desk_list_group_override_put", input)`)
|
|
2782
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
2783
|
+
- API-key scope: `deals:write`
|
|
2784
|
+
|
|
2785
|
+
Set the rep's band moves. THE WHOLE MAP, not one entry.
|
|
2786
|
+
|
|
2787
|
+
Per rep, per org. The stored value is echoed back rather than the submitted
|
|
2788
|
+
one, so the response is what a GET would return.
|
|
2789
|
+
|
|
2790
|
+
**Input**
|
|
2791
|
+
|
|
2792
|
+
| Field | Type | Required | Description |
|
|
2793
|
+
|---|---|---|---|
|
|
2794
|
+
| `body` | `DeskListGroupOverrideUpdate` | yes | Request body; fields below. |
|
|
2795
|
+
|
|
2796
|
+
Body fields (`DeskListGroupOverrideUpdate`):
|
|
2797
|
+
|
|
2798
|
+
| Field | Type | Required | Description |
|
|
2799
|
+
|---|---|---|---|
|
|
2800
|
+
| `body.overrides` | `Record<string, "form" \| "warm" \| "cold">` | no | Dial-list id -> band (`form`, `warm` or `cold`). REPLACES every stored move. |
|
|
2801
|
+
|
|
2802
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2803
|
+
|
|
2804
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2805
|
+
|
|
2806
|
+
**Example**
|
|
2807
|
+
|
|
2808
|
+
```ts
|
|
2809
|
+
const result = await g8.api.desk.updateDeskListGroupOverride({ body: {} });
|
|
2810
|
+
```
|
|
2811
|
+
|
|
2812
|
+
---
|
|
2813
|
+
|
|
2814
|
+
<a id="op-updatedesklistpriority"></a>
|
|
2815
|
+
|
|
2816
|
+
### `g8.api.desk.updateDeskListPriority(input)`
|
|
2817
|
+
|
|
2818
|
+
**Update Desk List Priority**
|
|
2819
|
+
|
|
2820
|
+
- HTTP: `PUT /api/v1/desk/list-priority`
|
|
2821
|
+
- operationId: `update_desk_list_priority_desk_list_priority_put` (also callable as `g8.api.call("update_desk_list_priority_desk_list_priority_put", input)`)
|
|
2822
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
2823
|
+
- API-key scope: `deals:write`
|
|
2824
|
+
|
|
2825
|
+
Set the rep's dial-list order. THE WHOLE ORDER.
|
|
2826
|
+
|
|
2827
|
+
This REPLACES the stored order rather than merging into it: sending one id
|
|
2828
|
+
pins that list and unpins every other, and sending `[]` clears them all.
|
|
2829
|
+
The field name reads like an append, which is exactly why it is said here.
|
|
2830
|
+
|
|
2831
|
+
**Input**
|
|
2832
|
+
|
|
2833
|
+
| Field | Type | Required | Description |
|
|
2834
|
+
|---|---|---|---|
|
|
2835
|
+
| `body` | `DeskListPriorityUpdate` | yes | Request body; fields below. |
|
|
2836
|
+
|
|
2837
|
+
Body fields (`DeskListPriorityUpdate`):
|
|
2838
|
+
|
|
2839
|
+
| Field | Type | Required | Description |
|
|
2840
|
+
|---|---|---|---|
|
|
2841
|
+
| `body.audience_ids` | `Array<integer>` | no | Dial-list (audience) ids, most important first. REPLACES the whole order - an empty list clears every pin. |
|
|
2842
|
+
|
|
2843
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2844
|
+
|
|
2845
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2846
|
+
|
|
2847
|
+
**Example**
|
|
2848
|
+
|
|
2849
|
+
```ts
|
|
2850
|
+
const result = await g8.api.desk.updateDeskListPriority({ body: {} });
|
|
2851
|
+
```
|
|
2852
|
+
|
|
2853
|
+
---
|
|
2854
|
+
|
|
2855
|
+
<a id="op-updatedeskorgsettings"></a>
|
|
2856
|
+
|
|
2857
|
+
### `g8.api.desk.updateDeskOrgSettings(input)`
|
|
2858
|
+
|
|
2859
|
+
**Update Desk Org Settings**
|
|
2860
|
+
|
|
2861
|
+
- HTTP: `PUT /api/v1/desk/org-settings`
|
|
2862
|
+
- operationId: `update_desk_org_settings_desk_org_settings_put` (also callable as `g8.api.call("update_desk_org_settings_desk_org_settings_put", input)`)
|
|
2863
|
+
- Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
|
|
2864
|
+
- API-key scope: `deals:run`
|
|
2865
|
+
|
|
2866
|
+
Update org-level desk settings. PARTIAL - unset fields are untouched.
|
|
2867
|
+
|
|
2868
|
+
Requires `settings:write`, declared on this route because the app's own
|
|
2869
|
+
gate is a `Depends`-defaulted PARAMETER of the handler and a direct call
|
|
2870
|
+
resolves nothing.
|
|
2871
|
+
|
|
2872
|
+
THIS IS THE ORG'S ON SWITCH, AND ITS SPEND CAPS. Saving here registers the
|
|
2873
|
+
org on the desk worker's poll list - and saving every decision off
|
|
2874
|
+
unregisters it - so this one call starts or stops the desk producing work
|
|
2875
|
+
for the whole organisation. It also carries `max_auto_account_plans_per_day`,
|
|
2876
|
+
`max_account_replans_per_day` and `max_skill_plans_per_day`, which are
|
|
2877
|
+
daily caps on CHARGED model calls, and `desk_acts_on_signals`,
|
|
2878
|
+
`desk_drafts_with_ai` and `stalled_deal_send_email`, which let the desk act
|
|
2879
|
+
and email on its own. A plain `write` would make raising an org's spend cap
|
|
2880
|
+
the same grant as renaming a record.
|
|
2881
|
+
|
|
2882
|
+
400 with the reason on anything the settings validator refuses, including
|
|
2883
|
+
an empty body - "no settings provided" is an error here rather than a
|
|
2884
|
+
silent no-op.
|
|
2885
|
+
|
|
2886
|
+
**Input**
|
|
2887
|
+
|
|
2888
|
+
| Field | Type | Required | Description |
|
|
2889
|
+
|---|---|---|---|
|
|
2890
|
+
| `body` | `DeskOrgSettingsUpdate` | yes | Request body; fields below. |
|
|
2891
|
+
|
|
2892
|
+
Body fields (`DeskOrgSettingsUpdate`):
|
|
2893
|
+
|
|
2894
|
+
| Field | Type | Required | Description |
|
|
2895
|
+
|---|---|---|---|
|
|
2896
|
+
| `body.contact_update_planned_deals_only` | `boolean \| null` | no | |
|
|
2897
|
+
| `body.daily_action_target` | `integer \| null` | no | min 0, max 200 |
|
|
2898
|
+
| `body.desk_acts_on_signals` | `boolean \| null` | no | |
|
|
2899
|
+
| `body.desk_drafts_with_ai` | `boolean \| null` | no | |
|
|
2900
|
+
| `body.desk_escalates_to_managers` | `boolean \| null` | no | |
|
|
2901
|
+
| `body.desk_keeps_crm_tidy` | `boolean \| null` | no | |
|
|
2902
|
+
| `body.desk_writes_deal_plans` | `boolean \| null` | no | |
|
|
2903
|
+
| `body.enrichment_win_fields` | `Array<string> \| null` | no | max items 9 |
|
|
2904
|
+
| `body.fallback_owner_emails` | `Array<string> \| null` | no | max items 20 |
|
|
2905
|
+
| `body.lead_sla_minutes` | `integer \| null` | no | min 0, max 240 |
|
|
2906
|
+
| `body.max_account_replans_per_day` | `integer \| null` | no | DAILY CAP on charged account re-plans. min 0, max 100 |
|
|
2907
|
+
| `body.max_auto_account_plans_per_day` | `integer \| null` | no | DAILY CAP on charged auto account plans. min 0, max 100 |
|
|
2908
|
+
| `body.max_cards_per_generator_per_day` | `integer \| null` | no | min 1, max 500 |
|
|
2909
|
+
| `body.max_skill_plans_per_day` | `integer \| null` | no | DAILY CAP on charged skill plans. min 0, max 100 |
|
|
2910
|
+
| `body.no_reply_channels` | `Array<string> \| null` | no | max items 1 |
|
|
2911
|
+
| `body.no_reply_threshold_days` | `integer \| null` | no | min 1, max 60 |
|
|
2912
|
+
| `body.overdue_self_task_enabled` | `boolean \| null` | no | |
|
|
2913
|
+
| `body.overdue_task_max_age_days` | `integer \| null` | no | min 0, max 365 |
|
|
2914
|
+
| `body.pipeline_target_quarterly` | `integer \| null` | no | min 0 |
|
|
2915
|
+
| `body.plan_required_stage_ids` | `Array<string> \| null` | no | max items 20 |
|
|
2916
|
+
| `body.reps_may_fire_workflows` | `boolean \| null` | no | |
|
|
2917
|
+
| `body.signal_policies` | `Record<string, DeskSignalPolicy> \| null` | no | |
|
|
2918
|
+
| `body.signals_enabled` | `Record<string, boolean> \| null` | no | Per-signal kill switches. `ai_briefs` is the desk-wide LLM-spend gate and `morning_kickoff` gates the daily briefing. |
|
|
2919
|
+
| `body.stalled_deal_approve_after_days` | `integer \| null` | no | min 1, max 60 |
|
|
2920
|
+
| `body.stalled_deal_enabled` | `boolean \| null` | no | |
|
|
2921
|
+
| `body.stalled_deal_fallback_manager_user_id` | `string \| null` | no | max length 320 |
|
|
2922
|
+
| `body.stalled_deal_manager_user_id` | `string \| null` | no | max length 320 |
|
|
2923
|
+
| `body.stalled_deal_min_amount` | `integer \| null` | no | min 0 |
|
|
2924
|
+
| `body.stalled_deal_min_deal_age_days` | `integer \| null` | no | min 0, max 365 |
|
|
2925
|
+
| `body.stalled_deal_reassign_to_user_id` | `string \| null` | no | max length 320 |
|
|
2926
|
+
| `body.stalled_deal_reminder_after_hours` | `integer \| null` | no | min 1, max 168 |
|
|
2927
|
+
| `body.stalled_deal_require_activity_evidence` | `boolean \| null` | no | |
|
|
2928
|
+
| `body.stalled_deal_send_email` | `boolean \| null` | no | Let the stalled-deal escalation EMAIL the manager. |
|
|
2929
|
+
| `body.stalled_deal_skip_crm_synced_transfer` | `boolean \| null` | no | |
|
|
2930
|
+
| `body.stalled_deal_stage_ids` | `Array<string (uuid)> \| null` | no | max items 200 |
|
|
2931
|
+
| `body.stalled_deal_undo_window_minutes` | `integer \| null` | no | min 0, max 1440 |
|
|
2932
|
+
| `body.stalled_deal_warn_after_days` | `integer \| null` | no | min 1, max 60 |
|
|
2933
|
+
|
|
2934
|
+
**Returns** `ApiResponse_DeskPayload_`: the envelope `{ data: DeskPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
2935
|
+
|
|
2936
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
2937
|
+
|
|
2938
|
+
**Example**
|
|
2939
|
+
|
|
2940
|
+
```ts
|
|
2941
|
+
// external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
|
|
2942
|
+
const result = await g8.api.desk.updateDeskOrgSettings({ body: {} });
|
|
2943
|
+
```
|
|
2944
|
+
|
|
2945
|
+
---
|
|
2946
|
+
|
|
2947
|
+
## Referenced types
|
|
2948
|
+
|
|
2949
|
+
Named types that appear in the tables above. Full TypeScript definitions: `G8Contract.<Name>` (`import type { G8Contract } from "@graph8/sdk"`).
|
|
2950
|
+
|
|
2951
|
+
<a id="type-accountplanstep"></a>
|
|
2952
|
+
|
|
2953
|
+
### `AccountPlanStep`
|
|
2954
|
+
|
|
2955
|
+
One step in a plan: who to reach, on what channel, when, and why now. `extra="allow"` mirrors the app's own model, which is also open - the step shape carries per-channel extras the desk adds as it learns new channels, and a closed mirror would DROP them on the way in rather than pass them through. `approval_status` is closed because it reaches a real `Literal` inside the handler: a free value would raise there and escape as a 500 instead of a 422 naming the four states.
|
|
2956
|
+
|
|
2957
|
+
| Field | Type | Required | Description |
|
|
2958
|
+
|---|---|---|---|
|
|
2959
|
+
| `step_id` | `string` | yes | Caller-assigned id, stable across versions. |
|
|
2960
|
+
| `approval_status` | `"pending" \| "approved" \| "rejected" \| "edited"` | no | default `"pending"` |
|
|
2961
|
+
| `channel` | `string \| null` | no | |
|
|
2962
|
+
| `contact_id` | `unknown \| null` | no | Committee member this step is aimed at. |
|
|
2963
|
+
| `draft_content` | `string \| null` | no | |
|
|
2964
|
+
| `scheduled_at` | `string \| null` | no | |
|
|
2965
|
+
| `status` | `string \| null` | no | |
|
|
2966
|
+
| `why_now` | `string \| null` | no | |
|
|
2967
|
+
|
|
2968
|
+
<a id="type-committeememberinput"></a>
|
|
2969
|
+
|
|
2970
|
+
### `CommitteeMemberInput`
|
|
2971
|
+
|
|
2972
|
+
A contact to put on the buying committee.
|
|
2973
|
+
|
|
2974
|
+
| Field | Type | Required | Description |
|
|
2975
|
+
|---|---|---|---|
|
|
2976
|
+
| `contact_id` | `integer` | yes | |
|
|
2977
|
+
| `role` | `string \| null` | no | Their part in the decision, e.g. "champion". |
|
|
2978
|
+
|
|
2979
|
+
<a id="type-deskdecision"></a>
|
|
2980
|
+
|
|
2981
|
+
### `DeskDecision`
|
|
2982
|
+
|
|
2983
|
+
One card in the queue: something the desk thinks a rep should do next.
|
|
2984
|
+
|
|
2985
|
+
| Field | Type | Required | Description |
|
|
2986
|
+
|---|---|---|---|
|
|
2987
|
+
| `created_at` | `string (date-time) \| null` | no | |
|
|
2988
|
+
| `decision_type` | `string \| null` | no | What kind of action this card is asking for. |
|
|
2989
|
+
| `entity_id` | `string \| null` | no | |
|
|
2990
|
+
| `entity_type` | `string \| null` | no | |
|
|
2991
|
+
| `id` | `string \| null` | no | |
|
|
2992
|
+
| `priority` | `number \| null` | no | |
|
|
2993
|
+
| `resolved_at` | `string (date-time) \| null` | no | |
|
|
2994
|
+
| `snoozed_until` | `string (date-time) \| null` | no | |
|
|
2995
|
+
| `source` | `string \| null` | no | Exact signal id, e.g. "form_submitted". |
|
|
2996
|
+
| `source_group` | `string \| null` | no | Signal family, e.g. "forms". |
|
|
2997
|
+
| `status` | `string \| null` | no | pending, approved, edited, skipped, deferred, snoozed, done_already. |
|
|
2998
|
+
| `summary` | `string \| null` | no | |
|
|
2999
|
+
| `title` | `string \| null` | no | |
|
|
3000
|
+
|
|
3001
|
+
<a id="type-desksignalpolicy"></a>
|
|
3002
|
+
|
|
3003
|
+
### `DeskSignalPolicy`
|
|
3004
|
+
|
|
3005
|
+
Per-signal policy override. Mirrors the app's `DeskSignalPolicyUpdate`. Open (`extra="allow"`) rather than pinned: this nests inside a JSONB settings blob the desk extends per signal family, and a closed mirror would reject a key the app has just learned to read.
|
|
3006
|
+
|
|
3007
|
+
Type: `Record<string, unknown>`.
|