@openfilz-sdk/typescript-ee 1.7.5 → 1.8.1
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/.openapi-generator/FILES +20 -0
- package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
- package/README.md +19 -2
- package/api/aichat-api.ts +341 -0
- package/api/aisettings-api.ts +412 -0
- package/api.ts +2 -0
- package/common.ts +2 -2
- package/dist/api/aichat-api.d.ts +161 -0
- package/dist/api/aichat-api.js +332 -0
- package/dist/api/aisettings-api.d.ts +191 -0
- package/dist/api/aisettings-api.js +396 -0
- package/dist/api/collaboration-audit-controller-api.d.ts +3 -3
- package/dist/api/collaboration-controller-api.d.ts +15 -15
- package/dist/api/comments-api.d.ts +3 -3
- package/dist/api/dashboard-api.d.ts +1 -1
- package/dist/api/delegated-browse-grants-admin-api.d.ts +5 -5
- package/dist/api/delegated-browse-grants-end-user-api.d.ts +5 -5
- package/dist/api/digital-signature-api.d.ts +6 -6
- package/dist/api/digital-signature-public-api.d.ts +5 -5
- package/dist/api/document-controller-api.d.ts +15 -15
- package/dist/api/document-suggestion-controller-api.d.ts +1 -1
- package/dist/api/document-version-controller-api.d.ts +3 -3
- package/dist/api/favorites-api.d.ts +4 -4
- package/dist/api/file-controller-api.d.ts +4 -4
- package/dist/api/folder-controller-api.d.ts +7 -7
- package/dist/api/notifications-api.d.ts +5 -5
- package/dist/api/scan-agent-api.d.ts +2 -2
- package/dist/api/scanner-proxy-api.d.ts +5 -5
- package/dist/api/search-administration-api.d.ts +4 -4
- package/dist/api/settings-api.d.ts +2 -2
- package/dist/api/tus-controller-api.d.ts +9 -9
- package/dist/api/upload-token-controller-api.d.ts +2 -2
- package/dist/api/user-privacy-api.d.ts +2 -2
- package/dist/api/webhook-proxy-controller-api.d.ts +7 -7
- package/dist/api.d.ts +2 -0
- package/dist/api.js +2 -0
- package/dist/esm/api/aichat-api.d.ts +161 -0
- package/dist/esm/api/aichat-api.js +325 -0
- package/dist/esm/api/aisettings-api.d.ts +191 -0
- package/dist/esm/api/aisettings-api.js +389 -0
- package/dist/esm/api/collaboration-audit-controller-api.d.ts +3 -3
- package/dist/esm/api/collaboration-controller-api.d.ts +15 -15
- package/dist/esm/api/comments-api.d.ts +3 -3
- package/dist/esm/api/dashboard-api.d.ts +1 -1
- package/dist/esm/api/delegated-browse-grants-admin-api.d.ts +5 -5
- package/dist/esm/api/delegated-browse-grants-end-user-api.d.ts +5 -5
- package/dist/esm/api/digital-signature-api.d.ts +6 -6
- package/dist/esm/api/digital-signature-public-api.d.ts +5 -5
- package/dist/esm/api/document-controller-api.d.ts +15 -15
- package/dist/esm/api/document-suggestion-controller-api.d.ts +1 -1
- package/dist/esm/api/document-version-controller-api.d.ts +3 -3
- package/dist/esm/api/favorites-api.d.ts +4 -4
- package/dist/esm/api/file-controller-api.d.ts +4 -4
- package/dist/esm/api/folder-controller-api.d.ts +7 -7
- package/dist/esm/api/notifications-api.d.ts +5 -5
- package/dist/esm/api/scan-agent-api.d.ts +2 -2
- package/dist/esm/api/scanner-proxy-api.d.ts +5 -5
- package/dist/esm/api/search-administration-api.d.ts +4 -4
- package/dist/esm/api/settings-api.d.ts +2 -2
- package/dist/esm/api/tus-controller-api.d.ts +9 -9
- package/dist/esm/api/upload-token-controller-api.d.ts +2 -2
- package/dist/esm/api/user-privacy-api.d.ts +2 -2
- package/dist/esm/api/webhook-proxy-controller-api.d.ts +7 -7
- package/dist/esm/api.d.ts +2 -0
- package/dist/esm/api.js +2 -0
- package/dist/esm/models/ai-chat-conversation.d.ts +18 -0
- package/dist/esm/models/ai-chat-conversation.js +14 -0
- package/dist/esm/models/ai-chat-request.d.ts +15 -0
- package/dist/esm/models/ai-chat-request.js +14 -0
- package/dist/esm/models/ai-chat-response.d.ts +23 -0
- package/dist/esm/models/ai-chat-response.js +18 -0
- package/dist/esm/models/ai-connection-test-result.d.ts +16 -0
- package/dist/esm/models/ai-connection-test-result.js +14 -0
- package/dist/esm/models/ai-models-response.d.ts +41 -0
- package/dist/esm/models/ai-models-response.js +23 -0
- package/dist/esm/models/ai-settings-response.d.ts +21 -0
- package/dist/esm/models/ai-settings-response.js +14 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/esm/models/list-ai-models-request.d.ts +32 -0
- package/dist/esm/models/list-ai-models-request.js +19 -0
- package/dist/esm/models/save-ai-settings-request.d.ts +36 -0
- package/dist/esm/models/save-ai-settings-request.js +19 -0
- package/dist/esm/models/settings.d.ts +2 -0
- package/dist/models/ai-chat-conversation.d.ts +18 -0
- package/dist/models/ai-chat-conversation.js +15 -0
- package/dist/models/ai-chat-request.d.ts +15 -0
- package/dist/models/ai-chat-request.js +15 -0
- package/dist/models/ai-chat-response.d.ts +23 -0
- package/dist/models/ai-chat-response.js +21 -0
- package/dist/models/ai-connection-test-result.d.ts +16 -0
- package/dist/models/ai-connection-test-result.js +15 -0
- package/dist/models/ai-models-response.d.ts +41 -0
- package/dist/models/ai-models-response.js +26 -0
- package/dist/models/ai-settings-response.d.ts +21 -0
- package/dist/models/ai-settings-response.js +15 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/dist/models/list-ai-models-request.d.ts +32 -0
- package/dist/models/list-ai-models-request.js +22 -0
- package/dist/models/save-ai-settings-request.d.ts +36 -0
- package/dist/models/save-ai-settings-request.js +22 -0
- package/dist/models/settings.d.ts +2 -0
- package/docs/AIChatApi.md +209 -0
- package/docs/AISettingsApi.md +256 -0
- package/docs/AiChatConversation.md +28 -0
- package/docs/AiChatRequest.md +22 -0
- package/docs/AiChatResponse.md +26 -0
- package/docs/AiConnectionTestResult.md +24 -0
- package/docs/AiModelsResponse.md +26 -0
- package/docs/AiSettingsResponse.md +34 -0
- package/docs/ListAiModelsRequest.md +24 -0
- package/docs/SaveAiSettingsRequest.md +26 -0
- package/docs/Settings.md +4 -0
- package/models/ai-chat-conversation.ts +24 -0
- package/models/ai-chat-request.ts +21 -0
- package/models/ai-chat-response.ts +32 -0
- package/models/ai-connection-test-result.ts +22 -0
- package/models/ai-models-response.ts +51 -0
- package/models/ai-settings-response.ts +27 -0
- package/models/index.ts +8 -0
- package/models/list-ai-models-request.ts +41 -0
- package/models/save-ai-settings-request.ts +45 -0
- package/models/settings.ts +2 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
.openapi-generator-ignore
|
|
4
4
|
README.md
|
|
5
5
|
api.ts
|
|
6
|
+
api/aichat-api.ts
|
|
7
|
+
api/aisettings-api.ts
|
|
6
8
|
api/collaboration-audit-controller-api.ts
|
|
7
9
|
api/collaboration-controller-api.ts
|
|
8
10
|
api/comments-api.ts
|
|
@@ -29,6 +31,14 @@ api/webhook-proxy-controller-api.ts
|
|
|
29
31
|
base.ts
|
|
30
32
|
common.ts
|
|
31
33
|
configuration.ts
|
|
34
|
+
docs/AIChatApi.md
|
|
35
|
+
docs/AISettingsApi.md
|
|
36
|
+
docs/AiChatConversation.md
|
|
37
|
+
docs/AiChatRequest.md
|
|
38
|
+
docs/AiChatResponse.md
|
|
39
|
+
docs/AiConnectionTestResult.md
|
|
40
|
+
docs/AiModelsResponse.md
|
|
41
|
+
docs/AiSettingsResponse.md
|
|
32
42
|
docs/AncestorInfo.md
|
|
33
43
|
docs/ApplySignatureRequest.md
|
|
34
44
|
docs/AuditLogDetails.md
|
|
@@ -80,6 +90,7 @@ docs/FolderControllerApi.md
|
|
|
80
90
|
docs/FolderElementInfo.md
|
|
81
91
|
docs/FolderResponse.md
|
|
82
92
|
docs/IngestionStatusDto.md
|
|
93
|
+
docs/ListAiModelsRequest.md
|
|
83
94
|
docs/MintUploadTokenRequest.md
|
|
84
95
|
docs/MoveAudit.md
|
|
85
96
|
docs/MoveRequest.md
|
|
@@ -91,6 +102,7 @@ docs/RenameRequest.md
|
|
|
91
102
|
docs/ReplaceAudit.md
|
|
92
103
|
docs/RestoreVersionAudit.md
|
|
93
104
|
docs/RestoreVersionResponse.md
|
|
105
|
+
docs/SaveAiSettingsRequest.md
|
|
94
106
|
docs/ScanAgentApi.md
|
|
95
107
|
docs/ScanJobStatusDto.md
|
|
96
108
|
docs/ScanRequestDto.md
|
|
@@ -136,6 +148,12 @@ docs/UserRegistrationRequest.md
|
|
|
136
148
|
docs/WebhookProxyControllerApi.md
|
|
137
149
|
git_push.sh
|
|
138
150
|
index.ts
|
|
151
|
+
models/ai-chat-conversation.ts
|
|
152
|
+
models/ai-chat-request.ts
|
|
153
|
+
models/ai-chat-response.ts
|
|
154
|
+
models/ai-connection-test-result.ts
|
|
155
|
+
models/ai-models-response.ts
|
|
156
|
+
models/ai-settings-response.ts
|
|
139
157
|
models/ancestor-info.ts
|
|
140
158
|
models/apply-signature-request.ts
|
|
141
159
|
models/audit-log-details.ts
|
|
@@ -174,6 +192,7 @@ models/folder-element-info.ts
|
|
|
174
192
|
models/folder-response.ts
|
|
175
193
|
models/index.ts
|
|
176
194
|
models/ingestion-status-dto.ts
|
|
195
|
+
models/list-ai-models-request.ts
|
|
177
196
|
models/mint-upload-token-request.ts
|
|
178
197
|
models/move-audit.ts
|
|
179
198
|
models/move-request.ts
|
|
@@ -184,6 +203,7 @@ models/rename-request.ts
|
|
|
184
203
|
models/replace-audit.ts
|
|
185
204
|
models/restore-version-audit.ts
|
|
186
205
|
models/restore-version-response.ts
|
|
206
|
+
models/save-ai-settings-request.ts
|
|
187
207
|
models/scan-job-status-dto.ts
|
|
188
208
|
models/scan-request-dto.ts
|
|
189
209
|
models/scanner-info-dto.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f0f3f75483025352b66bf396930e57a333db8165ff0b818b117f058c39b8bf9a
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @openfilz-sdk/typescript-ee@1.
|
|
1
|
+
## @openfilz-sdk/typescript-ee@1.8.1
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @openfilz-sdk/typescript-ee@1.
|
|
39
|
+
npm install @openfilz-sdk/typescript-ee@1.8.1 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -51,6 +51,15 @@ All URIs are relative to *http://localhost:8081*
|
|
|
51
51
|
|
|
52
52
|
Class | Method | HTTP request | Description
|
|
53
53
|
------------ | ------------- | ------------- | -------------
|
|
54
|
+
*AIChatApi* | [**chat**](docs/AIChatApi.md#chat) | **POST** /api/v1/ai/chat | Chat with AI assistant
|
|
55
|
+
*AIChatApi* | [**deleteConversation**](docs/AIChatApi.md#deleteconversation) | **DELETE** /api/v1/ai/conversations/{conversationId} | Delete conversation
|
|
56
|
+
*AIChatApi* | [**getConversationHistory**](docs/AIChatApi.md#getconversationhistory) | **GET** /api/v1/ai/conversations/{conversationId} | Get conversation history
|
|
57
|
+
*AIChatApi* | [**listConversations**](docs/AIChatApi.md#listconversations) | **GET** /api/v1/ai/conversations | List conversations
|
|
58
|
+
*AISettingsApi* | [**deleteSettings**](docs/AISettingsApi.md#deletesettings) | **DELETE** /api/v1/settings/ai | Reset my AI settings
|
|
59
|
+
*AISettingsApi* | [**getSettings1**](docs/AISettingsApi.md#getsettings1) | **GET** /api/v1/settings/ai | Get my AI settings
|
|
60
|
+
*AISettingsApi* | [**listModels**](docs/AISettingsApi.md#listmodels) | **POST** /api/v1/settings/ai/models | List the provider\'s chat models
|
|
61
|
+
*AISettingsApi* | [**saveSettings1**](docs/AISettingsApi.md#savesettings1) | **PUT** /api/v1/settings/ai | Save my AI settings
|
|
62
|
+
*AISettingsApi* | [**testConnection**](docs/AISettingsApi.md#testconnection) | **POST** /api/v1/settings/ai/test | Test AI provider connection
|
|
54
63
|
*CollaborationAuditControllerApi* | [**getAuditTrail**](docs/CollaborationAuditControllerApi.md#getaudittrail) | **GET** /api/v1/audit/{id} | Get audit trail for a resource (enriched with actor azp)
|
|
55
64
|
*CollaborationAuditControllerApi* | [**searchAuditTrail**](docs/CollaborationAuditControllerApi.md#searchaudittrail) | **POST** /api/v1/audit/search | Search audit trail (enriched with actor azp)
|
|
56
65
|
*CollaborationAuditControllerApi* | [**verifyChain**](docs/CollaborationAuditControllerApi.md#verifychain) | **GET** /api/v1/audit/verify | Verify audit chain integrity
|
|
@@ -170,6 +179,12 @@ Class | Method | HTTP request | Description
|
|
|
170
179
|
|
|
171
180
|
### Documentation For Models
|
|
172
181
|
|
|
182
|
+
- [AiChatConversation](docs/AiChatConversation.md)
|
|
183
|
+
- [AiChatRequest](docs/AiChatRequest.md)
|
|
184
|
+
- [AiChatResponse](docs/AiChatResponse.md)
|
|
185
|
+
- [AiConnectionTestResult](docs/AiConnectionTestResult.md)
|
|
186
|
+
- [AiModelsResponse](docs/AiModelsResponse.md)
|
|
187
|
+
- [AiSettingsResponse](docs/AiSettingsResponse.md)
|
|
173
188
|
- [AncestorInfo](docs/AncestorInfo.md)
|
|
174
189
|
- [ApplySignatureRequest](docs/ApplySignatureRequest.md)
|
|
175
190
|
- [AuditLogDetails](docs/AuditLogDetails.md)
|
|
@@ -207,6 +222,7 @@ Class | Method | HTTP request | Description
|
|
|
207
222
|
- [FolderElementInfo](docs/FolderElementInfo.md)
|
|
208
223
|
- [FolderResponse](docs/FolderResponse.md)
|
|
209
224
|
- [IngestionStatusDto](docs/IngestionStatusDto.md)
|
|
225
|
+
- [ListAiModelsRequest](docs/ListAiModelsRequest.md)
|
|
210
226
|
- [MintUploadTokenRequest](docs/MintUploadTokenRequest.md)
|
|
211
227
|
- [MoveAudit](docs/MoveAudit.md)
|
|
212
228
|
- [MoveRequest](docs/MoveRequest.md)
|
|
@@ -217,6 +233,7 @@ Class | Method | HTTP request | Description
|
|
|
217
233
|
- [ReplaceAudit](docs/ReplaceAudit.md)
|
|
218
234
|
- [RestoreVersionAudit](docs/RestoreVersionAudit.md)
|
|
219
235
|
- [RestoreVersionResponse](docs/RestoreVersionResponse.md)
|
|
236
|
+
- [SaveAiSettingsRequest](docs/SaveAiSettingsRequest.md)
|
|
220
237
|
- [ScanJobStatusDto](docs/ScanJobStatusDto.md)
|
|
221
238
|
- [ScanRequestDto](docs/ScanRequestDto.md)
|
|
222
239
|
- [ScannerInfoDto](docs/ScannerInfoDto.md)
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* openfilz-api
|
|
5
|
+
* API for Document Management System
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from '../configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import type { AiChatConversation } from '../models';
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { AiChatRequest } from '../models';
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import type { AiChatResponse } from '../models';
|
|
30
|
+
/**
|
|
31
|
+
* AIChatApi - axios parameter creator
|
|
32
|
+
*/
|
|
33
|
+
export const AIChatApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
34
|
+
return {
|
|
35
|
+
/**
|
|
36
|
+
* Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
|
|
37
|
+
* @summary Chat with AI assistant
|
|
38
|
+
* @param {AiChatRequest} aiChatRequest
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
*/
|
|
42
|
+
chat: async (aiChatRequest: AiChatRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
43
|
+
// verify required parameter 'aiChatRequest' is not null or undefined
|
|
44
|
+
assertParamExists('chat', 'aiChatRequest', aiChatRequest)
|
|
45
|
+
const localVarPath = `/api/v1/ai/chat`;
|
|
46
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
48
|
+
let baseOptions;
|
|
49
|
+
if (configuration) {
|
|
50
|
+
baseOptions = configuration.baseOptions;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
54
|
+
const localVarHeaderParameter = {} as any;
|
|
55
|
+
const localVarQueryParameter = {} as any;
|
|
56
|
+
|
|
57
|
+
// authentication keycloak_auth required
|
|
58
|
+
// http bearer authentication required
|
|
59
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
60
|
+
|
|
61
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
62
|
+
localVarHeaderParameter['Accept'] = 'text/event-stream';
|
|
63
|
+
|
|
64
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
65
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
66
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
67
|
+
localVarRequestOptions.data = serializeDataIfNeeded(aiChatRequest, localVarRequestOptions, configuration)
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
url: toPathString(localVarUrlObj),
|
|
71
|
+
options: localVarRequestOptions,
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* Delete a conversation and all its messages
|
|
76
|
+
* @summary Delete conversation
|
|
77
|
+
* @param {string} conversationId
|
|
78
|
+
* @param {*} [options] Override http request option.
|
|
79
|
+
* @throws {RequiredError}
|
|
80
|
+
*/
|
|
81
|
+
deleteConversation: async (conversationId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
82
|
+
// verify required parameter 'conversationId' is not null or undefined
|
|
83
|
+
assertParamExists('deleteConversation', 'conversationId', conversationId)
|
|
84
|
+
const localVarPath = `/api/v1/ai/conversations/{conversationId}`
|
|
85
|
+
.replace('{conversationId}', encodeURIComponent(String(conversationId)));
|
|
86
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
87
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
88
|
+
let baseOptions;
|
|
89
|
+
if (configuration) {
|
|
90
|
+
baseOptions = configuration.baseOptions;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
94
|
+
const localVarHeaderParameter = {} as any;
|
|
95
|
+
const localVarQueryParameter = {} as any;
|
|
96
|
+
|
|
97
|
+
// authentication keycloak_auth required
|
|
98
|
+
// http bearer authentication required
|
|
99
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
103
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
104
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
url: toPathString(localVarUrlObj),
|
|
108
|
+
options: localVarRequestOptions,
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
/**
|
|
112
|
+
* Get all messages in a conversation
|
|
113
|
+
* @summary Get conversation history
|
|
114
|
+
* @param {string} conversationId
|
|
115
|
+
* @param {*} [options] Override http request option.
|
|
116
|
+
* @throws {RequiredError}
|
|
117
|
+
*/
|
|
118
|
+
getConversationHistory: async (conversationId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
119
|
+
// verify required parameter 'conversationId' is not null or undefined
|
|
120
|
+
assertParamExists('getConversationHistory', 'conversationId', conversationId)
|
|
121
|
+
const localVarPath = `/api/v1/ai/conversations/{conversationId}`
|
|
122
|
+
.replace('{conversationId}', encodeURIComponent(String(conversationId)));
|
|
123
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
124
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
125
|
+
let baseOptions;
|
|
126
|
+
if (configuration) {
|
|
127
|
+
baseOptions = configuration.baseOptions;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
131
|
+
const localVarHeaderParameter = {} as any;
|
|
132
|
+
const localVarQueryParameter = {} as any;
|
|
133
|
+
|
|
134
|
+
// authentication keycloak_auth required
|
|
135
|
+
// http bearer authentication required
|
|
136
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
137
|
+
|
|
138
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
139
|
+
|
|
140
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
141
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
142
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
143
|
+
|
|
144
|
+
return {
|
|
145
|
+
url: toPathString(localVarUrlObj),
|
|
146
|
+
options: localVarRequestOptions,
|
|
147
|
+
};
|
|
148
|
+
},
|
|
149
|
+
/**
|
|
150
|
+
* Get all AI chat conversations for the current user
|
|
151
|
+
* @summary List conversations
|
|
152
|
+
* @param {*} [options] Override http request option.
|
|
153
|
+
* @throws {RequiredError}
|
|
154
|
+
*/
|
|
155
|
+
listConversations: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
156
|
+
const localVarPath = `/api/v1/ai/conversations`;
|
|
157
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
158
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
159
|
+
let baseOptions;
|
|
160
|
+
if (configuration) {
|
|
161
|
+
baseOptions = configuration.baseOptions;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
165
|
+
const localVarHeaderParameter = {} as any;
|
|
166
|
+
const localVarQueryParameter = {} as any;
|
|
167
|
+
|
|
168
|
+
// authentication keycloak_auth required
|
|
169
|
+
// http bearer authentication required
|
|
170
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
171
|
+
|
|
172
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
173
|
+
|
|
174
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
175
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
176
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
177
|
+
|
|
178
|
+
return {
|
|
179
|
+
url: toPathString(localVarUrlObj),
|
|
180
|
+
options: localVarRequestOptions,
|
|
181
|
+
};
|
|
182
|
+
},
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* AIChatApi - functional programming interface
|
|
188
|
+
*/
|
|
189
|
+
export const AIChatApiFp = function(configuration?: Configuration) {
|
|
190
|
+
const localVarAxiosParamCreator = AIChatApiAxiosParamCreator(configuration)
|
|
191
|
+
return {
|
|
192
|
+
/**
|
|
193
|
+
* Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
|
|
194
|
+
* @summary Chat with AI assistant
|
|
195
|
+
* @param {AiChatRequest} aiChatRequest
|
|
196
|
+
* @param {*} [options] Override http request option.
|
|
197
|
+
* @throws {RequiredError}
|
|
198
|
+
*/
|
|
199
|
+
async chat(aiChatRequest: AiChatRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AiChatResponse>>> {
|
|
200
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.chat(aiChatRequest, options);
|
|
201
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
202
|
+
const localVarOperationServerBasePath = operationServerMap['AIChatApi.chat']?.[localVarOperationServerIndex]?.url;
|
|
203
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
204
|
+
},
|
|
205
|
+
/**
|
|
206
|
+
* Delete a conversation and all its messages
|
|
207
|
+
* @summary Delete conversation
|
|
208
|
+
* @param {string} conversationId
|
|
209
|
+
* @param {*} [options] Override http request option.
|
|
210
|
+
* @throws {RequiredError}
|
|
211
|
+
*/
|
|
212
|
+
async deleteConversation(conversationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
213
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteConversation(conversationId, options);
|
|
214
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
215
|
+
const localVarOperationServerBasePath = operationServerMap['AIChatApi.deleteConversation']?.[localVarOperationServerIndex]?.url;
|
|
216
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
217
|
+
},
|
|
218
|
+
/**
|
|
219
|
+
* Get all messages in a conversation
|
|
220
|
+
* @summary Get conversation history
|
|
221
|
+
* @param {string} conversationId
|
|
222
|
+
* @param {*} [options] Override http request option.
|
|
223
|
+
* @throws {RequiredError}
|
|
224
|
+
*/
|
|
225
|
+
async getConversationHistory(conversationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AiChatResponse>>> {
|
|
226
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getConversationHistory(conversationId, options);
|
|
227
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
228
|
+
const localVarOperationServerBasePath = operationServerMap['AIChatApi.getConversationHistory']?.[localVarOperationServerIndex]?.url;
|
|
229
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
230
|
+
},
|
|
231
|
+
/**
|
|
232
|
+
* Get all AI chat conversations for the current user
|
|
233
|
+
* @summary List conversations
|
|
234
|
+
* @param {*} [options] Override http request option.
|
|
235
|
+
* @throws {RequiredError}
|
|
236
|
+
*/
|
|
237
|
+
async listConversations(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AiChatConversation>>> {
|
|
238
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listConversations(options);
|
|
239
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
240
|
+
const localVarOperationServerBasePath = operationServerMap['AIChatApi.listConversations']?.[localVarOperationServerIndex]?.url;
|
|
241
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
242
|
+
},
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* AIChatApi - factory interface
|
|
248
|
+
*/
|
|
249
|
+
export const AIChatApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
250
|
+
const localVarFp = AIChatApiFp(configuration)
|
|
251
|
+
return {
|
|
252
|
+
/**
|
|
253
|
+
* Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
|
|
254
|
+
* @summary Chat with AI assistant
|
|
255
|
+
* @param {AiChatRequest} aiChatRequest
|
|
256
|
+
* @param {*} [options] Override http request option.
|
|
257
|
+
* @throws {RequiredError}
|
|
258
|
+
*/
|
|
259
|
+
chat(aiChatRequest: AiChatRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<AiChatResponse>> {
|
|
260
|
+
return localVarFp.chat(aiChatRequest, options).then((request) => request(axios, basePath));
|
|
261
|
+
},
|
|
262
|
+
/**
|
|
263
|
+
* Delete a conversation and all its messages
|
|
264
|
+
* @summary Delete conversation
|
|
265
|
+
* @param {string} conversationId
|
|
266
|
+
* @param {*} [options] Override http request option.
|
|
267
|
+
* @throws {RequiredError}
|
|
268
|
+
*/
|
|
269
|
+
deleteConversation(conversationId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
270
|
+
return localVarFp.deleteConversation(conversationId, options).then((request) => request(axios, basePath));
|
|
271
|
+
},
|
|
272
|
+
/**
|
|
273
|
+
* Get all messages in a conversation
|
|
274
|
+
* @summary Get conversation history
|
|
275
|
+
* @param {string} conversationId
|
|
276
|
+
* @param {*} [options] Override http request option.
|
|
277
|
+
* @throws {RequiredError}
|
|
278
|
+
*/
|
|
279
|
+
getConversationHistory(conversationId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<AiChatResponse>> {
|
|
280
|
+
return localVarFp.getConversationHistory(conversationId, options).then((request) => request(axios, basePath));
|
|
281
|
+
},
|
|
282
|
+
/**
|
|
283
|
+
* Get all AI chat conversations for the current user
|
|
284
|
+
* @summary List conversations
|
|
285
|
+
* @param {*} [options] Override http request option.
|
|
286
|
+
* @throws {RequiredError}
|
|
287
|
+
*/
|
|
288
|
+
listConversations(options?: RawAxiosRequestConfig): AxiosPromise<Array<AiChatConversation>> {
|
|
289
|
+
return localVarFp.listConversations(options).then((request) => request(axios, basePath));
|
|
290
|
+
},
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* AIChatApi - object-oriented interface
|
|
296
|
+
*/
|
|
297
|
+
export class AIChatApi extends BaseAPI {
|
|
298
|
+
/**
|
|
299
|
+
* Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
|
|
300
|
+
* @summary Chat with AI assistant
|
|
301
|
+
* @param {AiChatRequest} aiChatRequest
|
|
302
|
+
* @param {*} [options] Override http request option.
|
|
303
|
+
* @throws {RequiredError}
|
|
304
|
+
*/
|
|
305
|
+
public chat(aiChatRequest: AiChatRequest, options?: RawAxiosRequestConfig) {
|
|
306
|
+
return AIChatApiFp(this.configuration).chat(aiChatRequest, options).then((request) => request(this.axios, this.basePath));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Delete a conversation and all its messages
|
|
311
|
+
* @summary Delete conversation
|
|
312
|
+
* @param {string} conversationId
|
|
313
|
+
* @param {*} [options] Override http request option.
|
|
314
|
+
* @throws {RequiredError}
|
|
315
|
+
*/
|
|
316
|
+
public deleteConversation(conversationId: string, options?: RawAxiosRequestConfig) {
|
|
317
|
+
return AIChatApiFp(this.configuration).deleteConversation(conversationId, options).then((request) => request(this.axios, this.basePath));
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Get all messages in a conversation
|
|
322
|
+
* @summary Get conversation history
|
|
323
|
+
* @param {string} conversationId
|
|
324
|
+
* @param {*} [options] Override http request option.
|
|
325
|
+
* @throws {RequiredError}
|
|
326
|
+
*/
|
|
327
|
+
public getConversationHistory(conversationId: string, options?: RawAxiosRequestConfig) {
|
|
328
|
+
return AIChatApiFp(this.configuration).getConversationHistory(conversationId, options).then((request) => request(this.axios, this.basePath));
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Get all AI chat conversations for the current user
|
|
333
|
+
* @summary List conversations
|
|
334
|
+
* @param {*} [options] Override http request option.
|
|
335
|
+
* @throws {RequiredError}
|
|
336
|
+
*/
|
|
337
|
+
public listConversations(options?: RawAxiosRequestConfig) {
|
|
338
|
+
return AIChatApiFp(this.configuration).listConversations(options).then((request) => request(this.axios, this.basePath));
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|