@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
package/dist/apis/CalendarApi.js
CHANGED
|
@@ -30,13 +30,16 @@ const index_1 = require("../models/index");
|
|
|
30
30
|
*/
|
|
31
31
|
class CalendarApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* Deletes the calendar and all associated events.
|
|
34
|
+
* Delete a calendar
|
|
35
35
|
*/
|
|
36
|
-
|
|
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
|
|
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: '
|
|
58
|
+
method: 'DELETE',
|
|
55
59
|
headers: headerParameters,
|
|
56
60
|
query: queryParameters,
|
|
57
61
|
}, initOverrides);
|
|
58
|
-
return new runtime.
|
|
62
|
+
return new runtime.VoidApiResponse(response);
|
|
59
63
|
});
|
|
60
64
|
}
|
|
61
65
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
66
|
+
* Deletes the calendar and all associated events.
|
|
67
|
+
* Delete a calendar
|
|
64
68
|
*/
|
|
65
|
-
|
|
69
|
+
organizationsOrganizationIdCalendarsCalendarIdDelete(requestParameters, initOverrides) {
|
|
66
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
113
|
+
organizationsOrganizationIdCalendarsCalendarIdEventsEventIdDelete(requestParameters, initOverrides) {
|
|
107
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
-
yield this.
|
|
115
|
+
yield this.organizationsOrganizationIdCalendarsCalendarIdEventsEventIdDeleteRaw(requestParameters, initOverrides);
|
|
109
116
|
});
|
|
110
117
|
}
|
|
111
118
|
/**
|
|
112
119
|
* Get a single calendar event
|
|
113
120
|
*/
|
|
114
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
157
|
+
organizationsOrganizationIdCalendarsCalendarIdEventsEventIdGet(requestParameters, initOverrides) {
|
|
147
158
|
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
-
const response = yield this.
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
209
|
+
organizationsOrganizationIdCalendarsCalendarIdEventsEventIdPut(requestParameters, initOverrides) {
|
|
195
210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
-
const response = yield this.
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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
|
-
|
|
262
|
+
organizationsOrganizationIdCalendarsCalendarIdEventsGet(requestParameters, initOverrides) {
|
|
249
263
|
return __awaiter(this, void 0, void 0, function* () {
|
|
250
|
-
const response = yield this.
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
308
|
+
organizationsOrganizationIdCalendarsCalendarIdEventsPost(requestParameters, initOverrides) {
|
|
291
309
|
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
-
const response = yield this.
|
|
310
|
+
const response = yield this.organizationsOrganizationIdCalendarsCalendarIdEventsPostRaw(requestParameters, initOverrides);
|
|
293
311
|
return yield response.value();
|
|
294
312
|
});
|
|
295
313
|
}
|
|
296
314
|
/**
|
|
297
|
-
*
|
|
298
|
-
* Delete calendar for a voice agent
|
|
315
|
+
* Get a calendar by ID
|
|
299
316
|
*/
|
|
300
|
-
|
|
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
|
|
320
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdGet().');
|
|
304
321
|
}
|
|
305
|
-
if (requestParameters['
|
|
306
|
-
throw new runtime.RequiredError('
|
|
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}/
|
|
334
|
+
let urlPath = `/organizations/{organizationId}/calendars/{calendarId}`;
|
|
318
335
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
319
|
-
urlPath = urlPath.replace(`{${"
|
|
336
|
+
urlPath = urlPath.replace(`{${"calendarId"}}`, encodeURIComponent(String(requestParameters['calendarId'])));
|
|
320
337
|
const response = yield this.request({
|
|
321
338
|
path: urlPath,
|
|
322
|
-
method: '
|
|
339
|
+
method: 'GET',
|
|
323
340
|
headers: headerParameters,
|
|
324
341
|
query: queryParameters,
|
|
325
342
|
}, initOverrides);
|
|
326
|
-
return new runtime.
|
|
343
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CalendarFromJSON)(jsonValue));
|
|
327
344
|
});
|
|
328
345
|
}
|
|
329
346
|
/**
|
|
330
|
-
*
|
|
331
|
-
* Delete calendar for a voice agent
|
|
347
|
+
* Get a calendar by ID
|
|
332
348
|
*/
|
|
333
|
-
|
|
349
|
+
organizationsOrganizationIdCalendarsCalendarIdGet(requestParameters, initOverrides) {
|
|
334
350
|
return __awaiter(this, void 0, void 0, function* () {
|
|
335
|
-
yield this.
|
|
351
|
+
const response = yield this.organizationsOrganizationIdCalendarsCalendarIdGetRaw(requestParameters, initOverrides);
|
|
352
|
+
return yield response.value();
|
|
336
353
|
});
|
|
337
354
|
}
|
|
338
355
|
/**
|
|
339
|
-
*
|
|
340
|
-
*
|
|
356
|
+
* Re-assign the calendar to a different voice agent in the same organization.
|
|
357
|
+
* Update a calendar
|
|
341
358
|
*/
|
|
342
|
-
|
|
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
|
|
362
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsCalendarIdPut().');
|
|
346
363
|
}
|
|
347
|
-
if (requestParameters['
|
|
348
|
-
throw new runtime.RequiredError('
|
|
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}/
|
|
380
|
+
let urlPath = `/organizations/{organizationId}/calendars/{calendarId}`;
|
|
360
381
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
361
|
-
urlPath = urlPath.replace(`{${"
|
|
382
|
+
urlPath = urlPath.replace(`{${"calendarId"}}`, encodeURIComponent(String(requestParameters['calendarId'])));
|
|
362
383
|
const response = yield this.request({
|
|
363
384
|
path: urlPath,
|
|
364
|
-
method: '
|
|
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
|
-
*
|
|
373
|
-
*
|
|
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
|
-
|
|
439
|
+
organizationsOrganizationIdCalendarsGet(requestParameters, initOverrides) {
|
|
376
440
|
return __awaiter(this, void 0, void 0, function* () {
|
|
377
|
-
const response = yield this.
|
|
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
|
|
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
|
-
|
|
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
|
|
452
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdCalendarsPost().');
|
|
389
453
|
}
|
|
390
|
-
if (requestParameters['
|
|
391
|
-
throw new runtime.RequiredError('
|
|
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}/
|
|
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
|
|
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
|
-
|
|
483
|
+
organizationsOrganizationIdCalendarsPost(requestParameters, initOverrides) {
|
|
419
484
|
return __awaiter(this, void 0, void 0, function* () {
|
|
420
|
-
const response = yield this.
|
|
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];
|