@l7mp/tivadar-ai-api-sdk 0.2.3 → 0.2.4
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 +7 -1
- package/dist/api-client.js +6 -0
- package/dist/apis/ProfileApi.d.ts +41 -0
- package/dist/apis/ProfileApi.js +112 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +7 -1
- package/dist/esm/api-client.js +6 -0
- package/dist/esm/apis/ProfileApi.d.ts +41 -0
- package/dist/esm/apis/ProfileApi.js +108 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/Notification.d.ts +22 -0
- package/dist/esm/models/Notification.js +8 -0
- package/dist/esm/models/NotificationCreate.d.ts +22 -0
- package/dist/esm/models/NotificationCreate.js +6 -0
- package/dist/esm/models/NotificationUpdate.d.ts +22 -0
- package/dist/esm/models/NotificationUpdate.js +6 -0
- package/dist/esm/models/UserPreferences.d.ts +38 -0
- package/dist/esm/models/UserPreferences.js +45 -0
- package/dist/esm/models/UserPreferencesUpdate.d.ts +32 -0
- package/dist/esm/models/UserPreferencesUpdate.js +41 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/Notification.d.ts +22 -0
- package/dist/models/Notification.js +8 -0
- package/dist/models/NotificationCreate.d.ts +22 -0
- package/dist/models/NotificationCreate.js +6 -0
- package/dist/models/NotificationUpdate.d.ts +22 -0
- package/dist/models/NotificationUpdate.js +6 -0
- package/dist/models/UserPreferences.d.ts +38 -0
- package/dist/models/UserPreferences.js +52 -0
- package/dist/models/UserPreferencesUpdate.d.ts +32 -0
- package/dist/models/UserPreferencesUpdate.js +48 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
- package/src/api-client.ts +13 -0
- package/src/apis/ProfileApi.ts +142 -0
- package/src/apis/index.ts +1 -0
- package/src/models/Notification.ts +25 -1
- package/src/models/NotificationCreate.ts +24 -1
- package/src/models/NotificationUpdate.ts +24 -1
- package/src/models/UserPreferences.ts +75 -0
- package/src/models/UserPreferencesUpdate.ts +66 -0
- package/src/models/index.ts +2 -0
package/dist/api-client.d.ts
CHANGED
|
@@ -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;
|
package/dist/api-client.js
CHANGED
|
@@ -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;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/apis/index.js
CHANGED
|
@@ -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);
|
package/dist/esm/api-client.d.ts
CHANGED
|
@@ -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;
|
package/dist/esm/api-client.js
CHANGED
|
@@ -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
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -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';
|
|
@@ -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.
|
|
@@ -41,6 +41,9 @@ export function NotificationCreateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
41
|
'content': json['content'],
|
|
42
42
|
'user_id': json['user_id'] == null ? undefined : json['user_id'],
|
|
43
43
|
'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
|
|
44
|
+
'send_email': json['send_email'] == null ? undefined : json['send_email'],
|
|
45
|
+
'localized_content': json['localized_content'] == null ? undefined : json['localized_content'],
|
|
46
|
+
'default_language': json['default_language'] == null ? undefined : json['default_language'],
|
|
44
47
|
};
|
|
45
48
|
}
|
|
46
49
|
export function NotificationCreateToJSON(json) {
|
|
@@ -59,5 +62,8 @@ export function NotificationCreateToJSONTyped(value, ignoreDiscriminator = false
|
|
|
59
62
|
'content': value['content'],
|
|
60
63
|
'user_id': value['user_id'],
|
|
61
64
|
'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
|
|
65
|
+
'send_email': value['send_email'],
|
|
66
|
+
'localized_content': value['localized_content'],
|
|
67
|
+
'default_language': value['default_language'],
|
|
62
68
|
};
|
|
63
69
|
}
|
|
@@ -47,6 +47,28 @@ export interface NotificationUpdate {
|
|
|
47
47
|
* @memberof NotificationUpdate
|
|
48
48
|
*/
|
|
49
49
|
expires_at?: Date | null;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {boolean}
|
|
53
|
+
* @memberof NotificationUpdate
|
|
54
|
+
*/
|
|
55
|
+
send_email?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {{ [key: string]: { [key: string]: any; }; }}
|
|
59
|
+
* @memberof NotificationUpdate
|
|
60
|
+
*/
|
|
61
|
+
localized_content?: {
|
|
62
|
+
[key: string]: {
|
|
63
|
+
[key: string]: any;
|
|
64
|
+
};
|
|
65
|
+
} | null;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof NotificationUpdate
|
|
70
|
+
*/
|
|
71
|
+
default_language?: string | null;
|
|
50
72
|
}
|
|
51
73
|
/**
|
|
52
74
|
* Check if a given object implements the NotificationUpdate interface.
|
|
@@ -32,6 +32,9 @@ export function NotificationUpdateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
32
|
'title': json['title'] == null ? undefined : json['title'],
|
|
33
33
|
'content': json['content'] == null ? undefined : json['content'],
|
|
34
34
|
'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
|
|
35
|
+
'send_email': json['send_email'] == null ? undefined : json['send_email'],
|
|
36
|
+
'localized_content': json['localized_content'] == null ? undefined : json['localized_content'],
|
|
37
|
+
'default_language': json['default_language'] == null ? undefined : json['default_language'],
|
|
35
38
|
};
|
|
36
39
|
}
|
|
37
40
|
export function NotificationUpdateToJSON(json) {
|
|
@@ -47,5 +50,8 @@ export function NotificationUpdateToJSONTyped(value, ignoreDiscriminator = false
|
|
|
47
50
|
'title': value['title'],
|
|
48
51
|
'content': value['content'],
|
|
49
52
|
'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
|
|
53
|
+
'send_email': value['send_email'],
|
|
54
|
+
'localized_content': value['localized_content'],
|
|
55
|
+
'default_language': value['default_language'],
|
|
50
56
|
};
|
|
51
57
|
}
|