@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
|
@@ -0,0 +1,1344 @@
|
|
|
1
|
+
<!-- Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. -->
|
|
2
|
+
|
|
3
|
+
# `g8.api.tasks`: Tasks
|
|
4
|
+
|
|
5
|
+
25 operations (8 read, 12 write, 4 destructive, 1 billable).
|
|
6
|
+
|
|
7
|
+
5 of these also have a hand-written method (`g8.tasks`), marked **★** below. Prefer the hand-written method when one exists: it unwraps the `data` envelope and takes friendlier arguments. See [../sdk-clients.md](../sdk-clients.md).
|
|
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: [tasks.d.ts](tasks.d.ts).
|
|
20
|
+
|
|
21
|
+
## Operations
|
|
22
|
+
|
|
23
|
+
| Call | HTTP | Tier | Scope | Summary |
|
|
24
|
+
|---|---|---|---|---|
|
|
25
|
+
| [`assignTaskExecutor`](#op-assigntaskexecutor) | `PUT /api/v1/tasks/{task_id}/assignment` | write | `tasks:write` | Assign Task Executor |
|
|
26
|
+
| [`createGlobalTask`](#op-createglobaltask) | `POST /api/v1/tasks` | write | `tasks:write` | Create Global Task |
|
|
27
|
+
| [`createSubtask`](#op-createsubtask) | `POST /api/v1/tasks/{task_id}/subtasks` | write | `tasks:write` | Create Subtask |
|
|
28
|
+
| [`createTask`](#op-createtask) ★ | `POST /api/v1/contacts/{contact_id}/tasks` | write | `tasks:write` | Create Task |
|
|
29
|
+
| [`createTaskCopies`](#op-createtaskcopies) | `POST /api/v1/tasks/{task_id}/copies` | write | `tasks:write` | Create Task Copies |
|
|
30
|
+
| [`createTaskReply`](#op-createtaskreply) | `POST /api/v1/tasks/{task_id}/replies` | write | `tasks:write` | Create Task Reply |
|
|
31
|
+
| [`deleteSubtask`](#op-deletesubtask) | `DELETE /api/v1/tasks/{task_id}/subtasks/{subtask_id}` | destructive | `tasks:delete` | Delete Subtask |
|
|
32
|
+
| [`deleteTask`](#op-deletetask) ★ | `DELETE /api/v1/tasks/{task_id}` | destructive | `tasks:delete` | Delete Task |
|
|
33
|
+
| [`deleteTaskReply`](#op-deletetaskreply) | `DELETE /api/v1/tasks/replies/{reply_id}` | destructive | `tasks:delete` | Delete Task Reply |
|
|
34
|
+
| [`getTask`](#op-gettask) | `GET /api/v1/tasks/{task_id}` | read | `tasks:read` | Get Task |
|
|
35
|
+
| [`getTaskRecord`](#op-gettaskrecord) | `GET /api/v1/tasks/records/{entity_type}/{entity_id}` | read | `tasks:read` | Get Task Record |
|
|
36
|
+
| [`getTaskSettings`](#op-gettasksettings) | `GET /api/v1/tasks/settings` | read | `tasks:read` | Get Task Settings |
|
|
37
|
+
| [`listAllTasks`](#op-listalltasks) ★ | `GET /api/v1/tasks` | read | `tasks:read` | List All Tasks |
|
|
38
|
+
| [`listContactTasks`](#op-listcontacttasks) ★ | `GET /api/v1/contacts/{contact_id}/tasks` | read | `tasks:read` | List Contact Tasks |
|
|
39
|
+
| [`listSubtasks`](#op-listsubtasks) | `GET /api/v1/tasks/{task_id}/subtasks` | read | `tasks:read` | List Subtasks |
|
|
40
|
+
| [`listTaskReplies`](#op-listtaskreplies) | `GET /api/v1/tasks/{task_id}/replies` | read | `tasks:read` | List Task Replies |
|
|
41
|
+
| [`reopenTaskThread`](#op-reopentaskthread) | `DELETE /api/v1/tasks/{task_id}/resolve` | destructive | `tasks:delete` | Reopen Task Thread |
|
|
42
|
+
| [`resolveTaskThread`](#op-resolvetaskthread) | `POST /api/v1/tasks/{task_id}/resolve` | write | `tasks:write` | Resolve Task Thread |
|
|
43
|
+
| [`snoozeTaskReminder`](#op-snoozetaskreminder) | `POST /api/v1/tasks/{task_id}/snooze` | write | `tasks:write` | Snooze Task Reminder |
|
|
44
|
+
| [`startTaskExecution`](#op-starttaskexecution) | `POST /api/v1/tasks/{task_id}/start` | billable | `tasks:run` | Start Task Execution |
|
|
45
|
+
| [`taskExecutionHistory`](#op-taskexecutionhistory) | `GET /api/v1/tasks/{task_id}/execution` | read | `tasks:read` | Task Execution History |
|
|
46
|
+
| [`updateSubtask`](#op-updatesubtask) | `PUT /api/v1/tasks/{task_id}/subtasks/{subtask_id}` | write | `tasks:write` | Update Subtask |
|
|
47
|
+
| [`updateTask`](#op-updatetask) ★ | `PATCH /api/v1/tasks/{task_id}` | write | `tasks:write` | Update Task |
|
|
48
|
+
| [`updateTaskReply`](#op-updatetaskreply) | `PUT /api/v1/tasks/replies/{reply_id}` | write | `tasks:write` | Update Task Reply |
|
|
49
|
+
| [`updateTaskSettings`](#op-updatetasksettings) | `PUT /api/v1/tasks/settings` | write | `tasks:write` | Update Task Settings |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
<a id="op-assigntaskexecutor"></a>
|
|
54
|
+
|
|
55
|
+
### `g8.api.tasks.assignTaskExecutor(input)`
|
|
56
|
+
|
|
57
|
+
**Assign Task Executor**
|
|
58
|
+
|
|
59
|
+
- HTTP: `PUT /api/v1/tasks/{task_id}/assignment`
|
|
60
|
+
- operationId: `assign_task_executor_tasks__task_id__assignment_put` (also callable as `g8.api.call("assign_task_executor_tasks__task_id__assignment_put", input)`)
|
|
61
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
62
|
+
- API-key scope: `tasks:write`
|
|
63
|
+
|
|
64
|
+
**Input**
|
|
65
|
+
|
|
66
|
+
| Field | Type | Required | Description |
|
|
67
|
+
|---|---|---|---|
|
|
68
|
+
| `path.task_id` | `string (uuid)` | yes | |
|
|
69
|
+
| `body` | `TaskAssignmentRequest` | yes | Request body; fields below. |
|
|
70
|
+
|
|
71
|
+
Body fields (`TaskAssignmentRequest`):
|
|
72
|
+
|
|
73
|
+
| Field | Type | Required | Description |
|
|
74
|
+
|---|---|---|---|
|
|
75
|
+
| `body.expected_updated_at` | `string (date-time)` | yes | |
|
|
76
|
+
| `body.agent_id` | `string (uuid) \| null` | no | |
|
|
77
|
+
|
|
78
|
+
**Returns** `ApiResponse_TaskAssignmentResult_`: the envelope `{ data: TaskAssignmentResult, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
79
|
+
|
|
80
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
81
|
+
|
|
82
|
+
`TaskAssignmentResult` fields:
|
|
83
|
+
|
|
84
|
+
| Field | Type | Required | Description |
|
|
85
|
+
|---|---|---|---|
|
|
86
|
+
| `assigned` | `boolean` | yes | |
|
|
87
|
+
| `execution_started` | `boolean` | yes | |
|
|
88
|
+
|
|
89
|
+
**Example**
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
const result = await g8.api.tasks.assignTaskExecutor({
|
|
93
|
+
path: { task_id: "00000000-0000-0000-0000-000000000000" },
|
|
94
|
+
body: { expected_updated_at: "2026-01-01T09:00:00Z" },
|
|
95
|
+
});
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
<a id="op-createglobaltask"></a>
|
|
101
|
+
|
|
102
|
+
### `g8.api.tasks.createGlobalTask(input)`
|
|
103
|
+
|
|
104
|
+
**Create Global Task**
|
|
105
|
+
|
|
106
|
+
- HTTP: `POST /api/v1/tasks`
|
|
107
|
+
- operationId: `create_global_task_tasks_post` (also callable as `g8.api.call("create_global_task_tasks_post", input)`)
|
|
108
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
109
|
+
- API-key scope: `tasks:write`
|
|
110
|
+
|
|
111
|
+
**Input**
|
|
112
|
+
|
|
113
|
+
| Field | Type | Required | Description |
|
|
114
|
+
|---|---|---|---|
|
|
115
|
+
| `body` | `TaskCreateRequest` | yes | Request body; fields below. |
|
|
116
|
+
| `headers.idempotency-key` | `string (uuid) \| null` | no | |
|
|
117
|
+
|
|
118
|
+
Body fields (`TaskCreateRequest`):
|
|
119
|
+
|
|
120
|
+
| Field | Type | Required | Description |
|
|
121
|
+
|---|---|---|---|
|
|
122
|
+
| `body.title` | `string` | yes | Task title |
|
|
123
|
+
| `body.assignee_id` | `string \| null` | no | User ID to assign the task to |
|
|
124
|
+
| `body.description` | `string \| null` | no | Task description |
|
|
125
|
+
| `body.due_date` | `string \| null` | no | Due date (ISO 8601) |
|
|
126
|
+
| `body.entity_id` | `string \| null` | no | |
|
|
127
|
+
| `body.entity_type` | `string \| null` | no | |
|
|
128
|
+
| `body.parent_task_id` | `string \| null` | no | Parent task UUID. When set, this task is inserted as a subtask of the parent. Subtasks cannot themselves have subtasks (one level deep). |
|
|
129
|
+
| `body.priority` | `integer \| null` | no | Priority (0=none, 1=high, 2=medium, 3=low; historical 4=low is preserved) min 0, max 4 |
|
|
130
|
+
| `body.records` | `Array<Record<string, string>> \| null` | no | Optional related records: contact, company, deal, lead, application, team_member, or campaign (Studio). An empty list leaves the task standalone. |
|
|
131
|
+
| `body.source_url` | `string \| null` | no | max length 2048 |
|
|
132
|
+
| `body.subtask_sort_order` | `integer \| null` | no | Sort position within the parent's subtasks. When omitted on a subtask create, the handler appends to the end. |
|
|
133
|
+
| `body.tags` | `Array<string> \| null` | no | max items 20 |
|
|
134
|
+
| `body.task_type` | `string \| null` | no | Activity type, such as call or meeting |
|
|
135
|
+
|
|
136
|
+
**Returns** `ApiResponse_TaskResponse_`: the envelope `{ data: TaskResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
137
|
+
|
|
138
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
139
|
+
|
|
140
|
+
`TaskResponse` fields:
|
|
141
|
+
|
|
142
|
+
| Field | Type | Required | Description |
|
|
143
|
+
|---|---|---|---|
|
|
144
|
+
| `id` | `string` | yes | |
|
|
145
|
+
| `title` | `string` | yes | |
|
|
146
|
+
| `assignee_id` | `string \| null` | no | |
|
|
147
|
+
| `assignee_name` | `string \| null` | no | |
|
|
148
|
+
| `completed_subtask_count` | `integer \| null` | no | |
|
|
149
|
+
| `created_at` | `string \| null` | no | |
|
|
150
|
+
| `created_by` | `string \| null` | no | |
|
|
151
|
+
| `description` | `string \| null` | no | |
|
|
152
|
+
| `due_date` | `string \| null` | no | |
|
|
153
|
+
| `entity_id` | `string \| null` | no | |
|
|
154
|
+
| `entity_label` | `string \| null` | no | |
|
|
155
|
+
| `entity_type` | `string \| null` | no | |
|
|
156
|
+
| `execution_id` | `string \| null` | no | |
|
|
157
|
+
| `executor_agent_id` | `string \| null` | no | |
|
|
158
|
+
| `executor_agent_name` | `string \| null` | no | |
|
|
159
|
+
| `executor_type` | `"human" \| "agent"` | no | default `"human"` |
|
|
160
|
+
| `links` | `Array<Record<string, unknown>>` | no | |
|
|
161
|
+
| `parent_task_id` | `string \| null` | no | |
|
|
162
|
+
| `priority` | `integer \| null` | no | |
|
|
163
|
+
| `reminder_at` | `string \| null` | no | |
|
|
164
|
+
| `reminder_sent_at` | `string \| null` | no | |
|
|
165
|
+
| `source_external_id` | `string \| null` | no | |
|
|
166
|
+
| `source_meeting_id` | `integer \| null` | no | |
|
|
167
|
+
| `source_meeting_start_time` | `string \| null` | no | |
|
|
168
|
+
| `source_meeting_title` | `string \| null` | no | |
|
|
169
|
+
| `source_transcript_id` | `string \| null` | no | |
|
|
170
|
+
| `source_url` | `string \| null` | no | |
|
|
171
|
+
| `status` | `string \| null` | no | |
|
|
172
|
+
| `subtask_count` | `integer \| null` | no | |
|
|
173
|
+
| `subtask_sort_order` | `integer \| null` | no | |
|
|
174
|
+
| `tags` | `Array<string>` | no | |
|
|
175
|
+
| `task_type` | `string \| null` | no | |
|
|
176
|
+
| `updated_at` | `string \| null` | no | |
|
|
177
|
+
| `visibility` | `string \| null` | no | |
|
|
178
|
+
|
|
179
|
+
**Example**
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
const result = await g8.api.tasks.createGlobalTask({ body: { title: "Example" } });
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
<a id="op-createsubtask"></a>
|
|
188
|
+
|
|
189
|
+
### `g8.api.tasks.createSubtask(input)`
|
|
190
|
+
|
|
191
|
+
**Create Subtask**
|
|
192
|
+
|
|
193
|
+
- HTTP: `POST /api/v1/tasks/{task_id}/subtasks`
|
|
194
|
+
- operationId: `create_subtask_tasks__task_id__subtasks_post` (also callable as `g8.api.call("create_subtask_tasks__task_id__subtasks_post", input)`)
|
|
195
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
196
|
+
- API-key scope: `tasks:write`
|
|
197
|
+
|
|
198
|
+
Create a subtask under this task.
|
|
199
|
+
|
|
200
|
+
`entity_type` / `entity_id` name the RECORD the subtask hangs off and are
|
|
201
|
+
required - the parent supplies the hierarchy, not the record link. That
|
|
202
|
+
record is authorised against the caller's contact, company and deal
|
|
203
|
+
scopes, so a subtask cannot be attached to something the key cannot see.
|
|
204
|
+
|
|
205
|
+
`parent_task_id` in the body is ignored: the parent is the task in the
|
|
206
|
+
path.
|
|
207
|
+
|
|
208
|
+
**Input**
|
|
209
|
+
|
|
210
|
+
| Field | Type | Required | Description |
|
|
211
|
+
|---|---|---|---|
|
|
212
|
+
| `path.task_id` | `string` | yes | Parent task id (UUID). |
|
|
213
|
+
| `body` | `SubtaskCreateRequest` | yes | Request body; fields below. |
|
|
214
|
+
|
|
215
|
+
Body fields (`SubtaskCreateRequest`):
|
|
216
|
+
|
|
217
|
+
| Field | Type | Required | Description |
|
|
218
|
+
|---|---|---|---|
|
|
219
|
+
| `body.entity_id` | `string` | yes | Record id. |
|
|
220
|
+
| `body.entity_type` | `string` | yes | Record type: contact \| company \| deal. |
|
|
221
|
+
| `body.title` | `string` | yes | Subtask title. |
|
|
222
|
+
| `body.assignee_id` | `string \| null` | no | Assignee id. |
|
|
223
|
+
| `body.assignee_name` | `string \| null` | no | Assignee display name. |
|
|
224
|
+
| `body.description` | `string \| null` | no | Free-text body. |
|
|
225
|
+
| `body.due_date` | `string \| null` | no | ISO 8601 due date. |
|
|
226
|
+
| `body.parent_task_id` | `string \| null` | no | Ignored - the parent is the task in the path. Present for parity. |
|
|
227
|
+
| `body.priority` | `integer \| null` | no | Priority. |
|
|
228
|
+
| `body.records` | `Array<Record<string, unknown>> \| null` | no | Additional `{entity_type, entity_id}` records to link. When set, the FIRST entry becomes the primary record. |
|
|
229
|
+
| `body.reminder_at` | `string \| null` | no | ISO 8601 UTC reminder time. Omit for no reminder. |
|
|
230
|
+
| `body.source_url` | `string \| null` | no | Page the subtask was raised from. max length 2048 |
|
|
231
|
+
| `body.subtask_sort_order` | `integer \| null` | no | Position among sibling subtasks. |
|
|
232
|
+
| `body.tags` | `Array<string> \| null` | no | Labels (max 20). max items 20 |
|
|
233
|
+
| `body.task_type` | `string \| null` | no | Task type. |
|
|
234
|
+
| `body.visibility` | `string \| null` | no | public \| team \| private. Omit for the org default. |
|
|
235
|
+
|
|
236
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
237
|
+
|
|
238
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
239
|
+
|
|
240
|
+
**Example**
|
|
241
|
+
|
|
242
|
+
```ts
|
|
243
|
+
const result = await g8.api.tasks.createSubtask({
|
|
244
|
+
path: { task_id: "id" },
|
|
245
|
+
body: { entity_id: "id", entity_type: "example", title: "Example" },
|
|
246
|
+
});
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
<a id="op-createtask"></a>
|
|
252
|
+
|
|
253
|
+
### `g8.api.tasks.createTask(input)`
|
|
254
|
+
|
|
255
|
+
**Create Task**
|
|
256
|
+
|
|
257
|
+
- HTTP: `POST /api/v1/contacts/{contact_id}/tasks`
|
|
258
|
+
- operationId: `create_task_contacts__contact_id__tasks_post` (also callable as `g8.api.call("create_task_contacts__contact_id__tasks_post", input)`)
|
|
259
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
260
|
+
- API-key scope: `tasks:write`
|
|
261
|
+
- ★ Hand-written: [`g8.tasks.create()`](../sdk-clients.md#g8-tasks-create)
|
|
262
|
+
|
|
263
|
+
Create a task on a contact.
|
|
264
|
+
|
|
265
|
+
**Input**
|
|
266
|
+
|
|
267
|
+
| Field | Type | Required | Description |
|
|
268
|
+
|---|---|---|---|
|
|
269
|
+
| `path.contact_id` | `integer` | yes | Contact ID |
|
|
270
|
+
| `body` | `TaskCreateRequest` | yes | Request body; fields below. |
|
|
271
|
+
|
|
272
|
+
Body fields (`TaskCreateRequest`):
|
|
273
|
+
|
|
274
|
+
| Field | Type | Required | Description |
|
|
275
|
+
|---|---|---|---|
|
|
276
|
+
| `body.title` | `string` | yes | Task title |
|
|
277
|
+
| `body.assignee_id` | `string \| null` | no | User ID to assign the task to |
|
|
278
|
+
| `body.description` | `string \| null` | no | Task description |
|
|
279
|
+
| `body.due_date` | `string \| null` | no | Due date (ISO 8601) |
|
|
280
|
+
| `body.entity_id` | `string \| null` | no | |
|
|
281
|
+
| `body.entity_type` | `string \| null` | no | |
|
|
282
|
+
| `body.parent_task_id` | `string \| null` | no | Parent task UUID. When set, this task is inserted as a subtask of the parent. Subtasks cannot themselves have subtasks (one level deep). |
|
|
283
|
+
| `body.priority` | `integer \| null` | no | Priority (0=none, 1=high, 2=medium, 3=low; historical 4=low is preserved) min 0, max 4 |
|
|
284
|
+
| `body.records` | `Array<Record<string, string>> \| null` | no | Optional related records: contact, company, deal, lead, application, team_member, or campaign (Studio). An empty list leaves the task standalone. |
|
|
285
|
+
| `body.source_url` | `string \| null` | no | max length 2048 |
|
|
286
|
+
| `body.subtask_sort_order` | `integer \| null` | no | Sort position within the parent's subtasks. When omitted on a subtask create, the handler appends to the end. |
|
|
287
|
+
| `body.tags` | `Array<string> \| null` | no | max items 20 |
|
|
288
|
+
| `body.task_type` | `string \| null` | no | Activity type, such as call or meeting |
|
|
289
|
+
|
|
290
|
+
**Returns** `ApiResponse_TaskResponse_`: the envelope `{ data: TaskResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
291
|
+
|
|
292
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
293
|
+
|
|
294
|
+
`TaskResponse` fields:
|
|
295
|
+
|
|
296
|
+
| Field | Type | Required | Description |
|
|
297
|
+
|---|---|---|---|
|
|
298
|
+
| `id` | `string` | yes | |
|
|
299
|
+
| `title` | `string` | yes | |
|
|
300
|
+
| `assignee_id` | `string \| null` | no | |
|
|
301
|
+
| `assignee_name` | `string \| null` | no | |
|
|
302
|
+
| `completed_subtask_count` | `integer \| null` | no | |
|
|
303
|
+
| `created_at` | `string \| null` | no | |
|
|
304
|
+
| `created_by` | `string \| null` | no | |
|
|
305
|
+
| `description` | `string \| null` | no | |
|
|
306
|
+
| `due_date` | `string \| null` | no | |
|
|
307
|
+
| `entity_id` | `string \| null` | no | |
|
|
308
|
+
| `entity_label` | `string \| null` | no | |
|
|
309
|
+
| `entity_type` | `string \| null` | no | |
|
|
310
|
+
| `execution_id` | `string \| null` | no | |
|
|
311
|
+
| `executor_agent_id` | `string \| null` | no | |
|
|
312
|
+
| `executor_agent_name` | `string \| null` | no | |
|
|
313
|
+
| `executor_type` | `"human" \| "agent"` | no | default `"human"` |
|
|
314
|
+
| `links` | `Array<Record<string, unknown>>` | no | |
|
|
315
|
+
| `parent_task_id` | `string \| null` | no | |
|
|
316
|
+
| `priority` | `integer \| null` | no | |
|
|
317
|
+
| `reminder_at` | `string \| null` | no | |
|
|
318
|
+
| `reminder_sent_at` | `string \| null` | no | |
|
|
319
|
+
| `source_external_id` | `string \| null` | no | |
|
|
320
|
+
| `source_meeting_id` | `integer \| null` | no | |
|
|
321
|
+
| `source_meeting_start_time` | `string \| null` | no | |
|
|
322
|
+
| `source_meeting_title` | `string \| null` | no | |
|
|
323
|
+
| `source_transcript_id` | `string \| null` | no | |
|
|
324
|
+
| `source_url` | `string \| null` | no | |
|
|
325
|
+
| `status` | `string \| null` | no | |
|
|
326
|
+
| `subtask_count` | `integer \| null` | no | |
|
|
327
|
+
| `subtask_sort_order` | `integer \| null` | no | |
|
|
328
|
+
| `tags` | `Array<string>` | no | |
|
|
329
|
+
| `task_type` | `string \| null` | no | |
|
|
330
|
+
| `updated_at` | `string \| null` | no | |
|
|
331
|
+
| `visibility` | `string \| null` | no | |
|
|
332
|
+
|
|
333
|
+
**Example**
|
|
334
|
+
|
|
335
|
+
```ts
|
|
336
|
+
const result = await g8.api.tasks.createTask({ path: { contact_id: 123 }, body: { title: "Example" } });
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
<a id="op-createtaskcopies"></a>
|
|
342
|
+
|
|
343
|
+
### `g8.api.tasks.createTaskCopies(input)`
|
|
344
|
+
|
|
345
|
+
**Create Task Copies**
|
|
346
|
+
|
|
347
|
+
- HTTP: `POST /api/v1/tasks/{task_id}/copies`
|
|
348
|
+
- operationId: `create_task_copies_tasks__task_id__copies_post` (also callable as `g8.api.call("create_task_copies_tasks__task_id__copies_post", input)`)
|
|
349
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
350
|
+
- API-key scope: `tasks:write`
|
|
351
|
+
|
|
352
|
+
**Input**
|
|
353
|
+
|
|
354
|
+
| Field | Type | Required | Description |
|
|
355
|
+
|---|---|---|---|
|
|
356
|
+
| `path.task_id` | `string (uuid)` | yes | |
|
|
357
|
+
| `body` | `TaskCopyRequest` | yes | Request body; fields below. |
|
|
358
|
+
|
|
359
|
+
Body fields (`TaskCopyRequest`):
|
|
360
|
+
|
|
361
|
+
| Field | Type | Required | Description |
|
|
362
|
+
|---|---|---|---|
|
|
363
|
+
| `body.assignee_ids` | `Array<string (uuid)>` | yes | min items 1, max items 20 |
|
|
364
|
+
| `body.expected_updated_at` | `string (date-time)` | yes | |
|
|
365
|
+
| `body.request_id` | `string (uuid)` | yes | |
|
|
366
|
+
|
|
367
|
+
**Returns** `unknown`.
|
|
368
|
+
|
|
369
|
+
**Example**
|
|
370
|
+
|
|
371
|
+
```ts
|
|
372
|
+
const result = await g8.api.tasks.createTaskCopies({
|
|
373
|
+
path: { task_id: "00000000-0000-0000-0000-000000000000" },
|
|
374
|
+
body: {
|
|
375
|
+
assignee_ids: ["00000000-0000-0000-0000-000000000000"],
|
|
376
|
+
expected_updated_at: "2026-01-01T09:00:00Z",
|
|
377
|
+
request_id: "00000000-0000-0000-0000-000000000000",
|
|
378
|
+
},
|
|
379
|
+
});
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
<a id="op-createtaskreply"></a>
|
|
385
|
+
|
|
386
|
+
### `g8.api.tasks.createTaskReply(input)`
|
|
387
|
+
|
|
388
|
+
**Create Task Reply**
|
|
389
|
+
|
|
390
|
+
- HTTP: `POST /api/v1/tasks/{task_id}/replies`
|
|
391
|
+
- operationId: `create_task_reply_tasks__task_id__replies_post` (also callable as `g8.api.call("create_task_reply_tasks__task_id__replies_post", input)`)
|
|
392
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
393
|
+
- API-key scope: `tasks:write`
|
|
394
|
+
|
|
395
|
+
Post a reply on this task's thread. INTERNAL to your organisation.
|
|
396
|
+
|
|
397
|
+
Nothing here reaches a customer. `mentioned_user_ids` notifies those
|
|
398
|
+
people inside graph8 - it does not email anyone outside it.
|
|
399
|
+
|
|
400
|
+
**Input**
|
|
401
|
+
|
|
402
|
+
| Field | Type | Required | Description |
|
|
403
|
+
|---|---|---|---|
|
|
404
|
+
| `path.task_id` | `string` | yes | Task id (UUID). |
|
|
405
|
+
| `body` | `TaskReplyCreateRequest` | yes | Request body; fields below. |
|
|
406
|
+
|
|
407
|
+
Body fields (`TaskReplyCreateRequest`):
|
|
408
|
+
|
|
409
|
+
| Field | Type | Required | Description |
|
|
410
|
+
|---|---|---|---|
|
|
411
|
+
| `body.body` | `string` | yes | Reply text. |
|
|
412
|
+
| `body.author_avatar_url` | `string \| null` | no | Avatar to show beside the reply. |
|
|
413
|
+
| `body.mentioned_user_ids` | `Array<string>` | no | Users to notify. |
|
|
414
|
+
|
|
415
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
416
|
+
|
|
417
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
418
|
+
|
|
419
|
+
**Example**
|
|
420
|
+
|
|
421
|
+
```ts
|
|
422
|
+
const result = await g8.api.tasks.createTaskReply({ path: { task_id: "id" }, body: { body: "example" } });
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
<a id="op-deletesubtask"></a>
|
|
428
|
+
|
|
429
|
+
### `g8.api.tasks.deleteSubtask(input)`
|
|
430
|
+
|
|
431
|
+
**Delete Subtask**
|
|
432
|
+
|
|
433
|
+
- HTTP: `DELETE /api/v1/tasks/{task_id}/subtasks/{subtask_id}`
|
|
434
|
+
- operationId: `delete_subtask_tasks__task_id__subtasks__subtask_id__delete` (also callable as `g8.api.call("delete_subtask_tasks__task_id__subtasks__subtask_id__delete", input)`)
|
|
435
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
436
|
+
- API-key scope: `tasks:delete`
|
|
437
|
+
|
|
438
|
+
Delete one subtask. The parent and its siblings are untouched.
|
|
439
|
+
|
|
440
|
+
**Input**
|
|
441
|
+
|
|
442
|
+
| Field | Type | Required | Description |
|
|
443
|
+
|---|---|---|---|
|
|
444
|
+
| `path.task_id` | `string` | yes | Parent task id (UUID). |
|
|
445
|
+
| `path.subtask_id` | `string` | yes | Subtask id (UUID). |
|
|
446
|
+
|
|
447
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
448
|
+
|
|
449
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
450
|
+
|
|
451
|
+
**Example**
|
|
452
|
+
|
|
453
|
+
```ts
|
|
454
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
455
|
+
const result = await g8.api.tasks.deleteSubtask({ path: { task_id: "id", subtask_id: "id" } });
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
<a id="op-deletetask"></a>
|
|
461
|
+
|
|
462
|
+
### `g8.api.tasks.deleteTask(input)`
|
|
463
|
+
|
|
464
|
+
**Delete Task**
|
|
465
|
+
|
|
466
|
+
- HTTP: `DELETE /api/v1/tasks/{task_id}`
|
|
467
|
+
- operationId: `delete_task_tasks__task_id__delete` (also callable as `g8.api.call("delete_task_tasks__task_id__delete", input)`)
|
|
468
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
469
|
+
- API-key scope: `tasks:delete`
|
|
470
|
+
- ★ Hand-written: [`g8.tasks.delete()`](../sdk-clients.md#g8-tasks-delete)
|
|
471
|
+
|
|
472
|
+
Delete a task.
|
|
473
|
+
|
|
474
|
+
**Input**
|
|
475
|
+
|
|
476
|
+
| Field | Type | Required | Description |
|
|
477
|
+
|---|---|---|---|
|
|
478
|
+
| `path.task_id` | `string` | yes | Task ID |
|
|
479
|
+
|
|
480
|
+
**Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
481
|
+
|
|
482
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
483
|
+
|
|
484
|
+
**Example**
|
|
485
|
+
|
|
486
|
+
```ts
|
|
487
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
488
|
+
const result = await g8.api.tasks.deleteTask({ path: { task_id: "id" } });
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
<a id="op-deletetaskreply"></a>
|
|
494
|
+
|
|
495
|
+
### `g8.api.tasks.deleteTaskReply(input)`
|
|
496
|
+
|
|
497
|
+
**Delete Task Reply**
|
|
498
|
+
|
|
499
|
+
- HTTP: `DELETE /api/v1/tasks/replies/{reply_id}`
|
|
500
|
+
- operationId: `delete_task_reply_tasks_replies__reply_id__delete` (also callable as `g8.api.call("delete_task_reply_tasks_replies__reply_id__delete", input)`)
|
|
501
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
502
|
+
- API-key scope: `tasks:delete`
|
|
503
|
+
|
|
504
|
+
Delete a reply. AUTHOR ONLY. The rest of the thread stays.
|
|
505
|
+
|
|
506
|
+
**Input**
|
|
507
|
+
|
|
508
|
+
| Field | Type | Required | Description |
|
|
509
|
+
|---|---|---|---|
|
|
510
|
+
| `path.reply_id` | `string` | yes | Reply id (UUID). |
|
|
511
|
+
|
|
512
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
513
|
+
|
|
514
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
515
|
+
|
|
516
|
+
**Example**
|
|
517
|
+
|
|
518
|
+
```ts
|
|
519
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
520
|
+
const result = await g8.api.tasks.deleteTaskReply({ path: { reply_id: "id" } });
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
<a id="op-gettask"></a>
|
|
526
|
+
|
|
527
|
+
### `g8.api.tasks.getTask(input)`
|
|
528
|
+
|
|
529
|
+
**Get Task**
|
|
530
|
+
|
|
531
|
+
- HTTP: `GET /api/v1/tasks/{task_id}`
|
|
532
|
+
- operationId: `get_task_tasks__task_id__get` (also callable as `g8.api.call("get_task_tasks__task_id__get", input)`)
|
|
533
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
534
|
+
- API-key scope: `tasks:read`
|
|
535
|
+
|
|
536
|
+
**Input**
|
|
537
|
+
|
|
538
|
+
| Field | Type | Required | Description |
|
|
539
|
+
|---|---|---|---|
|
|
540
|
+
| `path.task_id` | `string` | yes | |
|
|
541
|
+
|
|
542
|
+
**Returns** `ApiResponse_TaskResponse_`: the envelope `{ data: TaskResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
543
|
+
|
|
544
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
545
|
+
|
|
546
|
+
`TaskResponse` fields:
|
|
547
|
+
|
|
548
|
+
| Field | Type | Required | Description |
|
|
549
|
+
|---|---|---|---|
|
|
550
|
+
| `id` | `string` | yes | |
|
|
551
|
+
| `title` | `string` | yes | |
|
|
552
|
+
| `assignee_id` | `string \| null` | no | |
|
|
553
|
+
| `assignee_name` | `string \| null` | no | |
|
|
554
|
+
| `completed_subtask_count` | `integer \| null` | no | |
|
|
555
|
+
| `created_at` | `string \| null` | no | |
|
|
556
|
+
| `created_by` | `string \| null` | no | |
|
|
557
|
+
| `description` | `string \| null` | no | |
|
|
558
|
+
| `due_date` | `string \| null` | no | |
|
|
559
|
+
| `entity_id` | `string \| null` | no | |
|
|
560
|
+
| `entity_label` | `string \| null` | no | |
|
|
561
|
+
| `entity_type` | `string \| null` | no | |
|
|
562
|
+
| `execution_id` | `string \| null` | no | |
|
|
563
|
+
| `executor_agent_id` | `string \| null` | no | |
|
|
564
|
+
| `executor_agent_name` | `string \| null` | no | |
|
|
565
|
+
| `executor_type` | `"human" \| "agent"` | no | default `"human"` |
|
|
566
|
+
| `links` | `Array<Record<string, unknown>>` | no | |
|
|
567
|
+
| `parent_task_id` | `string \| null` | no | |
|
|
568
|
+
| `priority` | `integer \| null` | no | |
|
|
569
|
+
| `reminder_at` | `string \| null` | no | |
|
|
570
|
+
| `reminder_sent_at` | `string \| null` | no | |
|
|
571
|
+
| `source_external_id` | `string \| null` | no | |
|
|
572
|
+
| `source_meeting_id` | `integer \| null` | no | |
|
|
573
|
+
| `source_meeting_start_time` | `string \| null` | no | |
|
|
574
|
+
| `source_meeting_title` | `string \| null` | no | |
|
|
575
|
+
| `source_transcript_id` | `string \| null` | no | |
|
|
576
|
+
| `source_url` | `string \| null` | no | |
|
|
577
|
+
| `status` | `string \| null` | no | |
|
|
578
|
+
| `subtask_count` | `integer \| null` | no | |
|
|
579
|
+
| `subtask_sort_order` | `integer \| null` | no | |
|
|
580
|
+
| `tags` | `Array<string>` | no | |
|
|
581
|
+
| `task_type` | `string \| null` | no | |
|
|
582
|
+
| `updated_at` | `string \| null` | no | |
|
|
583
|
+
| `visibility` | `string \| null` | no | |
|
|
584
|
+
|
|
585
|
+
**Example**
|
|
586
|
+
|
|
587
|
+
```ts
|
|
588
|
+
const result = await g8.api.tasks.getTask({ path: { task_id: "id" } });
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
<a id="op-gettaskrecord"></a>
|
|
594
|
+
|
|
595
|
+
### `g8.api.tasks.getTaskRecord(input)`
|
|
596
|
+
|
|
597
|
+
**Get Task Record**
|
|
598
|
+
|
|
599
|
+
- HTTP: `GET /api/v1/tasks/records/{entity_type}/{entity_id}`
|
|
600
|
+
- operationId: `get_task_record_tasks_records__entity_type___entity_id__get` (also callable as `g8.api.call("get_task_record_tasks_records__entity_type___entity_id__get", input)`)
|
|
601
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
602
|
+
- API-key scope: `tasks:read`
|
|
603
|
+
|
|
604
|
+
Resolve the record a task points at to its display name and link.
|
|
605
|
+
|
|
606
|
+
404 when the record does not exist or the key cannot see it. The task
|
|
607
|
+
scope resolved for an API key carries no `record_scopes`, so the key's
|
|
608
|
+
own resource grants (`get_task_record_scopes`, the same resolver
|
|
609
|
+
`GET /tasks/{task_id}` uses) are attached before the lookup.
|
|
610
|
+
|
|
611
|
+
**Input**
|
|
612
|
+
|
|
613
|
+
| Field | Type | Required | Description |
|
|
614
|
+
|---|---|---|---|
|
|
615
|
+
| `path.entity_type` | `string` | yes | Record type, e.g. `contact`, `company`, `deal`. |
|
|
616
|
+
| `path.entity_id` | `string` | yes | Record id. |
|
|
617
|
+
|
|
618
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
619
|
+
|
|
620
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
621
|
+
|
|
622
|
+
**Example**
|
|
623
|
+
|
|
624
|
+
```ts
|
|
625
|
+
const result = await g8.api.tasks.getTaskRecord({ path: { entity_type: "example", entity_id: "id" } });
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
---
|
|
629
|
+
|
|
630
|
+
<a id="op-gettasksettings"></a>
|
|
631
|
+
|
|
632
|
+
### `g8.api.tasks.getTaskSettings(input?)`
|
|
633
|
+
|
|
634
|
+
**Get Task Settings**
|
|
635
|
+
|
|
636
|
+
- HTTP: `GET /api/v1/tasks/settings`
|
|
637
|
+
- operationId: `get_task_settings_tasks_settings_get` (also callable as `g8.api.call("get_task_settings_tasks_settings_get", input)`)
|
|
638
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
639
|
+
- API-key scope: `tasks:read`
|
|
640
|
+
|
|
641
|
+
The org's task settings: default visibility, mentions, and how a parent
|
|
642
|
+
task completes relative to its subtasks.
|
|
643
|
+
|
|
644
|
+
**Input**: none.
|
|
645
|
+
|
|
646
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
647
|
+
|
|
648
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
649
|
+
|
|
650
|
+
**Example**
|
|
651
|
+
|
|
652
|
+
```ts
|
|
653
|
+
const result = await g8.api.tasks.getTaskSettings();
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
---
|
|
657
|
+
|
|
658
|
+
<a id="op-listalltasks"></a>
|
|
659
|
+
|
|
660
|
+
### `g8.api.tasks.listAllTasks(input?)`
|
|
661
|
+
|
|
662
|
+
**List All Tasks**
|
|
663
|
+
|
|
664
|
+
- HTTP: `GET /api/v1/tasks`
|
|
665
|
+
- operationId: `list_all_tasks_tasks_get` (also callable as `g8.api.call("list_all_tasks_tasks_get", input)`)
|
|
666
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
667
|
+
- API-key scope: `tasks:read`
|
|
668
|
+
- ★ Hand-written: [`g8.tasks.list()`](../sdk-clients.md#g8-tasks-list)
|
|
669
|
+
|
|
670
|
+
List all tasks org-wide with optional filters.
|
|
671
|
+
|
|
672
|
+
The backend list is unpaginated; ``limit``/``offset`` bound the response
|
|
673
|
+
here (same approach as the MCP ``g8_get_tasks`` tool) so an org with many
|
|
674
|
+
tasks can't return an unbounded payload. Ordering is deterministic
|
|
675
|
+
(``due_date`` asc nulls-last, then ``created_at`` desc), so paging is stable.
|
|
676
|
+
|
|
677
|
+
**Input**
|
|
678
|
+
|
|
679
|
+
| Field | Type | Required | Description |
|
|
680
|
+
|---|---|---|---|
|
|
681
|
+
| `query.status` | `string \| null` | no | Filter by status (open, completed) |
|
|
682
|
+
| `query.priority` | `integer \| null` | no | Filter by priority |
|
|
683
|
+
| `query.assignee_id` | `string \| null` | no | Filter by assignee user ID |
|
|
684
|
+
| `query.created_by` | `string \| null` | no | Filter by creator (email or user ID) |
|
|
685
|
+
| `query.task_type` | `string \| null` | no | Filter by task type (call, email, meeting, ...) |
|
|
686
|
+
| `query.entity_type` | `string \| null` | no | Filter by linked entity type (contact, company, deal, team_member) |
|
|
687
|
+
| `query.entity_id` | `string \| null` | no | Filter by linked entity ID (pair with entity_type) |
|
|
688
|
+
| `query.source_meeting_id` | `integer \| null` | no | Filter to tasks from a specific meeting |
|
|
689
|
+
| `query.search` | `string \| null` | no | Search by task title |
|
|
690
|
+
| `query.limit` | `integer` | no | Max tasks to return (default 100, max 200) default `100` |
|
|
691
|
+
| `query.offset` | `integer` | no | Number of tasks to skip default `0` |
|
|
692
|
+
|
|
693
|
+
**Returns** `ApiResponse_list_TaskResponse__`: the envelope `{ data: Array<TaskResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
694
|
+
|
|
695
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
696
|
+
|
|
697
|
+
`TaskResponse` fields:
|
|
698
|
+
|
|
699
|
+
| Field | Type | Required | Description |
|
|
700
|
+
|---|---|---|---|
|
|
701
|
+
| `id` | `string` | yes | |
|
|
702
|
+
| `title` | `string` | yes | |
|
|
703
|
+
| `assignee_id` | `string \| null` | no | |
|
|
704
|
+
| `assignee_name` | `string \| null` | no | |
|
|
705
|
+
| `completed_subtask_count` | `integer \| null` | no | |
|
|
706
|
+
| `created_at` | `string \| null` | no | |
|
|
707
|
+
| `created_by` | `string \| null` | no | |
|
|
708
|
+
| `description` | `string \| null` | no | |
|
|
709
|
+
| `due_date` | `string \| null` | no | |
|
|
710
|
+
| `entity_id` | `string \| null` | no | |
|
|
711
|
+
| `entity_label` | `string \| null` | no | |
|
|
712
|
+
| `entity_type` | `string \| null` | no | |
|
|
713
|
+
| `execution_id` | `string \| null` | no | |
|
|
714
|
+
| `executor_agent_id` | `string \| null` | no | |
|
|
715
|
+
| `executor_agent_name` | `string \| null` | no | |
|
|
716
|
+
| `executor_type` | `"human" \| "agent"` | no | default `"human"` |
|
|
717
|
+
| `links` | `Array<Record<string, unknown>>` | no | |
|
|
718
|
+
| `parent_task_id` | `string \| null` | no | |
|
|
719
|
+
| `priority` | `integer \| null` | no | |
|
|
720
|
+
| `reminder_at` | `string \| null` | no | |
|
|
721
|
+
| `reminder_sent_at` | `string \| null` | no | |
|
|
722
|
+
| `source_external_id` | `string \| null` | no | |
|
|
723
|
+
| `source_meeting_id` | `integer \| null` | no | |
|
|
724
|
+
| `source_meeting_start_time` | `string \| null` | no | |
|
|
725
|
+
| `source_meeting_title` | `string \| null` | no | |
|
|
726
|
+
| `source_transcript_id` | `string \| null` | no | |
|
|
727
|
+
| `source_url` | `string \| null` | no | |
|
|
728
|
+
| `status` | `string \| null` | no | |
|
|
729
|
+
| `subtask_count` | `integer \| null` | no | |
|
|
730
|
+
| `subtask_sort_order` | `integer \| null` | no | |
|
|
731
|
+
| `tags` | `Array<string>` | no | |
|
|
732
|
+
| `task_type` | `string \| null` | no | |
|
|
733
|
+
| `updated_at` | `string \| null` | no | |
|
|
734
|
+
| `visibility` | `string \| null` | no | |
|
|
735
|
+
|
|
736
|
+
**Example**
|
|
737
|
+
|
|
738
|
+
```ts
|
|
739
|
+
const result = await g8.api.tasks.listAllTasks();
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
---
|
|
743
|
+
|
|
744
|
+
<a id="op-listcontacttasks"></a>
|
|
745
|
+
|
|
746
|
+
### `g8.api.tasks.listContactTasks(input)`
|
|
747
|
+
|
|
748
|
+
**List Contact Tasks**
|
|
749
|
+
|
|
750
|
+
- HTTP: `GET /api/v1/contacts/{contact_id}/tasks`
|
|
751
|
+
- operationId: `list_contact_tasks_contacts__contact_id__tasks_get` (also callable as `g8.api.call("list_contact_tasks_contacts__contact_id__tasks_get", input)`)
|
|
752
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
753
|
+
- API-key scope: `tasks:read`
|
|
754
|
+
- ★ Hand-written: [`g8.tasks.listForContact()`](../sdk-clients.md#g8-tasks-listforcontact)
|
|
755
|
+
|
|
756
|
+
List all tasks on a contact.
|
|
757
|
+
|
|
758
|
+
**Input**
|
|
759
|
+
|
|
760
|
+
| Field | Type | Required | Description |
|
|
761
|
+
|---|---|---|---|
|
|
762
|
+
| `path.contact_id` | `integer` | yes | Contact ID |
|
|
763
|
+
| `query.status` | `string \| null` | no | Filter by status (open, completed) |
|
|
764
|
+
|
|
765
|
+
**Returns** `ApiResponse_list_TaskResponse__`: the envelope `{ data: Array<TaskResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
766
|
+
|
|
767
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
768
|
+
|
|
769
|
+
`TaskResponse` fields:
|
|
770
|
+
|
|
771
|
+
| Field | Type | Required | Description |
|
|
772
|
+
|---|---|---|---|
|
|
773
|
+
| `id` | `string` | yes | |
|
|
774
|
+
| `title` | `string` | yes | |
|
|
775
|
+
| `assignee_id` | `string \| null` | no | |
|
|
776
|
+
| `assignee_name` | `string \| null` | no | |
|
|
777
|
+
| `completed_subtask_count` | `integer \| null` | no | |
|
|
778
|
+
| `created_at` | `string \| null` | no | |
|
|
779
|
+
| `created_by` | `string \| null` | no | |
|
|
780
|
+
| `description` | `string \| null` | no | |
|
|
781
|
+
| `due_date` | `string \| null` | no | |
|
|
782
|
+
| `entity_id` | `string \| null` | no | |
|
|
783
|
+
| `entity_label` | `string \| null` | no | |
|
|
784
|
+
| `entity_type` | `string \| null` | no | |
|
|
785
|
+
| `execution_id` | `string \| null` | no | |
|
|
786
|
+
| `executor_agent_id` | `string \| null` | no | |
|
|
787
|
+
| `executor_agent_name` | `string \| null` | no | |
|
|
788
|
+
| `executor_type` | `"human" \| "agent"` | no | default `"human"` |
|
|
789
|
+
| `links` | `Array<Record<string, unknown>>` | no | |
|
|
790
|
+
| `parent_task_id` | `string \| null` | no | |
|
|
791
|
+
| `priority` | `integer \| null` | no | |
|
|
792
|
+
| `reminder_at` | `string \| null` | no | |
|
|
793
|
+
| `reminder_sent_at` | `string \| null` | no | |
|
|
794
|
+
| `source_external_id` | `string \| null` | no | |
|
|
795
|
+
| `source_meeting_id` | `integer \| null` | no | |
|
|
796
|
+
| `source_meeting_start_time` | `string \| null` | no | |
|
|
797
|
+
| `source_meeting_title` | `string \| null` | no | |
|
|
798
|
+
| `source_transcript_id` | `string \| null` | no | |
|
|
799
|
+
| `source_url` | `string \| null` | no | |
|
|
800
|
+
| `status` | `string \| null` | no | |
|
|
801
|
+
| `subtask_count` | `integer \| null` | no | |
|
|
802
|
+
| `subtask_sort_order` | `integer \| null` | no | |
|
|
803
|
+
| `tags` | `Array<string>` | no | |
|
|
804
|
+
| `task_type` | `string \| null` | no | |
|
|
805
|
+
| `updated_at` | `string \| null` | no | |
|
|
806
|
+
| `visibility` | `string \| null` | no | |
|
|
807
|
+
|
|
808
|
+
**Example**
|
|
809
|
+
|
|
810
|
+
```ts
|
|
811
|
+
const result = await g8.api.tasks.listContactTasks({ path: { contact_id: 123 } });
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
---
|
|
815
|
+
|
|
816
|
+
<a id="op-listsubtasks"></a>
|
|
817
|
+
|
|
818
|
+
### `g8.api.tasks.listSubtasks(input)`
|
|
819
|
+
|
|
820
|
+
**List Subtasks**
|
|
821
|
+
|
|
822
|
+
- HTTP: `GET /api/v1/tasks/{task_id}/subtasks`
|
|
823
|
+
- operationId: `list_subtasks_tasks__task_id__subtasks_get` (also callable as `g8.api.call("list_subtasks_tasks__task_id__subtasks_get", input)`)
|
|
824
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
825
|
+
- API-key scope: `tasks:read`
|
|
826
|
+
|
|
827
|
+
The subtasks under one task, filtered by what this key can see.
|
|
828
|
+
|
|
829
|
+
A private subtask belonging to someone else is absent rather than
|
|
830
|
+
redacted, so a short list is not evidence there are no more.
|
|
831
|
+
|
|
832
|
+
**Input**
|
|
833
|
+
|
|
834
|
+
| Field | Type | Required | Description |
|
|
835
|
+
|---|---|---|---|
|
|
836
|
+
| `path.task_id` | `string` | yes | Parent task id (UUID). |
|
|
837
|
+
|
|
838
|
+
**Returns** `ApiResponse_CrmCollectionPayload_`: the envelope `{ data: CrmCollectionPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
839
|
+
|
|
840
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
841
|
+
|
|
842
|
+
`CrmCollectionPayload` fields:
|
|
843
|
+
|
|
844
|
+
| Field | Type | Required | Description |
|
|
845
|
+
|---|---|---|---|
|
|
846
|
+
| `items` | `Array<unknown>` | no | |
|
|
847
|
+
|
|
848
|
+
**Example**
|
|
849
|
+
|
|
850
|
+
```ts
|
|
851
|
+
const result = await g8.api.tasks.listSubtasks({ path: { task_id: "id" } });
|
|
852
|
+
```
|
|
853
|
+
|
|
854
|
+
---
|
|
855
|
+
|
|
856
|
+
<a id="op-listtaskreplies"></a>
|
|
857
|
+
|
|
858
|
+
### `g8.api.tasks.listTaskReplies(input)`
|
|
859
|
+
|
|
860
|
+
**List Task Replies**
|
|
861
|
+
|
|
862
|
+
- HTTP: `GET /api/v1/tasks/{task_id}/replies`
|
|
863
|
+
- operationId: `list_task_replies_tasks__task_id__replies_get` (also callable as `g8.api.call("list_task_replies_tasks__task_id__replies_get", input)`)
|
|
864
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
865
|
+
- API-key scope: `tasks:read`
|
|
866
|
+
|
|
867
|
+
The thread under a task, plus its resolution row if it has one.
|
|
868
|
+
|
|
869
|
+
**Input**
|
|
870
|
+
|
|
871
|
+
| Field | Type | Required | Description |
|
|
872
|
+
|---|---|---|---|
|
|
873
|
+
| `path.task_id` | `string` | yes | Task id (UUID). |
|
|
874
|
+
|
|
875
|
+
**Returns** `ApiResponse_CrmCollectionPayload_`: the envelope `{ data: CrmCollectionPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
876
|
+
|
|
877
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
878
|
+
|
|
879
|
+
`CrmCollectionPayload` fields:
|
|
880
|
+
|
|
881
|
+
| Field | Type | Required | Description |
|
|
882
|
+
|---|---|---|---|
|
|
883
|
+
| `items` | `Array<unknown>` | no | |
|
|
884
|
+
|
|
885
|
+
**Example**
|
|
886
|
+
|
|
887
|
+
```ts
|
|
888
|
+
const result = await g8.api.tasks.listTaskReplies({ path: { task_id: "id" } });
|
|
889
|
+
```
|
|
890
|
+
|
|
891
|
+
---
|
|
892
|
+
|
|
893
|
+
<a id="op-reopentaskthread"></a>
|
|
894
|
+
|
|
895
|
+
### `g8.api.tasks.reopenTaskThread(input)`
|
|
896
|
+
|
|
897
|
+
**Reopen Task Thread**
|
|
898
|
+
|
|
899
|
+
- HTTP: `DELETE /api/v1/tasks/{task_id}/resolve`
|
|
900
|
+
- operationId: `reopen_task_thread_tasks__task_id__resolve_delete` (also callable as `g8.api.call("reopen_task_thread_tasks__task_id__resolve_delete", input)`)
|
|
901
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
902
|
+
- API-key scope: `tasks:delete`
|
|
903
|
+
|
|
904
|
+
Reopen this task's discussion. The replies were never deleted.
|
|
905
|
+
|
|
906
|
+
Spelled as a DELETE because what it removes is the RESOLUTION, not the
|
|
907
|
+
thread - this is the app's own spelling and the inverse of the POST above.
|
|
908
|
+
|
|
909
|
+
**Input**
|
|
910
|
+
|
|
911
|
+
| Field | Type | Required | Description |
|
|
912
|
+
|---|---|---|---|
|
|
913
|
+
| `path.task_id` | `string` | yes | Task id (UUID). |
|
|
914
|
+
|
|
915
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
916
|
+
|
|
917
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
918
|
+
|
|
919
|
+
**Example**
|
|
920
|
+
|
|
921
|
+
```ts
|
|
922
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
923
|
+
const result = await g8.api.tasks.reopenTaskThread({ path: { task_id: "id" } });
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
---
|
|
927
|
+
|
|
928
|
+
<a id="op-resolvetaskthread"></a>
|
|
929
|
+
|
|
930
|
+
### `g8.api.tasks.resolveTaskThread(input)`
|
|
931
|
+
|
|
932
|
+
**Resolve Task Thread**
|
|
933
|
+
|
|
934
|
+
- HTTP: `POST /api/v1/tasks/{task_id}/resolve`
|
|
935
|
+
- operationId: `resolve_task_thread_tasks__task_id__resolve_post` (also callable as `g8.api.call("resolve_task_thread_tasks__task_id__resolve_post", input)`)
|
|
936
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
937
|
+
- API-key scope: `tasks:write`
|
|
938
|
+
|
|
939
|
+
Mark this task's DISCUSSION resolved.
|
|
940
|
+
|
|
941
|
+
Not the same as completing the task: a task can be done with an open
|
|
942
|
+
thread, and a thread can be resolved while the task is still open.
|
|
943
|
+
Idempotent - re-resolving returns the existing row rather than a second
|
|
944
|
+
one.
|
|
945
|
+
|
|
946
|
+
**Input**
|
|
947
|
+
|
|
948
|
+
| Field | Type | Required | Description |
|
|
949
|
+
|---|---|---|---|
|
|
950
|
+
| `path.task_id` | `string` | yes | Task id (UUID). |
|
|
951
|
+
| `body` | `ResolveThreadRequest` | no | Request body; fields below. |
|
|
952
|
+
|
|
953
|
+
Body fields (`ResolveThreadRequest`):
|
|
954
|
+
|
|
955
|
+
| Field | Type | Required | Description |
|
|
956
|
+
|---|---|---|---|
|
|
957
|
+
| `body.resolution_note` | `string \| null` | no | Why it was resolved. |
|
|
958
|
+
|
|
959
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
960
|
+
|
|
961
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
962
|
+
|
|
963
|
+
**Example**
|
|
964
|
+
|
|
965
|
+
```ts
|
|
966
|
+
const result = await g8.api.tasks.resolveTaskThread({ path: { task_id: "id" } });
|
|
967
|
+
```
|
|
968
|
+
|
|
969
|
+
---
|
|
970
|
+
|
|
971
|
+
<a id="op-snoozetaskreminder"></a>
|
|
972
|
+
|
|
973
|
+
### `g8.api.tasks.snoozeTaskReminder(input)`
|
|
974
|
+
|
|
975
|
+
**Snooze Task Reminder**
|
|
976
|
+
|
|
977
|
+
- HTTP: `POST /api/v1/tasks/{task_id}/snooze`
|
|
978
|
+
- operationId: `snooze_task_reminder_tasks__task_id__snooze_post` (also callable as `g8.api.call("snooze_task_reminder_tasks__task_id__snooze_post", input)`)
|
|
979
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
980
|
+
- API-key scope: `tasks:write`
|
|
981
|
+
|
|
982
|
+
Push this task's reminder out by N minutes FROM NOW.
|
|
983
|
+
|
|
984
|
+
Relative to the call, not to the existing reminder time, so snoozing an
|
|
985
|
+
overdue reminder by 30 moves it to half an hour from now rather than to
|
|
986
|
+
half an hour after a moment that has passed.
|
|
987
|
+
|
|
988
|
+
**Input**
|
|
989
|
+
|
|
990
|
+
| Field | Type | Required | Description |
|
|
991
|
+
|---|---|---|---|
|
|
992
|
+
| `path.task_id` | `string` | yes | Task id (UUID). |
|
|
993
|
+
| `body` | `SnoozeTaskRequest` | yes | Request body; fields below. |
|
|
994
|
+
|
|
995
|
+
Body fields (`SnoozeTaskRequest`):
|
|
996
|
+
|
|
997
|
+
| Field | Type | Required | Description |
|
|
998
|
+
|---|---|---|---|
|
|
999
|
+
| `body.minutes` | `integer` | yes | Minutes from now to fire the next reminder. > 0 |
|
|
1000
|
+
|
|
1001
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1002
|
+
|
|
1003
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1004
|
+
|
|
1005
|
+
**Example**
|
|
1006
|
+
|
|
1007
|
+
```ts
|
|
1008
|
+
const result = await g8.api.tasks.snoozeTaskReminder({ path: { task_id: "id" }, body: { minutes: 1 } });
|
|
1009
|
+
```
|
|
1010
|
+
|
|
1011
|
+
---
|
|
1012
|
+
|
|
1013
|
+
<a id="op-starttaskexecution"></a>
|
|
1014
|
+
|
|
1015
|
+
### `g8.api.tasks.startTaskExecution(input)`
|
|
1016
|
+
|
|
1017
|
+
**Start Task Execution**
|
|
1018
|
+
|
|
1019
|
+
- HTTP: `POST /api/v1/tasks/{task_id}/start`
|
|
1020
|
+
- operationId: `start_task_execution_tasks__task_id__start_post` (also callable as `g8.api.call("start_task_execution_tasks__task_id__start_post", input)`)
|
|
1021
|
+
- Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
|
|
1022
|
+
- API-key scope: `tasks:run`
|
|
1023
|
+
|
|
1024
|
+
**Input**
|
|
1025
|
+
|
|
1026
|
+
| Field | Type | Required | Description |
|
|
1027
|
+
|---|---|---|---|
|
|
1028
|
+
| `path.task_id` | `string (uuid)` | yes | |
|
|
1029
|
+
| `headers.idempotency-key` | `string (uuid)` | yes | |
|
|
1030
|
+
|
|
1031
|
+
**Returns** `ApiResponse_TaskStartResult_`: the envelope `{ data: TaskStartResult, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1032
|
+
|
|
1033
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1034
|
+
|
|
1035
|
+
`TaskStartResult` fields:
|
|
1036
|
+
|
|
1037
|
+
| Field | Type | Required | Description |
|
|
1038
|
+
|---|---|---|---|
|
|
1039
|
+
| `work_item_id` | `string (uuid)` | yes | |
|
|
1040
|
+
| `workflow_started` | `boolean` | yes | |
|
|
1041
|
+
| `already_started` | `boolean` | no | default `false` |
|
|
1042
|
+
| `message` | `string \| null` | no | |
|
|
1043
|
+
| `session_id` | `string (uuid) \| null` | no | |
|
|
1044
|
+
|
|
1045
|
+
**Example**
|
|
1046
|
+
|
|
1047
|
+
```ts
|
|
1048
|
+
// billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
|
|
1049
|
+
const result = await g8.api.tasks.startTaskExecution({
|
|
1050
|
+
path: { task_id: "00000000-0000-0000-0000-000000000000" },
|
|
1051
|
+
headers: { "idempotency-key": "00000000-0000-0000-0000-000000000000" },
|
|
1052
|
+
});
|
|
1053
|
+
```
|
|
1054
|
+
|
|
1055
|
+
---
|
|
1056
|
+
|
|
1057
|
+
<a id="op-taskexecutionhistory"></a>
|
|
1058
|
+
|
|
1059
|
+
### `g8.api.tasks.taskExecutionHistory(input)`
|
|
1060
|
+
|
|
1061
|
+
**Task Execution History**
|
|
1062
|
+
|
|
1063
|
+
- HTTP: `GET /api/v1/tasks/{task_id}/execution`
|
|
1064
|
+
- operationId: `task_execution_history_tasks__task_id__execution_get` (also callable as `g8.api.call("task_execution_history_tasks__task_id__execution_get", input)`)
|
|
1065
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1066
|
+
- API-key scope: `tasks:read`
|
|
1067
|
+
|
|
1068
|
+
**Input**
|
|
1069
|
+
|
|
1070
|
+
| Field | Type | Required | Description |
|
|
1071
|
+
|---|---|---|---|
|
|
1072
|
+
| `path.task_id` | `string (uuid)` | yes | |
|
|
1073
|
+
|
|
1074
|
+
**Returns** `ApiResponse_TaskExecutionHistory_`: the envelope `{ data: TaskExecutionHistory, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1075
|
+
|
|
1076
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1077
|
+
|
|
1078
|
+
`TaskExecutionHistory` fields:
|
|
1079
|
+
|
|
1080
|
+
| Field | Type | Required | Description |
|
|
1081
|
+
|---|---|---|---|
|
|
1082
|
+
| `runs` | `Array<TaskExecutionRun>` | yes | |
|
|
1083
|
+
|
|
1084
|
+
**Example**
|
|
1085
|
+
|
|
1086
|
+
```ts
|
|
1087
|
+
const result = await g8.api.tasks.taskExecutionHistory({ path: { task_id: "00000000-0000-0000-0000-000000000000" } });
|
|
1088
|
+
```
|
|
1089
|
+
|
|
1090
|
+
---
|
|
1091
|
+
|
|
1092
|
+
<a id="op-updatesubtask"></a>
|
|
1093
|
+
|
|
1094
|
+
### `g8.api.tasks.updateSubtask(input)`
|
|
1095
|
+
|
|
1096
|
+
**Update Subtask**
|
|
1097
|
+
|
|
1098
|
+
- HTTP: `PUT /api/v1/tasks/{task_id}/subtasks/{subtask_id}`
|
|
1099
|
+
- operationId: `update_subtask_tasks__task_id__subtasks__subtask_id__put` (also callable as `g8.api.call("update_subtask_tasks__task_id__subtasks__subtask_id__put", input)`)
|
|
1100
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1101
|
+
- API-key scope: `tasks:write`
|
|
1102
|
+
|
|
1103
|
+
Patch a subtask. Omitted fields are left alone.
|
|
1104
|
+
|
|
1105
|
+
Two exceptions worth knowing. An explicit `null` on `due_date`,
|
|
1106
|
+
`assignee_id` or `task_type` CLEARS that field, which is different from
|
|
1107
|
+
omitting it. And `records: []` clears every record link, while omitting
|
|
1108
|
+
`records` leaves them unchanged.
|
|
1109
|
+
|
|
1110
|
+
`expected_updated_at` makes the update conditional: if the stored row has
|
|
1111
|
+
moved on, the write is refused instead of overwriting someone else's edit.
|
|
1112
|
+
|
|
1113
|
+
**Input**
|
|
1114
|
+
|
|
1115
|
+
| Field | Type | Required | Description |
|
|
1116
|
+
|---|---|---|---|
|
|
1117
|
+
| `path.task_id` | `string` | yes | Parent task id (UUID). |
|
|
1118
|
+
| `path.subtask_id` | `string` | yes | Subtask id (UUID). |
|
|
1119
|
+
| `body` | `SubtaskUpdateRequest` | yes | Request body; fields below. |
|
|
1120
|
+
|
|
1121
|
+
Body fields (`SubtaskUpdateRequest`):
|
|
1122
|
+
|
|
1123
|
+
| Field | Type | Required | Description |
|
|
1124
|
+
|---|---|---|---|
|
|
1125
|
+
| `body.assignee_id` | `string \| null` | no | Send explicit null to unassign. |
|
|
1126
|
+
| `body.assignee_name` | `string \| null` | no | Assignee display name. |
|
|
1127
|
+
| `body.clear_reminder` | `boolean \| null` | no | Explicitly remove the reminder. |
|
|
1128
|
+
| `body.description` | `string \| null` | no | New body. |
|
|
1129
|
+
| `body.due_date` | `string \| null` | no | ISO 8601. Send explicit null to clear. |
|
|
1130
|
+
| `body.expected_updated_at` | `string \| null` | no | Optimistic-concurrency guard. When set and the stored row is newer, the update is refused instead of overwriting. |
|
|
1131
|
+
| `body.priority` | `integer \| null` | no | New priority. |
|
|
1132
|
+
| `body.records` | `Array<Record<string, unknown>> \| null` | no | Replace record links. Empty list clears them; omit to leave alone. |
|
|
1133
|
+
| `body.reminder_at` | `string \| null` | no | ISO 8601 UTC reminder. |
|
|
1134
|
+
| `body.status` | `string \| null` | no | New status. |
|
|
1135
|
+
| `body.tags` | `Array<string> \| null` | no | Replace the labels. max items 20 |
|
|
1136
|
+
| `body.task_type` | `string \| null` | no | Send explicit null to clear. |
|
|
1137
|
+
| `body.title` | `string \| null` | no | New title. |
|
|
1138
|
+
| `body.visibility` | `string \| null` | no | public \| team \| private. |
|
|
1139
|
+
|
|
1140
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1141
|
+
|
|
1142
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1143
|
+
|
|
1144
|
+
**Example**
|
|
1145
|
+
|
|
1146
|
+
```ts
|
|
1147
|
+
const result = await g8.api.tasks.updateSubtask({ path: { task_id: "id", subtask_id: "id" }, body: {} });
|
|
1148
|
+
```
|
|
1149
|
+
|
|
1150
|
+
---
|
|
1151
|
+
|
|
1152
|
+
<a id="op-updatetask"></a>
|
|
1153
|
+
|
|
1154
|
+
### `g8.api.tasks.updateTask(input)`
|
|
1155
|
+
|
|
1156
|
+
**Update Task**
|
|
1157
|
+
|
|
1158
|
+
- HTTP: `PATCH /api/v1/tasks/{task_id}`
|
|
1159
|
+
- operationId: `update_task_tasks__task_id__patch` (also callable as `g8.api.call("update_task_tasks__task_id__patch", input)`)
|
|
1160
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1161
|
+
- API-key scope: `tasks:write`
|
|
1162
|
+
- ★ Hand-written: [`g8.tasks.update()`](../sdk-clients.md#g8-tasks-update)
|
|
1163
|
+
|
|
1164
|
+
Update a task.
|
|
1165
|
+
|
|
1166
|
+
**Input**
|
|
1167
|
+
|
|
1168
|
+
| Field | Type | Required | Description |
|
|
1169
|
+
|---|---|---|---|
|
|
1170
|
+
| `path.task_id` | `string` | yes | Task ID |
|
|
1171
|
+
| `body` | `TaskUpdateRequest` | yes | Request body; fields below. |
|
|
1172
|
+
|
|
1173
|
+
Body fields (`TaskUpdateRequest`):
|
|
1174
|
+
|
|
1175
|
+
| Field | Type | Required | Description |
|
|
1176
|
+
|---|---|---|---|
|
|
1177
|
+
| `body.assignee_id` | `string \| null` | no | User ID to assign the task to |
|
|
1178
|
+
| `body.description` | `string \| null` | no | Task description |
|
|
1179
|
+
| `body.due_date` | `string \| null` | no | Due date (ISO 8601) |
|
|
1180
|
+
| `body.expected_updated_at` | `string (date-time) \| null` | no | |
|
|
1181
|
+
| `body.parent_task_id` | `string \| null` | no | New parent task UUID. Re-parents this task into a subtask of the given parent. Parent must exist and must not itself be a subtask. |
|
|
1182
|
+
| `body.priority` | `integer \| null` | no | Priority (0=none, 1=high, 2=medium, 3=low; historical 4=low is preserved) min 0, max 4 |
|
|
1183
|
+
| `body.records` | `Array<Record<string, string>> \| null` | no | Replace related records; an empty list removes all links and makes the task standalone. Omit to preserve existing links. |
|
|
1184
|
+
| `body.status` | `string \| null` | no | Task status (open, completed) |
|
|
1185
|
+
| `body.subtask_sort_order` | `integer \| null` | no | New sort position within the parent's subtasks (reorder). |
|
|
1186
|
+
| `body.tags` | `Array<string> \| null` | no | max items 20 |
|
|
1187
|
+
| `body.task_type` | `string \| null` | no | Activity type; null removes the saved type |
|
|
1188
|
+
| `body.title` | `string \| null` | no | Task title |
|
|
1189
|
+
|
|
1190
|
+
**Returns** `ApiResponse_TaskResponse_`: the envelope `{ data: TaskResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1191
|
+
|
|
1192
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1193
|
+
|
|
1194
|
+
`TaskResponse` fields:
|
|
1195
|
+
|
|
1196
|
+
| Field | Type | Required | Description |
|
|
1197
|
+
|---|---|---|---|
|
|
1198
|
+
| `id` | `string` | yes | |
|
|
1199
|
+
| `title` | `string` | yes | |
|
|
1200
|
+
| `assignee_id` | `string \| null` | no | |
|
|
1201
|
+
| `assignee_name` | `string \| null` | no | |
|
|
1202
|
+
| `completed_subtask_count` | `integer \| null` | no | |
|
|
1203
|
+
| `created_at` | `string \| null` | no | |
|
|
1204
|
+
| `created_by` | `string \| null` | no | |
|
|
1205
|
+
| `description` | `string \| null` | no | |
|
|
1206
|
+
| `due_date` | `string \| null` | no | |
|
|
1207
|
+
| `entity_id` | `string \| null` | no | |
|
|
1208
|
+
| `entity_label` | `string \| null` | no | |
|
|
1209
|
+
| `entity_type` | `string \| null` | no | |
|
|
1210
|
+
| `execution_id` | `string \| null` | no | |
|
|
1211
|
+
| `executor_agent_id` | `string \| null` | no | |
|
|
1212
|
+
| `executor_agent_name` | `string \| null` | no | |
|
|
1213
|
+
| `executor_type` | `"human" \| "agent"` | no | default `"human"` |
|
|
1214
|
+
| `links` | `Array<Record<string, unknown>>` | no | |
|
|
1215
|
+
| `parent_task_id` | `string \| null` | no | |
|
|
1216
|
+
| `priority` | `integer \| null` | no | |
|
|
1217
|
+
| `reminder_at` | `string \| null` | no | |
|
|
1218
|
+
| `reminder_sent_at` | `string \| null` | no | |
|
|
1219
|
+
| `source_external_id` | `string \| null` | no | |
|
|
1220
|
+
| `source_meeting_id` | `integer \| null` | no | |
|
|
1221
|
+
| `source_meeting_start_time` | `string \| null` | no | |
|
|
1222
|
+
| `source_meeting_title` | `string \| null` | no | |
|
|
1223
|
+
| `source_transcript_id` | `string \| null` | no | |
|
|
1224
|
+
| `source_url` | `string \| null` | no | |
|
|
1225
|
+
| `status` | `string \| null` | no | |
|
|
1226
|
+
| `subtask_count` | `integer \| null` | no | |
|
|
1227
|
+
| `subtask_sort_order` | `integer \| null` | no | |
|
|
1228
|
+
| `tags` | `Array<string>` | no | |
|
|
1229
|
+
| `task_type` | `string \| null` | no | |
|
|
1230
|
+
| `updated_at` | `string \| null` | no | |
|
|
1231
|
+
| `visibility` | `string \| null` | no | |
|
|
1232
|
+
|
|
1233
|
+
**Example**
|
|
1234
|
+
|
|
1235
|
+
```ts
|
|
1236
|
+
const result = await g8.api.tasks.updateTask({ path: { task_id: "id" }, body: {} });
|
|
1237
|
+
```
|
|
1238
|
+
|
|
1239
|
+
---
|
|
1240
|
+
|
|
1241
|
+
<a id="op-updatetaskreply"></a>
|
|
1242
|
+
|
|
1243
|
+
### `g8.api.tasks.updateTaskReply(input)`
|
|
1244
|
+
|
|
1245
|
+
**Update Task Reply**
|
|
1246
|
+
|
|
1247
|
+
- HTTP: `PUT /api/v1/tasks/replies/{reply_id}`
|
|
1248
|
+
- operationId: `update_task_reply_tasks_replies__reply_id__put` (also callable as `g8.api.call("update_task_reply_tasks_replies__reply_id__put", input)`)
|
|
1249
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1250
|
+
- API-key scope: `tasks:write`
|
|
1251
|
+
|
|
1252
|
+
Edit a reply. AUTHOR ONLY.
|
|
1253
|
+
|
|
1254
|
+
An organisation key has no member identity, so it is not the author of
|
|
1255
|
+
anything a human wrote and cannot edit those replies - it can edit the
|
|
1256
|
+
ones it posted itself.
|
|
1257
|
+
|
|
1258
|
+
**Input**
|
|
1259
|
+
|
|
1260
|
+
| Field | Type | Required | Description |
|
|
1261
|
+
|---|---|---|---|
|
|
1262
|
+
| `path.reply_id` | `string` | yes | Reply id (UUID). |
|
|
1263
|
+
| `body` | `TaskReplyUpdateRequest` | yes | Request body; fields below. |
|
|
1264
|
+
|
|
1265
|
+
Body fields (`TaskReplyUpdateRequest`):
|
|
1266
|
+
|
|
1267
|
+
| Field | Type | Required | Description |
|
|
1268
|
+
|---|---|---|---|
|
|
1269
|
+
| `body.body` | `string` | yes | Replacement text. |
|
|
1270
|
+
|
|
1271
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1272
|
+
|
|
1273
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1274
|
+
|
|
1275
|
+
**Example**
|
|
1276
|
+
|
|
1277
|
+
```ts
|
|
1278
|
+
const result = await g8.api.tasks.updateTaskReply({ path: { reply_id: "id" }, body: { body: "example" } });
|
|
1279
|
+
```
|
|
1280
|
+
|
|
1281
|
+
---
|
|
1282
|
+
|
|
1283
|
+
<a id="op-updatetasksettings"></a>
|
|
1284
|
+
|
|
1285
|
+
### `g8.api.tasks.updateTaskSettings(input)`
|
|
1286
|
+
|
|
1287
|
+
**Update Task Settings**
|
|
1288
|
+
|
|
1289
|
+
- HTTP: `PUT /api/v1/tasks/settings`
|
|
1290
|
+
- operationId: `update_task_settings_tasks_settings_put` (also callable as `g8.api.call("update_task_settings_tasks_settings_put", input)`)
|
|
1291
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1292
|
+
- API-key scope: `tasks:write`
|
|
1293
|
+
|
|
1294
|
+
Change how a parent task completes. ORG ADMIN ONLY.
|
|
1295
|
+
|
|
1296
|
+
The app gates this twice - `require_admin_access` on the route and an
|
|
1297
|
+
owner/admin role check in the body. The route gate is re-declared here;
|
|
1298
|
+
the body check reads the role off the principal `build_api_principal`
|
|
1299
|
+
resolves from the validated key, so a machine key (no human, no role) is
|
|
1300
|
+
refused exactly as the app would refuse a member.
|
|
1301
|
+
|
|
1302
|
+
**Input**
|
|
1303
|
+
|
|
1304
|
+
| Field | Type | Required | Description |
|
|
1305
|
+
|---|---|---|---|
|
|
1306
|
+
| `body` | `TaskCompletionSettingsRequest` | yes | Request body; fields below. |
|
|
1307
|
+
|
|
1308
|
+
Body fields (`TaskCompletionSettingsRequest`):
|
|
1309
|
+
|
|
1310
|
+
| Field | Type | Required | Description |
|
|
1311
|
+
|---|---|---|---|
|
|
1312
|
+
| `body.parent_completion_mode` | `"manual" \| "auto_complete" \| "require_subtasks_done" \| null` | no | How a parent task completes relative to its subtasks. |
|
|
1313
|
+
|
|
1314
|
+
**Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1315
|
+
|
|
1316
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1317
|
+
|
|
1318
|
+
**Example**
|
|
1319
|
+
|
|
1320
|
+
```ts
|
|
1321
|
+
const result = await g8.api.tasks.updateTaskSettings({ body: {} });
|
|
1322
|
+
```
|
|
1323
|
+
|
|
1324
|
+
---
|
|
1325
|
+
|
|
1326
|
+
## Referenced types
|
|
1327
|
+
|
|
1328
|
+
Named types that appear in the tables above. Full TypeScript definitions: `G8Contract.<Name>` (`import type { G8Contract } from "@graph8/sdk"`).
|
|
1329
|
+
|
|
1330
|
+
<a id="type-taskexecutionrun"></a>
|
|
1331
|
+
|
|
1332
|
+
### `TaskExecutionRun`
|
|
1333
|
+
|
|
1334
|
+
| Field | Type | Required | Description |
|
|
1335
|
+
|---|---|---|---|
|
|
1336
|
+
| `completed_at` | `string (date-time) \| null` | yes | |
|
|
1337
|
+
| `created_at` | `string (date-time)` | yes | |
|
|
1338
|
+
| `current_step` | `string \| null` | yes | |
|
|
1339
|
+
| `details_available` | `boolean` | yes | |
|
|
1340
|
+
| `next_action` | `string \| null` | yes | |
|
|
1341
|
+
| `session_id` | `string (uuid) \| null` | yes | |
|
|
1342
|
+
| `status` | `string` | yes | |
|
|
1343
|
+
| `work_item_id` | `string (uuid)` | yes | |
|
|
1344
|
+
| `continued_after_reply` | `boolean` | no | default `false` |
|