@l7mp/tivadar-ai-api-sdk 0.1.5 → 0.1.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.
@@ -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.instanceOfCall = instanceOfCall;
17
+ exports.CallFromJSON = CallFromJSON;
18
+ exports.CallFromJSONTyped = CallFromJSONTyped;
19
+ exports.CallToJSON = CallToJSON;
20
+ exports.CallToJSONTyped = CallToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the Call interface.
23
+ */
24
+ function instanceOfCall(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('created_at' in value) || value['created_at'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function CallFromJSON(json) {
32
+ return CallFromJSONTyped(json, false);
33
+ }
34
+ function CallFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'id': json['id'],
40
+ 'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
41
+ 'data': json['data'] == null ? undefined : json['data'],
42
+ 'caller': json['caller'] == null ? undefined : json['caller'],
43
+ 'sandbox': json['sandbox'] == null ? undefined : json['sandbox'],
44
+ 'created_at': (new Date(json['created_at'])),
45
+ };
46
+ }
47
+ function CallToJSON(json) {
48
+ return CallToJSONTyped(json, false);
49
+ }
50
+ function CallToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'id': value['id'],
56
+ 'voice_agent_id': value['voice_agent_id'],
57
+ 'data': value['data'],
58
+ 'caller': value['caller'],
59
+ 'sandbox': value['sandbox'],
60
+ 'created_at': value['created_at'].toISOString(),
61
+ };
62
+ }
@@ -0,0 +1,52 @@
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 CallCreate
16
+ */
17
+ export interface CallCreate {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof CallCreate
22
+ */
23
+ voice_agent_id?: string | null;
24
+ /**
25
+ *
26
+ * @type {{ [key: string]: any; }}
27
+ * @memberof CallCreate
28
+ */
29
+ data?: {
30
+ [key: string]: any;
31
+ } | null;
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof CallCreate
36
+ */
37
+ caller?: string | null;
38
+ /**
39
+ *
40
+ * @type {boolean}
41
+ * @memberof CallCreate
42
+ */
43
+ sandbox?: boolean;
44
+ }
45
+ /**
46
+ * Check if a given object implements the CallCreate interface.
47
+ */
48
+ export declare function instanceOfCallCreate(value: object): value is CallCreate;
49
+ export declare function CallCreateFromJSON(json: any): CallCreate;
50
+ export declare function CallCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): CallCreate;
51
+ export declare function CallCreateToJSON(json: any): CallCreate;
52
+ export declare function CallCreateToJSONTyped(value?: CallCreate | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
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.instanceOfCallCreate = instanceOfCallCreate;
17
+ exports.CallCreateFromJSON = CallCreateFromJSON;
18
+ exports.CallCreateFromJSONTyped = CallCreateFromJSONTyped;
19
+ exports.CallCreateToJSON = CallCreateToJSON;
20
+ exports.CallCreateToJSONTyped = CallCreateToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the CallCreate interface.
23
+ */
24
+ function instanceOfCallCreate(value) {
25
+ return true;
26
+ }
27
+ function CallCreateFromJSON(json) {
28
+ return CallCreateFromJSONTyped(json, false);
29
+ }
30
+ function CallCreateFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
36
+ 'data': json['data'] == null ? undefined : json['data'],
37
+ 'caller': json['caller'] == null ? undefined : json['caller'],
38
+ 'sandbox': json['sandbox'] == null ? undefined : json['sandbox'],
39
+ };
40
+ }
41
+ function CallCreateToJSON(json) {
42
+ return CallCreateToJSONTyped(json, false);
43
+ }
44
+ function CallCreateToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'voice_agent_id': value['voice_agent_id'],
50
+ 'data': value['data'],
51
+ 'caller': value['caller'],
52
+ 'sandbox': value['sandbox'],
53
+ };
54
+ }
@@ -0,0 +1,52 @@
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 CallUpdate
16
+ */
17
+ export interface CallUpdate {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof CallUpdate
22
+ */
23
+ voice_agent_id?: string | null;
24
+ /**
25
+ *
26
+ * @type {{ [key: string]: any; }}
27
+ * @memberof CallUpdate
28
+ */
29
+ data?: {
30
+ [key: string]: any;
31
+ } | null;
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof CallUpdate
36
+ */
37
+ caller?: string | null;
38
+ /**
39
+ *
40
+ * @type {boolean}
41
+ * @memberof CallUpdate
42
+ */
43
+ sandbox?: boolean | null;
44
+ }
45
+ /**
46
+ * Check if a given object implements the CallUpdate interface.
47
+ */
48
+ export declare function instanceOfCallUpdate(value: object): value is CallUpdate;
49
+ export declare function CallUpdateFromJSON(json: any): CallUpdate;
50
+ export declare function CallUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): CallUpdate;
51
+ export declare function CallUpdateToJSON(json: any): CallUpdate;
52
+ export declare function CallUpdateToJSONTyped(value?: CallUpdate | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
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.instanceOfCallUpdate = instanceOfCallUpdate;
17
+ exports.CallUpdateFromJSON = CallUpdateFromJSON;
18
+ exports.CallUpdateFromJSONTyped = CallUpdateFromJSONTyped;
19
+ exports.CallUpdateToJSON = CallUpdateToJSON;
20
+ exports.CallUpdateToJSONTyped = CallUpdateToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the CallUpdate interface.
23
+ */
24
+ function instanceOfCallUpdate(value) {
25
+ return true;
26
+ }
27
+ function CallUpdateFromJSON(json) {
28
+ return CallUpdateFromJSONTyped(json, false);
29
+ }
30
+ function CallUpdateFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
36
+ 'data': json['data'] == null ? undefined : json['data'],
37
+ 'caller': json['caller'] == null ? undefined : json['caller'],
38
+ 'sandbox': json['sandbox'] == null ? undefined : json['sandbox'],
39
+ };
40
+ }
41
+ function CallUpdateToJSON(json) {
42
+ return CallUpdateToJSONTyped(json, false);
43
+ }
44
+ function CallUpdateToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'voice_agent_id': value['voice_agent_id'],
50
+ 'data': value['data'],
51
+ 'caller': value['caller'],
52
+ 'sandbox': value['sandbox'],
53
+ };
54
+ }
@@ -8,6 +8,9 @@ export * from './CalendarEventListResponse';
8
8
  export * from './CalendarEventUpdate';
9
9
  export * from './CalendarListResponse';
10
10
  export * from './CalendarUpdate';
11
+ export * from './Call';
12
+ export * from './CallCreate';
13
+ export * from './CallUpdate';
11
14
  export * from './CancelSubscriptionRequest';
12
15
  export * from './CancelSubscriptionResponse';
13
16
  export * from './ChatAgent';
@@ -26,6 +26,9 @@ __exportStar(require("./CalendarEventListResponse"), exports);
26
26
  __exportStar(require("./CalendarEventUpdate"), exports);
27
27
  __exportStar(require("./CalendarListResponse"), exports);
28
28
  __exportStar(require("./CalendarUpdate"), exports);
29
+ __exportStar(require("./Call"), exports);
30
+ __exportStar(require("./CallCreate"), exports);
31
+ __exportStar(require("./CallUpdate"), exports);
29
32
  __exportStar(require("./CancelSubscriptionRequest"), exports);
30
33
  __exportStar(require("./CancelSubscriptionResponse"), exports);
31
34
  __exportStar(require("./ChatAgent"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@l7mp/tivadar-ai-api-sdk",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "TypeScript/JavaScript SDK for Tivadar AI Backend API",
5
5
  "author": "L7mp Technologies",
6
6
  "repository": {
@@ -31,7 +31,6 @@
31
31
  "build": "tsc && tsc -p tsconfig.esm.json",
32
32
  "prepare": "npm run build"
33
33
  },
34
- "dependencies": {},
35
34
  "devDependencies": {
36
35
  "@types/node": "^22.0.0",
37
36
  "typescript": "^5.0.0"
package/src/api-client.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { CallsApi, type OrganizationsOrganizationIdCallsGetSandboxEnum } from "./apis/CallsApi";
1
2
  import { CalendarApi } from "./apis/CalendarApi";
2
3
  import { ChatAgentsApi } from "./apis/ChatAgentsApi";
3
4
  import { HistoryApi } from "./apis/HistoryApi";
@@ -17,6 +18,8 @@ import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
17
18
  import { Configuration } from "./runtime";
18
19
 
19
20
  import type {
21
+ CallCreate,
22
+ CallUpdate,
20
23
  VoiceAgentCreate,
21
24
  VoiceAgentUpdate,
22
25
  ChatAgentCreate,
@@ -47,6 +50,13 @@ export interface ApiClientConfig {
47
50
  }
48
51
 
49
52
  export class Api {
53
+ public readonly calls: {
54
+ list: (organizationId: string, voiceAgentId?: string, sandbox?: OrganizationsOrganizationIdCallsGetSandboxEnum, options?: RequestInit) => ReturnType<CallsApi["organizationsOrganizationIdCallsGet"]>;
55
+ get: (organizationId: string, callId: string, options?: RequestInit) => ReturnType<CallsApi["organizationsOrganizationIdCallsCallIdGet"]>;
56
+ create: (organizationId: string, callCreate: CallCreate, options?: RequestInit) => ReturnType<CallsApi["organizationsOrganizationIdCallsPost"]>;
57
+ update: (organizationId: string, callId: string, callUpdate: CallUpdate, options?: RequestInit) => ReturnType<CallsApi["organizationsOrganizationIdCallsCallIdPut"]>;
58
+ delete: (organizationId: string, callId: string, options?: RequestInit) => ReturnType<CallsApi["organizationsOrganizationIdCallsCallIdDelete"]>;
59
+ };
50
60
  public readonly voiceAgents: {
51
61
  list: (organizationId: string, options?: RequestInit) => ReturnType<VoiceAgentsApi["organizationsOrganizationIdVoiceAgentsGet"]>;
52
62
  listBasic: (organizationId: string, options?: RequestInit) => ReturnType<VoiceAgentsApi["organizationsOrganizationIdVoiceAgentsBasicGet"]>;
@@ -147,6 +157,7 @@ export class Api {
147
157
  list: (organizationId: string, options?: RequestInit) => ReturnType<EmbeddingProvidersApi["organizationsOrganizationIdEmbeddingProvidersGet"]>;
148
158
  };
149
159
 
160
+ private readonly callsApi: CallsApi;
150
161
  private readonly voiceAgentsApi: VoiceAgentsApi;
151
162
  private readonly chatAgentsApi: ChatAgentsApi;
152
163
  private readonly calendarApi: CalendarApi;
@@ -183,6 +194,7 @@ export class Api {
183
194
  headers: this._auth.headers,
184
195
  });
185
196
 
197
+ this.callsApi = new CallsApi(configuration);
186
198
  this.voiceAgentsApi = new VoiceAgentsApi(configuration);
187
199
  this.chatAgentsApi = new ChatAgentsApi(configuration);
188
200
  this.calendarApi = new CalendarApi(configuration);
@@ -200,6 +212,14 @@ export class Api {
200
212
  this.sttProvidersApi = new STTProvidersApi(configuration);
201
213
  this.ttsProvidersApi = new TTSProvidersApi(configuration);
202
214
 
215
+ this.calls = {
216
+ list: (organizationId, voiceAgentId, sandbox, options) => this.callsApi.organizationsOrganizationIdCallsGet({ organizationId, voiceAgentId, sandbox }, options),
217
+ get: (organizationId, callId, options) => this.callsApi.organizationsOrganizationIdCallsCallIdGet({ organizationId, callId }, options),
218
+ create: (organizationId, callCreate, options) => this.callsApi.organizationsOrganizationIdCallsPost({ organizationId, callCreate }, options),
219
+ update: (organizationId, callId, callUpdate, options) => this.callsApi.organizationsOrganizationIdCallsCallIdPut({ organizationId, callId, callUpdate }, options),
220
+ delete: (organizationId, callId, options) => this.callsApi.organizationsOrganizationIdCallsCallIdDelete({ organizationId, callId }, options),
221
+ };
222
+
203
223
  this.voiceAgents = {
204
224
  list: (organizationId, options) => this.voiceAgentsApi.organizationsOrganizationIdVoiceAgentsGet({ organizationId }, options),
205
225
  listBasic: (organizationId, options) => this.voiceAgentsApi.organizationsOrganizationIdVoiceAgentsBasicGet({ organizationId }, options),