@openfilz-sdk/typescript-ee 1.9.6 → 1.9.8

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 (128) hide show
  1. package/.openapi-generator/FILES +26 -0
  2. package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
  3. package/README.md +27 -4
  4. package/api/aichat-api.ts +82 -9
  5. package/api/document-controller-api.ts +30 -14
  6. package/api/document-insights-api.ts +357 -0
  7. package/api/esign-api.ts +9 -9
  8. package/api/settings-api.ts +142 -0
  9. package/api/smart-filing-api.ts +421 -0
  10. package/api.ts +2 -0
  11. package/dist/api/aichat-api.d.ts +37 -4
  12. package/dist/api/aichat-api.js +77 -9
  13. package/dist/api/document-controller-api.d.ts +16 -8
  14. package/dist/api/document-controller-api.js +28 -14
  15. package/dist/api/document-insights-api.d.ts +170 -0
  16. package/dist/api/document-insights-api.js +346 -0
  17. package/dist/api/esign-api.d.ts +4 -4
  18. package/dist/api/esign-api.js +9 -9
  19. package/dist/api/settings-api.d.ts +62 -0
  20. package/dist/api/settings-api.js +132 -0
  21. package/dist/api/smart-filing-api.d.ts +197 -0
  22. package/dist/api/smart-filing-api.js +409 -0
  23. package/dist/api.d.ts +2 -0
  24. package/dist/api.js +2 -0
  25. package/dist/esm/api/aichat-api.d.ts +37 -4
  26. package/dist/esm/api/aichat-api.js +77 -9
  27. package/dist/esm/api/document-controller-api.d.ts +16 -8
  28. package/dist/esm/api/document-controller-api.js +28 -14
  29. package/dist/esm/api/document-insights-api.d.ts +170 -0
  30. package/dist/esm/api/document-insights-api.js +339 -0
  31. package/dist/esm/api/esign-api.d.ts +4 -4
  32. package/dist/esm/api/esign-api.js +9 -9
  33. package/dist/esm/api/settings-api.d.ts +62 -0
  34. package/dist/esm/api/settings-api.js +132 -0
  35. package/dist/esm/api/smart-filing-api.d.ts +197 -0
  36. package/dist/esm/api/smart-filing-api.js +402 -0
  37. package/dist/esm/api.d.ts +2 -0
  38. package/dist/esm/api.js +2 -0
  39. package/dist/esm/models/ai-preferences-view.d.ts +16 -0
  40. package/dist/esm/models/ai-preferences-view.js +14 -0
  41. package/dist/esm/models/auto-file-job-view.d.ts +25 -0
  42. package/dist/esm/models/auto-file-job-view.js +14 -0
  43. package/dist/esm/models/auto-file-request.d.ts +15 -0
  44. package/dist/esm/models/auto-file-request.js +14 -0
  45. package/dist/esm/models/auto-file-ticket.d.ts +15 -0
  46. package/dist/esm/models/auto-file-ticket.js +14 -0
  47. package/dist/esm/models/document-insight-view.d.ts +33 -0
  48. package/dist/esm/models/document-insight-view.js +14 -0
  49. package/dist/esm/models/filing-outcome.d.ts +25 -0
  50. package/dist/esm/models/filing-outcome.js +14 -0
  51. package/dist/esm/models/index.d.ts +11 -0
  52. package/dist/esm/models/index.js +11 -0
  53. package/dist/esm/models/insight-backfill-request.d.ts +15 -0
  54. package/dist/esm/models/insight-backfill-request.js +14 -0
  55. package/dist/esm/models/insight-backfill-status.d.ts +23 -0
  56. package/dist/esm/models/insight-backfill-status.js +14 -0
  57. package/dist/esm/models/insight-category-update.d.ts +14 -0
  58. package/dist/esm/models/insight-category-update.js +14 -0
  59. package/dist/esm/models/reorganization-by-kind-request.d.ts +14 -0
  60. package/dist/esm/models/reorganization-by-kind-request.js +14 -0
  61. package/dist/esm/models/save-ai-preferences-request.d.ts +15 -0
  62. package/dist/esm/models/save-ai-preferences-request.js +14 -0
  63. package/dist/esm/models/settings.d.ts +3 -0
  64. package/dist/esm/models/tus-finalize-request.d.ts +1 -0
  65. package/dist/esm/models/upload-response.d.ts +2 -0
  66. package/dist/models/ai-preferences-view.d.ts +16 -0
  67. package/dist/models/ai-preferences-view.js +15 -0
  68. package/dist/models/auto-file-job-view.d.ts +25 -0
  69. package/dist/models/auto-file-job-view.js +15 -0
  70. package/dist/models/auto-file-request.d.ts +15 -0
  71. package/dist/models/auto-file-request.js +15 -0
  72. package/dist/models/auto-file-ticket.d.ts +15 -0
  73. package/dist/models/auto-file-ticket.js +15 -0
  74. package/dist/models/document-insight-view.d.ts +33 -0
  75. package/dist/models/document-insight-view.js +15 -0
  76. package/dist/models/filing-outcome.d.ts +25 -0
  77. package/dist/models/filing-outcome.js +15 -0
  78. package/dist/models/index.d.ts +11 -0
  79. package/dist/models/index.js +11 -0
  80. package/dist/models/insight-backfill-request.d.ts +15 -0
  81. package/dist/models/insight-backfill-request.js +15 -0
  82. package/dist/models/insight-backfill-status.d.ts +23 -0
  83. package/dist/models/insight-backfill-status.js +15 -0
  84. package/dist/models/insight-category-update.d.ts +14 -0
  85. package/dist/models/insight-category-update.js +15 -0
  86. package/dist/models/reorganization-by-kind-request.d.ts +14 -0
  87. package/dist/models/reorganization-by-kind-request.js +15 -0
  88. package/dist/models/save-ai-preferences-request.d.ts +15 -0
  89. package/dist/models/save-ai-preferences-request.js +15 -0
  90. package/dist/models/settings.d.ts +3 -0
  91. package/dist/models/tus-finalize-request.d.ts +1 -0
  92. package/dist/models/upload-response.d.ts +2 -0
  93. package/docs/AIChatApi.md +57 -4
  94. package/docs/AiPreferencesView.md +24 -0
  95. package/docs/AutoFileJobView.md +40 -0
  96. package/docs/AutoFileRequest.md +22 -0
  97. package/docs/AutoFileTicket.md +22 -0
  98. package/docs/DocumentControllerApi.md +6 -0
  99. package/docs/DocumentInsightView.md +54 -0
  100. package/docs/DocumentInsightsApi.md +219 -0
  101. package/docs/ESignApi.md +4 -4
  102. package/docs/FilingOutcome.md +42 -0
  103. package/docs/InsightBackfillRequest.md +22 -0
  104. package/docs/InsightBackfillStatus.md +38 -0
  105. package/docs/InsightCategoryUpdate.md +20 -0
  106. package/docs/ReorganizationByKindRequest.md +20 -0
  107. package/docs/SaveAiPreferencesRequest.md +22 -0
  108. package/docs/Settings.md +6 -0
  109. package/docs/SettingsApi.md +97 -0
  110. package/docs/SmartFilingApi.md +264 -0
  111. package/docs/TusFinalizeRequest.md +2 -0
  112. package/docs/UploadResponse.md +2 -0
  113. package/models/ai-preferences-view.ts +22 -0
  114. package/models/auto-file-job-view.ts +33 -0
  115. package/models/auto-file-request.ts +21 -0
  116. package/models/auto-file-ticket.ts +21 -0
  117. package/models/document-insight-view.ts +37 -0
  118. package/models/filing-outcome.ts +31 -0
  119. package/models/index.ts +11 -0
  120. package/models/insight-backfill-request.ts +21 -0
  121. package/models/insight-backfill-status.ts +29 -0
  122. package/models/insight-category-update.ts +20 -0
  123. package/models/reorganization-by-kind-request.ts +20 -0
  124. package/models/save-ai-preferences-request.ts +21 -0
  125. package/models/settings.ts +3 -0
  126. package/models/tus-finalize-request.ts +1 -0
  127. package/models/upload-response.ts +4 -0
  128. package/package.json +1 -1
@@ -0,0 +1,357 @@
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 { DocumentInsightView } from '../models';
26
+ // @ts-ignore
27
+ import type { InsightBackfillRequest } from '../models';
28
+ // @ts-ignore
29
+ import type { InsightBackfillStatus } from '../models';
30
+ // @ts-ignore
31
+ import type { InsightCategoryUpdate } from '../models';
32
+ /**
33
+ * DocumentInsightsApi - axios parameter creator
34
+ */
35
+ export const DocumentInsightsApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ * Queues every FILE without a tier-2 insight (or with an older prompt version when force), optionally under one folder, and returns the job at once. Poll GET /backfill/{jobId}.
39
+ * @summary Enrich existing documents
40
+ * @param {InsightBackfillRequest} [insightBackfillRequest]
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ backfill: async (insightBackfillRequest?: InsightBackfillRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
45
+ const localVarPath = `/api/v1/ai/insights/backfill`;
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'] = 'application/json';
63
+
64
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
65
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
66
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
67
+ localVarRequestOptions.data = serializeDataIfNeeded(insightBackfillRequest, localVarRequestOptions, configuration)
68
+
69
+ return {
70
+ url: toPathString(localVarUrlObj),
71
+ options: localVarRequestOptions,
72
+ };
73
+ },
74
+ /**
75
+ *
76
+ * @summary Progress of a backfill job
77
+ * @param {string} jobId
78
+ * @param {*} [options] Override http request option.
79
+ * @throws {RequiredError}
80
+ */
81
+ backfillStatus: async (jobId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
82
+ // verify required parameter 'jobId' is not null or undefined
83
+ assertParamExists('backfillStatus', 'jobId', jobId)
84
+ const localVarPath = `/api/v1/ai/insights/backfill/{jobId}`
85
+ .replace('{jobId}', encodeURIComponent(String(jobId)));
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: 'GET', ...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
+ localVarHeaderParameter['Accept'] = 'application/json';
102
+
103
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
104
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
105
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
106
+
107
+ return {
108
+ url: toPathString(localVarUrlObj),
109
+ options: localVarRequestOptions,
110
+ };
111
+ },
112
+ /**
113
+ * Tier 1: the file\'s own metadata (title, author, dates, page count, language) captured at upload. Tier 2: the AI-derived category, summary, keywords and entities when openfilz.ai.insights.active is on. 404 when the document is not visible or has no insights yet.
114
+ * @summary Get the insights of a document
115
+ * @param {string} documentId
116
+ * @param {*} [options] Override http request option.
117
+ * @throws {RequiredError}
118
+ */
119
+ getInsights: async (documentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
120
+ // verify required parameter 'documentId' is not null or undefined
121
+ assertParamExists('getInsights', 'documentId', documentId)
122
+ const localVarPath = `/api/v1/documents/{documentId}/insights`
123
+ .replace('{documentId}', encodeURIComponent(String(documentId)));
124
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
125
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
126
+ let baseOptions;
127
+ if (configuration) {
128
+ baseOptions = configuration.baseOptions;
129
+ }
130
+
131
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
132
+ const localVarHeaderParameter = {} as any;
133
+ const localVarQueryParameter = {} as any;
134
+
135
+ // authentication keycloak_auth required
136
+ // http bearer authentication required
137
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
138
+
139
+ localVarHeaderParameter['Accept'] = 'application/json';
140
+
141
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
142
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
143
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
144
+
145
+ return {
146
+ url: toPathString(localVarUrlObj),
147
+ options: localVarRequestOptions,
148
+ };
149
+ },
150
+ /**
151
+ * Sets the tier-2 category to one of the deployment\'s categories (openfilz.ai.insights.categories, or \'other\'), recorded as written by the user: it is never overwritten by a non-forced backfill, it teaches the learned classifier, and the by-kind reorganisation and smart filing use it like a model\'s label. 400 for a kind the deployment does not know; 403 without modify access.
152
+ * @summary Correct the kind of a document
153
+ * @param {string} documentId
154
+ * @param {InsightCategoryUpdate} insightCategoryUpdate
155
+ * @param {*} [options] Override http request option.
156
+ * @throws {RequiredError}
157
+ */
158
+ setCategory: async (documentId: string, insightCategoryUpdate: InsightCategoryUpdate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
159
+ // verify required parameter 'documentId' is not null or undefined
160
+ assertParamExists('setCategory', 'documentId', documentId)
161
+ // verify required parameter 'insightCategoryUpdate' is not null or undefined
162
+ assertParamExists('setCategory', 'insightCategoryUpdate', insightCategoryUpdate)
163
+ const localVarPath = `/api/v1/documents/{documentId}/insights`
164
+ .replace('{documentId}', encodeURIComponent(String(documentId)));
165
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
166
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
167
+ let baseOptions;
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ }
171
+
172
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
173
+ const localVarHeaderParameter = {} as any;
174
+ const localVarQueryParameter = {} as any;
175
+
176
+ // authentication keycloak_auth required
177
+ // http bearer authentication required
178
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
179
+
180
+ localVarHeaderParameter['Content-Type'] = 'application/json';
181
+ localVarHeaderParameter['Accept'] = 'application/json';
182
+
183
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
184
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
185
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
186
+ localVarRequestOptions.data = serializeDataIfNeeded(insightCategoryUpdate, localVarRequestOptions, configuration)
187
+
188
+ return {
189
+ url: toPathString(localVarUrlObj),
190
+ options: localVarRequestOptions,
191
+ };
192
+ },
193
+ }
194
+ };
195
+
196
+ /**
197
+ * DocumentInsightsApi - functional programming interface
198
+ */
199
+ export const DocumentInsightsApiFp = function(configuration?: Configuration) {
200
+ const localVarAxiosParamCreator = DocumentInsightsApiAxiosParamCreator(configuration)
201
+ return {
202
+ /**
203
+ * Queues every FILE without a tier-2 insight (or with an older prompt version when force), optionally under one folder, and returns the job at once. Poll GET /backfill/{jobId}.
204
+ * @summary Enrich existing documents
205
+ * @param {InsightBackfillRequest} [insightBackfillRequest]
206
+ * @param {*} [options] Override http request option.
207
+ * @throws {RequiredError}
208
+ */
209
+ async backfill(insightBackfillRequest?: InsightBackfillRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InsightBackfillStatus>> {
210
+ const localVarAxiosArgs = await localVarAxiosParamCreator.backfill(insightBackfillRequest, options);
211
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
212
+ const localVarOperationServerBasePath = operationServerMap['DocumentInsightsApi.backfill']?.[localVarOperationServerIndex]?.url;
213
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
214
+ },
215
+ /**
216
+ *
217
+ * @summary Progress of a backfill job
218
+ * @param {string} jobId
219
+ * @param {*} [options] Override http request option.
220
+ * @throws {RequiredError}
221
+ */
222
+ async backfillStatus(jobId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InsightBackfillStatus>> {
223
+ const localVarAxiosArgs = await localVarAxiosParamCreator.backfillStatus(jobId, options);
224
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
225
+ const localVarOperationServerBasePath = operationServerMap['DocumentInsightsApi.backfillStatus']?.[localVarOperationServerIndex]?.url;
226
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
227
+ },
228
+ /**
229
+ * Tier 1: the file\'s own metadata (title, author, dates, page count, language) captured at upload. Tier 2: the AI-derived category, summary, keywords and entities when openfilz.ai.insights.active is on. 404 when the document is not visible or has no insights yet.
230
+ * @summary Get the insights of a document
231
+ * @param {string} documentId
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ async getInsights(documentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DocumentInsightView>> {
236
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInsights(documentId, options);
237
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
238
+ const localVarOperationServerBasePath = operationServerMap['DocumentInsightsApi.getInsights']?.[localVarOperationServerIndex]?.url;
239
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
240
+ },
241
+ /**
242
+ * Sets the tier-2 category to one of the deployment\'s categories (openfilz.ai.insights.categories, or \'other\'), recorded as written by the user: it is never overwritten by a non-forced backfill, it teaches the learned classifier, and the by-kind reorganisation and smart filing use it like a model\'s label. 400 for a kind the deployment does not know; 403 without modify access.
243
+ * @summary Correct the kind of a document
244
+ * @param {string} documentId
245
+ * @param {InsightCategoryUpdate} insightCategoryUpdate
246
+ * @param {*} [options] Override http request option.
247
+ * @throws {RequiredError}
248
+ */
249
+ async setCategory(documentId: string, insightCategoryUpdate: InsightCategoryUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DocumentInsightView>> {
250
+ const localVarAxiosArgs = await localVarAxiosParamCreator.setCategory(documentId, insightCategoryUpdate, options);
251
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
252
+ const localVarOperationServerBasePath = operationServerMap['DocumentInsightsApi.setCategory']?.[localVarOperationServerIndex]?.url;
253
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
254
+ },
255
+ }
256
+ };
257
+
258
+ /**
259
+ * DocumentInsightsApi - factory interface
260
+ */
261
+ export const DocumentInsightsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
262
+ const localVarFp = DocumentInsightsApiFp(configuration)
263
+ return {
264
+ /**
265
+ * Queues every FILE without a tier-2 insight (or with an older prompt version when force), optionally under one folder, and returns the job at once. Poll GET /backfill/{jobId}.
266
+ * @summary Enrich existing documents
267
+ * @param {InsightBackfillRequest} [insightBackfillRequest]
268
+ * @param {*} [options] Override http request option.
269
+ * @throws {RequiredError}
270
+ */
271
+ backfill(insightBackfillRequest?: InsightBackfillRequest, options?: RawAxiosRequestConfig): AxiosPromise<InsightBackfillStatus> {
272
+ return localVarFp.backfill(insightBackfillRequest, options).then((request) => request(axios, basePath));
273
+ },
274
+ /**
275
+ *
276
+ * @summary Progress of a backfill job
277
+ * @param {string} jobId
278
+ * @param {*} [options] Override http request option.
279
+ * @throws {RequiredError}
280
+ */
281
+ backfillStatus(jobId: string, options?: RawAxiosRequestConfig): AxiosPromise<InsightBackfillStatus> {
282
+ return localVarFp.backfillStatus(jobId, options).then((request) => request(axios, basePath));
283
+ },
284
+ /**
285
+ * Tier 1: the file\'s own metadata (title, author, dates, page count, language) captured at upload. Tier 2: the AI-derived category, summary, keywords and entities when openfilz.ai.insights.active is on. 404 when the document is not visible or has no insights yet.
286
+ * @summary Get the insights of a document
287
+ * @param {string} documentId
288
+ * @param {*} [options] Override http request option.
289
+ * @throws {RequiredError}
290
+ */
291
+ getInsights(documentId: string, options?: RawAxiosRequestConfig): AxiosPromise<DocumentInsightView> {
292
+ return localVarFp.getInsights(documentId, options).then((request) => request(axios, basePath));
293
+ },
294
+ /**
295
+ * Sets the tier-2 category to one of the deployment\'s categories (openfilz.ai.insights.categories, or \'other\'), recorded as written by the user: it is never overwritten by a non-forced backfill, it teaches the learned classifier, and the by-kind reorganisation and smart filing use it like a model\'s label. 400 for a kind the deployment does not know; 403 without modify access.
296
+ * @summary Correct the kind of a document
297
+ * @param {string} documentId
298
+ * @param {InsightCategoryUpdate} insightCategoryUpdate
299
+ * @param {*} [options] Override http request option.
300
+ * @throws {RequiredError}
301
+ */
302
+ setCategory(documentId: string, insightCategoryUpdate: InsightCategoryUpdate, options?: RawAxiosRequestConfig): AxiosPromise<DocumentInsightView> {
303
+ return localVarFp.setCategory(documentId, insightCategoryUpdate, options).then((request) => request(axios, basePath));
304
+ },
305
+ };
306
+ };
307
+
308
+ /**
309
+ * DocumentInsightsApi - object-oriented interface
310
+ */
311
+ export class DocumentInsightsApi extends BaseAPI {
312
+ /**
313
+ * Queues every FILE without a tier-2 insight (or with an older prompt version when force), optionally under one folder, and returns the job at once. Poll GET /backfill/{jobId}.
314
+ * @summary Enrich existing documents
315
+ * @param {InsightBackfillRequest} [insightBackfillRequest]
316
+ * @param {*} [options] Override http request option.
317
+ * @throws {RequiredError}
318
+ */
319
+ public backfill(insightBackfillRequest?: InsightBackfillRequest, options?: RawAxiosRequestConfig) {
320
+ return DocumentInsightsApiFp(this.configuration).backfill(insightBackfillRequest, options).then((request) => request(this.axios, this.basePath));
321
+ }
322
+
323
+ /**
324
+ *
325
+ * @summary Progress of a backfill job
326
+ * @param {string} jobId
327
+ * @param {*} [options] Override http request option.
328
+ * @throws {RequiredError}
329
+ */
330
+ public backfillStatus(jobId: string, options?: RawAxiosRequestConfig) {
331
+ return DocumentInsightsApiFp(this.configuration).backfillStatus(jobId, options).then((request) => request(this.axios, this.basePath));
332
+ }
333
+
334
+ /**
335
+ * Tier 1: the file\'s own metadata (title, author, dates, page count, language) captured at upload. Tier 2: the AI-derived category, summary, keywords and entities when openfilz.ai.insights.active is on. 404 when the document is not visible or has no insights yet.
336
+ * @summary Get the insights of a document
337
+ * @param {string} documentId
338
+ * @param {*} [options] Override http request option.
339
+ * @throws {RequiredError}
340
+ */
341
+ public getInsights(documentId: string, options?: RawAxiosRequestConfig) {
342
+ return DocumentInsightsApiFp(this.configuration).getInsights(documentId, options).then((request) => request(this.axios, this.basePath));
343
+ }
344
+
345
+ /**
346
+ * Sets the tier-2 category to one of the deployment\'s categories (openfilz.ai.insights.categories, or \'other\'), recorded as written by the user: it is never overwritten by a non-forced backfill, it teaches the learned classifier, and the by-kind reorganisation and smart filing use it like a model\'s label. 400 for a kind the deployment does not know; 403 without modify access.
347
+ * @summary Correct the kind of a document
348
+ * @param {string} documentId
349
+ * @param {InsightCategoryUpdate} insightCategoryUpdate
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ public setCategory(documentId: string, insightCategoryUpdate: InsightCategoryUpdate, options?: RawAxiosRequestConfig) {
354
+ return DocumentInsightsApiFp(this.configuration).setCategory(documentId, insightCategoryUpdate, options).then((request) => request(this.axios, this.basePath));
355
+ }
356
+ }
357
+
package/api/esign-api.ts CHANGED
@@ -190,9 +190,9 @@ export const ESignApiAxiosParamCreator = function (configuration?: Configuration
190
190
  * @param {*} [options] Override http request option.
191
191
  * @throws {RequiredError}
192
192
  */
193
- get2: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
193
+ get3: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
194
194
  // verify required parameter 'id' is not null or undefined
195
- assertParamExists('get2', 'id', id)
195
+ assertParamExists('get3', 'id', id)
196
196
  const localVarPath = `/api/v1/signatures/{id}`
197
197
  .replace('{id}', encodeURIComponent(String(id)));
198
198
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -479,10 +479,10 @@ export const ESignApiFp = function(configuration?: Configuration) {
479
479
  * @param {*} [options] Override http request option.
480
480
  * @throws {RequiredError}
481
481
  */
482
- async get2(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SignatureEnvelopeDTO>> {
483
- const localVarAxiosArgs = await localVarAxiosParamCreator.get2(id, options);
482
+ async get3(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SignatureEnvelopeDTO>> {
483
+ const localVarAxiosArgs = await localVarAxiosParamCreator.get3(id, options);
484
484
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
485
- const localVarOperationServerBasePath = operationServerMap['ESignApi.get2']?.[localVarOperationServerIndex]?.url;
485
+ const localVarOperationServerBasePath = operationServerMap['ESignApi.get3']?.[localVarOperationServerIndex]?.url;
486
486
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
487
487
  },
488
488
  /**
@@ -605,8 +605,8 @@ export const ESignApiFactory = function (configuration?: Configuration, basePath
605
605
  * @param {*} [options] Override http request option.
606
606
  * @throws {RequiredError}
607
607
  */
608
- get2(id: string, options?: RawAxiosRequestConfig): AxiosPromise<SignatureEnvelopeDTO> {
609
- return localVarFp.get2(id, options).then((request) => request(axios, basePath));
608
+ get3(id: string, options?: RawAxiosRequestConfig): AxiosPromise<SignatureEnvelopeDTO> {
609
+ return localVarFp.get3(id, options).then((request) => request(axios, basePath));
610
610
  },
611
611
  /**
612
612
  *
@@ -715,8 +715,8 @@ export class ESignApi extends BaseAPI {
715
715
  * @param {*} [options] Override http request option.
716
716
  * @throws {RequiredError}
717
717
  */
718
- public get2(id: string, options?: RawAxiosRequestConfig) {
719
- return ESignApiFp(this.configuration).get2(id, options).then((request) => request(this.axios, this.basePath));
718
+ public get3(id: string, options?: RawAxiosRequestConfig) {
719
+ return ESignApiFp(this.configuration).get3(id, options).then((request) => request(this.axios, this.basePath));
720
720
  }
721
721
 
722
722
  /**
@@ -22,8 +22,12 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
22
22
  // @ts-ignore
23
23
  import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
24
  // @ts-ignore
25
+ import type { AiPreferencesView } from '../models';
26
+ // @ts-ignore
25
27
  import type { LicenseInfo } from '../models';
26
28
  // @ts-ignore
29
+ import type { SaveAiPreferencesRequest } from '../models';
30
+ // @ts-ignore
27
31
  import type { Settings } from '../models';
28
32
  // @ts-ignore
29
33
  import type { UserPreferencesRequest } from '../models';
@@ -32,6 +36,40 @@ import type { UserPreferencesRequest } from '../models';
32
36
  */
33
37
  export const SettingsApiAxiosParamCreator = function (configuration?: Configuration) {
34
38
  return {
39
+ /**
40
+ *
41
+ * @summary The caller\'s smart-filing preferences
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ get2: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
46
+ const localVarPath = `/api/v1/settings/ai/preferences`;
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: 'GET', ...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
+ localVarHeaderParameter['Accept'] = 'application/json';
63
+
64
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
65
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
66
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
67
+
68
+ return {
69
+ url: toPathString(localVarUrlObj),
70
+ options: localVarRequestOptions,
71
+ };
72
+ },
35
73
  /**
36
74
  * License type and, for trials, the days remaining — drives the frontend trial banner. No license internals are exposed; the browser never talks to license-server.
37
75
  * @summary Coarse license info
@@ -100,6 +138,45 @@ export const SettingsApiAxiosParamCreator = function (configuration?: Configurat
100
138
  options: localVarRequestOptions,
101
139
  };
102
140
  },
141
+ /**
142
+ * A null field leaves the current value unchanged.
143
+ * @summary Save the caller\'s smart-filing preferences
144
+ * @param {SaveAiPreferencesRequest} saveAiPreferencesRequest
145
+ * @param {*} [options] Override http request option.
146
+ * @throws {RequiredError}
147
+ */
148
+ save: async (saveAiPreferencesRequest: SaveAiPreferencesRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
149
+ // verify required parameter 'saveAiPreferencesRequest' is not null or undefined
150
+ assertParamExists('save', 'saveAiPreferencesRequest', saveAiPreferencesRequest)
151
+ const localVarPath = `/api/v1/settings/ai/preferences`;
152
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
153
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
154
+ let baseOptions;
155
+ if (configuration) {
156
+ baseOptions = configuration.baseOptions;
157
+ }
158
+
159
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
160
+ const localVarHeaderParameter = {} as any;
161
+ const localVarQueryParameter = {} as any;
162
+
163
+ // authentication keycloak_auth required
164
+ // http bearer authentication required
165
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
166
+
167
+ localVarHeaderParameter['Content-Type'] = 'application/json';
168
+ localVarHeaderParameter['Accept'] = 'application/json';
169
+
170
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
171
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
172
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
173
+ localVarRequestOptions.data = serializeDataIfNeeded(saveAiPreferencesRequest, localVarRequestOptions, configuration)
174
+
175
+ return {
176
+ url: toPathString(localVarUrlObj),
177
+ options: localVarRequestOptions,
178
+ };
179
+ },
103
180
  /**
104
181
  * Save user\'s language and theme preferences
105
182
  * @summary Save user preferences
@@ -148,6 +225,18 @@ export const SettingsApiAxiosParamCreator = function (configuration?: Configurat
148
225
  export const SettingsApiFp = function(configuration?: Configuration) {
149
226
  const localVarAxiosParamCreator = SettingsApiAxiosParamCreator(configuration)
150
227
  return {
228
+ /**
229
+ *
230
+ * @summary The caller\'s smart-filing preferences
231
+ * @param {*} [options] Override http request option.
232
+ * @throws {RequiredError}
233
+ */
234
+ async get2(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiPreferencesView>> {
235
+ const localVarAxiosArgs = await localVarAxiosParamCreator.get2(options);
236
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
237
+ const localVarOperationServerBasePath = operationServerMap['SettingsApi.get2']?.[localVarOperationServerIndex]?.url;
238
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
239
+ },
151
240
  /**
152
241
  * License type and, for trials, the days remaining — drives the frontend trial banner. No license internals are exposed; the browser never talks to license-server.
153
242
  * @summary Coarse license info
@@ -172,6 +261,19 @@ export const SettingsApiFp = function(configuration?: Configuration) {
172
261
  const localVarOperationServerBasePath = operationServerMap['SettingsApi.getSettings']?.[localVarOperationServerIndex]?.url;
173
262
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
174
263
  },
264
+ /**
265
+ * A null field leaves the current value unchanged.
266
+ * @summary Save the caller\'s smart-filing preferences
267
+ * @param {SaveAiPreferencesRequest} saveAiPreferencesRequest
268
+ * @param {*} [options] Override http request option.
269
+ * @throws {RequiredError}
270
+ */
271
+ async save(saveAiPreferencesRequest: SaveAiPreferencesRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiPreferencesView>> {
272
+ const localVarAxiosArgs = await localVarAxiosParamCreator.save(saveAiPreferencesRequest, options);
273
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
274
+ const localVarOperationServerBasePath = operationServerMap['SettingsApi.save']?.[localVarOperationServerIndex]?.url;
275
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
276
+ },
175
277
  /**
176
278
  * Save user\'s language and theme preferences
177
279
  * @summary Save user preferences
@@ -194,6 +296,15 @@ export const SettingsApiFp = function(configuration?: Configuration) {
194
296
  export const SettingsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
195
297
  const localVarFp = SettingsApiFp(configuration)
196
298
  return {
299
+ /**
300
+ *
301
+ * @summary The caller\'s smart-filing preferences
302
+ * @param {*} [options] Override http request option.
303
+ * @throws {RequiredError}
304
+ */
305
+ get2(options?: RawAxiosRequestConfig): AxiosPromise<AiPreferencesView> {
306
+ return localVarFp.get2(options).then((request) => request(axios, basePath));
307
+ },
197
308
  /**
198
309
  * License type and, for trials, the days remaining — drives the frontend trial banner. No license internals are exposed; the browser never talks to license-server.
199
310
  * @summary Coarse license info
@@ -212,6 +323,16 @@ export const SettingsApiFactory = function (configuration?: Configuration, baseP
212
323
  getSettings(options?: RawAxiosRequestConfig): AxiosPromise<Settings> {
213
324
  return localVarFp.getSettings(options).then((request) => request(axios, basePath));
214
325
  },
326
+ /**
327
+ * A null field leaves the current value unchanged.
328
+ * @summary Save the caller\'s smart-filing preferences
329
+ * @param {SaveAiPreferencesRequest} saveAiPreferencesRequest
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ */
333
+ save(saveAiPreferencesRequest: SaveAiPreferencesRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiPreferencesView> {
334
+ return localVarFp.save(saveAiPreferencesRequest, options).then((request) => request(axios, basePath));
335
+ },
215
336
  /**
216
337
  * Save user\'s language and theme preferences
217
338
  * @summary Save user preferences
@@ -229,6 +350,16 @@ export const SettingsApiFactory = function (configuration?: Configuration, baseP
229
350
  * SettingsApi - object-oriented interface
230
351
  */
231
352
  export class SettingsApi extends BaseAPI {
353
+ /**
354
+ *
355
+ * @summary The caller\'s smart-filing preferences
356
+ * @param {*} [options] Override http request option.
357
+ * @throws {RequiredError}
358
+ */
359
+ public get2(options?: RawAxiosRequestConfig) {
360
+ return SettingsApiFp(this.configuration).get2(options).then((request) => request(this.axios, this.basePath));
361
+ }
362
+
232
363
  /**
233
364
  * License type and, for trials, the days remaining — drives the frontend trial banner. No license internals are exposed; the browser never talks to license-server.
234
365
  * @summary Coarse license info
@@ -249,6 +380,17 @@ export class SettingsApi extends BaseAPI {
249
380
  return SettingsApiFp(this.configuration).getSettings(options).then((request) => request(this.axios, this.basePath));
250
381
  }
251
382
 
383
+ /**
384
+ * A null field leaves the current value unchanged.
385
+ * @summary Save the caller\'s smart-filing preferences
386
+ * @param {SaveAiPreferencesRequest} saveAiPreferencesRequest
387
+ * @param {*} [options] Override http request option.
388
+ * @throws {RequiredError}
389
+ */
390
+ public save(saveAiPreferencesRequest: SaveAiPreferencesRequest, options?: RawAxiosRequestConfig) {
391
+ return SettingsApiFp(this.configuration).save(saveAiPreferencesRequest, options).then((request) => request(this.axios, this.basePath));
392
+ }
393
+
252
394
  /**
253
395
  * Save user\'s language and theme preferences
254
396
  * @summary Save user preferences