@l7mp/tivadar-ai-api-sdk 0.2.15 → 0.2.16

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 (61) hide show
  1. package/dist/api-client.d.ts +8 -1
  2. package/dist/api-client.js +7 -0
  3. package/dist/apis/AdminPhoneNumbersApi.d.ts +26 -1
  4. package/dist/apis/AdminPhoneNumbersApi.js +81 -0
  5. package/dist/apis/OutboundCallsApi.d.ts +32 -0
  6. package/dist/apis/OutboundCallsApi.js +77 -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 +8 -1
  10. package/dist/esm/api-client.js +7 -0
  11. package/dist/esm/apis/AdminPhoneNumbersApi.d.ts +26 -1
  12. package/dist/esm/apis/AdminPhoneNumbersApi.js +82 -1
  13. package/dist/esm/apis/OutboundCallsApi.d.ts +32 -0
  14. package/dist/esm/apis/OutboundCallsApi.js +73 -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/AdminPhoneNumberAssignOutbound.d.ts +32 -0
  18. package/dist/esm/models/AdminPhoneNumberAssignOutbound.js +43 -0
  19. package/dist/esm/models/AdminPhoneNumberDetail.d.ts +30 -0
  20. package/dist/esm/models/AdminPhoneNumberDetail.js +10 -0
  21. package/dist/esm/models/AdminPhoneNumberUpdate.d.ts +18 -0
  22. package/dist/esm/models/AdminPhoneNumberUpdate.js +6 -0
  23. package/dist/esm/models/OutboundCall.d.ts +68 -0
  24. package/dist/esm/models/OutboundCall.js +53 -0
  25. package/dist/esm/models/OutboundCallRequest.d.ts +44 -0
  26. package/dist/esm/models/OutboundCallRequest.js +47 -0
  27. package/dist/esm/models/PhoneNumber.d.ts +18 -0
  28. package/dist/esm/models/PhoneNumber.js +6 -0
  29. package/dist/esm/models/PhoneNumberCreate.d.ts +24 -0
  30. package/dist/esm/models/PhoneNumberCreate.js +8 -0
  31. package/dist/esm/models/index.d.ts +3 -0
  32. package/dist/esm/models/index.js +3 -0
  33. package/dist/models/AdminPhoneNumberAssignOutbound.d.ts +32 -0
  34. package/dist/models/AdminPhoneNumberAssignOutbound.js +50 -0
  35. package/dist/models/AdminPhoneNumberDetail.d.ts +30 -0
  36. package/dist/models/AdminPhoneNumberDetail.js +10 -0
  37. package/dist/models/AdminPhoneNumberUpdate.d.ts +18 -0
  38. package/dist/models/AdminPhoneNumberUpdate.js +6 -0
  39. package/dist/models/OutboundCall.d.ts +68 -0
  40. package/dist/models/OutboundCall.js +60 -0
  41. package/dist/models/OutboundCallRequest.d.ts +44 -0
  42. package/dist/models/OutboundCallRequest.js +54 -0
  43. package/dist/models/PhoneNumber.d.ts +18 -0
  44. package/dist/models/PhoneNumber.js +6 -0
  45. package/dist/models/PhoneNumberCreate.d.ts +24 -0
  46. package/dist/models/PhoneNumberCreate.js +8 -0
  47. package/dist/models/index.d.ts +3 -0
  48. package/dist/models/index.js +3 -0
  49. package/package.json +1 -1
  50. package/src/api-client.ts +16 -0
  51. package/src/apis/AdminPhoneNumbersApi.ts +114 -0
  52. package/src/apis/OutboundCallsApi.ts +95 -0
  53. package/src/apis/index.ts +1 -0
  54. package/src/models/AdminPhoneNumberAssignOutbound.ts +66 -0
  55. package/src/models/AdminPhoneNumberDetail.ts +40 -0
  56. package/src/models/AdminPhoneNumberUpdate.ts +24 -0
  57. package/src/models/OutboundCall.ts +113 -0
  58. package/src/models/OutboundCallRequest.ts +82 -0
  59. package/src/models/PhoneNumber.ts +24 -0
  60. package/src/models/PhoneNumberCreate.ts +32 -0
  61. package/src/models/index.ts +3 -0
@@ -0,0 +1,32 @@
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 { OutboundCall, OutboundCallRequest } from '../models/index';
14
+ export interface OrganizationsOrganizationIdOutboundCallsPostRequest {
15
+ organizationId: string;
16
+ outboundCallRequest: OutboundCallRequest;
17
+ }
18
+ /**
19
+ *
20
+ */
21
+ export declare class OutboundCallsApi extends runtime.BaseAPI {
22
+ /**
23
+ * Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
24
+ * Place an outbound call with a voice agent
25
+ */
26
+ organizationsOrganizationIdOutboundCallsPostRaw(requestParameters: OrganizationsOrganizationIdOutboundCallsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OutboundCall>>;
27
+ /**
28
+ * Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
29
+ * Place an outbound call with a voice agent
30
+ */
31
+ organizationsOrganizationIdOutboundCallsPost(requestParameters: OrganizationsOrganizationIdOutboundCallsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OutboundCall>;
32
+ }
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Tivadar AI Backend API
5
+ * Unified REST API for Tivadar AI Voice Agents platform
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { OutboundCallFromJSON, OutboundCallRequestToJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class OutboundCallsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
31
+ * Place an outbound call with a voice agent
32
+ */
33
+ organizationsOrganizationIdOutboundCallsPostRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters['organizationId'] == null) {
36
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdOutboundCallsPost().');
37
+ }
38
+ if (requestParameters['outboundCallRequest'] == null) {
39
+ throw new runtime.RequiredError('outboundCallRequest', 'Required parameter "outboundCallRequest" was null or undefined when calling organizationsOrganizationIdOutboundCallsPost().');
40
+ }
41
+ const queryParameters = {};
42
+ const headerParameters = {};
43
+ headerParameters['Content-Type'] = 'application/json';
44
+ if (this.configuration && this.configuration.accessToken) {
45
+ const token = this.configuration.accessToken;
46
+ const tokenString = yield token("bearerAuth", []);
47
+ if (tokenString) {
48
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
49
+ }
50
+ }
51
+ let urlPath = `/organizations/{organizationId}/outbound-calls`;
52
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
53
+ const response = yield this.request({
54
+ path: urlPath,
55
+ method: 'POST',
56
+ headers: headerParameters,
57
+ query: queryParameters,
58
+ body: OutboundCallRequestToJSON(requestParameters['outboundCallRequest']),
59
+ }, initOverrides);
60
+ return new runtime.JSONApiResponse(response, (jsonValue) => OutboundCallFromJSON(jsonValue));
61
+ });
62
+ }
63
+ /**
64
+ * Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
65
+ * Place an outbound call with a voice agent
66
+ */
67
+ organizationsOrganizationIdOutboundCallsPost(requestParameters, initOverrides) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const response = yield this.organizationsOrganizationIdOutboundCallsPostRaw(requestParameters, initOverrides);
70
+ return yield response.value();
71
+ });
72
+ }
73
+ }
@@ -12,6 +12,7 @@ export * from './LLMProvidersApi';
12
12
  export * from './MembersApi';
13
13
  export * from './NotificationsApi';
14
14
  export * from './OrganizationsApi';
15
+ export * from './OutboundCallsApi';
15
16
  export * from './PhonebookApi';
16
17
  export * from './PlaygroundApi';
17
18
  export * from './ProfileApi';
@@ -14,6 +14,7 @@ export * from './LLMProvidersApi';
14
14
  export * from './MembersApi';
15
15
  export * from './NotificationsApi';
16
16
  export * from './OrganizationsApi';
17
+ export * from './OutboundCallsApi';
17
18
  export * from './PhonebookApi';
18
19
  export * from './PlaygroundApi';
19
20
  export * from './ProfileApi';
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Tivadar AI Backend API
3
+ * Unified REST API for Tivadar AI Voice Agents platform
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AdminPhoneNumberAssignOutbound
16
+ */
17
+ export interface AdminPhoneNumberAssignOutbound {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AdminPhoneNumberAssignOutbound
22
+ */
23
+ organization_id: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the AdminPhoneNumberAssignOutbound interface.
27
+ */
28
+ export declare function instanceOfAdminPhoneNumberAssignOutbound(value: object): value is AdminPhoneNumberAssignOutbound;
29
+ export declare function AdminPhoneNumberAssignOutboundFromJSON(json: any): AdminPhoneNumberAssignOutbound;
30
+ export declare function AdminPhoneNumberAssignOutboundFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminPhoneNumberAssignOutbound;
31
+ export declare function AdminPhoneNumberAssignOutboundToJSON(json: any): AdminPhoneNumberAssignOutbound;
32
+ export declare function AdminPhoneNumberAssignOutboundToJSONTyped(value?: AdminPhoneNumberAssignOutbound | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,43 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Tivadar AI Backend API
5
+ * Unified REST API for Tivadar AI Voice Agents platform
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the AdminPhoneNumberAssignOutbound interface.
16
+ */
17
+ export function instanceOfAdminPhoneNumberAssignOutbound(value) {
18
+ if (!('organization_id' in value) || value['organization_id'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function AdminPhoneNumberAssignOutboundFromJSON(json) {
23
+ return AdminPhoneNumberAssignOutboundFromJSONTyped(json, false);
24
+ }
25
+ export function AdminPhoneNumberAssignOutboundFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'organization_id': json['organization_id'],
31
+ };
32
+ }
33
+ export function AdminPhoneNumberAssignOutboundToJSON(json) {
34
+ return AdminPhoneNumberAssignOutboundToJSONTyped(json, false);
35
+ }
36
+ export function AdminPhoneNumberAssignOutboundToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'organization_id': value['organization_id'],
42
+ };
43
+ }
@@ -33,6 +33,36 @@ export interface AdminPhoneNumberDetail {
33
33
  * @memberof AdminPhoneNumberDetail
34
34
  */
35
35
  supports_call_redirect?: boolean;
36
+ /**
37
+ *
38
+ * @type {boolean}
39
+ * @memberof AdminPhoneNumberDetail
40
+ */
41
+ supports_outbound?: boolean;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof AdminPhoneNumberDetail
46
+ */
47
+ sip_address?: string | null;
48
+ /**
49
+ *
50
+ * @type {boolean}
51
+ * @memberof AdminPhoneNumberDetail
52
+ */
53
+ outbound_configured?: boolean;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof AdminPhoneNumberDetail
58
+ */
59
+ outbound_organization_id?: string | null;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof AdminPhoneNumberDetail
64
+ */
65
+ outbound_organization_name?: string | null;
36
66
  /**
37
67
  *
38
68
  * @type {string}
@@ -35,6 +35,11 @@ export function AdminPhoneNumberDetailFromJSONTyped(json, ignoreDiscriminator) {
35
35
  'id': json['id'] == null ? undefined : json['id'],
36
36
  'number': json['number'] == null ? undefined : json['number'],
37
37
  'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
38
+ 'supports_outbound': json['supports_outbound'] == null ? undefined : json['supports_outbound'],
39
+ 'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
40
+ 'outbound_configured': json['outbound_configured'] == null ? undefined : json['outbound_configured'],
41
+ 'outbound_organization_id': json['outbound_organization_id'] == null ? undefined : json['outbound_organization_id'],
42
+ 'outbound_organization_name': json['outbound_organization_name'] == null ? undefined : json['outbound_organization_name'],
38
43
  'status': json['status'] == null ? undefined : json['status'],
39
44
  'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
40
45
  'sip_trunk_id': json['sip_trunk_id'] == null ? undefined : json['sip_trunk_id'],
@@ -56,6 +61,11 @@ export function AdminPhoneNumberDetailToJSONTyped(value, ignoreDiscriminator = f
56
61
  'id': value['id'],
57
62
  'number': value['number'],
58
63
  'supports_call_redirect': value['supports_call_redirect'],
64
+ 'supports_outbound': value['supports_outbound'],
65
+ 'sip_address': value['sip_address'],
66
+ 'outbound_configured': value['outbound_configured'],
67
+ 'outbound_organization_id': value['outbound_organization_id'],
68
+ 'outbound_organization_name': value['outbound_organization_name'],
59
69
  'status': value['status'],
60
70
  'created_at': value['created_at'] == null ? value['created_at'] : value['created_at'].toISOString(),
61
71
  'sip_trunk_id': value['sip_trunk_id'],
@@ -27,6 +27,24 @@ export interface AdminPhoneNumberUpdate {
27
27
  * @memberof AdminPhoneNumberUpdate
28
28
  */
29
29
  supports_call_redirect?: boolean;
30
+ /**
31
+ * Update the outbound SIP address (outbound numbers only).
32
+ * @type {string}
33
+ * @memberof AdminPhoneNumberUpdate
34
+ */
35
+ sip_address?: string;
36
+ /**
37
+ * Update the outbound SIP auth username (re-encrypted).
38
+ * @type {string}
39
+ * @memberof AdminPhoneNumberUpdate
40
+ */
41
+ auth_username?: string;
42
+ /**
43
+ * Update the outbound SIP auth password (re-encrypted).
44
+ * @type {string}
45
+ * @memberof AdminPhoneNumberUpdate
46
+ */
47
+ auth_password?: string;
30
48
  }
31
49
  /**
32
50
  * Check if a given object implements the AdminPhoneNumberUpdate interface.
@@ -27,6 +27,9 @@ export function AdminPhoneNumberUpdateFromJSONTyped(json, ignoreDiscriminator) {
27
27
  return {
28
28
  'number': json['number'] == null ? undefined : json['number'],
29
29
  'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
30
+ 'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
31
+ 'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
32
+ 'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
30
33
  };
31
34
  }
32
35
  export function AdminPhoneNumberUpdateToJSON(json) {
@@ -39,5 +42,8 @@ export function AdminPhoneNumberUpdateToJSONTyped(value, ignoreDiscriminator = f
39
42
  return {
40
43
  'number': value['number'],
41
44
  'supports_call_redirect': value['supports_call_redirect'],
45
+ 'sip_address': value['sip_address'],
46
+ 'auth_username': value['auth_username'],
47
+ 'auth_password': value['auth_password'],
42
48
  };
43
49
  }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Tivadar AI Backend API
3
+ * Unified REST API for Tivadar AI Voice Agents platform
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface OutboundCall
16
+ */
17
+ export interface OutboundCall {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof OutboundCall
22
+ */
23
+ call_id?: string | null;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof OutboundCall
28
+ */
29
+ room_name?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof OutboundCall
34
+ */
35
+ destination?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof OutboundCall
40
+ */
41
+ from_number?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof OutboundCall
46
+ */
47
+ participant_identity?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof OutboundCall
52
+ */
53
+ sip_participant_id?: string | null;
54
+ /**
55
+ *
56
+ * @type {boolean}
57
+ * @memberof OutboundCall
58
+ */
59
+ dispatched?: boolean;
60
+ }
61
+ /**
62
+ * Check if a given object implements the OutboundCall interface.
63
+ */
64
+ export declare function instanceOfOutboundCall(value: object): value is OutboundCall;
65
+ export declare function OutboundCallFromJSON(json: any): OutboundCall;
66
+ export declare function OutboundCallFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutboundCall;
67
+ export declare function OutboundCallToJSON(json: any): OutboundCall;
68
+ export declare function OutboundCallToJSONTyped(value?: OutboundCall | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,53 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Tivadar AI Backend API
5
+ * Unified REST API for Tivadar AI Voice Agents platform
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the OutboundCall interface.
16
+ */
17
+ export function instanceOfOutboundCall(value) {
18
+ return true;
19
+ }
20
+ export function OutboundCallFromJSON(json) {
21
+ return OutboundCallFromJSONTyped(json, false);
22
+ }
23
+ export function OutboundCallFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'call_id': json['call_id'] == null ? undefined : json['call_id'],
29
+ 'room_name': json['room_name'] == null ? undefined : json['room_name'],
30
+ 'destination': json['destination'] == null ? undefined : json['destination'],
31
+ 'from_number': json['from_number'] == null ? undefined : json['from_number'],
32
+ 'participant_identity': json['participant_identity'] == null ? undefined : json['participant_identity'],
33
+ 'sip_participant_id': json['sip_participant_id'] == null ? undefined : json['sip_participant_id'],
34
+ 'dispatched': json['dispatched'] == null ? undefined : json['dispatched'],
35
+ };
36
+ }
37
+ export function OutboundCallToJSON(json) {
38
+ return OutboundCallToJSONTyped(json, false);
39
+ }
40
+ export function OutboundCallToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'call_id': value['call_id'],
46
+ 'room_name': value['room_name'],
47
+ 'destination': value['destination'],
48
+ 'from_number': value['from_number'],
49
+ 'participant_identity': value['participant_identity'],
50
+ 'sip_participant_id': value['sip_participant_id'],
51
+ 'dispatched': value['dispatched'],
52
+ };
53
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Tivadar AI Backend API
3
+ * Unified REST API for Tivadar AI Voice Agents platform
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface OutboundCallRequest
16
+ */
17
+ export interface OutboundCallRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof OutboundCallRequest
22
+ */
23
+ voice_agent_id: string;
24
+ /**
25
+ * Destination from a phonebook entry. Provide this OR destination_number.
26
+ * @type {string}
27
+ * @memberof OutboundCallRequest
28
+ */
29
+ phonebook_entry_id?: string;
30
+ /**
31
+ * Custom destination phone number. Provide this OR phonebook_entry_id.
32
+ * @type {string}
33
+ * @memberof OutboundCallRequest
34
+ */
35
+ destination_number?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the OutboundCallRequest interface.
39
+ */
40
+ export declare function instanceOfOutboundCallRequest(value: object): value is OutboundCallRequest;
41
+ export declare function OutboundCallRequestFromJSON(json: any): OutboundCallRequest;
42
+ export declare function OutboundCallRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutboundCallRequest;
43
+ export declare function OutboundCallRequestToJSON(json: any): OutboundCallRequest;
44
+ export declare function OutboundCallRequestToJSONTyped(value?: OutboundCallRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,47 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Tivadar AI Backend API
5
+ * Unified REST API for Tivadar AI Voice Agents platform
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the OutboundCallRequest interface.
16
+ */
17
+ export function instanceOfOutboundCallRequest(value) {
18
+ if (!('voice_agent_id' in value) || value['voice_agent_id'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function OutboundCallRequestFromJSON(json) {
23
+ return OutboundCallRequestFromJSONTyped(json, false);
24
+ }
25
+ export function OutboundCallRequestFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'voice_agent_id': json['voice_agent_id'],
31
+ 'phonebook_entry_id': json['phonebook_entry_id'] == null ? undefined : json['phonebook_entry_id'],
32
+ 'destination_number': json['destination_number'] == null ? undefined : json['destination_number'],
33
+ };
34
+ }
35
+ export function OutboundCallRequestToJSON(json) {
36
+ return OutboundCallRequestToJSONTyped(json, false);
37
+ }
38
+ export function OutboundCallRequestToJSONTyped(value, ignoreDiscriminator = false) {
39
+ if (value == null) {
40
+ return value;
41
+ }
42
+ return {
43
+ 'voice_agent_id': value['voice_agent_id'],
44
+ 'phonebook_entry_id': value['phonebook_entry_id'],
45
+ 'destination_number': value['destination_number'],
46
+ };
47
+ }
@@ -39,6 +39,24 @@ export interface PhoneNumber {
39
39
  * @memberof PhoneNumber
40
40
  */
41
41
  supports_call_redirect?: boolean;
42
+ /**
43
+ * Whether this number can place outbound calls (has an outbound trunk).
44
+ * @type {boolean}
45
+ * @memberof PhoneNumber
46
+ */
47
+ supports_outbound?: boolean;
48
+ /**
49
+ * Outbound SIP provider host/address (outbound numbers only).
50
+ * @type {string}
51
+ * @memberof PhoneNumber
52
+ */
53
+ sip_address?: string | null;
54
+ /**
55
+ * Whether the outbound trunk + credentials are configured. Secrets are never returned.
56
+ * @type {boolean}
57
+ * @memberof PhoneNumber
58
+ */
59
+ outbound_configured?: boolean;
42
60
  /**
43
61
  *
44
62
  * @type {Date}
@@ -29,6 +29,9 @@ export function PhoneNumberFromJSONTyped(json, ignoreDiscriminator) {
29
29
  'number': json['number'] == null ? undefined : json['number'],
30
30
  'sip_trunk_id': json['sip_trunk_id'] == null ? undefined : json['sip_trunk_id'],
31
31
  'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
32
+ 'supports_outbound': json['supports_outbound'] == null ? undefined : json['supports_outbound'],
33
+ 'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
34
+ 'outbound_configured': json['outbound_configured'] == null ? undefined : json['outbound_configured'],
32
35
  'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
33
36
  };
34
37
  }
@@ -44,6 +47,9 @@ export function PhoneNumberToJSONTyped(value, ignoreDiscriminator = false) {
44
47
  'number': value['number'],
45
48
  'sip_trunk_id': value['sip_trunk_id'],
46
49
  'supports_call_redirect': value['supports_call_redirect'],
50
+ 'supports_outbound': value['supports_outbound'],
51
+ 'sip_address': value['sip_address'],
52
+ 'outbound_configured': value['outbound_configured'],
47
53
  'created_at': value['created_at'] == null ? value['created_at'] : value['created_at'].toISOString(),
48
54
  };
49
55
  }
@@ -27,6 +27,30 @@ export interface PhoneNumberCreate {
27
27
  * @memberof PhoneNumberCreate
28
28
  */
29
29
  supports_call_redirect?: boolean;
30
+ /**
31
+ * Whether this number can place outbound calls. When true, sip_address, auth_username and auth_password are required.
32
+ * @type {boolean}
33
+ * @memberof PhoneNumberCreate
34
+ */
35
+ supports_outbound?: boolean;
36
+ /**
37
+ * Outbound SIP provider host/address (required when supports_outbound is true).
38
+ * @type {string}
39
+ * @memberof PhoneNumberCreate
40
+ */
41
+ sip_address?: string;
42
+ /**
43
+ * Outbound SIP auth username (required when supports_outbound is true). Stored encrypted.
44
+ * @type {string}
45
+ * @memberof PhoneNumberCreate
46
+ */
47
+ auth_username?: string;
48
+ /**
49
+ * Outbound SIP auth password (required when supports_outbound is true). Stored encrypted, never returned.
50
+ * @type {string}
51
+ * @memberof PhoneNumberCreate
52
+ */
53
+ auth_password?: string;
30
54
  }
31
55
  /**
32
56
  * Check if a given object implements the PhoneNumberCreate interface.
@@ -29,6 +29,10 @@ export function PhoneNumberCreateFromJSONTyped(json, ignoreDiscriminator) {
29
29
  return {
30
30
  'number': json['number'],
31
31
  'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
32
+ 'supports_outbound': json['supports_outbound'] == null ? undefined : json['supports_outbound'],
33
+ 'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
34
+ 'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
35
+ 'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
32
36
  };
33
37
  }
34
38
  export function PhoneNumberCreateToJSON(json) {
@@ -41,5 +45,9 @@ export function PhoneNumberCreateToJSONTyped(value, ignoreDiscriminator = false)
41
45
  return {
42
46
  'number': value['number'],
43
47
  'supports_call_redirect': value['supports_call_redirect'],
48
+ 'supports_outbound': value['supports_outbound'],
49
+ 'sip_address': value['sip_address'],
50
+ 'auth_username': value['auth_username'],
51
+ 'auth_password': value['auth_password'],
44
52
  };
45
53
  }
@@ -1,6 +1,7 @@
1
1
  export * from './AdminDispatchRuleCreate';
2
2
  export * from './AdminGrantMinutesRequest';
3
3
  export * from './AdminPhoneNumberAssign';
4
+ export * from './AdminPhoneNumberAssignOutbound';
4
5
  export * from './AdminPhoneNumberDetail';
5
6
  export * from './AdminPhoneNumberUpdate';
6
7
  export * from './AdminPhoneNumbersListResponse';
@@ -69,6 +70,8 @@ export * from './OrganizationsOrganizationIdNotificationsGet200Response';
69
70
  export * from './OrganizationsOrganizationIdSipDispatchRulesPost200Response';
70
71
  export * from './OrganizationsOrganizationIdVoiceAgentsBasicGet200ResponseInner';
71
72
  export * from './OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest';
73
+ export * from './OutboundCall';
74
+ export * from './OutboundCallRequest';
72
75
  export * from './PauseSubscriptionRequest';
73
76
  export * from './PhoneNumber';
74
77
  export * from './PhoneNumberCreate';
@@ -3,6 +3,7 @@
3
3
  export * from './AdminDispatchRuleCreate';
4
4
  export * from './AdminGrantMinutesRequest';
5
5
  export * from './AdminPhoneNumberAssign';
6
+ export * from './AdminPhoneNumberAssignOutbound';
6
7
  export * from './AdminPhoneNumberDetail';
7
8
  export * from './AdminPhoneNumberUpdate';
8
9
  export * from './AdminPhoneNumbersListResponse';
@@ -71,6 +72,8 @@ export * from './OrganizationsOrganizationIdNotificationsGet200Response';
71
72
  export * from './OrganizationsOrganizationIdSipDispatchRulesPost200Response';
72
73
  export * from './OrganizationsOrganizationIdVoiceAgentsBasicGet200ResponseInner';
73
74
  export * from './OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest';
75
+ export * from './OutboundCall';
76
+ export * from './OutboundCallRequest';
74
77
  export * from './PauseSubscriptionRequest';
75
78
  export * from './PhoneNumber';
76
79
  export * from './PhoneNumberCreate';