@hirefinn/sdk 0.3.0 → 0.4.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.
@@ -20,7 +20,7 @@ export interface OperationInfo {
20
20
  holdable: boolean;
21
21
  experimental: boolean;
22
22
  }
23
- /** 154 operations. */
23
+ /** 165 operations. */
24
24
  export declare const OPERATIONS: readonly OperationInfo[];
25
25
  /** Routes the spec marks as holdable for approval. */
26
- export type SpecHoldableRoute = 'post /calls' | 'post /phone_numbers' | 'post /deployments' | 'post /agents/{id}/cases' | 'post /chat/conversations' | 'post /chat/conversations/{id}/messages' | 'post /crm/records/{id}/stage_moves' | 'post /crm/records/{id}/forms/{form_id}/submissions' | 'post /crm/records/{id}/forms/{form_id}/links' | 'post /crm/records/{id}/upload_links' | 'post /crm/imports';
26
+ export type SpecHoldableRoute = 'post /calls' | 'post /phone_numbers' | 'post /deployments' | 'post /deployments/inbound' | 'post /agents/{id}/cases' | 'post /chat/conversations' | 'post /chat/conversations/{id}/messages' | 'patch /chat/contacts/{id}' | 'post /sales/plays/{slug}/run' | 'post /crm/records/{id}/stage_moves' | 'post /crm/records/{id}/forms/{form_id}/submissions' | 'post /crm/records/{id}/forms/{form_id}/links' | 'post /crm/records/{id}/upload_links' | 'post /crm/imports' | 'patch /chat/agents/{agent_id}';
@@ -6,7 +6,7 @@
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.OPERATIONS = void 0;
9
- /** 154 operations. */
9
+ /** 165 operations. */
10
10
  exports.OPERATIONS = [
11
11
  { operationId: 'listCalls', method: 'get', path: '/calls', tag: 'Calls', scope: 'voice:read', sdk: 'calls.list', pathParams: [], generated: false, holdable: false, experimental: false },
12
12
  { operationId: 'createCall', method: 'post', path: '/calls', tag: 'Calls', scope: 'voice:write', sdk: 'calls.create', pathParams: [], generated: false, holdable: true, experimental: false },
@@ -34,7 +34,7 @@ exports.OPERATIONS = [
34
34
  { operationId: 'removeAudienceContact', method: 'delete', path: '/audiences/{audience_id}/contacts/{phone}', tag: 'Audiences', scope: 'voice:write', sdk: 'audiences.removeContact', pathParams: ['audience_id', 'phone'], generated: false, holdable: false, experimental: false },
35
35
  { operationId: 'listDeployments', method: 'get', path: '/deployments', tag: 'Deployments', scope: 'voice:read', sdk: 'deployments.list', pathParams: [], generated: false, holdable: false, experimental: false },
36
36
  { operationId: 'createOutboundDeployment', method: 'post', path: '/deployments', tag: 'Deployments', scope: 'voice:write', sdk: 'deployments.createOutbound', pathParams: [], generated: false, holdable: true, experimental: false },
37
- { operationId: 'createInboundDeployment', method: 'post', path: '/deployments/inbound', tag: 'Deployments', scope: 'voice:write', sdk: 'deployments.createInbound', pathParams: [], generated: false, holdable: false, experimental: false },
37
+ { operationId: 'createInboundDeployment', method: 'post', path: '/deployments/inbound', tag: 'Deployments', scope: 'voice:write', sdk: 'deployments.createInbound', pathParams: [], generated: false, holdable: true, experimental: false },
38
38
  { operationId: 'retrieveDeployment', method: 'get', path: '/deployments/{id}', tag: 'Deployments', scope: 'voice:read', sdk: 'deployments.retrieve', pathParams: ['id'], generated: false, holdable: false, experimental: false },
39
39
  { operationId: 'stopDeployment', method: 'post', path: '/deployments/{id}/stop', tag: 'Deployments', scope: 'voice:write', sdk: 'deployments.stop', pathParams: ['id'], generated: false, holdable: false, experimental: false },
40
40
  { operationId: 'stopInboundDeployment', method: 'post', path: '/deployments/inbound/{finn_id}/stop', tag: 'Deployments', scope: 'voice:write', sdk: 'deployments.stopInbound', pathParams: ['finn_id'], generated: false, holdable: false, experimental: false },
@@ -62,15 +62,16 @@ exports.OPERATIONS = [
62
62
  { operationId: 'decideApproval', method: 'post', path: '/approvals/{id}/decide', tag: 'Approvals', scope: 'approvals:write', sdk: 'approvals.decide', pathParams: ['id'], generated: false, holdable: false, experimental: false },
63
63
  { operationId: 'approveApproval', method: 'post', path: '/approvals/{id}/approve', tag: 'Approvals', scope: 'approvals:write', sdk: 'approvals.approve', pathParams: ['id'], generated: false, holdable: false, experimental: false },
64
64
  { operationId: 'rejectApproval', method: 'post', path: '/approvals/{id}/reject', tag: 'Approvals', scope: 'approvals:write', sdk: 'approvals.reject', pathParams: ['id'], generated: false, holdable: false, experimental: false },
65
- { operationId: 'listAgents', method: 'get', path: '/agents', tag: 'Agents', scope: null, sdk: 'agents.list', pathParams: [], generated: false, holdable: false, experimental: false },
66
- { operationId: 'createAgent', method: 'post', path: '/agents', tag: 'Agents', scope: null, sdk: 'agents.create', pathParams: [], generated: false, holdable: false, experimental: false },
67
- { operationId: 'draftAgent', method: 'post', path: '/agents/draft', tag: 'Agents', scope: null, sdk: 'agents.draft', pathParams: [], generated: false, holdable: false, experimental: false },
68
- { operationId: 'getAgent', method: 'get', path: '/agents/{id}', tag: 'Agents', scope: null, sdk: 'agents.retrieve', pathParams: ['id'], generated: false, holdable: false, experimental: false },
69
- { operationId: 'saveAgentDraft', method: 'put', path: '/agents/{id}/draft', tag: 'Agents', scope: null, sdk: 'agents.saveDraft', pathParams: ['id'], generated: false, holdable: false, experimental: false },
70
- { operationId: 'validateAgent', method: 'post', path: '/agents/{id}/validate', tag: 'Agents', scope: null, sdk: 'agents.validate', pathParams: ['id'], generated: false, holdable: false, experimental: false },
71
- { operationId: 'testAgent', method: 'post', path: '/agents/{id}/test', tag: 'Agents', scope: null, sdk: 'agents.test', pathParams: ['id'], generated: false, holdable: false, experimental: false },
72
- { operationId: 'publishAgent', method: 'post', path: '/agents/{id}/publish', tag: 'Agents', scope: null, sdk: 'agents.publish', pathParams: ['id'], generated: false, holdable: false, experimental: false },
73
- { operationId: 'driveAgentTest', method: 'post', path: '/cases/{id}/test/{action}', tag: 'Agents', scope: null, sdk: 'agents.driveTest', pathParams: ['id', 'action'], generated: false, holdable: false, experimental: false },
65
+ { operationId: 'listAgents', method: 'get', path: '/agents', tag: 'Agents', scope: 'operator:read', sdk: 'agents.list', pathParams: [], generated: false, holdable: false, experimental: false },
66
+ { operationId: 'createAgent', method: 'post', path: '/agents', tag: 'Agents', scope: 'operator:build', sdk: 'agents.create', pathParams: [], generated: false, holdable: false, experimental: false },
67
+ { operationId: 'draftAgent', method: 'post', path: '/agents/draft', tag: 'Agents', scope: 'operator:build', sdk: 'agents.draft', pathParams: [], generated: false, holdable: false, experimental: false },
68
+ { operationId: 'getAgent', method: 'get', path: '/agents/{id}', tag: 'Agents', scope: 'operator:read', sdk: 'agents.retrieve', pathParams: ['id'], generated: false, holdable: false, experimental: false },
69
+ { operationId: 'saveAgentDraft', method: 'put', path: '/agents/{id}/draft', tag: 'Agents', scope: 'operator:build', sdk: 'agents.saveDraft', pathParams: ['id'], generated: false, holdable: false, experimental: false },
70
+ { operationId: 'validateAgent', method: 'post', path: '/agents/{id}/validate', tag: 'Agents', scope: 'operator:build', sdk: 'agents.validate', pathParams: ['id'], generated: false, holdable: false, experimental: false },
71
+ { operationId: 'testAgent', method: 'post', path: '/agents/{id}/test', tag: 'Agents', scope: 'operator:build', sdk: 'agents.test', pathParams: ['id'], generated: false, holdable: false, experimental: false },
72
+ { operationId: 'archiveAgent', method: 'post', path: '/agents/{id}/archive', tag: 'Agents', scope: 'operator:build', sdk: 'agents.archive', pathParams: ['id'], generated: true, holdable: false, experimental: false },
73
+ { operationId: 'publishAgent', method: 'post', path: '/agents/{id}/publish', tag: 'Agents', scope: 'none', sdk: 'agents.publish', pathParams: ['id'], generated: false, holdable: false, experimental: false },
74
+ { operationId: 'driveAgentTest', method: 'post', path: '/cases/{id}/test/{action}', tag: 'Agents', scope: 'operator:build', sdk: 'agents.driveTest', pathParams: ['id', 'action'], generated: false, holdable: false, experimental: false },
74
75
  { operationId: 'listChatChannels', method: 'get', path: '/chat/channels', tag: 'Chat', scope: 'chat:read', sdk: 'chat.listChannels', pathParams: [], generated: false, holdable: false, experimental: false },
75
76
  { operationId: 'listChatConversations', method: 'get', path: '/chat/conversations', tag: 'Chat', scope: 'chat:read', sdk: 'chat.conversations.list', pathParams: [], generated: false, holdable: false, experimental: false },
76
77
  { operationId: 'startChatConversation', method: 'post', path: '/chat/conversations', tag: 'Chat', scope: 'chat:write', sdk: 'chat.conversations.start', pathParams: [], generated: false, holdable: true, experimental: false },
@@ -79,7 +80,7 @@ exports.OPERATIONS = [
79
80
  { operationId: 'sendChatMessage', method: 'post', path: '/chat/conversations/{id}/messages', tag: 'Chat', scope: 'chat:write', sdk: 'chat.conversations.send', pathParams: ['id'], generated: false, holdable: true, experimental: false },
80
81
  { operationId: 'listChatContacts', method: 'get', path: '/chat/contacts', tag: 'Chat', scope: 'chat:read', sdk: 'chat.contacts.list', pathParams: [], generated: false, holdable: false, experimental: false },
81
82
  { operationId: 'getChatContact', method: 'get', path: '/chat/contacts/{id}', tag: 'Chat', scope: 'chat:read', sdk: 'chat.contacts.retrieve', pathParams: ['id'], generated: false, holdable: false, experimental: false },
82
- { operationId: 'updateChatContact', method: 'patch', path: '/chat/contacts/{id}', tag: 'Chat', scope: 'chat:write', sdk: 'chat.contacts.update', pathParams: ['id'], generated: false, holdable: false, experimental: false },
83
+ { operationId: 'updateChatContact', method: 'patch', path: '/chat/contacts/{id}', tag: 'Chat', scope: 'chat:write', sdk: 'chat.contacts.update', pathParams: ['id'], generated: false, holdable: true, experimental: false },
83
84
  { operationId: 'listWebhookEndpoints', method: 'get', path: '/webhook_endpoints', tag: 'Webhooks', scope: 'admin:webhooks', sdk: 'webhooks.listEndpoints', pathParams: [], generated: true, holdable: false, experimental: false },
84
85
  { operationId: 'createWebhookEndpoint', method: 'post', path: '/webhook_endpoints', tag: 'Webhooks', scope: 'admin:webhooks', sdk: 'webhooks.createEndpoint', pathParams: [], generated: true, holdable: false, experimental: false },
85
86
  { operationId: 'getWebhookEndpoint', method: 'get', path: '/webhook_endpoints/{id}', tag: 'Webhooks', scope: 'admin:webhooks', sdk: 'webhooks.getEndpoint', pathParams: ['id'], generated: true, holdable: false, experimental: false },
@@ -91,25 +92,26 @@ exports.OPERATIONS = [
91
92
  { operationId: 'listOrganizationMembers', method: 'get', path: '/organization/members', tag: 'Admin', scope: 'admin:read', sdk: 'organization.listMembers', pathParams: [], generated: true, holdable: false, experimental: false },
92
93
  { operationId: 'listOrganizationIntegrations', method: 'get', path: '/organization/integrations', tag: 'Admin', scope: 'admin:read', sdk: 'organization.listIntegrations', pathParams: [], generated: true, holdable: false, experimental: false },
93
94
  { operationId: 'listOrganizationApiKeys', method: 'get', path: '/organization/api_keys', tag: 'Admin', scope: 'admin:read', sdk: 'organization.listApiKeys', pathParams: [], generated: true, holdable: false, experimental: false },
94
- { operationId: 'generateFinn', method: 'post', path: '/finns/generate', tag: 'Finns', scope: null, sdk: 'finns.generate', pathParams: [], generated: true, holdable: false, experimental: false },
95
- { operationId: 'getFinnFlow', method: 'get', path: '/finns/{finn_id}/flow', tag: 'Finns', scope: null, sdk: 'finns.getFlow', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
96
- { operationId: 'enableFinnFlow', method: 'post', path: '/finns/{finn_id}/flow/enable', tag: 'Finns', scope: null, sdk: 'finns.enableFlow', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
97
- { operationId: 'disableFinnFlow', method: 'post', path: '/finns/{finn_id}/flow/disable', tag: 'Finns', scope: null, sdk: 'finns.disableFlow', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
98
- { operationId: 'getFinnSettings', method: 'get', path: '/finns/{finn_id}/settings', tag: 'Finns', scope: null, sdk: 'finns.getSettings', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
99
- { operationId: 'getFinnVariables', method: 'get', path: '/finns/{finn_id}/variables', tag: 'Finns', scope: null, sdk: 'finns.getVariables', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
100
- { operationId: 'updateFinnVariables', method: 'patch', path: '/finns/{finn_id}/variables', tag: 'Finns', scope: null, sdk: 'finns.updateVariables', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
101
- { operationId: 'updateFinnHandbook', method: 'patch', path: '/finns/{finn_id}/handbook', tag: 'Finns', scope: null, sdk: 'finns.updateHandbook', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
102
- { operationId: 'updateFinnSpeechSettings', method: 'patch', path: '/finns/{finn_id}/speech_settings', tag: 'Finns', scope: null, sdk: 'finns.updateSpeechSettings', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
103
- { operationId: 'updateFinnDraft', method: 'patch', path: '/finns/{finn_id}/draft', tag: 'Finns', scope: null, sdk: 'finns.updateDraft', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
104
- { operationId: 'duplicateFinn', method: 'post', path: '/finns/{finn_id}/duplicate', tag: 'Finns', scope: null, sdk: 'finns.duplicate', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
105
- { operationId: 'getFinnShareLink', method: 'get', path: '/finns/{finn_id}/share_link', tag: 'Finns', scope: null, sdk: 'finns.getShareLink', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
106
- { operationId: 'createFinnShareLink', method: 'post', path: '/finns/{finn_id}/share_link', tag: 'Finns', scope: null, sdk: 'finns.createShareLink', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
107
- { operationId: 'getFinnStats', method: 'get', path: '/finns/{finn_id}/stats', tag: 'Finns', scope: null, sdk: 'finns.getStats', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
108
- { operationId: 'getFinnOutcomes', method: 'get', path: '/finns/{finn_id}/outcomes', tag: 'Finns', scope: null, sdk: 'finns.getOutcomes', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
95
+ { operationId: 'getUsage', method: 'get', path: '/usage', tag: 'Admin', scope: 'admin:read', sdk: 'organization.getUsage', pathParams: [], generated: true, holdable: false, experimental: false },
96
+ { operationId: 'generateFinn', method: 'post', path: '/finns/generate', tag: 'Finns', scope: 'finn:write', sdk: 'finns.generate', pathParams: [], generated: true, holdable: false, experimental: false },
97
+ { operationId: 'getFinnFlow', method: 'get', path: '/finns/{finn_id}/flow', tag: 'Finns', scope: 'finn:read', sdk: 'finns.getFlow', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
98
+ { operationId: 'enableFinnFlow', method: 'post', path: '/finns/{finn_id}/flow/enable', tag: 'Finns', scope: 'finn:write', sdk: 'finns.enableFlow', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
99
+ { operationId: 'disableFinnFlow', method: 'post', path: '/finns/{finn_id}/flow/disable', tag: 'Finns', scope: 'finn:write', sdk: 'finns.disableFlow', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
100
+ { operationId: 'getFinnSettings', method: 'get', path: '/finns/{finn_id}/settings', tag: 'Finns', scope: 'finn:read', sdk: 'finns.getSettings', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
101
+ { operationId: 'getFinnVariables', method: 'get', path: '/finns/{finn_id}/variables', tag: 'Finns', scope: 'finn:read', sdk: 'finns.getVariables', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
102
+ { operationId: 'updateFinnVariables', method: 'patch', path: '/finns/{finn_id}/variables', tag: 'Finns', scope: 'finn:write', sdk: 'finns.updateVariables', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
103
+ { operationId: 'updateFinnHandbook', method: 'patch', path: '/finns/{finn_id}/handbook', tag: 'Finns', scope: 'finn:write', sdk: 'finns.updateHandbook', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
104
+ { operationId: 'updateFinnSpeechSettings', method: 'patch', path: '/finns/{finn_id}/speech_settings', tag: 'Finns', scope: 'finn:write', sdk: 'finns.updateSpeechSettings', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
105
+ { operationId: 'updateFinnDraft', method: 'patch', path: '/finns/{finn_id}/draft', tag: 'Finns', scope: 'finn:write', sdk: 'finns.updateDraft', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
106
+ { operationId: 'duplicateFinn', method: 'post', path: '/finns/{finn_id}/duplicate', tag: 'Finns', scope: 'finn:write', sdk: 'finns.duplicate', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
107
+ { operationId: 'getFinnShareLink', method: 'get', path: '/finns/{finn_id}/share_link', tag: 'Finns', scope: 'finn:read', sdk: 'finns.getShareLink', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
108
+ { operationId: 'createFinnShareLink', method: 'post', path: '/finns/{finn_id}/share_link', tag: 'Finns', scope: 'finn:write', sdk: 'finns.createShareLink', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
109
+ { operationId: 'getFinnStats', method: 'get', path: '/finns/{finn_id}/stats', tag: 'Finns', scope: 'finn:read', sdk: 'finns.getStats', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
110
+ { operationId: 'getFinnOutcomes', method: 'get', path: '/finns/{finn_id}/outcomes', tag: 'Finns', scope: 'finn:read', sdk: 'finns.getOutcomes', pathParams: ['finn_id'], generated: true, holdable: false, experimental: false },
109
111
  { operationId: 'listSalesPlays', method: 'get', path: '/sales/plays', tag: 'Sales', scope: 'sales:read', sdk: 'sales.listPlays', pathParams: [], generated: true, holdable: false, experimental: true },
110
112
  { operationId: 'listSalesPlayRuns', method: 'get', path: '/sales/plays/{slug}/runs', tag: 'Sales', scope: 'sales:read', sdk: 'sales.listPlayRuns', pathParams: ['slug'], generated: true, holdable: false, experimental: true },
111
113
  { operationId: 'listSalesProspects', method: 'get', path: '/sales/plays/{slug}/prospects', tag: 'Sales', scope: 'sales:read', sdk: 'sales.listProspects', pathParams: ['slug'], generated: true, holdable: false, experimental: true },
112
- { operationId: 'runSalesPlay', method: 'post', path: '/sales/plays/{slug}/run', tag: 'Sales', scope: 'sales:write', sdk: 'sales.runPlay', pathParams: ['slug'], generated: true, holdable: false, experimental: true },
114
+ { operationId: 'runSalesPlay', method: 'post', path: '/sales/plays/{slug}/run', tag: 'Sales', scope: 'sales:write', sdk: 'sales.runPlay', pathParams: ['slug'], generated: true, holdable: true, experimental: true },
113
115
  { operationId: 'listSalesDrafts', method: 'get', path: '/sales/drafts', tag: 'Sales', scope: 'sales:read', sdk: 'sales.listDrafts', pathParams: [], generated: true, holdable: false, experimental: true },
114
116
  { operationId: 'updateSalesDraft', method: 'patch', path: '/sales/drafts/{id}', tag: 'Sales', scope: 'sales:write', sdk: 'sales.updateDraft', pathParams: ['id'], generated: true, holdable: false, experimental: true },
115
117
  { operationId: 'skipSalesDraft', method: 'post', path: '/sales/drafts/{id}/skip', tag: 'Sales', scope: 'sales:write', sdk: 'sales.skipDraft', pathParams: ['id'], generated: true, holdable: false, experimental: true },
@@ -162,4 +164,13 @@ exports.OPERATIONS = [
162
164
  { operationId: 'createCrmUploadLink', method: 'post', path: '/crm/records/{id}/upload_links', tag: 'CRM', scope: 'crm:share', sdk: 'crm.createUploadLink', pathParams: ['id'], generated: true, holdable: true, experimental: false },
163
165
  { operationId: 'guessCrmImportColumns', method: 'post', path: '/crm/imports/columns', tag: 'CRM', scope: 'crm:import', sdk: 'crm.guessImportColumns', pathParams: [], generated: true, holdable: false, experimental: false },
164
166
  { operationId: 'importCrmRecords', method: 'post', path: '/crm/imports', tag: 'CRM', scope: 'crm:import', sdk: 'crm.importRecords', pathParams: [], generated: true, holdable: true, experimental: false },
167
+ { operationId: 'testWebhookEndpoint', method: 'post', path: '/webhook_endpoints/{id}/test', tag: 'Webhooks', scope: 'admin:webhooks', sdk: 'webhooks.testEndpoint', pathParams: ['id'], generated: true, holdable: false, experimental: false },
168
+ { operationId: 'redeliverWebhookDelivery', method: 'post', path: '/webhook_endpoints/{id}/deliveries/{delivery_id}/redeliver', tag: 'Webhooks', scope: 'admin:webhooks', sdk: 'webhooks.redeliverDelivery', pathParams: ['id', 'delivery_id'], generated: true, holdable: false, experimental: false },
169
+ { operationId: 'rotateWebhookEndpointSecret', method: 'post', path: '/webhook_endpoints/{id}/rotate_secret', tag: 'Webhooks', scope: 'admin:webhooks', sdk: 'webhooks.rotateEndpointSecret', pathParams: ['id'], generated: true, holdable: false, experimental: false },
170
+ { operationId: 'markDialerFollowUpDone', method: 'post', path: '/dialer/follow-ups/{call_id}/done', tag: 'Dialer', scope: 'dialer:write', sdk: 'dialer.markFollowUpDone', pathParams: ['call_id'], generated: true, holdable: false, experimental: false },
171
+ { operationId: 'setDialerCallDisposition', method: 'put', path: '/dialer/calls/{call_id}/disposition', tag: 'Dialer', scope: 'dialer:write', sdk: 'dialer.setCallDisposition', pathParams: ['call_id'], generated: true, holdable: false, experimental: false },
172
+ { operationId: 'addDialerCallNote', method: 'post', path: '/dialer/calls/{call_id}/notes', tag: 'Dialer', scope: 'dialer:write', sdk: 'dialer.addCallNote', pathParams: ['call_id'], generated: true, holdable: false, experimental: false },
173
+ { operationId: 'getChatAgent', method: 'get', path: '/chat/agents/{agent_id}', tag: 'Chat', scope: 'chat:read', sdk: 'chat.getAgent', pathParams: ['agent_id'], generated: true, holdable: false, experimental: false },
174
+ { operationId: 'updateChatAgent', method: 'patch', path: '/chat/agents/{agent_id}', tag: 'Chat', scope: 'chat:write', sdk: 'chat.updateAgent', pathParams: ['agent_id'], generated: true, holdable: true, experimental: false },
175
+ { operationId: 'testChatAgent', method: 'post', path: '/chat/agents/{agent_id}/test_turn', tag: 'Chat', scope: 'chat:write', sdk: 'chat.testAgent', pathParams: ['agent_id'], generated: true, holdable: false, experimental: false },
165
176
  ];
@@ -17,7 +17,7 @@ export declare abstract class CallsGenerated extends Resource {
17
17
  export declare abstract class FinnsGenerated extends Resource {
18
18
  /**
19
19
  * Draft a Finn with AI.
20
- * `POST /finns/generate`, operationId `generateFinn`.
20
+ * `POST /finns/generate`, operationId `generateFinn`, scope `finn:write`.
21
21
  */
22
22
  generate(body: B<'/finns/generate', 'post'>, options?: RequestOptions): Promise<{
23
23
  success: true;
@@ -25,7 +25,7 @@ export declare abstract class FinnsGenerated extends Resource {
25
25
  }>;
26
26
  /**
27
27
  * Read a Finn's call flow.
28
- * `GET /finns/{finn_id}/flow`, operationId `getFinnFlow`.
28
+ * `GET /finns/{finn_id}/flow`, operationId `getFinnFlow`, scope `finn:read`.
29
29
  */
30
30
  getFlow(finnId: Id, options?: RequestOptions): Promise<{
31
31
  success: true;
@@ -33,7 +33,7 @@ export declare abstract class FinnsGenerated extends Resource {
33
33
  }>;
34
34
  /**
35
35
  * Turn a Finn's call flow on.
36
- * `POST /finns/{finn_id}/flow/enable`, operationId `enableFinnFlow`.
36
+ * `POST /finns/{finn_id}/flow/enable`, operationId `enableFinnFlow`, scope `finn:write`.
37
37
  */
38
38
  enableFlow(finnId: Id, options?: RequestOptions): Promise<{
39
39
  success: true;
@@ -41,7 +41,7 @@ export declare abstract class FinnsGenerated extends Resource {
41
41
  }>;
42
42
  /**
43
43
  * Turn a Finn's call flow off.
44
- * `POST /finns/{finn_id}/flow/disable`, operationId `disableFinnFlow`.
44
+ * `POST /finns/{finn_id}/flow/disable`, operationId `disableFinnFlow`, scope `finn:write`.
45
45
  */
46
46
  disableFlow(finnId: Id, options?: RequestOptions): Promise<{
47
47
  success: true;
@@ -49,7 +49,7 @@ export declare abstract class FinnsGenerated extends Resource {
49
49
  }>;
50
50
  /**
51
51
  * Read a Finn's settings.
52
- * `GET /finns/{finn_id}/settings`, operationId `getFinnSettings`.
52
+ * `GET /finns/{finn_id}/settings`, operationId `getFinnSettings`, scope `finn:read`.
53
53
  */
54
54
  getSettings(finnId: Id, options?: RequestOptions): Promise<{
55
55
  success: true;
@@ -57,7 +57,7 @@ export declare abstract class FinnsGenerated extends Resource {
57
57
  }>;
58
58
  /**
59
59
  * Read a Finn's variables.
60
- * `GET /finns/{finn_id}/variables`, operationId `getFinnVariables`.
60
+ * `GET /finns/{finn_id}/variables`, operationId `getFinnVariables`, scope `finn:read`.
61
61
  */
62
62
  getVariables(finnId: Id, options?: RequestOptions): Promise<{
63
63
  success: true;
@@ -65,7 +65,7 @@ export declare abstract class FinnsGenerated extends Resource {
65
65
  }>;
66
66
  /**
67
67
  * Edit a Finn's variables.
68
- * `PATCH /finns/{finn_id}/variables`, operationId `updateFinnVariables`.
68
+ * `PATCH /finns/{finn_id}/variables`, operationId `updateFinnVariables`, scope `finn:write`.
69
69
  */
70
70
  updateVariables(finnId: Id, body: B<'/finns/{finn_id}/variables', 'patch'>, options?: RequestOptions): Promise<{
71
71
  success: true;
@@ -73,7 +73,7 @@ export declare abstract class FinnsGenerated extends Resource {
73
73
  }>;
74
74
  /**
75
75
  * Edit a Finn's agent handbook.
76
- * `PATCH /finns/{finn_id}/handbook`, operationId `updateFinnHandbook`.
76
+ * `PATCH /finns/{finn_id}/handbook`, operationId `updateFinnHandbook`, scope `finn:write`.
77
77
  */
78
78
  updateHandbook(finnId: Id, body: B<'/finns/{finn_id}/handbook', 'patch'>, options?: RequestOptions): Promise<{
79
79
  success: true;
@@ -85,7 +85,7 @@ export declare abstract class FinnsGenerated extends Resource {
85
85
  }>;
86
86
  /**
87
87
  * Edit a Finn's speech settings.
88
- * `PATCH /finns/{finn_id}/speech_settings`, operationId `updateFinnSpeechSettings`.
88
+ * `PATCH /finns/{finn_id}/speech_settings`, operationId `updateFinnSpeechSettings`, scope `finn:write`.
89
89
  */
90
90
  updateSpeechSettings(finnId: Id, body: B<'/finns/{finn_id}/speech_settings', 'patch'>, options?: RequestOptions): Promise<{
91
91
  success: true;
@@ -98,7 +98,7 @@ export declare abstract class FinnsGenerated extends Resource {
98
98
  }>;
99
99
  /**
100
100
  * Edit a draft Finn.
101
- * `PATCH /finns/{finn_id}/draft`, operationId `updateFinnDraft`.
101
+ * `PATCH /finns/{finn_id}/draft`, operationId `updateFinnDraft`, scope `finn:write`.
102
102
  */
103
103
  updateDraft(finnId: Id, body: B<'/finns/{finn_id}/draft', 'patch'>, options?: RequestOptions): Promise<{
104
104
  success: true;
@@ -106,7 +106,7 @@ export declare abstract class FinnsGenerated extends Resource {
106
106
  }>;
107
107
  /**
108
108
  * Copy a Finn.
109
- * `POST /finns/{finn_id}/duplicate`, operationId `duplicateFinn`.
109
+ * `POST /finns/{finn_id}/duplicate`, operationId `duplicateFinn`, scope `finn:write`.
110
110
  */
111
111
  duplicate(finnId: Id, body: B<'/finns/{finn_id}/duplicate', 'post'>, options?: RequestOptions): Promise<{
112
112
  success: true;
@@ -114,7 +114,7 @@ export declare abstract class FinnsGenerated extends Resource {
114
114
  }>;
115
115
  /**
116
116
  * Read a Finn's share link.
117
- * `GET /finns/{finn_id}/share_link`, operationId `getFinnShareLink`.
117
+ * `GET /finns/{finn_id}/share_link`, operationId `getFinnShareLink`, scope `finn:read`.
118
118
  */
119
119
  getShareLink(finnId: Id, options?: RequestOptions): Promise<{
120
120
  success: true;
@@ -122,7 +122,7 @@ export declare abstract class FinnsGenerated extends Resource {
122
122
  }>;
123
123
  /**
124
124
  * Get or make a Finn's share link.
125
- * `POST /finns/{finn_id}/share_link`, operationId `createFinnShareLink`.
125
+ * `POST /finns/{finn_id}/share_link`, operationId `createFinnShareLink`, scope `finn:write`.
126
126
  */
127
127
  createShareLink(finnId: Id, options?: RequestOptions): Promise<{
128
128
  success: true;
@@ -133,7 +133,7 @@ export declare abstract class FinnsGenerated extends Resource {
133
133
  }>;
134
134
  /**
135
135
  * A Finn's call stats.
136
- * `GET /finns/{finn_id}/stats`, operationId `getFinnStats`.
136
+ * `GET /finns/{finn_id}/stats`, operationId `getFinnStats`, scope `finn:read`.
137
137
  */
138
138
  getStats(finnId: Id, query?: Q<'/finns/{finn_id}/stats', 'get'>, options?: RequestOptions): Promise<{
139
139
  success: true;
@@ -143,7 +143,7 @@ export declare abstract class FinnsGenerated extends Resource {
143
143
  }>;
144
144
  /**
145
145
  * Summarize a Finn's call outcomes.
146
- * `GET /finns/{finn_id}/outcomes`, operationId `getFinnOutcomes`.
146
+ * `GET /finns/{finn_id}/outcomes`, operationId `getFinnOutcomes`, scope `finn:read`.
147
147
  */
148
148
  getOutcomes(finnId: Id, query?: Q<'/finns/{finn_id}/outcomes', 'get'>, options?: RequestOptions): Promise<{
149
149
  success: true;
@@ -201,11 +201,40 @@ export declare abstract class ApprovalsGenerated extends Resource {
201
201
  * Generated methods for the Agents tag; `Agents` in src/resources.ts adds the hand-written ones.
202
202
  */
203
203
  export declare abstract class AgentsGenerated extends Resource {
204
+ /**
205
+ * Archive an agent.
206
+ * `POST /agents/{id}/archive`, operationId `archiveAgent`, scope `operator:build`.
207
+ */
208
+ archive(id: Id, options?: RequestOptions): Promise<{
209
+ [key: string]: unknown;
210
+ }>;
204
211
  }
205
212
  /**
206
213
  * Generated methods for the Chat tag; `Chat` in src/resources.ts adds the hand-written ones.
207
214
  */
208
215
  export declare abstract class ChatGenerated extends Resource {
216
+ /**
217
+ * Get a chat agent's settings.
218
+ * `GET /chat/agents/{agent_id}`, operationId `getChatAgent`, scope `chat:read`.
219
+ */
220
+ getAgent(agentId: Id, options?: RequestOptions): Promise<{
221
+ [key: string]: unknown;
222
+ }>;
223
+ /**
224
+ * Change a chat agent's settings.
225
+ * `PATCH /chat/agents/{agent_id}`, operationId `updateChatAgent`, scope `chat:write`.
226
+ * May answer `pending_approval` (see isPendingApproval).
227
+ */
228
+ updateAgent(agentId: Id, body: B<'/chat/agents/{agent_id}', 'patch'>, options?: RequestOptions): Promise<{
229
+ [key: string]: unknown;
230
+ } | import("../types.js").PendingApproval>;
231
+ /**
232
+ * Test a chat agent.
233
+ * `POST /chat/agents/{agent_id}/test_turn`, operationId `testChatAgent`, scope `chat:write`.
234
+ */
235
+ testAgent(agentId: Id, body: B<'/chat/agents/{agent_id}/test_turn', 'post'>, options?: RequestOptions): Promise<{
236
+ [key: string]: unknown;
237
+ }>;
209
238
  }
210
239
  /**
211
240
  * CRM: records, stages, forms, documents, follow-ups, views and imports (`/crm`). Reached as `finn.crm`.
@@ -484,8 +513,6 @@ export declare class Crm extends Resource {
484
513
  */
485
514
  moveRecordStage(id: Id, body: B<'/crm/records/{id}/stage_moves', 'post'>, options?: RequestOptions): Promise<{
486
515
  [key: string]: unknown;
487
- } | {
488
- [key: string]: unknown;
489
516
  } | import("../types.js").PendingApproval>;
490
517
  /**
491
518
  * Submit a form.
@@ -494,8 +521,6 @@ export declare class Crm extends Resource {
494
521
  */
495
522
  submitForm(id: Id, formId: Id, body: B<'/crm/records/{id}/forms/{form_id}/submissions', 'post'>, options?: RequestOptions): Promise<{
496
523
  [key: string]: unknown;
497
- } | {
498
- [key: string]: unknown;
499
524
  } | import("../types.js").PendingApproval>;
500
525
  /**
501
526
  * Share a form link.
@@ -504,8 +529,6 @@ export declare class Crm extends Resource {
504
529
  */
505
530
  createFormLink(id: Id, formId: Id, body: B<'/crm/records/{id}/forms/{form_id}/links', 'post'>, options?: RequestOptions): Promise<{
506
531
  [key: string]: unknown;
507
- } | {
508
- [key: string]: unknown;
509
532
  } | import("../types.js").PendingApproval>;
510
533
  /**
511
534
  * Share an upload link.
@@ -514,8 +537,6 @@ export declare class Crm extends Resource {
514
537
  */
515
538
  createUploadLink(id: Id, body: B<'/crm/records/{id}/upload_links', 'post'>, options?: RequestOptions): Promise<{
516
539
  [key: string]: unknown;
517
- } | {
518
- [key: string]: unknown;
519
540
  } | import("../types.js").PendingApproval>;
520
541
  /**
521
542
  * Map import columns.
@@ -531,8 +552,6 @@ export declare class Crm extends Resource {
531
552
  */
532
553
  importRecords(body: B<'/crm/imports', 'post'>, options?: RequestOptions): Promise<{
533
554
  [key: string]: unknown;
534
- } | {
535
- [key: string]: unknown;
536
555
  } | import("../types.js").PendingApproval>;
537
556
  }
538
557
  /**
@@ -586,6 +605,27 @@ export declare class Dialer extends Resource {
586
605
  getLeadBrief(id: Id, query?: Q<'/dialer/leads/{id}/brief', 'get'>, options?: RequestOptions): Promise<{
587
606
  [key: string]: unknown;
588
607
  }>;
608
+ /**
609
+ * Mark a dialer follow-up done.
610
+ * `POST /dialer/follow-ups/{call_id}/done`, operationId `markDialerFollowUpDone`, scope `dialer:write`.
611
+ */
612
+ markFollowUpDone(callId: Id, options?: RequestOptions): Promise<{
613
+ [key: string]: unknown;
614
+ }>;
615
+ /**
616
+ * Set a finished call's disposition.
617
+ * `PUT /dialer/calls/{call_id}/disposition`, operationId `setDialerCallDisposition`, scope `dialer:write`.
618
+ */
619
+ setCallDisposition(callId: Id, body: B<'/dialer/calls/{call_id}/disposition', 'put'>, options?: RequestOptions): Promise<{
620
+ [key: string]: unknown;
621
+ }>;
622
+ /**
623
+ * Add a note to a finished call.
624
+ * `POST /dialer/calls/{call_id}/notes`, operationId `addDialerCallNote`, scope `dialer:write`.
625
+ */
626
+ addCallNote(callId: Id, body: B<'/dialer/calls/{call_id}/notes', 'post'>, options?: RequestOptions): Promise<{
627
+ [key: string]: unknown;
628
+ }>;
589
629
  }
590
630
  /**
591
631
  * Webhook endpoints, their deliveries, and the event types (`/webhook_endpoints`, `/events`). Reached as `finn.webhooks`.
@@ -689,6 +729,7 @@ export declare class Webhooks extends Resource {
689
729
  event: "call.completed" | "contact.created" | "contact.assigned" | "contact.stage_changed" | "contact.substatus_changed" | "contact.section_row_added" | "contact.link_changed" | "lead.created" | "lead.status_changed" | "document.status_changed" | "contact.updated" | "case.created" | "case.completed" | "approval.requested";
690
730
  event_id: string | null;
691
731
  call_uuid: string | null;
732
+ redelivery_of: string | null;
692
733
  status: "pending" | "delivered" | "failed";
693
734
  attempts: number;
694
735
  response_status: number | null;
@@ -698,7 +739,7 @@ export declare class Webhooks extends Resource {
698
739
  next_attempt_at: string | null;
699
740
  }, unknown>;
700
741
  /**
701
- * List webhook events.
742
+ * List webhook event types.
702
743
  * `GET /events`, operationId `listEventTypes`, scope `admin:webhooks`.
703
744
  */
704
745
  listEventTypes(options?: RequestOptions): Promise<{
@@ -706,6 +747,58 @@ export declare class Webhooks extends Resource {
706
747
  next_cursor: null;
707
748
  has_more: false;
708
749
  }>;
750
+ /**
751
+ * Send a test event.
752
+ * `POST /webhook_endpoints/{id}/test`, operationId `testWebhookEndpoint`, scope `admin:webhooks`.
753
+ */
754
+ testEndpoint(id: Id, options?: RequestOptions): Promise<{
755
+ object: "webhook_test";
756
+ endpoint_id: string;
757
+ event: "webhook.test";
758
+ delivered: boolean;
759
+ response_status: number | null;
760
+ error: string | null;
761
+ duration_ms: number;
762
+ }>;
763
+ /**
764
+ * Redeliver an event.
765
+ * `POST /webhook_endpoints/{id}/deliveries/{delivery_id}/redeliver`, operationId `redeliverWebhookDelivery`, scope `admin:webhooks`.
766
+ */
767
+ redeliverDelivery(id: Id, deliveryId: Id, options?: RequestOptions): Promise<{
768
+ id: string;
769
+ object: "webhook_delivery";
770
+ endpoint_id: string;
771
+ event: "call.completed" | "contact.created" | "contact.assigned" | "contact.stage_changed" | "contact.substatus_changed" | "contact.section_row_added" | "contact.link_changed" | "lead.created" | "lead.status_changed" | "document.status_changed" | "contact.updated" | "case.created" | "case.completed" | "approval.requested";
772
+ event_id: string | null;
773
+ call_uuid: string | null;
774
+ redelivery_of: string | null;
775
+ status: "pending" | "delivered" | "failed";
776
+ attempts: number;
777
+ response_status: number | null;
778
+ error: string | null;
779
+ created_at: string;
780
+ delivered_at: string | null;
781
+ next_attempt_at: string | null;
782
+ }>;
783
+ /**
784
+ * Rotate the signing secret.
785
+ * `POST /webhook_endpoints/{id}/rotate_secret`, operationId `rotateWebhookEndpointSecret`, scope `admin:webhooks`.
786
+ */
787
+ rotateEndpointSecret(id: Id, options?: RequestOptions): Promise<{
788
+ id: string;
789
+ object: "webhook_endpoint";
790
+ url: string;
791
+ events: ("call.completed" | "contact.created" | "contact.assigned" | "contact.stage_changed" | "contact.substatus_changed" | "contact.section_row_added" | "contact.link_changed" | "lead.created" | "lead.status_changed" | "document.status_changed" | "contact.updated" | "case.created" | "case.completed" | "approval.requested")[];
792
+ enabled: boolean;
793
+ created_at: string;
794
+ updated_at: string;
795
+ last_success_at: string | null;
796
+ last_failure_at: string | null;
797
+ failure_count: number;
798
+ } & {
799
+ secret: string | null;
800
+ previous_secret_expires_at: string;
801
+ }>;
709
802
  }
710
803
  /**
711
804
  * The organization, its members, integrations and API keys (read only). Reached as `finn.organization`.
@@ -778,7 +871,76 @@ export declare class Organization extends Resource {
778
871
  last_used_at: string | null;
779
872
  revoked_at: string | null;
780
873
  expires_at: string | null;
874
+ expiring_soon: boolean;
781
875
  }, unknown>;
876
+ /**
877
+ * Get API usage by key and day.
878
+ * `GET /usage`, operationId `getUsage`, scope `admin:read`.
879
+ */
880
+ getUsage(query?: Q<'/usage', 'get'>, options?: RequestOptions): Promise<{
881
+ data: {
882
+ from: string;
883
+ to: string;
884
+ group_by: "day";
885
+ timezone: "UTC";
886
+ credentials: {
887
+ credential_id: string;
888
+ credential_kind: "org_key" | "mcp_key" | "oauth_token" | null;
889
+ channel: string | null;
890
+ name: string | null;
891
+ totals: {
892
+ calls: {
893
+ read: number;
894
+ write: number;
895
+ refused: number;
896
+ };
897
+ holds_created: number;
898
+ };
899
+ days: {
900
+ date: string;
901
+ calls: {
902
+ read: number;
903
+ write: number;
904
+ refused: number;
905
+ };
906
+ holds_created: number;
907
+ }[];
908
+ }[];
909
+ spend: {
910
+ scope: "organization";
911
+ totals: {
912
+ credits_spent: number;
913
+ credits_added: number;
914
+ transactions: number;
915
+ };
916
+ days: {
917
+ date: string;
918
+ credits_spent: number;
919
+ credits_added: number;
920
+ transactions: number;
921
+ }[];
922
+ };
923
+ limits: {
924
+ per_minute: {
925
+ read?: number;
926
+ write?: number;
927
+ credential_ceiling?: number | null;
928
+ };
929
+ daily_caps: {
930
+ [key: string]: {
931
+ cap?: number;
932
+ used_today?: number | null;
933
+ };
934
+ } | null;
935
+ };
936
+ coverage: {
937
+ reads?: string;
938
+ writes?: string;
939
+ holds?: string;
940
+ spend?: string;
941
+ };
942
+ };
943
+ }>;
782
944
  }
783
945
  /**
784
946
  * Sales plays, prospects, drafts and threads (`/sales`). Reached as `finn.sales`.
@@ -827,11 +989,12 @@ export declare class Sales extends Resource {
827
989
  /**
828
990
  * Run a play.
829
991
  * `POST /sales/plays/{slug}/run`, operationId `runSalesPlay`, scope `sales:write`.
992
+ * May answer `pending_approval` (see isPendingApproval).
830
993
  * @experimental The Sales API is switched off for every organization, so these calls answer an error until it is switched on for yours. Names and shapes may change without a major version.
831
994
  */
832
995
  runPlay(slug: string, options?: RequestOptions): Promise<{
833
996
  [key: string]: unknown;
834
- }>;
997
+ } | import("../types.js").PendingApproval>;
835
998
  /**
836
999
  * List drafts.
837
1000
  * `GET /sales/drafts`, operationId `listSalesDrafts`, scope `sales:read`.