@l7mp/tivadar-ai-api-sdk 0.1.4 → 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.
Files changed (71) hide show
  1. package/dist/api-client.d.ts +23 -7
  2. package/dist/api-client.js +35 -6
  3. package/dist/apis/CalendarApi.d.ts +64 -48
  4. package/dist/apis/CalendarApi.js +152 -87
  5. package/dist/apis/CallsApi.d.ts +92 -0
  6. package/dist/apis/CallsApi.js +256 -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 +23 -7
  10. package/dist/esm/api-client.js +35 -6
  11. package/dist/esm/apis/CalendarApi.d.ts +64 -48
  12. package/dist/esm/apis/CalendarApi.js +153 -88
  13. package/dist/esm/apis/CallsApi.d.ts +92 -0
  14. package/dist/esm/apis/CallsApi.js +252 -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/Calendar.d.ts +6 -0
  18. package/dist/esm/models/Calendar.js +2 -0
  19. package/dist/esm/models/CalendarCreate.d.ts +32 -0
  20. package/dist/esm/models/CalendarCreate.js +43 -0
  21. package/dist/esm/models/CalendarEventCreate.d.ts +0 -6
  22. package/dist/esm/models/CalendarEventCreate.js +0 -4
  23. package/dist/esm/models/CalendarEventListResponse.d.ts +33 -0
  24. package/dist/esm/models/CalendarEventListResponse.js +44 -0
  25. package/dist/esm/models/CalendarEventUpdate.d.ts +0 -6
  26. package/dist/esm/models/CalendarEventUpdate.js +0 -2
  27. package/dist/esm/models/CalendarUpdate.d.ts +32 -0
  28. package/dist/esm/models/CalendarUpdate.js +41 -0
  29. package/dist/esm/models/Call.d.ts +64 -0
  30. package/dist/esm/models/Call.js +55 -0
  31. package/dist/esm/models/CallCreate.d.ts +52 -0
  32. package/dist/esm/models/CallCreate.js +47 -0
  33. package/dist/esm/models/CallUpdate.d.ts +52 -0
  34. package/dist/esm/models/CallUpdate.js +47 -0
  35. package/dist/esm/models/index.d.ts +6 -2
  36. package/dist/esm/models/index.js +6 -2
  37. package/dist/models/Calendar.d.ts +6 -0
  38. package/dist/models/Calendar.js +2 -0
  39. package/dist/models/CalendarCreate.d.ts +32 -0
  40. package/dist/models/CalendarCreate.js +50 -0
  41. package/dist/models/CalendarEventCreate.d.ts +0 -6
  42. package/dist/models/CalendarEventCreate.js +0 -4
  43. package/dist/models/CalendarEventListResponse.d.ts +33 -0
  44. package/dist/models/CalendarEventListResponse.js +51 -0
  45. package/dist/models/CalendarEventUpdate.d.ts +0 -6
  46. package/dist/models/CalendarEventUpdate.js +0 -2
  47. package/dist/models/CalendarUpdate.d.ts +32 -0
  48. package/dist/models/CalendarUpdate.js +48 -0
  49. package/dist/models/Call.d.ts +64 -0
  50. package/dist/models/Call.js +62 -0
  51. package/dist/models/CallCreate.d.ts +52 -0
  52. package/dist/models/CallCreate.js +54 -0
  53. package/dist/models/CallUpdate.d.ts +52 -0
  54. package/dist/models/CallUpdate.js +54 -0
  55. package/dist/models/index.d.ts +6 -2
  56. package/dist/models/index.js +6 -2
  57. package/package.json +2 -3
  58. package/src/api-client.ts +52 -12
  59. package/src/apis/CalendarApi.ts +227 -107
  60. package/src/apis/CallsApi.ts +352 -0
  61. package/src/apis/index.ts +1 -0
  62. package/src/models/Calendar.ts +8 -0
  63. package/src/models/CalendarCreate.ts +66 -0
  64. package/src/models/CalendarEventCreate.ts +0 -9
  65. package/src/models/CalendarEventListResponse.ts +74 -0
  66. package/src/models/CalendarEventUpdate.ts +0 -8
  67. package/src/models/CalendarUpdate.ts +65 -0
  68. package/src/models/Call.ts +107 -0
  69. package/src/models/CallCreate.ts +89 -0
  70. package/src/models/CallUpdate.ts +89 -0
  71. package/src/models/index.ts +6 -2
@@ -0,0 +1,64 @@
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 Call
16
+ */
17
+ export interface Call {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof Call
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof Call
28
+ */
29
+ voice_agent_id?: string | null;
30
+ /**
31
+ *
32
+ * @type {{ [key: string]: any; }}
33
+ * @memberof Call
34
+ */
35
+ data?: {
36
+ [key: string]: any;
37
+ } | null;
38
+ /**
39
+ *
40
+ * @type {string}
41
+ * @memberof Call
42
+ */
43
+ caller?: string | null;
44
+ /**
45
+ *
46
+ * @type {boolean}
47
+ * @memberof Call
48
+ */
49
+ sandbox?: boolean | null;
50
+ /**
51
+ *
52
+ * @type {Date}
53
+ * @memberof Call
54
+ */
55
+ created_at: Date;
56
+ }
57
+ /**
58
+ * Check if a given object implements the Call interface.
59
+ */
60
+ export declare function instanceOfCall(value: object): value is Call;
61
+ export declare function CallFromJSON(json: any): Call;
62
+ export declare function CallFromJSONTyped(json: any, ignoreDiscriminator: boolean): Call;
63
+ export declare function CallToJSON(json: any): Call;
64
+ export declare function CallToJSONTyped(value?: Call | 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.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
+ }
@@ -1,12 +1,16 @@
1
1
  export * from './BillingPortalRequest';
2
2
  export * from './BillingPortalResponse';
3
3
  export * from './Calendar';
4
+ export * from './CalendarCreate';
4
5
  export * from './CalendarEvent';
5
6
  export * from './CalendarEventCreate';
6
- export * from './CalendarEventResponse';
7
+ export * from './CalendarEventListResponse';
7
8
  export * from './CalendarEventUpdate';
8
9
  export * from './CalendarListResponse';
9
- export * from './CalendarWithAgent';
10
+ export * from './CalendarUpdate';
11
+ export * from './Call';
12
+ export * from './CallCreate';
13
+ export * from './CallUpdate';
10
14
  export * from './CancelSubscriptionRequest';
11
15
  export * from './CancelSubscriptionResponse';
12
16
  export * from './ChatAgent';
@@ -19,12 +19,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  __exportStar(require("./BillingPortalRequest"), exports);
20
20
  __exportStar(require("./BillingPortalResponse"), exports);
21
21
  __exportStar(require("./Calendar"), exports);
22
+ __exportStar(require("./CalendarCreate"), exports);
22
23
  __exportStar(require("./CalendarEvent"), exports);
23
24
  __exportStar(require("./CalendarEventCreate"), exports);
24
- __exportStar(require("./CalendarEventResponse"), exports);
25
+ __exportStar(require("./CalendarEventListResponse"), exports);
25
26
  __exportStar(require("./CalendarEventUpdate"), exports);
26
27
  __exportStar(require("./CalendarListResponse"), exports);
27
- __exportStar(require("./CalendarWithAgent"), exports);
28
+ __exportStar(require("./CalendarUpdate"), exports);
29
+ __exportStar(require("./Call"), exports);
30
+ __exportStar(require("./CallCreate"), exports);
31
+ __exportStar(require("./CallUpdate"), exports);
28
32
  __exportStar(require("./CancelSubscriptionRequest"), exports);
29
33
  __exportStar(require("./CancelSubscriptionResponse"), exports);
30
34
  __exportStar(require("./ChatAgent"), exports);
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@l7mp/tivadar-ai-api-sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "TypeScript/JavaScript SDK for Tivadar AI Backend API",
5
5
  "author": "L7mp Technologies",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/l7mp/tivadar-backend.git",
8
+ "url": "git+https://github.com/l7mp/tivadar-ai-backend.git",
9
9
  "directory": "packages/tivadar-api-sdk"
10
10
  },
11
11
  "keywords": [
@@ -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,10 +18,15 @@ 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,
23
26
  ChatAgentUpdate,
27
+ Calendar,
28
+ CalendarCreate,
29
+ CalendarUpdate,
24
30
  CalendarEventCreate,
25
31
  CalendarEventUpdate,
26
32
  InvitationAccept,
@@ -44,6 +50,13 @@ export interface ApiClientConfig {
44
50
  }
45
51
 
46
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
+ };
47
60
  public readonly voiceAgents: {
48
61
  list: (organizationId: string, options?: RequestInit) => ReturnType<VoiceAgentsApi["organizationsOrganizationIdVoiceAgentsGet"]>;
49
62
  listBasic: (organizationId: string, options?: RequestInit) => ReturnType<VoiceAgentsApi["organizationsOrganizationIdVoiceAgentsBasicGet"]>;
@@ -60,12 +73,19 @@ export class Api {
60
73
  delete: (organizationId: string, chatAgentId: string, options?: RequestInit) => ReturnType<ChatAgentsApi["organizationsOrganizationIdChatAgentsChatAgentIdDelete"]>;
61
74
  };
62
75
  public readonly calendar: {
63
- listCalendars: (organizationId: string, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdCalendarsGet"]>;
64
- listEvents: (organizationId: string, start: Date, end: Date, calendarIds?: string, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdEventsGet"]>;
65
- getEvent: (organizationId: string, eventId: string, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdEventsEventIdGet"]>;
66
- createEvent: (organizationId: string, calendarEventCreate: CalendarEventCreate, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdEventsPost"]>;
67
- updateEvent: (organizationId: string, eventId: string, calendarEventUpdate: CalendarEventUpdate, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdEventsEventIdPut"]>;
68
- deleteEvent: (organizationId: string, eventId: string, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdEventsEventIdDelete"]>;
76
+ list: (organizationId: string, voiceAgentId?: string, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdCalendarsGet"]>;
77
+ get: (organizationId: string, calendarId: string, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdCalendarsCalendarIdGet"]>;
78
+ getByVoiceAgent: (organizationId: string, voiceAgentId: string, options?: RequestInit) => Promise<Calendar | null>;
79
+ create: (organizationId: string, calendarCreate: CalendarCreate, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdCalendarsPost"]>;
80
+ update: (organizationId: string, calendarId: string, calendarUpdate: CalendarUpdate, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdCalendarsCalendarIdPut"]>;
81
+ delete: (organizationId: string, calendarId: string, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdCalendarsCalendarIdDelete"]>;
82
+ events: {
83
+ list: (organizationId: string, calendarId: string, start: Date, end: Date, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdCalendarsCalendarIdEventsGet"]>;
84
+ get: (organizationId: string, calendarId: string, eventId: string, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdCalendarsCalendarIdEventsEventIdGet"]>;
85
+ create: (organizationId: string, calendarId: string, calendarEventCreate: CalendarEventCreate, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdCalendarsCalendarIdEventsPost"]>;
86
+ update: (organizationId: string, calendarId: string, eventId: string, calendarEventUpdate: CalendarEventUpdate, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdCalendarsCalendarIdEventsEventIdPut"]>;
87
+ delete: (organizationId: string, calendarId: string, eventId: string, options?: RequestInit) => ReturnType<CalendarApi["organizationsOrganizationIdCalendarsCalendarIdEventsEventIdDelete"]>;
88
+ };
69
89
  };
70
90
  public readonly history: {
71
91
  list: (organizationId: string, options?: RequestInit) => ReturnType<HistoryApi["organizationsOrganizationIdConversationsGet"]>;
@@ -137,6 +157,7 @@ export class Api {
137
157
  list: (organizationId: string, options?: RequestInit) => ReturnType<EmbeddingProvidersApi["organizationsOrganizationIdEmbeddingProvidersGet"]>;
138
158
  };
139
159
 
160
+ private readonly callsApi: CallsApi;
140
161
  private readonly voiceAgentsApi: VoiceAgentsApi;
141
162
  private readonly chatAgentsApi: ChatAgentsApi;
142
163
  private readonly calendarApi: CalendarApi;
@@ -173,6 +194,7 @@ export class Api {
173
194
  headers: this._auth.headers,
174
195
  });
175
196
 
197
+ this.callsApi = new CallsApi(configuration);
176
198
  this.voiceAgentsApi = new VoiceAgentsApi(configuration);
177
199
  this.chatAgentsApi = new ChatAgentsApi(configuration);
178
200
  this.calendarApi = new CalendarApi(configuration);
@@ -190,6 +212,14 @@ export class Api {
190
212
  this.sttProvidersApi = new STTProvidersApi(configuration);
191
213
  this.ttsProvidersApi = new TTSProvidersApi(configuration);
192
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
+
193
223
  this.voiceAgents = {
194
224
  list: (organizationId, options) => this.voiceAgentsApi.organizationsOrganizationIdVoiceAgentsGet({ organizationId }, options),
195
225
  listBasic: (organizationId, options) => this.voiceAgentsApi.organizationsOrganizationIdVoiceAgentsBasicGet({ organizationId }, options),
@@ -208,12 +238,22 @@ export class Api {
208
238
  };
209
239
 
210
240
  this.calendar = {
211
- listCalendars: (organizationId, options) => this.calendarApi.organizationsOrganizationIdCalendarsGet({ organizationId }, options),
212
- listEvents: (organizationId, start, end, calendarIds, options) => this.calendarApi.organizationsOrganizationIdEventsGet({ organizationId, start, end, calendarIds }, options),
213
- getEvent: (organizationId, eventId, options) => this.calendarApi.organizationsOrganizationIdEventsEventIdGet({ organizationId, eventId }, options),
214
- createEvent: (organizationId, calendarEventCreate, options) => this.calendarApi.organizationsOrganizationIdEventsPost({ organizationId, calendarEventCreate }, options),
215
- updateEvent: (organizationId, eventId, calendarEventUpdate, options) => this.calendarApi.organizationsOrganizationIdEventsEventIdPut({ organizationId, eventId, calendarEventUpdate }, options),
216
- deleteEvent: (organizationId, eventId, options) => this.calendarApi.organizationsOrganizationIdEventsEventIdDelete({ organizationId, eventId }, options),
241
+ list: (organizationId, voiceAgentId, options) => this.calendarApi.organizationsOrganizationIdCalendarsGet({ organizationId, voiceAgentId }, options),
242
+ get: (organizationId, calendarId, options) => this.calendarApi.organizationsOrganizationIdCalendarsCalendarIdGet({ organizationId, calendarId }, options),
243
+ getByVoiceAgent: async (organizationId, voiceAgentId, options) => {
244
+ const result = await this.calendarApi.organizationsOrganizationIdCalendarsGet({ organizationId, voiceAgentId }, options);
245
+ return result.data[0] ?? null;
246
+ },
247
+ create: (organizationId, calendarCreate, options) => this.calendarApi.organizationsOrganizationIdCalendarsPost({ organizationId, calendarCreate }, options),
248
+ update: (organizationId, calendarId, calendarUpdate, options) => this.calendarApi.organizationsOrganizationIdCalendarsCalendarIdPut({ organizationId, calendarId, calendarUpdate }, options),
249
+ delete: (organizationId, calendarId, options) => this.calendarApi.organizationsOrganizationIdCalendarsCalendarIdDelete({ organizationId, calendarId }, options),
250
+ events: {
251
+ list: (organizationId, calendarId, start, end, options) => this.calendarApi.organizationsOrganizationIdCalendarsCalendarIdEventsGet({ organizationId, calendarId, start, end }, options),
252
+ get: (organizationId, calendarId, eventId, options) => this.calendarApi.organizationsOrganizationIdCalendarsCalendarIdEventsEventIdGet({ organizationId, calendarId, eventId }, options),
253
+ create: (organizationId, calendarId, calendarEventCreate, options) => this.calendarApi.organizationsOrganizationIdCalendarsCalendarIdEventsPost({ organizationId, calendarId, calendarEventCreate }, options),
254
+ update: (organizationId, calendarId, eventId, calendarEventUpdate, options) => this.calendarApi.organizationsOrganizationIdCalendarsCalendarIdEventsEventIdPut({ organizationId, calendarId, eventId, calendarEventUpdate }, options),
255
+ delete: (organizationId, calendarId, eventId, options) => this.calendarApi.organizationsOrganizationIdCalendarsCalendarIdEventsEventIdDelete({ organizationId, calendarId, eventId }, options),
256
+ },
217
257
  };
218
258
 
219
259
  this.history = {