@l7mp/tivadar-ai-api-sdk 0.2.4 → 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/CalendarEvent.d.ts +6 -0
- package/dist/esm/models/CalendarEvent.js +2 -0
- package/dist/esm/models/CalendarEventCreate.d.ts +6 -0
- package/dist/esm/models/CalendarEventCreate.js +2 -0
- package/dist/esm/models/CalendarEventUpdate.d.ts +6 -0
- package/dist/esm/models/CalendarEventUpdate.js +2 -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/CalendarEvent.d.ts +6 -0
- package/dist/models/CalendarEvent.js +2 -0
- package/dist/models/CalendarEventCreate.d.ts +6 -0
- package/dist/models/CalendarEventCreate.js +2 -0
- package/dist/models/CalendarEventUpdate.d.ts +6 -0
- package/dist/models/CalendarEventUpdate.js +2 -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 +8 -0
- package/src/models/CalendarEventCreate.ts +8 -0
- package/src/models/CalendarEventUpdate.ts +8 -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
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
AgentTool,
|
|
19
|
+
AgentToolUpsert,
|
|
20
|
+
Tool,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
AgentToolFromJSON,
|
|
24
|
+
AgentToolToJSON,
|
|
25
|
+
AgentToolUpsertFromJSON,
|
|
26
|
+
AgentToolUpsertToJSON,
|
|
27
|
+
ToolFromJSON,
|
|
28
|
+
ToolToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface OrganizationsOrganizationIdToolsGetRequest {
|
|
32
|
+
organizationId: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGetRequest {
|
|
36
|
+
organizationId: string;
|
|
37
|
+
voiceAgentId: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDeleteRequest {
|
|
41
|
+
organizationId: string;
|
|
42
|
+
voiceAgentId: string;
|
|
43
|
+
toolName: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePutRequest {
|
|
47
|
+
organizationId: string;
|
|
48
|
+
voiceAgentId: string;
|
|
49
|
+
toolName: string;
|
|
50
|
+
agentToolUpsert: AgentToolUpsert;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
export class ToolsApi extends runtime.BaseAPI {
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* List available tools in the catalog
|
|
60
|
+
*/
|
|
61
|
+
async organizationsOrganizationIdToolsGetRaw(requestParameters: OrganizationsOrganizationIdToolsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Tool>>> {
|
|
62
|
+
if (requestParameters['organizationId'] == null) {
|
|
63
|
+
throw new runtime.RequiredError(
|
|
64
|
+
'organizationId',
|
|
65
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdToolsGet().'
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const queryParameters: any = {};
|
|
70
|
+
|
|
71
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
72
|
+
|
|
73
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
74
|
+
const token = this.configuration.accessToken;
|
|
75
|
+
const tokenString = await token("bearerAuth", []);
|
|
76
|
+
|
|
77
|
+
if (tokenString) {
|
|
78
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
let urlPath = `/organizations/{organizationId}/tools`;
|
|
83
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
84
|
+
|
|
85
|
+
const response = await this.request({
|
|
86
|
+
path: urlPath,
|
|
87
|
+
method: 'GET',
|
|
88
|
+
headers: headerParameters,
|
|
89
|
+
query: queryParameters,
|
|
90
|
+
}, initOverrides);
|
|
91
|
+
|
|
92
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ToolFromJSON));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* List available tools in the catalog
|
|
97
|
+
*/
|
|
98
|
+
async organizationsOrganizationIdToolsGet(requestParameters: OrganizationsOrganizationIdToolsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Tool>> {
|
|
99
|
+
const response = await this.organizationsOrganizationIdToolsGetRaw(requestParameters, initOverrides);
|
|
100
|
+
return await response.value();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* List tools enabled (or previously configured) for a voice agent
|
|
105
|
+
*/
|
|
106
|
+
async organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGetRaw(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AgentTool>>> {
|
|
107
|
+
if (requestParameters['organizationId'] == null) {
|
|
108
|
+
throw new runtime.RequiredError(
|
|
109
|
+
'organizationId',
|
|
110
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet().'
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (requestParameters['voiceAgentId'] == null) {
|
|
115
|
+
throw new runtime.RequiredError(
|
|
116
|
+
'voiceAgentId',
|
|
117
|
+
'Required parameter "voiceAgentId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet().'
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const queryParameters: any = {};
|
|
122
|
+
|
|
123
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
124
|
+
|
|
125
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
126
|
+
const token = this.configuration.accessToken;
|
|
127
|
+
const tokenString = await token("bearerAuth", []);
|
|
128
|
+
|
|
129
|
+
if (tokenString) {
|
|
130
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
let urlPath = `/organizations/{organizationId}/voice-agents/{voiceAgentId}/tools`;
|
|
135
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
136
|
+
urlPath = urlPath.replace(`{${"voiceAgentId"}}`, encodeURIComponent(String(requestParameters['voiceAgentId'])));
|
|
137
|
+
|
|
138
|
+
const response = await this.request({
|
|
139
|
+
path: urlPath,
|
|
140
|
+
method: 'GET',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
}, initOverrides);
|
|
144
|
+
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AgentToolFromJSON));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* List tools enabled (or previously configured) for a voice agent
|
|
150
|
+
*/
|
|
151
|
+
async organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentTool>> {
|
|
152
|
+
const response = await this.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGetRaw(requestParameters, initOverrides);
|
|
153
|
+
return await response.value();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Remove a tool configuration from a voice agent
|
|
158
|
+
*/
|
|
159
|
+
async organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDeleteRaw(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
160
|
+
if (requestParameters['organizationId'] == null) {
|
|
161
|
+
throw new runtime.RequiredError(
|
|
162
|
+
'organizationId',
|
|
163
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete().'
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (requestParameters['voiceAgentId'] == null) {
|
|
168
|
+
throw new runtime.RequiredError(
|
|
169
|
+
'voiceAgentId',
|
|
170
|
+
'Required parameter "voiceAgentId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete().'
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (requestParameters['toolName'] == null) {
|
|
175
|
+
throw new runtime.RequiredError(
|
|
176
|
+
'toolName',
|
|
177
|
+
'Required parameter "toolName" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete().'
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const queryParameters: any = {};
|
|
182
|
+
|
|
183
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
184
|
+
|
|
185
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
186
|
+
const token = this.configuration.accessToken;
|
|
187
|
+
const tokenString = await token("bearerAuth", []);
|
|
188
|
+
|
|
189
|
+
if (tokenString) {
|
|
190
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
let urlPath = `/organizations/{organizationId}/voice-agents/{voiceAgentId}/tools/{toolName}`;
|
|
195
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
196
|
+
urlPath = urlPath.replace(`{${"voiceAgentId"}}`, encodeURIComponent(String(requestParameters['voiceAgentId'])));
|
|
197
|
+
urlPath = urlPath.replace(`{${"toolName"}}`, encodeURIComponent(String(requestParameters['toolName'])));
|
|
198
|
+
|
|
199
|
+
const response = await this.request({
|
|
200
|
+
path: urlPath,
|
|
201
|
+
method: 'DELETE',
|
|
202
|
+
headers: headerParameters,
|
|
203
|
+
query: queryParameters,
|
|
204
|
+
}, initOverrides);
|
|
205
|
+
|
|
206
|
+
return new runtime.VoidApiResponse(response);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Remove a tool configuration from a voice agent
|
|
211
|
+
*/
|
|
212
|
+
async organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
213
|
+
await this.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDeleteRaw(requestParameters, initOverrides);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Enable or update a tool for a voice agent
|
|
218
|
+
*/
|
|
219
|
+
async organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePutRaw(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentTool>> {
|
|
220
|
+
if (requestParameters['organizationId'] == null) {
|
|
221
|
+
throw new runtime.RequiredError(
|
|
222
|
+
'organizationId',
|
|
223
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut().'
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (requestParameters['voiceAgentId'] == null) {
|
|
228
|
+
throw new runtime.RequiredError(
|
|
229
|
+
'voiceAgentId',
|
|
230
|
+
'Required parameter "voiceAgentId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut().'
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (requestParameters['toolName'] == null) {
|
|
235
|
+
throw new runtime.RequiredError(
|
|
236
|
+
'toolName',
|
|
237
|
+
'Required parameter "toolName" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut().'
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (requestParameters['agentToolUpsert'] == null) {
|
|
242
|
+
throw new runtime.RequiredError(
|
|
243
|
+
'agentToolUpsert',
|
|
244
|
+
'Required parameter "agentToolUpsert" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut().'
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const queryParameters: any = {};
|
|
249
|
+
|
|
250
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
251
|
+
|
|
252
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
253
|
+
|
|
254
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
255
|
+
const token = this.configuration.accessToken;
|
|
256
|
+
const tokenString = await token("bearerAuth", []);
|
|
257
|
+
|
|
258
|
+
if (tokenString) {
|
|
259
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
let urlPath = `/organizations/{organizationId}/voice-agents/{voiceAgentId}/tools/{toolName}`;
|
|
264
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
265
|
+
urlPath = urlPath.replace(`{${"voiceAgentId"}}`, encodeURIComponent(String(requestParameters['voiceAgentId'])));
|
|
266
|
+
urlPath = urlPath.replace(`{${"toolName"}}`, encodeURIComponent(String(requestParameters['toolName'])));
|
|
267
|
+
|
|
268
|
+
const response = await this.request({
|
|
269
|
+
path: urlPath,
|
|
270
|
+
method: 'PUT',
|
|
271
|
+
headers: headerParameters,
|
|
272
|
+
query: queryParameters,
|
|
273
|
+
body: AgentToolUpsertToJSON(requestParameters['agentToolUpsert']),
|
|
274
|
+
}, initOverrides);
|
|
275
|
+
|
|
276
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AgentToolFromJSON(jsonValue));
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Enable or update a tool for a voice agent
|
|
281
|
+
*/
|
|
282
|
+
async organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentTool> {
|
|
283
|
+
const response = await this.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePutRaw(requestParameters, initOverrides);
|
|
284
|
+
return await response.value();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { Tool } from './Tool';
|
|
17
|
+
import {
|
|
18
|
+
ToolFromJSON,
|
|
19
|
+
ToolFromJSONTyped,
|
|
20
|
+
ToolToJSON,
|
|
21
|
+
ToolToJSONTyped,
|
|
22
|
+
} from './Tool';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AgentTool
|
|
28
|
+
*/
|
|
29
|
+
export interface AgentTool {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AgentTool
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof AgentTool
|
|
40
|
+
*/
|
|
41
|
+
voice_agent_id: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Tool}
|
|
45
|
+
* @memberof AgentTool
|
|
46
|
+
*/
|
|
47
|
+
tool: Tool;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof AgentTool
|
|
52
|
+
*/
|
|
53
|
+
enabled: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Non-secret config values. Secret fields are stored encrypted server-side and returned as `null` placeholders for fields that have a value set.
|
|
56
|
+
* @type {{ [key: string]: any; }}
|
|
57
|
+
* @memberof AgentTool
|
|
58
|
+
*/
|
|
59
|
+
config: { [key: string]: any; };
|
|
60
|
+
/**
|
|
61
|
+
* For each secret field, whether a value is currently stored.
|
|
62
|
+
* @type {{ [key: string]: boolean; }}
|
|
63
|
+
* @memberof AgentTool
|
|
64
|
+
*/
|
|
65
|
+
secret_field_status?: { [key: string]: boolean; };
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {Date}
|
|
69
|
+
* @memberof AgentTool
|
|
70
|
+
*/
|
|
71
|
+
created_at?: Date;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {Date}
|
|
75
|
+
* @memberof AgentTool
|
|
76
|
+
*/
|
|
77
|
+
updated_at?: Date;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Check if a given object implements the AgentTool interface.
|
|
82
|
+
*/
|
|
83
|
+
export function instanceOfAgentTool(value: object): value is AgentTool {
|
|
84
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
85
|
+
if (!('voice_agent_id' in value) || value['voice_agent_id'] === undefined) return false;
|
|
86
|
+
if (!('tool' in value) || value['tool'] === undefined) return false;
|
|
87
|
+
if (!('enabled' in value) || value['enabled'] === undefined) return false;
|
|
88
|
+
if (!('config' in value) || value['config'] === undefined) return false;
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function AgentToolFromJSON(json: any): AgentTool {
|
|
93
|
+
return AgentToolFromJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function AgentToolFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentTool {
|
|
97
|
+
if (json == null) {
|
|
98
|
+
return json;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
|
|
102
|
+
'id': json['id'],
|
|
103
|
+
'voice_agent_id': json['voice_agent_id'],
|
|
104
|
+
'tool': ToolFromJSON(json['tool']),
|
|
105
|
+
'enabled': json['enabled'],
|
|
106
|
+
'config': json['config'],
|
|
107
|
+
'secret_field_status': json['secret_field_status'] == null ? undefined : json['secret_field_status'],
|
|
108
|
+
'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
109
|
+
'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function AgentToolToJSON(json: any): AgentTool {
|
|
114
|
+
return AgentToolToJSONTyped(json, false);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function AgentToolToJSONTyped(value?: AgentTool | null, ignoreDiscriminator: boolean = false): any {
|
|
118
|
+
if (value == null) {
|
|
119
|
+
return value;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
|
|
124
|
+
'id': value['id'],
|
|
125
|
+
'voice_agent_id': value['voice_agent_id'],
|
|
126
|
+
'tool': ToolToJSON(value['tool']),
|
|
127
|
+
'enabled': value['enabled'],
|
|
128
|
+
'config': value['config'],
|
|
129
|
+
'secret_field_status': value['secret_field_status'],
|
|
130
|
+
'created_at': value['created_at'] == null ? value['created_at'] : value['created_at'].toISOString(),
|
|
131
|
+
'updated_at': value['updated_at'] == null ? value['updated_at'] : value['updated_at'].toISOString(),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AgentToolUpsert
|
|
20
|
+
*/
|
|
21
|
+
export interface AgentToolUpsert {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof AgentToolUpsert
|
|
26
|
+
*/
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Full config object including secret fields. Secrets sent here are encrypted server-side; omit a secret field to keep its existing value.
|
|
30
|
+
* @type {{ [key: string]: any; }}
|
|
31
|
+
* @memberof AgentToolUpsert
|
|
32
|
+
*/
|
|
33
|
+
config?: { [key: string]: any; };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the AgentToolUpsert interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfAgentToolUpsert(value: object): value is AgentToolUpsert {
|
|
40
|
+
if (!('enabled' in value) || value['enabled'] === undefined) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function AgentToolUpsertFromJSON(json: any): AgentToolUpsert {
|
|
45
|
+
return AgentToolUpsertFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function AgentToolUpsertFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentToolUpsert {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'enabled': json['enabled'],
|
|
55
|
+
'config': json['config'] == null ? undefined : json['config'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function AgentToolUpsertToJSON(json: any): AgentToolUpsert {
|
|
60
|
+
return AgentToolUpsertToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function AgentToolUpsertToJSONTyped(value?: AgentToolUpsert | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'enabled': value['enabled'],
|
|
71
|
+
'config': value['config'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -37,6 +37,12 @@ export interface CalendarEvent {
|
|
|
37
37
|
* @memberof CalendarEvent
|
|
38
38
|
*/
|
|
39
39
|
description?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof CalendarEvent
|
|
44
|
+
*/
|
|
45
|
+
caller?: string | null;
|
|
40
46
|
/**
|
|
41
47
|
*
|
|
42
48
|
* @type {Date}
|
|
@@ -82,6 +88,7 @@ export function CalendarEventFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
82
88
|
'id': json['id'],
|
|
83
89
|
'name': json['name'],
|
|
84
90
|
'description': json['description'] == null ? undefined : json['description'],
|
|
91
|
+
'caller': json['caller'] == null ? undefined : json['caller'],
|
|
85
92
|
'start_time': (new Date(json['start_time'])),
|
|
86
93
|
'end_time': (new Date(json['end_time'])),
|
|
87
94
|
'calendar_id': json['calendar_id'],
|
|
@@ -102,6 +109,7 @@ export function CalendarEventToJSONTyped(value?: CalendarEvent | null, ignoreDis
|
|
|
102
109
|
'id': value['id'],
|
|
103
110
|
'name': value['name'],
|
|
104
111
|
'description': value['description'],
|
|
112
|
+
'caller': value['caller'],
|
|
105
113
|
'start_time': value['start_time'].toISOString(),
|
|
106
114
|
'end_time': value['end_time'].toISOString(),
|
|
107
115
|
'calendar_id': value['calendar_id'],
|
|
@@ -31,6 +31,12 @@ export interface CalendarEventCreate {
|
|
|
31
31
|
* @memberof CalendarEventCreate
|
|
32
32
|
*/
|
|
33
33
|
description?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CalendarEventCreate
|
|
38
|
+
*/
|
|
39
|
+
caller?: string | null;
|
|
34
40
|
/**
|
|
35
41
|
*
|
|
36
42
|
* @type {Date}
|
|
@@ -67,6 +73,7 @@ export function CalendarEventCreateFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
67
73
|
|
|
68
74
|
'name': json['name'],
|
|
69
75
|
'description': json['description'] == null ? undefined : json['description'],
|
|
76
|
+
'caller': json['caller'] == null ? undefined : json['caller'],
|
|
70
77
|
'start_time': (new Date(json['start_time'])),
|
|
71
78
|
'end_time': (new Date(json['end_time'])),
|
|
72
79
|
};
|
|
@@ -85,6 +92,7 @@ export function CalendarEventCreateToJSONTyped(value?: CalendarEventCreate | nul
|
|
|
85
92
|
|
|
86
93
|
'name': value['name'],
|
|
87
94
|
'description': value['description'],
|
|
95
|
+
'caller': value['caller'],
|
|
88
96
|
'start_time': value['start_time'].toISOString(),
|
|
89
97
|
'end_time': value['end_time'].toISOString(),
|
|
90
98
|
};
|
|
@@ -31,6 +31,12 @@ export interface CalendarEventUpdate {
|
|
|
31
31
|
* @memberof CalendarEventUpdate
|
|
32
32
|
*/
|
|
33
33
|
description?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CalendarEventUpdate
|
|
38
|
+
*/
|
|
39
|
+
caller?: string | null;
|
|
34
40
|
/**
|
|
35
41
|
*
|
|
36
42
|
* @type {Date}
|
|
@@ -64,6 +70,7 @@ export function CalendarEventUpdateFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
64
70
|
|
|
65
71
|
'name': json['name'] == null ? undefined : json['name'],
|
|
66
72
|
'description': json['description'] == null ? undefined : json['description'],
|
|
73
|
+
'caller': json['caller'] == null ? undefined : json['caller'],
|
|
67
74
|
'start_time': json['start_time'] == null ? undefined : (new Date(json['start_time'])),
|
|
68
75
|
'end_time': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
|
|
69
76
|
};
|
|
@@ -82,6 +89,7 @@ export function CalendarEventUpdateToJSONTyped(value?: CalendarEventUpdate | nul
|
|
|
82
89
|
|
|
83
90
|
'name': value['name'],
|
|
84
91
|
'description': value['description'],
|
|
92
|
+
'caller': value['caller'],
|
|
85
93
|
'start_time': value['start_time'] == null ? value['start_time'] : value['start_time'].toISOString(),
|
|
86
94
|
'end_time': value['end_time'] == null ? value['end_time'] : value['end_time'].toISOString(),
|
|
87
95
|
};
|
package/src/models/Call.ts
CHANGED
package/src/models/CallCreate.ts
CHANGED
package/src/models/CallUpdate.ts
CHANGED