@openfilz-sdk/typescript 1.2.20 → 1.2.21
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 +16 -0
- package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
- package/README.md +17 -3
- package/api/aichat-api.ts +341 -0
- package/api/aisettings-api.ts +335 -0
- package/api/settings-api.ts +8 -8
- package/api.ts +2 -0
- package/dist/api/aichat-api.d.ts +161 -0
- package/dist/api/aichat-api.js +332 -0
- package/dist/api/aisettings-api.d.ts +157 -0
- package/dist/api/aisettings-api.js +326 -0
- package/dist/api/settings-api.d.ts +4 -4
- package/dist/api/settings-api.js +8 -8
- 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 +157 -0
- package/dist/esm/api/aisettings-api.js +319 -0
- package/dist/esm/api/settings-api.d.ts +4 -4
- package/dist/esm/api/settings-api.js +8 -8
- 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-settings-response.d.ts +21 -0
- package/dist/esm/models/ai-settings-response.js +14 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -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/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-settings-response.d.ts +21 -0
- package/dist/models/ai-settings-response.js +15 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/models/save-ai-settings-request.d.ts +36 -0
- package/dist/models/save-ai-settings-request.js +22 -0
- package/docs/AIChatApi.md +209 -0
- package/docs/AISettingsApi.md +203 -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/AiSettingsResponse.md +34 -0
- package/docs/SaveAiSettingsRequest.md +26 -0
- package/docs/SettingsApi.md +4 -4
- 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-settings-response.ts +27 -0
- package/models/index.ts +6 -0
- package/models/save-ai-settings-request.ts +45 -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/audit-controller-api.ts
|
|
7
9
|
api/dashboard-api.ts
|
|
8
10
|
api/document-controller-api.ts
|
|
@@ -16,6 +18,13 @@ api/tus-controller-api.ts
|
|
|
16
18
|
base.ts
|
|
17
19
|
common.ts
|
|
18
20
|
configuration.ts
|
|
21
|
+
docs/AIChatApi.md
|
|
22
|
+
docs/AISettingsApi.md
|
|
23
|
+
docs/AiChatConversation.md
|
|
24
|
+
docs/AiChatRequest.md
|
|
25
|
+
docs/AiChatResponse.md
|
|
26
|
+
docs/AiConnectionTestResult.md
|
|
27
|
+
docs/AiSettingsResponse.md
|
|
19
28
|
docs/AncestorInfo.md
|
|
20
29
|
docs/AuditControllerApi.md
|
|
21
30
|
docs/AuditLog.md
|
|
@@ -56,6 +65,7 @@ docs/RenameRequest.md
|
|
|
56
65
|
docs/ReplaceAudit.md
|
|
57
66
|
docs/RestoreVersionAudit.md
|
|
58
67
|
docs/RestoreVersionResponse.md
|
|
68
|
+
docs/SaveAiSettingsRequest.md
|
|
59
69
|
docs/SearchByAuditLogRequest.md
|
|
60
70
|
docs/SearchByMetadataRequest.md
|
|
61
71
|
docs/SearchMetadataRequest.md
|
|
@@ -74,6 +84,11 @@ docs/UploadAudit.md
|
|
|
74
84
|
docs/UploadResponse.md
|
|
75
85
|
git_push.sh
|
|
76
86
|
index.ts
|
|
87
|
+
models/ai-chat-conversation.ts
|
|
88
|
+
models/ai-chat-request.ts
|
|
89
|
+
models/ai-chat-response.ts
|
|
90
|
+
models/ai-connection-test-result.ts
|
|
91
|
+
models/ai-settings-response.ts
|
|
77
92
|
models/ancestor-info.ts
|
|
78
93
|
models/audit-log-details-one-of.ts
|
|
79
94
|
models/audit-log-details.ts
|
|
@@ -107,6 +122,7 @@ models/rename-request.ts
|
|
|
107
122
|
models/replace-audit.ts
|
|
108
123
|
models/restore-version-audit.ts
|
|
109
124
|
models/restore-version-response.ts
|
|
125
|
+
models/save-ai-settings-request.ts
|
|
110
126
|
models/search-by-audit-log-request.ts
|
|
111
127
|
models/search-by-metadata-request.ts
|
|
112
128
|
models/search-metadata-request.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
16767acdf52f83d8d9be2f184bb1d2b871ceda1708440ebb01f7cd0aeb259968
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @openfilz-sdk/typescript@1.2.
|
|
1
|
+
## @openfilz-sdk/typescript@1.2.21
|
|
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@1.2.
|
|
39
|
+
npm install @openfilz-sdk/typescript@1.2.21 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -51,6 +51,14 @@ 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* | [**getSettings**](docs/AISettingsApi.md#getsettings) | **GET** /api/v1/settings/ai | Get my AI settings
|
|
60
|
+
*AISettingsApi* | [**saveSettings**](docs/AISettingsApi.md#savesettings) | **PUT** /api/v1/settings/ai | Save my AI settings
|
|
61
|
+
*AISettingsApi* | [**testConnection**](docs/AISettingsApi.md#testconnection) | **POST** /api/v1/settings/ai/test | Test AI provider connection
|
|
54
62
|
*AuditControllerApi* | [**getAuditTrail**](docs/AuditControllerApi.md#getaudittrail) | **GET** /api/v1/audit/{id} | Get audit trail for a resource
|
|
55
63
|
*AuditControllerApi* | [**searchAuditTrail**](docs/AuditControllerApi.md#searchaudittrail) | **POST** /api/v1/audit/search | Search for audit trails
|
|
56
64
|
*AuditControllerApi* | [**verifyChain**](docs/AuditControllerApi.md#verifychain) | **GET** /api/v1/audit/verify | Verify audit chain integrity
|
|
@@ -89,7 +97,7 @@ Class | Method | HTTP request | Description
|
|
|
89
97
|
*FolderControllerApi* | [**listFolder**](docs/FolderControllerApi.md#listfolder) | **GET** /api/v1/folders/list | List files and subfolders contained in a given folder
|
|
90
98
|
*FolderControllerApi* | [**moveFolders**](docs/FolderControllerApi.md#movefolders) | **POST** /api/v1/folders/move | Move folders
|
|
91
99
|
*FolderControllerApi* | [**renameFolder**](docs/FolderControllerApi.md#renamefolder) | **PUT** /api/v1/folders/{folderId}/rename | Rename a folder
|
|
92
|
-
*SettingsApi* | [**
|
|
100
|
+
*SettingsApi* | [**getSettings1**](docs/SettingsApi.md#getsettings1) | **GET** /api/v1/settings | Get user\'s settings
|
|
93
101
|
*TusControllerApi* | [**_options**](docs/TusControllerApi.md#_options) | **OPTIONS** /api/v1/tus | TUS capability discovery
|
|
94
102
|
*TusControllerApi* | [**cancelUpload**](docs/TusControllerApi.md#cancelupload) | **DELETE** /api/v1/tus/{uploadId} | Cancel upload
|
|
95
103
|
*TusControllerApi* | [**createUpload**](docs/TusControllerApi.md#createupload) | **POST** /api/v1/tus | Create new TUS upload
|
|
@@ -103,6 +111,11 @@ Class | Method | HTTP request | Description
|
|
|
103
111
|
|
|
104
112
|
### Documentation For Models
|
|
105
113
|
|
|
114
|
+
- [AiChatConversation](docs/AiChatConversation.md)
|
|
115
|
+
- [AiChatRequest](docs/AiChatRequest.md)
|
|
116
|
+
- [AiChatResponse](docs/AiChatResponse.md)
|
|
117
|
+
- [AiConnectionTestResult](docs/AiConnectionTestResult.md)
|
|
118
|
+
- [AiSettingsResponse](docs/AiSettingsResponse.md)
|
|
106
119
|
- [AncestorInfo](docs/AncestorInfo.md)
|
|
107
120
|
- [AuditLog](docs/AuditLog.md)
|
|
108
121
|
- [AuditLogDetails](docs/AuditLogDetails.md)
|
|
@@ -135,6 +148,7 @@ Class | Method | HTTP request | Description
|
|
|
135
148
|
- [ReplaceAudit](docs/ReplaceAudit.md)
|
|
136
149
|
- [RestoreVersionAudit](docs/RestoreVersionAudit.md)
|
|
137
150
|
- [RestoreVersionResponse](docs/RestoreVersionResponse.md)
|
|
151
|
+
- [SaveAiSettingsRequest](docs/SaveAiSettingsRequest.md)
|
|
138
152
|
- [SearchByAuditLogRequest](docs/SearchByAuditLogRequest.md)
|
|
139
153
|
- [SearchByMetadataRequest](docs/SearchByMetadataRequest.md)
|
|
140
154
|
- [SearchMetadataRequest](docs/SearchMetadataRequest.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
|
+
|