@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,1696 @@
|
|
|
1
|
+
/* Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Types for `g8.api.deals` (Deals): 48 operations.
|
|
5
|
+
*
|
|
6
|
+
* For reading. In code, import from the package instead:
|
|
7
|
+
* import type { ApiInput, ApiOutput, G8Contract } from "@graph8/sdk";
|
|
8
|
+
* type In = ApiInput<"add_deal_contact_deals__deal_id__contacts_post">;
|
|
9
|
+
*
|
|
10
|
+
* Reference with examples: deals.md
|
|
11
|
+
*/
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
|
|
14
|
+
/** `g8.api.deals.<member>` -> the operationId it calls. */
|
|
15
|
+
export interface DealsMembers {
|
|
16
|
+
addDealContact: "add_deal_contact_deals__deal_id__contacts_post";
|
|
17
|
+
archiveDealCloseReason: "archive_deal_close_reason_deals_close_reasons__reason_id__delete";
|
|
18
|
+
bulkUpdateDeals: "bulk_update_deals_deals_bulk_post";
|
|
19
|
+
createAccountDeal: "create_account_deal_accounts__account_id__deals_post";
|
|
20
|
+
createDeal: "create_deal_deals_post";
|
|
21
|
+
createDealCloseReason: "create_deal_close_reason_deals_close_reasons_post";
|
|
22
|
+
createDealColumn: "create_deal_column_deals_columns_create_post";
|
|
23
|
+
deleteDeal: "delete_deal_deals__deal_id__delete";
|
|
24
|
+
deleteDealColumn: "delete_deal_column_deals_columns__column_id__delete";
|
|
25
|
+
deleteDealDocument: "delete_deal_document_deals__deal_id__documents__document_id__delete";
|
|
26
|
+
deleteDealNote: "delete_deal_note_deals__deal_id__notes__note_id__delete";
|
|
27
|
+
generateAllDealDocuments: "generate_all_deal_documents_deals__deal_id__documents_generate_all_post";
|
|
28
|
+
generateDealDocument: "generate_deal_document_deals__deal_id__documents_types__doc_type__generate_post";
|
|
29
|
+
getCompanyDeals: "get_company_deals_companies__company_id__deals_get";
|
|
30
|
+
getContactDeals: "get_contact_deals_contacts__contact_id__deals_get";
|
|
31
|
+
getDeal: "get_deal_deals__deal_id__get";
|
|
32
|
+
getDealAnalytics: "get_deal_analytics_deals_analytics_get";
|
|
33
|
+
getDealCrossfire: "get_deal_crossfire_deals__deal_id__crossfire_get";
|
|
34
|
+
getDealDetail: "get_deal_detail_deals__deal_id__detail_get";
|
|
35
|
+
getDealDocument: "get_deal_document_deals__deal_id__documents_types__doc_type__get";
|
|
36
|
+
getDealDocumentGenerationStatus: "get_deal_document_generation_status_deals__deal_id__documents_generation_status_get";
|
|
37
|
+
getDealSignals: "get_deal_signals_deals__deal_id__signals_get";
|
|
38
|
+
getDealStageVelocity: "get_deal_stage_velocity_deals_stage_velocity_get";
|
|
39
|
+
listAccountDeals: "list_account_deals_accounts__account_id__deals_get";
|
|
40
|
+
listDealCloseReasons: "list_deal_close_reasons_deals_close_reasons_get";
|
|
41
|
+
listDealColumns: "list_deal_columns_deals_columns_get";
|
|
42
|
+
listDealContacts: "list_deal_contacts_deals__deal_id__contacts_get";
|
|
43
|
+
listDealCustomFieldDiConfig: "list_deal_custom_field_di_config_deals_custom_fields_di_config_get";
|
|
44
|
+
listDealDocuments: "list_deal_documents_deals__deal_id__documents_get";
|
|
45
|
+
listDealHistory: "list_deal_history_deals__deal_id__history_get";
|
|
46
|
+
listDealLineItems: "list_deal_line_items_deals__deal_id__line_items_get";
|
|
47
|
+
listDeals: "list_deals_deals_get";
|
|
48
|
+
listPipelines: "list_pipelines_deals_pipelines_get";
|
|
49
|
+
mergeDeal: "merge_deal_deals__deal_id__merge_post";
|
|
50
|
+
moveDealToPipeline: "move_deal_to_pipeline_deals__deal_id__pipeline_put";
|
|
51
|
+
previewDealMerge: "preview_deal_merge_deals__deal_id__merge_preview_get";
|
|
52
|
+
regenerateDealDocument: "regenerate_deal_document_deals__deal_id__documents_types__doc_type__regenerate_post";
|
|
53
|
+
removeDealContact: "remove_deal_contact_deals__deal_id__contacts__person_id__delete";
|
|
54
|
+
replaceDealLineItems: "replace_deal_line_items_deals__deal_id__line_items_put";
|
|
55
|
+
setDealColumnValues: "set_deal_column_values_deals__deal_id__columns_values_put";
|
|
56
|
+
setDealCompany: "set_deal_company_deals__deal_id__company_put";
|
|
57
|
+
setDealContactRole: "set_deal_contact_role_deals__deal_id__contacts__contact_id__put";
|
|
58
|
+
setPrimaryDealContact: "set_primary_deal_contact_deals__deal_id__contacts__person_id__primary_put";
|
|
59
|
+
setRivalAttach: "set_rival_attach_deals__deal_id__rival_attach_post";
|
|
60
|
+
updateDeal: "update_deal_deals__deal_id__patch";
|
|
61
|
+
updateDealDocument: "update_deal_document_deals__deal_id__documents__document_id__put";
|
|
62
|
+
updateDealNote: "update_deal_note_deals__deal_id__notes__note_id__put";
|
|
63
|
+
upsertDealCustomFieldDiConfig: "upsert_deal_custom_field_di_config_deals_custom_fields_di_config_post";
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Input and output of every `g8.api.deals` operation, keyed by operationId. */
|
|
67
|
+
export interface DealsOperations {
|
|
68
|
+
/**
|
|
69
|
+
* POST /deals/{deal_id}/contacts
|
|
70
|
+
* Add Deal Contact
|
|
71
|
+
* tier: write · scope: deals:write
|
|
72
|
+
*/
|
|
73
|
+
add_deal_contact_deals__deal_id__contacts_post: {
|
|
74
|
+
input: {
|
|
75
|
+
path: {
|
|
76
|
+
/** Deal id. */
|
|
77
|
+
deal_id: string;
|
|
78
|
+
};
|
|
79
|
+
headers?: {
|
|
80
|
+
"X-Target-Org-Id"?: string | null;
|
|
81
|
+
};
|
|
82
|
+
body: DealContactCreateRequest;
|
|
83
|
+
};
|
|
84
|
+
output: ApiResponse_DealContact_;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* DELETE /deals/close-reasons/{reason_id}
|
|
88
|
+
* Archive Deal Close Reason
|
|
89
|
+
* tier: destructive · scope: deals:delete
|
|
90
|
+
*/
|
|
91
|
+
archive_deal_close_reason_deals_close_reasons__reason_id__delete: {
|
|
92
|
+
input: {
|
|
93
|
+
path: {
|
|
94
|
+
/** Close reason id. */
|
|
95
|
+
reason_id: string;
|
|
96
|
+
};
|
|
97
|
+
headers?: {
|
|
98
|
+
"X-Target-Org-Id"?: string | null;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
output: ApiResponse_dict_;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* POST /deals/bulk
|
|
105
|
+
* Bulk Update Deals
|
|
106
|
+
* tier: write · scope: deals:write
|
|
107
|
+
*/
|
|
108
|
+
bulk_update_deals_deals_bulk_post: {
|
|
109
|
+
input: {
|
|
110
|
+
headers?: {
|
|
111
|
+
"X-Target-Org-Id"?: string | null;
|
|
112
|
+
};
|
|
113
|
+
body: BulkDealUpdateRequest;
|
|
114
|
+
};
|
|
115
|
+
output: ApiResponse_DealPayload_;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* POST /accounts/{account_id}/deals
|
|
119
|
+
* Create Account Deal
|
|
120
|
+
* tier: write · scope: deals:write
|
|
121
|
+
*/
|
|
122
|
+
create_account_deal_accounts__account_id__deals_post: {
|
|
123
|
+
input: {
|
|
124
|
+
path: {
|
|
125
|
+
/** Account the deal belongs to. */
|
|
126
|
+
account_id: string;
|
|
127
|
+
};
|
|
128
|
+
headers?: {
|
|
129
|
+
"X-Target-Org-Id"?: string | null;
|
|
130
|
+
};
|
|
131
|
+
body: AccountDealCreateRequest;
|
|
132
|
+
};
|
|
133
|
+
output: ApiResponse_DealPayload_;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* POST /deals
|
|
137
|
+
* Create Deal
|
|
138
|
+
* tier: write · scope: deals:write
|
|
139
|
+
*/
|
|
140
|
+
create_deal_deals_post: {
|
|
141
|
+
input: {
|
|
142
|
+
headers?: {
|
|
143
|
+
"X-Target-Org-Id"?: string | null;
|
|
144
|
+
};
|
|
145
|
+
body: DealCreateRequest;
|
|
146
|
+
};
|
|
147
|
+
output: ApiResponse_DealResponse_;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* POST /deals/close-reasons
|
|
151
|
+
* Create Deal Close Reason
|
|
152
|
+
* tier: write · scope: deals:write
|
|
153
|
+
*/
|
|
154
|
+
create_deal_close_reason_deals_close_reasons_post: {
|
|
155
|
+
input: {
|
|
156
|
+
headers?: {
|
|
157
|
+
"X-Target-Org-Id"?: string | null;
|
|
158
|
+
};
|
|
159
|
+
body: CloseReasonCreateRequest;
|
|
160
|
+
};
|
|
161
|
+
output: ApiResponse_DealOpResponse_;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* POST /deals/columns/create
|
|
165
|
+
* Create Deal Column
|
|
166
|
+
* tier: write · scope: deals:write
|
|
167
|
+
*/
|
|
168
|
+
create_deal_column_deals_columns_create_post: {
|
|
169
|
+
input: {
|
|
170
|
+
headers?: {
|
|
171
|
+
"X-Target-Org-Id"?: string | null;
|
|
172
|
+
};
|
|
173
|
+
body: CreateDealColumnRequest;
|
|
174
|
+
};
|
|
175
|
+
output: ApiResponse_DealPayload_;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* DELETE /deals/{deal_id}
|
|
179
|
+
* Delete Deal
|
|
180
|
+
* tier: destructive · scope: deals:delete
|
|
181
|
+
*/
|
|
182
|
+
delete_deal_deals__deal_id__delete: {
|
|
183
|
+
input: {
|
|
184
|
+
path: {
|
|
185
|
+
/** Deal ID (UUID) */
|
|
186
|
+
deal_id: string;
|
|
187
|
+
};
|
|
188
|
+
headers?: {
|
|
189
|
+
"X-Target-Org-Id"?: string | null;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
output: ApiResponse_dict_;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* DELETE /deals/columns/{column_id}
|
|
196
|
+
* Delete Deal Column
|
|
197
|
+
* tier: destructive · scope: deals:delete
|
|
198
|
+
*/
|
|
199
|
+
delete_deal_column_deals_columns__column_id__delete: {
|
|
200
|
+
input: {
|
|
201
|
+
path: {
|
|
202
|
+
/** Column id. */
|
|
203
|
+
column_id: number;
|
|
204
|
+
};
|
|
205
|
+
headers?: {
|
|
206
|
+
"X-Target-Org-Id"?: string | null;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
output: ApiResponse_DealPayload_;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* DELETE /deals/{deal_id}/documents/{document_id}
|
|
213
|
+
* Delete Deal Document
|
|
214
|
+
* tier: destructive · scope: deals:delete
|
|
215
|
+
*/
|
|
216
|
+
delete_deal_document_deals__deal_id__documents__document_id__delete: {
|
|
217
|
+
input: {
|
|
218
|
+
path: {
|
|
219
|
+
/** Deal id (UUID). */
|
|
220
|
+
deal_id: string;
|
|
221
|
+
/** Document id, from the list read. */
|
|
222
|
+
document_id: string;
|
|
223
|
+
};
|
|
224
|
+
headers?: {
|
|
225
|
+
"X-Target-Org-Id"?: string | null;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
output: ApiResponse_DocumentPayload_;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* DELETE /deals/{deal_id}/notes/{note_id}
|
|
232
|
+
* Delete Deal Note
|
|
233
|
+
* tier: destructive · scope: deals:delete
|
|
234
|
+
*/
|
|
235
|
+
delete_deal_note_deals__deal_id__notes__note_id__delete: {
|
|
236
|
+
input: {
|
|
237
|
+
path: {
|
|
238
|
+
/** Deal id. */
|
|
239
|
+
deal_id: string;
|
|
240
|
+
/** Note id. */
|
|
241
|
+
note_id: string;
|
|
242
|
+
};
|
|
243
|
+
headers?: {
|
|
244
|
+
"X-Target-Org-Id"?: string | null;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
output: ApiResponse_DealOpResponse_;
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* POST /deals/{deal_id}/documents/generate-all
|
|
251
|
+
* Generate All Deal Documents
|
|
252
|
+
* tier: billable · scope: deals:run
|
|
253
|
+
*/
|
|
254
|
+
generate_all_deal_documents_deals__deal_id__documents_generate_all_post: {
|
|
255
|
+
input: {
|
|
256
|
+
path: {
|
|
257
|
+
/** Deal id (UUID). */
|
|
258
|
+
deal_id: string;
|
|
259
|
+
};
|
|
260
|
+
headers?: {
|
|
261
|
+
"X-Target-Org-Id"?: string | null;
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
output: ApiResponse_DocumentPayload_;
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* POST /deals/{deal_id}/documents/types/{doc_type}/generate
|
|
268
|
+
* Generate Deal Document
|
|
269
|
+
* tier: billable · scope: deals:run
|
|
270
|
+
*/
|
|
271
|
+
generate_deal_document_deals__deal_id__documents_types__doc_type__generate_post: {
|
|
272
|
+
input: {
|
|
273
|
+
path: {
|
|
274
|
+
/** Deal id (UUID). */
|
|
275
|
+
deal_id: string;
|
|
276
|
+
/** Which generated document. One of the six the deal synthesis produces; anything else is a 422 naming them. */
|
|
277
|
+
doc_type: "deal_risks" | "next_steps" | "close_plan" | "scope_of_work" | "roi_analysis" | "competitive_analysis";
|
|
278
|
+
};
|
|
279
|
+
headers?: {
|
|
280
|
+
"X-Target-Org-Id"?: string | null;
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
output: ApiResponse_DocumentPayload_;
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* GET /companies/{company_id}/deals
|
|
287
|
+
* Get Company Deals
|
|
288
|
+
* tier: read · scope: deals:read
|
|
289
|
+
*/
|
|
290
|
+
get_company_deals_companies__company_id__deals_get: {
|
|
291
|
+
input: {
|
|
292
|
+
path: {
|
|
293
|
+
/** Company ID */
|
|
294
|
+
company_id: number;
|
|
295
|
+
};
|
|
296
|
+
headers?: {
|
|
297
|
+
"X-Target-Org-Id"?: string | null;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
output: ApiResponse_list_ContactDealResponse__;
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* GET /contacts/{contact_id}/deals
|
|
304
|
+
* Get Contact Deals
|
|
305
|
+
* tier: read · scope: deals:read
|
|
306
|
+
*/
|
|
307
|
+
get_contact_deals_contacts__contact_id__deals_get: {
|
|
308
|
+
input: {
|
|
309
|
+
path: {
|
|
310
|
+
/** Contact ID */
|
|
311
|
+
contact_id: number;
|
|
312
|
+
};
|
|
313
|
+
headers?: {
|
|
314
|
+
"X-Target-Org-Id"?: string | null;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
output: ApiResponse_list_ContactDealResponse__;
|
|
318
|
+
};
|
|
319
|
+
/**
|
|
320
|
+
* GET /deals/{deal_id}
|
|
321
|
+
* Get Deal
|
|
322
|
+
* tier: read · scope: deals:read
|
|
323
|
+
*/
|
|
324
|
+
get_deal_deals__deal_id__get: {
|
|
325
|
+
input: {
|
|
326
|
+
path: {
|
|
327
|
+
/** Deal ID (UUID) */
|
|
328
|
+
deal_id: string;
|
|
329
|
+
};
|
|
330
|
+
headers?: {
|
|
331
|
+
"X-Target-Org-Id"?: string | null;
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
output: ApiResponse_DealResponse_;
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* GET /deals/analytics
|
|
338
|
+
* Get Deal Analytics
|
|
339
|
+
* tier: read · scope: deals:read
|
|
340
|
+
*/
|
|
341
|
+
get_deal_analytics_deals_analytics_get: {
|
|
342
|
+
input: {
|
|
343
|
+
query?: {
|
|
344
|
+
/** Only this pipeline. */
|
|
345
|
+
pipeline_id?: string | null;
|
|
346
|
+
/** Only these owners. Repeatable. */
|
|
347
|
+
owner_ids?: Array<string> | null;
|
|
348
|
+
/** Only these stages. Repeatable. */
|
|
349
|
+
stage_ids?: Array<string> | null;
|
|
350
|
+
/** Close date lower bound, YYYY-MM-DD. */
|
|
351
|
+
close_date_from?: string | null;
|
|
352
|
+
/** Close date upper bound, YYYY-MM-DD. */
|
|
353
|
+
close_date_to?: string | null;
|
|
354
|
+
/** Match on deal or account name. */
|
|
355
|
+
search?: string | null;
|
|
356
|
+
/** Advanced filter tree as JSON, the same one `GET /deals` accepts. 400 if unparseable. */
|
|
357
|
+
segmentFilter?: string | null;
|
|
358
|
+
};
|
|
359
|
+
headers?: {
|
|
360
|
+
"X-Target-Org-Id"?: string | null;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
output: ApiResponse_CrmRecordPayload_;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* GET /deals/{deal_id}/crossfire
|
|
367
|
+
* Get Deal Crossfire
|
|
368
|
+
* tier: read · scope: deals:read
|
|
369
|
+
*/
|
|
370
|
+
get_deal_crossfire_deals__deal_id__crossfire_get: {
|
|
371
|
+
input: {
|
|
372
|
+
path: {
|
|
373
|
+
/** Deal id (UUID). */
|
|
374
|
+
deal_id: string;
|
|
375
|
+
};
|
|
376
|
+
headers?: {
|
|
377
|
+
"X-Target-Org-Id"?: string | null;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
output: ApiResponse_DealPayload_;
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* GET /deals/{deal_id}/detail
|
|
384
|
+
* Get Deal Detail
|
|
385
|
+
* tier: read · scope: deals:read
|
|
386
|
+
*/
|
|
387
|
+
get_deal_detail_deals__deal_id__detail_get: {
|
|
388
|
+
input: {
|
|
389
|
+
path: {
|
|
390
|
+
/** Deal id. */
|
|
391
|
+
deal_id: string;
|
|
392
|
+
};
|
|
393
|
+
query?: {
|
|
394
|
+
/** Include the optimistic-concurrency revision. Null in the response means this org has no revision tracking, so a save is unconditional - it does NOT mean revision 1. */
|
|
395
|
+
include_revision?: boolean;
|
|
396
|
+
};
|
|
397
|
+
headers?: {
|
|
398
|
+
"X-Target-Org-Id"?: string | null;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
output: ApiResponse_DealDetail_;
|
|
402
|
+
};
|
|
403
|
+
/**
|
|
404
|
+
* GET /deals/{deal_id}/documents/types/{doc_type}
|
|
405
|
+
* Get Deal Document
|
|
406
|
+
* tier: read · scope: deals:read
|
|
407
|
+
*/
|
|
408
|
+
get_deal_document_deals__deal_id__documents_types__doc_type__get: {
|
|
409
|
+
input: {
|
|
410
|
+
path: {
|
|
411
|
+
/** Deal id (UUID). */
|
|
412
|
+
deal_id: string;
|
|
413
|
+
/** Which generated document. One of the six the deal synthesis produces; anything else is a 422 naming them. */
|
|
414
|
+
doc_type: "deal_risks" | "next_steps" | "close_plan" | "scope_of_work" | "roi_analysis" | "competitive_analysis";
|
|
415
|
+
};
|
|
416
|
+
headers?: {
|
|
417
|
+
"X-Target-Org-Id"?: string | null;
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
output: ApiResponse_DocumentPayload_;
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* GET /deals/{deal_id}/documents/generation-status
|
|
424
|
+
* Get Deal Document Generation Status
|
|
425
|
+
* tier: read · scope: deals:read
|
|
426
|
+
*/
|
|
427
|
+
get_deal_document_generation_status_deals__deal_id__documents_generation_status_get: {
|
|
428
|
+
input: {
|
|
429
|
+
path: {
|
|
430
|
+
/** Deal id (UUID). */
|
|
431
|
+
deal_id: string;
|
|
432
|
+
};
|
|
433
|
+
headers?: {
|
|
434
|
+
"X-Target-Org-Id"?: string | null;
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
output: ApiResponse_DocumentPayload_;
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* GET /deals/{deal_id}/signals
|
|
441
|
+
* Get Deal Signals
|
|
442
|
+
* tier: read · scope: deals:read
|
|
443
|
+
*/
|
|
444
|
+
get_deal_signals_deals__deal_id__signals_get: {
|
|
445
|
+
input: {
|
|
446
|
+
path: {
|
|
447
|
+
/** Deal id. */
|
|
448
|
+
deal_id: string;
|
|
449
|
+
};
|
|
450
|
+
headers?: {
|
|
451
|
+
"X-Target-Org-Id"?: string | null;
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
output: ApiResponse_dict_;
|
|
455
|
+
};
|
|
456
|
+
/**
|
|
457
|
+
* GET /deals/stage-velocity
|
|
458
|
+
* Get Deal Stage Velocity
|
|
459
|
+
* tier: read · scope: deals:read
|
|
460
|
+
*/
|
|
461
|
+
get_deal_stage_velocity_deals_stage_velocity_get: {
|
|
462
|
+
input: {
|
|
463
|
+
query?: {
|
|
464
|
+
/** Only this pipeline (UUID). */
|
|
465
|
+
pipeline_id?: string | null;
|
|
466
|
+
/** Only these owners. Repeatable, at most 100. */
|
|
467
|
+
owner_ids?: Array<string> | null;
|
|
468
|
+
/** A deal with no stage change in this many days is 'stuck'. */
|
|
469
|
+
stuck_threshold_days?: number;
|
|
470
|
+
};
|
|
471
|
+
headers?: {
|
|
472
|
+
"X-Target-Org-Id"?: string | null;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
output: ApiResponse_DealStageVelocityPayload_;
|
|
476
|
+
};
|
|
477
|
+
/**
|
|
478
|
+
* GET /accounts/{account_id}/deals
|
|
479
|
+
* List Account Deals
|
|
480
|
+
* tier: read · scope: deals:read
|
|
481
|
+
*/
|
|
482
|
+
list_account_deals_accounts__account_id__deals_get: {
|
|
483
|
+
input: {
|
|
484
|
+
path: {
|
|
485
|
+
/** Account id. */
|
|
486
|
+
account_id: string;
|
|
487
|
+
};
|
|
488
|
+
headers?: {
|
|
489
|
+
"X-Target-Org-Id"?: string | null;
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
output: ApiResponse_DealListResponse_;
|
|
493
|
+
};
|
|
494
|
+
/**
|
|
495
|
+
* GET /deals/close-reasons
|
|
496
|
+
* List Deal Close Reasons
|
|
497
|
+
* tier: read · scope: deals:read
|
|
498
|
+
*/
|
|
499
|
+
list_deal_close_reasons_deals_close_reasons_get: {
|
|
500
|
+
input: {
|
|
501
|
+
query?: {
|
|
502
|
+
/** Filter to one list, e.g. won or lost. */
|
|
503
|
+
kind?: string | null;
|
|
504
|
+
};
|
|
505
|
+
headers?: {
|
|
506
|
+
"X-Target-Org-Id"?: string | null;
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
output: ApiResponse_CloseReasonListResponse_;
|
|
510
|
+
};
|
|
511
|
+
/**
|
|
512
|
+
* GET /deals/columns
|
|
513
|
+
* List Deal Columns
|
|
514
|
+
* tier: read · scope: deals:read
|
|
515
|
+
*/
|
|
516
|
+
list_deal_columns_deals_columns_get: {
|
|
517
|
+
input: {
|
|
518
|
+
query?: {
|
|
519
|
+
/** Only columns scoped to this list, plus the global ones. Omit for the global set alone. */
|
|
520
|
+
list_id?: number | null;
|
|
521
|
+
};
|
|
522
|
+
headers?: {
|
|
523
|
+
"X-Target-Org-Id"?: string | null;
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
output: ApiResponse_DealCollectionPayload_;
|
|
527
|
+
};
|
|
528
|
+
/**
|
|
529
|
+
* GET /deals/{deal_id}/contacts
|
|
530
|
+
* List Deal Contacts
|
|
531
|
+
* tier: read · scope: deals:read
|
|
532
|
+
*/
|
|
533
|
+
list_deal_contacts_deals__deal_id__contacts_get: {
|
|
534
|
+
input: {
|
|
535
|
+
path: {
|
|
536
|
+
/** Deal id. */
|
|
537
|
+
deal_id: string;
|
|
538
|
+
};
|
|
539
|
+
headers?: {
|
|
540
|
+
"X-Target-Org-Id"?: string | null;
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
output: ApiResponse_DealContactListResponse_;
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* GET /deals/custom-fields/di-config
|
|
547
|
+
* List Deal Custom Field Di Config
|
|
548
|
+
* tier: read · scope: deals:read
|
|
549
|
+
*/
|
|
550
|
+
list_deal_custom_field_di_config_deals_custom_fields_di_config_get: {
|
|
551
|
+
input: {
|
|
552
|
+
query?: {
|
|
553
|
+
/** Filter to one CRM provider's mappings. */
|
|
554
|
+
crm_provider?: string | null;
|
|
555
|
+
};
|
|
556
|
+
headers?: {
|
|
557
|
+
"X-Target-Org-Id"?: string | null;
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
output: ApiResponse_CustomFieldDiConfigListResponse_;
|
|
561
|
+
};
|
|
562
|
+
/**
|
|
563
|
+
* GET /deals/{deal_id}/documents
|
|
564
|
+
* List Deal Documents
|
|
565
|
+
* tier: read · scope: deals:read
|
|
566
|
+
*/
|
|
567
|
+
list_deal_documents_deals__deal_id__documents_get: {
|
|
568
|
+
input: {
|
|
569
|
+
path: {
|
|
570
|
+
/** Deal id (UUID). */
|
|
571
|
+
deal_id: string;
|
|
572
|
+
};
|
|
573
|
+
query?: {
|
|
574
|
+
/** `strategy` or `analysis`. Not validated by the app - an unrecognised folder matches nothing rather than failing. */
|
|
575
|
+
folder?: string | null;
|
|
576
|
+
};
|
|
577
|
+
headers?: {
|
|
578
|
+
"X-Target-Org-Id"?: string | null;
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
output: ApiResponse_DocumentListPayload_;
|
|
582
|
+
};
|
|
583
|
+
/**
|
|
584
|
+
* GET /deals/{deal_id}/history
|
|
585
|
+
* List Deal History
|
|
586
|
+
* tier: read · scope: deals:read
|
|
587
|
+
*/
|
|
588
|
+
list_deal_history_deals__deal_id__history_get: {
|
|
589
|
+
input: {
|
|
590
|
+
path: {
|
|
591
|
+
/** Deal id (UUID). */
|
|
592
|
+
deal_id: string;
|
|
593
|
+
};
|
|
594
|
+
query?: {
|
|
595
|
+
/** The app's cap, and it is a real ceiling rather than a default to raise: a long history pages through `offset`. */
|
|
596
|
+
limit?: number;
|
|
597
|
+
offset?: number;
|
|
598
|
+
};
|
|
599
|
+
headers?: {
|
|
600
|
+
"X-Target-Org-Id"?: string | null;
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
output: ApiResponse_DealCollectionPayload_;
|
|
604
|
+
};
|
|
605
|
+
/**
|
|
606
|
+
* GET /deals/{deal_id}/line-items
|
|
607
|
+
* List Deal Line Items
|
|
608
|
+
* tier: read · scope: deals:read
|
|
609
|
+
*/
|
|
610
|
+
list_deal_line_items_deals__deal_id__line_items_get: {
|
|
611
|
+
input: {
|
|
612
|
+
path: {
|
|
613
|
+
/** Deal id. */
|
|
614
|
+
deal_id: string;
|
|
615
|
+
};
|
|
616
|
+
headers?: {
|
|
617
|
+
"X-Target-Org-Id"?: string | null;
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
output: ApiResponse_DealLineItemsPayload_;
|
|
621
|
+
};
|
|
622
|
+
/**
|
|
623
|
+
* GET /deals
|
|
624
|
+
* List Deals
|
|
625
|
+
* tier: read · scope: deals:read
|
|
626
|
+
*/
|
|
627
|
+
list_deals_deals_get: {
|
|
628
|
+
input: {
|
|
629
|
+
query?: {
|
|
630
|
+
/** Page number */
|
|
631
|
+
page?: number;
|
|
632
|
+
/** Items per page */
|
|
633
|
+
limit?: number;
|
|
634
|
+
/** Filter by stage ID */
|
|
635
|
+
stage_id?: string | null;
|
|
636
|
+
/** Filter by pipeline ID */
|
|
637
|
+
pipeline_id?: string | null;
|
|
638
|
+
/** Search by deal name */
|
|
639
|
+
search?: string | null;
|
|
640
|
+
/** Filter by owner ID */
|
|
641
|
+
owner_id?: string | null;
|
|
642
|
+
/** Filter by owner email */
|
|
643
|
+
owner_email?: string | null;
|
|
644
|
+
/** Filter by deal outcome. A deal is won, lost, or open - exactly one. Prefer this over is_closed_won: the boolean's false branch means 'not won', which returns open AND unclassified deals alongside lost ones, and is the wrong cohort for closed-lost re-engagement. */
|
|
645
|
+
outcome?: ("won" | "lost" | "open") | null;
|
|
646
|
+
/** LEGACY - prefer outcome=. Retained for backwards compatibility with existing consumers. true means won; false means NOT won (open, lost and unclassified deals), which is rarely what a caller intends. */
|
|
647
|
+
is_closed_won?: boolean | null;
|
|
648
|
+
/** Only deals last touched before this timestamp */
|
|
649
|
+
last_activity_before?: string | null;
|
|
650
|
+
/** Deals last touched before this timestamp OR never touched at all. Union of last_activity_before and the no-activity cohort - use this for 'my stale deals' (last_activity_before alone excludes deals with no recorded activity, since NULL is never earlier-than). */
|
|
651
|
+
stale_before?: string | null;
|
|
652
|
+
/** Filter by whether the deal has recorded activity */
|
|
653
|
+
has_activity?: boolean | null;
|
|
654
|
+
/** Filter by whether the deal has a route to any contact. false returns the orphaned-deal cohort: no cb_deal_contacts row AND no live primary contact (a primary_contact_id pointing at a soft-deleted or merged-away contact counts as no route). Same definition the Data Quality panel counts, so the two can never disagree. */
|
|
655
|
+
has_contact?: boolean | null;
|
|
656
|
+
/** Only deals whose close_date is on/after this timestamp (inclusive lower bound). Pair with close_before for a period window, and with outcome=won for 'deals we closed-won in this period'. A period count needs BOTH a lower bound and the outcome join: close_before alone sums the entire deal history into every period. Deals with a NULL close_date are excluded (a deal with no close date is not closing in any window). A naive timestamp is treated as UTC. */
|
|
657
|
+
close_after?: string | null;
|
|
658
|
+
/** Only deals whose close_date is strictly before this timestamp (exclusive upper bound). The window is half-open [close_after, close_before) so adjacent periods never double-count a deal that closes exactly on a boundary. A naive timestamp is treated as UTC (the close_date column is timestamp without time zone). */
|
|
659
|
+
close_before?: string | null;
|
|
660
|
+
};
|
|
661
|
+
headers?: {
|
|
662
|
+
"X-Target-Org-Id"?: string | null;
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
output: ApiResponse_list_DealResponse__;
|
|
666
|
+
};
|
|
667
|
+
/**
|
|
668
|
+
* GET /deals/pipelines
|
|
669
|
+
* List Pipelines
|
|
670
|
+
* tier: read · scope: deals:read
|
|
671
|
+
*/
|
|
672
|
+
list_pipelines_deals_pipelines_get: {
|
|
673
|
+
input: {
|
|
674
|
+
headers?: {
|
|
675
|
+
"X-Target-Org-Id"?: string | null;
|
|
676
|
+
};
|
|
677
|
+
};
|
|
678
|
+
output: ApiResponse_list_PipelineResponse__;
|
|
679
|
+
};
|
|
680
|
+
/**
|
|
681
|
+
* POST /deals/{deal_id}/merge
|
|
682
|
+
* Merge Deal
|
|
683
|
+
* tier: destructive · scope: deals:delete
|
|
684
|
+
*/
|
|
685
|
+
merge_deal_deals__deal_id__merge_post: {
|
|
686
|
+
input: {
|
|
687
|
+
path: {
|
|
688
|
+
/** The deal that SURVIVES. */
|
|
689
|
+
deal_id: string;
|
|
690
|
+
};
|
|
691
|
+
headers?: {
|
|
692
|
+
"X-Target-Org-Id"?: string | null;
|
|
693
|
+
};
|
|
694
|
+
body: MergeDealRequest;
|
|
695
|
+
};
|
|
696
|
+
output: ApiResponse_DealPayload_;
|
|
697
|
+
};
|
|
698
|
+
/**
|
|
699
|
+
* PUT /deals/{deal_id}/pipeline
|
|
700
|
+
* Move Deal To Pipeline
|
|
701
|
+
* tier: write · scope: deals:write
|
|
702
|
+
*/
|
|
703
|
+
move_deal_to_pipeline_deals__deal_id__pipeline_put: {
|
|
704
|
+
input: {
|
|
705
|
+
path: {
|
|
706
|
+
/** Deal id. */
|
|
707
|
+
deal_id: string;
|
|
708
|
+
};
|
|
709
|
+
headers?: {
|
|
710
|
+
"X-Target-Org-Id"?: string | null;
|
|
711
|
+
};
|
|
712
|
+
body: DealMovePipelineRequest;
|
|
713
|
+
};
|
|
714
|
+
output: ApiResponse_DealOpResponse_;
|
|
715
|
+
};
|
|
716
|
+
/**
|
|
717
|
+
* GET /deals/{deal_id}/merge/preview
|
|
718
|
+
* Preview Deal Merge
|
|
719
|
+
* tier: read · scope: deals:read
|
|
720
|
+
*/
|
|
721
|
+
preview_deal_merge_deals__deal_id__merge_preview_get: {
|
|
722
|
+
input: {
|
|
723
|
+
path: {
|
|
724
|
+
/** The deal that SURVIVES. */
|
|
725
|
+
deal_id: string;
|
|
726
|
+
};
|
|
727
|
+
query: {
|
|
728
|
+
/** The deal that would be merged AWAY. */
|
|
729
|
+
secondary: string;
|
|
730
|
+
};
|
|
731
|
+
headers?: {
|
|
732
|
+
"X-Target-Org-Id"?: string | null;
|
|
733
|
+
};
|
|
734
|
+
};
|
|
735
|
+
output: ApiResponse_DealPayload_;
|
|
736
|
+
};
|
|
737
|
+
/**
|
|
738
|
+
* POST /deals/{deal_id}/documents/types/{doc_type}/regenerate
|
|
739
|
+
* Regenerate Deal Document
|
|
740
|
+
* tier: billable · scope: deals:run
|
|
741
|
+
*/
|
|
742
|
+
regenerate_deal_document_deals__deal_id__documents_types__doc_type__regenerate_post: {
|
|
743
|
+
input: {
|
|
744
|
+
path: {
|
|
745
|
+
/** Deal id (UUID). */
|
|
746
|
+
deal_id: string;
|
|
747
|
+
/** Which generated document. One of the six the deal synthesis produces; anything else is a 422 naming them. */
|
|
748
|
+
doc_type: "deal_risks" | "next_steps" | "close_plan" | "scope_of_work" | "roi_analysis" | "competitive_analysis";
|
|
749
|
+
};
|
|
750
|
+
headers?: {
|
|
751
|
+
"X-Target-Org-Id"?: string | null;
|
|
752
|
+
};
|
|
753
|
+
};
|
|
754
|
+
output: ApiResponse_DocumentPayload_;
|
|
755
|
+
};
|
|
756
|
+
/**
|
|
757
|
+
* DELETE /deals/{deal_id}/contacts/{person_id}
|
|
758
|
+
* Remove Deal Contact
|
|
759
|
+
* tier: destructive · scope: deals:delete
|
|
760
|
+
*/
|
|
761
|
+
remove_deal_contact_deals__deal_id__contacts__person_id__delete: {
|
|
762
|
+
input: {
|
|
763
|
+
path: {
|
|
764
|
+
/** Deal id. */
|
|
765
|
+
deal_id: string;
|
|
766
|
+
/** Contact id. */
|
|
767
|
+
person_id: string;
|
|
768
|
+
};
|
|
769
|
+
headers?: {
|
|
770
|
+
"X-Target-Org-Id"?: string | null;
|
|
771
|
+
};
|
|
772
|
+
};
|
|
773
|
+
output: void;
|
|
774
|
+
};
|
|
775
|
+
/**
|
|
776
|
+
* PUT /deals/{deal_id}/line-items
|
|
777
|
+
* Replace Deal Line Items
|
|
778
|
+
* tier: write · scope: deals:write
|
|
779
|
+
*/
|
|
780
|
+
replace_deal_line_items_deals__deal_id__line_items_put: {
|
|
781
|
+
input: {
|
|
782
|
+
path: {
|
|
783
|
+
/** Deal id. */
|
|
784
|
+
deal_id: string;
|
|
785
|
+
};
|
|
786
|
+
headers?: {
|
|
787
|
+
"X-Target-Org-Id"?: string | null;
|
|
788
|
+
};
|
|
789
|
+
body: DealLineItemsReplaceBody;
|
|
790
|
+
};
|
|
791
|
+
output: ApiResponse_DealLineItemsPayload_;
|
|
792
|
+
};
|
|
793
|
+
/**
|
|
794
|
+
* PUT /deals/{deal_id}/columns/values
|
|
795
|
+
* Set Deal Column Values
|
|
796
|
+
* tier: write · scope: deals:write
|
|
797
|
+
*/
|
|
798
|
+
set_deal_column_values_deals__deal_id__columns_values_put: {
|
|
799
|
+
input: {
|
|
800
|
+
path: {
|
|
801
|
+
/** Deal id (UUID). */
|
|
802
|
+
deal_id: string;
|
|
803
|
+
};
|
|
804
|
+
query?: {
|
|
805
|
+
/** Resolve list-scoped columns against this list. */
|
|
806
|
+
list_id?: number | null;
|
|
807
|
+
};
|
|
808
|
+
headers?: {
|
|
809
|
+
"X-Target-Org-Id"?: string | null;
|
|
810
|
+
};
|
|
811
|
+
body: SetDealColumnValuesRequest;
|
|
812
|
+
};
|
|
813
|
+
output: ApiResponse_DealPayload_;
|
|
814
|
+
};
|
|
815
|
+
/**
|
|
816
|
+
* PUT /deals/{deal_id}/company
|
|
817
|
+
* Set Deal Company
|
|
818
|
+
* tier: write · scope: deals:write
|
|
819
|
+
*/
|
|
820
|
+
set_deal_company_deals__deal_id__company_put: {
|
|
821
|
+
input: {
|
|
822
|
+
path: {
|
|
823
|
+
/** Deal id. */
|
|
824
|
+
deal_id: string;
|
|
825
|
+
};
|
|
826
|
+
headers?: {
|
|
827
|
+
"X-Target-Org-Id"?: string | null;
|
|
828
|
+
};
|
|
829
|
+
body: DealCompanyRequest;
|
|
830
|
+
};
|
|
831
|
+
output: ApiResponse_DealOpResponse_;
|
|
832
|
+
};
|
|
833
|
+
/**
|
|
834
|
+
* PUT /deals/{deal_id}/contacts/{contact_id}
|
|
835
|
+
* Set Deal Contact Role
|
|
836
|
+
* tier: write · scope: deals:write
|
|
837
|
+
*/
|
|
838
|
+
set_deal_contact_role_deals__deal_id__contacts__contact_id__put: {
|
|
839
|
+
input: {
|
|
840
|
+
path: {
|
|
841
|
+
/** Deal ID (UUID) */
|
|
842
|
+
deal_id: string;
|
|
843
|
+
/** mashup_contact_id (BigInt) of a contact already linked to this deal */
|
|
844
|
+
contact_id: number;
|
|
845
|
+
};
|
|
846
|
+
headers?: {
|
|
847
|
+
"X-Target-Org-Id"?: string | null;
|
|
848
|
+
};
|
|
849
|
+
body: DealContactRoleUpdateRequest;
|
|
850
|
+
};
|
|
851
|
+
output: ApiResponse_ContactBrief_;
|
|
852
|
+
};
|
|
853
|
+
/**
|
|
854
|
+
* PUT /deals/{deal_id}/contacts/{person_id}/primary
|
|
855
|
+
* Set Primary Deal Contact
|
|
856
|
+
* tier: write · scope: deals:write
|
|
857
|
+
*/
|
|
858
|
+
set_primary_deal_contact_deals__deal_id__contacts__person_id__primary_put: {
|
|
859
|
+
input: {
|
|
860
|
+
path: {
|
|
861
|
+
/** Deal id. */
|
|
862
|
+
deal_id: string;
|
|
863
|
+
/** Contact id to make primary. */
|
|
864
|
+
person_id: string;
|
|
865
|
+
};
|
|
866
|
+
headers?: {
|
|
867
|
+
"X-Target-Org-Id"?: string | null;
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
output: ApiResponse_DealContact_;
|
|
871
|
+
};
|
|
872
|
+
/**
|
|
873
|
+
* POST /deals/{deal_id}/rival-attach
|
|
874
|
+
* Set Rival Attach
|
|
875
|
+
* tier: write · scope: deals:write
|
|
876
|
+
*/
|
|
877
|
+
set_rival_attach_deals__deal_id__rival_attach_post: {
|
|
878
|
+
input: {
|
|
879
|
+
path: {
|
|
880
|
+
/** Deal id (UUID). */
|
|
881
|
+
deal_id: string;
|
|
882
|
+
};
|
|
883
|
+
headers?: {
|
|
884
|
+
"X-Target-Org-Id"?: string | null;
|
|
885
|
+
};
|
|
886
|
+
body: RivalAttachRequest;
|
|
887
|
+
};
|
|
888
|
+
output: ApiResponse_DealPayload_;
|
|
889
|
+
};
|
|
890
|
+
/**
|
|
891
|
+
* PATCH /deals/{deal_id}
|
|
892
|
+
* Update Deal
|
|
893
|
+
* tier: write · scope: deals:write
|
|
894
|
+
*/
|
|
895
|
+
update_deal_deals__deal_id__patch: {
|
|
896
|
+
input: {
|
|
897
|
+
path: {
|
|
898
|
+
/** Deal ID (UUID) */
|
|
899
|
+
deal_id: string;
|
|
900
|
+
};
|
|
901
|
+
headers?: {
|
|
902
|
+
"X-Target-Org-Id"?: string | null;
|
|
903
|
+
};
|
|
904
|
+
body: DealUpdateRequest;
|
|
905
|
+
};
|
|
906
|
+
output: ApiResponse_DealResponse_;
|
|
907
|
+
};
|
|
908
|
+
/**
|
|
909
|
+
* PUT /deals/{deal_id}/documents/{document_id}
|
|
910
|
+
* Update Deal Document
|
|
911
|
+
* tier: write · scope: deals:write
|
|
912
|
+
*/
|
|
913
|
+
update_deal_document_deals__deal_id__documents__document_id__put: {
|
|
914
|
+
input: {
|
|
915
|
+
path: {
|
|
916
|
+
/** Deal id (UUID). */
|
|
917
|
+
deal_id: string;
|
|
918
|
+
/** Document id, from the list read. */
|
|
919
|
+
document_id: string;
|
|
920
|
+
};
|
|
921
|
+
headers?: {
|
|
922
|
+
"X-Target-Org-Id"?: string | null;
|
|
923
|
+
};
|
|
924
|
+
body: DealDocumentUpdateRequest;
|
|
925
|
+
};
|
|
926
|
+
output: ApiResponse_DocumentPayload_;
|
|
927
|
+
};
|
|
928
|
+
/**
|
|
929
|
+
* PUT /deals/{deal_id}/notes/{note_id}
|
|
930
|
+
* Update Deal Note
|
|
931
|
+
* tier: write · scope: deals:write
|
|
932
|
+
*/
|
|
933
|
+
update_deal_note_deals__deal_id__notes__note_id__put: {
|
|
934
|
+
input: {
|
|
935
|
+
path: {
|
|
936
|
+
/** Deal id. */
|
|
937
|
+
deal_id: string;
|
|
938
|
+
/** Note id. */
|
|
939
|
+
note_id: string;
|
|
940
|
+
};
|
|
941
|
+
headers?: {
|
|
942
|
+
"X-Target-Org-Id"?: string | null;
|
|
943
|
+
};
|
|
944
|
+
body: DealNoteUpdateRequest;
|
|
945
|
+
};
|
|
946
|
+
output: ApiResponse_DealOpResponse_;
|
|
947
|
+
};
|
|
948
|
+
/**
|
|
949
|
+
* POST /deals/custom-fields/di-config
|
|
950
|
+
* Upsert Deal Custom Field Di Config
|
|
951
|
+
* tier: write · scope: deals:write
|
|
952
|
+
*/
|
|
953
|
+
upsert_deal_custom_field_di_config_deals_custom_fields_di_config_post: {
|
|
954
|
+
input: {
|
|
955
|
+
headers?: {
|
|
956
|
+
"X-Target-Org-Id"?: string | null;
|
|
957
|
+
};
|
|
958
|
+
body: CustomFieldDiConfigUpsertRequest;
|
|
959
|
+
};
|
|
960
|
+
output: ApiResponse_DealOpResponse_;
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
// 67 schemas referenced above (the same as G8Contract.<Name>).
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* Create a deal already attached to an account.
|
|
968
|
+
*
|
|
969
|
+
* `POST /deals` creates one standalone. This attaches it in the same call,
|
|
970
|
+
* which is the difference worth having: a two-step create leaves a window
|
|
971
|
+
* where the deal exists with no account.
|
|
972
|
+
*/
|
|
973
|
+
export interface AccountDealCreateRequest {
|
|
974
|
+
amount?: number | null;
|
|
975
|
+
close_date?: string | null;
|
|
976
|
+
contact_ids?: Array<string>;
|
|
977
|
+
currency?: string;
|
|
978
|
+
description?: string | null;
|
|
979
|
+
name: string;
|
|
980
|
+
/** Who owns the deal. Omit to take the app's default - an API key is an ORGANISATION credential, so there is no 'me' to fall back to. */
|
|
981
|
+
owner_id?: string | null;
|
|
982
|
+
pipeline_id?: string | null;
|
|
983
|
+
products?: Array<string>;
|
|
984
|
+
/** Stage NAME, not id. */
|
|
985
|
+
stage?: string;
|
|
986
|
+
/** Stage id. Takes precedence over `stage`. */
|
|
987
|
+
stage_id?: string | null;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
export interface ApiResponse_CloseReasonListResponse_ {
|
|
991
|
+
data: CloseReasonListResponse;
|
|
992
|
+
pagination?: PaginationMeta | null;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
export interface ApiResponse_ContactBrief_ {
|
|
996
|
+
data: ContactBrief;
|
|
997
|
+
pagination?: PaginationMeta | null;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
export interface ApiResponse_CrmRecordPayload_ {
|
|
1001
|
+
data: CrmRecordPayload;
|
|
1002
|
+
pagination?: PaginationMeta | null;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
export interface ApiResponse_CustomFieldDiConfigListResponse_ {
|
|
1006
|
+
data: CustomFieldDiConfigListResponse;
|
|
1007
|
+
pagination?: PaginationMeta | null;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
export interface ApiResponse_DealCollectionPayload_ {
|
|
1011
|
+
data: DealCollectionPayload;
|
|
1012
|
+
pagination?: PaginationMeta | null;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
export interface ApiResponse_DealContactListResponse_ {
|
|
1016
|
+
data: DealContactListResponse;
|
|
1017
|
+
pagination?: PaginationMeta | null;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
export interface ApiResponse_DealContact_ {
|
|
1021
|
+
data: DealContact;
|
|
1022
|
+
pagination?: PaginationMeta | null;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
export interface ApiResponse_DealDetail_ {
|
|
1026
|
+
data: DealDetail;
|
|
1027
|
+
pagination?: PaginationMeta | null;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
export interface ApiResponse_DealLineItemsPayload_ {
|
|
1031
|
+
data: DealLineItemsPayload;
|
|
1032
|
+
pagination?: PaginationMeta | null;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
export interface ApiResponse_DealListResponse_ {
|
|
1036
|
+
data: DealListResponse;
|
|
1037
|
+
pagination?: PaginationMeta | null;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
export interface ApiResponse_DealOpResponse_ {
|
|
1041
|
+
data: DealOpResponse;
|
|
1042
|
+
pagination?: PaginationMeta | null;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
export interface ApiResponse_DealPayload_ {
|
|
1046
|
+
data: DealPayload;
|
|
1047
|
+
pagination?: PaginationMeta | null;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
export interface ApiResponse_DealResponse_ {
|
|
1051
|
+
data: DealResponse;
|
|
1052
|
+
pagination?: PaginationMeta | null;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
export interface ApiResponse_DealStageVelocityPayload_ {
|
|
1056
|
+
data: DealStageVelocityPayload;
|
|
1057
|
+
pagination?: PaginationMeta | null;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
export interface ApiResponse_DocumentListPayload_ {
|
|
1061
|
+
data: DocumentListPayload;
|
|
1062
|
+
pagination?: PaginationMeta | null;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
export interface ApiResponse_DocumentPayload_ {
|
|
1066
|
+
data: DocumentPayload;
|
|
1067
|
+
pagination?: PaginationMeta | null;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
export interface ApiResponse_dict_ {
|
|
1071
|
+
data: Record<string, unknown>;
|
|
1072
|
+
pagination?: PaginationMeta | null;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
export interface ApiResponse_list_ContactDealResponse__ {
|
|
1076
|
+
data: Array<ContactDealResponse>;
|
|
1077
|
+
pagination?: PaginationMeta | null;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
export interface ApiResponse_list_DealResponse__ {
|
|
1081
|
+
data: Array<DealResponse>;
|
|
1082
|
+
pagination?: PaginationMeta | null;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
export interface ApiResponse_list_PipelineResponse__ {
|
|
1086
|
+
data: Array<PipelineResponse>;
|
|
1087
|
+
pagination?: PaginationMeta | null;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* The change applied to EVERY deal in the batch.
|
|
1092
|
+
*
|
|
1093
|
+
* PUT semantics, and the distinction matters: `null` leaves a value alone,
|
|
1094
|
+
* an EMPTY STRING clears it. So omitting a field and sending `""` are
|
|
1095
|
+
* different instructions, and the second one is destructive.
|
|
1096
|
+
*/
|
|
1097
|
+
export interface BulkDealChange {
|
|
1098
|
+
amount?: number | null;
|
|
1099
|
+
close_date?: string | null;
|
|
1100
|
+
currency?: string | null;
|
|
1101
|
+
custom_fields?: Record<string, unknown> | null;
|
|
1102
|
+
description?: string | null;
|
|
1103
|
+
next_step?: string | null;
|
|
1104
|
+
owner_id?: string | null;
|
|
1105
|
+
pipeline_id?: string | null;
|
|
1106
|
+
stage?: string | null;
|
|
1107
|
+
stage_id?: string | null;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Apply one change to up to 100 deals.
|
|
1112
|
+
*
|
|
1113
|
+
* Each deal is checked against the caller's deal scope individually; one the
|
|
1114
|
+
* caller cannot write is reported rather than aborting the batch.
|
|
1115
|
+
*/
|
|
1116
|
+
export interface BulkDealUpdateRequest {
|
|
1117
|
+
change: BulkDealChange;
|
|
1118
|
+
deal_ids: Array<string>;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* Add a close reason.
|
|
1123
|
+
*
|
|
1124
|
+
* Adding one is gated on `_REASON_MUTATE_PERMISSIONS` (the app's own route
|
|
1125
|
+
* gate): deliberately wider than the manager tier - a rep extends the list
|
|
1126
|
+
* inline while closing their own deal - but NOT open to org members with no
|
|
1127
|
+
* deal access. REMOVING one carries the same entry gate plus a creator-or-
|
|
1128
|
+
* manager check, because manager-only removal would make every rep's typo
|
|
1129
|
+
* permanent and org-wide.
|
|
1130
|
+
*/
|
|
1131
|
+
export interface CloseReasonCreateRequest {
|
|
1132
|
+
/** Which list this reason belongs to, e.g. won or lost. */
|
|
1133
|
+
kind: string;
|
|
1134
|
+
label: string;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* The close reasons, plus what this caller may do with them.
|
|
1139
|
+
*
|
|
1140
|
+
* `can_manage` is returned alongside the list ON PURPOSE: it is resolved by
|
|
1141
|
+
* the same rule the archive endpoint enforces, so a UI cannot render a delete
|
|
1142
|
+
* control the backend would refuse - or hide one it would allow.
|
|
1143
|
+
*/
|
|
1144
|
+
export interface CloseReasonListResponse {
|
|
1145
|
+
/** Whether this caller may archive reasons they did not create. */
|
|
1146
|
+
can_manage?: boolean | null;
|
|
1147
|
+
reasons?: Array<Record<string, unknown>>;
|
|
1148
|
+
[key: string]: unknown;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Lightweight contact summary embedded in deal responses.
|
|
1153
|
+
*
|
|
1154
|
+
* `id` is the canonical `mashup_contact_id` (BigInt), matching how contacts
|
|
1155
|
+
* are addressed everywhere else in the public API (g8_search_contacts,
|
|
1156
|
+
* g8_lookup_person, etc.). `role` is the contact's role within THIS deal
|
|
1157
|
+
* (champion / decision_maker / influencer / blocker / coach / end_user) and
|
|
1158
|
+
* is null when no role was set.
|
|
1159
|
+
*/
|
|
1160
|
+
export interface ContactBrief {
|
|
1161
|
+
email?: string | null;
|
|
1162
|
+
id: number;
|
|
1163
|
+
name?: string | null;
|
|
1164
|
+
role?: string | null;
|
|
1165
|
+
title?: string | null;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/** Deal response from contact or company deals handler (dict-based). */
|
|
1169
|
+
export interface ContactDealResponse {
|
|
1170
|
+
close_date?: string | null;
|
|
1171
|
+
created_at?: string | null;
|
|
1172
|
+
currency?: string | null;
|
|
1173
|
+
deal_id?: string | null;
|
|
1174
|
+
name?: string | null;
|
|
1175
|
+
owner_id?: string | null;
|
|
1176
|
+
pipeline_id?: string | null;
|
|
1177
|
+
role?: string | null;
|
|
1178
|
+
stage?: string | null;
|
|
1179
|
+
value?: number | null;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/** Add a custom column to the deals grid. */
|
|
1183
|
+
export interface CreateDealColumnRequest {
|
|
1184
|
+
/** Closed to what the app accepts. It validates this inside the handler, so a free string would raise there and escape as a 500 instead of a 422 naming the valid types. */
|
|
1185
|
+
data_type?: "text" | "int" | "numeric" | "number" | "boolean" | "date";
|
|
1186
|
+
/** Scope the column to one list. Null creates a GLOBAL column. */
|
|
1187
|
+
list_id?: number | null;
|
|
1188
|
+
/** Display name. */
|
|
1189
|
+
title: string;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* An open envelope for one record, one dashboard or one job receipt.
|
|
1194
|
+
*
|
|
1195
|
+
* Open because most of these reads are COMPUTED shapes - an engagement
|
|
1196
|
+
* summary, a next-best-step, an intelligence status - that grow with the
|
|
1197
|
+
* product, and dropping a field from an advisory read makes it say "nothing
|
|
1198
|
+
* to report" rather than "we did not tell you".
|
|
1199
|
+
*/
|
|
1200
|
+
export type CrmRecordPayload = Record<string, unknown>;
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* One custom-field mapping.
|
|
1204
|
+
*
|
|
1205
|
+
* Typed rather than left an open dict: `crm_provider` and `field_id` are
|
|
1206
|
+
* REQUIRED upstream, and an open list let a missing one reach the app's model
|
|
1207
|
+
* as a raw ValidationError from inside the proxy - a 500 for a plain client
|
|
1208
|
+
* error. The 255 caps are the underlying VARCHAR widths, and `display_name`
|
|
1209
|
+
* additionally feeds the Deal Intelligence LLM prompt, so its bound is a
|
|
1210
|
+
* token-budget and prompt-injection concern rather than cosmetic.
|
|
1211
|
+
*/
|
|
1212
|
+
export interface CustomFieldDiConfigItem {
|
|
1213
|
+
/** salesforce, hubspot or pipedrive. */
|
|
1214
|
+
crm_provider: string;
|
|
1215
|
+
display_name?: string | null;
|
|
1216
|
+
/** The CRM's own field id. */
|
|
1217
|
+
field_id: string;
|
|
1218
|
+
id?: string | null;
|
|
1219
|
+
include_in_di_summary?: boolean;
|
|
1220
|
+
include_in_forecast_probability?: boolean;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* Deal custom-field mappings for a CRM provider.
|
|
1225
|
+
*
|
|
1226
|
+
* This is what a rebuilt deal form needs to know which custom fields exist
|
|
1227
|
+
* and how they map outward - without it a custom UI can render the built-in
|
|
1228
|
+
* columns and nothing else.
|
|
1229
|
+
*/
|
|
1230
|
+
export interface CustomFieldDiConfigListResponse {
|
|
1231
|
+
configs?: Array<Record<string, unknown>>;
|
|
1232
|
+
total?: number;
|
|
1233
|
+
[key: string]: unknown;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* Replace the deal custom-field mappings.
|
|
1238
|
+
*
|
|
1239
|
+
* `items` is the FULL desired set for the providers it names, not a delta -
|
|
1240
|
+
* the app upserts what is sent. Capped at 100 by the app; declared here so an
|
|
1241
|
+
* over-long request is a 422 naming the field rather than a failure deeper
|
|
1242
|
+
* in.
|
|
1243
|
+
*/
|
|
1244
|
+
export interface CustomFieldDiConfigUpsertRequest {
|
|
1245
|
+
items: Array<CustomFieldDiConfigItem>;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/** An open envelope for a LIST result, so a bare list keeps its shape. */
|
|
1249
|
+
export interface DealCollectionPayload {
|
|
1250
|
+
items?: Array<unknown>;
|
|
1251
|
+
[key: string]: unknown;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/** Attach or change the company on a deal. */
|
|
1255
|
+
export interface DealCompanyRequest {
|
|
1256
|
+
/** The CANONICAL company id (`mashup_companies`), not a `cb_company_extensions` / ABM overlay id. The two are different tables with different ids and passing the wrong one attaches the deal to nothing. */
|
|
1257
|
+
mashup_company_id: number;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* One person linked to a deal.
|
|
1262
|
+
*
|
|
1263
|
+
* `role` is the person's role on THIS deal (champion, decision_maker,
|
|
1264
|
+
* influencer, blocker, coach, end_user). `buying_role` is their general
|
|
1265
|
+
* buying role on the contact record and is NOT deal-specific - the two are
|
|
1266
|
+
* separate fields in the app and conflating them loses the distinction
|
|
1267
|
+
* between "who this is" and "what they are to this deal".
|
|
1268
|
+
*/
|
|
1269
|
+
export interface DealContact {
|
|
1270
|
+
/** General buying role from the contact record. */
|
|
1271
|
+
buying_role?: string | null;
|
|
1272
|
+
created_at?: string | null;
|
|
1273
|
+
email?: string | null;
|
|
1274
|
+
/** Link id, not the person id. */
|
|
1275
|
+
id?: string | null;
|
|
1276
|
+
is_primary?: boolean | null;
|
|
1277
|
+
name?: string | null;
|
|
1278
|
+
person_id?: string | null;
|
|
1279
|
+
/** Role on THIS deal. */
|
|
1280
|
+
role?: string | null;
|
|
1281
|
+
title?: string | null;
|
|
1282
|
+
[key: string]: unknown;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
export interface DealContactCreateRequest {
|
|
1286
|
+
/** Contact to link to the deal. */
|
|
1287
|
+
person_id: string;
|
|
1288
|
+
/** Role on this deal: champion, decision_maker, influencer, blocker, coach or end_user. The app does not constrain the value, so it is left open here rather than declaring an enum this surface would then have to keep in lock-step. */
|
|
1289
|
+
role?: string | null;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
/** Everyone linked to a deal. */
|
|
1293
|
+
export interface DealContactListResponse {
|
|
1294
|
+
contacts?: Array<DealContact>;
|
|
1295
|
+
total?: number;
|
|
1296
|
+
[key: string]: unknown;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* Body for `PUT /deals/{deal_id}/contacts/{contact_id}`.
|
|
1301
|
+
*
|
|
1302
|
+
* `role` is REQUIRED but nullable. That combination is the whole point of a
|
|
1303
|
+
* PUT here: `{"role": "champion"}` sets it, `{"role": null}` clears it, and
|
|
1304
|
+
* an empty body `{}` is a 422 rather than a silent no-op — a PUT that says
|
|
1305
|
+
* nothing about the sub-resource it is replacing is a caller bug, and the
|
|
1306
|
+
* alternative (treating omission as "clear") would delete data on a typo.
|
|
1307
|
+
*/
|
|
1308
|
+
export interface DealContactRoleUpdateRequest {
|
|
1309
|
+
/** Buying-committee role for this contact on this deal. One of: champion, decision_maker, influencer, blocker, coach, end_user. Pass null to clear the role. */
|
|
1310
|
+
role: string | null;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
export interface DealCreateRequest {
|
|
1314
|
+
/** Set true to create a deal even if one already exists for the company */
|
|
1315
|
+
allow_duplicate?: boolean;
|
|
1316
|
+
/** Deal monetary value */
|
|
1317
|
+
amount?: number | null;
|
|
1318
|
+
/** Expected close date (ISO 8601) */
|
|
1319
|
+
close_date?: string | null;
|
|
1320
|
+
/** Deprecated: the company is derived from the contacts. If sent, it must match; otherwise omit it. */
|
|
1321
|
+
company_id?: number | null;
|
|
1322
|
+
/** mashup_contact_ids to associate with the deal (>=1 required; all must share one company) */
|
|
1323
|
+
contact_ids: Array<number>;
|
|
1324
|
+
/** Currency code (default: USD) */
|
|
1325
|
+
currency?: string | null;
|
|
1326
|
+
/** Deal description */
|
|
1327
|
+
description?: string | null;
|
|
1328
|
+
/** Deal name */
|
|
1329
|
+
name: string;
|
|
1330
|
+
/** Deal owner (user id or email). Required. */
|
|
1331
|
+
owner_id: string;
|
|
1332
|
+
/** Pipeline ID (defaults to org default) */
|
|
1333
|
+
pipeline_id?: string | null;
|
|
1334
|
+
/** Stage ID (from /deals/pipelines) */
|
|
1335
|
+
stage_id?: string | null;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* One deal, with the related data the detail page reads.
|
|
1340
|
+
*
|
|
1341
|
+
* `revision` is the optimistic-concurrency token. It is `None` when the org
|
|
1342
|
+
* has no canonical revision tracking provisioned - the app degrades rather
|
|
1343
|
+
* than 503ing a read - and a null there means an unconditional save, NOT
|
|
1344
|
+
* revision 1. Do not default it.
|
|
1345
|
+
*/
|
|
1346
|
+
export interface DealDetail {
|
|
1347
|
+
amount?: number | null;
|
|
1348
|
+
close_date?: string | null;
|
|
1349
|
+
company_id?: string | null;
|
|
1350
|
+
created_at?: string | null;
|
|
1351
|
+
currency?: string | null;
|
|
1352
|
+
description?: string | null;
|
|
1353
|
+
id?: string | null;
|
|
1354
|
+
name?: string | null;
|
|
1355
|
+
owner_id?: string | null;
|
|
1356
|
+
pipeline_id?: string | null;
|
|
1357
|
+
/** Optimistic-concurrency token. None means this org has no revision tracking, so a save is unconditional - it does NOT mean 1. */
|
|
1358
|
+
revision?: number | null;
|
|
1359
|
+
stage?: string | null;
|
|
1360
|
+
stage_id?: string | null;
|
|
1361
|
+
status?: string | null;
|
|
1362
|
+
updated_at?: string | null;
|
|
1363
|
+
[key: string]: unknown;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* Edit a generated deal document in place.
|
|
1368
|
+
*
|
|
1369
|
+
* Mirrors `campaign_builder.models.deal_documents.UpdateDealDocumentRequest`.
|
|
1370
|
+
* An omitted field is left alone; `structured_data` REPLACES the stored
|
|
1371
|
+
* object rather than merging into it.
|
|
1372
|
+
*/
|
|
1373
|
+
export interface DealDocumentUpdateRequest {
|
|
1374
|
+
/** The document body. */
|
|
1375
|
+
content?: string | null;
|
|
1376
|
+
/** The machine-readable half. Replaces, does not merge. */
|
|
1377
|
+
structured_data?: Record<string, unknown> | null;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* Which side of the merge wins one field.
|
|
1382
|
+
*
|
|
1383
|
+
* Without an override the app picks per its own rules. Name a field here to
|
|
1384
|
+
* decide it yourself - the only way to keep a value from the deal that is
|
|
1385
|
+
* being merged AWAY.
|
|
1386
|
+
*/
|
|
1387
|
+
export interface DealFieldOverride {
|
|
1388
|
+
field: string;
|
|
1389
|
+
winner: "primary" | "secondary";
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
/** A deal line item. Money fields are in cents. */
|
|
1393
|
+
export interface DealLineItemRecord {
|
|
1394
|
+
billing_frequency?: string | null;
|
|
1395
|
+
description?: string | null;
|
|
1396
|
+
discount_pct: number;
|
|
1397
|
+
id: string;
|
|
1398
|
+
line_total: number;
|
|
1399
|
+
manual_product_id?: string | null;
|
|
1400
|
+
product_name: string;
|
|
1401
|
+
quantity: number;
|
|
1402
|
+
sort_order: number;
|
|
1403
|
+
stripe_price_id?: string | null;
|
|
1404
|
+
stripe_product_id?: string | null;
|
|
1405
|
+
unit_amount: number;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* One line item in a replace request. Money is in CENTS.
|
|
1410
|
+
*
|
|
1411
|
+
* `line_total` is not accepted: the server recomputes it from
|
|
1412
|
+
* `unit_amount`, `quantity` and `discount_pct`.
|
|
1413
|
+
*/
|
|
1414
|
+
export interface DealLineItemWrite {
|
|
1415
|
+
billing_frequency?: string | null;
|
|
1416
|
+
description?: string | null;
|
|
1417
|
+
discount_pct?: number;
|
|
1418
|
+
/** Id of a manually-defined product. */
|
|
1419
|
+
manual_product_id?: string | null;
|
|
1420
|
+
product_name: string;
|
|
1421
|
+
quantity?: number;
|
|
1422
|
+
sort_order?: number;
|
|
1423
|
+
/** Catalog price id, when catalog-backed. */
|
|
1424
|
+
stripe_price_id?: string | null;
|
|
1425
|
+
/** Catalog product id, when catalog-backed. */
|
|
1426
|
+
stripe_product_id?: string | null;
|
|
1427
|
+
/** Unit price in cents. */
|
|
1428
|
+
unit_amount: number;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* A deal's line items with its derived amount and quote-mismatch flag.
|
|
1433
|
+
*
|
|
1434
|
+
* `amount` and `linked_quote_total` are in DOLLARS (the deal's own unit);
|
|
1435
|
+
* line-item money is in cents. `amount_mismatch` is true when the deal amount
|
|
1436
|
+
* and its most authoritative linked quote disagree by more than half a cent.
|
|
1437
|
+
*/
|
|
1438
|
+
export interface DealLineItemsPayload {
|
|
1439
|
+
amount?: number | null;
|
|
1440
|
+
amount_mismatch?: boolean;
|
|
1441
|
+
currency?: string | null;
|
|
1442
|
+
deal_id: string;
|
|
1443
|
+
line_items?: Array<DealLineItemRecord>;
|
|
1444
|
+
linked_quote_total?: number | null;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
/** The FULL desired set of line items. An empty list clears them. */
|
|
1448
|
+
export interface DealLineItemsReplaceBody {
|
|
1449
|
+
line_items?: Array<DealLineItemWrite>;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
/** A page of deals on one account. */
|
|
1453
|
+
export interface DealListResponse {
|
|
1454
|
+
deals?: Array<DealSummary>;
|
|
1455
|
+
total?: number;
|
|
1456
|
+
[key: string]: unknown;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* Move a deal to a different pipeline.
|
|
1461
|
+
*
|
|
1462
|
+
* The deal keeps its identity and history; only its pipeline and stage
|
|
1463
|
+
* change. Its current stage does NOT carry over - the target pipeline has
|
|
1464
|
+
* its own stages, and the app re-seats the deal within them.
|
|
1465
|
+
*/
|
|
1466
|
+
export interface DealMovePipelineRequest {
|
|
1467
|
+
/** Pipeline to move the deal into. */
|
|
1468
|
+
target_pipeline_id: string;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
export interface DealNoteMention {
|
|
1472
|
+
email?: string | null;
|
|
1473
|
+
id: string;
|
|
1474
|
+
name?: string | null;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
/** Rewrite a note's body and its mentions. */
|
|
1478
|
+
export interface DealNoteUpdateRequest {
|
|
1479
|
+
/** Full replacement body - this is not a patch. */
|
|
1480
|
+
content: string;
|
|
1481
|
+
/** Who is mentioned AFTER the edit. Omitting someone removes their mention, because the list replaces rather than adds. */
|
|
1482
|
+
mentioned_users?: Array<DealNoteMention>;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
/** Whatever the operation returns, carried through whole. */
|
|
1486
|
+
export type DealOpResponse = Record<string, unknown>;
|
|
1487
|
+
|
|
1488
|
+
/**
|
|
1489
|
+
* An open envelope for a deal, a merge preview or a column result.
|
|
1490
|
+
*
|
|
1491
|
+
* Open because the crossfire and merge-preview payloads are computed shapes
|
|
1492
|
+
* that grow with the product, and a closed model would drop a field from an
|
|
1493
|
+
* ADVISORY read - where a missing signal reads as "nothing to worry about"
|
|
1494
|
+
* rather than "we did not tell you".
|
|
1495
|
+
*/
|
|
1496
|
+
export type DealPayload = Record<string, unknown>;
|
|
1497
|
+
|
|
1498
|
+
export interface DealResponse {
|
|
1499
|
+
amount?: number | null;
|
|
1500
|
+
close_date?: string | null;
|
|
1501
|
+
closed_lost_reason?: string | null;
|
|
1502
|
+
company_id?: unknown | null;
|
|
1503
|
+
contact_count?: number;
|
|
1504
|
+
contacts?: Array<ContactBrief> | null;
|
|
1505
|
+
created_at?: string | null;
|
|
1506
|
+
currency?: string | null;
|
|
1507
|
+
description?: string | null;
|
|
1508
|
+
id?: string | null;
|
|
1509
|
+
last_activity_at?: string | null;
|
|
1510
|
+
name?: string | null;
|
|
1511
|
+
owner_email?: string | null;
|
|
1512
|
+
owner_id?: string | null;
|
|
1513
|
+
owner_name?: string | null;
|
|
1514
|
+
pipeline_id?: string | null;
|
|
1515
|
+
primary_contact?: ContactBrief | null;
|
|
1516
|
+
/** CRM revision after a conditional update */
|
|
1517
|
+
revision?: number | null;
|
|
1518
|
+
stage_id?: string | null;
|
|
1519
|
+
stage_name?: string | null;
|
|
1520
|
+
updated_at?: string | null;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
/**
|
|
1524
|
+
* Movement through one stage.
|
|
1525
|
+
*
|
|
1526
|
+
* `avg_days_in_stage` and `conversion_rate` are null (not 0) when there is no
|
|
1527
|
+
* sample: an average over zero completed dwells is undefined.
|
|
1528
|
+
*/
|
|
1529
|
+
export interface DealStageVelocityBucket {
|
|
1530
|
+
avg_days_in_stage?: number | null;
|
|
1531
|
+
completed_dwells: number;
|
|
1532
|
+
conversion_rate?: number | null;
|
|
1533
|
+
entered_count: number;
|
|
1534
|
+
fell_back_count: number;
|
|
1535
|
+
position: number;
|
|
1536
|
+
progressed_count: number;
|
|
1537
|
+
stage_id: string;
|
|
1538
|
+
stage_name: string;
|
|
1539
|
+
still_in_stage_count: number;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
export interface DealStageVelocityPayload {
|
|
1543
|
+
by_stage?: Array<DealStageVelocityBucket>;
|
|
1544
|
+
disclosures?: Array<string>;
|
|
1545
|
+
stuck_deals: DealStageVelocityStuckSummary;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
export interface DealStageVelocityStuckDeal {
|
|
1549
|
+
days_in_current_stage: number;
|
|
1550
|
+
deal_id: string;
|
|
1551
|
+
deal_name?: string | null;
|
|
1552
|
+
last_transitioned_at: string;
|
|
1553
|
+
owner_id?: string | null;
|
|
1554
|
+
owner_name?: string | null;
|
|
1555
|
+
stage_id?: string | null;
|
|
1556
|
+
stage_name?: string | null;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
/** `total_count` is exact; `deals` is capped at 100 (`truncated` says so). */
|
|
1560
|
+
export interface DealStageVelocityStuckSummary {
|
|
1561
|
+
deals?: Array<DealStageVelocityStuckDeal>;
|
|
1562
|
+
threshold_days: number;
|
|
1563
|
+
total_count: number;
|
|
1564
|
+
truncated: boolean;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
/** One deal as it appears in a list. */
|
|
1568
|
+
export interface DealSummary {
|
|
1569
|
+
amount?: number | null;
|
|
1570
|
+
close_date?: string | null;
|
|
1571
|
+
created_at?: string | null;
|
|
1572
|
+
currency?: string | null;
|
|
1573
|
+
id?: string | null;
|
|
1574
|
+
name?: string | null;
|
|
1575
|
+
owner_id?: string | null;
|
|
1576
|
+
pipeline_id?: string | null;
|
|
1577
|
+
stage?: string | null;
|
|
1578
|
+
status?: string | null;
|
|
1579
|
+
[key: string]: unknown;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
export interface DealUpdateRequest {
|
|
1583
|
+
/** mashup_contact_ids to add to the deal (must match the deal's company; idempotent) */
|
|
1584
|
+
add_contact_ids?: Array<number>;
|
|
1585
|
+
/** Deal monetary value */
|
|
1586
|
+
amount?: number | null;
|
|
1587
|
+
/** Expected close date (ISO 8601) */
|
|
1588
|
+
close_date?: string | null;
|
|
1589
|
+
/** Buying-committee roles keyed by mashup_contact_id, e.g. {"5500429": "champion", "5500914": null}. Valid roles: champion, decision_maker, influencer, blocker, coach, end_user. null clears a role. Each id must already be linked to the deal or be present in add_contact_ids in the same request (422 otherwise). */
|
|
1590
|
+
contact_roles?: (Record<string, string | null>) | null;
|
|
1591
|
+
/** Currency code */
|
|
1592
|
+
currency?: string | null;
|
|
1593
|
+
/** Deal description */
|
|
1594
|
+
description?: string | null;
|
|
1595
|
+
/** Apply only if the canonical CRM revision still matches; otherwise return 409. Omit for existing PATCH behavior. */
|
|
1596
|
+
expected_revision?: number | null;
|
|
1597
|
+
/** Deal name */
|
|
1598
|
+
name?: string | null;
|
|
1599
|
+
/** Reassign deal owner (member id, email, or PropelAuth uid). Cannot be cleared. */
|
|
1600
|
+
owner_id?: string | null;
|
|
1601
|
+
/** mashup_contact_ids to remove from the deal (idempotent — unlinked skipped) */
|
|
1602
|
+
remove_contact_ids?: Array<number>;
|
|
1603
|
+
/** Stage ID */
|
|
1604
|
+
stage_id?: string | null;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
/**
|
|
1608
|
+
* An open envelope for a LIST result, so a bare list keeps its shape.
|
|
1609
|
+
*
|
|
1610
|
+
* `items` is always present and always the list, whichever key the app used
|
|
1611
|
+
* for it - so a caller can page one way rather than learning six key names.
|
|
1612
|
+
*/
|
|
1613
|
+
export interface DocumentListPayload {
|
|
1614
|
+
items?: Array<unknown>;
|
|
1615
|
+
[key: string]: unknown;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
/**
|
|
1619
|
+
* An open envelope for one document, folder or questionnaire.
|
|
1620
|
+
*
|
|
1621
|
+
* Open on purpose: a Library document carries extraction metadata, a
|
|
1622
|
+
* questionnaire carries per-provider processing detail, and a generated deal
|
|
1623
|
+
* document carries `structured_data` and `highlights` whose shape is the
|
|
1624
|
+
* generator's rather than this contract's. Pinning those would silently drop
|
|
1625
|
+
* whatever the app learned to return that this file had not caught up on.
|
|
1626
|
+
*/
|
|
1627
|
+
export type DocumentPayload = Record<string, unknown>;
|
|
1628
|
+
|
|
1629
|
+
/**
|
|
1630
|
+
* Merge one deal into another. THE SECONDARY DEAL STOPS EXISTING.
|
|
1631
|
+
*
|
|
1632
|
+
* `secondary_id` is the deal merged AWAY; the deal in the path survives.
|
|
1633
|
+
* Preview it first with `GET /deals/{deal_id}/merge/preview` - that call
|
|
1634
|
+
* says exactly which field values change and which records move.
|
|
1635
|
+
*/
|
|
1636
|
+
export interface MergeDealRequest {
|
|
1637
|
+
/** Decide individual fields yourself instead of taking the app's rules. */
|
|
1638
|
+
field_overrides?: Array<DealFieldOverride>;
|
|
1639
|
+
/** The deal to merge AWAY. Must be a UUID; the path deal survives. */
|
|
1640
|
+
secondary_id: string;
|
|
1641
|
+
/** The duplicate-suggestion this merge acts on, if any. */
|
|
1642
|
+
suggestion_id?: string | null;
|
|
1643
|
+
/** What prompted the merge. Recorded on the audit row. */
|
|
1644
|
+
trigger?: "manual" | "queue" | "bulk_criterion";
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
export interface PaginationMeta {
|
|
1648
|
+
/** Whether there are more pages */
|
|
1649
|
+
has_next: boolean;
|
|
1650
|
+
/** Items per page */
|
|
1651
|
+
limit: number;
|
|
1652
|
+
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
1653
|
+
next_cursor?: string | null;
|
|
1654
|
+
/** Current page number (1-indexed) */
|
|
1655
|
+
page: number;
|
|
1656
|
+
/** Total number of items */
|
|
1657
|
+
total: number;
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
export interface PipelineResponse {
|
|
1661
|
+
id: string;
|
|
1662
|
+
is_default?: boolean;
|
|
1663
|
+
name: string;
|
|
1664
|
+
stages?: Array<PipelineStageResponse>;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
export interface PipelineStageResponse {
|
|
1668
|
+
channel_scripts?: Record<string, string>;
|
|
1669
|
+
color?: string | null;
|
|
1670
|
+
id: string;
|
|
1671
|
+
name: string;
|
|
1672
|
+
position?: number | null;
|
|
1673
|
+
probability?: number | null;
|
|
1674
|
+
recommended_elements?: Array<string>;
|
|
1675
|
+
required_elements?: Array<string>;
|
|
1676
|
+
stage_type?: string | null;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
/** Record which competitor is on a deal, and how it is going. */
|
|
1680
|
+
export interface RivalAttachRequest {
|
|
1681
|
+
/** The competitor. Null detaches the current one. */
|
|
1682
|
+
competitor_id?: string | null;
|
|
1683
|
+
/** Where the deal stands against them. */
|
|
1684
|
+
status: string;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
/**
|
|
1688
|
+
* Write custom column values on one deal.
|
|
1689
|
+
*
|
|
1690
|
+
* `null` CLEARS a value rather than leaving it alone - this is a write of
|
|
1691
|
+
* exactly what you send, not a patch that skips nulls.
|
|
1692
|
+
*/
|
|
1693
|
+
export interface SetDealColumnValuesRequest {
|
|
1694
|
+
/** Column key -> value. A null clears that column. */
|
|
1695
|
+
values: Record<string, string | number | boolean | null>;
|
|
1696
|
+
}
|