@l7mp/tivadar-ai-api-sdk 0.1.4 → 0.1.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 +23 -7
- package/dist/api-client.js +35 -6
- package/dist/apis/CalendarApi.d.ts +64 -48
- package/dist/apis/CalendarApi.js +152 -87
- package/dist/apis/CallsApi.d.ts +92 -0
- package/dist/apis/CallsApi.js +256 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +23 -7
- package/dist/esm/api-client.js +35 -6
- package/dist/esm/apis/CalendarApi.d.ts +64 -48
- package/dist/esm/apis/CalendarApi.js +153 -88
- package/dist/esm/apis/CallsApi.d.ts +92 -0
- package/dist/esm/apis/CallsApi.js +252 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/Calendar.d.ts +6 -0
- package/dist/esm/models/Calendar.js +2 -0
- package/dist/esm/models/CalendarCreate.d.ts +32 -0
- package/dist/esm/models/CalendarCreate.js +43 -0
- package/dist/esm/models/CalendarEventCreate.d.ts +0 -6
- package/dist/esm/models/CalendarEventCreate.js +0 -4
- package/dist/esm/models/CalendarEventListResponse.d.ts +33 -0
- package/dist/esm/models/CalendarEventListResponse.js +44 -0
- package/dist/esm/models/CalendarEventUpdate.d.ts +0 -6
- package/dist/esm/models/CalendarEventUpdate.js +0 -2
- package/dist/esm/models/CalendarUpdate.d.ts +32 -0
- package/dist/esm/models/CalendarUpdate.js +41 -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 +6 -2
- package/dist/esm/models/index.js +6 -2
- package/dist/models/Calendar.d.ts +6 -0
- package/dist/models/Calendar.js +2 -0
- package/dist/models/CalendarCreate.d.ts +32 -0
- package/dist/models/CalendarCreate.js +50 -0
- package/dist/models/CalendarEventCreate.d.ts +0 -6
- package/dist/models/CalendarEventCreate.js +0 -4
- package/dist/models/CalendarEventListResponse.d.ts +33 -0
- package/dist/models/CalendarEventListResponse.js +51 -0
- package/dist/models/CalendarEventUpdate.d.ts +0 -6
- package/dist/models/CalendarEventUpdate.js +0 -2
- package/dist/models/CalendarUpdate.d.ts +32 -0
- package/dist/models/CalendarUpdate.js +48 -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 +6 -2
- package/dist/models/index.js +6 -2
- package/package.json +2 -3
- package/src/api-client.ts +52 -12
- package/src/apis/CalendarApi.ts +227 -107
- package/src/apis/CallsApi.ts +352 -0
- package/src/apis/index.ts +1 -0
- package/src/models/Calendar.ts +8 -0
- package/src/models/CalendarCreate.ts +66 -0
- package/src/models/CalendarEventCreate.ts +0 -9
- package/src/models/CalendarEventListResponse.ts +74 -0
- package/src/models/CalendarEventUpdate.ts +0 -8
- package/src/models/CalendarUpdate.ts +65 -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 +6 -2
|
@@ -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];
|
package/src/apis/index.ts
CHANGED
package/src/models/Calendar.ts
CHANGED
|
@@ -43,6 +43,12 @@ export interface Calendar {
|
|
|
43
43
|
* @memberof Calendar
|
|
44
44
|
*/
|
|
45
45
|
enabled: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Public iCal URL for this calendar (null if CALENDAR_PUBLISHER_BASE_URL is not configured)
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof Calendar
|
|
50
|
+
*/
|
|
51
|
+
calendar_url?: string | null;
|
|
46
52
|
/**
|
|
47
53
|
*
|
|
48
54
|
* @type {Date}
|
|
@@ -77,6 +83,7 @@ export function CalendarFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
77
83
|
'agent_id': json['agent_id'],
|
|
78
84
|
'agent_name': json['agent_name'],
|
|
79
85
|
'enabled': json['enabled'],
|
|
86
|
+
'calendar_url': json['calendar_url'] == null ? undefined : json['calendar_url'],
|
|
80
87
|
'created_at': (new Date(json['created_at'])),
|
|
81
88
|
};
|
|
82
89
|
}
|
|
@@ -96,6 +103,7 @@ export function CalendarToJSONTyped(value?: Calendar | null, ignoreDiscriminator
|
|
|
96
103
|
'agent_id': value['agent_id'],
|
|
97
104
|
'agent_name': value['agent_name'],
|
|
98
105
|
'enabled': value['enabled'],
|
|
106
|
+
'calendar_url': value['calendar_url'],
|
|
99
107
|
'created_at': value['created_at'].toISOString(),
|
|
100
108
|
};
|
|
101
109
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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 CalendarCreate
|
|
20
|
+
*/
|
|
21
|
+
export interface CalendarCreate {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CalendarCreate
|
|
26
|
+
*/
|
|
27
|
+
voice_agent_id: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the CalendarCreate interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfCalendarCreate(value: object): value is CalendarCreate {
|
|
34
|
+
if (!('voice_agent_id' in value) || value['voice_agent_id'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function CalendarCreateFromJSON(json: any): CalendarCreate {
|
|
39
|
+
return CalendarCreateFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function CalendarCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): CalendarCreate {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'voice_agent_id': json['voice_agent_id'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function CalendarCreateToJSON(json: any): CalendarCreate {
|
|
53
|
+
return CalendarCreateToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function CalendarCreateToJSONTyped(value?: CalendarCreate | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'voice_agent_id': value['voice_agent_id'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -43,12 +43,6 @@ export interface CalendarEventCreate {
|
|
|
43
43
|
* @memberof CalendarEventCreate
|
|
44
44
|
*/
|
|
45
45
|
end_time: Date;
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
* @type {string}
|
|
49
|
-
* @memberof CalendarEventCreate
|
|
50
|
-
*/
|
|
51
|
-
calendar_id: string;
|
|
52
46
|
}
|
|
53
47
|
|
|
54
48
|
/**
|
|
@@ -58,7 +52,6 @@ export function instanceOfCalendarEventCreate(value: object): value is CalendarE
|
|
|
58
52
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
59
53
|
if (!('start_time' in value) || value['start_time'] === undefined) return false;
|
|
60
54
|
if (!('end_time' in value) || value['end_time'] === undefined) return false;
|
|
61
|
-
if (!('calendar_id' in value) || value['calendar_id'] === undefined) return false;
|
|
62
55
|
return true;
|
|
63
56
|
}
|
|
64
57
|
|
|
@@ -76,7 +69,6 @@ export function CalendarEventCreateFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
76
69
|
'description': json['description'] == null ? undefined : json['description'],
|
|
77
70
|
'start_time': (new Date(json['start_time'])),
|
|
78
71
|
'end_time': (new Date(json['end_time'])),
|
|
79
|
-
'calendar_id': json['calendar_id'],
|
|
80
72
|
};
|
|
81
73
|
}
|
|
82
74
|
|
|
@@ -95,7 +87,6 @@ export function CalendarEventCreateToJSONTyped(value?: CalendarEventCreate | nul
|
|
|
95
87
|
'description': value['description'],
|
|
96
88
|
'start_time': value['start_time'].toISOString(),
|
|
97
89
|
'end_time': value['end_time'].toISOString(),
|
|
98
|
-
'calendar_id': value['calendar_id'],
|
|
99
90
|
};
|
|
100
91
|
}
|
|
101
92
|
|
|
@@ -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
|
+
import type { CalendarEvent } from './CalendarEvent';
|
|
17
|
+
import {
|
|
18
|
+
CalendarEventFromJSON,
|
|
19
|
+
CalendarEventFromJSONTyped,
|
|
20
|
+
CalendarEventToJSON,
|
|
21
|
+
CalendarEventToJSONTyped,
|
|
22
|
+
} from './CalendarEvent';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CalendarEventListResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface CalendarEventListResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<CalendarEvent>}
|
|
33
|
+
* @memberof CalendarEventListResponse
|
|
34
|
+
*/
|
|
35
|
+
data: Array<CalendarEvent>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CalendarEventListResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCalendarEventListResponse(value: object): value is CalendarEventListResponse {
|
|
42
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function CalendarEventListResponseFromJSON(json: any): CalendarEventListResponse {
|
|
47
|
+
return CalendarEventListResponseFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CalendarEventListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CalendarEventListResponse {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'data': ((json['data'] as Array<any>).map(CalendarEventFromJSON)),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function CalendarEventListResponseToJSON(json: any): CalendarEventListResponse {
|
|
61
|
+
return CalendarEventListResponseToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function CalendarEventListResponseToJSONTyped(value?: CalendarEventListResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'data': ((value['data'] as Array<any>).map(CalendarEventToJSON)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -43,12 +43,6 @@ export interface CalendarEventUpdate {
|
|
|
43
43
|
* @memberof CalendarEventUpdate
|
|
44
44
|
*/
|
|
45
45
|
end_time?: Date;
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
* @type {string}
|
|
49
|
-
* @memberof CalendarEventUpdate
|
|
50
|
-
*/
|
|
51
|
-
calendar_id?: string;
|
|
52
46
|
}
|
|
53
47
|
|
|
54
48
|
/**
|
|
@@ -72,7 +66,6 @@ export function CalendarEventUpdateFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
72
66
|
'description': json['description'] == null ? undefined : json['description'],
|
|
73
67
|
'start_time': json['start_time'] == null ? undefined : (new Date(json['start_time'])),
|
|
74
68
|
'end_time': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
|
|
75
|
-
'calendar_id': json['calendar_id'] == null ? undefined : json['calendar_id'],
|
|
76
69
|
};
|
|
77
70
|
}
|
|
78
71
|
|
|
@@ -91,7 +84,6 @@ export function CalendarEventUpdateToJSONTyped(value?: CalendarEventUpdate | nul
|
|
|
91
84
|
'description': value['description'],
|
|
92
85
|
'start_time': value['start_time'] == null ? value['start_time'] : value['start_time'].toISOString(),
|
|
93
86
|
'end_time': value['end_time'] == null ? value['end_time'] : value['end_time'].toISOString(),
|
|
94
|
-
'calendar_id': value['calendar_id'],
|
|
95
87
|
};
|
|
96
88
|
}
|
|
97
89
|
|
|
@@ -0,0 +1,65 @@
|
|
|
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 CalendarUpdate
|
|
20
|
+
*/
|
|
21
|
+
export interface CalendarUpdate {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CalendarUpdate
|
|
26
|
+
*/
|
|
27
|
+
voice_agent_id?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the CalendarUpdate interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfCalendarUpdate(value: object): value is CalendarUpdate {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function CalendarUpdateFromJSON(json: any): CalendarUpdate {
|
|
38
|
+
return CalendarUpdateFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function CalendarUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): CalendarUpdate {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CalendarUpdateToJSON(json: any): CalendarUpdate {
|
|
52
|
+
return CalendarUpdateToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CalendarUpdateToJSONTyped(value?: CalendarUpdate | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'voice_agent_id': value['voice_agent_id'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|