@l7mp/tivadar-ai-api-sdk 0.2.3 → 0.2.5

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 (61) hide show
  1. package/dist/api-client.d.ts +7 -1
  2. package/dist/api-client.js +6 -0
  3. package/dist/apis/ProfileApi.d.ts +41 -0
  4. package/dist/apis/ProfileApi.js +112 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/api-client.d.ts +7 -1
  8. package/dist/esm/api-client.js +6 -0
  9. package/dist/esm/apis/ProfileApi.d.ts +41 -0
  10. package/dist/esm/apis/ProfileApi.js +108 -0
  11. package/dist/esm/apis/index.d.ts +1 -0
  12. package/dist/esm/apis/index.js +1 -0
  13. package/dist/esm/models/CalendarEvent.d.ts +6 -0
  14. package/dist/esm/models/CalendarEvent.js +2 -0
  15. package/dist/esm/models/CalendarEventCreate.d.ts +6 -0
  16. package/dist/esm/models/CalendarEventCreate.js +2 -0
  17. package/dist/esm/models/CalendarEventUpdate.d.ts +6 -0
  18. package/dist/esm/models/CalendarEventUpdate.js +2 -0
  19. package/dist/esm/models/Notification.d.ts +22 -0
  20. package/dist/esm/models/Notification.js +8 -0
  21. package/dist/esm/models/NotificationCreate.d.ts +22 -0
  22. package/dist/esm/models/NotificationCreate.js +6 -0
  23. package/dist/esm/models/NotificationUpdate.d.ts +22 -0
  24. package/dist/esm/models/NotificationUpdate.js +6 -0
  25. package/dist/esm/models/UserPreferences.d.ts +38 -0
  26. package/dist/esm/models/UserPreferences.js +45 -0
  27. package/dist/esm/models/UserPreferencesUpdate.d.ts +32 -0
  28. package/dist/esm/models/UserPreferencesUpdate.js +41 -0
  29. package/dist/esm/models/index.d.ts +2 -0
  30. package/dist/esm/models/index.js +2 -0
  31. package/dist/models/CalendarEvent.d.ts +6 -0
  32. package/dist/models/CalendarEvent.js +2 -0
  33. package/dist/models/CalendarEventCreate.d.ts +6 -0
  34. package/dist/models/CalendarEventCreate.js +2 -0
  35. package/dist/models/CalendarEventUpdate.d.ts +6 -0
  36. package/dist/models/CalendarEventUpdate.js +2 -0
  37. package/dist/models/Notification.d.ts +22 -0
  38. package/dist/models/Notification.js +8 -0
  39. package/dist/models/NotificationCreate.d.ts +22 -0
  40. package/dist/models/NotificationCreate.js +6 -0
  41. package/dist/models/NotificationUpdate.d.ts +22 -0
  42. package/dist/models/NotificationUpdate.js +6 -0
  43. package/dist/models/UserPreferences.d.ts +38 -0
  44. package/dist/models/UserPreferences.js +52 -0
  45. package/dist/models/UserPreferencesUpdate.d.ts +32 -0
  46. package/dist/models/UserPreferencesUpdate.js +48 -0
  47. package/dist/models/index.d.ts +2 -0
  48. package/dist/models/index.js +2 -0
  49. package/package.json +1 -1
  50. package/src/api-client.ts +13 -0
  51. package/src/apis/ProfileApi.ts +142 -0
  52. package/src/apis/index.ts +1 -0
  53. package/src/models/CalendarEvent.ts +8 -1
  54. package/src/models/CalendarEventCreate.ts +8 -1
  55. package/src/models/CalendarEventUpdate.ts +8 -1
  56. package/src/models/Notification.ts +25 -1
  57. package/src/models/NotificationCreate.ts +24 -1
  58. package/src/models/NotificationUpdate.ts +24 -1
  59. package/src/models/UserPreferences.ts +75 -0
  60. package/src/models/UserPreferencesUpdate.ts +66 -0
  61. package/src/models/index.ts +2 -0
@@ -7,6 +7,7 @@ import { MembersApi } from "./apis/MembersApi";
7
7
  import { NotificationsApi, type OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum, type OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum } from "./apis/NotificationsApi";
8
8
  import { OrganizationsApi } from "./apis/OrganizationsApi";
9
9
  import { PlaygroundApi } from "./apis/PlaygroundApi";
10
+ import { ProfileApi } from "./apis/ProfileApi";
10
11
  import { RAGApi, type OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum } from "./apis/RAGApi";
11
12
  import { RecordingsApi } from "./apis/RecordingsApi";
12
13
  import { SIPApi } from "./apis/SIPApi";
@@ -16,7 +17,7 @@ import { STTProvidersApi } from "./apis/STTProvidersApi";
16
17
  import { TTSProvidersApi } from "./apis/TTSProvidersApi";
17
18
  import { SubscriptionApi } from "./apis/SubscriptionApi";
18
19
  import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
19
- import type { CallCreate, CallUpdate, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest } from "./models";
20
+ import type { CallCreate, CallUpdate, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, UserPreferencesUpdate } from "./models";
20
21
  export interface ApiClientConfig {
21
22
  baseUrl: string;
22
23
  options?: {
@@ -84,6 +85,10 @@ export declare class Api {
84
85
  readonly playground: {
85
86
  sandboxToken: (organizationId: string, voiceAgentId: string, options?: RequestInit) => ReturnType<PlaygroundApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost"]>;
86
87
  };
88
+ readonly profile: {
89
+ getPreferences: (organizationId: string, options?: RequestInit) => ReturnType<ProfileApi["organizationsOrganizationIdProfilePreferencesGet"]>;
90
+ updatePreferences: (organizationId: string, userPreferencesUpdate: UserPreferencesUpdate, options?: RequestInit) => ReturnType<ProfileApi["organizationsOrganizationIdProfilePreferencesPut"]>;
91
+ };
87
92
  readonly rag: {
88
93
  list: (organizationId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagGet"]>;
89
94
  create: (organizationId: string, ragConfigCreate: RagConfigCreate, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagPost"]>;
@@ -154,6 +159,7 @@ export declare class Api {
154
159
  private readonly membersApi;
155
160
  private readonly organizationsApi;
156
161
  private readonly playgroundApi;
162
+ private readonly profileApi;
157
163
  private readonly ragApi;
158
164
  private readonly recordingsApi;
159
165
  private readonly sipApi;
@@ -19,6 +19,7 @@ const MembersApi_1 = require("./apis/MembersApi");
19
19
  const NotificationsApi_1 = require("./apis/NotificationsApi");
20
20
  const OrganizationsApi_1 = require("./apis/OrganizationsApi");
21
21
  const PlaygroundApi_1 = require("./apis/PlaygroundApi");
22
+ const ProfileApi_1 = require("./apis/ProfileApi");
22
23
  const RAGApi_1 = require("./apis/RAGApi");
23
24
  const RecordingsApi_1 = require("./apis/RecordingsApi");
24
25
  const SIPApi_1 = require("./apis/SIPApi");
@@ -56,6 +57,7 @@ class Api {
56
57
  this.membersApi = new MembersApi_1.MembersApi(configuration);
57
58
  this.organizationsApi = new OrganizationsApi_1.OrganizationsApi(configuration);
58
59
  this.playgroundApi = new PlaygroundApi_1.PlaygroundApi(configuration);
60
+ this.profileApi = new ProfileApi_1.ProfileApi(configuration);
59
61
  this.ragApi = new RAGApi_1.RAGApi(configuration);
60
62
  this.recordingsApi = new RecordingsApi_1.RecordingsApi(configuration);
61
63
  this.sipApi = new SIPApi_1.SIPApi(configuration);
@@ -129,6 +131,10 @@ class Api {
129
131
  this.playground = {
130
132
  sandboxToken: (organizationId, voiceAgentId, options) => this.playgroundApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost({ organizationId, voiceAgentId }, options),
131
133
  };
134
+ this.profile = {
135
+ getPreferences: (organizationId, options) => this.profileApi.organizationsOrganizationIdProfilePreferencesGet({ organizationId }, options),
136
+ updatePreferences: (organizationId, userPreferencesUpdate, options) => this.profileApi.organizationsOrganizationIdProfilePreferencesPut({ organizationId, userPreferencesUpdate }, options),
137
+ };
132
138
  this.rag = {
133
139
  list: (organizationId, options) => this.ragApi.organizationsOrganizationIdRagGet({ organizationId }, options),
134
140
  create: (organizationId, ragConfigCreate, options) => this.ragApi.organizationsOrganizationIdRagPost({ organizationId, ragConfigCreate }, options),
@@ -0,0 +1,41 @@
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
+ import * as runtime from '../runtime';
13
+ import type { UserPreferences, UserPreferencesUpdate } from '../models/index';
14
+ export interface OrganizationsOrganizationIdProfilePreferencesGetRequest {
15
+ organizationId: string;
16
+ }
17
+ export interface OrganizationsOrganizationIdProfilePreferencesPutRequest {
18
+ organizationId: string;
19
+ userPreferencesUpdate: UserPreferencesUpdate;
20
+ }
21
+ /**
22
+ *
23
+ */
24
+ export declare class ProfileApi extends runtime.BaseAPI {
25
+ /**
26
+ * Get current user preferences
27
+ */
28
+ organizationsOrganizationIdProfilePreferencesGetRaw(requestParameters: OrganizationsOrganizationIdProfilePreferencesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserPreferences>>;
29
+ /**
30
+ * Get current user preferences
31
+ */
32
+ organizationsOrganizationIdProfilePreferencesGet(requestParameters: OrganizationsOrganizationIdProfilePreferencesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPreferences>;
33
+ /**
34
+ * Update current user preferences
35
+ */
36
+ organizationsOrganizationIdProfilePreferencesPutRaw(requestParameters: OrganizationsOrganizationIdProfilePreferencesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserPreferences>>;
37
+ /**
38
+ * Update current user preferences
39
+ */
40
+ organizationsOrganizationIdProfilePreferencesPut(requestParameters: OrganizationsOrganizationIdProfilePreferencesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPreferences>;
41
+ }
@@ -0,0 +1,112 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ProfileApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class ProfileApi extends runtime.BaseAPI {
32
+ /**
33
+ * Get current user preferences
34
+ */
35
+ organizationsOrganizationIdProfilePreferencesGetRaw(requestParameters, initOverrides) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters['organizationId'] == null) {
38
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdProfilePreferencesGet().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ if (this.configuration && this.configuration.accessToken) {
43
+ const token = this.configuration.accessToken;
44
+ const tokenString = yield token("bearerAuth", []);
45
+ if (tokenString) {
46
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
47
+ }
48
+ }
49
+ let urlPath = `/organizations/{organizationId}/profile/preferences`;
50
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
51
+ const response = yield this.request({
52
+ path: urlPath,
53
+ method: 'GET',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ }, initOverrides);
57
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserPreferencesFromJSON)(jsonValue));
58
+ });
59
+ }
60
+ /**
61
+ * Get current user preferences
62
+ */
63
+ organizationsOrganizationIdProfilePreferencesGet(requestParameters, initOverrides) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const response = yield this.organizationsOrganizationIdProfilePreferencesGetRaw(requestParameters, initOverrides);
66
+ return yield response.value();
67
+ });
68
+ }
69
+ /**
70
+ * Update current user preferences
71
+ */
72
+ organizationsOrganizationIdProfilePreferencesPutRaw(requestParameters, initOverrides) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ if (requestParameters['organizationId'] == null) {
75
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdProfilePreferencesPut().');
76
+ }
77
+ if (requestParameters['userPreferencesUpdate'] == null) {
78
+ throw new runtime.RequiredError('userPreferencesUpdate', 'Required parameter "userPreferencesUpdate" was null or undefined when calling organizationsOrganizationIdProfilePreferencesPut().');
79
+ }
80
+ const queryParameters = {};
81
+ const headerParameters = {};
82
+ headerParameters['Content-Type'] = 'application/json';
83
+ if (this.configuration && this.configuration.accessToken) {
84
+ const token = this.configuration.accessToken;
85
+ const tokenString = yield token("bearerAuth", []);
86
+ if (tokenString) {
87
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
88
+ }
89
+ }
90
+ let urlPath = `/organizations/{organizationId}/profile/preferences`;
91
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
92
+ const response = yield this.request({
93
+ path: urlPath,
94
+ method: 'PUT',
95
+ headers: headerParameters,
96
+ query: queryParameters,
97
+ body: (0, index_1.UserPreferencesUpdateToJSON)(requestParameters['userPreferencesUpdate']),
98
+ }, initOverrides);
99
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserPreferencesFromJSON)(jsonValue));
100
+ });
101
+ }
102
+ /**
103
+ * Update current user preferences
104
+ */
105
+ organizationsOrganizationIdProfilePreferencesPut(requestParameters, initOverrides) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ const response = yield this.organizationsOrganizationIdProfilePreferencesPutRaw(requestParameters, initOverrides);
108
+ return yield response.value();
109
+ });
110
+ }
111
+ }
112
+ exports.ProfileApi = ProfileApi;
@@ -9,6 +9,7 @@ export * from './MembersApi';
9
9
  export * from './NotificationsApi';
10
10
  export * from './OrganizationsApi';
11
11
  export * from './PlaygroundApi';
12
+ export * from './ProfileApi';
12
13
  export * from './RAGApi';
13
14
  export * from './RecordingsApi';
14
15
  export * from './SIPApi';
@@ -27,6 +27,7 @@ __exportStar(require("./MembersApi"), exports);
27
27
  __exportStar(require("./NotificationsApi"), exports);
28
28
  __exportStar(require("./OrganizationsApi"), exports);
29
29
  __exportStar(require("./PlaygroundApi"), exports);
30
+ __exportStar(require("./ProfileApi"), exports);
30
31
  __exportStar(require("./RAGApi"), exports);
31
32
  __exportStar(require("./RecordingsApi"), exports);
32
33
  __exportStar(require("./SIPApi"), exports);
@@ -7,6 +7,7 @@ import { MembersApi } from "./apis/MembersApi";
7
7
  import { NotificationsApi, type OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum, type OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum } from "./apis/NotificationsApi";
8
8
  import { OrganizationsApi } from "./apis/OrganizationsApi";
9
9
  import { PlaygroundApi } from "./apis/PlaygroundApi";
10
+ import { ProfileApi } from "./apis/ProfileApi";
10
11
  import { RAGApi, type OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum } from "./apis/RAGApi";
11
12
  import { RecordingsApi } from "./apis/RecordingsApi";
12
13
  import { SIPApi } from "./apis/SIPApi";
@@ -16,7 +17,7 @@ import { STTProvidersApi } from "./apis/STTProvidersApi";
16
17
  import { TTSProvidersApi } from "./apis/TTSProvidersApi";
17
18
  import { SubscriptionApi } from "./apis/SubscriptionApi";
18
19
  import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
19
- import type { CallCreate, CallUpdate, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest } from "./models";
20
+ import type { CallCreate, CallUpdate, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, UserPreferencesUpdate } from "./models";
20
21
  export interface ApiClientConfig {
21
22
  baseUrl: string;
22
23
  options?: {
@@ -84,6 +85,10 @@ export declare class Api {
84
85
  readonly playground: {
85
86
  sandboxToken: (organizationId: string, voiceAgentId: string, options?: RequestInit) => ReturnType<PlaygroundApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost"]>;
86
87
  };
88
+ readonly profile: {
89
+ getPreferences: (organizationId: string, options?: RequestInit) => ReturnType<ProfileApi["organizationsOrganizationIdProfilePreferencesGet"]>;
90
+ updatePreferences: (organizationId: string, userPreferencesUpdate: UserPreferencesUpdate, options?: RequestInit) => ReturnType<ProfileApi["organizationsOrganizationIdProfilePreferencesPut"]>;
91
+ };
87
92
  readonly rag: {
88
93
  list: (organizationId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagGet"]>;
89
94
  create: (organizationId: string, ragConfigCreate: RagConfigCreate, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagPost"]>;
@@ -154,6 +159,7 @@ export declare class Api {
154
159
  private readonly membersApi;
155
160
  private readonly organizationsApi;
156
161
  private readonly playgroundApi;
162
+ private readonly profileApi;
157
163
  private readonly ragApi;
158
164
  private readonly recordingsApi;
159
165
  private readonly sipApi;
@@ -16,6 +16,7 @@ import { MembersApi } from "./apis/MembersApi";
16
16
  import { NotificationsApi } from "./apis/NotificationsApi";
17
17
  import { OrganizationsApi } from "./apis/OrganizationsApi";
18
18
  import { PlaygroundApi } from "./apis/PlaygroundApi";
19
+ import { ProfileApi } from "./apis/ProfileApi";
19
20
  import { RAGApi } from "./apis/RAGApi";
20
21
  import { RecordingsApi } from "./apis/RecordingsApi";
21
22
  import { SIPApi } from "./apis/SIPApi";
@@ -53,6 +54,7 @@ export class Api {
53
54
  this.membersApi = new MembersApi(configuration);
54
55
  this.organizationsApi = new OrganizationsApi(configuration);
55
56
  this.playgroundApi = new PlaygroundApi(configuration);
57
+ this.profileApi = new ProfileApi(configuration);
56
58
  this.ragApi = new RAGApi(configuration);
57
59
  this.recordingsApi = new RecordingsApi(configuration);
58
60
  this.sipApi = new SIPApi(configuration);
@@ -126,6 +128,10 @@ export class Api {
126
128
  this.playground = {
127
129
  sandboxToken: (organizationId, voiceAgentId, options) => this.playgroundApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost({ organizationId, voiceAgentId }, options),
128
130
  };
131
+ this.profile = {
132
+ getPreferences: (organizationId, options) => this.profileApi.organizationsOrganizationIdProfilePreferencesGet({ organizationId }, options),
133
+ updatePreferences: (organizationId, userPreferencesUpdate, options) => this.profileApi.organizationsOrganizationIdProfilePreferencesPut({ organizationId, userPreferencesUpdate }, options),
134
+ };
129
135
  this.rag = {
130
136
  list: (organizationId, options) => this.ragApi.organizationsOrganizationIdRagGet({ organizationId }, options),
131
137
  create: (organizationId, ragConfigCreate, options) => this.ragApi.organizationsOrganizationIdRagPost({ organizationId, ragConfigCreate }, options),
@@ -0,0 +1,41 @@
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
+ import * as runtime from '../runtime';
13
+ import type { UserPreferences, UserPreferencesUpdate } from '../models/index';
14
+ export interface OrganizationsOrganizationIdProfilePreferencesGetRequest {
15
+ organizationId: string;
16
+ }
17
+ export interface OrganizationsOrganizationIdProfilePreferencesPutRequest {
18
+ organizationId: string;
19
+ userPreferencesUpdate: UserPreferencesUpdate;
20
+ }
21
+ /**
22
+ *
23
+ */
24
+ export declare class ProfileApi extends runtime.BaseAPI {
25
+ /**
26
+ * Get current user preferences
27
+ */
28
+ organizationsOrganizationIdProfilePreferencesGetRaw(requestParameters: OrganizationsOrganizationIdProfilePreferencesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserPreferences>>;
29
+ /**
30
+ * Get current user preferences
31
+ */
32
+ organizationsOrganizationIdProfilePreferencesGet(requestParameters: OrganizationsOrganizationIdProfilePreferencesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPreferences>;
33
+ /**
34
+ * Update current user preferences
35
+ */
36
+ organizationsOrganizationIdProfilePreferencesPutRaw(requestParameters: OrganizationsOrganizationIdProfilePreferencesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserPreferences>>;
37
+ /**
38
+ * Update current user preferences
39
+ */
40
+ organizationsOrganizationIdProfilePreferencesPut(requestParameters: OrganizationsOrganizationIdProfilePreferencesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPreferences>;
41
+ }
@@ -0,0 +1,108 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { UserPreferencesFromJSON, UserPreferencesUpdateToJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class ProfileApi extends runtime.BaseAPI {
29
+ /**
30
+ * Get current user preferences
31
+ */
32
+ organizationsOrganizationIdProfilePreferencesGetRaw(requestParameters, initOverrides) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['organizationId'] == null) {
35
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdProfilePreferencesGet().');
36
+ }
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ if (this.configuration && this.configuration.accessToken) {
40
+ const token = this.configuration.accessToken;
41
+ const tokenString = yield token("bearerAuth", []);
42
+ if (tokenString) {
43
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
44
+ }
45
+ }
46
+ let urlPath = `/organizations/{organizationId}/profile/preferences`;
47
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
48
+ const response = yield this.request({
49
+ path: urlPath,
50
+ method: 'GET',
51
+ headers: headerParameters,
52
+ query: queryParameters,
53
+ }, initOverrides);
54
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserPreferencesFromJSON(jsonValue));
55
+ });
56
+ }
57
+ /**
58
+ * Get current user preferences
59
+ */
60
+ organizationsOrganizationIdProfilePreferencesGet(requestParameters, initOverrides) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const response = yield this.organizationsOrganizationIdProfilePreferencesGetRaw(requestParameters, initOverrides);
63
+ return yield response.value();
64
+ });
65
+ }
66
+ /**
67
+ * Update current user preferences
68
+ */
69
+ organizationsOrganizationIdProfilePreferencesPutRaw(requestParameters, initOverrides) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ if (requestParameters['organizationId'] == null) {
72
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdProfilePreferencesPut().');
73
+ }
74
+ if (requestParameters['userPreferencesUpdate'] == null) {
75
+ throw new runtime.RequiredError('userPreferencesUpdate', 'Required parameter "userPreferencesUpdate" was null or undefined when calling organizationsOrganizationIdProfilePreferencesPut().');
76
+ }
77
+ const queryParameters = {};
78
+ const headerParameters = {};
79
+ headerParameters['Content-Type'] = 'application/json';
80
+ if (this.configuration && this.configuration.accessToken) {
81
+ const token = this.configuration.accessToken;
82
+ const tokenString = yield token("bearerAuth", []);
83
+ if (tokenString) {
84
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
85
+ }
86
+ }
87
+ let urlPath = `/organizations/{organizationId}/profile/preferences`;
88
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
89
+ const response = yield this.request({
90
+ path: urlPath,
91
+ method: 'PUT',
92
+ headers: headerParameters,
93
+ query: queryParameters,
94
+ body: UserPreferencesUpdateToJSON(requestParameters['userPreferencesUpdate']),
95
+ }, initOverrides);
96
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserPreferencesFromJSON(jsonValue));
97
+ });
98
+ }
99
+ /**
100
+ * Update current user preferences
101
+ */
102
+ organizationsOrganizationIdProfilePreferencesPut(requestParameters, initOverrides) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ const response = yield this.organizationsOrganizationIdProfilePreferencesPutRaw(requestParameters, initOverrides);
105
+ return yield response.value();
106
+ });
107
+ }
108
+ }
@@ -9,6 +9,7 @@ export * from './MembersApi';
9
9
  export * from './NotificationsApi';
10
10
  export * from './OrganizationsApi';
11
11
  export * from './PlaygroundApi';
12
+ export * from './ProfileApi';
12
13
  export * from './RAGApi';
13
14
  export * from './RecordingsApi';
14
15
  export * from './SIPApi';
@@ -11,6 +11,7 @@ export * from './MembersApi';
11
11
  export * from './NotificationsApi';
12
12
  export * from './OrganizationsApi';
13
13
  export * from './PlaygroundApi';
14
+ export * from './ProfileApi';
14
15
  export * from './RAGApi';
15
16
  export * from './RecordingsApi';
16
17
  export * from './SIPApi';
@@ -33,6 +33,12 @@ export interface CalendarEvent {
33
33
  * @memberof CalendarEvent
34
34
  */
35
35
  description?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof CalendarEvent
40
+ */
41
+ caller?: string | null;
36
42
  /**
37
43
  *
38
44
  * @type {Date}
@@ -38,6 +38,7 @@ export function CalendarEventFromJSONTyped(json, ignoreDiscriminator) {
38
38
  'id': json['id'],
39
39
  'name': json['name'],
40
40
  'description': json['description'] == null ? undefined : json['description'],
41
+ 'caller': json['caller'] == null ? undefined : json['caller'],
41
42
  'start_time': (new Date(json['start_time'])),
42
43
  'end_time': (new Date(json['end_time'])),
43
44
  'calendar_id': json['calendar_id'],
@@ -54,6 +55,7 @@ export function CalendarEventToJSONTyped(value, ignoreDiscriminator = false) {
54
55
  'id': value['id'],
55
56
  'name': value['name'],
56
57
  'description': value['description'],
58
+ 'caller': value['caller'],
57
59
  'start_time': value['start_time'].toISOString(),
58
60
  'end_time': value['end_time'].toISOString(),
59
61
  'calendar_id': value['calendar_id'],
@@ -27,6 +27,12 @@ export interface CalendarEventCreate {
27
27
  * @memberof CalendarEventCreate
28
28
  */
29
29
  description?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof CalendarEventCreate
34
+ */
35
+ caller?: string | null;
30
36
  /**
31
37
  *
32
38
  * @type {Date}
@@ -33,6 +33,7 @@ export function CalendarEventCreateFromJSONTyped(json, ignoreDiscriminator) {
33
33
  return {
34
34
  'name': json['name'],
35
35
  'description': json['description'] == null ? undefined : json['description'],
36
+ 'caller': json['caller'] == null ? undefined : json['caller'],
36
37
  'start_time': (new Date(json['start_time'])),
37
38
  'end_time': (new Date(json['end_time'])),
38
39
  };
@@ -47,6 +48,7 @@ export function CalendarEventCreateToJSONTyped(value, ignoreDiscriminator = fals
47
48
  return {
48
49
  'name': value['name'],
49
50
  'description': value['description'],
51
+ 'caller': value['caller'],
50
52
  'start_time': value['start_time'].toISOString(),
51
53
  'end_time': value['end_time'].toISOString(),
52
54
  };
@@ -27,6 +27,12 @@ export interface CalendarEventUpdate {
27
27
  * @memberof CalendarEventUpdate
28
28
  */
29
29
  description?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof CalendarEventUpdate
34
+ */
35
+ caller?: string | null;
30
36
  /**
31
37
  *
32
38
  * @type {Date}
@@ -27,6 +27,7 @@ export function CalendarEventUpdateFromJSONTyped(json, ignoreDiscriminator) {
27
27
  return {
28
28
  'name': json['name'] == null ? undefined : json['name'],
29
29
  'description': json['description'] == null ? undefined : json['description'],
30
+ 'caller': json['caller'] == null ? undefined : json['caller'],
30
31
  'start_time': json['start_time'] == null ? undefined : (new Date(json['start_time'])),
31
32
  'end_time': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
32
33
  };
@@ -41,6 +42,7 @@ export function CalendarEventUpdateToJSONTyped(value, ignoreDiscriminator = fals
41
42
  return {
42
43
  'name': value['name'],
43
44
  'description': value['description'],
45
+ 'caller': value['caller'],
44
46
  'start_time': value['start_time'] == null ? value['start_time'] : value['start_time'].toISOString(),
45
47
  'end_time': value['end_time'] == null ? value['end_time'] : value['end_time'].toISOString(),
46
48
  };
@@ -85,6 +85,28 @@ export interface Notification {
85
85
  * @memberof Notification
86
86
  */
87
87
  expires_at?: Date | null;
88
+ /**
89
+ * Whether an email should also be sent to recipients
90
+ * @type {boolean}
91
+ * @memberof Notification
92
+ */
93
+ send_email: boolean;
94
+ /**
95
+ * Localized notification title/content variants keyed by language tag (for example en, en-US, hu-HU)
96
+ * @type {{ [key: string]: { [key: string]: any; }; }}
97
+ * @memberof Notification
98
+ */
99
+ localized_content?: {
100
+ [key: string]: {
101
+ [key: string]: any;
102
+ };
103
+ } | null;
104
+ /**
105
+ * Fallback language key to use when recipient preferred language translation is missing
106
+ * @type {string}
107
+ * @memberof Notification
108
+ */
109
+ default_language?: string | null;
88
110
  /**
89
111
  *
90
112
  * @type {Date}
@@ -33,6 +33,8 @@ export function instanceOfNotification(value) {
33
33
  return false;
34
34
  if (!('content' in value) || value['content'] === undefined)
35
35
  return false;
36
+ if (!('send_email' in value) || value['send_email'] === undefined)
37
+ return false;
36
38
  if (!('created_at' in value) || value['created_at'] === undefined)
37
39
  return false;
38
40
  if (!('updated_at' in value) || value['updated_at'] === undefined)
@@ -58,6 +60,9 @@ export function NotificationFromJSONTyped(json, ignoreDiscriminator) {
58
60
  'user_id': json['user_id'] == null ? undefined : json['user_id'],
59
61
  'created_by': json['created_by'] == null ? undefined : json['created_by'],
60
62
  'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
63
+ 'send_email': json['send_email'],
64
+ 'localized_content': json['localized_content'] == null ? undefined : json['localized_content'],
65
+ 'default_language': json['default_language'] == null ? undefined : json['default_language'],
61
66
  'created_at': (new Date(json['created_at'])),
62
67
  'updated_at': (new Date(json['updated_at'])),
63
68
  'read_at': json['read_at'] == null ? undefined : (new Date(json['read_at'])),
@@ -83,6 +88,9 @@ export function NotificationToJSONTyped(value, ignoreDiscriminator = false) {
83
88
  'user_id': value['user_id'],
84
89
  'created_by': value['created_by'],
85
90
  'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
91
+ 'send_email': value['send_email'],
92
+ 'localized_content': value['localized_content'],
93
+ 'default_language': value['default_language'],
86
94
  'created_at': value['created_at'].toISOString(),
87
95
  'updated_at': value['updated_at'].toISOString(),
88
96
  'read_at': value['read_at'] == null ? value['read_at'] : value['read_at'].toISOString(),
@@ -67,6 +67,28 @@ export interface NotificationCreate {
67
67
  * @memberof NotificationCreate
68
68
  */
69
69
  expires_at?: Date | null;
70
+ /**
71
+ *
72
+ * @type {boolean}
73
+ * @memberof NotificationCreate
74
+ */
75
+ send_email?: boolean;
76
+ /**
77
+ *
78
+ * @type {{ [key: string]: { [key: string]: any; }; }}
79
+ * @memberof NotificationCreate
80
+ */
81
+ localized_content?: {
82
+ [key: string]: {
83
+ [key: string]: any;
84
+ };
85
+ } | null;
86
+ /**
87
+ *
88
+ * @type {string}
89
+ * @memberof NotificationCreate
90
+ */
91
+ default_language?: string | null;
70
92
  }
71
93
  /**
72
94
  * Check if a given object implements the NotificationCreate interface.