@l7mp/tivadar-ai-api-sdk 0.1.7 → 0.1.8
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/README.md +21 -2
- package/dist/api-client.d.ts +4 -2
- package/dist/api-client.js +3 -1
- package/dist/apis/PlaygroundApi.d.ts +5 -4
- package/dist/apis/PlaygroundApi.js +2 -0
- package/dist/apis/SIPApi.d.ts +30 -5
- package/dist/apis/SIPApi.js +82 -5
- package/dist/esm/api-client.d.ts +4 -2
- package/dist/esm/api-client.js +3 -1
- package/dist/esm/apis/PlaygroundApi.d.ts +5 -4
- package/dist/esm/apis/PlaygroundApi.js +3 -1
- package/dist/esm/apis/SIPApi.d.ts +30 -5
- package/dist/esm/apis/SIPApi.js +83 -6
- package/dist/esm/models/Calendar.d.ts +7 -0
- package/dist/esm/models/Calendar.js +3 -0
- package/dist/esm/models/CalendarCreate.d.ts +7 -0
- package/dist/esm/models/CalendarCreate.js +3 -0
- package/dist/esm/models/CalendarMetadata.d.ts +34 -0
- package/dist/esm/models/CalendarMetadata.js +38 -0
- package/dist/esm/models/CalendarMetadataBookingConstraints.d.ts +44 -0
- package/dist/esm/models/CalendarMetadataBookingConstraints.js +45 -0
- package/dist/esm/models/CalendarUpdate.d.ts +7 -0
- package/dist/esm/models/CalendarUpdate.js +3 -0
- package/dist/esm/models/OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest.d.ts +32 -0
- package/dist/esm/models/OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest.js +41 -0
- package/dist/esm/models/PhoneNumberCreate.d.ts +32 -0
- package/dist/esm/models/PhoneNumberCreate.js +43 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/Calendar.d.ts +7 -0
- package/dist/models/Calendar.js +3 -0
- package/dist/models/CalendarCreate.d.ts +7 -0
- package/dist/models/CalendarCreate.js +3 -0
- package/dist/models/CalendarMetadata.d.ts +34 -0
- package/dist/models/CalendarMetadata.js +45 -0
- package/dist/models/CalendarMetadataBookingConstraints.d.ts +44 -0
- package/dist/models/CalendarMetadataBookingConstraints.js +52 -0
- package/dist/models/CalendarUpdate.d.ts +7 -0
- package/dist/models/CalendarUpdate.js +3 -0
- package/dist/models/OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest.d.ts +32 -0
- package/dist/models/OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest.js +48 -0
- package/dist/models/PhoneNumberCreate.d.ts +32 -0
- package/dist/models/PhoneNumberCreate.js +50 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/api-client.ts +7 -2
- package/src/apis/PlaygroundApi.ts +10 -3
- package/src/apis/SIPApi.ts +115 -5
- package/src/models/Calendar.ts +16 -0
- package/src/models/CalendarCreate.ts +16 -0
- package/src/models/CalendarMetadata.ts +76 -0
- package/src/models/CalendarMetadataBookingConstraints.ts +81 -0
- package/src/models/CalendarUpdate.ts +16 -0
- package/src/models/OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest.ts +65 -0
- package/src/models/PhoneNumberCreate.ts +66 -0
- package/src/models/index.ts +4 -0
package/README.md
CHANGED
|
@@ -598,12 +598,31 @@ const result = await client.sip.createDispatchRule('org_abc123', {
|
|
|
598
598
|
await client.sip.deleteDispatchRule('org_abc123', 'dispatch_xyz');
|
|
599
599
|
```
|
|
600
600
|
|
|
601
|
-
#### `sip.listPhoneNumbers(options?)`
|
|
601
|
+
#### `sip.listPhoneNumbers(includeAssigned?, options?)`
|
|
602
602
|
|
|
603
|
-
List
|
|
603
|
+
List phone numbers (global, not organization-scoped). By default this returns only unassigned numbers.
|
|
604
604
|
|
|
605
605
|
```typescript
|
|
606
606
|
const numbers: PhoneNumber[] = await client.sip.listPhoneNumbers();
|
|
607
|
+
const allNumbers: PhoneNumber[] = await client.sip.listPhoneNumbers(true);
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
#### `sip.createPhoneNumber(data, options?)`
|
|
611
|
+
|
|
612
|
+
Create an available phone number with no trunk assignment.
|
|
613
|
+
|
|
614
|
+
```typescript
|
|
615
|
+
const phoneNumber: PhoneNumber = await client.sip.createPhoneNumber({
|
|
616
|
+
number: '+15551234567',
|
|
617
|
+
});
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
#### `sip.deletePhoneNumber(phoneNumberId, options?)`
|
|
621
|
+
|
|
622
|
+
Deletes the phone number. If it is assigned to a trunk, the trunk is deleted first.
|
|
623
|
+
|
|
624
|
+
```typescript
|
|
625
|
+
await client.sip.deletePhoneNumber(123);
|
|
607
626
|
```
|
|
608
627
|
|
|
609
628
|
---
|
package/dist/api-client.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { STTProvidersApi } from "./apis/STTProvidersApi";
|
|
|
15
15
|
import { TTSProvidersApi } from "./apis/TTSProvidersApi";
|
|
16
16
|
import { SubscriptionApi } from "./apis/SubscriptionApi";
|
|
17
17
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
18
|
-
import type { CallCreate, CallUpdate, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest } from "./models";
|
|
18
|
+
import type { CallCreate, CallUpdate, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest } from "./models";
|
|
19
19
|
export interface ApiClientConfig {
|
|
20
20
|
baseUrl: string;
|
|
21
21
|
options?: {
|
|
@@ -101,7 +101,9 @@ export declare class Api {
|
|
|
101
101
|
deleteTrunk: (organizationId: string, trunkId: string, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipTrunksTrunkIdDelete"]>;
|
|
102
102
|
createDispatchRule: (organizationId: string, dispatchRuleCreate: DispatchRuleCreate, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipDispatchRulesPost"]>;
|
|
103
103
|
deleteDispatchRule: (organizationId: string, dispatchId: string, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipDispatchRulesDispatchIdDelete"]>;
|
|
104
|
-
listPhoneNumbers: (options?: RequestInit) => ReturnType<SIPApi["phoneNumbersGet"]>;
|
|
104
|
+
listPhoneNumbers: (includeAssigned?: boolean, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersGet"]>;
|
|
105
|
+
createPhoneNumber: (phoneNumberCreate: PhoneNumberCreate, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersPost"]>;
|
|
106
|
+
deletePhoneNumber: (phoneNumberId: number, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersPhoneNumberIdDelete"]>;
|
|
105
107
|
};
|
|
106
108
|
readonly subscription: {
|
|
107
109
|
getStatus: (organizationId: string, options?: RequestInit) => ReturnType<SubscriptionApi["organizationsOrganizationIdSubscriptionGet"]>;
|
package/dist/api-client.js
CHANGED
|
@@ -145,7 +145,9 @@ class Api {
|
|
|
145
145
|
deleteTrunk: (organizationId, trunkId, options) => this.sipApi.organizationsOrganizationIdSipTrunksTrunkIdDelete({ organizationId, trunkId }, options),
|
|
146
146
|
createDispatchRule: (organizationId, dispatchRuleCreate, options) => this.sipApi.organizationsOrganizationIdSipDispatchRulesPost({ organizationId, dispatchRuleCreate }, options),
|
|
147
147
|
deleteDispatchRule: (organizationId, dispatchId, options) => this.sipApi.organizationsOrganizationIdSipDispatchRulesDispatchIdDelete({ organizationId, dispatchId }, options),
|
|
148
|
-
listPhoneNumbers: (options) => this.sipApi.phoneNumbersGet(options),
|
|
148
|
+
listPhoneNumbers: (includeAssigned, options) => this.sipApi.phoneNumbersGet({ includeAssigned }, options),
|
|
149
|
+
createPhoneNumber: (phoneNumberCreate, options) => this.sipApi.phoneNumbersPost({ phoneNumberCreate }, options),
|
|
150
|
+
deletePhoneNumber: (phoneNumberId, options) => this.sipApi.phoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
|
|
149
151
|
};
|
|
150
152
|
this.subscription = {
|
|
151
153
|
getStatus: (organizationId, options) => this.subscriptionApi.organizationsOrganizationIdSubscriptionGet({ organizationId }, options),
|
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { SandboxToken } from '../models/index';
|
|
14
|
-
export interface
|
|
13
|
+
import type { OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest, SandboxToken } from '../models/index';
|
|
14
|
+
export interface OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostOperationRequest {
|
|
15
15
|
organizationId: string;
|
|
16
16
|
voiceAgentId: string;
|
|
17
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest?: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
*
|
|
@@ -22,9 +23,9 @@ export declare class PlaygroundApi extends runtime.BaseAPI {
|
|
|
22
23
|
/**
|
|
23
24
|
* Get a sandbox token for voice agent testing
|
|
24
25
|
*/
|
|
25
|
-
organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRaw(requestParameters:
|
|
26
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRaw(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxToken>>;
|
|
26
27
|
/**
|
|
27
28
|
* Get a sandbox token for voice agent testing
|
|
28
29
|
*/
|
|
29
|
-
organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost(requestParameters:
|
|
30
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxToken>;
|
|
30
31
|
}
|
|
@@ -42,6 +42,7 @@ class PlaygroundApi extends runtime.BaseAPI {
|
|
|
42
42
|
}
|
|
43
43
|
const queryParameters = {};
|
|
44
44
|
const headerParameters = {};
|
|
45
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
45
46
|
if (this.configuration && this.configuration.accessToken) {
|
|
46
47
|
const token = this.configuration.accessToken;
|
|
47
48
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -57,6 +58,7 @@ class PlaygroundApi extends runtime.BaseAPI {
|
|
|
57
58
|
method: 'POST',
|
|
58
59
|
headers: headerParameters,
|
|
59
60
|
query: queryParameters,
|
|
61
|
+
body: (0, index_1.OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSON)(requestParameters['organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest']),
|
|
60
62
|
}, initOverrides);
|
|
61
63
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SandboxTokenFromJSON)(jsonValue));
|
|
62
64
|
});
|
package/dist/apis/SIPApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { DispatchRuleCreate, OrganizationsOrganizationIdSipDispatchRulesPost200Response, PhoneNumber, SipTrunkCreate, SipTrunkWithAgent } from '../models/index';
|
|
13
|
+
import type { DispatchRuleCreate, OrganizationsOrganizationIdSipDispatchRulesPost200Response, PhoneNumber, PhoneNumberCreate, SipTrunkCreate, SipTrunkWithAgent } from '../models/index';
|
|
14
14
|
export interface OrganizationsOrganizationIdSipDispatchRulesDispatchIdDeleteRequest {
|
|
15
15
|
organizationId: string;
|
|
16
16
|
dispatchId: string;
|
|
@@ -30,6 +30,15 @@ export interface OrganizationsOrganizationIdSipTrunksTrunkIdDeleteRequest {
|
|
|
30
30
|
organizationId: string;
|
|
31
31
|
trunkId: string;
|
|
32
32
|
}
|
|
33
|
+
export interface PhoneNumbersGetRequest {
|
|
34
|
+
includeAssigned?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface PhoneNumbersPhoneNumberIdDeleteRequest {
|
|
37
|
+
phoneNumberId: number;
|
|
38
|
+
}
|
|
39
|
+
export interface PhoneNumbersPostRequest {
|
|
40
|
+
phoneNumberCreate: PhoneNumberCreate;
|
|
41
|
+
}
|
|
33
42
|
/**
|
|
34
43
|
*
|
|
35
44
|
*/
|
|
@@ -75,11 +84,27 @@ export declare class SIPApi extends runtime.BaseAPI {
|
|
|
75
84
|
*/
|
|
76
85
|
organizationsOrganizationIdSipTrunksTrunkIdDelete(requestParameters: OrganizationsOrganizationIdSipTrunksTrunkIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
77
86
|
/**
|
|
78
|
-
* List
|
|
87
|
+
* List phone numbers
|
|
88
|
+
*/
|
|
89
|
+
phoneNumbersGetRaw(requestParameters: PhoneNumbersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PhoneNumber>>>;
|
|
90
|
+
/**
|
|
91
|
+
* List phone numbers
|
|
92
|
+
*/
|
|
93
|
+
phoneNumbersGet(requestParameters?: PhoneNumbersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PhoneNumber>>;
|
|
94
|
+
/**
|
|
95
|
+
* Delete a phone number
|
|
96
|
+
*/
|
|
97
|
+
phoneNumbersPhoneNumberIdDeleteRaw(requestParameters: PhoneNumbersPhoneNumberIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
98
|
+
/**
|
|
99
|
+
* Delete a phone number
|
|
100
|
+
*/
|
|
101
|
+
phoneNumbersPhoneNumberIdDelete(requestParameters: PhoneNumbersPhoneNumberIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Create a phone number
|
|
79
104
|
*/
|
|
80
|
-
|
|
105
|
+
phoneNumbersPostRaw(requestParameters: PhoneNumbersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PhoneNumber>>;
|
|
81
106
|
/**
|
|
82
|
-
*
|
|
107
|
+
* Create a phone number
|
|
83
108
|
*/
|
|
84
|
-
|
|
109
|
+
phoneNumbersPost(requestParameters: PhoneNumbersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PhoneNumber>;
|
|
85
110
|
}
|
package/dist/apis/SIPApi.js
CHANGED
|
@@ -231,11 +231,14 @@ class SIPApi extends runtime.BaseAPI {
|
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
/**
|
|
234
|
-
* List
|
|
234
|
+
* List phone numbers
|
|
235
235
|
*/
|
|
236
|
-
phoneNumbersGetRaw(initOverrides) {
|
|
236
|
+
phoneNumbersGetRaw(requestParameters, initOverrides) {
|
|
237
237
|
return __awaiter(this, void 0, void 0, function* () {
|
|
238
238
|
const queryParameters = {};
|
|
239
|
+
if (requestParameters['includeAssigned'] != null) {
|
|
240
|
+
queryParameters['includeAssigned'] = requestParameters['includeAssigned'];
|
|
241
|
+
}
|
|
239
242
|
const headerParameters = {};
|
|
240
243
|
if (this.configuration && this.configuration.accessToken) {
|
|
241
244
|
const token = this.configuration.accessToken;
|
|
@@ -255,11 +258,85 @@ class SIPApi extends runtime.BaseAPI {
|
|
|
255
258
|
});
|
|
256
259
|
}
|
|
257
260
|
/**
|
|
258
|
-
* List
|
|
261
|
+
* List phone numbers
|
|
262
|
+
*/
|
|
263
|
+
phoneNumbersGet() {
|
|
264
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
265
|
+
const response = yield this.phoneNumbersGetRaw(requestParameters, initOverrides);
|
|
266
|
+
return yield response.value();
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Delete a phone number
|
|
271
|
+
*/
|
|
272
|
+
phoneNumbersPhoneNumberIdDeleteRaw(requestParameters, initOverrides) {
|
|
273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
274
|
+
if (requestParameters['phoneNumberId'] == null) {
|
|
275
|
+
throw new runtime.RequiredError('phoneNumberId', 'Required parameter "phoneNumberId" was null or undefined when calling phoneNumbersPhoneNumberIdDelete().');
|
|
276
|
+
}
|
|
277
|
+
const queryParameters = {};
|
|
278
|
+
const headerParameters = {};
|
|
279
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
280
|
+
const token = this.configuration.accessToken;
|
|
281
|
+
const tokenString = yield token("bearerAuth", []);
|
|
282
|
+
if (tokenString) {
|
|
283
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
let urlPath = `/phone-numbers/{phoneNumberId}`;
|
|
287
|
+
urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
|
|
288
|
+
const response = yield this.request({
|
|
289
|
+
path: urlPath,
|
|
290
|
+
method: 'DELETE',
|
|
291
|
+
headers: headerParameters,
|
|
292
|
+
query: queryParameters,
|
|
293
|
+
}, initOverrides);
|
|
294
|
+
return new runtime.VoidApiResponse(response);
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Delete a phone number
|
|
299
|
+
*/
|
|
300
|
+
phoneNumbersPhoneNumberIdDelete(requestParameters, initOverrides) {
|
|
301
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
302
|
+
yield this.phoneNumbersPhoneNumberIdDeleteRaw(requestParameters, initOverrides);
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Create a phone number
|
|
307
|
+
*/
|
|
308
|
+
phoneNumbersPostRaw(requestParameters, initOverrides) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
310
|
+
if (requestParameters['phoneNumberCreate'] == null) {
|
|
311
|
+
throw new runtime.RequiredError('phoneNumberCreate', 'Required parameter "phoneNumberCreate" was null or undefined when calling phoneNumbersPost().');
|
|
312
|
+
}
|
|
313
|
+
const queryParameters = {};
|
|
314
|
+
const headerParameters = {};
|
|
315
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
316
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
317
|
+
const token = this.configuration.accessToken;
|
|
318
|
+
const tokenString = yield token("bearerAuth", []);
|
|
319
|
+
if (tokenString) {
|
|
320
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
let urlPath = `/phone-numbers`;
|
|
324
|
+
const response = yield this.request({
|
|
325
|
+
path: urlPath,
|
|
326
|
+
method: 'POST',
|
|
327
|
+
headers: headerParameters,
|
|
328
|
+
query: queryParameters,
|
|
329
|
+
body: (0, index_1.PhoneNumberCreateToJSON)(requestParameters['phoneNumberCreate']),
|
|
330
|
+
}, initOverrides);
|
|
331
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PhoneNumberFromJSON)(jsonValue));
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Create a phone number
|
|
259
336
|
*/
|
|
260
|
-
|
|
337
|
+
phoneNumbersPost(requestParameters, initOverrides) {
|
|
261
338
|
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
const response = yield this.
|
|
339
|
+
const response = yield this.phoneNumbersPostRaw(requestParameters, initOverrides);
|
|
263
340
|
return yield response.value();
|
|
264
341
|
});
|
|
265
342
|
}
|
package/dist/esm/api-client.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { STTProvidersApi } from "./apis/STTProvidersApi";
|
|
|
15
15
|
import { TTSProvidersApi } from "./apis/TTSProvidersApi";
|
|
16
16
|
import { SubscriptionApi } from "./apis/SubscriptionApi";
|
|
17
17
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
18
|
-
import type { CallCreate, CallUpdate, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest } from "./models";
|
|
18
|
+
import type { CallCreate, CallUpdate, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest } from "./models";
|
|
19
19
|
export interface ApiClientConfig {
|
|
20
20
|
baseUrl: string;
|
|
21
21
|
options?: {
|
|
@@ -101,7 +101,9 @@ export declare class Api {
|
|
|
101
101
|
deleteTrunk: (organizationId: string, trunkId: string, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipTrunksTrunkIdDelete"]>;
|
|
102
102
|
createDispatchRule: (organizationId: string, dispatchRuleCreate: DispatchRuleCreate, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipDispatchRulesPost"]>;
|
|
103
103
|
deleteDispatchRule: (organizationId: string, dispatchId: string, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipDispatchRulesDispatchIdDelete"]>;
|
|
104
|
-
listPhoneNumbers: (options?: RequestInit) => ReturnType<SIPApi["phoneNumbersGet"]>;
|
|
104
|
+
listPhoneNumbers: (includeAssigned?: boolean, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersGet"]>;
|
|
105
|
+
createPhoneNumber: (phoneNumberCreate: PhoneNumberCreate, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersPost"]>;
|
|
106
|
+
deletePhoneNumber: (phoneNumberId: number, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersPhoneNumberIdDelete"]>;
|
|
105
107
|
};
|
|
106
108
|
readonly subscription: {
|
|
107
109
|
getStatus: (organizationId: string, options?: RequestInit) => ReturnType<SubscriptionApi["organizationsOrganizationIdSubscriptionGet"]>;
|
package/dist/esm/api-client.js
CHANGED
|
@@ -142,7 +142,9 @@ export class Api {
|
|
|
142
142
|
deleteTrunk: (organizationId, trunkId, options) => this.sipApi.organizationsOrganizationIdSipTrunksTrunkIdDelete({ organizationId, trunkId }, options),
|
|
143
143
|
createDispatchRule: (organizationId, dispatchRuleCreate, options) => this.sipApi.organizationsOrganizationIdSipDispatchRulesPost({ organizationId, dispatchRuleCreate }, options),
|
|
144
144
|
deleteDispatchRule: (organizationId, dispatchId, options) => this.sipApi.organizationsOrganizationIdSipDispatchRulesDispatchIdDelete({ organizationId, dispatchId }, options),
|
|
145
|
-
listPhoneNumbers: (options) => this.sipApi.phoneNumbersGet(options),
|
|
145
|
+
listPhoneNumbers: (includeAssigned, options) => this.sipApi.phoneNumbersGet({ includeAssigned }, options),
|
|
146
|
+
createPhoneNumber: (phoneNumberCreate, options) => this.sipApi.phoneNumbersPost({ phoneNumberCreate }, options),
|
|
147
|
+
deletePhoneNumber: (phoneNumberId, options) => this.sipApi.phoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
|
|
146
148
|
};
|
|
147
149
|
this.subscription = {
|
|
148
150
|
getStatus: (organizationId, options) => this.subscriptionApi.organizationsOrganizationIdSubscriptionGet({ organizationId }, options),
|
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { SandboxToken } from '../models/index';
|
|
14
|
-
export interface
|
|
13
|
+
import type { OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest, SandboxToken } from '../models/index';
|
|
14
|
+
export interface OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostOperationRequest {
|
|
15
15
|
organizationId: string;
|
|
16
16
|
voiceAgentId: string;
|
|
17
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest?: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
*
|
|
@@ -22,9 +23,9 @@ export declare class PlaygroundApi extends runtime.BaseAPI {
|
|
|
22
23
|
/**
|
|
23
24
|
* Get a sandbox token for voice agent testing
|
|
24
25
|
*/
|
|
25
|
-
organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRaw(requestParameters:
|
|
26
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRaw(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxToken>>;
|
|
26
27
|
/**
|
|
27
28
|
* Get a sandbox token for voice agent testing
|
|
28
29
|
*/
|
|
29
|
-
organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost(requestParameters:
|
|
30
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxToken>;
|
|
30
31
|
}
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { SandboxTokenFromJSON, } from '../models/index';
|
|
24
|
+
import { OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSON, SandboxTokenFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -39,6 +39,7 @@ export class PlaygroundApi extends runtime.BaseAPI {
|
|
|
39
39
|
}
|
|
40
40
|
const queryParameters = {};
|
|
41
41
|
const headerParameters = {};
|
|
42
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
42
43
|
if (this.configuration && this.configuration.accessToken) {
|
|
43
44
|
const token = this.configuration.accessToken;
|
|
44
45
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -54,6 +55,7 @@ export class PlaygroundApi extends runtime.BaseAPI {
|
|
|
54
55
|
method: 'POST',
|
|
55
56
|
headers: headerParameters,
|
|
56
57
|
query: queryParameters,
|
|
58
|
+
body: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSON(requestParameters['organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest']),
|
|
57
59
|
}, initOverrides);
|
|
58
60
|
return new runtime.JSONApiResponse(response, (jsonValue) => SandboxTokenFromJSON(jsonValue));
|
|
59
61
|
});
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { DispatchRuleCreate, OrganizationsOrganizationIdSipDispatchRulesPost200Response, PhoneNumber, SipTrunkCreate, SipTrunkWithAgent } from '../models/index';
|
|
13
|
+
import type { DispatchRuleCreate, OrganizationsOrganizationIdSipDispatchRulesPost200Response, PhoneNumber, PhoneNumberCreate, SipTrunkCreate, SipTrunkWithAgent } from '../models/index';
|
|
14
14
|
export interface OrganizationsOrganizationIdSipDispatchRulesDispatchIdDeleteRequest {
|
|
15
15
|
organizationId: string;
|
|
16
16
|
dispatchId: string;
|
|
@@ -30,6 +30,15 @@ export interface OrganizationsOrganizationIdSipTrunksTrunkIdDeleteRequest {
|
|
|
30
30
|
organizationId: string;
|
|
31
31
|
trunkId: string;
|
|
32
32
|
}
|
|
33
|
+
export interface PhoneNumbersGetRequest {
|
|
34
|
+
includeAssigned?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface PhoneNumbersPhoneNumberIdDeleteRequest {
|
|
37
|
+
phoneNumberId: number;
|
|
38
|
+
}
|
|
39
|
+
export interface PhoneNumbersPostRequest {
|
|
40
|
+
phoneNumberCreate: PhoneNumberCreate;
|
|
41
|
+
}
|
|
33
42
|
/**
|
|
34
43
|
*
|
|
35
44
|
*/
|
|
@@ -75,11 +84,27 @@ export declare class SIPApi extends runtime.BaseAPI {
|
|
|
75
84
|
*/
|
|
76
85
|
organizationsOrganizationIdSipTrunksTrunkIdDelete(requestParameters: OrganizationsOrganizationIdSipTrunksTrunkIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
77
86
|
/**
|
|
78
|
-
* List
|
|
87
|
+
* List phone numbers
|
|
88
|
+
*/
|
|
89
|
+
phoneNumbersGetRaw(requestParameters: PhoneNumbersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PhoneNumber>>>;
|
|
90
|
+
/**
|
|
91
|
+
* List phone numbers
|
|
92
|
+
*/
|
|
93
|
+
phoneNumbersGet(requestParameters?: PhoneNumbersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PhoneNumber>>;
|
|
94
|
+
/**
|
|
95
|
+
* Delete a phone number
|
|
96
|
+
*/
|
|
97
|
+
phoneNumbersPhoneNumberIdDeleteRaw(requestParameters: PhoneNumbersPhoneNumberIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
98
|
+
/**
|
|
99
|
+
* Delete a phone number
|
|
100
|
+
*/
|
|
101
|
+
phoneNumbersPhoneNumberIdDelete(requestParameters: PhoneNumbersPhoneNumberIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Create a phone number
|
|
79
104
|
*/
|
|
80
|
-
|
|
105
|
+
phoneNumbersPostRaw(requestParameters: PhoneNumbersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PhoneNumber>>;
|
|
81
106
|
/**
|
|
82
|
-
*
|
|
107
|
+
* Create a phone number
|
|
83
108
|
*/
|
|
84
|
-
|
|
109
|
+
phoneNumbersPost(requestParameters: PhoneNumbersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PhoneNumber>;
|
|
85
110
|
}
|
package/dist/esm/apis/SIPApi.js
CHANGED
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { DispatchRuleCreateToJSON, OrganizationsOrganizationIdSipDispatchRulesPost200ResponseFromJSON, PhoneNumberFromJSON, SipTrunkCreateToJSON, SipTrunkWithAgentFromJSON, } from '../models/index';
|
|
24
|
+
import { DispatchRuleCreateToJSON, OrganizationsOrganizationIdSipDispatchRulesPost200ResponseFromJSON, PhoneNumberFromJSON, PhoneNumberCreateToJSON, SipTrunkCreateToJSON, SipTrunkWithAgentFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -228,11 +228,14 @@ export class SIPApi extends runtime.BaseAPI {
|
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
230
|
/**
|
|
231
|
-
* List
|
|
231
|
+
* List phone numbers
|
|
232
232
|
*/
|
|
233
|
-
phoneNumbersGetRaw(initOverrides) {
|
|
233
|
+
phoneNumbersGetRaw(requestParameters, initOverrides) {
|
|
234
234
|
return __awaiter(this, void 0, void 0, function* () {
|
|
235
235
|
const queryParameters = {};
|
|
236
|
+
if (requestParameters['includeAssigned'] != null) {
|
|
237
|
+
queryParameters['includeAssigned'] = requestParameters['includeAssigned'];
|
|
238
|
+
}
|
|
236
239
|
const headerParameters = {};
|
|
237
240
|
if (this.configuration && this.configuration.accessToken) {
|
|
238
241
|
const token = this.configuration.accessToken;
|
|
@@ -252,11 +255,85 @@ export class SIPApi extends runtime.BaseAPI {
|
|
|
252
255
|
});
|
|
253
256
|
}
|
|
254
257
|
/**
|
|
255
|
-
* List
|
|
258
|
+
* List phone numbers
|
|
259
|
+
*/
|
|
260
|
+
phoneNumbersGet() {
|
|
261
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
262
|
+
const response = yield this.phoneNumbersGetRaw(requestParameters, initOverrides);
|
|
263
|
+
return yield response.value();
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Delete a phone number
|
|
268
|
+
*/
|
|
269
|
+
phoneNumbersPhoneNumberIdDeleteRaw(requestParameters, initOverrides) {
|
|
270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
271
|
+
if (requestParameters['phoneNumberId'] == null) {
|
|
272
|
+
throw new runtime.RequiredError('phoneNumberId', 'Required parameter "phoneNumberId" was null or undefined when calling phoneNumbersPhoneNumberIdDelete().');
|
|
273
|
+
}
|
|
274
|
+
const queryParameters = {};
|
|
275
|
+
const headerParameters = {};
|
|
276
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
277
|
+
const token = this.configuration.accessToken;
|
|
278
|
+
const tokenString = yield token("bearerAuth", []);
|
|
279
|
+
if (tokenString) {
|
|
280
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
let urlPath = `/phone-numbers/{phoneNumberId}`;
|
|
284
|
+
urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
|
|
285
|
+
const response = yield this.request({
|
|
286
|
+
path: urlPath,
|
|
287
|
+
method: 'DELETE',
|
|
288
|
+
headers: headerParameters,
|
|
289
|
+
query: queryParameters,
|
|
290
|
+
}, initOverrides);
|
|
291
|
+
return new runtime.VoidApiResponse(response);
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Delete a phone number
|
|
296
|
+
*/
|
|
297
|
+
phoneNumbersPhoneNumberIdDelete(requestParameters, initOverrides) {
|
|
298
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
+
yield this.phoneNumbersPhoneNumberIdDeleteRaw(requestParameters, initOverrides);
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Create a phone number
|
|
304
|
+
*/
|
|
305
|
+
phoneNumbersPostRaw(requestParameters, initOverrides) {
|
|
306
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
307
|
+
if (requestParameters['phoneNumberCreate'] == null) {
|
|
308
|
+
throw new runtime.RequiredError('phoneNumberCreate', 'Required parameter "phoneNumberCreate" was null or undefined when calling phoneNumbersPost().');
|
|
309
|
+
}
|
|
310
|
+
const queryParameters = {};
|
|
311
|
+
const headerParameters = {};
|
|
312
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
313
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
314
|
+
const token = this.configuration.accessToken;
|
|
315
|
+
const tokenString = yield token("bearerAuth", []);
|
|
316
|
+
if (tokenString) {
|
|
317
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
let urlPath = `/phone-numbers`;
|
|
321
|
+
const response = yield this.request({
|
|
322
|
+
path: urlPath,
|
|
323
|
+
method: 'POST',
|
|
324
|
+
headers: headerParameters,
|
|
325
|
+
query: queryParameters,
|
|
326
|
+
body: PhoneNumberCreateToJSON(requestParameters['phoneNumberCreate']),
|
|
327
|
+
}, initOverrides);
|
|
328
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PhoneNumberFromJSON(jsonValue));
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Create a phone number
|
|
256
333
|
*/
|
|
257
|
-
|
|
334
|
+
phoneNumbersPost(requestParameters, initOverrides) {
|
|
258
335
|
return __awaiter(this, void 0, void 0, function* () {
|
|
259
|
-
const response = yield this.
|
|
336
|
+
const response = yield this.phoneNumbersPostRaw(requestParameters, initOverrides);
|
|
260
337
|
return yield response.value();
|
|
261
338
|
});
|
|
262
339
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { CalendarMetadata } from './CalendarMetadata';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -45,6 +46,12 @@ export interface Calendar {
|
|
|
45
46
|
* @memberof Calendar
|
|
46
47
|
*/
|
|
47
48
|
calendar_url?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Optional metadata including booking constraints
|
|
51
|
+
* @type {CalendarMetadata}
|
|
52
|
+
* @memberof Calendar
|
|
53
|
+
*/
|
|
54
|
+
metadata?: CalendarMetadata | null;
|
|
48
55
|
/**
|
|
49
56
|
*
|
|
50
57
|
* @type {Date}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { CalendarMetadataFromJSON, CalendarMetadataToJSON, } from './CalendarMetadata';
|
|
14
15
|
/**
|
|
15
16
|
* Check if a given object implements the Calendar interface.
|
|
16
17
|
*/
|
|
@@ -40,6 +41,7 @@ export function CalendarFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
40
41
|
'agent_name': json['agent_name'],
|
|
41
42
|
'enabled': json['enabled'],
|
|
42
43
|
'calendar_url': json['calendar_url'] == null ? undefined : json['calendar_url'],
|
|
44
|
+
'metadata': json['metadata'] == null ? undefined : CalendarMetadataFromJSON(json['metadata']),
|
|
43
45
|
'created_at': (new Date(json['created_at'])),
|
|
44
46
|
};
|
|
45
47
|
}
|
|
@@ -56,6 +58,7 @@ export function CalendarToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
56
58
|
'agent_name': value['agent_name'],
|
|
57
59
|
'enabled': value['enabled'],
|
|
58
60
|
'calendar_url': value['calendar_url'],
|
|
61
|
+
'metadata': CalendarMetadataToJSON(value['metadata']),
|
|
59
62
|
'created_at': value['created_at'].toISOString(),
|
|
60
63
|
};
|
|
61
64
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { CalendarMetadata } from './CalendarMetadata';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -21,6 +22,12 @@ export interface CalendarCreate {
|
|
|
21
22
|
* @memberof CalendarCreate
|
|
22
23
|
*/
|
|
23
24
|
voice_agent_id: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {CalendarMetadata}
|
|
28
|
+
* @memberof CalendarCreate
|
|
29
|
+
*/
|
|
30
|
+
metadata?: CalendarMetadata | null;
|
|
24
31
|
}
|
|
25
32
|
/**
|
|
26
33
|
* Check if a given object implements the CalendarCreate interface.
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { CalendarMetadataFromJSON, CalendarMetadataToJSON, } from './CalendarMetadata';
|
|
14
15
|
/**
|
|
15
16
|
* Check if a given object implements the CalendarCreate interface.
|
|
16
17
|
*/
|
|
@@ -28,6 +29,7 @@ export function CalendarCreateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
28
29
|
}
|
|
29
30
|
return {
|
|
30
31
|
'voice_agent_id': json['voice_agent_id'],
|
|
32
|
+
'metadata': json['metadata'] == null ? undefined : CalendarMetadataFromJSON(json['metadata']),
|
|
31
33
|
};
|
|
32
34
|
}
|
|
33
35
|
export function CalendarCreateToJSON(json) {
|
|
@@ -39,5 +41,6 @@ export function CalendarCreateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
39
41
|
}
|
|
40
42
|
return {
|
|
41
43
|
'voice_agent_id': value['voice_agent_id'],
|
|
44
|
+
'metadata': CalendarMetadataToJSON(value['metadata']),
|
|
42
45
|
};
|
|
43
46
|
}
|