@l7mp/tivadar-ai-api-sdk 0.2.5 → 0.2.6
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/dist/api-client.d.ts +10 -2
- package/dist/api-client.js +9 -1
- package/dist/apis/RAGApi.d.ts +15 -13
- package/dist/apis/RAGApi.js +47 -45
- package/dist/apis/ToolsApi.d.ts +68 -0
- package/dist/apis/ToolsApi.js +205 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +10 -2
- package/dist/esm/api-client.js +9 -1
- package/dist/esm/apis/RAGApi.d.ts +15 -13
- package/dist/esm/apis/RAGApi.js +47 -45
- package/dist/esm/apis/ToolsApi.d.ts +68 -0
- package/dist/esm/apis/ToolsApi.js +201 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AgentTool.d.ts +79 -0
- package/dist/esm/models/AgentTool.js +66 -0
- package/dist/esm/models/AgentToolUpsert.d.ts +40 -0
- package/dist/esm/models/AgentToolUpsert.js +45 -0
- package/dist/esm/models/Notification.d.ts +16 -17
- package/dist/esm/models/Notification.js +8 -8
- package/dist/esm/models/NotificationCreate.d.ts +3 -4
- package/dist/esm/models/NotificationCreate.js +4 -2
- package/dist/esm/models/NotificationLocalizedContentValue.d.ts +38 -0
- package/dist/esm/models/NotificationLocalizedContentValue.js +47 -0
- package/dist/esm/models/NotificationUpdate.d.ts +3 -4
- package/dist/esm/models/NotificationUpdate.js +4 -2
- package/dist/esm/models/Tool.d.ts +102 -0
- package/dist/esm/models/Tool.js +77 -0
- package/dist/esm/models/ToolCreate.d.ts +84 -0
- package/dist/esm/models/ToolCreate.js +63 -0
- package/dist/esm/models/ToolUpdate.d.ts +78 -0
- package/dist/esm/models/ToolUpdate.js +55 -0
- package/dist/esm/models/UserPreferences.d.ts +1 -1
- package/dist/esm/models/UserPreferences.js +3 -1
- package/dist/esm/models/UserPreferencesUpdate.d.ts +1 -1
- package/dist/esm/models/UserPreferencesUpdate.js +3 -1
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/models/AgentTool.d.ts +79 -0
- package/dist/models/AgentTool.js +73 -0
- package/dist/models/AgentToolUpsert.d.ts +40 -0
- package/dist/models/AgentToolUpsert.js +52 -0
- package/dist/models/Notification.d.ts +16 -17
- package/dist/models/Notification.js +8 -8
- package/dist/models/NotificationCreate.d.ts +3 -4
- package/dist/models/NotificationCreate.js +4 -2
- package/dist/models/NotificationLocalizedContentValue.d.ts +38 -0
- package/dist/models/NotificationLocalizedContentValue.js +54 -0
- package/dist/models/NotificationUpdate.d.ts +3 -4
- package/dist/models/NotificationUpdate.js +4 -2
- package/dist/models/Tool.d.ts +102 -0
- package/dist/models/Tool.js +84 -0
- package/dist/models/ToolCreate.d.ts +84 -0
- package/dist/models/ToolCreate.js +70 -0
- package/dist/models/ToolUpdate.d.ts +78 -0
- package/dist/models/ToolUpdate.js +62 -0
- package/dist/models/UserPreferences.d.ts +1 -1
- package/dist/models/UserPreferences.js +3 -1
- package/dist/models/UserPreferencesUpdate.d.ts +1 -1
- package/dist/models/UserPreferencesUpdate.js +3 -1
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/api-client.ts +21 -2
- package/src/apis/RAGApi.ts +69 -67
- package/src/apis/ToolsApi.ts +287 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AgentTool.ts +134 -0
- package/src/models/AgentToolUpsert.ts +74 -0
- package/src/models/CalendarEvent.ts +1 -0
- package/src/models/CalendarEventCreate.ts +1 -0
- package/src/models/CalendarEventUpdate.ts +1 -0
- package/src/models/Call.ts +1 -0
- package/src/models/CallCreate.ts +1 -0
- package/src/models/CallUpdate.ts +1 -0
- package/src/models/Notification.ts +29 -22
- package/src/models/NotificationCreate.ts +12 -4
- package/src/models/NotificationLocalizedContentValue.ts +75 -0
- package/src/models/NotificationUpdate.ts +12 -4
- package/src/models/Tool.ts +160 -0
- package/src/models/ToolCreate.ts +132 -0
- package/src/models/ToolUpdate.ts +121 -0
- package/src/models/UserPreferences.ts +4 -4
- package/src/models/UserPreferencesUpdate.ts +4 -4
- package/src/models/index.ts +6 -0
package/dist/api-client.d.ts
CHANGED
|
@@ -17,7 +17,8 @@ import { STTProvidersApi } from "./apis/STTProvidersApi";
|
|
|
17
17
|
import { TTSProvidersApi } from "./apis/TTSProvidersApi";
|
|
18
18
|
import { SubscriptionApi } from "./apis/SubscriptionApi";
|
|
19
19
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
20
|
-
import
|
|
20
|
+
import { ToolsApi } from "./apis/ToolsApi";
|
|
21
|
+
import type { CallCreate, CallUpdate, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, UserPreferencesUpdate, AgentToolUpsert } from "./models";
|
|
21
22
|
export interface ApiClientConfig {
|
|
22
23
|
baseUrl: string;
|
|
23
24
|
options?: {
|
|
@@ -97,7 +98,7 @@ export declare class Api {
|
|
|
97
98
|
upload: (organizationId: string, ragConfigName: string, file: File, sourceUrl?: string, metadata?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsPost"]>;
|
|
98
99
|
list: (organizationId: string, ragConfigName: string, status?: OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsGet"]>;
|
|
99
100
|
get: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet"]>;
|
|
100
|
-
download: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["
|
|
101
|
+
download: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["downloadDocumentFile"]>;
|
|
101
102
|
replace: (organizationId: string, ragConfigName: string, documentId: string, file: File, sourceUrl?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut"]>;
|
|
102
103
|
delete: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete"]>;
|
|
103
104
|
};
|
|
@@ -150,6 +151,12 @@ export declare class Api {
|
|
|
150
151
|
readonly embeddingProviders: {
|
|
151
152
|
list: (organizationId: string, options?: RequestInit) => ReturnType<EmbeddingProvidersApi["organizationsOrganizationIdEmbeddingProvidersGet"]>;
|
|
152
153
|
};
|
|
154
|
+
readonly tools: {
|
|
155
|
+
listCatalog: (organizationId: string, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdToolsGet"]>;
|
|
156
|
+
listForAgent: (organizationId: string, voiceAgentId: string, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet"]>;
|
|
157
|
+
upsertForAgent: (organizationId: string, voiceAgentId: string, toolName: string, agentToolUpsert: AgentToolUpsert, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut"]>;
|
|
158
|
+
removeFromAgent: (organizationId: string, voiceAgentId: string, toolName: string, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete"]>;
|
|
159
|
+
};
|
|
153
160
|
private readonly callsApi;
|
|
154
161
|
private readonly voiceAgentsApi;
|
|
155
162
|
private readonly chatAgentsApi;
|
|
@@ -169,6 +176,7 @@ export declare class Api {
|
|
|
169
176
|
private readonly llmProvidersApi;
|
|
170
177
|
private readonly sttProvidersApi;
|
|
171
178
|
private readonly ttsProvidersApi;
|
|
179
|
+
private readonly toolsApi;
|
|
172
180
|
private readonly _auth;
|
|
173
181
|
constructor(config: ApiClientConfig);
|
|
174
182
|
/**
|
package/dist/api-client.js
CHANGED
|
@@ -29,6 +29,7 @@ const STTProvidersApi_1 = require("./apis/STTProvidersApi");
|
|
|
29
29
|
const TTSProvidersApi_1 = require("./apis/TTSProvidersApi");
|
|
30
30
|
const SubscriptionApi_1 = require("./apis/SubscriptionApi");
|
|
31
31
|
const VoiceAgentsApi_1 = require("./apis/VoiceAgentsApi");
|
|
32
|
+
const ToolsApi_1 = require("./apis/ToolsApi");
|
|
32
33
|
const runtime_1 = require("./runtime");
|
|
33
34
|
class Api {
|
|
34
35
|
constructor(config) {
|
|
@@ -67,6 +68,7 @@ class Api {
|
|
|
67
68
|
this.llmProvidersApi = new LLMProvidersApi_1.LLMProvidersApi(configuration);
|
|
68
69
|
this.sttProvidersApi = new STTProvidersApi_1.STTProvidersApi(configuration);
|
|
69
70
|
this.ttsProvidersApi = new TTSProvidersApi_1.TTSProvidersApi(configuration);
|
|
71
|
+
this.toolsApi = new ToolsApi_1.ToolsApi(configuration);
|
|
70
72
|
this.calls = {
|
|
71
73
|
list: (organizationId, voiceAgentId, sandbox, options) => this.callsApi.organizationsOrganizationIdCallsGet({ organizationId, voiceAgentId, sandbox }, options),
|
|
72
74
|
get: (organizationId, callId, options) => this.callsApi.organizationsOrganizationIdCallsCallIdGet({ organizationId, callId }, options),
|
|
@@ -143,7 +145,7 @@ class Api {
|
|
|
143
145
|
upload: (organizationId, ragConfigName, file, sourceUrl, metadata, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsPost({ organizationId, ragConfigName, file, sourceUrl, metadata }, options),
|
|
144
146
|
list: (organizationId, ragConfigName, status, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsGet({ organizationId, ragConfigName, status }, options),
|
|
145
147
|
get: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet({ organizationId, ragConfigName, documentId }, options),
|
|
146
|
-
download: (organizationId, ragConfigName, documentId, options) => this.ragApi.
|
|
148
|
+
download: (organizationId, ragConfigName, documentId, options) => this.ragApi.downloadDocumentFile({ organizationId, ragConfigName, documentId }, options),
|
|
147
149
|
replace: (organizationId, ragConfigName, documentId, file, sourceUrl, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut({ organizationId, ragConfigName, documentId, file, sourceUrl }, options),
|
|
148
150
|
delete: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete({ organizationId, ragConfigName, documentId }, options),
|
|
149
151
|
},
|
|
@@ -190,6 +192,12 @@ class Api {
|
|
|
190
192
|
this.ttsProviders = {
|
|
191
193
|
list: (organizationId, options) => this.ttsProvidersApi.organizationsOrganizationIdTtsProvidersGet({ organizationId }, options),
|
|
192
194
|
};
|
|
195
|
+
this.tools = {
|
|
196
|
+
listCatalog: (organizationId, options) => this.toolsApi.organizationsOrganizationIdToolsGet({ organizationId }, options),
|
|
197
|
+
listForAgent: (organizationId, voiceAgentId, options) => this.toolsApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet({ organizationId, voiceAgentId }, options),
|
|
198
|
+
upsertForAgent: (organizationId, voiceAgentId, toolName, agentToolUpsert, options) => this.toolsApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut({ organizationId, voiceAgentId, toolName, agentToolUpsert }, options),
|
|
199
|
+
removeFromAgent: (organizationId, voiceAgentId, toolName, options) => this.toolsApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete({ organizationId, voiceAgentId, toolName }, options),
|
|
200
|
+
};
|
|
193
201
|
}
|
|
194
202
|
/**
|
|
195
203
|
* Set the Bearer token for Authorization header.
|
package/dist/apis/RAGApi.d.ts
CHANGED
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import type { RagConfig, RagConfigCreate, RagDocument, RagDocumentChunkList, RagDocumentList } from '../models/index';
|
|
14
|
+
export interface DownloadDocumentFileRequest {
|
|
15
|
+
organizationId: string;
|
|
16
|
+
ragConfigName: string;
|
|
17
|
+
documentId: string;
|
|
18
|
+
}
|
|
14
19
|
export interface OrganizationsOrganizationIdRagGetRequest {
|
|
15
20
|
organizationId: string;
|
|
16
21
|
}
|
|
@@ -32,11 +37,6 @@ export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdG
|
|
|
32
37
|
ragConfigName: string;
|
|
33
38
|
documentId: string;
|
|
34
39
|
}
|
|
35
|
-
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest {
|
|
36
|
-
organizationId: string;
|
|
37
|
-
ragConfigName: string;
|
|
38
|
-
documentId: string;
|
|
39
|
-
}
|
|
40
40
|
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPutRequest {
|
|
41
41
|
organizationId: string;
|
|
42
42
|
ragConfigName: string;
|
|
@@ -60,6 +60,16 @@ export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsPostRequest
|
|
|
60
60
|
*
|
|
61
61
|
*/
|
|
62
62
|
export declare class RAGApi extends runtime.BaseAPI {
|
|
63
|
+
/**
|
|
64
|
+
* Downloads the original uploaded document file from object storage. Requires S3-compatible object storage to be configured on the server.
|
|
65
|
+
* Download original document file
|
|
66
|
+
*/
|
|
67
|
+
downloadDocumentFileRaw(requestParameters: DownloadDocumentFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
|
|
68
|
+
/**
|
|
69
|
+
* Downloads the original uploaded document file from object storage. Requires S3-compatible object storage to be configured on the server.
|
|
70
|
+
* Download original document file
|
|
71
|
+
*/
|
|
72
|
+
downloadDocumentFile(requestParameters: DownloadDocumentFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
|
63
73
|
/**
|
|
64
74
|
* List all RAG configurations for an organization
|
|
65
75
|
*/
|
|
@@ -100,14 +110,6 @@ export declare class RAGApi extends runtime.BaseAPI {
|
|
|
100
110
|
* Get document chunks
|
|
101
111
|
*/
|
|
102
112
|
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RagDocumentChunkList>;
|
|
103
|
-
/**
|
|
104
|
-
* Download original document file
|
|
105
|
-
*/
|
|
106
|
-
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
|
|
107
|
-
/**
|
|
108
|
-
* Download original document file
|
|
109
|
-
*/
|
|
110
|
-
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
|
111
113
|
/**
|
|
112
114
|
* Replace a document in a RAG configuration
|
|
113
115
|
*/
|
package/dist/apis/RAGApi.js
CHANGED
|
@@ -29,6 +29,53 @@ const index_1 = require("../models/index");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class RAGApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Downloads the original uploaded document file from object storage. Requires S3-compatible object storage to be configured on the server.
|
|
34
|
+
* Download original document file
|
|
35
|
+
*/
|
|
36
|
+
downloadDocumentFileRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['organizationId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling downloadDocumentFile().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['ragConfigName'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('ragConfigName', 'Required parameter "ragConfigName" was null or undefined when calling downloadDocumentFile().');
|
|
43
|
+
}
|
|
44
|
+
if (requestParameters['documentId'] == null) {
|
|
45
|
+
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling downloadDocumentFile().');
|
|
46
|
+
}
|
|
47
|
+
const queryParameters = {};
|
|
48
|
+
const headerParameters = {};
|
|
49
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
50
|
+
const token = this.configuration.accessToken;
|
|
51
|
+
const tokenString = yield token("bearerAuth", []);
|
|
52
|
+
if (tokenString) {
|
|
53
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents/{documentId}/file`;
|
|
57
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
58
|
+
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
59
|
+
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters['documentId'])));
|
|
60
|
+
const response = yield this.request({
|
|
61
|
+
path: urlPath,
|
|
62
|
+
method: 'GET',
|
|
63
|
+
headers: headerParameters,
|
|
64
|
+
query: queryParameters,
|
|
65
|
+
}, initOverrides);
|
|
66
|
+
return new runtime.BlobApiResponse(response);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Downloads the original uploaded document file from object storage. Requires S3-compatible object storage to be configured on the server.
|
|
71
|
+
* Download original document file
|
|
72
|
+
*/
|
|
73
|
+
downloadDocumentFile(requestParameters, initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const response = yield this.downloadDocumentFileRaw(requestParameters, initOverrides);
|
|
76
|
+
return yield response.value();
|
|
77
|
+
});
|
|
78
|
+
}
|
|
32
79
|
/**
|
|
33
80
|
* List all RAG configurations for an organization
|
|
34
81
|
*/
|
|
@@ -237,51 +284,6 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
237
284
|
return yield response.value();
|
|
238
285
|
});
|
|
239
286
|
}
|
|
240
|
-
/**
|
|
241
|
-
* Download original document file
|
|
242
|
-
*/
|
|
243
|
-
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters, initOverrides) {
|
|
244
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
245
|
-
if (requestParameters['organizationId'] == null) {
|
|
246
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().');
|
|
247
|
-
}
|
|
248
|
-
if (requestParameters['ragConfigName'] == null) {
|
|
249
|
-
throw new runtime.RequiredError('ragConfigName', 'Required parameter "ragConfigName" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().');
|
|
250
|
-
}
|
|
251
|
-
if (requestParameters['documentId'] == null) {
|
|
252
|
-
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().');
|
|
253
|
-
}
|
|
254
|
-
const queryParameters = {};
|
|
255
|
-
const headerParameters = {};
|
|
256
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
257
|
-
const token = this.configuration.accessToken;
|
|
258
|
-
const tokenString = yield token("bearerAuth", []);
|
|
259
|
-
if (tokenString) {
|
|
260
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents/{documentId}/file`;
|
|
264
|
-
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
265
|
-
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
266
|
-
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters['documentId'])));
|
|
267
|
-
const response = yield this.request({
|
|
268
|
-
path: urlPath,
|
|
269
|
-
method: 'GET',
|
|
270
|
-
headers: headerParameters,
|
|
271
|
-
query: queryParameters,
|
|
272
|
-
}, initOverrides);
|
|
273
|
-
return new runtime.BlobApiResponse(response);
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Download original document file
|
|
278
|
-
*/
|
|
279
|
-
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet(requestParameters, initOverrides) {
|
|
280
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
281
|
-
const response = yield this.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters, initOverrides);
|
|
282
|
-
return yield response.value();
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
287
|
/**
|
|
286
288
|
* Replace a document in a RAG configuration
|
|
287
289
|
*/
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tivadar AI Backend API
|
|
3
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { AgentTool, AgentToolUpsert, Tool } from '../models/index';
|
|
14
|
+
export interface OrganizationsOrganizationIdToolsGetRequest {
|
|
15
|
+
organizationId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGetRequest {
|
|
18
|
+
organizationId: string;
|
|
19
|
+
voiceAgentId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDeleteRequest {
|
|
22
|
+
organizationId: string;
|
|
23
|
+
voiceAgentId: string;
|
|
24
|
+
toolName: string;
|
|
25
|
+
}
|
|
26
|
+
export interface OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePutRequest {
|
|
27
|
+
organizationId: string;
|
|
28
|
+
voiceAgentId: string;
|
|
29
|
+
toolName: string;
|
|
30
|
+
agentToolUpsert: AgentToolUpsert;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
export declare class ToolsApi extends runtime.BaseAPI {
|
|
36
|
+
/**
|
|
37
|
+
* List available tools in the catalog
|
|
38
|
+
*/
|
|
39
|
+
organizationsOrganizationIdToolsGetRaw(requestParameters: OrganizationsOrganizationIdToolsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Tool>>>;
|
|
40
|
+
/**
|
|
41
|
+
* List available tools in the catalog
|
|
42
|
+
*/
|
|
43
|
+
organizationsOrganizationIdToolsGet(requestParameters: OrganizationsOrganizationIdToolsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Tool>>;
|
|
44
|
+
/**
|
|
45
|
+
* List tools enabled (or previously configured) for a voice agent
|
|
46
|
+
*/
|
|
47
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGetRaw(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AgentTool>>>;
|
|
48
|
+
/**
|
|
49
|
+
* List tools enabled (or previously configured) for a voice agent
|
|
50
|
+
*/
|
|
51
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentTool>>;
|
|
52
|
+
/**
|
|
53
|
+
* Remove a tool configuration from a voice agent
|
|
54
|
+
*/
|
|
55
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDeleteRaw(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
56
|
+
/**
|
|
57
|
+
* Remove a tool configuration from a voice agent
|
|
58
|
+
*/
|
|
59
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Enable or update a tool for a voice agent
|
|
62
|
+
*/
|
|
63
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePutRaw(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentTool>>;
|
|
64
|
+
/**
|
|
65
|
+
* Enable or update a tool for a voice agent
|
|
66
|
+
*/
|
|
67
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentTool>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tivadar AI Backend API
|
|
6
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ToolsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class ToolsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* List available tools in the catalog
|
|
34
|
+
*/
|
|
35
|
+
organizationsOrganizationIdToolsGetRaw(requestParameters, initOverrides) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['organizationId'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdToolsGet().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
43
|
+
const token = this.configuration.accessToken;
|
|
44
|
+
const tokenString = yield token("bearerAuth", []);
|
|
45
|
+
if (tokenString) {
|
|
46
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
let urlPath = `/organizations/{organizationId}/tools`;
|
|
50
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
51
|
+
const response = yield this.request({
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'GET',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
}, initOverrides);
|
|
57
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ToolFromJSON));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* List available tools in the catalog
|
|
62
|
+
*/
|
|
63
|
+
organizationsOrganizationIdToolsGet(requestParameters, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const response = yield this.organizationsOrganizationIdToolsGetRaw(requestParameters, initOverrides);
|
|
66
|
+
return yield response.value();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* List tools enabled (or previously configured) for a voice agent
|
|
71
|
+
*/
|
|
72
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGetRaw(requestParameters, initOverrides) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
if (requestParameters['organizationId'] == null) {
|
|
75
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet().');
|
|
76
|
+
}
|
|
77
|
+
if (requestParameters['voiceAgentId'] == null) {
|
|
78
|
+
throw new runtime.RequiredError('voiceAgentId', 'Required parameter "voiceAgentId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet().');
|
|
79
|
+
}
|
|
80
|
+
const queryParameters = {};
|
|
81
|
+
const headerParameters = {};
|
|
82
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
83
|
+
const token = this.configuration.accessToken;
|
|
84
|
+
const tokenString = yield token("bearerAuth", []);
|
|
85
|
+
if (tokenString) {
|
|
86
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
let urlPath = `/organizations/{organizationId}/voice-agents/{voiceAgentId}/tools`;
|
|
90
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
91
|
+
urlPath = urlPath.replace(`{${"voiceAgentId"}}`, encodeURIComponent(String(requestParameters['voiceAgentId'])));
|
|
92
|
+
const response = yield this.request({
|
|
93
|
+
path: urlPath,
|
|
94
|
+
method: 'GET',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
}, initOverrides);
|
|
98
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AgentToolFromJSON));
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* List tools enabled (or previously configured) for a voice agent
|
|
103
|
+
*/
|
|
104
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet(requestParameters, initOverrides) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const response = yield this.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGetRaw(requestParameters, initOverrides);
|
|
107
|
+
return yield response.value();
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Remove a tool configuration from a voice agent
|
|
112
|
+
*/
|
|
113
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDeleteRaw(requestParameters, initOverrides) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
if (requestParameters['organizationId'] == null) {
|
|
116
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete().');
|
|
117
|
+
}
|
|
118
|
+
if (requestParameters['voiceAgentId'] == null) {
|
|
119
|
+
throw new runtime.RequiredError('voiceAgentId', 'Required parameter "voiceAgentId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete().');
|
|
120
|
+
}
|
|
121
|
+
if (requestParameters['toolName'] == null) {
|
|
122
|
+
throw new runtime.RequiredError('toolName', 'Required parameter "toolName" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete().');
|
|
123
|
+
}
|
|
124
|
+
const queryParameters = {};
|
|
125
|
+
const headerParameters = {};
|
|
126
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
127
|
+
const token = this.configuration.accessToken;
|
|
128
|
+
const tokenString = yield token("bearerAuth", []);
|
|
129
|
+
if (tokenString) {
|
|
130
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
let urlPath = `/organizations/{organizationId}/voice-agents/{voiceAgentId}/tools/{toolName}`;
|
|
134
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
135
|
+
urlPath = urlPath.replace(`{${"voiceAgentId"}}`, encodeURIComponent(String(requestParameters['voiceAgentId'])));
|
|
136
|
+
urlPath = urlPath.replace(`{${"toolName"}}`, encodeURIComponent(String(requestParameters['toolName'])));
|
|
137
|
+
const response = yield this.request({
|
|
138
|
+
path: urlPath,
|
|
139
|
+
method: 'DELETE',
|
|
140
|
+
headers: headerParameters,
|
|
141
|
+
query: queryParameters,
|
|
142
|
+
}, initOverrides);
|
|
143
|
+
return new runtime.VoidApiResponse(response);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Remove a tool configuration from a voice agent
|
|
148
|
+
*/
|
|
149
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete(requestParameters, initOverrides) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
yield this.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDeleteRaw(requestParameters, initOverrides);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Enable or update a tool for a voice agent
|
|
156
|
+
*/
|
|
157
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePutRaw(requestParameters, initOverrides) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
if (requestParameters['organizationId'] == null) {
|
|
160
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut().');
|
|
161
|
+
}
|
|
162
|
+
if (requestParameters['voiceAgentId'] == null) {
|
|
163
|
+
throw new runtime.RequiredError('voiceAgentId', 'Required parameter "voiceAgentId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut().');
|
|
164
|
+
}
|
|
165
|
+
if (requestParameters['toolName'] == null) {
|
|
166
|
+
throw new runtime.RequiredError('toolName', 'Required parameter "toolName" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut().');
|
|
167
|
+
}
|
|
168
|
+
if (requestParameters['agentToolUpsert'] == null) {
|
|
169
|
+
throw new runtime.RequiredError('agentToolUpsert', 'Required parameter "agentToolUpsert" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut().');
|
|
170
|
+
}
|
|
171
|
+
const queryParameters = {};
|
|
172
|
+
const headerParameters = {};
|
|
173
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
174
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
175
|
+
const token = this.configuration.accessToken;
|
|
176
|
+
const tokenString = yield token("bearerAuth", []);
|
|
177
|
+
if (tokenString) {
|
|
178
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
let urlPath = `/organizations/{organizationId}/voice-agents/{voiceAgentId}/tools/{toolName}`;
|
|
182
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
183
|
+
urlPath = urlPath.replace(`{${"voiceAgentId"}}`, encodeURIComponent(String(requestParameters['voiceAgentId'])));
|
|
184
|
+
urlPath = urlPath.replace(`{${"toolName"}}`, encodeURIComponent(String(requestParameters['toolName'])));
|
|
185
|
+
const response = yield this.request({
|
|
186
|
+
path: urlPath,
|
|
187
|
+
method: 'PUT',
|
|
188
|
+
headers: headerParameters,
|
|
189
|
+
query: queryParameters,
|
|
190
|
+
body: (0, index_1.AgentToolUpsertToJSON)(requestParameters['agentToolUpsert']),
|
|
191
|
+
}, initOverrides);
|
|
192
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentToolFromJSON)(jsonValue));
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Enable or update a tool for a voice agent
|
|
197
|
+
*/
|
|
198
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut(requestParameters, initOverrides) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
+
const response = yield this.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePutRaw(requestParameters, initOverrides);
|
|
201
|
+
return yield response.value();
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
exports.ToolsApi = ToolsApi;
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -34,4 +34,5 @@ __exportStar(require("./SIPApi"), exports);
|
|
|
34
34
|
__exportStar(require("./STTProvidersApi"), exports);
|
|
35
35
|
__exportStar(require("./SubscriptionApi"), exports);
|
|
36
36
|
__exportStar(require("./TTSProvidersApi"), exports);
|
|
37
|
+
__exportStar(require("./ToolsApi"), exports);
|
|
37
38
|
__exportStar(require("./VoiceAgentsApi"), exports);
|
package/dist/esm/api-client.d.ts
CHANGED
|
@@ -17,7 +17,8 @@ import { STTProvidersApi } from "./apis/STTProvidersApi";
|
|
|
17
17
|
import { TTSProvidersApi } from "./apis/TTSProvidersApi";
|
|
18
18
|
import { SubscriptionApi } from "./apis/SubscriptionApi";
|
|
19
19
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
20
|
-
import
|
|
20
|
+
import { ToolsApi } from "./apis/ToolsApi";
|
|
21
|
+
import type { CallCreate, CallUpdate, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, UserPreferencesUpdate, AgentToolUpsert } from "./models";
|
|
21
22
|
export interface ApiClientConfig {
|
|
22
23
|
baseUrl: string;
|
|
23
24
|
options?: {
|
|
@@ -97,7 +98,7 @@ export declare class Api {
|
|
|
97
98
|
upload: (organizationId: string, ragConfigName: string, file: File, sourceUrl?: string, metadata?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsPost"]>;
|
|
98
99
|
list: (organizationId: string, ragConfigName: string, status?: OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsGet"]>;
|
|
99
100
|
get: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet"]>;
|
|
100
|
-
download: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["
|
|
101
|
+
download: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["downloadDocumentFile"]>;
|
|
101
102
|
replace: (organizationId: string, ragConfigName: string, documentId: string, file: File, sourceUrl?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut"]>;
|
|
102
103
|
delete: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete"]>;
|
|
103
104
|
};
|
|
@@ -150,6 +151,12 @@ export declare class Api {
|
|
|
150
151
|
readonly embeddingProviders: {
|
|
151
152
|
list: (organizationId: string, options?: RequestInit) => ReturnType<EmbeddingProvidersApi["organizationsOrganizationIdEmbeddingProvidersGet"]>;
|
|
152
153
|
};
|
|
154
|
+
readonly tools: {
|
|
155
|
+
listCatalog: (organizationId: string, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdToolsGet"]>;
|
|
156
|
+
listForAgent: (organizationId: string, voiceAgentId: string, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet"]>;
|
|
157
|
+
upsertForAgent: (organizationId: string, voiceAgentId: string, toolName: string, agentToolUpsert: AgentToolUpsert, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut"]>;
|
|
158
|
+
removeFromAgent: (organizationId: string, voiceAgentId: string, toolName: string, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete"]>;
|
|
159
|
+
};
|
|
153
160
|
private readonly callsApi;
|
|
154
161
|
private readonly voiceAgentsApi;
|
|
155
162
|
private readonly chatAgentsApi;
|
|
@@ -169,6 +176,7 @@ export declare class Api {
|
|
|
169
176
|
private readonly llmProvidersApi;
|
|
170
177
|
private readonly sttProvidersApi;
|
|
171
178
|
private readonly ttsProvidersApi;
|
|
179
|
+
private readonly toolsApi;
|
|
172
180
|
private readonly _auth;
|
|
173
181
|
constructor(config: ApiClientConfig);
|
|
174
182
|
/**
|
package/dist/esm/api-client.js
CHANGED
|
@@ -26,6 +26,7 @@ import { STTProvidersApi } from "./apis/STTProvidersApi";
|
|
|
26
26
|
import { TTSProvidersApi } from "./apis/TTSProvidersApi";
|
|
27
27
|
import { SubscriptionApi } from "./apis/SubscriptionApi";
|
|
28
28
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
29
|
+
import { ToolsApi } from "./apis/ToolsApi";
|
|
29
30
|
import { Configuration } from "./runtime";
|
|
30
31
|
export class Api {
|
|
31
32
|
constructor(config) {
|
|
@@ -64,6 +65,7 @@ export class Api {
|
|
|
64
65
|
this.llmProvidersApi = new LLMProvidersApi(configuration);
|
|
65
66
|
this.sttProvidersApi = new STTProvidersApi(configuration);
|
|
66
67
|
this.ttsProvidersApi = new TTSProvidersApi(configuration);
|
|
68
|
+
this.toolsApi = new ToolsApi(configuration);
|
|
67
69
|
this.calls = {
|
|
68
70
|
list: (organizationId, voiceAgentId, sandbox, options) => this.callsApi.organizationsOrganizationIdCallsGet({ organizationId, voiceAgentId, sandbox }, options),
|
|
69
71
|
get: (organizationId, callId, options) => this.callsApi.organizationsOrganizationIdCallsCallIdGet({ organizationId, callId }, options),
|
|
@@ -140,7 +142,7 @@ export class Api {
|
|
|
140
142
|
upload: (organizationId, ragConfigName, file, sourceUrl, metadata, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsPost({ organizationId, ragConfigName, file, sourceUrl, metadata }, options),
|
|
141
143
|
list: (organizationId, ragConfigName, status, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsGet({ organizationId, ragConfigName, status }, options),
|
|
142
144
|
get: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet({ organizationId, ragConfigName, documentId }, options),
|
|
143
|
-
download: (organizationId, ragConfigName, documentId, options) => this.ragApi.
|
|
145
|
+
download: (organizationId, ragConfigName, documentId, options) => this.ragApi.downloadDocumentFile({ organizationId, ragConfigName, documentId }, options),
|
|
144
146
|
replace: (organizationId, ragConfigName, documentId, file, sourceUrl, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut({ organizationId, ragConfigName, documentId, file, sourceUrl }, options),
|
|
145
147
|
delete: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete({ organizationId, ragConfigName, documentId }, options),
|
|
146
148
|
},
|
|
@@ -187,6 +189,12 @@ export class Api {
|
|
|
187
189
|
this.ttsProviders = {
|
|
188
190
|
list: (organizationId, options) => this.ttsProvidersApi.organizationsOrganizationIdTtsProvidersGet({ organizationId }, options),
|
|
189
191
|
};
|
|
192
|
+
this.tools = {
|
|
193
|
+
listCatalog: (organizationId, options) => this.toolsApi.organizationsOrganizationIdToolsGet({ organizationId }, options),
|
|
194
|
+
listForAgent: (organizationId, voiceAgentId, options) => this.toolsApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet({ organizationId, voiceAgentId }, options),
|
|
195
|
+
upsertForAgent: (organizationId, voiceAgentId, toolName, agentToolUpsert, options) => this.toolsApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut({ organizationId, voiceAgentId, toolName, agentToolUpsert }, options),
|
|
196
|
+
removeFromAgent: (organizationId, voiceAgentId, toolName, options) => this.toolsApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete({ organizationId, voiceAgentId, toolName }, options),
|
|
197
|
+
};
|
|
190
198
|
}
|
|
191
199
|
/**
|
|
192
200
|
* Set the Bearer token for Authorization header.
|