@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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tivadar AI Backend API
|
|
6
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfCalendarMetadataBookingConstraints = instanceOfCalendarMetadataBookingConstraints;
|
|
17
|
+
exports.CalendarMetadataBookingConstraintsFromJSON = CalendarMetadataBookingConstraintsFromJSON;
|
|
18
|
+
exports.CalendarMetadataBookingConstraintsFromJSONTyped = CalendarMetadataBookingConstraintsFromJSONTyped;
|
|
19
|
+
exports.CalendarMetadataBookingConstraintsToJSON = CalendarMetadataBookingConstraintsToJSON;
|
|
20
|
+
exports.CalendarMetadataBookingConstraintsToJSONTyped = CalendarMetadataBookingConstraintsToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the CalendarMetadataBookingConstraints interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfCalendarMetadataBookingConstraints(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function CalendarMetadataBookingConstraintsFromJSON(json) {
|
|
28
|
+
return CalendarMetadataBookingConstraintsFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function CalendarMetadataBookingConstraintsFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'allowed_days': json['allowed_days'] == null ? undefined : json['allowed_days'],
|
|
36
|
+
'start_hour': json['start_hour'] == null ? undefined : json['start_hour'],
|
|
37
|
+
'end_hour': json['end_hour'] == null ? undefined : json['end_hour'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function CalendarMetadataBookingConstraintsToJSON(json) {
|
|
41
|
+
return CalendarMetadataBookingConstraintsToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function CalendarMetadataBookingConstraintsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'allowed_days': value['allowed_days'],
|
|
49
|
+
'start_hour': value['start_hour'],
|
|
50
|
+
'end_hour': value['end_hour'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -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 CalendarUpdate {
|
|
|
21
22
|
* @memberof CalendarUpdate
|
|
22
23
|
*/
|
|
23
24
|
voice_agent_id?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {CalendarMetadata}
|
|
28
|
+
* @memberof CalendarUpdate
|
|
29
|
+
*/
|
|
30
|
+
metadata?: CalendarMetadata | null;
|
|
24
31
|
}
|
|
25
32
|
/**
|
|
26
33
|
* Check if a given object implements the CalendarUpdate interface.
|
|
@@ -18,6 +18,7 @@ exports.CalendarUpdateFromJSON = CalendarUpdateFromJSON;
|
|
|
18
18
|
exports.CalendarUpdateFromJSONTyped = CalendarUpdateFromJSONTyped;
|
|
19
19
|
exports.CalendarUpdateToJSON = CalendarUpdateToJSON;
|
|
20
20
|
exports.CalendarUpdateToJSONTyped = CalendarUpdateToJSONTyped;
|
|
21
|
+
const CalendarMetadata_1 = require("./CalendarMetadata");
|
|
21
22
|
/**
|
|
22
23
|
* Check if a given object implements the CalendarUpdate interface.
|
|
23
24
|
*/
|
|
@@ -33,6 +34,7 @@ function CalendarUpdateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
34
|
}
|
|
34
35
|
return {
|
|
35
36
|
'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
|
|
37
|
+
'metadata': json['metadata'] == null ? undefined : (0, CalendarMetadata_1.CalendarMetadataFromJSON)(json['metadata']),
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
40
|
function CalendarUpdateToJSON(json) {
|
|
@@ -44,5 +46,6 @@ function CalendarUpdateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
44
46
|
}
|
|
45
47
|
return {
|
|
46
48
|
'voice_agent_id': value['voice_agent_id'],
|
|
49
|
+
'metadata': (0, CalendarMetadata_1.CalendarMetadataToJSON)(value['metadata']),
|
|
47
50
|
};
|
|
48
51
|
}
|
package/dist/models/OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest.d.ts
ADDED
|
@@ -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 OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Mock caller phone number for sandbox testing
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest
|
|
22
|
+
*/
|
|
23
|
+
caller_id?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfOrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest(value: object): value is OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest;
|
|
29
|
+
export declare function OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestFromJSON(json: any): OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest;
|
|
30
|
+
export declare function OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest;
|
|
31
|
+
export declare function OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSON(json: any): OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest;
|
|
32
|
+
export declare function OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSONTyped(value?: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest | null, ignoreDiscriminator?: boolean): any;
|
package/dist/models/OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tivadar AI Backend API
|
|
6
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfOrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest = instanceOfOrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest;
|
|
17
|
+
exports.OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestFromJSON = OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestFromJSON;
|
|
18
|
+
exports.OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestFromJSONTyped = OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestFromJSONTyped;
|
|
19
|
+
exports.OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSON = OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSON;
|
|
20
|
+
exports.OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSONTyped = OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfOrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestFromJSON(json) {
|
|
28
|
+
return OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'caller_id': json['caller_id'] == null ? undefined : json['caller_id'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSON(json) {
|
|
39
|
+
return OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'caller_id': value['caller_id'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -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 PhoneNumberCreate
|
|
16
|
+
*/
|
|
17
|
+
export interface PhoneNumberCreate {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof PhoneNumberCreate
|
|
22
|
+
*/
|
|
23
|
+
number: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the PhoneNumberCreate interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfPhoneNumberCreate(value: object): value is PhoneNumberCreate;
|
|
29
|
+
export declare function PhoneNumberCreateFromJSON(json: any): PhoneNumberCreate;
|
|
30
|
+
export declare function PhoneNumberCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): PhoneNumberCreate;
|
|
31
|
+
export declare function PhoneNumberCreateToJSON(json: any): PhoneNumberCreate;
|
|
32
|
+
export declare function PhoneNumberCreateToJSONTyped(value?: PhoneNumberCreate | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tivadar AI Backend API
|
|
6
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfPhoneNumberCreate = instanceOfPhoneNumberCreate;
|
|
17
|
+
exports.PhoneNumberCreateFromJSON = PhoneNumberCreateFromJSON;
|
|
18
|
+
exports.PhoneNumberCreateFromJSONTyped = PhoneNumberCreateFromJSONTyped;
|
|
19
|
+
exports.PhoneNumberCreateToJSON = PhoneNumberCreateToJSON;
|
|
20
|
+
exports.PhoneNumberCreateToJSONTyped = PhoneNumberCreateToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the PhoneNumberCreate interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfPhoneNumberCreate(value) {
|
|
25
|
+
if (!('number' in value) || value['number'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function PhoneNumberCreateFromJSON(json) {
|
|
30
|
+
return PhoneNumberCreateFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function PhoneNumberCreateFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'number': json['number'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function PhoneNumberCreateToJSON(json) {
|
|
41
|
+
return PhoneNumberCreateToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function PhoneNumberCreateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'number': value['number'],
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export * from './CalendarEventCreate';
|
|
|
7
7
|
export * from './CalendarEventListResponse';
|
|
8
8
|
export * from './CalendarEventUpdate';
|
|
9
9
|
export * from './CalendarListResponse';
|
|
10
|
+
export * from './CalendarMetadata';
|
|
11
|
+
export * from './CalendarMetadataBookingConstraints';
|
|
10
12
|
export * from './CalendarUpdate';
|
|
11
13
|
export * from './Call';
|
|
12
14
|
export * from './CallCreate';
|
|
@@ -40,10 +42,12 @@ export * from './OrganizationsOrganizationIdEmbeddingProvidersGet200ResponseInne
|
|
|
40
42
|
export * from './OrganizationsOrganizationIdLlmProvidersGet200ResponseInner';
|
|
41
43
|
export * from './OrganizationsOrganizationIdSipDispatchRulesPost200Response';
|
|
42
44
|
export * from './OrganizationsOrganizationIdVoiceAgentsBasicGet200ResponseInner';
|
|
45
|
+
export * from './OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest';
|
|
43
46
|
export * from './PauseSubscriptionRequest';
|
|
44
47
|
export * from './PauseSubscriptionResponse';
|
|
45
48
|
export * from './PauseSubscriptionResponsePauseCollection';
|
|
46
49
|
export * from './PhoneNumber';
|
|
50
|
+
export * from './PhoneNumberCreate';
|
|
47
51
|
export * from './RagConfig';
|
|
48
52
|
export * from './RagConfigCreate';
|
|
49
53
|
export * from './RagDocument';
|
package/dist/models/index.js
CHANGED
|
@@ -25,6 +25,8 @@ __exportStar(require("./CalendarEventCreate"), exports);
|
|
|
25
25
|
__exportStar(require("./CalendarEventListResponse"), exports);
|
|
26
26
|
__exportStar(require("./CalendarEventUpdate"), exports);
|
|
27
27
|
__exportStar(require("./CalendarListResponse"), exports);
|
|
28
|
+
__exportStar(require("./CalendarMetadata"), exports);
|
|
29
|
+
__exportStar(require("./CalendarMetadataBookingConstraints"), exports);
|
|
28
30
|
__exportStar(require("./CalendarUpdate"), exports);
|
|
29
31
|
__exportStar(require("./Call"), exports);
|
|
30
32
|
__exportStar(require("./CallCreate"), exports);
|
|
@@ -58,10 +60,12 @@ __exportStar(require("./OrganizationsOrganizationIdEmbeddingProvidersGet200Respo
|
|
|
58
60
|
__exportStar(require("./OrganizationsOrganizationIdLlmProvidersGet200ResponseInner"), exports);
|
|
59
61
|
__exportStar(require("./OrganizationsOrganizationIdSipDispatchRulesPost200Response"), exports);
|
|
60
62
|
__exportStar(require("./OrganizationsOrganizationIdVoiceAgentsBasicGet200ResponseInner"), exports);
|
|
63
|
+
__exportStar(require("./OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest"), exports);
|
|
61
64
|
__exportStar(require("./PauseSubscriptionRequest"), exports);
|
|
62
65
|
__exportStar(require("./PauseSubscriptionResponse"), exports);
|
|
63
66
|
__exportStar(require("./PauseSubscriptionResponsePauseCollection"), exports);
|
|
64
67
|
__exportStar(require("./PhoneNumber"), exports);
|
|
68
|
+
__exportStar(require("./PhoneNumberCreate"), exports);
|
|
65
69
|
__exportStar(require("./RagConfig"), exports);
|
|
66
70
|
__exportStar(require("./RagConfigCreate"), exports);
|
|
67
71
|
__exportStar(require("./RagDocument"), exports);
|
package/package.json
CHANGED
package/src/api-client.ts
CHANGED
|
@@ -34,6 +34,7 @@ import type {
|
|
|
34
34
|
RagConfigCreate,
|
|
35
35
|
SipTrunkCreate,
|
|
36
36
|
DispatchRuleCreate,
|
|
37
|
+
PhoneNumberCreate,
|
|
37
38
|
OrganizationCreate,
|
|
38
39
|
CreateCheckoutSessionRequest,
|
|
39
40
|
CancelSubscriptionRequest,
|
|
@@ -128,7 +129,9 @@ export class Api {
|
|
|
128
129
|
deleteTrunk: (organizationId: string, trunkId: string, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipTrunksTrunkIdDelete"]>;
|
|
129
130
|
createDispatchRule: (organizationId: string, dispatchRuleCreate: DispatchRuleCreate, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipDispatchRulesPost"]>;
|
|
130
131
|
deleteDispatchRule: (organizationId: string, dispatchId: string, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipDispatchRulesDispatchIdDelete"]>;
|
|
131
|
-
listPhoneNumbers: (options?: RequestInit) => ReturnType<SIPApi["phoneNumbersGet"]>;
|
|
132
|
+
listPhoneNumbers: (includeAssigned?: boolean, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersGet"]>;
|
|
133
|
+
createPhoneNumber: (phoneNumberCreate: PhoneNumberCreate, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersPost"]>;
|
|
134
|
+
deletePhoneNumber: (phoneNumberId: number, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersPhoneNumberIdDelete"]>;
|
|
132
135
|
};
|
|
133
136
|
public readonly subscription: {
|
|
134
137
|
getStatus: (organizationId: string, options?: RequestInit) => ReturnType<SubscriptionApi["organizationsOrganizationIdSubscriptionGet"]>;
|
|
@@ -304,7 +307,9 @@ export class Api {
|
|
|
304
307
|
deleteTrunk: (organizationId, trunkId, options) => this.sipApi.organizationsOrganizationIdSipTrunksTrunkIdDelete({ organizationId, trunkId }, options),
|
|
305
308
|
createDispatchRule: (organizationId, dispatchRuleCreate, options) => this.sipApi.organizationsOrganizationIdSipDispatchRulesPost({ organizationId, dispatchRuleCreate }, options),
|
|
306
309
|
deleteDispatchRule: (organizationId, dispatchId, options) => this.sipApi.organizationsOrganizationIdSipDispatchRulesDispatchIdDelete({ organizationId, dispatchId }, options),
|
|
307
|
-
listPhoneNumbers: (options) => this.sipApi.phoneNumbersGet(options),
|
|
310
|
+
listPhoneNumbers: (includeAssigned, options) => this.sipApi.phoneNumbersGet({ includeAssigned }, options),
|
|
311
|
+
createPhoneNumber: (phoneNumberCreate, options) => this.sipApi.phoneNumbersPost({ phoneNumberCreate }, options),
|
|
312
|
+
deletePhoneNumber: (phoneNumberId, options) => this.sipApi.phoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
|
|
308
313
|
};
|
|
309
314
|
|
|
310
315
|
this.subscription = {
|
|
@@ -15,16 +15,20 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest,
|
|
18
19
|
SandboxToken,
|
|
19
20
|
} from '../models/index';
|
|
20
21
|
import {
|
|
22
|
+
OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestFromJSON,
|
|
23
|
+
OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSON,
|
|
21
24
|
SandboxTokenFromJSON,
|
|
22
25
|
SandboxTokenToJSON,
|
|
23
26
|
} from '../models/index';
|
|
24
27
|
|
|
25
|
-
export interface
|
|
28
|
+
export interface OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostOperationRequest {
|
|
26
29
|
organizationId: string;
|
|
27
30
|
voiceAgentId: string;
|
|
31
|
+
organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest?: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest;
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
/**
|
|
@@ -35,7 +39,7 @@ export class PlaygroundApi extends runtime.BaseAPI {
|
|
|
35
39
|
/**
|
|
36
40
|
* Get a sandbox token for voice agent testing
|
|
37
41
|
*/
|
|
38
|
-
async organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRaw(requestParameters:
|
|
42
|
+
async organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRaw(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxToken>> {
|
|
39
43
|
if (requestParameters['organizationId'] == null) {
|
|
40
44
|
throw new runtime.RequiredError(
|
|
41
45
|
'organizationId',
|
|
@@ -54,6 +58,8 @@ export class PlaygroundApi extends runtime.BaseAPI {
|
|
|
54
58
|
|
|
55
59
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
56
60
|
|
|
61
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
62
|
+
|
|
57
63
|
if (this.configuration && this.configuration.accessToken) {
|
|
58
64
|
const token = this.configuration.accessToken;
|
|
59
65
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -72,6 +78,7 @@ export class PlaygroundApi extends runtime.BaseAPI {
|
|
|
72
78
|
method: 'POST',
|
|
73
79
|
headers: headerParameters,
|
|
74
80
|
query: queryParameters,
|
|
81
|
+
body: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequestToJSON(requestParameters['organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest']),
|
|
75
82
|
}, initOverrides);
|
|
76
83
|
|
|
77
84
|
return new runtime.JSONApiResponse(response, (jsonValue) => SandboxTokenFromJSON(jsonValue));
|
|
@@ -80,7 +87,7 @@ export class PlaygroundApi extends runtime.BaseAPI {
|
|
|
80
87
|
/**
|
|
81
88
|
* Get a sandbox token for voice agent testing
|
|
82
89
|
*/
|
|
83
|
-
async organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost(requestParameters:
|
|
90
|
+
async organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost(requestParameters: OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxToken> {
|
|
84
91
|
const response = await this.organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRaw(requestParameters, initOverrides);
|
|
85
92
|
return await response.value();
|
|
86
93
|
}
|
package/src/apis/SIPApi.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
DispatchRuleCreate,
|
|
19
19
|
OrganizationsOrganizationIdSipDispatchRulesPost200Response,
|
|
20
20
|
PhoneNumber,
|
|
21
|
+
PhoneNumberCreate,
|
|
21
22
|
SipTrunkCreate,
|
|
22
23
|
SipTrunkWithAgent,
|
|
23
24
|
} from '../models/index';
|
|
@@ -28,6 +29,8 @@ import {
|
|
|
28
29
|
OrganizationsOrganizationIdSipDispatchRulesPost200ResponseToJSON,
|
|
29
30
|
PhoneNumberFromJSON,
|
|
30
31
|
PhoneNumberToJSON,
|
|
32
|
+
PhoneNumberCreateFromJSON,
|
|
33
|
+
PhoneNumberCreateToJSON,
|
|
31
34
|
SipTrunkCreateFromJSON,
|
|
32
35
|
SipTrunkCreateToJSON,
|
|
33
36
|
SipTrunkWithAgentFromJSON,
|
|
@@ -58,6 +61,18 @@ export interface OrganizationsOrganizationIdSipTrunksTrunkIdDeleteRequest {
|
|
|
58
61
|
trunkId: string;
|
|
59
62
|
}
|
|
60
63
|
|
|
64
|
+
export interface PhoneNumbersGetRequest {
|
|
65
|
+
includeAssigned?: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface PhoneNumbersPhoneNumberIdDeleteRequest {
|
|
69
|
+
phoneNumberId: number;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface PhoneNumbersPostRequest {
|
|
73
|
+
phoneNumberCreate: PhoneNumberCreate;
|
|
74
|
+
}
|
|
75
|
+
|
|
61
76
|
/**
|
|
62
77
|
*
|
|
63
78
|
*/
|
|
@@ -323,11 +338,15 @@ export class SIPApi extends runtime.BaseAPI {
|
|
|
323
338
|
}
|
|
324
339
|
|
|
325
340
|
/**
|
|
326
|
-
* List
|
|
341
|
+
* List phone numbers
|
|
327
342
|
*/
|
|
328
|
-
async phoneNumbersGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PhoneNumber>>> {
|
|
343
|
+
async phoneNumbersGetRaw(requestParameters: PhoneNumbersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PhoneNumber>>> {
|
|
329
344
|
const queryParameters: any = {};
|
|
330
345
|
|
|
346
|
+
if (requestParameters['includeAssigned'] != null) {
|
|
347
|
+
queryParameters['includeAssigned'] = requestParameters['includeAssigned'];
|
|
348
|
+
}
|
|
349
|
+
|
|
331
350
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
332
351
|
|
|
333
352
|
if (this.configuration && this.configuration.accessToken) {
|
|
@@ -352,10 +371,101 @@ export class SIPApi extends runtime.BaseAPI {
|
|
|
352
371
|
}
|
|
353
372
|
|
|
354
373
|
/**
|
|
355
|
-
* List
|
|
374
|
+
* List phone numbers
|
|
375
|
+
*/
|
|
376
|
+
async phoneNumbersGet(requestParameters: PhoneNumbersGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PhoneNumber>> {
|
|
377
|
+
const response = await this.phoneNumbersGetRaw(requestParameters, initOverrides);
|
|
378
|
+
return await response.value();
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Delete a phone number
|
|
383
|
+
*/
|
|
384
|
+
async phoneNumbersPhoneNumberIdDeleteRaw(requestParameters: PhoneNumbersPhoneNumberIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
385
|
+
if (requestParameters['phoneNumberId'] == null) {
|
|
386
|
+
throw new runtime.RequiredError(
|
|
387
|
+
'phoneNumberId',
|
|
388
|
+
'Required parameter "phoneNumberId" was null or undefined when calling phoneNumbersPhoneNumberIdDelete().'
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
const queryParameters: any = {};
|
|
393
|
+
|
|
394
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
395
|
+
|
|
396
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
397
|
+
const token = this.configuration.accessToken;
|
|
398
|
+
const tokenString = await token("bearerAuth", []);
|
|
399
|
+
|
|
400
|
+
if (tokenString) {
|
|
401
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
let urlPath = `/phone-numbers/{phoneNumberId}`;
|
|
406
|
+
urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
|
|
407
|
+
|
|
408
|
+
const response = await this.request({
|
|
409
|
+
path: urlPath,
|
|
410
|
+
method: 'DELETE',
|
|
411
|
+
headers: headerParameters,
|
|
412
|
+
query: queryParameters,
|
|
413
|
+
}, initOverrides);
|
|
414
|
+
|
|
415
|
+
return new runtime.VoidApiResponse(response);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Delete a phone number
|
|
420
|
+
*/
|
|
421
|
+
async phoneNumbersPhoneNumberIdDelete(requestParameters: PhoneNumbersPhoneNumberIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
422
|
+
await this.phoneNumbersPhoneNumberIdDeleteRaw(requestParameters, initOverrides);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Create a phone number
|
|
427
|
+
*/
|
|
428
|
+
async phoneNumbersPostRaw(requestParameters: PhoneNumbersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PhoneNumber>> {
|
|
429
|
+
if (requestParameters['phoneNumberCreate'] == null) {
|
|
430
|
+
throw new runtime.RequiredError(
|
|
431
|
+
'phoneNumberCreate',
|
|
432
|
+
'Required parameter "phoneNumberCreate" was null or undefined when calling phoneNumbersPost().'
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
const queryParameters: any = {};
|
|
437
|
+
|
|
438
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
439
|
+
|
|
440
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
441
|
+
|
|
442
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
443
|
+
const token = this.configuration.accessToken;
|
|
444
|
+
const tokenString = await token("bearerAuth", []);
|
|
445
|
+
|
|
446
|
+
if (tokenString) {
|
|
447
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
let urlPath = `/phone-numbers`;
|
|
452
|
+
|
|
453
|
+
const response = await this.request({
|
|
454
|
+
path: urlPath,
|
|
455
|
+
method: 'POST',
|
|
456
|
+
headers: headerParameters,
|
|
457
|
+
query: queryParameters,
|
|
458
|
+
body: PhoneNumberCreateToJSON(requestParameters['phoneNumberCreate']),
|
|
459
|
+
}, initOverrides);
|
|
460
|
+
|
|
461
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PhoneNumberFromJSON(jsonValue));
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Create a phone number
|
|
356
466
|
*/
|
|
357
|
-
async
|
|
358
|
-
const response = await this.
|
|
467
|
+
async phoneNumbersPost(requestParameters: PhoneNumbersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PhoneNumber> {
|
|
468
|
+
const response = await this.phoneNumbersPostRaw(requestParameters, initOverrides);
|
|
359
469
|
return await response.value();
|
|
360
470
|
}
|
|
361
471
|
|
package/src/models/Calendar.ts
CHANGED
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { CalendarMetadata } from './CalendarMetadata';
|
|
17
|
+
import {
|
|
18
|
+
CalendarMetadataFromJSON,
|
|
19
|
+
CalendarMetadataFromJSONTyped,
|
|
20
|
+
CalendarMetadataToJSON,
|
|
21
|
+
CalendarMetadataToJSONTyped,
|
|
22
|
+
} from './CalendarMetadata';
|
|
23
|
+
|
|
16
24
|
/**
|
|
17
25
|
*
|
|
18
26
|
* @export
|
|
@@ -49,6 +57,12 @@ export interface Calendar {
|
|
|
49
57
|
* @memberof Calendar
|
|
50
58
|
*/
|
|
51
59
|
calendar_url?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Optional metadata including booking constraints
|
|
62
|
+
* @type {CalendarMetadata}
|
|
63
|
+
* @memberof Calendar
|
|
64
|
+
*/
|
|
65
|
+
metadata?: CalendarMetadata | null;
|
|
52
66
|
/**
|
|
53
67
|
*
|
|
54
68
|
* @type {Date}
|
|
@@ -84,6 +98,7 @@ export function CalendarFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
84
98
|
'agent_name': json['agent_name'],
|
|
85
99
|
'enabled': json['enabled'],
|
|
86
100
|
'calendar_url': json['calendar_url'] == null ? undefined : json['calendar_url'],
|
|
101
|
+
'metadata': json['metadata'] == null ? undefined : CalendarMetadataFromJSON(json['metadata']),
|
|
87
102
|
'created_at': (new Date(json['created_at'])),
|
|
88
103
|
};
|
|
89
104
|
}
|
|
@@ -104,6 +119,7 @@ export function CalendarToJSONTyped(value?: Calendar | null, ignoreDiscriminator
|
|
|
104
119
|
'agent_name': value['agent_name'],
|
|
105
120
|
'enabled': value['enabled'],
|
|
106
121
|
'calendar_url': value['calendar_url'],
|
|
122
|
+
'metadata': CalendarMetadataToJSON(value['metadata']),
|
|
107
123
|
'created_at': value['created_at'].toISOString(),
|
|
108
124
|
};
|
|
109
125
|
}
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { CalendarMetadata } from './CalendarMetadata';
|
|
17
|
+
import {
|
|
18
|
+
CalendarMetadataFromJSON,
|
|
19
|
+
CalendarMetadataFromJSONTyped,
|
|
20
|
+
CalendarMetadataToJSON,
|
|
21
|
+
CalendarMetadataToJSONTyped,
|
|
22
|
+
} from './CalendarMetadata';
|
|
23
|
+
|
|
16
24
|
/**
|
|
17
25
|
*
|
|
18
26
|
* @export
|
|
@@ -25,6 +33,12 @@ export interface CalendarCreate {
|
|
|
25
33
|
* @memberof CalendarCreate
|
|
26
34
|
*/
|
|
27
35
|
voice_agent_id: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {CalendarMetadata}
|
|
39
|
+
* @memberof CalendarCreate
|
|
40
|
+
*/
|
|
41
|
+
metadata?: CalendarMetadata | null;
|
|
28
42
|
}
|
|
29
43
|
|
|
30
44
|
/**
|
|
@@ -46,6 +60,7 @@ export function CalendarCreateFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
46
60
|
return {
|
|
47
61
|
|
|
48
62
|
'voice_agent_id': json['voice_agent_id'],
|
|
63
|
+
'metadata': json['metadata'] == null ? undefined : CalendarMetadataFromJSON(json['metadata']),
|
|
49
64
|
};
|
|
50
65
|
}
|
|
51
66
|
|
|
@@ -61,6 +76,7 @@ export function CalendarCreateToJSONTyped(value?: CalendarCreate | null, ignoreD
|
|
|
61
76
|
return {
|
|
62
77
|
|
|
63
78
|
'voice_agent_id': value['voice_agent_id'],
|
|
79
|
+
'metadata': CalendarMetadataToJSON(value['metadata']),
|
|
64
80
|
};
|
|
65
81
|
}
|
|
66
82
|
|