@l7mp/tivadar-ai-api-sdk 0.1.5 → 0.1.7
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 +11 -2
- package/dist/api-client.js +10 -1
- package/dist/apis/CallsApi.d.ts +92 -0
- package/dist/apis/CallsApi.js +256 -0
- package/dist/apis/RecordingsApi.d.ts +6 -6
- package/dist/apis/RecordingsApi.js +10 -10
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +11 -2
- package/dist/esm/api-client.js +10 -1
- package/dist/esm/apis/CallsApi.d.ts +92 -0
- package/dist/esm/apis/CallsApi.js +252 -0
- package/dist/esm/apis/RecordingsApi.d.ts +6 -6
- package/dist/esm/apis/RecordingsApi.js +10 -10
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/Call.d.ts +64 -0
- package/dist/esm/models/Call.js +55 -0
- package/dist/esm/models/CallCreate.d.ts +52 -0
- package/dist/esm/models/CallCreate.js +47 -0
- package/dist/esm/models/CallUpdate.d.ts +52 -0
- package/dist/esm/models/CallUpdate.js +47 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/Call.d.ts +64 -0
- package/dist/models/Call.js +62 -0
- package/dist/models/CallCreate.d.ts +52 -0
- package/dist/models/CallCreate.js +54 -0
- package/dist/models/CallUpdate.d.ts +52 -0
- package/dist/models/CallUpdate.js +54 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -2
- package/src/api-client.ts +22 -2
- package/src/apis/CallsApi.ts +352 -0
- package/src/apis/RecordingsApi.ts +13 -13
- package/src/apis/index.ts +1 -0
- package/src/models/Call.ts +107 -0
- package/src/models/CallCreate.ts +89 -0
- package/src/models/CallUpdate.ts +89 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,352 @@
|
|
|
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
|
+
Call,
|
|
19
|
+
CallCreate,
|
|
20
|
+
CallUpdate,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
CallFromJSON,
|
|
24
|
+
CallToJSON,
|
|
25
|
+
CallCreateFromJSON,
|
|
26
|
+
CallCreateToJSON,
|
|
27
|
+
CallUpdateFromJSON,
|
|
28
|
+
CallUpdateToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface OrganizationsOrganizationIdCallsCallIdDeleteRequest {
|
|
32
|
+
organizationId: string;
|
|
33
|
+
callId: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface OrganizationsOrganizationIdCallsCallIdGetRequest {
|
|
37
|
+
organizationId: string;
|
|
38
|
+
callId: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface OrganizationsOrganizationIdCallsCallIdPutRequest {
|
|
42
|
+
organizationId: string;
|
|
43
|
+
callId: string;
|
|
44
|
+
callUpdate: CallUpdate;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface OrganizationsOrganizationIdCallsGetRequest {
|
|
48
|
+
organizationId: string;
|
|
49
|
+
voiceAgentId?: string;
|
|
50
|
+
sandbox?: OrganizationsOrganizationIdCallsGetSandboxEnum;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface OrganizationsOrganizationIdCallsPostRequest {
|
|
54
|
+
organizationId: string;
|
|
55
|
+
callCreate: CallCreate;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
export class CallsApi extends runtime.BaseAPI {
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Delete a call
|
|
65
|
+
*/
|
|
66
|
+
async organizationsOrganizationIdCallsCallIdDeleteRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
67
|
+
if (requestParameters['organizationId'] == null) {
|
|
68
|
+
throw new runtime.RequiredError(
|
|
69
|
+
'organizationId',
|
|
70
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsCallIdDelete().'
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (requestParameters['callId'] == null) {
|
|
75
|
+
throw new runtime.RequiredError(
|
|
76
|
+
'callId',
|
|
77
|
+
'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdDelete().'
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const queryParameters: any = {};
|
|
82
|
+
|
|
83
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
84
|
+
|
|
85
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
86
|
+
const token = this.configuration.accessToken;
|
|
87
|
+
const tokenString = await token("bearerAuth", []);
|
|
88
|
+
|
|
89
|
+
if (tokenString) {
|
|
90
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
let urlPath = `/organizations/{organizationId}/calls/{callId}`;
|
|
95
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
96
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
97
|
+
|
|
98
|
+
const response = await this.request({
|
|
99
|
+
path: urlPath,
|
|
100
|
+
method: 'DELETE',
|
|
101
|
+
headers: headerParameters,
|
|
102
|
+
query: queryParameters,
|
|
103
|
+
}, initOverrides);
|
|
104
|
+
|
|
105
|
+
return new runtime.VoidApiResponse(response);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Delete a call
|
|
110
|
+
*/
|
|
111
|
+
async organizationsOrganizationIdCallsCallIdDelete(requestParameters: OrganizationsOrganizationIdCallsCallIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
112
|
+
await this.organizationsOrganizationIdCallsCallIdDeleteRaw(requestParameters, initOverrides);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Get a call by ID
|
|
117
|
+
*/
|
|
118
|
+
async organizationsOrganizationIdCallsCallIdGetRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Call>> {
|
|
119
|
+
if (requestParameters['organizationId'] == null) {
|
|
120
|
+
throw new runtime.RequiredError(
|
|
121
|
+
'organizationId',
|
|
122
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsCallIdGet().'
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (requestParameters['callId'] == null) {
|
|
127
|
+
throw new runtime.RequiredError(
|
|
128
|
+
'callId',
|
|
129
|
+
'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdGet().'
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const queryParameters: any = {};
|
|
134
|
+
|
|
135
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
136
|
+
|
|
137
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
138
|
+
const token = this.configuration.accessToken;
|
|
139
|
+
const tokenString = await token("bearerAuth", []);
|
|
140
|
+
|
|
141
|
+
if (tokenString) {
|
|
142
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
let urlPath = `/organizations/{organizationId}/calls/{callId}`;
|
|
147
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
148
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
149
|
+
|
|
150
|
+
const response = await this.request({
|
|
151
|
+
path: urlPath,
|
|
152
|
+
method: 'GET',
|
|
153
|
+
headers: headerParameters,
|
|
154
|
+
query: queryParameters,
|
|
155
|
+
}, initOverrides);
|
|
156
|
+
|
|
157
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CallFromJSON(jsonValue));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Get a call by ID
|
|
162
|
+
*/
|
|
163
|
+
async organizationsOrganizationIdCallsCallIdGet(requestParameters: OrganizationsOrganizationIdCallsCallIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Call> {
|
|
164
|
+
const response = await this.organizationsOrganizationIdCallsCallIdGetRaw(requestParameters, initOverrides);
|
|
165
|
+
return await response.value();
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Partial update — only provided fields are modified.
|
|
170
|
+
* Update a call
|
|
171
|
+
*/
|
|
172
|
+
async organizationsOrganizationIdCallsCallIdPutRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Call>> {
|
|
173
|
+
if (requestParameters['organizationId'] == null) {
|
|
174
|
+
throw new runtime.RequiredError(
|
|
175
|
+
'organizationId',
|
|
176
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsCallIdPut().'
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (requestParameters['callId'] == null) {
|
|
181
|
+
throw new runtime.RequiredError(
|
|
182
|
+
'callId',
|
|
183
|
+
'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdPut().'
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (requestParameters['callUpdate'] == null) {
|
|
188
|
+
throw new runtime.RequiredError(
|
|
189
|
+
'callUpdate',
|
|
190
|
+
'Required parameter "callUpdate" was null or undefined when calling organizationsOrganizationIdCallsCallIdPut().'
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
const queryParameters: any = {};
|
|
195
|
+
|
|
196
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
197
|
+
|
|
198
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
199
|
+
|
|
200
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
201
|
+
const token = this.configuration.accessToken;
|
|
202
|
+
const tokenString = await token("bearerAuth", []);
|
|
203
|
+
|
|
204
|
+
if (tokenString) {
|
|
205
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
let urlPath = `/organizations/{organizationId}/calls/{callId}`;
|
|
210
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
211
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
212
|
+
|
|
213
|
+
const response = await this.request({
|
|
214
|
+
path: urlPath,
|
|
215
|
+
method: 'PUT',
|
|
216
|
+
headers: headerParameters,
|
|
217
|
+
query: queryParameters,
|
|
218
|
+
body: CallUpdateToJSON(requestParameters['callUpdate']),
|
|
219
|
+
}, initOverrides);
|
|
220
|
+
|
|
221
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CallFromJSON(jsonValue));
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Partial update — only provided fields are modified.
|
|
226
|
+
* Update a call
|
|
227
|
+
*/
|
|
228
|
+
async organizationsOrganizationIdCallsCallIdPut(requestParameters: OrganizationsOrganizationIdCallsCallIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Call> {
|
|
229
|
+
const response = await this.organizationsOrganizationIdCallsCallIdPutRaw(requestParameters, initOverrides);
|
|
230
|
+
return await response.value();
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Returns calls scoped to the organization via their associated voice agent. Calls without a voice_agent_id are not returned.
|
|
235
|
+
* List calls for an organization
|
|
236
|
+
*/
|
|
237
|
+
async organizationsOrganizationIdCallsGetRaw(requestParameters: OrganizationsOrganizationIdCallsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Call>>> {
|
|
238
|
+
if (requestParameters['organizationId'] == null) {
|
|
239
|
+
throw new runtime.RequiredError(
|
|
240
|
+
'organizationId',
|
|
241
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsGet().'
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const queryParameters: any = {};
|
|
246
|
+
|
|
247
|
+
if (requestParameters['voiceAgentId'] != null) {
|
|
248
|
+
queryParameters['voice_agent_id'] = requestParameters['voiceAgentId'];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (requestParameters['sandbox'] != null) {
|
|
252
|
+
queryParameters['sandbox'] = requestParameters['sandbox'];
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
256
|
+
|
|
257
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
258
|
+
const token = this.configuration.accessToken;
|
|
259
|
+
const tokenString = await token("bearerAuth", []);
|
|
260
|
+
|
|
261
|
+
if (tokenString) {
|
|
262
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
let urlPath = `/organizations/{organizationId}/calls`;
|
|
267
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
268
|
+
|
|
269
|
+
const response = await this.request({
|
|
270
|
+
path: urlPath,
|
|
271
|
+
method: 'GET',
|
|
272
|
+
headers: headerParameters,
|
|
273
|
+
query: queryParameters,
|
|
274
|
+
}, initOverrides);
|
|
275
|
+
|
|
276
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CallFromJSON));
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Returns calls scoped to the organization via their associated voice agent. Calls without a voice_agent_id are not returned.
|
|
281
|
+
* List calls for an organization
|
|
282
|
+
*/
|
|
283
|
+
async organizationsOrganizationIdCallsGet(requestParameters: OrganizationsOrganizationIdCallsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Call>> {
|
|
284
|
+
const response = await this.organizationsOrganizationIdCallsGetRaw(requestParameters, initOverrides);
|
|
285
|
+
return await response.value();
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Create a new call record
|
|
290
|
+
*/
|
|
291
|
+
async organizationsOrganizationIdCallsPostRaw(requestParameters: OrganizationsOrganizationIdCallsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Call>> {
|
|
292
|
+
if (requestParameters['organizationId'] == null) {
|
|
293
|
+
throw new runtime.RequiredError(
|
|
294
|
+
'organizationId',
|
|
295
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsPost().'
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (requestParameters['callCreate'] == null) {
|
|
300
|
+
throw new runtime.RequiredError(
|
|
301
|
+
'callCreate',
|
|
302
|
+
'Required parameter "callCreate" was null or undefined when calling organizationsOrganizationIdCallsPost().'
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
const queryParameters: any = {};
|
|
307
|
+
|
|
308
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
309
|
+
|
|
310
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
311
|
+
|
|
312
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
313
|
+
const token = this.configuration.accessToken;
|
|
314
|
+
const tokenString = await token("bearerAuth", []);
|
|
315
|
+
|
|
316
|
+
if (tokenString) {
|
|
317
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
let urlPath = `/organizations/{organizationId}/calls`;
|
|
322
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
323
|
+
|
|
324
|
+
const response = await this.request({
|
|
325
|
+
path: urlPath,
|
|
326
|
+
method: 'POST',
|
|
327
|
+
headers: headerParameters,
|
|
328
|
+
query: queryParameters,
|
|
329
|
+
body: CallCreateToJSON(requestParameters['callCreate']),
|
|
330
|
+
}, initOverrides);
|
|
331
|
+
|
|
332
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CallFromJSON(jsonValue));
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Create a new call record
|
|
337
|
+
*/
|
|
338
|
+
async organizationsOrganizationIdCallsPost(requestParameters: OrganizationsOrganizationIdCallsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Call> {
|
|
339
|
+
const response = await this.organizationsOrganizationIdCallsPostRaw(requestParameters, initOverrides);
|
|
340
|
+
return await response.value();
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* @export
|
|
347
|
+
*/
|
|
348
|
+
export const OrganizationsOrganizationIdCallsGetSandboxEnum = {
|
|
349
|
+
True: 'true',
|
|
350
|
+
False: 'false'
|
|
351
|
+
} as const;
|
|
352
|
+
export type OrganizationsOrganizationIdCallsGetSandboxEnum = typeof OrganizationsOrganizationIdCallsGetSandboxEnum[keyof typeof OrganizationsOrganizationIdCallsGetSandboxEnum];
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
RecordingSignedUrlToJSON,
|
|
23
23
|
} from '../models/index';
|
|
24
24
|
|
|
25
|
-
export interface
|
|
25
|
+
export interface OrganizationsOrganizationIdRecordingsCallIdGetRequest {
|
|
26
26
|
organizationId: string;
|
|
27
|
-
|
|
27
|
+
callId: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -33,20 +33,20 @@ export interface OrganizationsOrganizationIdRecordingsConversationIdGetRequest {
|
|
|
33
33
|
export class RecordingsApi extends runtime.BaseAPI {
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* Get a signed URL for a
|
|
36
|
+
* Get a signed URL for a call recording
|
|
37
37
|
*/
|
|
38
|
-
async
|
|
38
|
+
async organizationsOrganizationIdRecordingsCallIdGetRaw(requestParameters: OrganizationsOrganizationIdRecordingsCallIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecordingSignedUrl>> {
|
|
39
39
|
if (requestParameters['organizationId'] == null) {
|
|
40
40
|
throw new runtime.RequiredError(
|
|
41
41
|
'organizationId',
|
|
42
|
-
'Required parameter "organizationId" was null or undefined when calling
|
|
42
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRecordingsCallIdGet().'
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
if (requestParameters['
|
|
46
|
+
if (requestParameters['callId'] == null) {
|
|
47
47
|
throw new runtime.RequiredError(
|
|
48
|
-
'
|
|
49
|
-
'Required parameter "
|
|
48
|
+
'callId',
|
|
49
|
+
'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdRecordingsCallIdGet().'
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -63,9 +63,9 @@ export class RecordingsApi extends runtime.BaseAPI {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
let urlPath = `/organizations/{organizationId}/recordings/{
|
|
66
|
+
let urlPath = `/organizations/{organizationId}/recordings/{callId}`;
|
|
67
67
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
68
|
-
urlPath = urlPath.replace(`{${"
|
|
68
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
69
69
|
|
|
70
70
|
const response = await this.request({
|
|
71
71
|
path: urlPath,
|
|
@@ -78,10 +78,10 @@ export class RecordingsApi extends runtime.BaseAPI {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
* Get a signed URL for a
|
|
81
|
+
* Get a signed URL for a call recording
|
|
82
82
|
*/
|
|
83
|
-
async
|
|
84
|
-
const response = await this.
|
|
83
|
+
async organizationsOrganizationIdRecordingsCallIdGet(requestParameters: OrganizationsOrganizationIdRecordingsCallIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecordingSignedUrl> {
|
|
84
|
+
const response = await this.organizationsOrganizationIdRecordingsCallIdGetRaw(requestParameters, initOverrides);
|
|
85
85
|
return await response.value();
|
|
86
86
|
}
|
|
87
87
|
|
package/src/apis/index.ts
CHANGED
|
@@ -0,0 +1,107 @@
|
|
|
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 Call
|
|
20
|
+
*/
|
|
21
|
+
export interface Call {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof Call
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Call
|
|
32
|
+
*/
|
|
33
|
+
voice_agent_id?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {{ [key: string]: any; }}
|
|
37
|
+
* @memberof Call
|
|
38
|
+
*/
|
|
39
|
+
data?: { [key: string]: any; } | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof Call
|
|
44
|
+
*/
|
|
45
|
+
caller?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
* @memberof Call
|
|
50
|
+
*/
|
|
51
|
+
sandbox?: boolean | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof Call
|
|
56
|
+
*/
|
|
57
|
+
created_at: Date;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the Call interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfCall(value: object): value is Call {
|
|
64
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
65
|
+
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function CallFromJSON(json: any): Call {
|
|
70
|
+
return CallFromJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function CallFromJSONTyped(json: any, ignoreDiscriminator: boolean): Call {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'id': json['id'],
|
|
80
|
+
'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
|
|
81
|
+
'data': json['data'] == null ? undefined : json['data'],
|
|
82
|
+
'caller': json['caller'] == null ? undefined : json['caller'],
|
|
83
|
+
'sandbox': json['sandbox'] == null ? undefined : json['sandbox'],
|
|
84
|
+
'created_at': (new Date(json['created_at'])),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function CallToJSON(json: any): Call {
|
|
89
|
+
return CallToJSONTyped(json, false);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function CallToJSONTyped(value?: Call | null, ignoreDiscriminator: boolean = false): any {
|
|
93
|
+
if (value == null) {
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
|
|
99
|
+
'id': value['id'],
|
|
100
|
+
'voice_agent_id': value['voice_agent_id'],
|
|
101
|
+
'data': value['data'],
|
|
102
|
+
'caller': value['caller'],
|
|
103
|
+
'sandbox': value['sandbox'],
|
|
104
|
+
'created_at': value['created_at'].toISOString(),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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 CallCreate
|
|
20
|
+
*/
|
|
21
|
+
export interface CallCreate {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CallCreate
|
|
26
|
+
*/
|
|
27
|
+
voice_agent_id?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {{ [key: string]: any; }}
|
|
31
|
+
* @memberof CallCreate
|
|
32
|
+
*/
|
|
33
|
+
data?: { [key: string]: any; } | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CallCreate
|
|
38
|
+
*/
|
|
39
|
+
caller?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof CallCreate
|
|
44
|
+
*/
|
|
45
|
+
sandbox?: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the CallCreate interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfCallCreate(value: object): value is CallCreate {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CallCreateFromJSON(json: any): CallCreate {
|
|
56
|
+
return CallCreateFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CallCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): CallCreate {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
|
|
66
|
+
'data': json['data'] == null ? undefined : json['data'],
|
|
67
|
+
'caller': json['caller'] == null ? undefined : json['caller'],
|
|
68
|
+
'sandbox': json['sandbox'] == null ? undefined : json['sandbox'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CallCreateToJSON(json: any): CallCreate {
|
|
73
|
+
return CallCreateToJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function CallCreateToJSONTyped(value?: CallCreate | null, ignoreDiscriminator: boolean = false): any {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'voice_agent_id': value['voice_agent_id'],
|
|
84
|
+
'data': value['data'],
|
|
85
|
+
'caller': value['caller'],
|
|
86
|
+
'sandbox': value['sandbox'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|