@hirefinn/sdk 0.3.0 → 0.5.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 +34 -14
- package/dist/cjs/core.d.ts +16 -3
- package/dist/cjs/core.js +23 -6
- package/dist/cjs/errors.d.ts +1 -1
- package/dist/cjs/errors.js +11 -0
- package/dist/cjs/generated/openapi.d.ts +3258 -652
- package/dist/cjs/generated/operations.d.ts +2 -2
- package/dist/cjs/generated/operations.js +39 -28
- package/dist/cjs/generated/resources.d.ts +206 -27
- package/dist/cjs/generated/resources.js +95 -16
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/pagination.d.ts +3 -0
- package/dist/cjs/pagination.js +26 -5
- package/dist/cjs/resources.d.ts +17 -3
- package/dist/cjs/resources.js +7 -2
- package/dist/cjs/webhooks.d.ts +11 -1
- package/dist/esm/core.d.ts +16 -3
- package/dist/esm/core.js +22 -5
- package/dist/esm/errors.d.ts +1 -1
- package/dist/esm/errors.js +11 -0
- package/dist/esm/generated/openapi.d.ts +3258 -652
- package/dist/esm/generated/operations.d.ts +2 -2
- package/dist/esm/generated/operations.js +39 -28
- package/dist/esm/generated/resources.d.ts +206 -27
- package/dist/esm/generated/resources.js +95 -16
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/pagination.d.ts +3 -0
- package/dist/esm/pagination.js +25 -5
- package/dist/esm/resources.d.ts +17 -3
- package/dist/esm/resources.js +8 -3
- package/dist/esm/webhooks.d.ts +11 -1
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ export interface OperationInfo {
|
|
|
20
20
|
holdable: boolean;
|
|
21
21
|
experimental: boolean;
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
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}';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generated by scripts/generate.mjs from spec/openapi.json. Do not edit by hand: run `npm run generate`.
|
|
4
4
|
* Spec: Finn API v1 (OpenAPI 3.1.0)
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
6
|
+
/** 165 operations. */
|
|
7
7
|
export const OPERATIONS = [
|
|
8
8
|
{ operationId: 'listCalls', method: 'get', path: '/calls', tag: 'Calls', scope: 'voice:read', sdk: 'calls.list', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
9
9
|
{ operationId: 'createCall', method: 'post', path: '/calls', tag: 'Calls', scope: 'voice:write', sdk: 'calls.create', pathParams: [], generated: false, holdable: true, experimental: false },
|
|
@@ -31,7 +31,7 @@ export const OPERATIONS = [
|
|
|
31
31
|
{ 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 },
|
|
32
32
|
{ operationId: 'listDeployments', method: 'get', path: '/deployments', tag: 'Deployments', scope: 'voice:read', sdk: 'deployments.list', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
33
33
|
{ operationId: 'createOutboundDeployment', method: 'post', path: '/deployments', tag: 'Deployments', scope: 'voice:write', sdk: 'deployments.createOutbound', pathParams: [], generated: false, holdable: true, experimental: false },
|
|
34
|
-
{ operationId: 'createInboundDeployment', method: 'post', path: '/deployments/inbound', tag: 'Deployments', scope: 'voice:write', sdk: 'deployments.createInbound', pathParams: [], generated: false, holdable:
|
|
34
|
+
{ operationId: 'createInboundDeployment', method: 'post', path: '/deployments/inbound', tag: 'Deployments', scope: 'voice:write', sdk: 'deployments.createInbound', pathParams: [], generated: false, holdable: true, experimental: false },
|
|
35
35
|
{ operationId: 'retrieveDeployment', method: 'get', path: '/deployments/{id}', tag: 'Deployments', scope: 'voice:read', sdk: 'deployments.retrieve', pathParams: ['id'], generated: false, holdable: false, experimental: false },
|
|
36
36
|
{ operationId: 'stopDeployment', method: 'post', path: '/deployments/{id}/stop', tag: 'Deployments', scope: 'voice:write', sdk: 'deployments.stop', pathParams: ['id'], generated: false, holdable: false, experimental: false },
|
|
37
37
|
{ 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 },
|
|
@@ -59,15 +59,16 @@ export const OPERATIONS = [
|
|
|
59
59
|
{ operationId: 'decideApproval', method: 'post', path: '/approvals/{id}/decide', tag: 'Approvals', scope: 'approvals:write', sdk: 'approvals.decide', pathParams: ['id'], generated: false, holdable: false, experimental: false },
|
|
60
60
|
{ operationId: 'approveApproval', method: 'post', path: '/approvals/{id}/approve', tag: 'Approvals', scope: 'approvals:write', sdk: 'approvals.approve', pathParams: ['id'], generated: false, holdable: false, experimental: false },
|
|
61
61
|
{ operationId: 'rejectApproval', method: 'post', path: '/approvals/{id}/reject', tag: 'Approvals', scope: 'approvals:write', sdk: 'approvals.reject', pathParams: ['id'], generated: false, holdable: false, experimental: false },
|
|
62
|
-
{ operationId: 'listAgents', method: 'get', path: '/agents', tag: 'Agents', scope:
|
|
63
|
-
{ operationId: 'createAgent', method: 'post', path: '/agents', tag: 'Agents', scope:
|
|
64
|
-
{ operationId: 'draftAgent', method: 'post', path: '/agents/draft', tag: 'Agents', scope:
|
|
65
|
-
{ operationId: 'getAgent', method: 'get', path: '/agents/{id}', tag: 'Agents', scope:
|
|
66
|
-
{ operationId: 'saveAgentDraft', method: 'put', path: '/agents/{id}/draft', tag: 'Agents', scope:
|
|
67
|
-
{ operationId: 'validateAgent', method: 'post', path: '/agents/{id}/validate', tag: 'Agents', scope:
|
|
68
|
-
{ operationId: 'testAgent', method: 'post', path: '/agents/{id}/test', tag: 'Agents', scope:
|
|
69
|
-
{ operationId: '
|
|
70
|
-
{ operationId: '
|
|
62
|
+
{ operationId: 'listAgents', method: 'get', path: '/agents', tag: 'Agents', scope: 'operator:read', sdk: 'agents.list', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
63
|
+
{ operationId: 'createAgent', method: 'post', path: '/agents', tag: 'Agents', scope: 'operator:build', sdk: 'agents.create', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
64
|
+
{ operationId: 'draftAgent', method: 'post', path: '/agents/draft', tag: 'Agents', scope: 'operator:build', sdk: 'agents.draft', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
65
|
+
{ operationId: 'getAgent', method: 'get', path: '/agents/{id}', tag: 'Agents', scope: 'operator:read', sdk: 'agents.retrieve', pathParams: ['id'], generated: false, holdable: false, experimental: false },
|
|
66
|
+
{ operationId: 'saveAgentDraft', method: 'put', path: '/agents/{id}/draft', tag: 'Agents', scope: 'operator:build', sdk: 'agents.saveDraft', pathParams: ['id'], generated: false, holdable: false, experimental: false },
|
|
67
|
+
{ operationId: 'validateAgent', method: 'post', path: '/agents/{id}/validate', tag: 'Agents', scope: 'operator:build', sdk: 'agents.validate', pathParams: ['id'], generated: false, holdable: false, experimental: false },
|
|
68
|
+
{ operationId: 'testAgent', method: 'post', path: '/agents/{id}/test', tag: 'Agents', scope: 'operator:build', sdk: 'agents.test', pathParams: ['id'], generated: false, holdable: false, experimental: false },
|
|
69
|
+
{ operationId: 'archiveAgent', method: 'post', path: '/agents/{id}/archive', tag: 'Agents', scope: 'operator:build', sdk: 'agents.archive', pathParams: ['id'], generated: true, holdable: false, experimental: false },
|
|
70
|
+
{ operationId: 'publishAgent', method: 'post', path: '/agents/{id}/publish', tag: 'Agents', scope: 'none', sdk: 'agents.publish', pathParams: ['id'], generated: false, holdable: false, experimental: false },
|
|
71
|
+
{ 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 },
|
|
71
72
|
{ operationId: 'listChatChannels', method: 'get', path: '/chat/channels', tag: 'Chat', scope: 'chat:read', sdk: 'chat.listChannels', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
72
73
|
{ operationId: 'listChatConversations', method: 'get', path: '/chat/conversations', tag: 'Chat', scope: 'chat:read', sdk: 'chat.conversations.list', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
73
74
|
{ operationId: 'startChatConversation', method: 'post', path: '/chat/conversations', tag: 'Chat', scope: 'chat:write', sdk: 'chat.conversations.start', pathParams: [], generated: false, holdable: true, experimental: false },
|
|
@@ -76,7 +77,7 @@ export const OPERATIONS = [
|
|
|
76
77
|
{ 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 },
|
|
77
78
|
{ operationId: 'listChatContacts', method: 'get', path: '/chat/contacts', tag: 'Chat', scope: 'chat:read', sdk: 'chat.contacts.list', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
78
79
|
{ 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 },
|
|
79
|
-
{ operationId: 'updateChatContact', method: 'patch', path: '/chat/contacts/{id}', tag: 'Chat', scope: 'chat:write', sdk: 'chat.contacts.update', pathParams: ['id'], generated: false, holdable:
|
|
80
|
+
{ 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 },
|
|
80
81
|
{ operationId: 'listWebhookEndpoints', method: 'get', path: '/webhook_endpoints', tag: 'Webhooks', scope: 'admin:webhooks', sdk: 'webhooks.listEndpoints', pathParams: [], generated: true, holdable: false, experimental: false },
|
|
81
82
|
{ operationId: 'createWebhookEndpoint', method: 'post', path: '/webhook_endpoints', tag: 'Webhooks', scope: 'admin:webhooks', sdk: 'webhooks.createEndpoint', pathParams: [], generated: true, holdable: false, experimental: false },
|
|
82
83
|
{ operationId: 'getWebhookEndpoint', method: 'get', path: '/webhook_endpoints/{id}', tag: 'Webhooks', scope: 'admin:webhooks', sdk: 'webhooks.getEndpoint', pathParams: ['id'], generated: true, holdable: false, experimental: false },
|
|
@@ -88,25 +89,26 @@ export const OPERATIONS = [
|
|
|
88
89
|
{ operationId: 'listOrganizationMembers', method: 'get', path: '/organization/members', tag: 'Admin', scope: 'admin:read', sdk: 'organization.listMembers', pathParams: [], generated: true, holdable: false, experimental: false },
|
|
89
90
|
{ operationId: 'listOrganizationIntegrations', method: 'get', path: '/organization/integrations', tag: 'Admin', scope: 'admin:read', sdk: 'organization.listIntegrations', pathParams: [], generated: true, holdable: false, experimental: false },
|
|
90
91
|
{ operationId: 'listOrganizationApiKeys', method: 'get', path: '/organization/api_keys', tag: 'Admin', scope: 'admin:read', sdk: 'organization.listApiKeys', pathParams: [], generated: true, holdable: false, experimental: false },
|
|
91
|
-
{ operationId: '
|
|
92
|
-
{ operationId: '
|
|
93
|
-
{ operationId: '
|
|
94
|
-
{ operationId: '
|
|
95
|
-
{ operationId: '
|
|
96
|
-
{ operationId: '
|
|
97
|
-
{ operationId: '
|
|
98
|
-
{ operationId: '
|
|
99
|
-
{ operationId: '
|
|
100
|
-
{ operationId: '
|
|
101
|
-
{ operationId: '
|
|
102
|
-
{ operationId: '
|
|
103
|
-
{ operationId: '
|
|
104
|
-
{ operationId: '
|
|
105
|
-
{ operationId: '
|
|
92
|
+
{ operationId: 'getUsage', method: 'get', path: '/usage', tag: 'Admin', scope: 'admin:read', sdk: 'organization.getUsage', pathParams: [], generated: true, holdable: false, experimental: false },
|
|
93
|
+
{ operationId: 'generateFinn', method: 'post', path: '/finns/generate', tag: 'Finns', scope: 'finn:write', sdk: 'finns.generate', pathParams: [], generated: true, holdable: false, experimental: false },
|
|
94
|
+
{ 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 },
|
|
95
|
+
{ 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 },
|
|
96
|
+
{ 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 },
|
|
97
|
+
{ 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 },
|
|
98
|
+
{ 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 },
|
|
99
|
+
{ 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 },
|
|
100
|
+
{ 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 },
|
|
101
|
+
{ 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 },
|
|
102
|
+
{ 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 },
|
|
103
|
+
{ 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 },
|
|
104
|
+
{ 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 },
|
|
105
|
+
{ 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 },
|
|
106
|
+
{ 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 },
|
|
107
|
+
{ 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 },
|
|
106
108
|
{ operationId: 'listSalesPlays', method: 'get', path: '/sales/plays', tag: 'Sales', scope: 'sales:read', sdk: 'sales.listPlays', pathParams: [], generated: true, holdable: false, experimental: true },
|
|
107
109
|
{ 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 },
|
|
108
110
|
{ 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 },
|
|
109
|
-
{ operationId: 'runSalesPlay', method: 'post', path: '/sales/plays/{slug}/run', tag: 'Sales', scope: 'sales:write', sdk: 'sales.runPlay', pathParams: ['slug'], generated: true, holdable:
|
|
111
|
+
{ 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 },
|
|
110
112
|
{ operationId: 'listSalesDrafts', method: 'get', path: '/sales/drafts', tag: 'Sales', scope: 'sales:read', sdk: 'sales.listDrafts', pathParams: [], generated: true, holdable: false, experimental: true },
|
|
111
113
|
{ operationId: 'updateSalesDraft', method: 'patch', path: '/sales/drafts/{id}', tag: 'Sales', scope: 'sales:write', sdk: 'sales.updateDraft', pathParams: ['id'], generated: true, holdable: false, experimental: true },
|
|
112
114
|
{ 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 },
|
|
@@ -159,4 +161,13 @@ export const OPERATIONS = [
|
|
|
159
161
|
{ 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 },
|
|
160
162
|
{ operationId: 'guessCrmImportColumns', method: 'post', path: '/crm/imports/columns', tag: 'CRM', scope: 'crm:import', sdk: 'crm.guessImportColumns', pathParams: [], generated: true, holdable: false, experimental: false },
|
|
161
163
|
{ operationId: 'importCrmRecords', method: 'post', path: '/crm/imports', tag: 'CRM', scope: 'crm:import', sdk: 'crm.importRecords', pathParams: [], generated: true, holdable: true, experimental: false },
|
|
164
|
+
{ 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 },
|
|
165
|
+
{ 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 },
|
|
166
|
+
{ 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 },
|
|
167
|
+
{ 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 },
|
|
168
|
+
{ 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 },
|
|
169
|
+
{ 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 },
|
|
170
|
+
{ 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 },
|
|
171
|
+
{ 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 },
|
|
172
|
+
{ 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 },
|
|
162
173
|
];
|
|
@@ -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`.
|
|
@@ -333,6 +362,22 @@ export declare class Crm extends Resource {
|
|
|
333
362
|
* `GET /crm/forms`, operationId `listCrmForms`, scope `crm:read`.
|
|
334
363
|
*/
|
|
335
364
|
listForms(options?: RequestOptions): Promise<{
|
|
365
|
+
forms?: ({
|
|
366
|
+
id?: string;
|
|
367
|
+
name?: string;
|
|
368
|
+
status?: "draft" | "live" | "closed";
|
|
369
|
+
audience?: "public" | "links" | "staff";
|
|
370
|
+
url?: string | null;
|
|
371
|
+
responses?: number;
|
|
372
|
+
last_response_at?: string | null;
|
|
373
|
+
updated_at?: string;
|
|
374
|
+
staff_fill?: boolean;
|
|
375
|
+
discovery?: boolean;
|
|
376
|
+
} & {
|
|
377
|
+
[key: string]: unknown;
|
|
378
|
+
})[];
|
|
379
|
+
success?: boolean;
|
|
380
|
+
} & {
|
|
336
381
|
[key: string]: unknown;
|
|
337
382
|
}>;
|
|
338
383
|
/**
|
|
@@ -484,8 +529,6 @@ export declare class Crm extends Resource {
|
|
|
484
529
|
*/
|
|
485
530
|
moveRecordStage(id: Id, body: B<'/crm/records/{id}/stage_moves', 'post'>, options?: RequestOptions): Promise<{
|
|
486
531
|
[key: string]: unknown;
|
|
487
|
-
} | {
|
|
488
|
-
[key: string]: unknown;
|
|
489
532
|
} | import("../types.js").PendingApproval>;
|
|
490
533
|
/**
|
|
491
534
|
* Submit a form.
|
|
@@ -494,8 +537,6 @@ export declare class Crm extends Resource {
|
|
|
494
537
|
*/
|
|
495
538
|
submitForm(id: Id, formId: Id, body: B<'/crm/records/{id}/forms/{form_id}/submissions', 'post'>, options?: RequestOptions): Promise<{
|
|
496
539
|
[key: string]: unknown;
|
|
497
|
-
} | {
|
|
498
|
-
[key: string]: unknown;
|
|
499
540
|
} | import("../types.js").PendingApproval>;
|
|
500
541
|
/**
|
|
501
542
|
* Share a form link.
|
|
@@ -504,8 +545,6 @@ export declare class Crm extends Resource {
|
|
|
504
545
|
*/
|
|
505
546
|
createFormLink(id: Id, formId: Id, body: B<'/crm/records/{id}/forms/{form_id}/links', 'post'>, options?: RequestOptions): Promise<{
|
|
506
547
|
[key: string]: unknown;
|
|
507
|
-
} | {
|
|
508
|
-
[key: string]: unknown;
|
|
509
548
|
} | import("../types.js").PendingApproval>;
|
|
510
549
|
/**
|
|
511
550
|
* Share an upload link.
|
|
@@ -514,8 +553,6 @@ export declare class Crm extends Resource {
|
|
|
514
553
|
*/
|
|
515
554
|
createUploadLink(id: Id, body: B<'/crm/records/{id}/upload_links', 'post'>, options?: RequestOptions): Promise<{
|
|
516
555
|
[key: string]: unknown;
|
|
517
|
-
} | {
|
|
518
|
-
[key: string]: unknown;
|
|
519
556
|
} | import("../types.js").PendingApproval>;
|
|
520
557
|
/**
|
|
521
558
|
* Map import columns.
|
|
@@ -531,8 +568,6 @@ export declare class Crm extends Resource {
|
|
|
531
568
|
*/
|
|
532
569
|
importRecords(body: B<'/crm/imports', 'post'>, options?: RequestOptions): Promise<{
|
|
533
570
|
[key: string]: unknown;
|
|
534
|
-
} | {
|
|
535
|
-
[key: string]: unknown;
|
|
536
571
|
} | import("../types.js").PendingApproval>;
|
|
537
572
|
}
|
|
538
573
|
/**
|
|
@@ -586,6 +621,27 @@ export declare class Dialer extends Resource {
|
|
|
586
621
|
getLeadBrief(id: Id, query?: Q<'/dialer/leads/{id}/brief', 'get'>, options?: RequestOptions): Promise<{
|
|
587
622
|
[key: string]: unknown;
|
|
588
623
|
}>;
|
|
624
|
+
/**
|
|
625
|
+
* Mark a dialer follow-up done.
|
|
626
|
+
* `POST /dialer/follow-ups/{call_id}/done`, operationId `markDialerFollowUpDone`, scope `dialer:write`.
|
|
627
|
+
*/
|
|
628
|
+
markFollowUpDone(callId: Id, options?: RequestOptions): Promise<{
|
|
629
|
+
[key: string]: unknown;
|
|
630
|
+
}>;
|
|
631
|
+
/**
|
|
632
|
+
* Set a finished call's disposition.
|
|
633
|
+
* `PUT /dialer/calls/{call_id}/disposition`, operationId `setDialerCallDisposition`, scope `dialer:write`.
|
|
634
|
+
*/
|
|
635
|
+
setCallDisposition(callId: Id, body: B<'/dialer/calls/{call_id}/disposition', 'put'>, options?: RequestOptions): Promise<{
|
|
636
|
+
[key: string]: unknown;
|
|
637
|
+
}>;
|
|
638
|
+
/**
|
|
639
|
+
* Add a note to a finished call.
|
|
640
|
+
* `POST /dialer/calls/{call_id}/notes`, operationId `addDialerCallNote`, scope `dialer:write`.
|
|
641
|
+
*/
|
|
642
|
+
addCallNote(callId: Id, body: B<'/dialer/calls/{call_id}/notes', 'post'>, options?: RequestOptions): Promise<{
|
|
643
|
+
[key: string]: unknown;
|
|
644
|
+
}>;
|
|
589
645
|
}
|
|
590
646
|
/**
|
|
591
647
|
* Webhook endpoints, their deliveries, and the event types (`/webhook_endpoints`, `/events`). Reached as `finn.webhooks`.
|
|
@@ -689,6 +745,7 @@ export declare class Webhooks extends Resource {
|
|
|
689
745
|
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
746
|
event_id: string | null;
|
|
691
747
|
call_uuid: string | null;
|
|
748
|
+
redelivery_of: string | null;
|
|
692
749
|
status: "pending" | "delivered" | "failed";
|
|
693
750
|
attempts: number;
|
|
694
751
|
response_status: number | null;
|
|
@@ -698,7 +755,7 @@ export declare class Webhooks extends Resource {
|
|
|
698
755
|
next_attempt_at: string | null;
|
|
699
756
|
}, unknown>;
|
|
700
757
|
/**
|
|
701
|
-
* List webhook
|
|
758
|
+
* List webhook event types.
|
|
702
759
|
* `GET /events`, operationId `listEventTypes`, scope `admin:webhooks`.
|
|
703
760
|
*/
|
|
704
761
|
listEventTypes(options?: RequestOptions): Promise<{
|
|
@@ -706,6 +763,58 @@ export declare class Webhooks extends Resource {
|
|
|
706
763
|
next_cursor: null;
|
|
707
764
|
has_more: false;
|
|
708
765
|
}>;
|
|
766
|
+
/**
|
|
767
|
+
* Send a test event.
|
|
768
|
+
* `POST /webhook_endpoints/{id}/test`, operationId `testWebhookEndpoint`, scope `admin:webhooks`.
|
|
769
|
+
*/
|
|
770
|
+
testEndpoint(id: Id, options?: RequestOptions): Promise<{
|
|
771
|
+
object: "webhook_test";
|
|
772
|
+
endpoint_id: string;
|
|
773
|
+
event: "webhook.test";
|
|
774
|
+
delivered: boolean;
|
|
775
|
+
response_status: number | null;
|
|
776
|
+
error: string | null;
|
|
777
|
+
duration_ms: number;
|
|
778
|
+
}>;
|
|
779
|
+
/**
|
|
780
|
+
* Redeliver an event.
|
|
781
|
+
* `POST /webhook_endpoints/{id}/deliveries/{delivery_id}/redeliver`, operationId `redeliverWebhookDelivery`, scope `admin:webhooks`.
|
|
782
|
+
*/
|
|
783
|
+
redeliverDelivery(id: Id, deliveryId: Id, options?: RequestOptions): Promise<{
|
|
784
|
+
id: string;
|
|
785
|
+
object: "webhook_delivery";
|
|
786
|
+
endpoint_id: string;
|
|
787
|
+
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";
|
|
788
|
+
event_id: string | null;
|
|
789
|
+
call_uuid: string | null;
|
|
790
|
+
redelivery_of: string | null;
|
|
791
|
+
status: "pending" | "delivered" | "failed";
|
|
792
|
+
attempts: number;
|
|
793
|
+
response_status: number | null;
|
|
794
|
+
error: string | null;
|
|
795
|
+
created_at: string;
|
|
796
|
+
delivered_at: string | null;
|
|
797
|
+
next_attempt_at: string | null;
|
|
798
|
+
}>;
|
|
799
|
+
/**
|
|
800
|
+
* Rotate the signing secret.
|
|
801
|
+
* `POST /webhook_endpoints/{id}/rotate_secret`, operationId `rotateWebhookEndpointSecret`, scope `admin:webhooks`.
|
|
802
|
+
*/
|
|
803
|
+
rotateEndpointSecret(id: Id, options?: RequestOptions): Promise<{
|
|
804
|
+
id: string;
|
|
805
|
+
object: "webhook_endpoint";
|
|
806
|
+
url: string;
|
|
807
|
+
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")[];
|
|
808
|
+
enabled: boolean;
|
|
809
|
+
created_at: string;
|
|
810
|
+
updated_at: string;
|
|
811
|
+
last_success_at: string | null;
|
|
812
|
+
last_failure_at: string | null;
|
|
813
|
+
failure_count: number;
|
|
814
|
+
} & {
|
|
815
|
+
secret: string | null;
|
|
816
|
+
previous_secret_expires_at: string;
|
|
817
|
+
}>;
|
|
709
818
|
}
|
|
710
819
|
/**
|
|
711
820
|
* The organization, its members, integrations and API keys (read only). Reached as `finn.organization`.
|
|
@@ -778,7 +887,76 @@ export declare class Organization extends Resource {
|
|
|
778
887
|
last_used_at: string | null;
|
|
779
888
|
revoked_at: string | null;
|
|
780
889
|
expires_at: string | null;
|
|
890
|
+
expiring_soon: boolean;
|
|
781
891
|
}, unknown>;
|
|
892
|
+
/**
|
|
893
|
+
* Get API usage by key and day.
|
|
894
|
+
* `GET /usage`, operationId `getUsage`, scope `admin:read`.
|
|
895
|
+
*/
|
|
896
|
+
getUsage(query?: Q<'/usage', 'get'>, options?: RequestOptions): Promise<{
|
|
897
|
+
data: {
|
|
898
|
+
from: string;
|
|
899
|
+
to: string;
|
|
900
|
+
group_by: "day";
|
|
901
|
+
timezone: "UTC";
|
|
902
|
+
credentials: {
|
|
903
|
+
credential_id: string;
|
|
904
|
+
credential_kind: "org_key" | "mcp_key" | "oauth_token" | null;
|
|
905
|
+
channel: string | null;
|
|
906
|
+
name: string | null;
|
|
907
|
+
totals: {
|
|
908
|
+
calls: {
|
|
909
|
+
read: number;
|
|
910
|
+
write: number;
|
|
911
|
+
refused: number;
|
|
912
|
+
};
|
|
913
|
+
holds_created: number;
|
|
914
|
+
};
|
|
915
|
+
days: {
|
|
916
|
+
date: string;
|
|
917
|
+
calls: {
|
|
918
|
+
read: number;
|
|
919
|
+
write: number;
|
|
920
|
+
refused: number;
|
|
921
|
+
};
|
|
922
|
+
holds_created: number;
|
|
923
|
+
}[];
|
|
924
|
+
}[];
|
|
925
|
+
spend: {
|
|
926
|
+
scope: "organization";
|
|
927
|
+
totals: {
|
|
928
|
+
credits_spent: number;
|
|
929
|
+
credits_added: number;
|
|
930
|
+
transactions: number;
|
|
931
|
+
};
|
|
932
|
+
days: {
|
|
933
|
+
date: string;
|
|
934
|
+
credits_spent: number;
|
|
935
|
+
credits_added: number;
|
|
936
|
+
transactions: number;
|
|
937
|
+
}[];
|
|
938
|
+
};
|
|
939
|
+
limits: {
|
|
940
|
+
per_minute: {
|
|
941
|
+
read?: number;
|
|
942
|
+
write?: number;
|
|
943
|
+
credential_ceiling?: number | null;
|
|
944
|
+
};
|
|
945
|
+
daily_caps: {
|
|
946
|
+
[key: string]: {
|
|
947
|
+
cap?: number;
|
|
948
|
+
used_today?: number | null;
|
|
949
|
+
};
|
|
950
|
+
} | null;
|
|
951
|
+
};
|
|
952
|
+
coverage: {
|
|
953
|
+
reads?: string;
|
|
954
|
+
writes?: string;
|
|
955
|
+
holds?: string;
|
|
956
|
+
spend?: string;
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
}>;
|
|
782
960
|
}
|
|
783
961
|
/**
|
|
784
962
|
* Sales plays, prospects, drafts and threads (`/sales`). Reached as `finn.sales`.
|
|
@@ -827,11 +1005,12 @@ export declare class Sales extends Resource {
|
|
|
827
1005
|
/**
|
|
828
1006
|
* Run a play.
|
|
829
1007
|
* `POST /sales/plays/{slug}/run`, operationId `runSalesPlay`, scope `sales:write`.
|
|
1008
|
+
* May answer `pending_approval` (see isPendingApproval).
|
|
830
1009
|
* @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
1010
|
*/
|
|
832
1011
|
runPlay(slug: string, options?: RequestOptions): Promise<{
|
|
833
1012
|
[key: string]: unknown;
|
|
834
|
-
}>;
|
|
1013
|
+
} | import("../types.js").PendingApproval>;
|
|
835
1014
|
/**
|
|
836
1015
|
* List drafts.
|
|
837
1016
|
* `GET /sales/drafts`, operationId `listSalesDrafts`, scope `sales:read`.
|