@hirefinn/sdk 0.5.1 → 0.5.2
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 +22 -11
- package/dist/cjs/client.d.ts +16 -6
- package/dist/cjs/client.js +9 -6
- package/dist/cjs/core.d.ts +18 -6
- package/dist/cjs/core.js +23 -7
- package/dist/cjs/errors.d.ts +40 -2
- package/dist/cjs/errors.js +44 -1
- package/dist/cjs/generated/openapi.d.ts +6259 -6222
- package/dist/cjs/generated/operations.d.ts +1 -1
- package/dist/cjs/generated/operations.js +23 -23
- package/dist/cjs/generated/resources.d.ts +47 -47
- package/dist/cjs/generated/resources.js +48 -48
- package/dist/cjs/index.d.ts +7 -7
- package/dist/cjs/index.js +13 -1
- package/dist/cjs/resources.d.ts +25 -17
- package/dist/cjs/resources.js +23 -18
- package/dist/cjs/types.d.ts +2 -2
- package/dist/cjs/webhooks.d.ts +20 -2
- package/dist/cjs/webhooks.js +3 -1
- package/dist/esm/client.d.ts +16 -6
- package/dist/esm/client.js +9 -6
- package/dist/esm/core.d.ts +18 -6
- package/dist/esm/core.js +22 -6
- package/dist/esm/errors.d.ts +40 -2
- package/dist/esm/errors.js +41 -0
- package/dist/esm/generated/openapi.d.ts +6259 -6222
- package/dist/esm/generated/operations.d.ts +1 -1
- package/dist/esm/generated/operations.js +23 -23
- package/dist/esm/generated/resources.d.ts +47 -47
- package/dist/esm/generated/resources.js +46 -46
- package/dist/esm/index.d.ts +7 -7
- package/dist/esm/index.js +4 -4
- package/dist/esm/resources.d.ts +25 -17
- package/dist/esm/resources.js +22 -17
- package/dist/esm/types.d.ts +2 -2
- package/dist/esm/webhooks.d.ts +20 -2
- package/dist/esm/webhooks.js +2 -0
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ export interface OperationInfo {
|
|
|
11
11
|
tag: string;
|
|
12
12
|
/** `x-required-scope`, when the spec lists one. */
|
|
13
13
|
scope: string | null;
|
|
14
|
-
/** The SDK method, as a property path on the client: '
|
|
14
|
+
/** The SDK method, as a property path on the client: 'assistants.getFlow'. */
|
|
15
15
|
sdk: string;
|
|
16
16
|
pathParams: readonly string[];
|
|
17
17
|
/** False when a hand-written method in src/resources.ts covers it. */
|
|
@@ -8,13 +8,29 @@ 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 },
|
|
10
10
|
{ operationId: 'retrieveCall', method: 'get', path: '/calls/{call_uuid}', tag: 'Calls', scope: 'voice:read', sdk: 'calls.retrieve', pathParams: ['call_uuid'], generated: false, holdable: false, experimental: false },
|
|
11
|
-
{ operationId: '
|
|
12
|
-
{ operationId: '
|
|
13
|
-
{ operationId: '
|
|
14
|
-
{ operationId: '
|
|
15
|
-
{ operationId: '
|
|
16
|
-
{ operationId: 'listKnowledgeBase', method: 'get', path: '/
|
|
17
|
-
{ operationId: 'addKnowledgeBaseDocument', method: 'post', path: '/
|
|
11
|
+
{ operationId: 'listAssistants', method: 'get', path: '/assistants', tag: 'Assistants', scope: 'voice:read', sdk: 'assistants.list', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
12
|
+
{ operationId: 'createAssistant', method: 'post', path: '/assistants', tag: 'Assistants', scope: 'voice:write', sdk: 'assistants.create', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
13
|
+
{ operationId: 'retrieveAssistant', method: 'get', path: '/assistants/{assistant_id}', tag: 'Assistants', scope: 'voice:read', sdk: 'assistants.retrieve', pathParams: ['assistant_id'], generated: false, holdable: false, experimental: false },
|
|
14
|
+
{ operationId: 'updateAssistant', method: 'patch', path: '/assistants/{assistant_id}', tag: 'Assistants', scope: 'voice:write', sdk: 'assistants.update', pathParams: ['assistant_id'], generated: false, holdable: false, experimental: false },
|
|
15
|
+
{ operationId: 'deleteAssistant', method: 'delete', path: '/assistants/{assistant_id}', tag: 'Assistants', scope: 'voice:write', sdk: 'assistants.delete', pathParams: ['assistant_id'], generated: false, holdable: false, experimental: false },
|
|
16
|
+
{ operationId: 'listKnowledgeBase', method: 'get', path: '/assistants/{assistant_id}/knowledge_base', tag: 'Assistants', scope: 'voice:read', sdk: 'assistants.listKnowledgeBase', pathParams: ['assistant_id'], generated: false, holdable: false, experimental: false },
|
|
17
|
+
{ operationId: 'addKnowledgeBaseDocument', method: 'post', path: '/assistants/{assistant_id}/knowledge_base', tag: 'Assistants', scope: 'voice:write', sdk: 'assistants.addKnowledgeBaseDocument', pathParams: ['assistant_id'], generated: false, holdable: false, experimental: false },
|
|
18
|
+
{ operationId: 'getAssistantPostCallAnalysis', method: 'get', path: '/assistants/{assistant_id}/post_call_analysis', tag: 'Assistants', scope: 'voice:read', sdk: 'assistants.postCallAnalysis', pathParams: ['assistant_id'], generated: false, holdable: false, experimental: false },
|
|
19
|
+
{ operationId: 'generateAssistant', method: 'post', path: '/assistants/generate', tag: 'Assistants', scope: 'assistants:write', sdk: 'assistants.generate', pathParams: [], generated: true, holdable: false, experimental: false },
|
|
20
|
+
{ operationId: 'getAssistantFlow', method: 'get', path: '/assistants/{assistant_id}/flow', tag: 'Assistants', scope: 'assistants:read', sdk: 'assistants.getFlow', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
21
|
+
{ operationId: 'enableAssistantFlow', method: 'post', path: '/assistants/{assistant_id}/flow/enable', tag: 'Assistants', scope: 'assistants:write', sdk: 'assistants.enableFlow', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
22
|
+
{ operationId: 'disableAssistantFlow', method: 'post', path: '/assistants/{assistant_id}/flow/disable', tag: 'Assistants', scope: 'assistants:write', sdk: 'assistants.disableFlow', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
23
|
+
{ operationId: 'getAssistantSettings', method: 'get', path: '/assistants/{assistant_id}/settings', tag: 'Assistants', scope: 'assistants:read', sdk: 'assistants.getSettings', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
24
|
+
{ operationId: 'getAssistantVariables', method: 'get', path: '/assistants/{assistant_id}/variables', tag: 'Assistants', scope: 'assistants:read', sdk: 'assistants.getVariables', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
25
|
+
{ operationId: 'updateAssistantVariables', method: 'patch', path: '/assistants/{assistant_id}/variables', tag: 'Assistants', scope: 'assistants:write', sdk: 'assistants.updateVariables', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
26
|
+
{ operationId: 'updateAssistantHandbook', method: 'patch', path: '/assistants/{assistant_id}/handbook', tag: 'Assistants', scope: 'assistants:write', sdk: 'assistants.updateHandbook', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
27
|
+
{ operationId: 'updateAssistantSpeechSettings', method: 'patch', path: '/assistants/{assistant_id}/speech_settings', tag: 'Assistants', scope: 'assistants:write', sdk: 'assistants.updateSpeechSettings', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
28
|
+
{ operationId: 'updateAssistantDraft', method: 'patch', path: '/assistants/{assistant_id}/draft', tag: 'Assistants', scope: 'assistants:write', sdk: 'assistants.updateDraft', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
29
|
+
{ operationId: 'duplicateAssistant', method: 'post', path: '/assistants/{assistant_id}/duplicate', tag: 'Assistants', scope: 'assistants:write', sdk: 'assistants.duplicate', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
30
|
+
{ operationId: 'getAssistantShareLink', method: 'get', path: '/assistants/{assistant_id}/share_link', tag: 'Assistants', scope: 'assistants:read', sdk: 'assistants.getShareLink', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
31
|
+
{ operationId: 'createAssistantShareLink', method: 'post', path: '/assistants/{assistant_id}/share_link', tag: 'Assistants', scope: 'assistants:write', sdk: 'assistants.createShareLink', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
32
|
+
{ operationId: 'getAssistantStats', method: 'get', path: '/assistants/{assistant_id}/stats', tag: 'Assistants', scope: 'assistants:read', sdk: 'assistants.getStats', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
33
|
+
{ operationId: 'getAssistantOutcomes', method: 'get', path: '/assistants/{assistant_id}/outcomes', tag: 'Assistants', scope: 'assistants:read', sdk: 'assistants.getOutcomes', pathParams: ['assistant_id'], generated: true, holdable: false, experimental: false },
|
|
18
34
|
{ operationId: 'listVoices', method: 'get', path: '/voices', tag: 'Voices', scope: 'voice:read', sdk: 'voices.list', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
19
35
|
{ operationId: 'retrieveVoice', method: 'get', path: '/voices/{voice_id}', tag: 'Voices', scope: 'voice:read', sdk: 'voices.retrieve', pathParams: ['voice_id'], generated: false, holdable: false, experimental: false },
|
|
20
36
|
{ operationId: 'listPhoneNumbers', method: 'get', path: '/phone_numbers', tag: 'Phone numbers', scope: 'voice:read', sdk: 'phoneNumbers.list', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
@@ -38,7 +54,6 @@ export const OPERATIONS = [
|
|
|
38
54
|
{ operationId: 'retrieveWallet', method: 'get', path: '/wallet', tag: 'Wallet', scope: 'voice:read', sdk: 'wallet.retrieve', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
39
55
|
{ operationId: 'listWalletTransactions', method: 'get', path: '/wallet/transactions', tag: 'Wallet', scope: 'voice:read', sdk: 'wallet.listTransactions', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
40
56
|
{ operationId: 'getDeploymentAnalytics', method: 'get', path: '/deployments/{id}/analytics', tag: 'Deployments', scope: 'voice:read', sdk: 'deployments.analytics', pathParams: ['id'], generated: false, holdable: false, experimental: false },
|
|
41
|
-
{ operationId: 'getFinnPostCallAnalysis', method: 'get', path: '/finns/{finn_id}/post_call_analysis', tag: 'Finns', scope: 'voice:read', sdk: 'finns.postCallAnalysis', pathParams: ['finn_id'], generated: false, holdable: false, experimental: false },
|
|
42
57
|
{ operationId: 'listDoNotCall', method: 'get', path: '/do_not_call', tag: 'Do not call', scope: 'voice:read', sdk: 'doNotCall.list', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
43
58
|
{ operationId: 'addDoNotCall', method: 'post', path: '/do_not_call', tag: 'Do not call', scope: 'voice:write', sdk: 'doNotCall.add', pathParams: [], generated: false, holdable: false, experimental: false },
|
|
44
59
|
{ operationId: 'removeDoNotCall', method: 'delete', path: '/do_not_call/{phone}', tag: 'Do not call', scope: 'voice:dnc:write', sdk: 'doNotCall.remove', pathParams: ['phone'], generated: false, holdable: false, experimental: false },
|
|
@@ -90,21 +105,6 @@ export const OPERATIONS = [
|
|
|
90
105
|
{ operationId: 'listOrganizationIntegrations', method: 'get', path: '/organization/integrations', tag: 'Admin', scope: 'admin:read', sdk: 'organization.listIntegrations', pathParams: [], generated: true, holdable: false, experimental: false },
|
|
91
106
|
{ operationId: 'listOrganizationApiKeys', method: 'get', path: '/organization/api_keys', tag: 'Admin', scope: 'admin:read', sdk: 'organization.listApiKeys', pathParams: [], generated: true, holdable: false, experimental: false },
|
|
92
107
|
{ 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 },
|
|
108
108
|
{ operationId: 'listSalesPlays', method: 'get', path: '/sales/plays', tag: 'Sales', scope: 'sales:read', sdk: 'sales.listPlays', pathParams: [], generated: true, holdable: false, experimental: true },
|
|
109
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 },
|
|
110
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 },
|
|
@@ -12,85 +12,85 @@ import type { RequestOptions } from '../types.js';
|
|
|
12
12
|
export declare abstract class CallsGenerated extends Resource {
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Generated methods for the
|
|
15
|
+
* Generated methods for the Assistants tag; `Assistants` in src/resources.ts adds the hand-written ones.
|
|
16
16
|
*/
|
|
17
|
-
export declare abstract class
|
|
17
|
+
export declare abstract class AssistantsGenerated extends Resource {
|
|
18
18
|
/**
|
|
19
19
|
* Draft a Finn with AI.
|
|
20
|
-
* `POST /
|
|
20
|
+
* `POST /assistants/generate`, operationId `generateAssistant`, scope `assistants:write`.
|
|
21
21
|
*/
|
|
22
|
-
generate(body: B<'/
|
|
22
|
+
generate(body: B<'/assistants/generate', 'post'>, options?: RequestOptions): Promise<{
|
|
23
23
|
success: true;
|
|
24
|
-
data: import("./openapi.js").components["schemas"]["
|
|
24
|
+
data: import("./openapi.js").components["schemas"]["Assistant"];
|
|
25
25
|
}>;
|
|
26
26
|
/**
|
|
27
27
|
* Read a Finn's call flow.
|
|
28
|
-
* `GET /
|
|
28
|
+
* `GET /assistants/{assistant_id}/flow`, operationId `getAssistantFlow`, scope `assistants:read`.
|
|
29
29
|
*/
|
|
30
|
-
getFlow(
|
|
30
|
+
getFlow(assistantId: Id, options?: RequestOptions): Promise<{
|
|
31
31
|
success: true;
|
|
32
|
-
data: import("./openapi.js").components["schemas"]["
|
|
32
|
+
data: import("./openapi.js").components["schemas"]["AssistantFlow"];
|
|
33
33
|
}>;
|
|
34
34
|
/**
|
|
35
35
|
* Turn a Finn's call flow on.
|
|
36
|
-
* `POST /
|
|
36
|
+
* `POST /assistants/{assistant_id}/flow/enable`, operationId `enableAssistantFlow`, scope `assistants:write`.
|
|
37
37
|
*/
|
|
38
|
-
enableFlow(
|
|
38
|
+
enableFlow(assistantId: Id, options?: RequestOptions): Promise<{
|
|
39
39
|
success: true;
|
|
40
|
-
data: import("./openapi.js").components["schemas"]["
|
|
40
|
+
data: import("./openapi.js").components["schemas"]["AssistantFlow"];
|
|
41
41
|
}>;
|
|
42
42
|
/**
|
|
43
43
|
* Turn a Finn's call flow off.
|
|
44
|
-
* `POST /
|
|
44
|
+
* `POST /assistants/{assistant_id}/flow/disable`, operationId `disableAssistantFlow`, scope `assistants:write`.
|
|
45
45
|
*/
|
|
46
|
-
disableFlow(
|
|
46
|
+
disableFlow(assistantId: Id, options?: RequestOptions): Promise<{
|
|
47
47
|
success: true;
|
|
48
|
-
data: import("./openapi.js").components["schemas"]["
|
|
48
|
+
data: import("./openapi.js").components["schemas"]["AssistantFlow"];
|
|
49
49
|
}>;
|
|
50
50
|
/**
|
|
51
51
|
* Read a Finn's settings.
|
|
52
|
-
* `GET /
|
|
52
|
+
* `GET /assistants/{assistant_id}/settings`, operationId `getAssistantSettings`, scope `assistants:read`.
|
|
53
53
|
*/
|
|
54
|
-
getSettings(
|
|
54
|
+
getSettings(assistantId: Id, options?: RequestOptions): Promise<{
|
|
55
55
|
success: true;
|
|
56
|
-
data: import("./openapi.js").components["schemas"]["
|
|
56
|
+
data: import("./openapi.js").components["schemas"]["AssistantSettings"];
|
|
57
57
|
}>;
|
|
58
58
|
/**
|
|
59
59
|
* Read a Finn's variables.
|
|
60
|
-
* `GET /
|
|
60
|
+
* `GET /assistants/{assistant_id}/variables`, operationId `getAssistantVariables`, scope `assistants:read`.
|
|
61
61
|
*/
|
|
62
|
-
getVariables(
|
|
62
|
+
getVariables(assistantId: Id, options?: RequestOptions): Promise<{
|
|
63
63
|
success: true;
|
|
64
|
-
data: import("./openapi.js").components["schemas"]["
|
|
64
|
+
data: import("./openapi.js").components["schemas"]["AssistantVariables"];
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
67
67
|
* Edit a Finn's variables.
|
|
68
|
-
* `PATCH /
|
|
68
|
+
* `PATCH /assistants/{assistant_id}/variables`, operationId `updateAssistantVariables`, scope `assistants:write`.
|
|
69
69
|
*/
|
|
70
|
-
updateVariables(
|
|
70
|
+
updateVariables(assistantId: Id, body: B<'/assistants/{assistant_id}/variables', 'patch'>, options?: RequestOptions): Promise<{
|
|
71
71
|
success: true;
|
|
72
|
-
data: import("./openapi.js").components["schemas"]["
|
|
72
|
+
data: import("./openapi.js").components["schemas"]["AssistantVariables"];
|
|
73
73
|
}>;
|
|
74
74
|
/**
|
|
75
75
|
* Edit a Finn's agent handbook.
|
|
76
|
-
* `PATCH /
|
|
76
|
+
* `PATCH /assistants/{assistant_id}/handbook`, operationId `updateAssistantHandbook`, scope `assistants:write`.
|
|
77
77
|
*/
|
|
78
|
-
updateHandbook(
|
|
78
|
+
updateHandbook(assistantId: Id, body: B<'/assistants/{assistant_id}/handbook', 'patch'>, options?: RequestOptions): Promise<{
|
|
79
79
|
success: true;
|
|
80
80
|
data: {
|
|
81
|
-
finn?: import("./openapi.js").components["schemas"]["
|
|
82
|
-
handbook?: import("./openapi.js").components["schemas"]["
|
|
81
|
+
finn?: import("./openapi.js").components["schemas"]["AssistantSummary"];
|
|
82
|
+
handbook?: import("./openapi.js").components["schemas"]["AssistantHandbook"];
|
|
83
83
|
schema_version?: number;
|
|
84
84
|
};
|
|
85
85
|
}>;
|
|
86
86
|
/**
|
|
87
87
|
* Edit a Finn's speech settings.
|
|
88
|
-
* `PATCH /
|
|
88
|
+
* `PATCH /assistants/{assistant_id}/speech_settings`, operationId `updateAssistantSpeechSettings`, scope `assistants:write`.
|
|
89
89
|
*/
|
|
90
|
-
updateSpeechSettings(
|
|
90
|
+
updateSpeechSettings(assistantId: Id, body: B<'/assistants/{assistant_id}/speech_settings', 'patch'>, options?: RequestOptions): Promise<{
|
|
91
91
|
success: true;
|
|
92
92
|
data: {
|
|
93
|
-
finn?: import("./openapi.js").components["schemas"]["
|
|
93
|
+
finn?: import("./openapi.js").components["schemas"]["AssistantSummary"];
|
|
94
94
|
speech_settings?: {
|
|
95
95
|
[key: string]: unknown;
|
|
96
96
|
} | null;
|
|
@@ -98,44 +98,44 @@ export declare abstract class FinnsGenerated extends Resource {
|
|
|
98
98
|
}>;
|
|
99
99
|
/**
|
|
100
100
|
* Edit a draft Finn.
|
|
101
|
-
* `PATCH /
|
|
101
|
+
* `PATCH /assistants/{assistant_id}/draft`, operationId `updateAssistantDraft`, scope `assistants:write`.
|
|
102
102
|
*/
|
|
103
|
-
updateDraft(
|
|
103
|
+
updateDraft(assistantId: Id, body: B<'/assistants/{assistant_id}/draft', 'patch'>, options?: RequestOptions): Promise<{
|
|
104
104
|
success: true;
|
|
105
|
-
data: import("./openapi.js").components["schemas"]["
|
|
105
|
+
data: import("./openapi.js").components["schemas"]["Assistant"];
|
|
106
106
|
}>;
|
|
107
107
|
/**
|
|
108
108
|
* Copy a Finn.
|
|
109
|
-
* `POST /
|
|
109
|
+
* `POST /assistants/{assistant_id}/duplicate`, operationId `duplicateAssistant`, scope `assistants:write`.
|
|
110
110
|
*/
|
|
111
|
-
duplicate(
|
|
111
|
+
duplicate(assistantId: Id, body: B<'/assistants/{assistant_id}/duplicate', 'post'>, options?: RequestOptions): Promise<{
|
|
112
112
|
success: true;
|
|
113
|
-
data: import("./openapi.js").components["schemas"]["
|
|
113
|
+
data: import("./openapi.js").components["schemas"]["Assistant"];
|
|
114
114
|
}>;
|
|
115
115
|
/**
|
|
116
116
|
* Read a Finn's share link.
|
|
117
|
-
* `GET /
|
|
117
|
+
* `GET /assistants/{assistant_id}/share_link`, operationId `getAssistantShareLink`, scope `assistants:read`.
|
|
118
118
|
*/
|
|
119
|
-
getShareLink(
|
|
119
|
+
getShareLink(assistantId: Id, options?: RequestOptions): Promise<{
|
|
120
120
|
success: true;
|
|
121
|
-
data: import("./openapi.js").components["schemas"]["
|
|
121
|
+
data: import("./openapi.js").components["schemas"]["AssistantShareLink"] | null;
|
|
122
122
|
}>;
|
|
123
123
|
/**
|
|
124
124
|
* Get or make a Finn's share link.
|
|
125
|
-
* `POST /
|
|
125
|
+
* `POST /assistants/{assistant_id}/share_link`, operationId `createAssistantShareLink`, scope `assistants:write`.
|
|
126
126
|
*/
|
|
127
|
-
createShareLink(
|
|
127
|
+
createShareLink(assistantId: Id, options?: RequestOptions): Promise<{
|
|
128
128
|
success: true;
|
|
129
|
-
data: import("./openapi.js").components["schemas"]["
|
|
129
|
+
data: import("./openapi.js").components["schemas"]["AssistantShareLink"];
|
|
130
130
|
} | {
|
|
131
131
|
success: true;
|
|
132
|
-
data: import("./openapi.js").components["schemas"]["
|
|
132
|
+
data: import("./openapi.js").components["schemas"]["AssistantShareLink"];
|
|
133
133
|
}>;
|
|
134
134
|
/**
|
|
135
135
|
* A Finn's call stats.
|
|
136
|
-
* `GET /
|
|
136
|
+
* `GET /assistants/{assistant_id}/stats`, operationId `getAssistantStats`, scope `assistants:read`.
|
|
137
137
|
*/
|
|
138
|
-
getStats(
|
|
138
|
+
getStats(assistantId: Id, query?: Q<'/assistants/{assistant_id}/stats', 'get'>, options?: RequestOptions): Promise<{
|
|
139
139
|
success: true;
|
|
140
140
|
data: {
|
|
141
141
|
[key: string]: unknown;
|
|
@@ -143,9 +143,9 @@ export declare abstract class FinnsGenerated extends Resource {
|
|
|
143
143
|
}>;
|
|
144
144
|
/**
|
|
145
145
|
* Summarize a Finn's call outcomes.
|
|
146
|
-
* `GET /
|
|
146
|
+
* `GET /assistants/{assistant_id}/outcomes`, operationId `getAssistantOutcomes`, scope `assistants:read`.
|
|
147
147
|
*/
|
|
148
|
-
getOutcomes(
|
|
148
|
+
getOutcomes(assistantId: Id, query?: Q<'/assistants/{assistant_id}/outcomes', 'get'>, options?: RequestOptions): Promise<{
|
|
149
149
|
success: true;
|
|
150
150
|
data: {
|
|
151
151
|
[key: string]: unknown;
|
|
@@ -12,113 +12,113 @@ import { Resource } from '../resource.js';
|
|
|
12
12
|
export class CallsGenerated extends Resource {
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Generated methods for the
|
|
15
|
+
* Generated methods for the Assistants tag; `Assistants` in src/resources.ts adds the hand-written ones.
|
|
16
16
|
*/
|
|
17
|
-
export class
|
|
17
|
+
export class AssistantsGenerated extends Resource {
|
|
18
18
|
/**
|
|
19
19
|
* Draft a Finn with AI.
|
|
20
|
-
* `POST /
|
|
20
|
+
* `POST /assistants/generate`, operationId `generateAssistant`, scope `assistants:write`.
|
|
21
21
|
*/
|
|
22
22
|
generate(body, options) {
|
|
23
|
-
return this.do('post', '/
|
|
23
|
+
return this.do('post', '/assistants/generate', { body }, options);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Read a Finn's call flow.
|
|
27
|
-
* `GET /
|
|
27
|
+
* `GET /assistants/{assistant_id}/flow`, operationId `getAssistantFlow`, scope `assistants:read`.
|
|
28
28
|
*/
|
|
29
|
-
getFlow(
|
|
30
|
-
return this.do('get', '/
|
|
29
|
+
getFlow(assistantId, options) {
|
|
30
|
+
return this.do('get', '/assistants/{assistant_id}/flow', { path: { assistant_id: assistantId } }, options);
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Turn a Finn's call flow on.
|
|
34
|
-
* `POST /
|
|
34
|
+
* `POST /assistants/{assistant_id}/flow/enable`, operationId `enableAssistantFlow`, scope `assistants:write`.
|
|
35
35
|
*/
|
|
36
|
-
enableFlow(
|
|
37
|
-
return this.do('post', '/
|
|
36
|
+
enableFlow(assistantId, options) {
|
|
37
|
+
return this.do('post', '/assistants/{assistant_id}/flow/enable', { path: { assistant_id: assistantId } }, options);
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Turn a Finn's call flow off.
|
|
41
|
-
* `POST /
|
|
41
|
+
* `POST /assistants/{assistant_id}/flow/disable`, operationId `disableAssistantFlow`, scope `assistants:write`.
|
|
42
42
|
*/
|
|
43
|
-
disableFlow(
|
|
44
|
-
return this.do('post', '/
|
|
43
|
+
disableFlow(assistantId, options) {
|
|
44
|
+
return this.do('post', '/assistants/{assistant_id}/flow/disable', { path: { assistant_id: assistantId } }, options);
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* Read a Finn's settings.
|
|
48
|
-
* `GET /
|
|
48
|
+
* `GET /assistants/{assistant_id}/settings`, operationId `getAssistantSettings`, scope `assistants:read`.
|
|
49
49
|
*/
|
|
50
|
-
getSettings(
|
|
51
|
-
return this.do('get', '/
|
|
50
|
+
getSettings(assistantId, options) {
|
|
51
|
+
return this.do('get', '/assistants/{assistant_id}/settings', { path: { assistant_id: assistantId } }, options);
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Read a Finn's variables.
|
|
55
|
-
* `GET /
|
|
55
|
+
* `GET /assistants/{assistant_id}/variables`, operationId `getAssistantVariables`, scope `assistants:read`.
|
|
56
56
|
*/
|
|
57
|
-
getVariables(
|
|
58
|
-
return this.do('get', '/
|
|
57
|
+
getVariables(assistantId, options) {
|
|
58
|
+
return this.do('get', '/assistants/{assistant_id}/variables', { path: { assistant_id: assistantId } }, options);
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* Edit a Finn's variables.
|
|
62
|
-
* `PATCH /
|
|
62
|
+
* `PATCH /assistants/{assistant_id}/variables`, operationId `updateAssistantVariables`, scope `assistants:write`.
|
|
63
63
|
*/
|
|
64
|
-
updateVariables(
|
|
65
|
-
return this.do('patch', '/
|
|
64
|
+
updateVariables(assistantId, body, options) {
|
|
65
|
+
return this.do('patch', '/assistants/{assistant_id}/variables', { path: { assistant_id: assistantId }, body }, options);
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
68
|
* Edit a Finn's agent handbook.
|
|
69
|
-
* `PATCH /
|
|
69
|
+
* `PATCH /assistants/{assistant_id}/handbook`, operationId `updateAssistantHandbook`, scope `assistants:write`.
|
|
70
70
|
*/
|
|
71
|
-
updateHandbook(
|
|
72
|
-
return this.do('patch', '/
|
|
71
|
+
updateHandbook(assistantId, body, options) {
|
|
72
|
+
return this.do('patch', '/assistants/{assistant_id}/handbook', { path: { assistant_id: assistantId }, body }, options);
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
75
|
* Edit a Finn's speech settings.
|
|
76
|
-
* `PATCH /
|
|
76
|
+
* `PATCH /assistants/{assistant_id}/speech_settings`, operationId `updateAssistantSpeechSettings`, scope `assistants:write`.
|
|
77
77
|
*/
|
|
78
|
-
updateSpeechSettings(
|
|
79
|
-
return this.do('patch', '/
|
|
78
|
+
updateSpeechSettings(assistantId, body, options) {
|
|
79
|
+
return this.do('patch', '/assistants/{assistant_id}/speech_settings', { path: { assistant_id: assistantId }, body }, options);
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
82
|
* Edit a draft Finn.
|
|
83
|
-
* `PATCH /
|
|
83
|
+
* `PATCH /assistants/{assistant_id}/draft`, operationId `updateAssistantDraft`, scope `assistants:write`.
|
|
84
84
|
*/
|
|
85
|
-
updateDraft(
|
|
86
|
-
return this.do('patch', '/
|
|
85
|
+
updateDraft(assistantId, body, options) {
|
|
86
|
+
return this.do('patch', '/assistants/{assistant_id}/draft', { path: { assistant_id: assistantId }, body }, options);
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* Copy a Finn.
|
|
90
|
-
* `POST /
|
|
90
|
+
* `POST /assistants/{assistant_id}/duplicate`, operationId `duplicateAssistant`, scope `assistants:write`.
|
|
91
91
|
*/
|
|
92
|
-
duplicate(
|
|
93
|
-
return this.do('post', '/
|
|
92
|
+
duplicate(assistantId, body, options) {
|
|
93
|
+
return this.do('post', '/assistants/{assistant_id}/duplicate', { path: { assistant_id: assistantId }, body }, options);
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* Read a Finn's share link.
|
|
97
|
-
* `GET /
|
|
97
|
+
* `GET /assistants/{assistant_id}/share_link`, operationId `getAssistantShareLink`, scope `assistants:read`.
|
|
98
98
|
*/
|
|
99
|
-
getShareLink(
|
|
100
|
-
return this.do('get', '/
|
|
99
|
+
getShareLink(assistantId, options) {
|
|
100
|
+
return this.do('get', '/assistants/{assistant_id}/share_link', { path: { assistant_id: assistantId } }, options);
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* Get or make a Finn's share link.
|
|
104
|
-
* `POST /
|
|
104
|
+
* `POST /assistants/{assistant_id}/share_link`, operationId `createAssistantShareLink`, scope `assistants:write`.
|
|
105
105
|
*/
|
|
106
|
-
createShareLink(
|
|
107
|
-
return this.do('post', '/
|
|
106
|
+
createShareLink(assistantId, options) {
|
|
107
|
+
return this.do('post', '/assistants/{assistant_id}/share_link', { path: { assistant_id: assistantId } }, options);
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
110
|
* A Finn's call stats.
|
|
111
|
-
* `GET /
|
|
111
|
+
* `GET /assistants/{assistant_id}/stats`, operationId `getAssistantStats`, scope `assistants:read`.
|
|
112
112
|
*/
|
|
113
|
-
getStats(
|
|
114
|
-
return this.do('get', '/
|
|
113
|
+
getStats(assistantId, query, options) {
|
|
114
|
+
return this.do('get', '/assistants/{assistant_id}/stats', { path: { assistant_id: assistantId }, query }, options);
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
117
|
* Summarize a Finn's call outcomes.
|
|
118
|
-
* `GET /
|
|
118
|
+
* `GET /assistants/{assistant_id}/outcomes`, operationId `getAssistantOutcomes`, scope `assistants:read`.
|
|
119
119
|
*/
|
|
120
|
-
getOutcomes(
|
|
121
|
-
return this.do('get', '/
|
|
120
|
+
getOutcomes(assistantId, query, options) {
|
|
121
|
+
return this.do('get', '/assistants/{assistant_id}/outcomes', { path: { assistant_id: assistantId }, query }, options);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { Finn } from './client.js';
|
|
1
|
+
export { Finn, Client } from './client.js';
|
|
2
2
|
export { Finn as default } from './client.js';
|
|
3
|
-
export { FinnCore, DEFAULT_BASE_URL, SDK_VERSION, DEFAULT_FINN_VERSION, AUTO_IDEMPOTENCY_ROUTES, IDEMPOTENT_WRITE_ROUTES, honoursIdempotencyKey, idempotencyKey, DEFAULT_MAX_RETRY_WAIT_MS, } from './core.js';
|
|
4
|
-
export { verifyWebhook, signWebhookPayload, parseSignatureHeader, timingSafeEqual, FinnWebhookVerificationError, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_HEADERS, LEGACY_WEBHOOK_HEADERS, readWebhookHeader, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, } from './webhooks.js';
|
|
5
|
-
export type { VerifyWebhookOptions, WebhookEvent, WebhookHeaderKind } from './webhooks.js';
|
|
6
|
-
export type { FinnOptions, RawRequest } from './core.js';
|
|
7
|
-
export { FinnSdkError, FinnError, FinnConnectionError, FinnTimeoutError, FinnApprovalTimeoutError, codeForStatus, parseRetryAfterSeconds, } from './errors.js';
|
|
8
|
-
export type { FinnErrorCode, FinnFieldError } from './errors.js';
|
|
3
|
+
export { FinnCore, DEFAULT_BASE_URL, SDK_VERSION, DEFAULT_FINN_VERSION, DEFAULT_API_VERSION, RENAMED_REQUEST_HEADERS, AUTO_IDEMPOTENCY_ROUTES, IDEMPOTENT_WRITE_ROUTES, honoursIdempotencyKey, idempotencyKey, DEFAULT_MAX_RETRY_WAIT_MS, } from './core.js';
|
|
4
|
+
export { verifyWebhook, signWebhookPayload, parseSignatureHeader, timingSafeEqual, FinnWebhookVerificationError, WebhookVerificationError, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_HEADERS, LEGACY_WEBHOOK_HEADERS, readWebhookHeader, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, } from './webhooks.js';
|
|
5
|
+
export type { VerifyWebhookOptions, WebhookAgentFields, WebhookEvent, WebhookHeaderKind } from './webhooks.js';
|
|
6
|
+
export type { FinnOptions, FinnOptions as ClientOptions, RawRequest } from './core.js';
|
|
7
|
+
export { FinnSdkError, FinnError, FinnConnectionError, FinnTimeoutError, FinnApprovalTimeoutError, SdkError, ApiError, ApiConnectionError, ApiTimeoutError, ApprovalTimeoutError, RENAMED_ERROR_CODES, neutralErrorCode, legacyErrorCode, codeForStatus, parseRetryAfterSeconds, } from './errors.js';
|
|
8
|
+
export type { FinnErrorCode, FinnFieldError, ErrorCode, FieldError } from './errors.js';
|
|
9
9
|
export { isPendingApproval } from './approval.js';
|
|
10
10
|
export { Paginator, cursorStrategy, offsetStrategy, pageStrategy, beforeStrategy, afterStrategy } from './pagination.js';
|
|
11
11
|
export type { PageStrategy } from './pagination.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { Finn } from './client.js';
|
|
1
|
+
export { Finn, Client } from './client.js';
|
|
2
2
|
export { Finn as default } from './client.js';
|
|
3
|
-
export { FinnCore, DEFAULT_BASE_URL, SDK_VERSION, DEFAULT_FINN_VERSION, AUTO_IDEMPOTENCY_ROUTES, IDEMPOTENT_WRITE_ROUTES, honoursIdempotencyKey, idempotencyKey, DEFAULT_MAX_RETRY_WAIT_MS, } from './core.js';
|
|
4
|
-
export { verifyWebhook, signWebhookPayload, parseSignatureHeader, timingSafeEqual, FinnWebhookVerificationError, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_HEADERS, LEGACY_WEBHOOK_HEADERS, readWebhookHeader, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, } from './webhooks.js';
|
|
5
|
-
export { FinnSdkError, FinnError, FinnConnectionError, FinnTimeoutError, FinnApprovalTimeoutError, codeForStatus, parseRetryAfterSeconds, } from './errors.js';
|
|
3
|
+
export { FinnCore, DEFAULT_BASE_URL, SDK_VERSION, DEFAULT_FINN_VERSION, DEFAULT_API_VERSION, RENAMED_REQUEST_HEADERS, AUTO_IDEMPOTENCY_ROUTES, IDEMPOTENT_WRITE_ROUTES, honoursIdempotencyKey, idempotencyKey, DEFAULT_MAX_RETRY_WAIT_MS, } from './core.js';
|
|
4
|
+
export { verifyWebhook, signWebhookPayload, parseSignatureHeader, timingSafeEqual, FinnWebhookVerificationError, WebhookVerificationError, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_HEADERS, LEGACY_WEBHOOK_HEADERS, readWebhookHeader, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, } from './webhooks.js';
|
|
5
|
+
export { FinnSdkError, FinnError, FinnConnectionError, FinnTimeoutError, FinnApprovalTimeoutError, SdkError, ApiError, ApiConnectionError, ApiTimeoutError, ApprovalTimeoutError, RENAMED_ERROR_CODES, neutralErrorCode, legacyErrorCode, codeForStatus, parseRetryAfterSeconds, } from './errors.js';
|
|
6
6
|
export { isPendingApproval } from './approval.js';
|
|
7
7
|
export { Paginator, cursorStrategy, offsetStrategy, pageStrategy, beforeStrategy, afterStrategy } from './pagination.js';
|
|
8
8
|
export * from './resources.js';
|
package/dist/esm/resources.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import type { FinnCore } from './core.js';
|
|
8
8
|
import { Resource, type B, type Id, type Q } from './resource.js';
|
|
9
9
|
import type { ApprovalHold, RequestOptions, Schemas } from './types.js';
|
|
10
|
-
import { AgentsGenerated, ApprovalsGenerated, AudiencesGenerated, CallsGenerated, CasesGenerated, ChatGenerated, ContactsGenerated, DeploymentsGenerated, DoNotCallGenerated,
|
|
10
|
+
import { AgentsGenerated, ApprovalsGenerated, AssistantsGenerated, AudiencesGenerated, CallsGenerated, CasesGenerated, ChatGenerated, ContactsGenerated, DeploymentsGenerated, DoNotCallGenerated, PhoneNumbersGenerated, VoicesGenerated, WalletGenerated } from './generated/resources.js';
|
|
11
11
|
export { Crm, Dialer, Organization, Sales, Webhooks } from './generated/resources.js';
|
|
12
12
|
export declare class Calls extends CallsGenerated {
|
|
13
13
|
/** Place an outbound call. Gets an automatic Idempotency-Key. May answer `pending_approval` (see isPendingApproval). */
|
|
@@ -43,17 +43,19 @@ export declare class Calls extends CallsGenerated {
|
|
|
43
43
|
data: import("./types.js").components["schemas"]["Call"];
|
|
44
44
|
}>;
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
/** Assistants (voice agents): `/assistants`. Reached as `client.assistants` (and, deprecated, `client.finns`). */
|
|
47
|
+
export declare class Assistants extends AssistantsGenerated {
|
|
48
|
+
list(query?: Q<'/assistants', 'get'>, options?: RequestOptions): Promise<{
|
|
48
49
|
success: true;
|
|
49
|
-
data: import("./types.js").components["schemas"]["
|
|
50
|
+
data: import("./types.js").components["schemas"]["Assistant"][];
|
|
50
51
|
limit: number;
|
|
51
52
|
offset: number;
|
|
52
53
|
}>;
|
|
53
|
-
listAll(query?: Q<'/
|
|
54
|
+
listAll(query?: Q<'/assistants', 'get'>, options?: RequestOptions): import("./pagination.js").Paginator<{
|
|
54
55
|
id: string;
|
|
55
56
|
name: string;
|
|
56
57
|
status: string;
|
|
58
|
+
channel?: "voice" | "chat";
|
|
57
59
|
voice: string | null;
|
|
58
60
|
language: string | null;
|
|
59
61
|
language_group: string | null;
|
|
@@ -74,36 +76,42 @@ export declare class Finns extends FinnsGenerated {
|
|
|
74
76
|
created_at: string;
|
|
75
77
|
updated_at: string;
|
|
76
78
|
}, unknown>;
|
|
77
|
-
create(body: B<'/
|
|
79
|
+
create(body: B<'/assistants', 'post'>, options?: RequestOptions): Promise<{
|
|
78
80
|
success: true;
|
|
79
|
-
data: import("./types.js").components["schemas"]["
|
|
81
|
+
data: import("./types.js").components["schemas"]["Assistant"];
|
|
80
82
|
}>;
|
|
81
|
-
retrieve(
|
|
83
|
+
retrieve(assistantId: Id, options?: RequestOptions): Promise<{
|
|
82
84
|
success: true;
|
|
83
|
-
data: import("./types.js").components["schemas"]["
|
|
85
|
+
data: import("./types.js").components["schemas"]["Assistant"];
|
|
84
86
|
}>;
|
|
85
|
-
update(
|
|
87
|
+
update(assistantId: Id, body: B<'/assistants/{assistant_id}', 'patch'>, options?: RequestOptions): Promise<{
|
|
86
88
|
success: true;
|
|
87
|
-
data: import("./types.js").components["schemas"]["
|
|
89
|
+
data: import("./types.js").components["schemas"]["Assistant"];
|
|
88
90
|
}>;
|
|
89
|
-
delete(
|
|
91
|
+
delete(assistantId: Id, options?: RequestOptions): Promise<{
|
|
90
92
|
success: true;
|
|
91
|
-
data: import("./types.js").components["schemas"]["
|
|
93
|
+
data: import("./types.js").components["schemas"]["DeletedAssistant"];
|
|
92
94
|
}>;
|
|
93
|
-
listKnowledgeBase(
|
|
95
|
+
listKnowledgeBase(assistantId: Id, options?: RequestOptions): Promise<{
|
|
94
96
|
success: true;
|
|
95
97
|
data: import("./types.js").components["schemas"]["KnowledgeBaseDocument"][];
|
|
96
98
|
}>;
|
|
97
99
|
/** JSON body, or a FormData with the file for multipart upload. */
|
|
98
|
-
addKnowledgeBaseDocument(
|
|
100
|
+
addKnowledgeBaseDocument(assistantId: Id, body: B<'/assistants/{assistant_id}/knowledge_base', 'post'> | FormData, options?: RequestOptions): Promise<{
|
|
99
101
|
success: true;
|
|
100
102
|
data: import("./types.js").components["schemas"]["KnowledgeBaseDocument"];
|
|
101
103
|
}>;
|
|
102
|
-
postCallAnalysis(
|
|
104
|
+
postCallAnalysis(assistantId: Id, query?: Q<'/assistants/{assistant_id}/post_call_analysis', 'get'>, options?: RequestOptions): Promise<{
|
|
103
105
|
success: true;
|
|
104
|
-
data: import("./types.js").components["schemas"]["
|
|
106
|
+
data: import("./types.js").components["schemas"]["AssistantPostCallAnalysis"];
|
|
105
107
|
}>;
|
|
106
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated Renamed to {@link Assistants}; `Finns` is the same class and will be removed in a future major version.
|
|
111
|
+
*/
|
|
112
|
+
export declare const Finns: typeof Assistants;
|
|
113
|
+
/** @deprecated Renamed to {@link Assistants}. */
|
|
114
|
+
export type Finns = Assistants;
|
|
107
115
|
export declare class Voices extends VoicesGenerated {
|
|
108
116
|
list(query?: Q<'/voices', 'get'>, options?: RequestOptions): Promise<{
|
|
109
117
|
success: true;
|