@l7mp/tivadar-ai-api-sdk 0.2.2 → 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 +8 -1
- package/dist/api-client.js +7 -0
- package/dist/apis/ProfileApi.d.ts +41 -0
- package/dist/apis/ProfileApi.js +112 -0
- package/dist/apis/RAGApi.d.ts +13 -0
- package/dist/apis/RAGApi.js +45 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +8 -1
- package/dist/esm/api-client.js +7 -0
- package/dist/esm/apis/ProfileApi.d.ts +41 -0
- package/dist/esm/apis/ProfileApi.js +108 -0
- package/dist/esm/apis/RAGApi.d.ts +13 -0
- package/dist/esm/apis/RAGApi.js +45 -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 +15 -0
- package/src/apis/ProfileApi.ts +142 -0
- package/src/apis/RAGApi.ts +67 -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"]>;
|
|
@@ -92,6 +97,7 @@ export declare class Api {
|
|
|
92
97
|
upload: (organizationId: string, ragConfigName: string, file: File, sourceUrl?: string, metadata?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsPost"]>;
|
|
93
98
|
list: (organizationId: string, ragConfigName: string, status?: OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsGet"]>;
|
|
94
99
|
get: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet"]>;
|
|
100
|
+
download: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet"]>;
|
|
95
101
|
replace: (organizationId: string, ragConfigName: string, documentId: string, file: File, sourceUrl?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut"]>;
|
|
96
102
|
delete: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete"]>;
|
|
97
103
|
};
|
|
@@ -153,6 +159,7 @@ export declare class Api {
|
|
|
153
159
|
private readonly membersApi;
|
|
154
160
|
private readonly organizationsApi;
|
|
155
161
|
private readonly playgroundApi;
|
|
162
|
+
private readonly profileApi;
|
|
156
163
|
private readonly ragApi;
|
|
157
164
|
private readonly recordingsApi;
|
|
158
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),
|
|
@@ -137,6 +143,7 @@ class Api {
|
|
|
137
143
|
upload: (organizationId, ragConfigName, file, sourceUrl, metadata, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsPost({ organizationId, ragConfigName, file, sourceUrl, metadata }, options),
|
|
138
144
|
list: (organizationId, ragConfigName, status, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsGet({ organizationId, ragConfigName, status }, options),
|
|
139
145
|
get: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet({ organizationId, ragConfigName, documentId }, options),
|
|
146
|
+
download: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet({ organizationId, ragConfigName, documentId }, options),
|
|
140
147
|
replace: (organizationId, ragConfigName, documentId, file, sourceUrl, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut({ organizationId, ragConfigName, documentId, file, sourceUrl }, options),
|
|
141
148
|
delete: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete({ organizationId, ragConfigName, documentId }, options),
|
|
142
149
|
},
|
|
@@ -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/RAGApi.d.ts
CHANGED
|
@@ -32,6 +32,11 @@ export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdG
|
|
|
32
32
|
ragConfigName: string;
|
|
33
33
|
documentId: string;
|
|
34
34
|
}
|
|
35
|
+
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest {
|
|
36
|
+
organizationId: string;
|
|
37
|
+
ragConfigName: string;
|
|
38
|
+
documentId: string;
|
|
39
|
+
}
|
|
35
40
|
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPutRequest {
|
|
36
41
|
organizationId: string;
|
|
37
42
|
ragConfigName: string;
|
|
@@ -95,6 +100,14 @@ export declare class RAGApi extends runtime.BaseAPI {
|
|
|
95
100
|
* Get document chunks
|
|
96
101
|
*/
|
|
97
102
|
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RagDocumentChunkList>;
|
|
103
|
+
/**
|
|
104
|
+
* Download original document file
|
|
105
|
+
*/
|
|
106
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
|
|
107
|
+
/**
|
|
108
|
+
* Download original document file
|
|
109
|
+
*/
|
|
110
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
|
98
111
|
/**
|
|
99
112
|
* Replace a document in a RAG configuration
|
|
100
113
|
*/
|
package/dist/apis/RAGApi.js
CHANGED
|
@@ -237,6 +237,51 @@ class RAGApi extends runtime.BaseAPI {
|
|
|
237
237
|
return yield response.value();
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* Download original document file
|
|
242
|
+
*/
|
|
243
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters, initOverrides) {
|
|
244
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
245
|
+
if (requestParameters['organizationId'] == null) {
|
|
246
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().');
|
|
247
|
+
}
|
|
248
|
+
if (requestParameters['ragConfigName'] == null) {
|
|
249
|
+
throw new runtime.RequiredError('ragConfigName', 'Required parameter "ragConfigName" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().');
|
|
250
|
+
}
|
|
251
|
+
if (requestParameters['documentId'] == null) {
|
|
252
|
+
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().');
|
|
253
|
+
}
|
|
254
|
+
const queryParameters = {};
|
|
255
|
+
const headerParameters = {};
|
|
256
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
257
|
+
const token = this.configuration.accessToken;
|
|
258
|
+
const tokenString = yield token("bearerAuth", []);
|
|
259
|
+
if (tokenString) {
|
|
260
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents/{documentId}/file`;
|
|
264
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
265
|
+
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
266
|
+
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters['documentId'])));
|
|
267
|
+
const response = yield this.request({
|
|
268
|
+
path: urlPath,
|
|
269
|
+
method: 'GET',
|
|
270
|
+
headers: headerParameters,
|
|
271
|
+
query: queryParameters,
|
|
272
|
+
}, initOverrides);
|
|
273
|
+
return new runtime.BlobApiResponse(response);
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Download original document file
|
|
278
|
+
*/
|
|
279
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet(requestParameters, initOverrides) {
|
|
280
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
281
|
+
const response = yield this.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters, initOverrides);
|
|
282
|
+
return yield response.value();
|
|
283
|
+
});
|
|
284
|
+
}
|
|
240
285
|
/**
|
|
241
286
|
* Replace a document in a RAG configuration
|
|
242
287
|
*/
|
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"]>;
|
|
@@ -92,6 +97,7 @@ export declare class Api {
|
|
|
92
97
|
upload: (organizationId: string, ragConfigName: string, file: File, sourceUrl?: string, metadata?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsPost"]>;
|
|
93
98
|
list: (organizationId: string, ragConfigName: string, status?: OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsGet"]>;
|
|
94
99
|
get: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet"]>;
|
|
100
|
+
download: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet"]>;
|
|
95
101
|
replace: (organizationId: string, ragConfigName: string, documentId: string, file: File, sourceUrl?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut"]>;
|
|
96
102
|
delete: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete"]>;
|
|
97
103
|
};
|
|
@@ -153,6 +159,7 @@ export declare class Api {
|
|
|
153
159
|
private readonly membersApi;
|
|
154
160
|
private readonly organizationsApi;
|
|
155
161
|
private readonly playgroundApi;
|
|
162
|
+
private readonly profileApi;
|
|
156
163
|
private readonly ragApi;
|
|
157
164
|
private readonly recordingsApi;
|
|
158
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),
|
|
@@ -134,6 +140,7 @@ export class Api {
|
|
|
134
140
|
upload: (organizationId, ragConfigName, file, sourceUrl, metadata, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsPost({ organizationId, ragConfigName, file, sourceUrl, metadata }, options),
|
|
135
141
|
list: (organizationId, ragConfigName, status, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsGet({ organizationId, ragConfigName, status }, options),
|
|
136
142
|
get: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet({ organizationId, ragConfigName, documentId }, options),
|
|
143
|
+
download: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet({ organizationId, ragConfigName, documentId }, options),
|
|
137
144
|
replace: (organizationId, ragConfigName, documentId, file, sourceUrl, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut({ organizationId, ragConfigName, documentId, file, sourceUrl }, options),
|
|
138
145
|
delete: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete({ organizationId, ragConfigName, documentId }, options),
|
|
139
146
|
},
|
|
@@ -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
|
+
}
|
|
@@ -32,6 +32,11 @@ export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdG
|
|
|
32
32
|
ragConfigName: string;
|
|
33
33
|
documentId: string;
|
|
34
34
|
}
|
|
35
|
+
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest {
|
|
36
|
+
organizationId: string;
|
|
37
|
+
ragConfigName: string;
|
|
38
|
+
documentId: string;
|
|
39
|
+
}
|
|
35
40
|
export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPutRequest {
|
|
36
41
|
organizationId: string;
|
|
37
42
|
ragConfigName: string;
|
|
@@ -95,6 +100,14 @@ export declare class RAGApi extends runtime.BaseAPI {
|
|
|
95
100
|
* Get document chunks
|
|
96
101
|
*/
|
|
97
102
|
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RagDocumentChunkList>;
|
|
103
|
+
/**
|
|
104
|
+
* Download original document file
|
|
105
|
+
*/
|
|
106
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
|
|
107
|
+
/**
|
|
108
|
+
* Download original document file
|
|
109
|
+
*/
|
|
110
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
|
98
111
|
/**
|
|
99
112
|
* Replace a document in a RAG configuration
|
|
100
113
|
*/
|
package/dist/esm/apis/RAGApi.js
CHANGED
|
@@ -234,6 +234,51 @@ export class RAGApi extends runtime.BaseAPI {
|
|
|
234
234
|
return yield response.value();
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* Download original document file
|
|
239
|
+
*/
|
|
240
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters, initOverrides) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
if (requestParameters['organizationId'] == null) {
|
|
243
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().');
|
|
244
|
+
}
|
|
245
|
+
if (requestParameters['ragConfigName'] == null) {
|
|
246
|
+
throw new runtime.RequiredError('ragConfigName', 'Required parameter "ragConfigName" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().');
|
|
247
|
+
}
|
|
248
|
+
if (requestParameters['documentId'] == null) {
|
|
249
|
+
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().');
|
|
250
|
+
}
|
|
251
|
+
const queryParameters = {};
|
|
252
|
+
const headerParameters = {};
|
|
253
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
254
|
+
const token = this.configuration.accessToken;
|
|
255
|
+
const tokenString = yield token("bearerAuth", []);
|
|
256
|
+
if (tokenString) {
|
|
257
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents/{documentId}/file`;
|
|
261
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
262
|
+
urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
|
|
263
|
+
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters['documentId'])));
|
|
264
|
+
const response = yield this.request({
|
|
265
|
+
path: urlPath,
|
|
266
|
+
method: 'GET',
|
|
267
|
+
headers: headerParameters,
|
|
268
|
+
query: queryParameters,
|
|
269
|
+
}, initOverrides);
|
|
270
|
+
return new runtime.BlobApiResponse(response);
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Download original document file
|
|
275
|
+
*/
|
|
276
|
+
organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet(requestParameters, initOverrides) {
|
|
277
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
+
const response = yield this.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters, initOverrides);
|
|
279
|
+
return yield response.value();
|
|
280
|
+
});
|
|
281
|
+
}
|
|
237
282
|
/**
|
|
238
283
|
* Replace a document in a RAG configuration
|
|
239
284
|
*/
|