@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.
Files changed (99) hide show
  1. package/dist/api-client.d.ts +10 -2
  2. package/dist/api-client.js +9 -1
  3. package/dist/apis/RAGApi.d.ts +15 -13
  4. package/dist/apis/RAGApi.js +47 -45
  5. package/dist/apis/ToolsApi.d.ts +68 -0
  6. package/dist/apis/ToolsApi.js +205 -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 +10 -2
  10. package/dist/esm/api-client.js +9 -1
  11. package/dist/esm/apis/RAGApi.d.ts +15 -13
  12. package/dist/esm/apis/RAGApi.js +47 -45
  13. package/dist/esm/apis/ToolsApi.d.ts +68 -0
  14. package/dist/esm/apis/ToolsApi.js +201 -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/AgentTool.d.ts +79 -0
  18. package/dist/esm/models/AgentTool.js +66 -0
  19. package/dist/esm/models/AgentToolUpsert.d.ts +40 -0
  20. package/dist/esm/models/AgentToolUpsert.js +45 -0
  21. package/dist/esm/models/CalendarEvent.d.ts +6 -0
  22. package/dist/esm/models/CalendarEvent.js +2 -0
  23. package/dist/esm/models/CalendarEventCreate.d.ts +6 -0
  24. package/dist/esm/models/CalendarEventCreate.js +2 -0
  25. package/dist/esm/models/CalendarEventUpdate.d.ts +6 -0
  26. package/dist/esm/models/CalendarEventUpdate.js +2 -0
  27. package/dist/esm/models/Notification.d.ts +16 -17
  28. package/dist/esm/models/Notification.js +8 -8
  29. package/dist/esm/models/NotificationCreate.d.ts +3 -4
  30. package/dist/esm/models/NotificationCreate.js +4 -2
  31. package/dist/esm/models/NotificationLocalizedContentValue.d.ts +38 -0
  32. package/dist/esm/models/NotificationLocalizedContentValue.js +47 -0
  33. package/dist/esm/models/NotificationUpdate.d.ts +3 -4
  34. package/dist/esm/models/NotificationUpdate.js +4 -2
  35. package/dist/esm/models/Tool.d.ts +102 -0
  36. package/dist/esm/models/Tool.js +77 -0
  37. package/dist/esm/models/ToolCreate.d.ts +84 -0
  38. package/dist/esm/models/ToolCreate.js +63 -0
  39. package/dist/esm/models/ToolUpdate.d.ts +78 -0
  40. package/dist/esm/models/ToolUpdate.js +55 -0
  41. package/dist/esm/models/UserPreferences.d.ts +1 -1
  42. package/dist/esm/models/UserPreferences.js +3 -1
  43. package/dist/esm/models/UserPreferencesUpdate.d.ts +1 -1
  44. package/dist/esm/models/UserPreferencesUpdate.js +3 -1
  45. package/dist/esm/models/index.d.ts +6 -0
  46. package/dist/esm/models/index.js +6 -0
  47. package/dist/models/AgentTool.d.ts +79 -0
  48. package/dist/models/AgentTool.js +73 -0
  49. package/dist/models/AgentToolUpsert.d.ts +40 -0
  50. package/dist/models/AgentToolUpsert.js +52 -0
  51. package/dist/models/CalendarEvent.d.ts +6 -0
  52. package/dist/models/CalendarEvent.js +2 -0
  53. package/dist/models/CalendarEventCreate.d.ts +6 -0
  54. package/dist/models/CalendarEventCreate.js +2 -0
  55. package/dist/models/CalendarEventUpdate.d.ts +6 -0
  56. package/dist/models/CalendarEventUpdate.js +2 -0
  57. package/dist/models/Notification.d.ts +16 -17
  58. package/dist/models/Notification.js +8 -8
  59. package/dist/models/NotificationCreate.d.ts +3 -4
  60. package/dist/models/NotificationCreate.js +4 -2
  61. package/dist/models/NotificationLocalizedContentValue.d.ts +38 -0
  62. package/dist/models/NotificationLocalizedContentValue.js +54 -0
  63. package/dist/models/NotificationUpdate.d.ts +3 -4
  64. package/dist/models/NotificationUpdate.js +4 -2
  65. package/dist/models/Tool.d.ts +102 -0
  66. package/dist/models/Tool.js +84 -0
  67. package/dist/models/ToolCreate.d.ts +84 -0
  68. package/dist/models/ToolCreate.js +70 -0
  69. package/dist/models/ToolUpdate.d.ts +78 -0
  70. package/dist/models/ToolUpdate.js +62 -0
  71. package/dist/models/UserPreferences.d.ts +1 -1
  72. package/dist/models/UserPreferences.js +3 -1
  73. package/dist/models/UserPreferencesUpdate.d.ts +1 -1
  74. package/dist/models/UserPreferencesUpdate.js +3 -1
  75. package/dist/models/index.d.ts +6 -0
  76. package/dist/models/index.js +6 -0
  77. package/package.json +1 -1
  78. package/src/api-client.ts +21 -2
  79. package/src/apis/RAGApi.ts +69 -67
  80. package/src/apis/ToolsApi.ts +287 -0
  81. package/src/apis/index.ts +1 -0
  82. package/src/models/AgentTool.ts +134 -0
  83. package/src/models/AgentToolUpsert.ts +74 -0
  84. package/src/models/CalendarEvent.ts +8 -0
  85. package/src/models/CalendarEventCreate.ts +8 -0
  86. package/src/models/CalendarEventUpdate.ts +8 -0
  87. package/src/models/Call.ts +1 -0
  88. package/src/models/CallCreate.ts +1 -0
  89. package/src/models/CallUpdate.ts +1 -0
  90. package/src/models/Notification.ts +29 -22
  91. package/src/models/NotificationCreate.ts +12 -4
  92. package/src/models/NotificationLocalizedContentValue.ts +75 -0
  93. package/src/models/NotificationUpdate.ts +12 -4
  94. package/src/models/Tool.ts +160 -0
  95. package/src/models/ToolCreate.ts +132 -0
  96. package/src/models/ToolUpdate.ts +121 -0
  97. package/src/models/UserPreferences.ts +4 -4
  98. package/src/models/UserPreferencesUpdate.ts +4 -4
  99. 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
+ }
@@ -26,7 +26,7 @@ export interface UserPreferences {
26
26
  * @type {string}
27
27
  * @memberof UserPreferences
28
28
  */
29
- preferred_language?: string | null;
29
+ preferred_language: string | null;
30
30
  }
31
31
  /**
32
32
  * Check if a given object implements the UserPreferences interface.
@@ -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'] == null ? undefined : 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?: string | null;
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'] == null ? undefined : json['preferred_language'],
37
+ 'preferred_language': json['preferred_language'],
36
38
  };
37
39
  }
38
40
  function UserPreferencesUpdateToJSON(json) {
@@ -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';
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@l7mp/tivadar-ai-api-sdk",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "TypeScript/JavaScript SDK for Tivadar AI Backend API",
5
5
  "author": "L7mp Technologies",
6
6
  "repository": {
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["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet"]>;
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.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet({ organizationId, ragConfigName, documentId }, options),
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
  /**
@@ -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
  */