@l7mp/tivadar-ai-api-sdk 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-client.d.ts +10 -2
- package/dist/api-client.js +9 -1
- package/dist/apis/RAGApi.d.ts +15 -13
- package/dist/apis/RAGApi.js +47 -45
- package/dist/apis/ToolsApi.d.ts +68 -0
- package/dist/apis/ToolsApi.js +205 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +10 -2
- package/dist/esm/api-client.js +9 -1
- package/dist/esm/apis/RAGApi.d.ts +15 -13
- package/dist/esm/apis/RAGApi.js +47 -45
- package/dist/esm/apis/ToolsApi.d.ts +68 -0
- package/dist/esm/apis/ToolsApi.js +201 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AgentTool.d.ts +79 -0
- package/dist/esm/models/AgentTool.js +66 -0
- package/dist/esm/models/AgentToolUpsert.d.ts +40 -0
- package/dist/esm/models/AgentToolUpsert.js +45 -0
- package/dist/esm/models/CalendarEvent.d.ts +6 -0
- package/dist/esm/models/CalendarEvent.js +2 -0
- package/dist/esm/models/CalendarEventCreate.d.ts +6 -0
- package/dist/esm/models/CalendarEventCreate.js +2 -0
- package/dist/esm/models/CalendarEventUpdate.d.ts +6 -0
- package/dist/esm/models/CalendarEventUpdate.js +2 -0
- package/dist/esm/models/Notification.d.ts +16 -17
- package/dist/esm/models/Notification.js +8 -8
- package/dist/esm/models/NotificationCreate.d.ts +3 -4
- package/dist/esm/models/NotificationCreate.js +4 -2
- package/dist/esm/models/NotificationLocalizedContentValue.d.ts +38 -0
- package/dist/esm/models/NotificationLocalizedContentValue.js +47 -0
- package/dist/esm/models/NotificationUpdate.d.ts +3 -4
- package/dist/esm/models/NotificationUpdate.js +4 -2
- package/dist/esm/models/Tool.d.ts +102 -0
- package/dist/esm/models/Tool.js +77 -0
- package/dist/esm/models/ToolCreate.d.ts +84 -0
- package/dist/esm/models/ToolCreate.js +63 -0
- package/dist/esm/models/ToolUpdate.d.ts +78 -0
- package/dist/esm/models/ToolUpdate.js +55 -0
- package/dist/esm/models/UserPreferences.d.ts +1 -1
- package/dist/esm/models/UserPreferences.js +3 -1
- package/dist/esm/models/UserPreferencesUpdate.d.ts +1 -1
- package/dist/esm/models/UserPreferencesUpdate.js +3 -1
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/models/AgentTool.d.ts +79 -0
- package/dist/models/AgentTool.js +73 -0
- package/dist/models/AgentToolUpsert.d.ts +40 -0
- package/dist/models/AgentToolUpsert.js +52 -0
- package/dist/models/CalendarEvent.d.ts +6 -0
- package/dist/models/CalendarEvent.js +2 -0
- package/dist/models/CalendarEventCreate.d.ts +6 -0
- package/dist/models/CalendarEventCreate.js +2 -0
- package/dist/models/CalendarEventUpdate.d.ts +6 -0
- package/dist/models/CalendarEventUpdate.js +2 -0
- package/dist/models/Notification.d.ts +16 -17
- package/dist/models/Notification.js +8 -8
- package/dist/models/NotificationCreate.d.ts +3 -4
- package/dist/models/NotificationCreate.js +4 -2
- package/dist/models/NotificationLocalizedContentValue.d.ts +38 -0
- package/dist/models/NotificationLocalizedContentValue.js +54 -0
- package/dist/models/NotificationUpdate.d.ts +3 -4
- package/dist/models/NotificationUpdate.js +4 -2
- package/dist/models/Tool.d.ts +102 -0
- package/dist/models/Tool.js +84 -0
- package/dist/models/ToolCreate.d.ts +84 -0
- package/dist/models/ToolCreate.js +70 -0
- package/dist/models/ToolUpdate.d.ts +78 -0
- package/dist/models/ToolUpdate.js +62 -0
- package/dist/models/UserPreferences.d.ts +1 -1
- package/dist/models/UserPreferences.js +3 -1
- package/dist/models/UserPreferencesUpdate.d.ts +1 -1
- package/dist/models/UserPreferencesUpdate.js +3 -1
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/api-client.ts +21 -2
- package/src/apis/RAGApi.ts +69 -67
- package/src/apis/ToolsApi.ts +287 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AgentTool.ts +134 -0
- package/src/models/AgentToolUpsert.ts +74 -0
- package/src/models/CalendarEvent.ts +8 -0
- package/src/models/CalendarEventCreate.ts +8 -0
- package/src/models/CalendarEventUpdate.ts +8 -0
- package/src/models/Call.ts +1 -0
- package/src/models/CallCreate.ts +1 -0
- package/src/models/CallUpdate.ts +1 -0
- package/src/models/Notification.ts +29 -22
- package/src/models/NotificationCreate.ts +12 -4
- package/src/models/NotificationLocalizedContentValue.ts +75 -0
- package/src/models/NotificationUpdate.ts +12 -4
- package/src/models/Tool.ts +160 -0
- package/src/models/ToolCreate.ts +132 -0
- package/src/models/ToolUpdate.ts +121 -0
- package/src/models/UserPreferences.ts +4 -4
- package/src/models/UserPreferencesUpdate.ts +4 -4
- package/src/models/index.ts +6 -0
|
@@ -0,0 +1,70 @@
|
|
|
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.instanceOfToolCreate = instanceOfToolCreate;
|
|
17
|
+
exports.ToolCreateFromJSON = ToolCreateFromJSON;
|
|
18
|
+
exports.ToolCreateFromJSONTyped = ToolCreateFromJSONTyped;
|
|
19
|
+
exports.ToolCreateToJSON = ToolCreateToJSON;
|
|
20
|
+
exports.ToolCreateToJSONTyped = ToolCreateToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ToolCreate interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfToolCreate(value) {
|
|
25
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('label' in value) || value['label'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('feature_key' in value) || value['feature_key'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function ToolCreateFromJSON(json) {
|
|
34
|
+
return ToolCreateFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function ToolCreateFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'name': json['name'],
|
|
42
|
+
'label': json['label'],
|
|
43
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
44
|
+
'icon': json['icon'] == null ? undefined : json['icon'],
|
|
45
|
+
'feature_key': json['feature_key'],
|
|
46
|
+
'config_schema': json['config_schema'] == null ? undefined : json['config_schema'],
|
|
47
|
+
'ui_schema': json['ui_schema'] == null ? undefined : json['ui_schema'],
|
|
48
|
+
'secret_fields': json['secret_fields'] == null ? undefined : json['secret_fields'],
|
|
49
|
+
'enabled_globally': json['enabled_globally'] == null ? undefined : json['enabled_globally'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function ToolCreateToJSON(json) {
|
|
53
|
+
return ToolCreateToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function ToolCreateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'name': value['name'],
|
|
61
|
+
'label': value['label'],
|
|
62
|
+
'description': value['description'],
|
|
63
|
+
'icon': value['icon'],
|
|
64
|
+
'feature_key': value['feature_key'],
|
|
65
|
+
'config_schema': value['config_schema'],
|
|
66
|
+
'ui_schema': value['ui_schema'],
|
|
67
|
+
'secret_fields': value['secret_fields'],
|
|
68
|
+
'enabled_globally': value['enabled_globally'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 ToolUpdate
|
|
16
|
+
*/
|
|
17
|
+
export interface ToolUpdate {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ToolUpdate
|
|
22
|
+
*/
|
|
23
|
+
label?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ToolUpdate
|
|
28
|
+
*/
|
|
29
|
+
description?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ToolUpdate
|
|
34
|
+
*/
|
|
35
|
+
icon?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ToolUpdate
|
|
40
|
+
*/
|
|
41
|
+
feature_key?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {{ [key: string]: any; }}
|
|
45
|
+
* @memberof ToolUpdate
|
|
46
|
+
*/
|
|
47
|
+
config_schema?: {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {{ [key: string]: any; }}
|
|
53
|
+
* @memberof ToolUpdate
|
|
54
|
+
*/
|
|
55
|
+
ui_schema?: {
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<string>}
|
|
61
|
+
* @memberof ToolUpdate
|
|
62
|
+
*/
|
|
63
|
+
secret_fields?: Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {boolean}
|
|
67
|
+
* @memberof ToolUpdate
|
|
68
|
+
*/
|
|
69
|
+
enabled_globally?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Check if a given object implements the ToolUpdate interface.
|
|
73
|
+
*/
|
|
74
|
+
export declare function instanceOfToolUpdate(value: object): value is ToolUpdate;
|
|
75
|
+
export declare function ToolUpdateFromJSON(json: any): ToolUpdate;
|
|
76
|
+
export declare function ToolUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolUpdate;
|
|
77
|
+
export declare function ToolUpdateToJSON(json: any): ToolUpdate;
|
|
78
|
+
export declare function ToolUpdateToJSONTyped(value?: ToolUpdate | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
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.instanceOfToolUpdate = instanceOfToolUpdate;
|
|
17
|
+
exports.ToolUpdateFromJSON = ToolUpdateFromJSON;
|
|
18
|
+
exports.ToolUpdateFromJSONTyped = ToolUpdateFromJSONTyped;
|
|
19
|
+
exports.ToolUpdateToJSON = ToolUpdateToJSON;
|
|
20
|
+
exports.ToolUpdateToJSONTyped = ToolUpdateToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ToolUpdate interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfToolUpdate(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function ToolUpdateFromJSON(json) {
|
|
28
|
+
return ToolUpdateFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function ToolUpdateFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'label': json['label'] == null ? undefined : json['label'],
|
|
36
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
37
|
+
'icon': json['icon'] == null ? undefined : json['icon'],
|
|
38
|
+
'feature_key': json['feature_key'] == null ? undefined : json['feature_key'],
|
|
39
|
+
'config_schema': json['config_schema'] == null ? undefined : json['config_schema'],
|
|
40
|
+
'ui_schema': json['ui_schema'] == null ? undefined : json['ui_schema'],
|
|
41
|
+
'secret_fields': json['secret_fields'] == null ? undefined : json['secret_fields'],
|
|
42
|
+
'enabled_globally': json['enabled_globally'] == null ? undefined : json['enabled_globally'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function ToolUpdateToJSON(json) {
|
|
46
|
+
return ToolUpdateToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function ToolUpdateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'label': value['label'],
|
|
54
|
+
'description': value['description'],
|
|
55
|
+
'icon': value['icon'],
|
|
56
|
+
'feature_key': value['feature_key'],
|
|
57
|
+
'config_schema': value['config_schema'],
|
|
58
|
+
'ui_schema': value['ui_schema'],
|
|
59
|
+
'secret_fields': value['secret_fields'],
|
|
60
|
+
'enabled_globally': value['enabled_globally'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -24,6 +24,8 @@ exports.UserPreferencesToJSONTyped = UserPreferencesToJSONTyped;
|
|
|
24
24
|
function instanceOfUserPreferences(value) {
|
|
25
25
|
if (!('user_id' in value) || value['user_id'] === undefined)
|
|
26
26
|
return false;
|
|
27
|
+
if (!('preferred_language' in value) || value['preferred_language'] === undefined)
|
|
28
|
+
return false;
|
|
27
29
|
return true;
|
|
28
30
|
}
|
|
29
31
|
function UserPreferencesFromJSON(json) {
|
|
@@ -35,7 +37,7 @@ function UserPreferencesFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
37
|
}
|
|
36
38
|
return {
|
|
37
39
|
'user_id': json['user_id'],
|
|
38
|
-
'preferred_language': json['preferred_language']
|
|
40
|
+
'preferred_language': json['preferred_language'],
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
43
|
function UserPreferencesToJSON(json) {
|
|
@@ -20,7 +20,7 @@ export interface UserPreferencesUpdate {
|
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof UserPreferencesUpdate
|
|
22
22
|
*/
|
|
23
|
-
preferred_language
|
|
23
|
+
preferred_language: string | null;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Check if a given object implements the UserPreferencesUpdate interface.
|
|
@@ -22,6 +22,8 @@ exports.UserPreferencesUpdateToJSONTyped = UserPreferencesUpdateToJSONTyped;
|
|
|
22
22
|
* Check if a given object implements the UserPreferencesUpdate interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfUserPreferencesUpdate(value) {
|
|
25
|
+
if (!('preferred_language' in value) || value['preferred_language'] === undefined)
|
|
26
|
+
return false;
|
|
25
27
|
return true;
|
|
26
28
|
}
|
|
27
29
|
function UserPreferencesUpdateFromJSON(json) {
|
|
@@ -32,7 +34,7 @@ function UserPreferencesUpdateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
34
|
return json;
|
|
33
35
|
}
|
|
34
36
|
return {
|
|
35
|
-
'preferred_language': json['preferred_language']
|
|
37
|
+
'preferred_language': json['preferred_language'],
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
40
|
function UserPreferencesUpdateToJSON(json) {
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './AgentTool';
|
|
2
|
+
export * from './AgentToolUpsert';
|
|
1
3
|
export * from './BillingPortalRequest';
|
|
2
4
|
export * from './BillingPortalResponse';
|
|
3
5
|
export * from './Calendar';
|
|
@@ -37,6 +39,7 @@ export * from './Member';
|
|
|
37
39
|
export * from './Notification';
|
|
38
40
|
export * from './NotificationChannel';
|
|
39
41
|
export * from './NotificationCreate';
|
|
42
|
+
export * from './NotificationLocalizedContentValue';
|
|
40
43
|
export * from './NotificationScope';
|
|
41
44
|
export * from './NotificationSeverity';
|
|
42
45
|
export * from './NotificationType';
|
|
@@ -76,7 +79,10 @@ export * from './SubscriptionStatus';
|
|
|
76
79
|
export * from './SubscriptionStatusPlan';
|
|
77
80
|
export * from './SubscriptionStatusService';
|
|
78
81
|
export * from './SubscriptionStatusSubscription';
|
|
82
|
+
export * from './Tool';
|
|
79
83
|
export * from './ToolConfig';
|
|
84
|
+
export * from './ToolCreate';
|
|
85
|
+
export * from './ToolUpdate';
|
|
80
86
|
export * from './TtsProvider';
|
|
81
87
|
export * from './TtsProviderModel';
|
|
82
88
|
export * from './TtsProviderVoice';
|
package/dist/models/index.js
CHANGED
|
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./AgentTool"), exports);
|
|
20
|
+
__exportStar(require("./AgentToolUpsert"), exports);
|
|
19
21
|
__exportStar(require("./BillingPortalRequest"), exports);
|
|
20
22
|
__exportStar(require("./BillingPortalResponse"), exports);
|
|
21
23
|
__exportStar(require("./Calendar"), exports);
|
|
@@ -55,6 +57,7 @@ __exportStar(require("./Member"), exports);
|
|
|
55
57
|
__exportStar(require("./Notification"), exports);
|
|
56
58
|
__exportStar(require("./NotificationChannel"), exports);
|
|
57
59
|
__exportStar(require("./NotificationCreate"), exports);
|
|
60
|
+
__exportStar(require("./NotificationLocalizedContentValue"), exports);
|
|
58
61
|
__exportStar(require("./NotificationScope"), exports);
|
|
59
62
|
__exportStar(require("./NotificationSeverity"), exports);
|
|
60
63
|
__exportStar(require("./NotificationType"), exports);
|
|
@@ -94,7 +97,10 @@ __exportStar(require("./SubscriptionStatus"), exports);
|
|
|
94
97
|
__exportStar(require("./SubscriptionStatusPlan"), exports);
|
|
95
98
|
__exportStar(require("./SubscriptionStatusService"), exports);
|
|
96
99
|
__exportStar(require("./SubscriptionStatusSubscription"), exports);
|
|
100
|
+
__exportStar(require("./Tool"), exports);
|
|
97
101
|
__exportStar(require("./ToolConfig"), exports);
|
|
102
|
+
__exportStar(require("./ToolCreate"), exports);
|
|
103
|
+
__exportStar(require("./ToolUpdate"), exports);
|
|
98
104
|
__exportStar(require("./TtsProvider"), exports);
|
|
99
105
|
__exportStar(require("./TtsProviderModel"), exports);
|
|
100
106
|
__exportStar(require("./TtsProviderVoice"), exports);
|
package/package.json
CHANGED
package/src/api-client.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CallsApi, type OrganizationsOrganizationIdCallsGetSandboxEnum } from "./apis/CallsApi";
|
|
2
2
|
import { CalendarApi } from "./apis/CalendarApi";
|
|
3
3
|
import { ChatAgentsApi } from "./apis/ChatAgentsApi";
|
|
4
|
+
|
|
5
|
+
|
|
4
6
|
import { HistoryApi } from "./apis/HistoryApi";
|
|
5
7
|
import { InvitationsApi } from "./apis/InvitationsApi";
|
|
6
8
|
import { MembersApi } from "./apis/MembersApi";
|
|
@@ -17,6 +19,7 @@ import { STTProvidersApi } from "./apis/STTProvidersApi";
|
|
|
17
19
|
import { TTSProvidersApi } from "./apis/TTSProvidersApi";
|
|
18
20
|
import { SubscriptionApi } from "./apis/SubscriptionApi";
|
|
19
21
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
22
|
+
import { ToolsApi } from "./apis/ToolsApi";
|
|
20
23
|
import { Configuration } from "./runtime";
|
|
21
24
|
|
|
22
25
|
import type {
|
|
@@ -49,6 +52,7 @@ import type {
|
|
|
49
52
|
BillingPortalRequest,
|
|
50
53
|
OrganizationsOrganizationIdNotificationsGet200Response,
|
|
51
54
|
UserPreferencesUpdate,
|
|
55
|
+
AgentToolUpsert,
|
|
52
56
|
} from "./models";
|
|
53
57
|
|
|
54
58
|
export interface ApiClientConfig {
|
|
@@ -131,7 +135,7 @@ export class Api {
|
|
|
131
135
|
upload: (organizationId: string, ragConfigName: string, file: File, sourceUrl?: string, metadata?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsPost"]>;
|
|
132
136
|
list: (organizationId: string, ragConfigName: string, status?: OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsGet"]>;
|
|
133
137
|
get: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet"]>;
|
|
134
|
-
download: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["
|
|
138
|
+
download: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["downloadDocumentFile"]>;
|
|
135
139
|
replace: (organizationId: string, ragConfigName: string, documentId: string, file: File, sourceUrl?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut"]>;
|
|
136
140
|
delete: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete"]>;
|
|
137
141
|
};
|
|
@@ -179,6 +183,12 @@ export class Api {
|
|
|
179
183
|
public readonly embeddingProviders: {
|
|
180
184
|
list: (organizationId: string, options?: RequestInit) => ReturnType<EmbeddingProvidersApi["organizationsOrganizationIdEmbeddingProvidersGet"]>;
|
|
181
185
|
};
|
|
186
|
+
public readonly tools: {
|
|
187
|
+
listCatalog: (organizationId: string, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdToolsGet"]>;
|
|
188
|
+
listForAgent: (organizationId: string, voiceAgentId: string, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet"]>;
|
|
189
|
+
upsertForAgent: (organizationId: string, voiceAgentId: string, toolName: string, agentToolUpsert: AgentToolUpsert, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut"]>;
|
|
190
|
+
removeFromAgent: (organizationId: string, voiceAgentId: string, toolName: string, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete"]>;
|
|
191
|
+
};
|
|
182
192
|
|
|
183
193
|
private readonly callsApi: CallsApi;
|
|
184
194
|
private readonly voiceAgentsApi: VoiceAgentsApi;
|
|
@@ -199,6 +209,7 @@ export class Api {
|
|
|
199
209
|
private readonly llmProvidersApi: LLMProvidersApi;
|
|
200
210
|
private readonly sttProvidersApi: STTProvidersApi;
|
|
201
211
|
private readonly ttsProvidersApi: TTSProvidersApi;
|
|
212
|
+
private readonly toolsApi: ToolsApi;
|
|
202
213
|
|
|
203
214
|
// Mutable auth state — shared by reference with all API instances
|
|
204
215
|
private readonly _auth: { accessToken: string | undefined; headers: Record<string, string> } = {
|
|
@@ -238,6 +249,7 @@ export class Api {
|
|
|
238
249
|
this.llmProvidersApi = new LLMProvidersApi(configuration);
|
|
239
250
|
this.sttProvidersApi = new STTProvidersApi(configuration);
|
|
240
251
|
this.ttsProvidersApi = new TTSProvidersApi(configuration);
|
|
252
|
+
this.toolsApi = new ToolsApi(configuration);
|
|
241
253
|
|
|
242
254
|
this.calls = {
|
|
243
255
|
list: (organizationId, voiceAgentId, sandbox, options) => this.callsApi.organizationsOrganizationIdCallsGet({ organizationId, voiceAgentId, sandbox }, options),
|
|
@@ -325,7 +337,7 @@ export class Api {
|
|
|
325
337
|
upload: (organizationId, ragConfigName, file, sourceUrl, metadata, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsPost({ organizationId, ragConfigName, file, sourceUrl, metadata }, options),
|
|
326
338
|
list: (organizationId, ragConfigName, status, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsGet({ organizationId, ragConfigName, status }, options),
|
|
327
339
|
get: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet({ organizationId, ragConfigName, documentId }, options),
|
|
328
|
-
download: (organizationId, ragConfigName, documentId, options) => this.ragApi.
|
|
340
|
+
download: (organizationId, ragConfigName, documentId, options) => this.ragApi.downloadDocumentFile({ organizationId, ragConfigName, documentId }, options),
|
|
329
341
|
replace: (organizationId, ragConfigName, documentId, file, sourceUrl, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut({ organizationId, ragConfigName, documentId, file, sourceUrl }, options),
|
|
330
342
|
delete: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete({ organizationId, ragConfigName, documentId }, options),
|
|
331
343
|
},
|
|
@@ -379,6 +391,13 @@ export class Api {
|
|
|
379
391
|
this.ttsProviders = {
|
|
380
392
|
list: (organizationId, options) => this.ttsProvidersApi.organizationsOrganizationIdTtsProvidersGet({ organizationId }, options),
|
|
381
393
|
};
|
|
394
|
+
|
|
395
|
+
this.tools = {
|
|
396
|
+
listCatalog: (organizationId, options) => this.toolsApi.organizationsOrganizationIdToolsGet({ organizationId }, options),
|
|
397
|
+
listForAgent: (organizationId, voiceAgentId, options) => this.toolsApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsGet({ organizationId, voiceAgentId }, options),
|
|
398
|
+
upsertForAgent: (organizationId, voiceAgentId, toolName, agentToolUpsert, options) => this.toolsApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut({ organizationId, voiceAgentId, toolName, agentToolUpsert }, options),
|
|
399
|
+
removeFromAgent: (organizationId, voiceAgentId, toolName, options) => this.toolsApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete({ organizationId, voiceAgentId, toolName }, options),
|
|
400
|
+
};
|
|
382
401
|
}
|
|
383
402
|
|
|
384
403
|
/**
|
package/src/apis/RAGApi.ts
CHANGED
|
@@ -34,6 +34,12 @@ import {
|
|
|
34
34
|
RagDocumentListToJSON,
|
|
35
35
|
} from '../models/index';
|
|
36
36
|
|
|
37
|
+
export interface DownloadDocumentFileRequest {
|
|
38
|
+
organizationId: string;
|
|
39
|
+
ragConfigName: string;
|
|
40
|
+
documentId: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
37
43
|
export interface OrganizationsOrganizationIdRagGetRequest {
|
|
38
44
|
organizationId: string;
|
|
39
45
|
}
|
|
@@ -60,12 +66,6 @@ export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdG
|
|
|
60
66
|
documentId: string;
|
|
61
67
|
}
|
|
62
68
|
|
|
63
|
-
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest {
|
|
64
|
-
organizationId: string;
|
|
65
|
-
ragConfigName: string;
|
|
66
|
-
documentId: string;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
69
|
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPutRequest {
|
|
70
70
|
organizationId: string;
|
|
71
71
|
ragConfigName: string;
|
|
@@ -93,6 +93,69 @@ export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsPostRequest
|
|
|
93
93
|
*/
|
|
94
94
|
export class RAGApi extends runtime.BaseAPI {
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Downloads the original uploaded document file from object storage. Requires S3-compatible object storage to be configured on the server.
|
|
98
|
+
* Download original document file
|
|
99
|
+
*/
|
|
100
|
+
async downloadDocumentFileRaw(requestParameters: DownloadDocumentFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
101
|
+
if (requestParameters['organizationId'] == null) {
|
|
102
|
+
throw new runtime.RequiredError(
|
|
103
|
+
'organizationId',
|
|
104
|
+
'Required parameter "organizationId" was null or undefined when calling downloadDocumentFile().'
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (requestParameters['ragConfigName'] == null) {
|
|
109
|
+
throw new runtime.RequiredError(
|
|
110
|
+
'ragConfigName',
|
|
111
|
+
'Required parameter "ragConfigName" was null or undefined when calling downloadDocumentFile().'
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (requestParameters['documentId'] == null) {
|
|
116
|
+
throw new runtime.RequiredError(
|
|
117
|
+
'documentId',
|
|
118
|
+
'Required parameter "documentId" was null or undefined when calling downloadDocumentFile().'
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const queryParameters: any = {};
|
|
123
|
+
|
|
124
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
125
|
+
|
|
126
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
127
|
+
const token = this.configuration.accessToken;
|
|
128
|
+
const tokenString = await token("bearerAuth", []);
|
|
129
|
+
|
|
130
|
+
if (tokenString) {
|
|
131
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents/{documentId}/file`;
|
|
136
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
137
|
+
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
138
|
+
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters['documentId'])));
|
|
139
|
+
|
|
140
|
+
const response = await this.request({
|
|
141
|
+
path: urlPath,
|
|
142
|
+
method: 'GET',
|
|
143
|
+
headers: headerParameters,
|
|
144
|
+
query: queryParameters,
|
|
145
|
+
}, initOverrides);
|
|
146
|
+
|
|
147
|
+
return new runtime.BlobApiResponse(response);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Downloads the original uploaded document file from object storage. Requires S3-compatible object storage to be configured on the server.
|
|
152
|
+
* Download original document file
|
|
153
|
+
*/
|
|
154
|
+
async downloadDocumentFile(requestParameters: DownloadDocumentFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
155
|
+
const response = await this.downloadDocumentFileRaw(requestParameters, initOverrides);
|
|
156
|
+
return await response.value();
|
|
157
|
+
}
|
|
158
|
+
|
|
96
159
|
/**
|
|
97
160
|
* List all RAG configurations for an organization
|
|
98
161
|
*/
|
|
@@ -366,67 +429,6 @@ export class RAGApi extends runtime.BaseAPI {
|
|
|
366
429
|
return await response.value();
|
|
367
430
|
}
|
|
368
431
|
|
|
369
|
-
/**
|
|
370
|
-
* Download original document file
|
|
371
|
-
*/
|
|
372
|
-
async organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
373
|
-
if (requestParameters['organizationId'] == null) {
|
|
374
|
-
throw new runtime.RequiredError(
|
|
375
|
-
'organizationId',
|
|
376
|
-
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().'
|
|
377
|
-
);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
if (requestParameters['ragConfigName'] == null) {
|
|
381
|
-
throw new runtime.RequiredError(
|
|
382
|
-
'ragConfigName',
|
|
383
|
-
'Required parameter "ragConfigName" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().'
|
|
384
|
-
);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
if (requestParameters['documentId'] == null) {
|
|
388
|
-
throw new runtime.RequiredError(
|
|
389
|
-
'documentId',
|
|
390
|
-
'Required parameter "documentId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().'
|
|
391
|
-
);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
const queryParameters: any = {};
|
|
395
|
-
|
|
396
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
397
|
-
|
|
398
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
399
|
-
const token = this.configuration.accessToken;
|
|
400
|
-
const tokenString = await token("bearerAuth", []);
|
|
401
|
-
|
|
402
|
-
if (tokenString) {
|
|
403
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents/{documentId}/file`;
|
|
408
|
-
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
409
|
-
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
410
|
-
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters['documentId'])));
|
|
411
|
-
|
|
412
|
-
const response = await this.request({
|
|
413
|
-
path: urlPath,
|
|
414
|
-
method: 'GET',
|
|
415
|
-
headers: headerParameters,
|
|
416
|
-
query: queryParameters,
|
|
417
|
-
}, initOverrides);
|
|
418
|
-
|
|
419
|
-
return new runtime.BlobApiResponse(response);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* Download original document file
|
|
424
|
-
*/
|
|
425
|
-
async organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
426
|
-
const response = await this.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters, initOverrides);
|
|
427
|
-
return await response.value();
|
|
428
|
-
}
|
|
429
|
-
|
|
430
432
|
/**
|
|
431
433
|
* Replace a document in a RAG configuration
|
|
432
434
|
*/
|