@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,92 @@
|
|
|
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 { Call, CallCreate, CallUpdate } from '../models/index';
|
|
14
|
+
export interface OrganizationsOrganizationIdCallsCallIdDeleteRequest {
|
|
15
|
+
organizationId: string;
|
|
16
|
+
callId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface OrganizationsOrganizationIdCallsCallIdGetRequest {
|
|
19
|
+
organizationId: string;
|
|
20
|
+
callId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface OrganizationsOrganizationIdCallsCallIdPutRequest {
|
|
23
|
+
organizationId: string;
|
|
24
|
+
callId: string;
|
|
25
|
+
callUpdate: CallUpdate;
|
|
26
|
+
}
|
|
27
|
+
export interface OrganizationsOrganizationIdCallsGetRequest {
|
|
28
|
+
organizationId: string;
|
|
29
|
+
voiceAgentId?: string;
|
|
30
|
+
sandbox?: OrganizationsOrganizationIdCallsGetSandboxEnum;
|
|
31
|
+
}
|
|
32
|
+
export interface OrganizationsOrganizationIdCallsPostRequest {
|
|
33
|
+
organizationId: string;
|
|
34
|
+
callCreate: CallCreate;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
export declare class CallsApi extends runtime.BaseAPI {
|
|
40
|
+
/**
|
|
41
|
+
* Delete a call
|
|
42
|
+
*/
|
|
43
|
+
organizationsOrganizationIdCallsCallIdDeleteRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
44
|
+
/**
|
|
45
|
+
* Delete a call
|
|
46
|
+
*/
|
|
47
|
+
organizationsOrganizationIdCallsCallIdDelete(requestParameters: OrganizationsOrganizationIdCallsCallIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Get a call by ID
|
|
50
|
+
*/
|
|
51
|
+
organizationsOrganizationIdCallsCallIdGetRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Call>>;
|
|
52
|
+
/**
|
|
53
|
+
* Get a call by ID
|
|
54
|
+
*/
|
|
55
|
+
organizationsOrganizationIdCallsCallIdGet(requestParameters: OrganizationsOrganizationIdCallsCallIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Call>;
|
|
56
|
+
/**
|
|
57
|
+
* Partial update — only provided fields are modified.
|
|
58
|
+
* Update a call
|
|
59
|
+
*/
|
|
60
|
+
organizationsOrganizationIdCallsCallIdPutRaw(requestParameters: OrganizationsOrganizationIdCallsCallIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Call>>;
|
|
61
|
+
/**
|
|
62
|
+
* Partial update — only provided fields are modified.
|
|
63
|
+
* Update a call
|
|
64
|
+
*/
|
|
65
|
+
organizationsOrganizationIdCallsCallIdPut(requestParameters: OrganizationsOrganizationIdCallsCallIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Call>;
|
|
66
|
+
/**
|
|
67
|
+
* Returns calls scoped to the organization via their associated voice agent. Calls without a voice_agent_id are not returned.
|
|
68
|
+
* List calls for an organization
|
|
69
|
+
*/
|
|
70
|
+
organizationsOrganizationIdCallsGetRaw(requestParameters: OrganizationsOrganizationIdCallsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Call>>>;
|
|
71
|
+
/**
|
|
72
|
+
* Returns calls scoped to the organization via their associated voice agent. Calls without a voice_agent_id are not returned.
|
|
73
|
+
* List calls for an organization
|
|
74
|
+
*/
|
|
75
|
+
organizationsOrganizationIdCallsGet(requestParameters: OrganizationsOrganizationIdCallsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Call>>;
|
|
76
|
+
/**
|
|
77
|
+
* Create a new call record
|
|
78
|
+
*/
|
|
79
|
+
organizationsOrganizationIdCallsPostRaw(requestParameters: OrganizationsOrganizationIdCallsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Call>>;
|
|
80
|
+
/**
|
|
81
|
+
* Create a new call record
|
|
82
|
+
*/
|
|
83
|
+
organizationsOrganizationIdCallsPost(requestParameters: OrganizationsOrganizationIdCallsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Call>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @export
|
|
87
|
+
*/
|
|
88
|
+
export declare const OrganizationsOrganizationIdCallsGetSandboxEnum: {
|
|
89
|
+
readonly True: "true";
|
|
90
|
+
readonly False: "false";
|
|
91
|
+
};
|
|
92
|
+
export type OrganizationsOrganizationIdCallsGetSandboxEnum = typeof OrganizationsOrganizationIdCallsGetSandboxEnum[keyof typeof OrganizationsOrganizationIdCallsGetSandboxEnum];
|
|
@@ -0,0 +1,252 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { CallFromJSON, CallCreateToJSON, CallUpdateToJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class CallsApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Delete a call
|
|
31
|
+
*/
|
|
32
|
+
organizationsOrganizationIdCallsCallIdDeleteRaw(requestParameters, initOverrides) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['organizationId'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsCallIdDelete().');
|
|
36
|
+
}
|
|
37
|
+
if (requestParameters['callId'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('callId', 'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdDelete().');
|
|
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}/calls/{callId}`;
|
|
50
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
51
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
52
|
+
const response = yield this.request({
|
|
53
|
+
path: urlPath,
|
|
54
|
+
method: 'DELETE',
|
|
55
|
+
headers: headerParameters,
|
|
56
|
+
query: queryParameters,
|
|
57
|
+
}, initOverrides);
|
|
58
|
+
return new runtime.VoidApiResponse(response);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Delete a call
|
|
63
|
+
*/
|
|
64
|
+
organizationsOrganizationIdCallsCallIdDelete(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
yield this.organizationsOrganizationIdCallsCallIdDeleteRaw(requestParameters, initOverrides);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Get a call by ID
|
|
71
|
+
*/
|
|
72
|
+
organizationsOrganizationIdCallsCallIdGetRaw(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 organizationsOrganizationIdCallsCallIdGet().');
|
|
76
|
+
}
|
|
77
|
+
if (requestParameters['callId'] == null) {
|
|
78
|
+
throw new runtime.RequiredError('callId', 'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdGet().');
|
|
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}/calls/{callId}`;
|
|
90
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
91
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
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) => CallFromJSON(jsonValue));
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get a call by ID
|
|
103
|
+
*/
|
|
104
|
+
organizationsOrganizationIdCallsCallIdGet(requestParameters, initOverrides) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const response = yield this.organizationsOrganizationIdCallsCallIdGetRaw(requestParameters, initOverrides);
|
|
107
|
+
return yield response.value();
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Partial update — only provided fields are modified.
|
|
112
|
+
* Update a call
|
|
113
|
+
*/
|
|
114
|
+
organizationsOrganizationIdCallsCallIdPutRaw(requestParameters, initOverrides) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
if (requestParameters['organizationId'] == null) {
|
|
117
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsCallIdPut().');
|
|
118
|
+
}
|
|
119
|
+
if (requestParameters['callId'] == null) {
|
|
120
|
+
throw new runtime.RequiredError('callId', 'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdCallsCallIdPut().');
|
|
121
|
+
}
|
|
122
|
+
if (requestParameters['callUpdate'] == null) {
|
|
123
|
+
throw new runtime.RequiredError('callUpdate', 'Required parameter "callUpdate" was null or undefined when calling organizationsOrganizationIdCallsCallIdPut().');
|
|
124
|
+
}
|
|
125
|
+
const queryParameters = {};
|
|
126
|
+
const headerParameters = {};
|
|
127
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
128
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
129
|
+
const token = this.configuration.accessToken;
|
|
130
|
+
const tokenString = yield token("bearerAuth", []);
|
|
131
|
+
if (tokenString) {
|
|
132
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
let urlPath = `/organizations/{organizationId}/calls/{callId}`;
|
|
136
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
137
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
138
|
+
const response = yield this.request({
|
|
139
|
+
path: urlPath,
|
|
140
|
+
method: 'PUT',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
body: CallUpdateToJSON(requestParameters['callUpdate']),
|
|
144
|
+
}, initOverrides);
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CallFromJSON(jsonValue));
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Partial update — only provided fields are modified.
|
|
150
|
+
* Update a call
|
|
151
|
+
*/
|
|
152
|
+
organizationsOrganizationIdCallsCallIdPut(requestParameters, initOverrides) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
const response = yield this.organizationsOrganizationIdCallsCallIdPutRaw(requestParameters, initOverrides);
|
|
155
|
+
return yield response.value();
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Returns calls scoped to the organization via their associated voice agent. Calls without a voice_agent_id are not returned.
|
|
160
|
+
* List calls for an organization
|
|
161
|
+
*/
|
|
162
|
+
organizationsOrganizationIdCallsGetRaw(requestParameters, initOverrides) {
|
|
163
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
if (requestParameters['organizationId'] == null) {
|
|
165
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsGet().');
|
|
166
|
+
}
|
|
167
|
+
const queryParameters = {};
|
|
168
|
+
if (requestParameters['voiceAgentId'] != null) {
|
|
169
|
+
queryParameters['voice_agent_id'] = requestParameters['voiceAgentId'];
|
|
170
|
+
}
|
|
171
|
+
if (requestParameters['sandbox'] != null) {
|
|
172
|
+
queryParameters['sandbox'] = requestParameters['sandbox'];
|
|
173
|
+
}
|
|
174
|
+
const headerParameters = {};
|
|
175
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
176
|
+
const token = this.configuration.accessToken;
|
|
177
|
+
const tokenString = yield token("bearerAuth", []);
|
|
178
|
+
if (tokenString) {
|
|
179
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
let urlPath = `/organizations/{organizationId}/calls`;
|
|
183
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
184
|
+
const response = yield this.request({
|
|
185
|
+
path: urlPath,
|
|
186
|
+
method: 'GET',
|
|
187
|
+
headers: headerParameters,
|
|
188
|
+
query: queryParameters,
|
|
189
|
+
}, initOverrides);
|
|
190
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CallFromJSON));
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Returns calls scoped to the organization via their associated voice agent. Calls without a voice_agent_id are not returned.
|
|
195
|
+
* List calls for an organization
|
|
196
|
+
*/
|
|
197
|
+
organizationsOrganizationIdCallsGet(requestParameters, initOverrides) {
|
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
const response = yield this.organizationsOrganizationIdCallsGetRaw(requestParameters, initOverrides);
|
|
200
|
+
return yield response.value();
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Create a new call record
|
|
205
|
+
*/
|
|
206
|
+
organizationsOrganizationIdCallsPostRaw(requestParameters, initOverrides) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
if (requestParameters['organizationId'] == null) {
|
|
209
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCallsPost().');
|
|
210
|
+
}
|
|
211
|
+
if (requestParameters['callCreate'] == null) {
|
|
212
|
+
throw new runtime.RequiredError('callCreate', 'Required parameter "callCreate" was null or undefined when calling organizationsOrganizationIdCallsPost().');
|
|
213
|
+
}
|
|
214
|
+
const queryParameters = {};
|
|
215
|
+
const headerParameters = {};
|
|
216
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
217
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
218
|
+
const token = this.configuration.accessToken;
|
|
219
|
+
const tokenString = yield token("bearerAuth", []);
|
|
220
|
+
if (tokenString) {
|
|
221
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
let urlPath = `/organizations/{organizationId}/calls`;
|
|
225
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
226
|
+
const response = yield this.request({
|
|
227
|
+
path: urlPath,
|
|
228
|
+
method: 'POST',
|
|
229
|
+
headers: headerParameters,
|
|
230
|
+
query: queryParameters,
|
|
231
|
+
body: CallCreateToJSON(requestParameters['callCreate']),
|
|
232
|
+
}, initOverrides);
|
|
233
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CallFromJSON(jsonValue));
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Create a new call record
|
|
238
|
+
*/
|
|
239
|
+
organizationsOrganizationIdCallsPost(requestParameters, initOverrides) {
|
|
240
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
241
|
+
const response = yield this.organizationsOrganizationIdCallsPostRaw(requestParameters, initOverrides);
|
|
242
|
+
return yield response.value();
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* @export
|
|
248
|
+
*/
|
|
249
|
+
export const OrganizationsOrganizationIdCallsGetSandboxEnum = {
|
|
250
|
+
True: 'true',
|
|
251
|
+
False: 'false'
|
|
252
|
+
};
|
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import type { RecordingSignedUrl } from '../models/index';
|
|
14
|
-
export interface
|
|
14
|
+
export interface OrganizationsOrganizationIdRecordingsCallIdGetRequest {
|
|
15
15
|
organizationId: string;
|
|
16
|
-
|
|
16
|
+
callId: string;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
export declare class RecordingsApi extends runtime.BaseAPI {
|
|
22
22
|
/**
|
|
23
|
-
* Get a signed URL for a
|
|
23
|
+
* Get a signed URL for a call recording
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
organizationsOrganizationIdRecordingsCallIdGetRaw(requestParameters: OrganizationsOrganizationIdRecordingsCallIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecordingSignedUrl>>;
|
|
26
26
|
/**
|
|
27
|
-
* Get a signed URL for a
|
|
27
|
+
* Get a signed URL for a call recording
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
organizationsOrganizationIdRecordingsCallIdGet(requestParameters: OrganizationsOrganizationIdRecordingsCallIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecordingSignedUrl>;
|
|
30
30
|
}
|
|
@@ -27,15 +27,15 @@ import { RecordingSignedUrlFromJSON, } from '../models/index';
|
|
|
27
27
|
*/
|
|
28
28
|
export class RecordingsApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
* Get a signed URL for a
|
|
30
|
+
* Get a signed URL for a call recording
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
organizationsOrganizationIdRecordingsCallIdGetRaw(requestParameters, initOverrides) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
34
|
if (requestParameters['organizationId'] == null) {
|
|
35
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
35
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRecordingsCallIdGet().');
|
|
36
36
|
}
|
|
37
|
-
if (requestParameters['
|
|
38
|
-
throw new runtime.RequiredError('
|
|
37
|
+
if (requestParameters['callId'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('callId', 'Required parameter "callId" was null or undefined when calling organizationsOrganizationIdRecordingsCallIdGet().');
|
|
39
39
|
}
|
|
40
40
|
const queryParameters = {};
|
|
41
41
|
const headerParameters = {};
|
|
@@ -46,9 +46,9 @@ export class RecordingsApi extends runtime.BaseAPI {
|
|
|
46
46
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
let urlPath = `/organizations/{organizationId}/recordings/{
|
|
49
|
+
let urlPath = `/organizations/{organizationId}/recordings/{callId}`;
|
|
50
50
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
51
|
-
urlPath = urlPath.replace(`{${"
|
|
51
|
+
urlPath = urlPath.replace(`{${"callId"}}`, encodeURIComponent(String(requestParameters['callId'])));
|
|
52
52
|
const response = yield this.request({
|
|
53
53
|
path: urlPath,
|
|
54
54
|
method: 'GET',
|
|
@@ -59,11 +59,11 @@ export class RecordingsApi extends runtime.BaseAPI {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* Get a signed URL for a
|
|
62
|
+
* Get a signed URL for a call recording
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
organizationsOrganizationIdRecordingsCallIdGet(requestParameters, initOverrides) {
|
|
65
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
const response = yield this.
|
|
66
|
+
const response = yield this.organizationsOrganizationIdRecordingsCallIdGetRaw(requestParameters, initOverrides);
|
|
67
67
|
return yield response.value();
|
|
68
68
|
});
|
|
69
69
|
}
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface Call
|
|
16
|
+
*/
|
|
17
|
+
export interface Call {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof Call
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof Call
|
|
28
|
+
*/
|
|
29
|
+
voice_agent_id?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {{ [key: string]: any; }}
|
|
33
|
+
* @memberof Call
|
|
34
|
+
*/
|
|
35
|
+
data?: {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
} | null;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof Call
|
|
42
|
+
*/
|
|
43
|
+
caller?: string | null;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {boolean}
|
|
47
|
+
* @memberof Call
|
|
48
|
+
*/
|
|
49
|
+
sandbox?: boolean | null;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {Date}
|
|
53
|
+
* @memberof Call
|
|
54
|
+
*/
|
|
55
|
+
created_at: Date;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the Call interface.
|
|
59
|
+
*/
|
|
60
|
+
export declare function instanceOfCall(value: object): value is Call;
|
|
61
|
+
export declare function CallFromJSON(json: any): Call;
|
|
62
|
+
export declare function CallFromJSONTyped(json: any, ignoreDiscriminator: boolean): Call;
|
|
63
|
+
export declare function CallToJSON(json: any): Call;
|
|
64
|
+
export declare function CallToJSONTyped(value?: Call | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
* Check if a given object implements the Call interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfCall(value) {
|
|
18
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('created_at' in value) || value['created_at'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function CallFromJSON(json) {
|
|
25
|
+
return CallFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function CallFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'id': json['id'],
|
|
33
|
+
'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
|
|
34
|
+
'data': json['data'] == null ? undefined : json['data'],
|
|
35
|
+
'caller': json['caller'] == null ? undefined : json['caller'],
|
|
36
|
+
'sandbox': json['sandbox'] == null ? undefined : json['sandbox'],
|
|
37
|
+
'created_at': (new Date(json['created_at'])),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function CallToJSON(json) {
|
|
41
|
+
return CallToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
export function CallToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'id': value['id'],
|
|
49
|
+
'voice_agent_id': value['voice_agent_id'],
|
|
50
|
+
'data': value['data'],
|
|
51
|
+
'caller': value['caller'],
|
|
52
|
+
'sandbox': value['sandbox'],
|
|
53
|
+
'created_at': value['created_at'].toISOString(),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CallCreate
|
|
16
|
+
*/
|
|
17
|
+
export interface CallCreate {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CallCreate
|
|
22
|
+
*/
|
|
23
|
+
voice_agent_id?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {{ [key: string]: any; }}
|
|
27
|
+
* @memberof CallCreate
|
|
28
|
+
*/
|
|
29
|
+
data?: {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
} | null;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof CallCreate
|
|
36
|
+
*/
|
|
37
|
+
caller?: string | null;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
* @memberof CallCreate
|
|
42
|
+
*/
|
|
43
|
+
sandbox?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the CallCreate interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfCallCreate(value: object): value is CallCreate;
|
|
49
|
+
export declare function CallCreateFromJSON(json: any): CallCreate;
|
|
50
|
+
export declare function CallCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): CallCreate;
|
|
51
|
+
export declare function CallCreateToJSON(json: any): CallCreate;
|
|
52
|
+
export declare function CallCreateToJSONTyped(value?: CallCreate | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
* Check if a given object implements the CallCreate interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfCallCreate(value) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
export function CallCreateFromJSON(json) {
|
|
21
|
+
return CallCreateFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function CallCreateFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
|
|
29
|
+
'data': json['data'] == null ? undefined : json['data'],
|
|
30
|
+
'caller': json['caller'] == null ? undefined : json['caller'],
|
|
31
|
+
'sandbox': json['sandbox'] == null ? undefined : json['sandbox'],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function CallCreateToJSON(json) {
|
|
35
|
+
return CallCreateToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function CallCreateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'voice_agent_id': value['voice_agent_id'],
|
|
43
|
+
'data': value['data'],
|
|
44
|
+
'caller': value['caller'],
|
|
45
|
+
'sandbox': value['sandbox'],
|
|
46
|
+
};
|
|
47
|
+
}
|