@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.
Files changed (125) hide show
  1. package/.openapi-generator/FILES +20 -0
  2. package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
  3. package/README.md +19 -2
  4. package/api/aichat-api.ts +341 -0
  5. package/api/aisettings-api.ts +412 -0
  6. package/api.ts +2 -0
  7. package/common.ts +2 -2
  8. package/dist/api/aichat-api.d.ts +161 -0
  9. package/dist/api/aichat-api.js +332 -0
  10. package/dist/api/aisettings-api.d.ts +191 -0
  11. package/dist/api/aisettings-api.js +396 -0
  12. package/dist/api/collaboration-audit-controller-api.d.ts +3 -3
  13. package/dist/api/collaboration-controller-api.d.ts +15 -15
  14. package/dist/api/comments-api.d.ts +3 -3
  15. package/dist/api/dashboard-api.d.ts +1 -1
  16. package/dist/api/delegated-browse-grants-admin-api.d.ts +5 -5
  17. package/dist/api/delegated-browse-grants-end-user-api.d.ts +5 -5
  18. package/dist/api/digital-signature-api.d.ts +6 -6
  19. package/dist/api/digital-signature-public-api.d.ts +5 -5
  20. package/dist/api/document-controller-api.d.ts +15 -15
  21. package/dist/api/document-suggestion-controller-api.d.ts +1 -1
  22. package/dist/api/document-version-controller-api.d.ts +3 -3
  23. package/dist/api/favorites-api.d.ts +4 -4
  24. package/dist/api/file-controller-api.d.ts +4 -4
  25. package/dist/api/folder-controller-api.d.ts +7 -7
  26. package/dist/api/notifications-api.d.ts +5 -5
  27. package/dist/api/scan-agent-api.d.ts +2 -2
  28. package/dist/api/scanner-proxy-api.d.ts +5 -5
  29. package/dist/api/search-administration-api.d.ts +4 -4
  30. package/dist/api/settings-api.d.ts +2 -2
  31. package/dist/api/tus-controller-api.d.ts +9 -9
  32. package/dist/api/upload-token-controller-api.d.ts +2 -2
  33. package/dist/api/user-privacy-api.d.ts +2 -2
  34. package/dist/api/webhook-proxy-controller-api.d.ts +7 -7
  35. package/dist/api.d.ts +2 -0
  36. package/dist/api.js +2 -0
  37. package/dist/esm/api/aichat-api.d.ts +161 -0
  38. package/dist/esm/api/aichat-api.js +325 -0
  39. package/dist/esm/api/aisettings-api.d.ts +191 -0
  40. package/dist/esm/api/aisettings-api.js +389 -0
  41. package/dist/esm/api/collaboration-audit-controller-api.d.ts +3 -3
  42. package/dist/esm/api/collaboration-controller-api.d.ts +15 -15
  43. package/dist/esm/api/comments-api.d.ts +3 -3
  44. package/dist/esm/api/dashboard-api.d.ts +1 -1
  45. package/dist/esm/api/delegated-browse-grants-admin-api.d.ts +5 -5
  46. package/dist/esm/api/delegated-browse-grants-end-user-api.d.ts +5 -5
  47. package/dist/esm/api/digital-signature-api.d.ts +6 -6
  48. package/dist/esm/api/digital-signature-public-api.d.ts +5 -5
  49. package/dist/esm/api/document-controller-api.d.ts +15 -15
  50. package/dist/esm/api/document-suggestion-controller-api.d.ts +1 -1
  51. package/dist/esm/api/document-version-controller-api.d.ts +3 -3
  52. package/dist/esm/api/favorites-api.d.ts +4 -4
  53. package/dist/esm/api/file-controller-api.d.ts +4 -4
  54. package/dist/esm/api/folder-controller-api.d.ts +7 -7
  55. package/dist/esm/api/notifications-api.d.ts +5 -5
  56. package/dist/esm/api/scan-agent-api.d.ts +2 -2
  57. package/dist/esm/api/scanner-proxy-api.d.ts +5 -5
  58. package/dist/esm/api/search-administration-api.d.ts +4 -4
  59. package/dist/esm/api/settings-api.d.ts +2 -2
  60. package/dist/esm/api/tus-controller-api.d.ts +9 -9
  61. package/dist/esm/api/upload-token-controller-api.d.ts +2 -2
  62. package/dist/esm/api/user-privacy-api.d.ts +2 -2
  63. package/dist/esm/api/webhook-proxy-controller-api.d.ts +7 -7
  64. package/dist/esm/api.d.ts +2 -0
  65. package/dist/esm/api.js +2 -0
  66. package/dist/esm/models/ai-chat-conversation.d.ts +18 -0
  67. package/dist/esm/models/ai-chat-conversation.js +14 -0
  68. package/dist/esm/models/ai-chat-request.d.ts +15 -0
  69. package/dist/esm/models/ai-chat-request.js +14 -0
  70. package/dist/esm/models/ai-chat-response.d.ts +23 -0
  71. package/dist/esm/models/ai-chat-response.js +18 -0
  72. package/dist/esm/models/ai-connection-test-result.d.ts +16 -0
  73. package/dist/esm/models/ai-connection-test-result.js +14 -0
  74. package/dist/esm/models/ai-models-response.d.ts +41 -0
  75. package/dist/esm/models/ai-models-response.js +23 -0
  76. package/dist/esm/models/ai-settings-response.d.ts +21 -0
  77. package/dist/esm/models/ai-settings-response.js +14 -0
  78. package/dist/esm/models/index.d.ts +8 -0
  79. package/dist/esm/models/index.js +8 -0
  80. package/dist/esm/models/list-ai-models-request.d.ts +32 -0
  81. package/dist/esm/models/list-ai-models-request.js +19 -0
  82. package/dist/esm/models/save-ai-settings-request.d.ts +36 -0
  83. package/dist/esm/models/save-ai-settings-request.js +19 -0
  84. package/dist/esm/models/settings.d.ts +2 -0
  85. package/dist/models/ai-chat-conversation.d.ts +18 -0
  86. package/dist/models/ai-chat-conversation.js +15 -0
  87. package/dist/models/ai-chat-request.d.ts +15 -0
  88. package/dist/models/ai-chat-request.js +15 -0
  89. package/dist/models/ai-chat-response.d.ts +23 -0
  90. package/dist/models/ai-chat-response.js +21 -0
  91. package/dist/models/ai-connection-test-result.d.ts +16 -0
  92. package/dist/models/ai-connection-test-result.js +15 -0
  93. package/dist/models/ai-models-response.d.ts +41 -0
  94. package/dist/models/ai-models-response.js +26 -0
  95. package/dist/models/ai-settings-response.d.ts +21 -0
  96. package/dist/models/ai-settings-response.js +15 -0
  97. package/dist/models/index.d.ts +8 -0
  98. package/dist/models/index.js +8 -0
  99. package/dist/models/list-ai-models-request.d.ts +32 -0
  100. package/dist/models/list-ai-models-request.js +22 -0
  101. package/dist/models/save-ai-settings-request.d.ts +36 -0
  102. package/dist/models/save-ai-settings-request.js +22 -0
  103. package/dist/models/settings.d.ts +2 -0
  104. package/docs/AIChatApi.md +209 -0
  105. package/docs/AISettingsApi.md +256 -0
  106. package/docs/AiChatConversation.md +28 -0
  107. package/docs/AiChatRequest.md +22 -0
  108. package/docs/AiChatResponse.md +26 -0
  109. package/docs/AiConnectionTestResult.md +24 -0
  110. package/docs/AiModelsResponse.md +26 -0
  111. package/docs/AiSettingsResponse.md +34 -0
  112. package/docs/ListAiModelsRequest.md +24 -0
  113. package/docs/SaveAiSettingsRequest.md +26 -0
  114. package/docs/Settings.md +4 -0
  115. package/models/ai-chat-conversation.ts +24 -0
  116. package/models/ai-chat-request.ts +21 -0
  117. package/models/ai-chat-response.ts +32 -0
  118. package/models/ai-connection-test-result.ts +22 -0
  119. package/models/ai-models-response.ts +51 -0
  120. package/models/ai-settings-response.ts +27 -0
  121. package/models/index.ts +8 -0
  122. package/models/list-ai-models-request.ts +41 -0
  123. package/models/save-ai-settings-request.ts +45 -0
  124. package/models/settings.ts +2 -0
  125. package/package.json +1 -1
@@ -0,0 +1,412 @@
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 { AiConnectionTestResult } from '../models';
26
+ // @ts-ignore
27
+ import type { AiModelsResponse } from '../models';
28
+ // @ts-ignore
29
+ import type { AiSettingsResponse } from '../models';
30
+ // @ts-ignore
31
+ import type { ListAiModelsRequest } from '../models';
32
+ // @ts-ignore
33
+ import type { SaveAiSettingsRequest } from '../models';
34
+ /**
35
+ * AISettingsApi - axios parameter creator
36
+ */
37
+ export const AISettingsApiAxiosParamCreator = function (configuration?: Configuration) {
38
+ return {
39
+ /**
40
+ * Remove my chat-LLM override and go back to the server default model.
41
+ * @summary Reset my AI settings
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ deleteSettings: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
46
+ const localVarPath = `/api/v1/settings/ai`;
47
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
48
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
49
+ let baseOptions;
50
+ if (configuration) {
51
+ baseOptions = configuration.baseOptions;
52
+ }
53
+
54
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
55
+ const localVarHeaderParameter = {} as any;
56
+ const localVarQueryParameter = {} as any;
57
+
58
+ // authentication keycloak_auth required
59
+ // http bearer authentication required
60
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
61
+
62
+
63
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
64
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
65
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
66
+
67
+ return {
68
+ url: toPathString(localVarUrlObj),
69
+ options: localVarRequestOptions,
70
+ };
71
+ },
72
+ /**
73
+ * Current user\'s chat-LLM override. The API key is never returned — only hasApiKey and its last characters.
74
+ * @summary Get my AI settings
75
+ * @param {*} [options] Override http request option.
76
+ * @throws {RequiredError}
77
+ */
78
+ getSettings1: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
79
+ const localVarPath = `/api/v1/settings/ai`;
80
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
81
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
82
+ let baseOptions;
83
+ if (configuration) {
84
+ baseOptions = configuration.baseOptions;
85
+ }
86
+
87
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
88
+ const localVarHeaderParameter = {} as any;
89
+ const localVarQueryParameter = {} as any;
90
+
91
+ // authentication keycloak_auth required
92
+ // http bearer authentication required
93
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
94
+
95
+ localVarHeaderParameter['Accept'] = 'application/json';
96
+
97
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
98
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
99
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
100
+
101
+ return {
102
+ url: toPathString(localVarUrlObj),
103
+ options: localVarRequestOptions,
104
+ };
105
+ },
106
+ /**
107
+ * Ask the provider which chat models this key can use, so the picker reflects what exists today rather than a list baked into a release. Falls back to a built-in list (source=FALLBACK) when the provider cannot be reached. POST rather than GET because the key travels in the body, never in a query string; omit apiKey to use the stored key.
108
+ * @summary List the provider\'s chat models
109
+ * @param {ListAiModelsRequest} listAiModelsRequest
110
+ * @param {*} [options] Override http request option.
111
+ * @throws {RequiredError}
112
+ */
113
+ listModels: async (listAiModelsRequest: ListAiModelsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
114
+ // verify required parameter 'listAiModelsRequest' is not null or undefined
115
+ assertParamExists('listModels', 'listAiModelsRequest', listAiModelsRequest)
116
+ const localVarPath = `/api/v1/settings/ai/models`;
117
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
118
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
119
+ let baseOptions;
120
+ if (configuration) {
121
+ baseOptions = configuration.baseOptions;
122
+ }
123
+
124
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
125
+ const localVarHeaderParameter = {} as any;
126
+ const localVarQueryParameter = {} as any;
127
+
128
+ // authentication keycloak_auth required
129
+ // http bearer authentication required
130
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
131
+
132
+ localVarHeaderParameter['Content-Type'] = 'application/json';
133
+ localVarHeaderParameter['Accept'] = 'application/json';
134
+
135
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
136
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
137
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
138
+ localVarRequestOptions.data = serializeDataIfNeeded(listAiModelsRequest, localVarRequestOptions, configuration)
139
+
140
+ return {
141
+ url: toPathString(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ };
144
+ },
145
+ /**
146
+ * Set the chat LLM to use for my conversations. Omit apiKey to keep the previously stored key.
147
+ * @summary Save my AI settings
148
+ * @param {SaveAiSettingsRequest} saveAiSettingsRequest
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ saveSettings1: async (saveAiSettingsRequest: SaveAiSettingsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
153
+ // verify required parameter 'saveAiSettingsRequest' is not null or undefined
154
+ assertParamExists('saveSettings1', 'saveAiSettingsRequest', saveAiSettingsRequest)
155
+ const localVarPath = `/api/v1/settings/ai`;
156
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
157
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
158
+ let baseOptions;
159
+ if (configuration) {
160
+ baseOptions = configuration.baseOptions;
161
+ }
162
+
163
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
164
+ const localVarHeaderParameter = {} as any;
165
+ const localVarQueryParameter = {} as any;
166
+
167
+ // authentication keycloak_auth required
168
+ // http bearer authentication required
169
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
170
+
171
+ localVarHeaderParameter['Content-Type'] = 'application/json';
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
+ localVarRequestOptions.data = serializeDataIfNeeded(saveAiSettingsRequest, localVarRequestOptions, configuration)
178
+
179
+ return {
180
+ url: toPathString(localVarUrlObj),
181
+ options: localVarRequestOptions,
182
+ };
183
+ },
184
+ /**
185
+ * Send a minimal completion request with the submitted settings (falls back to the stored key when apiKey is omitted).
186
+ * @summary Test AI provider connection
187
+ * @param {SaveAiSettingsRequest} saveAiSettingsRequest
188
+ * @param {*} [options] Override http request option.
189
+ * @throws {RequiredError}
190
+ */
191
+ testConnection: async (saveAiSettingsRequest: SaveAiSettingsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
192
+ // verify required parameter 'saveAiSettingsRequest' is not null or undefined
193
+ assertParamExists('testConnection', 'saveAiSettingsRequest', saveAiSettingsRequest)
194
+ const localVarPath = `/api/v1/settings/ai/test`;
195
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
196
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
197
+ let baseOptions;
198
+ if (configuration) {
199
+ baseOptions = configuration.baseOptions;
200
+ }
201
+
202
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
203
+ const localVarHeaderParameter = {} as any;
204
+ const localVarQueryParameter = {} as any;
205
+
206
+ // authentication keycloak_auth required
207
+ // http bearer authentication required
208
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
209
+
210
+ localVarHeaderParameter['Content-Type'] = 'application/json';
211
+ localVarHeaderParameter['Accept'] = 'application/json';
212
+
213
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
214
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
215
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
216
+ localVarRequestOptions.data = serializeDataIfNeeded(saveAiSettingsRequest, localVarRequestOptions, configuration)
217
+
218
+ return {
219
+ url: toPathString(localVarUrlObj),
220
+ options: localVarRequestOptions,
221
+ };
222
+ },
223
+ }
224
+ };
225
+
226
+ /**
227
+ * AISettingsApi - functional programming interface
228
+ */
229
+ export const AISettingsApiFp = function(configuration?: Configuration) {
230
+ const localVarAxiosParamCreator = AISettingsApiAxiosParamCreator(configuration)
231
+ return {
232
+ /**
233
+ * Remove my chat-LLM override and go back to the server default model.
234
+ * @summary Reset my AI settings
235
+ * @param {*} [options] Override http request option.
236
+ * @throws {RequiredError}
237
+ */
238
+ async deleteSettings(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
239
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSettings(options);
240
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
241
+ const localVarOperationServerBasePath = operationServerMap['AISettingsApi.deleteSettings']?.[localVarOperationServerIndex]?.url;
242
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
243
+ },
244
+ /**
245
+ * Current user\'s chat-LLM override. The API key is never returned — only hasApiKey and its last characters.
246
+ * @summary Get my AI settings
247
+ * @param {*} [options] Override http request option.
248
+ * @throws {RequiredError}
249
+ */
250
+ async getSettings1(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiSettingsResponse>> {
251
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSettings1(options);
252
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
253
+ const localVarOperationServerBasePath = operationServerMap['AISettingsApi.getSettings1']?.[localVarOperationServerIndex]?.url;
254
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
255
+ },
256
+ /**
257
+ * Ask the provider which chat models this key can use, so the picker reflects what exists today rather than a list baked into a release. Falls back to a built-in list (source=FALLBACK) when the provider cannot be reached. POST rather than GET because the key travels in the body, never in a query string; omit apiKey to use the stored key.
258
+ * @summary List the provider\'s chat models
259
+ * @param {ListAiModelsRequest} listAiModelsRequest
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ async listModels(listAiModelsRequest: ListAiModelsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiModelsResponse>> {
264
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listModels(listAiModelsRequest, options);
265
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
266
+ const localVarOperationServerBasePath = operationServerMap['AISettingsApi.listModels']?.[localVarOperationServerIndex]?.url;
267
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
268
+ },
269
+ /**
270
+ * Set the chat LLM to use for my conversations. Omit apiKey to keep the previously stored key.
271
+ * @summary Save my AI settings
272
+ * @param {SaveAiSettingsRequest} saveAiSettingsRequest
273
+ * @param {*} [options] Override http request option.
274
+ * @throws {RequiredError}
275
+ */
276
+ async saveSettings1(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiSettingsResponse>> {
277
+ const localVarAxiosArgs = await localVarAxiosParamCreator.saveSettings1(saveAiSettingsRequest, options);
278
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
279
+ const localVarOperationServerBasePath = operationServerMap['AISettingsApi.saveSettings1']?.[localVarOperationServerIndex]?.url;
280
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
281
+ },
282
+ /**
283
+ * Send a minimal completion request with the submitted settings (falls back to the stored key when apiKey is omitted).
284
+ * @summary Test AI provider connection
285
+ * @param {SaveAiSettingsRequest} saveAiSettingsRequest
286
+ * @param {*} [options] Override http request option.
287
+ * @throws {RequiredError}
288
+ */
289
+ async testConnection(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiConnectionTestResult>> {
290
+ const localVarAxiosArgs = await localVarAxiosParamCreator.testConnection(saveAiSettingsRequest, options);
291
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
292
+ const localVarOperationServerBasePath = operationServerMap['AISettingsApi.testConnection']?.[localVarOperationServerIndex]?.url;
293
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
294
+ },
295
+ }
296
+ };
297
+
298
+ /**
299
+ * AISettingsApi - factory interface
300
+ */
301
+ export const AISettingsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
302
+ const localVarFp = AISettingsApiFp(configuration)
303
+ return {
304
+ /**
305
+ * Remove my chat-LLM override and go back to the server default model.
306
+ * @summary Reset my AI settings
307
+ * @param {*} [options] Override http request option.
308
+ * @throws {RequiredError}
309
+ */
310
+ deleteSettings(options?: RawAxiosRequestConfig): AxiosPromise<void> {
311
+ return localVarFp.deleteSettings(options).then((request) => request(axios, basePath));
312
+ },
313
+ /**
314
+ * Current user\'s chat-LLM override. The API key is never returned — only hasApiKey and its last characters.
315
+ * @summary Get my AI settings
316
+ * @param {*} [options] Override http request option.
317
+ * @throws {RequiredError}
318
+ */
319
+ getSettings1(options?: RawAxiosRequestConfig): AxiosPromise<AiSettingsResponse> {
320
+ return localVarFp.getSettings1(options).then((request) => request(axios, basePath));
321
+ },
322
+ /**
323
+ * Ask the provider which chat models this key can use, so the picker reflects what exists today rather than a list baked into a release. Falls back to a built-in list (source=FALLBACK) when the provider cannot be reached. POST rather than GET because the key travels in the body, never in a query string; omit apiKey to use the stored key.
324
+ * @summary List the provider\'s chat models
325
+ * @param {ListAiModelsRequest} listAiModelsRequest
326
+ * @param {*} [options] Override http request option.
327
+ * @throws {RequiredError}
328
+ */
329
+ listModels(listAiModelsRequest: ListAiModelsRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiModelsResponse> {
330
+ return localVarFp.listModels(listAiModelsRequest, options).then((request) => request(axios, basePath));
331
+ },
332
+ /**
333
+ * Set the chat LLM to use for my conversations. Omit apiKey to keep the previously stored key.
334
+ * @summary Save my AI settings
335
+ * @param {SaveAiSettingsRequest} saveAiSettingsRequest
336
+ * @param {*} [options] Override http request option.
337
+ * @throws {RequiredError}
338
+ */
339
+ saveSettings1(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiSettingsResponse> {
340
+ return localVarFp.saveSettings1(saveAiSettingsRequest, options).then((request) => request(axios, basePath));
341
+ },
342
+ /**
343
+ * Send a minimal completion request with the submitted settings (falls back to the stored key when apiKey is omitted).
344
+ * @summary Test AI provider connection
345
+ * @param {SaveAiSettingsRequest} saveAiSettingsRequest
346
+ * @param {*} [options] Override http request option.
347
+ * @throws {RequiredError}
348
+ */
349
+ testConnection(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiConnectionTestResult> {
350
+ return localVarFp.testConnection(saveAiSettingsRequest, options).then((request) => request(axios, basePath));
351
+ },
352
+ };
353
+ };
354
+
355
+ /**
356
+ * AISettingsApi - object-oriented interface
357
+ */
358
+ export class AISettingsApi extends BaseAPI {
359
+ /**
360
+ * Remove my chat-LLM override and go back to the server default model.
361
+ * @summary Reset my AI settings
362
+ * @param {*} [options] Override http request option.
363
+ * @throws {RequiredError}
364
+ */
365
+ public deleteSettings(options?: RawAxiosRequestConfig) {
366
+ return AISettingsApiFp(this.configuration).deleteSettings(options).then((request) => request(this.axios, this.basePath));
367
+ }
368
+
369
+ /**
370
+ * Current user\'s chat-LLM override. The API key is never returned — only hasApiKey and its last characters.
371
+ * @summary Get my AI settings
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ public getSettings1(options?: RawAxiosRequestConfig) {
376
+ return AISettingsApiFp(this.configuration).getSettings1(options).then((request) => request(this.axios, this.basePath));
377
+ }
378
+
379
+ /**
380
+ * Ask the provider which chat models this key can use, so the picker reflects what exists today rather than a list baked into a release. Falls back to a built-in list (source=FALLBACK) when the provider cannot be reached. POST rather than GET because the key travels in the body, never in a query string; omit apiKey to use the stored key.
381
+ * @summary List the provider\'s chat models
382
+ * @param {ListAiModelsRequest} listAiModelsRequest
383
+ * @param {*} [options] Override http request option.
384
+ * @throws {RequiredError}
385
+ */
386
+ public listModels(listAiModelsRequest: ListAiModelsRequest, options?: RawAxiosRequestConfig) {
387
+ return AISettingsApiFp(this.configuration).listModels(listAiModelsRequest, options).then((request) => request(this.axios, this.basePath));
388
+ }
389
+
390
+ /**
391
+ * Set the chat LLM to use for my conversations. Omit apiKey to keep the previously stored key.
392
+ * @summary Save my AI settings
393
+ * @param {SaveAiSettingsRequest} saveAiSettingsRequest
394
+ * @param {*} [options] Override http request option.
395
+ * @throws {RequiredError}
396
+ */
397
+ public saveSettings1(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig) {
398
+ return AISettingsApiFp(this.configuration).saveSettings1(saveAiSettingsRequest, options).then((request) => request(this.axios, this.basePath));
399
+ }
400
+
401
+ /**
402
+ * Send a minimal completion request with the submitted settings (falls back to the stored key when apiKey is omitted).
403
+ * @summary Test AI provider connection
404
+ * @param {SaveAiSettingsRequest} saveAiSettingsRequest
405
+ * @param {*} [options] Override http request option.
406
+ * @throws {RequiredError}
407
+ */
408
+ public testConnection(saveAiSettingsRequest: SaveAiSettingsRequest, options?: RawAxiosRequestConfig) {
409
+ return AISettingsApiFp(this.configuration).testConnection(saveAiSettingsRequest, options).then((request) => request(this.axios, this.basePath));
410
+ }
411
+ }
412
+
package/api.ts CHANGED
@@ -14,6 +14,8 @@
14
14
 
15
15
 
16
16
 
17
+ export * from './api/aichat-api';
18
+ export * from './api/aisettings-api';
17
19
  export * from './api/collaboration-audit-controller-api';
18
20
  export * from './api/collaboration-controller-api';
19
21
  export * from './api/comments-api';
package/common.ts CHANGED
@@ -119,9 +119,9 @@ export const toPathString = function (url: URL) {
119
119
  return url.pathname + url.search + url.hash
120
120
  }
121
121
 
122
- export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
122
+ export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration): <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R> {
123
123
  return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
124
124
  const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
125
- return axios.request<T, R>(axiosRequestArgs);
125
+ return axios.request<T, R>(axiosRequestArgs) as unknown as Promise<R>;
126
126
  };
127
127
  }
@@ -0,0 +1,161 @@
1
+ /**
2
+ * openfilz-api
3
+ * API for Document Management System
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 type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import { type RequestArgs, BaseAPI } from '../base';
15
+ import type { AiChatConversation } from '../models';
16
+ import type { AiChatRequest } from '../models';
17
+ import type { AiChatResponse } from '../models';
18
+ /**
19
+ * AIChatApi - axios parameter creator
20
+ */
21
+ export declare const AIChatApiAxiosParamCreator: (configuration?: Configuration) => {
22
+ /**
23
+ * Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
24
+ * @summary Chat with AI assistant
25
+ * @param {AiChatRequest} aiChatRequest
26
+ * @param {*} [options] Override http request option.
27
+ * @throws {RequiredError}
28
+ */
29
+ chat: (aiChatRequest: AiChatRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
30
+ /**
31
+ * Delete a conversation and all its messages
32
+ * @summary Delete conversation
33
+ * @param {string} conversationId
34
+ * @param {*} [options] Override http request option.
35
+ * @throws {RequiredError}
36
+ */
37
+ deleteConversation: (conversationId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
38
+ /**
39
+ * Get all messages in a conversation
40
+ * @summary Get conversation history
41
+ * @param {string} conversationId
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ getConversationHistory: (conversationId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
46
+ /**
47
+ * Get all AI chat conversations for the current user
48
+ * @summary List conversations
49
+ * @param {*} [options] Override http request option.
50
+ * @throws {RequiredError}
51
+ */
52
+ listConversations: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
53
+ };
54
+ /**
55
+ * AIChatApi - functional programming interface
56
+ */
57
+ export declare const AIChatApiFp: (configuration?: Configuration) => {
58
+ /**
59
+ * Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
60
+ * @summary Chat with AI assistant
61
+ * @param {AiChatRequest} aiChatRequest
62
+ * @param {*} [options] Override http request option.
63
+ * @throws {RequiredError}
64
+ */
65
+ chat(aiChatRequest: AiChatRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AiChatResponse>>>;
66
+ /**
67
+ * Delete a conversation and all its messages
68
+ * @summary Delete conversation
69
+ * @param {string} conversationId
70
+ * @param {*} [options] Override http request option.
71
+ * @throws {RequiredError}
72
+ */
73
+ deleteConversation(conversationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
74
+ /**
75
+ * Get all messages in a conversation
76
+ * @summary Get conversation history
77
+ * @param {string} conversationId
78
+ * @param {*} [options] Override http request option.
79
+ * @throws {RequiredError}
80
+ */
81
+ getConversationHistory(conversationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AiChatResponse>>>;
82
+ /**
83
+ * Get all AI chat conversations for the current user
84
+ * @summary List conversations
85
+ * @param {*} [options] Override http request option.
86
+ * @throws {RequiredError}
87
+ */
88
+ listConversations(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AiChatConversation>>>;
89
+ };
90
+ /**
91
+ * AIChatApi - factory interface
92
+ */
93
+ export declare const AIChatApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
94
+ /**
95
+ * Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
96
+ * @summary Chat with AI assistant
97
+ * @param {AiChatRequest} aiChatRequest
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ chat(aiChatRequest: AiChatRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<AiChatResponse>>;
102
+ /**
103
+ * Delete a conversation and all its messages
104
+ * @summary Delete conversation
105
+ * @param {string} conversationId
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ deleteConversation(conversationId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
110
+ /**
111
+ * Get all messages in a conversation
112
+ * @summary Get conversation history
113
+ * @param {string} conversationId
114
+ * @param {*} [options] Override http request option.
115
+ * @throws {RequiredError}
116
+ */
117
+ getConversationHistory(conversationId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<AiChatResponse>>;
118
+ /**
119
+ * Get all AI chat conversations for the current user
120
+ * @summary List conversations
121
+ * @param {*} [options] Override http request option.
122
+ * @throws {RequiredError}
123
+ */
124
+ listConversations(options?: RawAxiosRequestConfig): AxiosPromise<Array<AiChatConversation>>;
125
+ };
126
+ /**
127
+ * AIChatApi - object-oriented interface
128
+ */
129
+ export declare class AIChatApi extends BaseAPI {
130
+ /**
131
+ * Send a message and receive a streaming response. The AI can answer questions about documents, search, summarize, and reorganize files.
132
+ * @summary Chat with AI assistant
133
+ * @param {AiChatRequest} aiChatRequest
134
+ * @param {*} [options] Override http request option.
135
+ * @throws {RequiredError}
136
+ */
137
+ chat(aiChatRequest: AiChatRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiChatResponse[], any, {}, any>>;
138
+ /**
139
+ * Delete a conversation and all its messages
140
+ * @summary Delete conversation
141
+ * @param {string} conversationId
142
+ * @param {*} [options] Override http request option.
143
+ * @throws {RequiredError}
144
+ */
145
+ deleteConversation(conversationId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
146
+ /**
147
+ * Get all messages in a conversation
148
+ * @summary Get conversation history
149
+ * @param {string} conversationId
150
+ * @param {*} [options] Override http request option.
151
+ * @throws {RequiredError}
152
+ */
153
+ getConversationHistory(conversationId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiChatResponse[], any, {}, any>>;
154
+ /**
155
+ * Get all AI chat conversations for the current user
156
+ * @summary List conversations
157
+ * @param {*} [options] Override http request option.
158
+ * @throws {RequiredError}
159
+ */
160
+ listConversations(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiChatConversation[], any, {}, any>>;
161
+ }