@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.
Files changed (71) hide show
  1. package/dist/api-client.d.ts +23 -7
  2. package/dist/api-client.js +35 -6
  3. package/dist/apis/CalendarApi.d.ts +64 -48
  4. package/dist/apis/CalendarApi.js +152 -87
  5. package/dist/apis/CallsApi.d.ts +92 -0
  6. package/dist/apis/CallsApi.js +256 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/api-client.d.ts +23 -7
  10. package/dist/esm/api-client.js +35 -6
  11. package/dist/esm/apis/CalendarApi.d.ts +64 -48
  12. package/dist/esm/apis/CalendarApi.js +153 -88
  13. package/dist/esm/apis/CallsApi.d.ts +92 -0
  14. package/dist/esm/apis/CallsApi.js +252 -0
  15. package/dist/esm/apis/index.d.ts +1 -0
  16. package/dist/esm/apis/index.js +1 -0
  17. package/dist/esm/models/Calendar.d.ts +6 -0
  18. package/dist/esm/models/Calendar.js +2 -0
  19. package/dist/esm/models/CalendarCreate.d.ts +32 -0
  20. package/dist/esm/models/CalendarCreate.js +43 -0
  21. package/dist/esm/models/CalendarEventCreate.d.ts +0 -6
  22. package/dist/esm/models/CalendarEventCreate.js +0 -4
  23. package/dist/esm/models/CalendarEventListResponse.d.ts +33 -0
  24. package/dist/esm/models/CalendarEventListResponse.js +44 -0
  25. package/dist/esm/models/CalendarEventUpdate.d.ts +0 -6
  26. package/dist/esm/models/CalendarEventUpdate.js +0 -2
  27. package/dist/esm/models/CalendarUpdate.d.ts +32 -0
  28. package/dist/esm/models/CalendarUpdate.js +41 -0
  29. package/dist/esm/models/Call.d.ts +64 -0
  30. package/dist/esm/models/Call.js +55 -0
  31. package/dist/esm/models/CallCreate.d.ts +52 -0
  32. package/dist/esm/models/CallCreate.js +47 -0
  33. package/dist/esm/models/CallUpdate.d.ts +52 -0
  34. package/dist/esm/models/CallUpdate.js +47 -0
  35. package/dist/esm/models/index.d.ts +6 -2
  36. package/dist/esm/models/index.js +6 -2
  37. package/dist/models/Calendar.d.ts +6 -0
  38. package/dist/models/Calendar.js +2 -0
  39. package/dist/models/CalendarCreate.d.ts +32 -0
  40. package/dist/models/CalendarCreate.js +50 -0
  41. package/dist/models/CalendarEventCreate.d.ts +0 -6
  42. package/dist/models/CalendarEventCreate.js +0 -4
  43. package/dist/models/CalendarEventListResponse.d.ts +33 -0
  44. package/dist/models/CalendarEventListResponse.js +51 -0
  45. package/dist/models/CalendarEventUpdate.d.ts +0 -6
  46. package/dist/models/CalendarEventUpdate.js +0 -2
  47. package/dist/models/CalendarUpdate.d.ts +32 -0
  48. package/dist/models/CalendarUpdate.js +48 -0
  49. package/dist/models/Call.d.ts +64 -0
  50. package/dist/models/Call.js +62 -0
  51. package/dist/models/CallCreate.d.ts +52 -0
  52. package/dist/models/CallCreate.js +54 -0
  53. package/dist/models/CallUpdate.d.ts +52 -0
  54. package/dist/models/CallUpdate.js +54 -0
  55. package/dist/models/index.d.ts +6 -2
  56. package/dist/models/index.js +6 -2
  57. package/package.json +2 -3
  58. package/src/api-client.ts +52 -12
  59. package/src/apis/CalendarApi.ts +227 -107
  60. package/src/apis/CallsApi.ts +352 -0
  61. package/src/apis/index.ts +1 -0
  62. package/src/models/Calendar.ts +8 -0
  63. package/src/models/CalendarCreate.ts +66 -0
  64. package/src/models/CalendarEventCreate.ts +0 -9
  65. package/src/models/CalendarEventListResponse.ts +74 -0
  66. package/src/models/CalendarEventUpdate.ts +0 -8
  67. package/src/models/CalendarUpdate.ts +65 -0
  68. package/src/models/Call.ts +107 -0
  69. package/src/models/CallCreate.ts +89 -0
  70. package/src/models/CallUpdate.ts +89 -0
  71. package/src/models/index.ts +6 -2
@@ -30,13 +30,16 @@ const index_1 = require("../models/index");
30
30
  */
31
31
  class CalendarApi extends runtime.BaseAPI {
32
32
  /**
33
- * Returns all calendars with agent information. Each calendar is associated with an agent.
34
- * List all calendars in the organization
33
+ * Deletes the calendar and all associated events.
34
+ * Delete a calendar
35
35
  */
36
- organizationsOrganizationIdCalendarsGetRaw(requestParameters, initOverrides) {
36
+ organizationsOrganizationIdCalendarsCalendarIdDeleteRaw(requestParameters, initOverrides) {
37
37
  return __awaiter(this, void 0, void 0, function* () {
38
38
  if (requestParameters['organizationId'] == null) {
39
- throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsGet().');
39
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdDelete().');
40
+ }
41
+ if (requestParameters['calendarId'] == null) {
42
+ throw new runtime.RequiredError('calendarId', 'Required parameter "calendarId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdDelete().');
40
43
  }
41
44
  const queryParameters = {};
42
45
  const headerParameters = {};
@@ -47,37 +50,40 @@ class CalendarApi extends runtime.BaseAPI {
47
50
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
48
51
  }
49
52
  }
50
- let urlPath = `/organizations/{organizationId}/calendars`;
53
+ let urlPath = `/organizations/{organizationId}/calendars/{calendarId}`;
51
54
  urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
55
+ urlPath = urlPath.replace(`{${"calendarId"}}`, encodeURIComponent(String(requestParameters['calendarId'])));
52
56
  const response = yield this.request({
53
57
  path: urlPath,
54
- method: 'GET',
58
+ method: 'DELETE',
55
59
  headers: headerParameters,
56
60
  query: queryParameters,
57
61
  }, initOverrides);
58
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CalendarListResponseFromJSON)(jsonValue));
62
+ return new runtime.VoidApiResponse(response);
59
63
  });
60
64
  }
61
65
  /**
62
- * Returns all calendars with agent information. Each calendar is associated with an agent.
63
- * List all calendars in the organization
66
+ * Deletes the calendar and all associated events.
67
+ * Delete a calendar
64
68
  */
65
- organizationsOrganizationIdCalendarsGet(requestParameters, initOverrides) {
69
+ organizationsOrganizationIdCalendarsCalendarIdDelete(requestParameters, initOverrides) {
66
70
  return __awaiter(this, void 0, void 0, function* () {
67
- const response = yield this.organizationsOrganizationIdCalendarsGetRaw(requestParameters, initOverrides);
68
- return yield response.value();
71
+ yield this.organizationsOrganizationIdCalendarsCalendarIdDeleteRaw(requestParameters, initOverrides);
69
72
  });
70
73
  }
71
74
  /**
72
75
  * Delete a calendar event
73
76
  */
74
- organizationsOrganizationIdEventsEventIdDeleteRaw(requestParameters, initOverrides) {
77
+ organizationsOrganizationIdCalendarsCalendarIdEventsEventIdDeleteRaw(requestParameters, initOverrides) {
75
78
  return __awaiter(this, void 0, void 0, function* () {
76
79
  if (requestParameters['organizationId'] == null) {
77
- throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdEventsEventIdDelete().');
80
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsEventIdDelete().');
81
+ }
82
+ if (requestParameters['calendarId'] == null) {
83
+ throw new runtime.RequiredError('calendarId', 'Required parameter "calendarId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsEventIdDelete().');
78
84
  }
79
85
  if (requestParameters['eventId'] == null) {
80
- throw new runtime.RequiredError('eventId', 'Required parameter "eventId" was null or undefined when calling organizationsOrganizationIdEventsEventIdDelete().');
86
+ throw new runtime.RequiredError('eventId', 'Required parameter "eventId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsEventIdDelete().');
81
87
  }
82
88
  const queryParameters = {};
83
89
  const headerParameters = {};
@@ -88,8 +94,9 @@ class CalendarApi extends runtime.BaseAPI {
88
94
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
89
95
  }
90
96
  }
91
- let urlPath = `/organizations/{organizationId}/events/{eventId}`;
97
+ let urlPath = `/organizations/{organizationId}/calendars/{calendarId}/events/{eventId}`;
92
98
  urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
99
+ urlPath = urlPath.replace(`{${"calendarId"}}`, encodeURIComponent(String(requestParameters['calendarId'])));
93
100
  urlPath = urlPath.replace(`{${"eventId"}}`, encodeURIComponent(String(requestParameters['eventId'])));
94
101
  const response = yield this.request({
95
102
  path: urlPath,
@@ -103,21 +110,24 @@ class CalendarApi extends runtime.BaseAPI {
103
110
  /**
104
111
  * Delete a calendar event
105
112
  */
106
- organizationsOrganizationIdEventsEventIdDelete(requestParameters, initOverrides) {
113
+ organizationsOrganizationIdCalendarsCalendarIdEventsEventIdDelete(requestParameters, initOverrides) {
107
114
  return __awaiter(this, void 0, void 0, function* () {
108
- yield this.organizationsOrganizationIdEventsEventIdDeleteRaw(requestParameters, initOverrides);
115
+ yield this.organizationsOrganizationIdCalendarsCalendarIdEventsEventIdDeleteRaw(requestParameters, initOverrides);
109
116
  });
110
117
  }
111
118
  /**
112
119
  * Get a single calendar event
113
120
  */
114
- organizationsOrganizationIdEventsEventIdGetRaw(requestParameters, initOverrides) {
121
+ organizationsOrganizationIdCalendarsCalendarIdEventsEventIdGetRaw(requestParameters, initOverrides) {
115
122
  return __awaiter(this, void 0, void 0, function* () {
116
123
  if (requestParameters['organizationId'] == null) {
117
- throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdEventsEventIdGet().');
124
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsEventIdGet().');
125
+ }
126
+ if (requestParameters['calendarId'] == null) {
127
+ throw new runtime.RequiredError('calendarId', 'Required parameter "calendarId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsEventIdGet().');
118
128
  }
119
129
  if (requestParameters['eventId'] == null) {
120
- throw new runtime.RequiredError('eventId', 'Required parameter "eventId" was null or undefined when calling organizationsOrganizationIdEventsEventIdGet().');
130
+ throw new runtime.RequiredError('eventId', 'Required parameter "eventId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsEventIdGet().');
121
131
  }
122
132
  const queryParameters = {};
123
133
  const headerParameters = {};
@@ -128,8 +138,9 @@ class CalendarApi extends runtime.BaseAPI {
128
138
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
129
139
  }
130
140
  }
131
- let urlPath = `/organizations/{organizationId}/events/{eventId}`;
141
+ let urlPath = `/organizations/{organizationId}/calendars/{calendarId}/events/{eventId}`;
132
142
  urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
143
+ urlPath = urlPath.replace(`{${"calendarId"}}`, encodeURIComponent(String(requestParameters['calendarId'])));
133
144
  urlPath = urlPath.replace(`{${"eventId"}}`, encodeURIComponent(String(requestParameters['eventId'])));
134
145
  const response = yield this.request({
135
146
  path: urlPath,
@@ -143,9 +154,9 @@ class CalendarApi extends runtime.BaseAPI {
143
154
  /**
144
155
  * Get a single calendar event
145
156
  */
146
- organizationsOrganizationIdEventsEventIdGet(requestParameters, initOverrides) {
157
+ organizationsOrganizationIdCalendarsCalendarIdEventsEventIdGet(requestParameters, initOverrides) {
147
158
  return __awaiter(this, void 0, void 0, function* () {
148
- const response = yield this.organizationsOrganizationIdEventsEventIdGetRaw(requestParameters, initOverrides);
159
+ const response = yield this.organizationsOrganizationIdCalendarsCalendarIdEventsEventIdGetRaw(requestParameters, initOverrides);
149
160
  return yield response.value();
150
161
  });
151
162
  }
@@ -153,16 +164,19 @@ class CalendarApi extends runtime.BaseAPI {
153
164
  * Partial update - only provided fields will be modified
154
165
  * Update a calendar event
155
166
  */
156
- organizationsOrganizationIdEventsEventIdPutRaw(requestParameters, initOverrides) {
167
+ organizationsOrganizationIdCalendarsCalendarIdEventsEventIdPutRaw(requestParameters, initOverrides) {
157
168
  return __awaiter(this, void 0, void 0, function* () {
158
169
  if (requestParameters['organizationId'] == null) {
159
- throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdEventsEventIdPut().');
170
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsEventIdPut().');
171
+ }
172
+ if (requestParameters['calendarId'] == null) {
173
+ throw new runtime.RequiredError('calendarId', 'Required parameter "calendarId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsEventIdPut().');
160
174
  }
161
175
  if (requestParameters['eventId'] == null) {
162
- throw new runtime.RequiredError('eventId', 'Required parameter "eventId" was null or undefined when calling organizationsOrganizationIdEventsEventIdPut().');
176
+ throw new runtime.RequiredError('eventId', 'Required parameter "eventId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsEventIdPut().');
163
177
  }
164
178
  if (requestParameters['calendarEventUpdate'] == null) {
165
- throw new runtime.RequiredError('calendarEventUpdate', 'Required parameter "calendarEventUpdate" was null or undefined when calling organizationsOrganizationIdEventsEventIdPut().');
179
+ throw new runtime.RequiredError('calendarEventUpdate', 'Required parameter "calendarEventUpdate" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsEventIdPut().');
166
180
  }
167
181
  const queryParameters = {};
168
182
  const headerParameters = {};
@@ -174,8 +188,9 @@ class CalendarApi extends runtime.BaseAPI {
174
188
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
175
189
  }
176
190
  }
177
- let urlPath = `/organizations/{organizationId}/events/{eventId}`;
191
+ let urlPath = `/organizations/{organizationId}/calendars/{calendarId}/events/{eventId}`;
178
192
  urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
193
+ urlPath = urlPath.replace(`{${"calendarId"}}`, encodeURIComponent(String(requestParameters['calendarId'])));
179
194
  urlPath = urlPath.replace(`{${"eventId"}}`, encodeURIComponent(String(requestParameters['eventId'])));
180
195
  const response = yield this.request({
181
196
  path: urlPath,
@@ -191,26 +206,28 @@ class CalendarApi extends runtime.BaseAPI {
191
206
  * Partial update - only provided fields will be modified
192
207
  * Update a calendar event
193
208
  */
194
- organizationsOrganizationIdEventsEventIdPut(requestParameters, initOverrides) {
209
+ organizationsOrganizationIdCalendarsCalendarIdEventsEventIdPut(requestParameters, initOverrides) {
195
210
  return __awaiter(this, void 0, void 0, function* () {
196
- const response = yield this.organizationsOrganizationIdEventsEventIdPutRaw(requestParameters, initOverrides);
211
+ const response = yield this.organizationsOrganizationIdCalendarsCalendarIdEventsEventIdPutRaw(requestParameters, initOverrides);
197
212
  return yield response.value();
198
213
  });
199
214
  }
200
215
  /**
201
- * Returns events and their associated calendars. Optionally filter by specific calendar IDs.
202
216
  * List calendar events within a date range
203
217
  */
204
- organizationsOrganizationIdEventsGetRaw(requestParameters, initOverrides) {
218
+ organizationsOrganizationIdCalendarsCalendarIdEventsGetRaw(requestParameters, initOverrides) {
205
219
  return __awaiter(this, void 0, void 0, function* () {
206
220
  if (requestParameters['organizationId'] == null) {
207
- throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdEventsGet().');
221
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsGet().');
222
+ }
223
+ if (requestParameters['calendarId'] == null) {
224
+ throw new runtime.RequiredError('calendarId', 'Required parameter "calendarId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsGet().');
208
225
  }
209
226
  if (requestParameters['start'] == null) {
210
- throw new runtime.RequiredError('start', 'Required parameter "start" was null or undefined when calling organizationsOrganizationIdEventsGet().');
227
+ throw new runtime.RequiredError('start', 'Required parameter "start" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsGet().');
211
228
  }
212
229
  if (requestParameters['end'] == null) {
213
- throw new runtime.RequiredError('end', 'Required parameter "end" was null or undefined when calling organizationsOrganizationIdEventsGet().');
230
+ throw new runtime.RequiredError('end', 'Required parameter "end" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsGet().');
214
231
  }
215
232
  const queryParameters = {};
216
233
  if (requestParameters['start'] != null) {
@@ -219,9 +236,6 @@ class CalendarApi extends runtime.BaseAPI {
219
236
  if (requestParameters['end'] != null) {
220
237
  queryParameters['end'] = requestParameters['end'].toISOString();
221
238
  }
222
- if (requestParameters['calendarIds'] != null) {
223
- queryParameters['calendar_ids'] = requestParameters['calendarIds'];
224
- }
225
239
  const headerParameters = {};
226
240
  if (this.configuration && this.configuration.accessToken) {
227
241
  const token = this.configuration.accessToken;
@@ -230,37 +244,40 @@ class CalendarApi extends runtime.BaseAPI {
230
244
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
231
245
  }
232
246
  }
233
- let urlPath = `/organizations/{organizationId}/events`;
247
+ let urlPath = `/organizations/{organizationId}/calendars/{calendarId}/events`;
234
248
  urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
249
+ urlPath = urlPath.replace(`{${"calendarId"}}`, encodeURIComponent(String(requestParameters['calendarId'])));
235
250
  const response = yield this.request({
236
251
  path: urlPath,
237
252
  method: 'GET',
238
253
  headers: headerParameters,
239
254
  query: queryParameters,
240
255
  }, initOverrides);
241
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CalendarEventResponseFromJSON)(jsonValue));
256
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CalendarEventListResponseFromJSON)(jsonValue));
242
257
  });
243
258
  }
244
259
  /**
245
- * Returns events and their associated calendars. Optionally filter by specific calendar IDs.
246
260
  * List calendar events within a date range
247
261
  */
248
- organizationsOrganizationIdEventsGet(requestParameters, initOverrides) {
262
+ organizationsOrganizationIdCalendarsCalendarIdEventsGet(requestParameters, initOverrides) {
249
263
  return __awaiter(this, void 0, void 0, function* () {
250
- const response = yield this.organizationsOrganizationIdEventsGetRaw(requestParameters, initOverrides);
264
+ const response = yield this.organizationsOrganizationIdCalendarsCalendarIdEventsGetRaw(requestParameters, initOverrides);
251
265
  return yield response.value();
252
266
  });
253
267
  }
254
268
  /**
255
269
  * Create a new calendar event
256
270
  */
257
- organizationsOrganizationIdEventsPostRaw(requestParameters, initOverrides) {
271
+ organizationsOrganizationIdCalendarsCalendarIdEventsPostRaw(requestParameters, initOverrides) {
258
272
  return __awaiter(this, void 0, void 0, function* () {
259
273
  if (requestParameters['organizationId'] == null) {
260
- throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdEventsPost().');
274
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsPost().');
275
+ }
276
+ if (requestParameters['calendarId'] == null) {
277
+ throw new runtime.RequiredError('calendarId', 'Required parameter "calendarId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsPost().');
261
278
  }
262
279
  if (requestParameters['calendarEventCreate'] == null) {
263
- throw new runtime.RequiredError('calendarEventCreate', 'Required parameter "calendarEventCreate" was null or undefined when calling organizationsOrganizationIdEventsPost().');
280
+ throw new runtime.RequiredError('calendarEventCreate', 'Required parameter "calendarEventCreate" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdEventsPost().');
264
281
  }
265
282
  const queryParameters = {};
266
283
  const headerParameters = {};
@@ -272,8 +289,9 @@ class CalendarApi extends runtime.BaseAPI {
272
289
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
273
290
  }
274
291
  }
275
- let urlPath = `/organizations/{organizationId}/events`;
292
+ let urlPath = `/organizations/{organizationId}/calendars/{calendarId}/events`;
276
293
  urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
294
+ urlPath = urlPath.replace(`{${"calendarId"}}`, encodeURIComponent(String(requestParameters['calendarId'])));
277
295
  const response = yield this.request({
278
296
  path: urlPath,
279
297
  method: 'POST',
@@ -287,23 +305,22 @@ class CalendarApi extends runtime.BaseAPI {
287
305
  /**
288
306
  * Create a new calendar event
289
307
  */
290
- organizationsOrganizationIdEventsPost(requestParameters, initOverrides) {
308
+ organizationsOrganizationIdCalendarsCalendarIdEventsPost(requestParameters, initOverrides) {
291
309
  return __awaiter(this, void 0, void 0, function* () {
292
- const response = yield this.organizationsOrganizationIdEventsPostRaw(requestParameters, initOverrides);
310
+ const response = yield this.organizationsOrganizationIdCalendarsCalendarIdEventsPostRaw(requestParameters, initOverrides);
293
311
  return yield response.value();
294
312
  });
295
313
  }
296
314
  /**
297
- * Deletes the calendar and all associated events for the specified voice agent.
298
- * Delete calendar for a voice agent
315
+ * Get a calendar by ID
299
316
  */
300
- organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarDeleteRaw(requestParameters, initOverrides) {
317
+ organizationsOrganizationIdCalendarsCalendarIdGetRaw(requestParameters, initOverrides) {
301
318
  return __awaiter(this, void 0, void 0, function* () {
302
319
  if (requestParameters['organizationId'] == null) {
303
- throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarDelete().');
320
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdGet().');
304
321
  }
305
- if (requestParameters['voiceAgentId'] == null) {
306
- throw new runtime.RequiredError('voiceAgentId', 'Required parameter "voiceAgentId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarDelete().');
322
+ if (requestParameters['calendarId'] == null) {
323
+ throw new runtime.RequiredError('calendarId', 'Required parameter "calendarId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdGet().');
307
324
  }
308
325
  const queryParameters = {};
309
326
  const headerParameters = {};
@@ -314,41 +331,45 @@ class CalendarApi extends runtime.BaseAPI {
314
331
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
315
332
  }
316
333
  }
317
- let urlPath = `/organizations/{organizationId}/voice-agents/{voiceAgentId}/calendar`;
334
+ let urlPath = `/organizations/{organizationId}/calendars/{calendarId}`;
318
335
  urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
319
- urlPath = urlPath.replace(`{${"voiceAgentId"}}`, encodeURIComponent(String(requestParameters['voiceAgentId'])));
336
+ urlPath = urlPath.replace(`{${"calendarId"}}`, encodeURIComponent(String(requestParameters['calendarId'])));
320
337
  const response = yield this.request({
321
338
  path: urlPath,
322
- method: 'DELETE',
339
+ method: 'GET',
323
340
  headers: headerParameters,
324
341
  query: queryParameters,
325
342
  }, initOverrides);
326
- return new runtime.VoidApiResponse(response);
343
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CalendarFromJSON)(jsonValue));
327
344
  });
328
345
  }
329
346
  /**
330
- * Deletes the calendar and all associated events for the specified voice agent.
331
- * Delete calendar for a voice agent
347
+ * Get a calendar by ID
332
348
  */
333
- organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarDelete(requestParameters, initOverrides) {
349
+ organizationsOrganizationIdCalendarsCalendarIdGet(requestParameters, initOverrides) {
334
350
  return __awaiter(this, void 0, void 0, function* () {
335
- yield this.organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarDeleteRaw(requestParameters, initOverrides);
351
+ const response = yield this.organizationsOrganizationIdCalendarsCalendarIdGetRaw(requestParameters, initOverrides);
352
+ return yield response.value();
336
353
  });
337
354
  }
338
355
  /**
339
- * Returns the calendar associated with a specific voice agent.
340
- * Get calendar for a voice agent
356
+ * Re-assign the calendar to a different voice agent in the same organization.
357
+ * Update a calendar
341
358
  */
342
- organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarGetRaw(requestParameters, initOverrides) {
359
+ organizationsOrganizationIdCalendarsCalendarIdPutRaw(requestParameters, initOverrides) {
343
360
  return __awaiter(this, void 0, void 0, function* () {
344
361
  if (requestParameters['organizationId'] == null) {
345
- throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarGet().');
362
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdPut().');
346
363
  }
347
- if (requestParameters['voiceAgentId'] == null) {
348
- throw new runtime.RequiredError('voiceAgentId', 'Required parameter "voiceAgentId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarGet().');
364
+ if (requestParameters['calendarId'] == null) {
365
+ throw new runtime.RequiredError('calendarId', 'Required parameter "calendarId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdPut().');
366
+ }
367
+ if (requestParameters['calendarUpdate'] == null) {
368
+ throw new runtime.RequiredError('calendarUpdate', 'Required parameter "calendarUpdate" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdPut().');
349
369
  }
350
370
  const queryParameters = {};
351
371
  const headerParameters = {};
372
+ headerParameters['Content-Type'] = 'application/json';
352
373
  if (this.configuration && this.configuration.accessToken) {
353
374
  const token = this.configuration.accessToken;
354
375
  const tokenString = yield token("bearerAuth", []);
@@ -356,42 +377,86 @@ class CalendarApi extends runtime.BaseAPI {
356
377
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
357
378
  }
358
379
  }
359
- let urlPath = `/organizations/{organizationId}/voice-agents/{voiceAgentId}/calendar`;
380
+ let urlPath = `/organizations/{organizationId}/calendars/{calendarId}`;
360
381
  urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
361
- urlPath = urlPath.replace(`{${"voiceAgentId"}}`, encodeURIComponent(String(requestParameters['voiceAgentId'])));
382
+ urlPath = urlPath.replace(`{${"calendarId"}}`, encodeURIComponent(String(requestParameters['calendarId'])));
362
383
  const response = yield this.request({
363
384
  path: urlPath,
364
- method: 'GET',
385
+ method: 'PUT',
365
386
  headers: headerParameters,
366
387
  query: queryParameters,
388
+ body: (0, index_1.CalendarUpdateToJSON)(requestParameters['calendarUpdate']),
367
389
  }, initOverrides);
368
390
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CalendarFromJSON)(jsonValue));
369
391
  });
370
392
  }
371
393
  /**
372
- * Returns the calendar associated with a specific voice agent.
373
- * Get calendar for a voice agent
394
+ * Re-assign the calendar to a different voice agent in the same organization.
395
+ * Update a calendar
396
+ */
397
+ organizationsOrganizationIdCalendarsCalendarIdPut(requestParameters, initOverrides) {
398
+ return __awaiter(this, void 0, void 0, function* () {
399
+ const response = yield this.organizationsOrganizationIdCalendarsCalendarIdPutRaw(requestParameters, initOverrides);
400
+ return yield response.value();
401
+ });
402
+ }
403
+ /**
404
+ * Returns all calendars with agent information. Optionally filter by voice_agent_id.
405
+ * List all calendars in the organization
406
+ */
407
+ organizationsOrganizationIdCalendarsGetRaw(requestParameters, initOverrides) {
408
+ return __awaiter(this, void 0, void 0, function* () {
409
+ if (requestParameters['organizationId'] == null) {
410
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsGet().');
411
+ }
412
+ const queryParameters = {};
413
+ if (requestParameters['voiceAgentId'] != null) {
414
+ queryParameters['voice_agent_id'] = requestParameters['voiceAgentId'];
415
+ }
416
+ const headerParameters = {};
417
+ if (this.configuration && this.configuration.accessToken) {
418
+ const token = this.configuration.accessToken;
419
+ const tokenString = yield token("bearerAuth", []);
420
+ if (tokenString) {
421
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
422
+ }
423
+ }
424
+ let urlPath = `/organizations/{organizationId}/calendars`;
425
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
426
+ const response = yield this.request({
427
+ path: urlPath,
428
+ method: 'GET',
429
+ headers: headerParameters,
430
+ query: queryParameters,
431
+ }, initOverrides);
432
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CalendarListResponseFromJSON)(jsonValue));
433
+ });
434
+ }
435
+ /**
436
+ * Returns all calendars with agent information. Optionally filter by voice_agent_id.
437
+ * List all calendars in the organization
374
438
  */
375
- organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarGet(requestParameters, initOverrides) {
439
+ organizationsOrganizationIdCalendarsGet(requestParameters, initOverrides) {
376
440
  return __awaiter(this, void 0, void 0, function* () {
377
- const response = yield this.organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarGetRaw(requestParameters, initOverrides);
441
+ const response = yield this.organizationsOrganizationIdCalendarsGetRaw(requestParameters, initOverrides);
378
442
  return yield response.value();
379
443
  });
380
444
  }
381
445
  /**
382
- * Creates a new calendar for the specified voice agent. Only one calendar per agent is allowed.
446
+ * Creates a new calendar linked to the specified voice agent. Only one calendar per agent is allowed.
383
447
  * Create a calendar for a voice agent
384
448
  */
385
- organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarPostRaw(requestParameters, initOverrides) {
449
+ organizationsOrganizationIdCalendarsPostRaw(requestParameters, initOverrides) {
386
450
  return __awaiter(this, void 0, void 0, function* () {
387
451
  if (requestParameters['organizationId'] == null) {
388
- throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarPost().');
452
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsPost().');
389
453
  }
390
- if (requestParameters['voiceAgentId'] == null) {
391
- throw new runtime.RequiredError('voiceAgentId', 'Required parameter "voiceAgentId" was null or undefined when calling organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarPost().');
454
+ if (requestParameters['calendarCreate'] == null) {
455
+ throw new runtime.RequiredError('calendarCreate', 'Required parameter "calendarCreate" was null or undefined when calling organizationsOrganizationIdCalendarsPost().');
392
456
  }
393
457
  const queryParameters = {};
394
458
  const headerParameters = {};
459
+ headerParameters['Content-Type'] = 'application/json';
395
460
  if (this.configuration && this.configuration.accessToken) {
396
461
  const token = this.configuration.accessToken;
397
462
  const tokenString = yield token("bearerAuth", []);
@@ -399,25 +464,25 @@ class CalendarApi extends runtime.BaseAPI {
399
464
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
400
465
  }
401
466
  }
402
- let urlPath = `/organizations/{organizationId}/voice-agents/{voiceAgentId}/calendar`;
467
+ let urlPath = `/organizations/{organizationId}/calendars`;
403
468
  urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
404
- urlPath = urlPath.replace(`{${"voiceAgentId"}}`, encodeURIComponent(String(requestParameters['voiceAgentId'])));
405
469
  const response = yield this.request({
406
470
  path: urlPath,
407
471
  method: 'POST',
408
472
  headers: headerParameters,
409
473
  query: queryParameters,
474
+ body: (0, index_1.CalendarCreateToJSON)(requestParameters['calendarCreate']),
410
475
  }, initOverrides);
411
476
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CalendarFromJSON)(jsonValue));
412
477
  });
413
478
  }
414
479
  /**
415
- * Creates a new calendar for the specified voice agent. Only one calendar per agent is allowed.
480
+ * Creates a new calendar linked to the specified voice agent. Only one calendar per agent is allowed.
416
481
  * Create a calendar for a voice agent
417
482
  */
418
- organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarPost(requestParameters, initOverrides) {
483
+ organizationsOrganizationIdCalendarsPost(requestParameters, initOverrides) {
419
484
  return __awaiter(this, void 0, void 0, function* () {
420
- const response = yield this.organizationsOrganizationIdVoiceAgentsVoiceAgentIdCalendarPostRaw(requestParameters, initOverrides);
485
+ const response = yield this.organizationsOrganizationIdCalendarsPostRaw(requestParameters, initOverrides);
421
486
  return yield response.value();
422
487
  });
423
488
  }
@@ -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];