@l7mp/tivadar-ai-api-sdk 0.2.5 → 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/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/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 +1 -0
- package/src/models/CalendarEventCreate.ts +1 -0
- package/src/models/CalendarEventUpdate.ts +1 -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,134 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { Tool } from './Tool';
|
|
17
|
+
import {
|
|
18
|
+
ToolFromJSON,
|
|
19
|
+
ToolFromJSONTyped,
|
|
20
|
+
ToolToJSON,
|
|
21
|
+
ToolToJSONTyped,
|
|
22
|
+
} from './Tool';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AgentTool
|
|
28
|
+
*/
|
|
29
|
+
export interface AgentTool {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AgentTool
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof AgentTool
|
|
40
|
+
*/
|
|
41
|
+
voice_agent_id: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Tool}
|
|
45
|
+
* @memberof AgentTool
|
|
46
|
+
*/
|
|
47
|
+
tool: Tool;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof AgentTool
|
|
52
|
+
*/
|
|
53
|
+
enabled: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Non-secret config values. Secret fields are stored encrypted server-side and returned as `null` placeholders for fields that have a value set.
|
|
56
|
+
* @type {{ [key: string]: any; }}
|
|
57
|
+
* @memberof AgentTool
|
|
58
|
+
*/
|
|
59
|
+
config: { [key: string]: any; };
|
|
60
|
+
/**
|
|
61
|
+
* For each secret field, whether a value is currently stored.
|
|
62
|
+
* @type {{ [key: string]: boolean; }}
|
|
63
|
+
* @memberof AgentTool
|
|
64
|
+
*/
|
|
65
|
+
secret_field_status?: { [key: string]: boolean; };
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {Date}
|
|
69
|
+
* @memberof AgentTool
|
|
70
|
+
*/
|
|
71
|
+
created_at?: Date;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {Date}
|
|
75
|
+
* @memberof AgentTool
|
|
76
|
+
*/
|
|
77
|
+
updated_at?: Date;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Check if a given object implements the AgentTool interface.
|
|
82
|
+
*/
|
|
83
|
+
export function instanceOfAgentTool(value: object): value is AgentTool {
|
|
84
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
85
|
+
if (!('voice_agent_id' in value) || value['voice_agent_id'] === undefined) return false;
|
|
86
|
+
if (!('tool' in value) || value['tool'] === undefined) return false;
|
|
87
|
+
if (!('enabled' in value) || value['enabled'] === undefined) return false;
|
|
88
|
+
if (!('config' in value) || value['config'] === undefined) return false;
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function AgentToolFromJSON(json: any): AgentTool {
|
|
93
|
+
return AgentToolFromJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function AgentToolFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentTool {
|
|
97
|
+
if (json == null) {
|
|
98
|
+
return json;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
|
|
102
|
+
'id': json['id'],
|
|
103
|
+
'voice_agent_id': json['voice_agent_id'],
|
|
104
|
+
'tool': ToolFromJSON(json['tool']),
|
|
105
|
+
'enabled': json['enabled'],
|
|
106
|
+
'config': json['config'],
|
|
107
|
+
'secret_field_status': json['secret_field_status'] == null ? undefined : json['secret_field_status'],
|
|
108
|
+
'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
109
|
+
'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function AgentToolToJSON(json: any): AgentTool {
|
|
114
|
+
return AgentToolToJSONTyped(json, false);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function AgentToolToJSONTyped(value?: AgentTool | null, ignoreDiscriminator: boolean = false): any {
|
|
118
|
+
if (value == null) {
|
|
119
|
+
return value;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
|
|
124
|
+
'id': value['id'],
|
|
125
|
+
'voice_agent_id': value['voice_agent_id'],
|
|
126
|
+
'tool': ToolToJSON(value['tool']),
|
|
127
|
+
'enabled': value['enabled'],
|
|
128
|
+
'config': value['config'],
|
|
129
|
+
'secret_field_status': value['secret_field_status'],
|
|
130
|
+
'created_at': value['created_at'] == null ? value['created_at'] : value['created_at'].toISOString(),
|
|
131
|
+
'updated_at': value['updated_at'] == null ? value['updated_at'] : value['updated_at'].toISOString(),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AgentToolUpsert
|
|
20
|
+
*/
|
|
21
|
+
export interface AgentToolUpsert {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof AgentToolUpsert
|
|
26
|
+
*/
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Full config object including secret fields. Secrets sent here are encrypted server-side; omit a secret field to keep its existing value.
|
|
30
|
+
* @type {{ [key: string]: any; }}
|
|
31
|
+
* @memberof AgentToolUpsert
|
|
32
|
+
*/
|
|
33
|
+
config?: { [key: string]: any; };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the AgentToolUpsert interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfAgentToolUpsert(value: object): value is AgentToolUpsert {
|
|
40
|
+
if (!('enabled' in value) || value['enabled'] === undefined) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function AgentToolUpsertFromJSON(json: any): AgentToolUpsert {
|
|
45
|
+
return AgentToolUpsertFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function AgentToolUpsertFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentToolUpsert {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'enabled': json['enabled'],
|
|
55
|
+
'config': json['config'] == null ? undefined : json['config'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function AgentToolUpsertToJSON(json: any): AgentToolUpsert {
|
|
60
|
+
return AgentToolUpsertToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function AgentToolUpsertToJSONTyped(value?: AgentToolUpsert | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'enabled': value['enabled'],
|
|
71
|
+
'config': value['config'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
package/src/models/Call.ts
CHANGED
package/src/models/CallCreate.ts
CHANGED
package/src/models/CallUpdate.ts
CHANGED
|
@@ -20,6 +20,13 @@ import {
|
|
|
20
20
|
NotificationChannelToJSON,
|
|
21
21
|
NotificationChannelToJSONTyped,
|
|
22
22
|
} from './NotificationChannel';
|
|
23
|
+
import type { NotificationLocalizedContentValue } from './NotificationLocalizedContentValue';
|
|
24
|
+
import {
|
|
25
|
+
NotificationLocalizedContentValueFromJSON,
|
|
26
|
+
NotificationLocalizedContentValueFromJSONTyped,
|
|
27
|
+
NotificationLocalizedContentValueToJSON,
|
|
28
|
+
NotificationLocalizedContentValueToJSONTyped,
|
|
29
|
+
} from './NotificationLocalizedContentValue';
|
|
23
30
|
import type { NotificationType } from './NotificationType';
|
|
24
31
|
import {
|
|
25
32
|
NotificationTypeFromJSON,
|
|
@@ -115,35 +122,35 @@ export interface Notification {
|
|
|
115
122
|
*/
|
|
116
123
|
expires_at?: Date | null;
|
|
117
124
|
/**
|
|
118
|
-
*
|
|
119
|
-
* @type {
|
|
125
|
+
*
|
|
126
|
+
* @type {Date}
|
|
120
127
|
* @memberof Notification
|
|
121
128
|
*/
|
|
122
|
-
|
|
129
|
+
created_at: Date;
|
|
123
130
|
/**
|
|
124
|
-
*
|
|
125
|
-
* @type {
|
|
131
|
+
*
|
|
132
|
+
* @type {Date}
|
|
126
133
|
* @memberof Notification
|
|
127
134
|
*/
|
|
128
|
-
|
|
135
|
+
updated_at: Date;
|
|
129
136
|
/**
|
|
130
|
-
*
|
|
131
|
-
* @type {
|
|
137
|
+
* Whether an email should also be sent to recipients
|
|
138
|
+
* @type {boolean}
|
|
132
139
|
* @memberof Notification
|
|
133
140
|
*/
|
|
134
|
-
|
|
141
|
+
send_email?: boolean;
|
|
135
142
|
/**
|
|
136
|
-
*
|
|
137
|
-
* @type {
|
|
143
|
+
* Localized notification title/content variants keyed by language tag (for example en, en-US, hu-HU)
|
|
144
|
+
* @type {{ [key: string]: NotificationLocalizedContentValue; }}
|
|
138
145
|
* @memberof Notification
|
|
139
146
|
*/
|
|
140
|
-
|
|
147
|
+
localized_content?: { [key: string]: NotificationLocalizedContentValue; } | null;
|
|
141
148
|
/**
|
|
142
|
-
*
|
|
143
|
-
* @type {
|
|
149
|
+
* Fallback language key to use when recipient preferred language translation is missing
|
|
150
|
+
* @type {string}
|
|
144
151
|
* @memberof Notification
|
|
145
152
|
*/
|
|
146
|
-
|
|
153
|
+
default_language?: string | null;
|
|
147
154
|
/**
|
|
148
155
|
* When the current user read this notification (present in list responses)
|
|
149
156
|
* @type {Date}
|
|
@@ -171,7 +178,6 @@ export function instanceOfNotification(value: object): value is Notification {
|
|
|
171
178
|
if (!('scope' in value) || value['scope'] === undefined) return false;
|
|
172
179
|
if (!('title' in value) || value['title'] === undefined) return false;
|
|
173
180
|
if (!('content' in value) || value['content'] === undefined) return false;
|
|
174
|
-
if (!('send_email' in value) || value['send_email'] === undefined) return false;
|
|
175
181
|
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
176
182
|
if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
|
|
177
183
|
return true;
|
|
@@ -198,11 +204,11 @@ export function NotificationFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
198
204
|
'user_id': json['user_id'] == null ? undefined : json['user_id'],
|
|
199
205
|
'created_by': json['created_by'] == null ? undefined : json['created_by'],
|
|
200
206
|
'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
|
|
201
|
-
'send_email': json['send_email'],
|
|
202
|
-
'localized_content': json['localized_content'] == null ? undefined : json['localized_content'],
|
|
203
|
-
'default_language': json['default_language'] == null ? undefined : json['default_language'],
|
|
204
207
|
'created_at': (new Date(json['created_at'])),
|
|
205
208
|
'updated_at': (new Date(json['updated_at'])),
|
|
209
|
+
'send_email': json['send_email'] == null ? undefined : json['send_email'],
|
|
210
|
+
'localized_content': json['localized_content'] == null ? undefined : (mapValues(json['localized_content'], NotificationLocalizedContentValueFromJSON)),
|
|
211
|
+
'default_language': json['default_language'] == null ? undefined : json['default_language'],
|
|
206
212
|
'read_at': json['read_at'] == null ? undefined : (new Date(json['read_at'])),
|
|
207
213
|
'dismissed_at': json['dismissed_at'] == null ? undefined : (new Date(json['dismissed_at'])),
|
|
208
214
|
};
|
|
@@ -230,12 +236,13 @@ export function NotificationToJSONTyped(value?: Notification | null, ignoreDiscr
|
|
|
230
236
|
'user_id': value['user_id'],
|
|
231
237
|
'created_by': value['created_by'],
|
|
232
238
|
'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
|
|
233
|
-
'send_email': value['send_email'],
|
|
234
|
-
'localized_content': value['localized_content'],
|
|
235
|
-
'default_language': value['default_language'],
|
|
236
239
|
'created_at': value['created_at'].toISOString(),
|
|
237
240
|
'updated_at': value['updated_at'].toISOString(),
|
|
241
|
+
'send_email': value['send_email'],
|
|
242
|
+
'localized_content': value['localized_content'] == null ? undefined : (mapValues(value['localized_content'], NotificationLocalizedContentValueToJSON)),
|
|
243
|
+
'default_language': value['default_language'],
|
|
238
244
|
'read_at': value['read_at'] == null ? value['read_at'] : value['read_at'].toISOString(),
|
|
239
245
|
'dismissed_at': value['dismissed_at'] == null ? value['dismissed_at'] : value['dismissed_at'].toISOString(),
|
|
240
246
|
};
|
|
241
247
|
}
|
|
248
|
+
|
|
@@ -20,6 +20,13 @@ import {
|
|
|
20
20
|
NotificationChannelToJSON,
|
|
21
21
|
NotificationChannelToJSONTyped,
|
|
22
22
|
} from './NotificationChannel';
|
|
23
|
+
import type { NotificationLocalizedContentValue } from './NotificationLocalizedContentValue';
|
|
24
|
+
import {
|
|
25
|
+
NotificationLocalizedContentValueFromJSON,
|
|
26
|
+
NotificationLocalizedContentValueFromJSONTyped,
|
|
27
|
+
NotificationLocalizedContentValueToJSON,
|
|
28
|
+
NotificationLocalizedContentValueToJSONTyped,
|
|
29
|
+
} from './NotificationLocalizedContentValue';
|
|
23
30
|
import type { NotificationType } from './NotificationType';
|
|
24
31
|
import {
|
|
25
32
|
NotificationTypeFromJSON,
|
|
@@ -104,10 +111,10 @@ export interface NotificationCreate {
|
|
|
104
111
|
send_email?: boolean;
|
|
105
112
|
/**
|
|
106
113
|
*
|
|
107
|
-
* @type {{ [key: string]:
|
|
114
|
+
* @type {{ [key: string]: NotificationLocalizedContentValue; }}
|
|
108
115
|
* @memberof NotificationCreate
|
|
109
116
|
*/
|
|
110
|
-
localized_content?: { [key: string]:
|
|
117
|
+
localized_content?: { [key: string]: NotificationLocalizedContentValue; } | null;
|
|
111
118
|
/**
|
|
112
119
|
*
|
|
113
120
|
* @type {string}
|
|
@@ -146,7 +153,7 @@ export function NotificationCreateFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
146
153
|
'user_id': json['user_id'] == null ? undefined : json['user_id'],
|
|
147
154
|
'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
|
|
148
155
|
'send_email': json['send_email'] == null ? undefined : json['send_email'],
|
|
149
|
-
'localized_content': json['localized_content'] == null ? undefined : json['localized_content'],
|
|
156
|
+
'localized_content': json['localized_content'] == null ? undefined : (mapValues(json['localized_content'], NotificationLocalizedContentValueFromJSON)),
|
|
150
157
|
'default_language': json['default_language'] == null ? undefined : json['default_language'],
|
|
151
158
|
};
|
|
152
159
|
}
|
|
@@ -171,7 +178,8 @@ export function NotificationCreateToJSONTyped(value?: NotificationCreate | null,
|
|
|
171
178
|
'user_id': value['user_id'],
|
|
172
179
|
'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
|
|
173
180
|
'send_email': value['send_email'],
|
|
174
|
-
'localized_content': value['localized_content'],
|
|
181
|
+
'localized_content': value['localized_content'] == null ? undefined : (mapValues(value['localized_content'], NotificationLocalizedContentValueToJSON)),
|
|
175
182
|
'default_language': value['default_language'],
|
|
176
183
|
};
|
|
177
184
|
}
|
|
185
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface NotificationLocalizedContentValue
|
|
20
|
+
*/
|
|
21
|
+
export interface NotificationLocalizedContentValue {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof NotificationLocalizedContentValue
|
|
26
|
+
*/
|
|
27
|
+
title: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof NotificationLocalizedContentValue
|
|
32
|
+
*/
|
|
33
|
+
content: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the NotificationLocalizedContentValue interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfNotificationLocalizedContentValue(value: object): value is NotificationLocalizedContentValue {
|
|
40
|
+
if (!('title' in value) || value['title'] === undefined) return false;
|
|
41
|
+
if (!('content' in value) || value['content'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function NotificationLocalizedContentValueFromJSON(json: any): NotificationLocalizedContentValue {
|
|
46
|
+
return NotificationLocalizedContentValueFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function NotificationLocalizedContentValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationLocalizedContentValue {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'title': json['title'],
|
|
56
|
+
'content': json['content'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function NotificationLocalizedContentValueToJSON(json: any): NotificationLocalizedContentValue {
|
|
61
|
+
return NotificationLocalizedContentValueToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function NotificationLocalizedContentValueToJSONTyped(value?: NotificationLocalizedContentValue | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'title': value['title'],
|
|
72
|
+
'content': value['content'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -20,6 +20,13 @@ import {
|
|
|
20
20
|
NotificationChannelToJSON,
|
|
21
21
|
NotificationChannelToJSONTyped,
|
|
22
22
|
} from './NotificationChannel';
|
|
23
|
+
import type { NotificationLocalizedContentValue } from './NotificationLocalizedContentValue';
|
|
24
|
+
import {
|
|
25
|
+
NotificationLocalizedContentValueFromJSON,
|
|
26
|
+
NotificationLocalizedContentValueFromJSONTyped,
|
|
27
|
+
NotificationLocalizedContentValueToJSON,
|
|
28
|
+
NotificationLocalizedContentValueToJSONTyped,
|
|
29
|
+
} from './NotificationLocalizedContentValue';
|
|
23
30
|
import type { NotificationSeverity } from './NotificationSeverity';
|
|
24
31
|
import {
|
|
25
32
|
NotificationSeverityFromJSON,
|
|
@@ -72,10 +79,10 @@ export interface NotificationUpdate {
|
|
|
72
79
|
send_email?: boolean;
|
|
73
80
|
/**
|
|
74
81
|
*
|
|
75
|
-
* @type {{ [key: string]:
|
|
82
|
+
* @type {{ [key: string]: NotificationLocalizedContentValue; }}
|
|
76
83
|
* @memberof NotificationUpdate
|
|
77
84
|
*/
|
|
78
|
-
localized_content?: { [key: string]:
|
|
85
|
+
localized_content?: { [key: string]: NotificationLocalizedContentValue; } | null;
|
|
79
86
|
/**
|
|
80
87
|
*
|
|
81
88
|
* @type {string}
|
|
@@ -109,7 +116,7 @@ export function NotificationUpdateFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
109
116
|
'content': json['content'] == null ? undefined : json['content'],
|
|
110
117
|
'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
|
|
111
118
|
'send_email': json['send_email'] == null ? undefined : json['send_email'],
|
|
112
|
-
'localized_content': json['localized_content'] == null ? undefined : json['localized_content'],
|
|
119
|
+
'localized_content': json['localized_content'] == null ? undefined : (mapValues(json['localized_content'], NotificationLocalizedContentValueFromJSON)),
|
|
113
120
|
'default_language': json['default_language'] == null ? undefined : json['default_language'],
|
|
114
121
|
};
|
|
115
122
|
}
|
|
@@ -131,7 +138,8 @@ export function NotificationUpdateToJSONTyped(value?: NotificationUpdate | null,
|
|
|
131
138
|
'content': value['content'],
|
|
132
139
|
'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
|
|
133
140
|
'send_email': value['send_email'],
|
|
134
|
-
'localized_content': value['localized_content'],
|
|
141
|
+
'localized_content': value['localized_content'] == null ? undefined : (mapValues(value['localized_content'], NotificationLocalizedContentValueToJSON)),
|
|
135
142
|
'default_language': value['default_language'],
|
|
136
143
|
};
|
|
137
144
|
}
|
|
145
|
+
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface Tool
|
|
20
|
+
*/
|
|
21
|
+
export interface Tool {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof Tool
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Unique tool identifier matching the LangChain function name.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Tool
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof Tool
|
|
38
|
+
*/
|
|
39
|
+
label: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof Tool
|
|
44
|
+
*/
|
|
45
|
+
description?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof Tool
|
|
50
|
+
*/
|
|
51
|
+
icon?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* Subscription feature key gating this tool (e.g. `tools.call_redirect`).
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof Tool
|
|
56
|
+
*/
|
|
57
|
+
feature_key: string;
|
|
58
|
+
/**
|
|
59
|
+
* JSON Schema (draft-07) describing the tool's config fields.
|
|
60
|
+
* @type {{ [key: string]: any; }}
|
|
61
|
+
* @memberof Tool
|
|
62
|
+
*/
|
|
63
|
+
config_schema: { [key: string]: any; };
|
|
64
|
+
/**
|
|
65
|
+
* Optional react-jsonschema-form UI Schema for widget hints.
|
|
66
|
+
* @type {{ [key: string]: any; }}
|
|
67
|
+
* @memberof Tool
|
|
68
|
+
*/
|
|
69
|
+
ui_schema: { [key: string]: any; };
|
|
70
|
+
/**
|
|
71
|
+
* Names of fields that should be stored encrypted and never echoed back.
|
|
72
|
+
* @type {Array<string>}
|
|
73
|
+
* @memberof Tool
|
|
74
|
+
*/
|
|
75
|
+
secret_fields: Array<string>;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {boolean}
|
|
79
|
+
* @memberof Tool
|
|
80
|
+
*/
|
|
81
|
+
enabled_globally?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {Date}
|
|
85
|
+
* @memberof Tool
|
|
86
|
+
*/
|
|
87
|
+
created_at?: Date;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {Date}
|
|
91
|
+
* @memberof Tool
|
|
92
|
+
*/
|
|
93
|
+
updated_at?: Date;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Check if a given object implements the Tool interface.
|
|
98
|
+
*/
|
|
99
|
+
export function instanceOfTool(value: object): value is Tool {
|
|
100
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
101
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
102
|
+
if (!('label' in value) || value['label'] === undefined) return false;
|
|
103
|
+
if (!('feature_key' in value) || value['feature_key'] === undefined) return false;
|
|
104
|
+
if (!('config_schema' in value) || value['config_schema'] === undefined) return false;
|
|
105
|
+
if (!('ui_schema' in value) || value['ui_schema'] === undefined) return false;
|
|
106
|
+
if (!('secret_fields' in value) || value['secret_fields'] === undefined) return false;
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function ToolFromJSON(json: any): Tool {
|
|
111
|
+
return ToolFromJSONTyped(json, false);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function ToolFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tool {
|
|
115
|
+
if (json == null) {
|
|
116
|
+
return json;
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
'id': json['id'],
|
|
121
|
+
'name': json['name'],
|
|
122
|
+
'label': json['label'],
|
|
123
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
124
|
+
'icon': json['icon'] == null ? undefined : json['icon'],
|
|
125
|
+
'feature_key': json['feature_key'],
|
|
126
|
+
'config_schema': json['config_schema'],
|
|
127
|
+
'ui_schema': json['ui_schema'],
|
|
128
|
+
'secret_fields': json['secret_fields'],
|
|
129
|
+
'enabled_globally': json['enabled_globally'] == null ? undefined : json['enabled_globally'],
|
|
130
|
+
'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
131
|
+
'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function ToolToJSON(json: any): Tool {
|
|
136
|
+
return ToolToJSONTyped(json, false);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function ToolToJSONTyped(value?: Tool | null, ignoreDiscriminator: boolean = false): any {
|
|
140
|
+
if (value == null) {
|
|
141
|
+
return value;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return {
|
|
145
|
+
|
|
146
|
+
'id': value['id'],
|
|
147
|
+
'name': value['name'],
|
|
148
|
+
'label': value['label'],
|
|
149
|
+
'description': value['description'],
|
|
150
|
+
'icon': value['icon'],
|
|
151
|
+
'feature_key': value['feature_key'],
|
|
152
|
+
'config_schema': value['config_schema'],
|
|
153
|
+
'ui_schema': value['ui_schema'],
|
|
154
|
+
'secret_fields': value['secret_fields'],
|
|
155
|
+
'enabled_globally': value['enabled_globally'],
|
|
156
|
+
'created_at': value['created_at'] == null ? value['created_at'] : value['created_at'].toISOString(),
|
|
157
|
+
'updated_at': value['updated_at'] == null ? value['updated_at'] : value['updated_at'].toISOString(),
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|