@openfilz-sdk/typescript 1.3.9 → 1.3.12
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 +4 -0
- package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
- package/README.md +6 -2
- package/api/aichat-api.ts +73 -0
- package/api/document-insights-api.ts +82 -0
- package/dist/api/aichat-api.d.ts +33 -0
- package/dist/api/aichat-api.js +68 -0
- package/dist/api/document-insights-api.d.ts +37 -0
- package/dist/api/document-insights-api.js +77 -0
- package/dist/esm/api/aichat-api.d.ts +33 -0
- package/dist/esm/api/aichat-api.js +68 -0
- package/dist/esm/api/document-insights-api.d.ts +37 -0
- package/dist/esm/api/document-insights-api.js +77 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/models/insight-category-update.d.ts +14 -0
- package/dist/esm/models/insight-category-update.js +14 -0
- package/dist/esm/models/reorganization-by-kind-request.d.ts +14 -0
- package/dist/esm/models/reorganization-by-kind-request.js +14 -0
- package/dist/esm/models/settings.d.ts +1 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/insight-category-update.d.ts +14 -0
- package/dist/models/insight-category-update.js +15 -0
- package/dist/models/reorganization-by-kind-request.d.ts +14 -0
- package/dist/models/reorganization-by-kind-request.js +15 -0
- package/dist/models/settings.d.ts +1 -0
- package/docs/AIChatApi.md +53 -0
- package/docs/DocumentInsightsApi.md +56 -0
- package/docs/InsightCategoryUpdate.md +20 -0
- package/docs/ReorganizationByKindRequest.md +20 -0
- package/docs/Settings.md +2 -0
- package/models/index.ts +2 -0
- package/models/insight-category-update.ts +20 -0
- package/models/reorganization-by-kind-request.ts +20 -0
- package/models/settings.ts +1 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -82,6 +82,7 @@ docs/FolderElementInfo.md
|
|
|
82
82
|
docs/FolderResponse.md
|
|
83
83
|
docs/InsightBackfillRequest.md
|
|
84
84
|
docs/InsightBackfillStatus.md
|
|
85
|
+
docs/InsightCategoryUpdate.md
|
|
85
86
|
docs/InstantiateTemplateRequest.md
|
|
86
87
|
docs/Item.md
|
|
87
88
|
docs/ItemResult.md
|
|
@@ -106,6 +107,7 @@ docs/RenameAudit.md
|
|
|
106
107
|
docs/RenameRequest.md
|
|
107
108
|
docs/ReorganizationApplyRequest.md
|
|
108
109
|
docs/ReorganizationApplyResult.md
|
|
110
|
+
docs/ReorganizationByKindRequest.md
|
|
109
111
|
docs/ReorganizationPlanView.md
|
|
110
112
|
docs/ReplaceAudit.md
|
|
111
113
|
docs/RestoreVersionAudit.md
|
|
@@ -192,6 +194,7 @@ models/folder-response.ts
|
|
|
192
194
|
models/index.ts
|
|
193
195
|
models/insight-backfill-request.ts
|
|
194
196
|
models/insight-backfill-status.ts
|
|
197
|
+
models/insight-category-update.ts
|
|
195
198
|
models/instantiate-template-request.ts
|
|
196
199
|
models/item-result.ts
|
|
197
200
|
models/item.ts
|
|
@@ -214,6 +217,7 @@ models/rename-audit.ts
|
|
|
214
217
|
models/rename-request.ts
|
|
215
218
|
models/reorganization-apply-request.ts
|
|
216
219
|
models/reorganization-apply-result.ts
|
|
220
|
+
models/reorganization-by-kind-request.ts
|
|
217
221
|
models/reorganization-plan-view.ts
|
|
218
222
|
models/replace-audit.ts
|
|
219
223
|
models/restore-version-audit.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
28066b1152de31a60e95008433816f15fe3f11a3648c67623652143df0cd25d0
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @openfilz-sdk/typescript@1.3.
|
|
1
|
+
## @openfilz-sdk/typescript@1.3.12
|
|
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.3.
|
|
39
|
+
npm install @openfilz-sdk/typescript@1.3.12 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -58,6 +58,7 @@ Class | Method | HTTP request | Description
|
|
|
58
58
|
*AIChatApi* | [**get3**](docs/AIChatApi.md#get3) | **GET** /api/v1/ai/reorganization/{planId} | Get a reorganisation plan proposed by the AI assistant
|
|
59
59
|
*AIChatApi* | [**getConversationHistory**](docs/AIChatApi.md#getconversationhistory) | **GET** /api/v1/ai/conversations/{conversationId} | Get conversation history
|
|
60
60
|
*AIChatApi* | [**listConversations**](docs/AIChatApi.md#listconversations) | **GET** /api/v1/ai/conversations | List conversations
|
|
61
|
+
*AIChatApi* | [**proposeByKind**](docs/AIChatApi.md#proposebykind) | **POST** /api/v1/ai/reorganization/by-kind | Propose a reorganisation by kind of document — no model involved
|
|
61
62
|
*AISettingsApi* | [**deleteSettings**](docs/AISettingsApi.md#deletesettings) | **DELETE** /api/v1/settings/ai | Reset my AI settings
|
|
62
63
|
*AISettingsApi* | [**getSettings**](docs/AISettingsApi.md#getsettings) | **GET** /api/v1/settings/ai | Get my AI settings
|
|
63
64
|
*AISettingsApi* | [**listModels**](docs/AISettingsApi.md#listmodels) | **POST** /api/v1/settings/ai/models | List the provider\'s chat models
|
|
@@ -85,6 +86,7 @@ Class | Method | HTTP request | Description
|
|
|
85
86
|
*DocumentInsightsApi* | [**backfill**](docs/DocumentInsightsApi.md#backfill) | **POST** /api/v1/ai/insights/backfill | Enrich existing documents
|
|
86
87
|
*DocumentInsightsApi* | [**backfillStatus**](docs/DocumentInsightsApi.md#backfillstatus) | **GET** /api/v1/ai/insights/backfill/{jobId} | Progress of a backfill job
|
|
87
88
|
*DocumentInsightsApi* | [**getInsights**](docs/DocumentInsightsApi.md#getinsights) | **GET** /api/v1/documents/{documentId}/insights | Get the insights of a document
|
|
89
|
+
*DocumentInsightsApi* | [**setCategory**](docs/DocumentInsightsApi.md#setcategory) | **PATCH** /api/v1/documents/{documentId}/insights | Correct the kind of a document
|
|
88
90
|
*DocumentSuggestionControllerApi* | [**getSuggestions**](docs/DocumentSuggestionControllerApi.md#getsuggestions) | **GET** /api/v1/suggestions |
|
|
89
91
|
*DocumentVersionControllerApi* | [**downloadVersion**](docs/DocumentVersionControllerApi.md#downloadversion) | **GET** /api/v1/documents/{documentId}/versions/{versionId}/download | Download a specific document version
|
|
90
92
|
*DocumentVersionControllerApi* | [**listVersions**](docs/DocumentVersionControllerApi.md#listversions) | **GET** /api/v1/documents/{documentId}/versions | List document versions
|
|
@@ -198,6 +200,7 @@ Class | Method | HTTP request | Description
|
|
|
198
200
|
- [FolderResponse](docs/FolderResponse.md)
|
|
199
201
|
- [InsightBackfillRequest](docs/InsightBackfillRequest.md)
|
|
200
202
|
- [InsightBackfillStatus](docs/InsightBackfillStatus.md)
|
|
203
|
+
- [InsightCategoryUpdate](docs/InsightCategoryUpdate.md)
|
|
201
204
|
- [InstantiateTemplateRequest](docs/InstantiateTemplateRequest.md)
|
|
202
205
|
- [Item](docs/Item.md)
|
|
203
206
|
- [ItemResult](docs/ItemResult.md)
|
|
@@ -220,6 +223,7 @@ Class | Method | HTTP request | Description
|
|
|
220
223
|
- [RenameRequest](docs/RenameRequest.md)
|
|
221
224
|
- [ReorganizationApplyRequest](docs/ReorganizationApplyRequest.md)
|
|
222
225
|
- [ReorganizationApplyResult](docs/ReorganizationApplyResult.md)
|
|
226
|
+
- [ReorganizationByKindRequest](docs/ReorganizationByKindRequest.md)
|
|
223
227
|
- [ReorganizationPlanView](docs/ReorganizationPlanView.md)
|
|
224
228
|
- [ReplaceAudit](docs/ReplaceAudit.md)
|
|
225
229
|
- [RestoreVersionAudit](docs/RestoreVersionAudit.md)
|
package/api/aichat-api.ts
CHANGED
|
@@ -32,6 +32,8 @@ import type { ReorganizationApplyRequest } from '../models';
|
|
|
32
32
|
// @ts-ignore
|
|
33
33
|
import type { ReorganizationApplyResult } from '../models';
|
|
34
34
|
// @ts-ignore
|
|
35
|
+
import type { ReorganizationByKindRequest } from '../models';
|
|
36
|
+
// @ts-ignore
|
|
35
37
|
import type { ReorganizationPlanView } from '../models';
|
|
36
38
|
/**
|
|
37
39
|
* AIChatApi - axios parameter creator
|
|
@@ -298,6 +300,43 @@ export const AIChatApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
298
300
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
299
301
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
300
302
|
|
|
303
|
+
return {
|
|
304
|
+
url: toPathString(localVarUrlObj),
|
|
305
|
+
options: localVarRequestOptions,
|
|
306
|
+
};
|
|
307
|
+
},
|
|
308
|
+
/**
|
|
309
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
310
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
311
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
312
|
+
* @param {*} [options] Override http request option.
|
|
313
|
+
* @throws {RequiredError}
|
|
314
|
+
*/
|
|
315
|
+
proposeByKind: async (reorganizationByKindRequest?: ReorganizationByKindRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
316
|
+
const localVarPath = `/api/v1/ai/reorganization/by-kind`;
|
|
317
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
318
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
319
|
+
let baseOptions;
|
|
320
|
+
if (configuration) {
|
|
321
|
+
baseOptions = configuration.baseOptions;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
325
|
+
const localVarHeaderParameter = {} as any;
|
|
326
|
+
const localVarQueryParameter = {} as any;
|
|
327
|
+
|
|
328
|
+
// authentication keycloak_auth required
|
|
329
|
+
// http bearer authentication required
|
|
330
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
331
|
+
|
|
332
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
333
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
334
|
+
|
|
335
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
336
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
337
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
338
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reorganizationByKindRequest, localVarRequestOptions, configuration)
|
|
339
|
+
|
|
301
340
|
return {
|
|
302
341
|
url: toPathString(localVarUrlObj),
|
|
303
342
|
options: localVarRequestOptions,
|
|
@@ -403,6 +442,19 @@ export const AIChatApiFp = function(configuration?: Configuration) {
|
|
|
403
442
|
const localVarOperationServerBasePath = operationServerMap['AIChatApi.listConversations']?.[localVarOperationServerIndex]?.url;
|
|
404
443
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
405
444
|
},
|
|
445
|
+
/**
|
|
446
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
447
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
448
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
449
|
+
* @param {*} [options] Override http request option.
|
|
450
|
+
* @throws {RequiredError}
|
|
451
|
+
*/
|
|
452
|
+
async proposeByKind(reorganizationByKindRequest?: ReorganizationByKindRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReorganizationPlanView>> {
|
|
453
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.proposeByKind(reorganizationByKindRequest, options);
|
|
454
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
455
|
+
const localVarOperationServerBasePath = operationServerMap['AIChatApi.proposeByKind']?.[localVarOperationServerIndex]?.url;
|
|
456
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
457
|
+
},
|
|
406
458
|
}
|
|
407
459
|
};
|
|
408
460
|
|
|
@@ -482,6 +534,16 @@ export const AIChatApiFactory = function (configuration?: Configuration, basePat
|
|
|
482
534
|
listConversations(options?: RawAxiosRequestConfig): AxiosPromise<Array<AiChatConversation>> {
|
|
483
535
|
return localVarFp.listConversations(options).then((request) => request(axios, basePath));
|
|
484
536
|
},
|
|
537
|
+
/**
|
|
538
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
539
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
540
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
541
|
+
* @param {*} [options] Override http request option.
|
|
542
|
+
* @throws {RequiredError}
|
|
543
|
+
*/
|
|
544
|
+
proposeByKind(reorganizationByKindRequest?: ReorganizationByKindRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReorganizationPlanView> {
|
|
545
|
+
return localVarFp.proposeByKind(reorganizationByKindRequest, options).then((request) => request(axios, basePath));
|
|
546
|
+
},
|
|
485
547
|
};
|
|
486
548
|
};
|
|
487
549
|
|
|
@@ -565,5 +627,16 @@ export class AIChatApi extends BaseAPI {
|
|
|
565
627
|
public listConversations(options?: RawAxiosRequestConfig) {
|
|
566
628
|
return AIChatApiFp(this.configuration).listConversations(options).then((request) => request(this.axios, this.basePath));
|
|
567
629
|
}
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
633
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
634
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
635
|
+
* @param {*} [options] Override http request option.
|
|
636
|
+
* @throws {RequiredError}
|
|
637
|
+
*/
|
|
638
|
+
public proposeByKind(reorganizationByKindRequest?: ReorganizationByKindRequest, options?: RawAxiosRequestConfig) {
|
|
639
|
+
return AIChatApiFp(this.configuration).proposeByKind(reorganizationByKindRequest, options).then((request) => request(this.axios, this.basePath));
|
|
640
|
+
}
|
|
568
641
|
}
|
|
569
642
|
|
|
@@ -27,6 +27,8 @@ import type { DocumentInsightView } from '../models';
|
|
|
27
27
|
import type { InsightBackfillRequest } from '../models';
|
|
28
28
|
// @ts-ignore
|
|
29
29
|
import type { InsightBackfillStatus } from '../models';
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
import type { InsightCategoryUpdate } from '../models';
|
|
30
32
|
/**
|
|
31
33
|
* DocumentInsightsApi - axios parameter creator
|
|
32
34
|
*/
|
|
@@ -140,6 +142,49 @@ export const DocumentInsightsApiAxiosParamCreator = function (configuration?: Co
|
|
|
140
142
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
141
143
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
142
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
|
+
|
|
143
188
|
return {
|
|
144
189
|
url: toPathString(localVarUrlObj),
|
|
145
190
|
options: localVarRequestOptions,
|
|
@@ -193,6 +238,20 @@ export const DocumentInsightsApiFp = function(configuration?: Configuration) {
|
|
|
193
238
|
const localVarOperationServerBasePath = operationServerMap['DocumentInsightsApi.getInsights']?.[localVarOperationServerIndex]?.url;
|
|
194
239
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
195
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
|
+
},
|
|
196
255
|
}
|
|
197
256
|
};
|
|
198
257
|
|
|
@@ -232,6 +291,17 @@ export const DocumentInsightsApiFactory = function (configuration?: Configuratio
|
|
|
232
291
|
getInsights(documentId: string, options?: RawAxiosRequestConfig): AxiosPromise<DocumentInsightView> {
|
|
233
292
|
return localVarFp.getInsights(documentId, options).then((request) => request(axios, basePath));
|
|
234
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
|
+
},
|
|
235
305
|
};
|
|
236
306
|
};
|
|
237
307
|
|
|
@@ -271,5 +341,17 @@ export class DocumentInsightsApi extends BaseAPI {
|
|
|
271
341
|
public getInsights(documentId: string, options?: RawAxiosRequestConfig) {
|
|
272
342
|
return DocumentInsightsApiFp(this.configuration).getInsights(documentId, options).then((request) => request(this.axios, this.basePath));
|
|
273
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
|
+
}
|
|
274
356
|
}
|
|
275
357
|
|
package/dist/api/aichat-api.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import type { AiChatRequest } from '../models';
|
|
|
17
17
|
import type { AiChatResponse } from '../models';
|
|
18
18
|
import type { ReorganizationApplyRequest } from '../models';
|
|
19
19
|
import type { ReorganizationApplyResult } from '../models';
|
|
20
|
+
import type { ReorganizationByKindRequest } from '../models';
|
|
20
21
|
import type { ReorganizationPlanView } from '../models';
|
|
21
22
|
/**
|
|
22
23
|
* AIChatApi - axios parameter creator
|
|
@@ -78,6 +79,14 @@ export declare const AIChatApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
78
79
|
* @throws {RequiredError}
|
|
79
80
|
*/
|
|
80
81
|
listConversations: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
82
|
+
/**
|
|
83
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
84
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
85
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
86
|
+
* @param {*} [options] Override http request option.
|
|
87
|
+
* @throws {RequiredError}
|
|
88
|
+
*/
|
|
89
|
+
proposeByKind: (reorganizationByKindRequest?: ReorganizationByKindRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
81
90
|
};
|
|
82
91
|
/**
|
|
83
92
|
* AIChatApi - functional programming interface
|
|
@@ -139,6 +148,14 @@ export declare const AIChatApiFp: (configuration?: Configuration) => {
|
|
|
139
148
|
* @throws {RequiredError}
|
|
140
149
|
*/
|
|
141
150
|
listConversations(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AiChatConversation>>>;
|
|
151
|
+
/**
|
|
152
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
153
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
154
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
155
|
+
* @param {*} [options] Override http request option.
|
|
156
|
+
* @throws {RequiredError}
|
|
157
|
+
*/
|
|
158
|
+
proposeByKind(reorganizationByKindRequest?: ReorganizationByKindRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReorganizationPlanView>>;
|
|
142
159
|
};
|
|
143
160
|
/**
|
|
144
161
|
* AIChatApi - factory interface
|
|
@@ -200,6 +217,14 @@ export declare const AIChatApiFactory: (configuration?: Configuration, basePath?
|
|
|
200
217
|
* @throws {RequiredError}
|
|
201
218
|
*/
|
|
202
219
|
listConversations(options?: RawAxiosRequestConfig): AxiosPromise<Array<AiChatConversation>>;
|
|
220
|
+
/**
|
|
221
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
222
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
223
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
224
|
+
* @param {*} [options] Override http request option.
|
|
225
|
+
* @throws {RequiredError}
|
|
226
|
+
*/
|
|
227
|
+
proposeByKind(reorganizationByKindRequest?: ReorganizationByKindRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReorganizationPlanView>;
|
|
203
228
|
};
|
|
204
229
|
/**
|
|
205
230
|
* AIChatApi - object-oriented interface
|
|
@@ -261,4 +286,12 @@ export declare class AIChatApi extends BaseAPI {
|
|
|
261
286
|
* @throws {RequiredError}
|
|
262
287
|
*/
|
|
263
288
|
listConversations(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AiChatConversation[], any, {}>>;
|
|
289
|
+
/**
|
|
290
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
291
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
292
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
293
|
+
* @param {*} [options] Override http request option.
|
|
294
|
+
* @throws {RequiredError}
|
|
295
|
+
*/
|
|
296
|
+
proposeByKind(reorganizationByKindRequest?: ReorganizationByKindRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ReorganizationPlanView, any, {}>>;
|
|
264
297
|
}
|
package/dist/api/aichat-api.js
CHANGED
|
@@ -264,6 +264,38 @@ const AIChatApiAxiosParamCreator = function (configuration) {
|
|
|
264
264
|
options: localVarRequestOptions,
|
|
265
265
|
};
|
|
266
266
|
}),
|
|
267
|
+
/**
|
|
268
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
269
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
270
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
271
|
+
* @param {*} [options] Override http request option.
|
|
272
|
+
* @throws {RequiredError}
|
|
273
|
+
*/
|
|
274
|
+
proposeByKind: (reorganizationByKindRequest_1, ...args_1) => __awaiter(this, [reorganizationByKindRequest_1, ...args_1], void 0, function* (reorganizationByKindRequest, options = {}) {
|
|
275
|
+
const localVarPath = `/api/v1/ai/reorganization/by-kind`;
|
|
276
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
277
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
278
|
+
let baseOptions;
|
|
279
|
+
if (configuration) {
|
|
280
|
+
baseOptions = configuration.baseOptions;
|
|
281
|
+
}
|
|
282
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
283
|
+
const localVarHeaderParameter = {};
|
|
284
|
+
const localVarQueryParameter = {};
|
|
285
|
+
// authentication keycloak_auth required
|
|
286
|
+
// http bearer authentication required
|
|
287
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
288
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
289
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
290
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
291
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
292
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
293
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(reorganizationByKindRequest, localVarRequestOptions, configuration);
|
|
294
|
+
return {
|
|
295
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
296
|
+
options: localVarRequestOptions,
|
|
297
|
+
};
|
|
298
|
+
}),
|
|
267
299
|
};
|
|
268
300
|
};
|
|
269
301
|
exports.AIChatApiAxiosParamCreator = AIChatApiAxiosParamCreator;
|
|
@@ -385,6 +417,22 @@ const AIChatApiFp = function (configuration) {
|
|
|
385
417
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
386
418
|
});
|
|
387
419
|
},
|
|
420
|
+
/**
|
|
421
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
422
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
423
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
424
|
+
* @param {*} [options] Override http request option.
|
|
425
|
+
* @throws {RequiredError}
|
|
426
|
+
*/
|
|
427
|
+
proposeByKind(reorganizationByKindRequest, options) {
|
|
428
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
429
|
+
var _a, _b, _c;
|
|
430
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.proposeByKind(reorganizationByKindRequest, options);
|
|
431
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
432
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIChatApi.proposeByKind']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
433
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
434
|
+
});
|
|
435
|
+
},
|
|
388
436
|
};
|
|
389
437
|
};
|
|
390
438
|
exports.AIChatApiFp = AIChatApiFp;
|
|
@@ -464,6 +512,16 @@ const AIChatApiFactory = function (configuration, basePath, axios) {
|
|
|
464
512
|
listConversations(options) {
|
|
465
513
|
return localVarFp.listConversations(options).then((request) => request(axios, basePath));
|
|
466
514
|
},
|
|
515
|
+
/**
|
|
516
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
517
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
518
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
519
|
+
* @param {*} [options] Override http request option.
|
|
520
|
+
* @throws {RequiredError}
|
|
521
|
+
*/
|
|
522
|
+
proposeByKind(reorganizationByKindRequest, options) {
|
|
523
|
+
return localVarFp.proposeByKind(reorganizationByKindRequest, options).then((request) => request(axios, basePath));
|
|
524
|
+
},
|
|
467
525
|
};
|
|
468
526
|
};
|
|
469
527
|
exports.AIChatApiFactory = AIChatApiFactory;
|
|
@@ -541,5 +599,15 @@ class AIChatApi extends base_1.BaseAPI {
|
|
|
541
599
|
listConversations(options) {
|
|
542
600
|
return (0, exports.AIChatApiFp)(this.configuration).listConversations(options).then((request) => request(this.axios, this.basePath));
|
|
543
601
|
}
|
|
602
|
+
/**
|
|
603
|
+
* Every folder of the scope holding documents of several kinds (their insight category) gets one sub-folder per kind, named like the existing folders (Invoices / Factures…), and the files move there. The answer is a stored plan to review and apply; a plan without an id means nothing needs splitting.
|
|
604
|
+
* @summary Propose a reorganisation by kind of document — no model involved
|
|
605
|
+
* @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
|
|
606
|
+
* @param {*} [options] Override http request option.
|
|
607
|
+
* @throws {RequiredError}
|
|
608
|
+
*/
|
|
609
|
+
proposeByKind(reorganizationByKindRequest, options) {
|
|
610
|
+
return (0, exports.AIChatApiFp)(this.configuration).proposeByKind(reorganizationByKindRequest, options).then((request) => request(this.axios, this.basePath));
|
|
611
|
+
}
|
|
544
612
|
}
|
|
545
613
|
exports.AIChatApi = AIChatApi;
|
|
@@ -15,6 +15,7 @@ import { type RequestArgs, BaseAPI } from '../base';
|
|
|
15
15
|
import type { DocumentInsightView } from '../models';
|
|
16
16
|
import type { InsightBackfillRequest } from '../models';
|
|
17
17
|
import type { InsightBackfillStatus } from '../models';
|
|
18
|
+
import type { InsightCategoryUpdate } from '../models';
|
|
18
19
|
/**
|
|
19
20
|
* DocumentInsightsApi - axios parameter creator
|
|
20
21
|
*/
|
|
@@ -43,6 +44,15 @@ export declare const DocumentInsightsApiAxiosParamCreator: (configuration?: Conf
|
|
|
43
44
|
* @throws {RequiredError}
|
|
44
45
|
*/
|
|
45
46
|
getInsights: (documentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
47
|
+
/**
|
|
48
|
+
* 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.
|
|
49
|
+
* @summary Correct the kind of a document
|
|
50
|
+
* @param {string} documentId
|
|
51
|
+
* @param {InsightCategoryUpdate} insightCategoryUpdate
|
|
52
|
+
* @param {*} [options] Override http request option.
|
|
53
|
+
* @throws {RequiredError}
|
|
54
|
+
*/
|
|
55
|
+
setCategory: (documentId: string, insightCategoryUpdate: InsightCategoryUpdate, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
46
56
|
};
|
|
47
57
|
/**
|
|
48
58
|
* DocumentInsightsApi - functional programming interface
|
|
@@ -72,6 +82,15 @@ export declare const DocumentInsightsApiFp: (configuration?: Configuration) => {
|
|
|
72
82
|
* @throws {RequiredError}
|
|
73
83
|
*/
|
|
74
84
|
getInsights(documentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DocumentInsightView>>;
|
|
85
|
+
/**
|
|
86
|
+
* 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.
|
|
87
|
+
* @summary Correct the kind of a document
|
|
88
|
+
* @param {string} documentId
|
|
89
|
+
* @param {InsightCategoryUpdate} insightCategoryUpdate
|
|
90
|
+
* @param {*} [options] Override http request option.
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
*/
|
|
93
|
+
setCategory(documentId: string, insightCategoryUpdate: InsightCategoryUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DocumentInsightView>>;
|
|
75
94
|
};
|
|
76
95
|
/**
|
|
77
96
|
* DocumentInsightsApi - factory interface
|
|
@@ -101,6 +120,15 @@ export declare const DocumentInsightsApiFactory: (configuration?: Configuration,
|
|
|
101
120
|
* @throws {RequiredError}
|
|
102
121
|
*/
|
|
103
122
|
getInsights(documentId: string, options?: RawAxiosRequestConfig): AxiosPromise<DocumentInsightView>;
|
|
123
|
+
/**
|
|
124
|
+
* 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.
|
|
125
|
+
* @summary Correct the kind of a document
|
|
126
|
+
* @param {string} documentId
|
|
127
|
+
* @param {InsightCategoryUpdate} insightCategoryUpdate
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
*/
|
|
131
|
+
setCategory(documentId: string, insightCategoryUpdate: InsightCategoryUpdate, options?: RawAxiosRequestConfig): AxiosPromise<DocumentInsightView>;
|
|
104
132
|
};
|
|
105
133
|
/**
|
|
106
134
|
* DocumentInsightsApi - object-oriented interface
|
|
@@ -130,4 +158,13 @@ export declare class DocumentInsightsApi extends BaseAPI {
|
|
|
130
158
|
* @throws {RequiredError}
|
|
131
159
|
*/
|
|
132
160
|
getInsights(documentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DocumentInsightView, any, {}>>;
|
|
161
|
+
/**
|
|
162
|
+
* 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.
|
|
163
|
+
* @summary Correct the kind of a document
|
|
164
|
+
* @param {string} documentId
|
|
165
|
+
* @param {InsightCategoryUpdate} insightCategoryUpdate
|
|
166
|
+
* @param {*} [options] Override http request option.
|
|
167
|
+
* @throws {RequiredError}
|
|
168
|
+
*/
|
|
169
|
+
setCategory(documentId: string, insightCategoryUpdate: InsightCategoryUpdate, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DocumentInsightView, any, {}>>;
|
|
133
170
|
}
|
|
@@ -132,6 +132,44 @@ const DocumentInsightsApiAxiosParamCreator = function (configuration) {
|
|
|
132
132
|
options: localVarRequestOptions,
|
|
133
133
|
};
|
|
134
134
|
}),
|
|
135
|
+
/**
|
|
136
|
+
* 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.
|
|
137
|
+
* @summary Correct the kind of a document
|
|
138
|
+
* @param {string} documentId
|
|
139
|
+
* @param {InsightCategoryUpdate} insightCategoryUpdate
|
|
140
|
+
* @param {*} [options] Override http request option.
|
|
141
|
+
* @throws {RequiredError}
|
|
142
|
+
*/
|
|
143
|
+
setCategory: (documentId_1, insightCategoryUpdate_1, ...args_1) => __awaiter(this, [documentId_1, insightCategoryUpdate_1, ...args_1], void 0, function* (documentId, insightCategoryUpdate, options = {}) {
|
|
144
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
145
|
+
(0, common_1.assertParamExists)('setCategory', 'documentId', documentId);
|
|
146
|
+
// verify required parameter 'insightCategoryUpdate' is not null or undefined
|
|
147
|
+
(0, common_1.assertParamExists)('setCategory', 'insightCategoryUpdate', insightCategoryUpdate);
|
|
148
|
+
const localVarPath = `/api/v1/documents/{documentId}/insights`
|
|
149
|
+
.replace('{documentId}', encodeURIComponent(String(documentId)));
|
|
150
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
151
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
152
|
+
let baseOptions;
|
|
153
|
+
if (configuration) {
|
|
154
|
+
baseOptions = configuration.baseOptions;
|
|
155
|
+
}
|
|
156
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
157
|
+
const localVarHeaderParameter = {};
|
|
158
|
+
const localVarQueryParameter = {};
|
|
159
|
+
// authentication keycloak_auth required
|
|
160
|
+
// http bearer authentication required
|
|
161
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
162
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
163
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
164
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
165
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
166
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
167
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(insightCategoryUpdate, localVarRequestOptions, configuration);
|
|
168
|
+
return {
|
|
169
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
170
|
+
options: localVarRequestOptions,
|
|
171
|
+
};
|
|
172
|
+
}),
|
|
135
173
|
};
|
|
136
174
|
};
|
|
137
175
|
exports.DocumentInsightsApiAxiosParamCreator = DocumentInsightsApiAxiosParamCreator;
|
|
@@ -189,6 +227,23 @@ const DocumentInsightsApiFp = function (configuration) {
|
|
|
189
227
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
190
228
|
});
|
|
191
229
|
},
|
|
230
|
+
/**
|
|
231
|
+
* 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.
|
|
232
|
+
* @summary Correct the kind of a document
|
|
233
|
+
* @param {string} documentId
|
|
234
|
+
* @param {InsightCategoryUpdate} insightCategoryUpdate
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
*/
|
|
238
|
+
setCategory(documentId, insightCategoryUpdate, options) {
|
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
var _a, _b, _c;
|
|
241
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.setCategory(documentId, insightCategoryUpdate, options);
|
|
242
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
243
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DocumentInsightsApi.setCategory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
244
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
245
|
+
});
|
|
246
|
+
},
|
|
192
247
|
};
|
|
193
248
|
};
|
|
194
249
|
exports.DocumentInsightsApiFp = DocumentInsightsApiFp;
|
|
@@ -228,6 +283,17 @@ const DocumentInsightsApiFactory = function (configuration, basePath, axios) {
|
|
|
228
283
|
getInsights(documentId, options) {
|
|
229
284
|
return localVarFp.getInsights(documentId, options).then((request) => request(axios, basePath));
|
|
230
285
|
},
|
|
286
|
+
/**
|
|
287
|
+
* 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.
|
|
288
|
+
* @summary Correct the kind of a document
|
|
289
|
+
* @param {string} documentId
|
|
290
|
+
* @param {InsightCategoryUpdate} insightCategoryUpdate
|
|
291
|
+
* @param {*} [options] Override http request option.
|
|
292
|
+
* @throws {RequiredError}
|
|
293
|
+
*/
|
|
294
|
+
setCategory(documentId, insightCategoryUpdate, options) {
|
|
295
|
+
return localVarFp.setCategory(documentId, insightCategoryUpdate, options).then((request) => request(axios, basePath));
|
|
296
|
+
},
|
|
231
297
|
};
|
|
232
298
|
};
|
|
233
299
|
exports.DocumentInsightsApiFactory = DocumentInsightsApiFactory;
|
|
@@ -265,5 +331,16 @@ class DocumentInsightsApi extends base_1.BaseAPI {
|
|
|
265
331
|
getInsights(documentId, options) {
|
|
266
332
|
return (0, exports.DocumentInsightsApiFp)(this.configuration).getInsights(documentId, options).then((request) => request(this.axios, this.basePath));
|
|
267
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* 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.
|
|
336
|
+
* @summary Correct the kind of a document
|
|
337
|
+
* @param {string} documentId
|
|
338
|
+
* @param {InsightCategoryUpdate} insightCategoryUpdate
|
|
339
|
+
* @param {*} [options] Override http request option.
|
|
340
|
+
* @throws {RequiredError}
|
|
341
|
+
*/
|
|
342
|
+
setCategory(documentId, insightCategoryUpdate, options) {
|
|
343
|
+
return (0, exports.DocumentInsightsApiFp)(this.configuration).setCategory(documentId, insightCategoryUpdate, options).then((request) => request(this.axios, this.basePath));
|
|
344
|
+
}
|
|
268
345
|
}
|
|
269
346
|
exports.DocumentInsightsApi = DocumentInsightsApi;
|