@openfilz-sdk/typescript-ee 1.9.7 → 1.9.9

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 (60) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
  3. package/README.md +10 -2
  4. package/api/aichat-api.ts +73 -0
  5. package/api/aiembeddings-api.ts +201 -0
  6. package/api/document-insights-api.ts +82 -0
  7. package/api.ts +1 -0
  8. package/dist/api/aichat-api.d.ts +33 -0
  9. package/dist/api/aichat-api.js +68 -0
  10. package/dist/api/aiembeddings-api.d.ts +100 -0
  11. package/dist/api/aiembeddings-api.js +200 -0
  12. package/dist/api/document-insights-api.d.ts +37 -0
  13. package/dist/api/document-insights-api.js +77 -0
  14. package/dist/api.d.ts +1 -0
  15. package/dist/api.js +1 -0
  16. package/dist/esm/api/aichat-api.d.ts +33 -0
  17. package/dist/esm/api/aichat-api.js +68 -0
  18. package/dist/esm/api/aiembeddings-api.d.ts +100 -0
  19. package/dist/esm/api/aiembeddings-api.js +193 -0
  20. package/dist/esm/api/document-insights-api.d.ts +37 -0
  21. package/dist/esm/api/document-insights-api.js +77 -0
  22. package/dist/esm/api.d.ts +1 -0
  23. package/dist/esm/api.js +1 -0
  24. package/dist/esm/models/embedding-backfill-request.d.ts +15 -0
  25. package/dist/esm/models/embedding-backfill-request.js +14 -0
  26. package/dist/esm/models/embedding-backfill-status.d.ts +23 -0
  27. package/dist/esm/models/embedding-backfill-status.js +14 -0
  28. package/dist/esm/models/index.d.ts +4 -0
  29. package/dist/esm/models/index.js +4 -0
  30. package/dist/esm/models/insight-category-update.d.ts +14 -0
  31. package/dist/esm/models/insight-category-update.js +14 -0
  32. package/dist/esm/models/reorganization-by-kind-request.d.ts +14 -0
  33. package/dist/esm/models/reorganization-by-kind-request.js +14 -0
  34. package/dist/esm/models/settings.d.ts +1 -0
  35. package/dist/models/embedding-backfill-request.d.ts +15 -0
  36. package/dist/models/embedding-backfill-request.js +15 -0
  37. package/dist/models/embedding-backfill-status.d.ts +23 -0
  38. package/dist/models/embedding-backfill-status.js +15 -0
  39. package/dist/models/index.d.ts +4 -0
  40. package/dist/models/index.js +4 -0
  41. package/dist/models/insight-category-update.d.ts +14 -0
  42. package/dist/models/insight-category-update.js +15 -0
  43. package/dist/models/reorganization-by-kind-request.d.ts +14 -0
  44. package/dist/models/reorganization-by-kind-request.js +15 -0
  45. package/dist/models/settings.d.ts +1 -0
  46. package/docs/AIChatApi.md +53 -0
  47. package/docs/AIEmbeddingsApi.md +111 -0
  48. package/docs/DocumentInsightsApi.md +56 -0
  49. package/docs/EmbeddingBackfillRequest.md +22 -0
  50. package/docs/EmbeddingBackfillStatus.md +38 -0
  51. package/docs/InsightCategoryUpdate.md +20 -0
  52. package/docs/ReorganizationByKindRequest.md +20 -0
  53. package/docs/Settings.md +2 -0
  54. package/models/embedding-backfill-request.ts +21 -0
  55. package/models/embedding-backfill-status.ts +29 -0
  56. package/models/index.ts +4 -0
  57. package/models/insight-category-update.ts +20 -0
  58. package/models/reorganization-by-kind-request.ts +20 -0
  59. package/models/settings.ts +1 -0
  60. package/package.json +1 -1
@@ -4,6 +4,7 @@
4
4
  README.md
5
5
  api.ts
6
6
  api/aichat-api.ts
7
+ api/aiembeddings-api.ts
7
8
  api/aisettings-api.ts
8
9
  api/collaboration-audit-controller-api.ts
9
10
  api/collaboration-controller-api.ts
@@ -40,6 +41,7 @@ base.ts
40
41
  common.ts
41
42
  configuration.ts
42
43
  docs/AIChatApi.md
44
+ docs/AIEmbeddingsApi.md
43
45
  docs/AISettingsApi.md
44
46
  docs/AiChatConversation.md
45
47
  docs/AiChatRequest.md
@@ -102,6 +104,8 @@ docs/ESignPublicApi.md
102
104
  docs/ESignTemplatesApi.md
103
105
  docs/ElementInfo.md
104
106
  docs/EmbedUrlResponse.md
107
+ docs/EmbeddingBackfillRequest.md
108
+ docs/EmbeddingBackfillStatus.md
105
109
  docs/EnrichedAuditLog.md
106
110
  docs/EnrichedAuditLogDetails.md
107
111
  docs/FavoritesApi.md
@@ -117,6 +121,7 @@ docs/FolderResponse.md
117
121
  docs/IngestionStatusDto.md
118
122
  docs/InsightBackfillRequest.md
119
123
  docs/InsightBackfillStatus.md
124
+ docs/InsightCategoryUpdate.md
120
125
  docs/InstantiateTemplateRequest.md
121
126
  docs/Item.md
122
127
  docs/ItemResult.md
@@ -149,6 +154,7 @@ docs/RenameAudit.md
149
154
  docs/RenameRequest.md
150
155
  docs/ReorganizationApplyRequest.md
151
156
  docs/ReorganizationApplyResult.md
157
+ docs/ReorganizationByKindRequest.md
152
158
  docs/ReorganizationPlanView.md
153
159
  docs/ReplaceAudit.md
154
160
  docs/Response.md
@@ -262,6 +268,8 @@ models/document-position.ts
262
268
  models/document-version-info.ts
263
269
  models/element-info.ts
264
270
  models/embed-url-response.ts
271
+ models/embedding-backfill-request.ts
272
+ models/embedding-backfill-status.ts
265
273
  models/enriched-audit-log-details.ts
266
274
  models/enriched-audit-log.ts
267
275
  models/feature-entitlement.ts
@@ -274,6 +282,7 @@ models/index.ts
274
282
  models/ingestion-status-dto.ts
275
283
  models/insight-backfill-request.ts
276
284
  models/insight-backfill-status.ts
285
+ models/insight-category-update.ts
277
286
  models/instantiate-template-request.ts
278
287
  models/item-result.ts
279
288
  models/item.ts
@@ -302,6 +311,7 @@ models/rename-audit.ts
302
311
  models/rename-request.ts
303
312
  models/reorganization-apply-request.ts
304
313
  models/reorganization-apply-result.ts
314
+ models/reorganization-by-kind-request.ts
305
315
  models/reorganization-plan-view.ts
306
316
  models/replace-audit.ts
307
317
  models/response.ts
@@ -1 +1 @@
1
- ae1ec3aaf97f1fdfd8b0b5700b9c87eabe9527c1c2aecfd12fa72d2c2c9586c7
1
+ b3121981b96de40beec62c83a14b52b401783a54fac29aa7877dcd3b90549102
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @openfilz-sdk/typescript-ee@1.9.7
1
+ ## @openfilz-sdk/typescript-ee@1.9.9
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @openfilz-sdk/typescript-ee@1.9.7 --save
39
+ npm install @openfilz-sdk/typescript-ee@1.9.9 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -58,6 +58,9 @@ Class | Method | HTTP request | Description
58
58
  *AIChatApi* | [**get4**](docs/AIChatApi.md#get4) | **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
62
+ *AIEmbeddingsApi* | [**backfill1**](docs/AIEmbeddingsApi.md#backfill1) | **POST** /api/v1/ai/embeddings/backfill | Embed existing documents
63
+ *AIEmbeddingsApi* | [**backfillStatus1**](docs/AIEmbeddingsApi.md#backfillstatus1) | **GET** /api/v1/ai/embeddings/backfill/{jobId} | Progress of an embedding backfill job
61
64
  *AISettingsApi* | [**deleteSettings**](docs/AISettingsApi.md#deletesettings) | **DELETE** /api/v1/settings/ai | Reset my AI settings
62
65
  *AISettingsApi* | [**getSettings1**](docs/AISettingsApi.md#getsettings1) | **GET** /api/v1/settings/ai | Get my AI settings
63
66
  *AISettingsApi* | [**listModels**](docs/AISettingsApi.md#listmodels) | **POST** /api/v1/settings/ai/models | List the provider\'s chat models
@@ -113,6 +116,7 @@ Class | Method | HTTP request | Description
113
116
  *DocumentInsightsApi* | [**backfill**](docs/DocumentInsightsApi.md#backfill) | **POST** /api/v1/ai/insights/backfill | Enrich existing documents
114
117
  *DocumentInsightsApi* | [**backfillStatus**](docs/DocumentInsightsApi.md#backfillstatus) | **GET** /api/v1/ai/insights/backfill/{jobId} | Progress of a backfill job
115
118
  *DocumentInsightsApi* | [**getInsights**](docs/DocumentInsightsApi.md#getinsights) | **GET** /api/v1/documents/{documentId}/insights | Get the insights of a document
119
+ *DocumentInsightsApi* | [**setCategory**](docs/DocumentInsightsApi.md#setcategory) | **PATCH** /api/v1/documents/{documentId}/insights | Correct the kind of a document
116
120
  *DocumentSuggestionControllerApi* | [**getSuggestions**](docs/DocumentSuggestionControllerApi.md#getsuggestions) | **GET** /api/v1/suggestions |
117
121
  *DocumentVersionControllerApi* | [**downloadVersion**](docs/DocumentVersionControllerApi.md#downloadversion) | **GET** /api/v1/documents/{documentId}/versions/{versionId}/download | Download a specific document version
118
122
  *DocumentVersionControllerApi* | [**listVersions**](docs/DocumentVersionControllerApi.md#listversions) | **GET** /api/v1/documents/{documentId}/versions | List document versions
@@ -266,6 +270,8 @@ Class | Method | HTTP request | Description
266
270
  - [DocumentVersionInfo](docs/DocumentVersionInfo.md)
267
271
  - [ElementInfo](docs/ElementInfo.md)
268
272
  - [EmbedUrlResponse](docs/EmbedUrlResponse.md)
273
+ - [EmbeddingBackfillRequest](docs/EmbeddingBackfillRequest.md)
274
+ - [EmbeddingBackfillStatus](docs/EmbeddingBackfillStatus.md)
269
275
  - [EnrichedAuditLog](docs/EnrichedAuditLog.md)
270
276
  - [EnrichedAuditLogDetails](docs/EnrichedAuditLogDetails.md)
271
277
  - [FeatureEntitlement](docs/FeatureEntitlement.md)
@@ -277,6 +283,7 @@ Class | Method | HTTP request | Description
277
283
  - [IngestionStatusDto](docs/IngestionStatusDto.md)
278
284
  - [InsightBackfillRequest](docs/InsightBackfillRequest.md)
279
285
  - [InsightBackfillStatus](docs/InsightBackfillStatus.md)
286
+ - [InsightCategoryUpdate](docs/InsightCategoryUpdate.md)
280
287
  - [InstantiateTemplateRequest](docs/InstantiateTemplateRequest.md)
281
288
  - [Item](docs/Item.md)
282
289
  - [ItemResult](docs/ItemResult.md)
@@ -305,6 +312,7 @@ Class | Method | HTTP request | Description
305
312
  - [RenameRequest](docs/RenameRequest.md)
306
313
  - [ReorganizationApplyRequest](docs/ReorganizationApplyRequest.md)
307
314
  - [ReorganizationApplyResult](docs/ReorganizationApplyResult.md)
315
+ - [ReorganizationByKindRequest](docs/ReorganizationByKindRequest.md)
308
316
  - [ReorganizationPlanView](docs/ReorganizationPlanView.md)
309
317
  - [ReplaceAudit](docs/ReplaceAudit.md)
310
318
  - [Response](docs/Response.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
 
@@ -0,0 +1,201 @@
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 { EmbeddingBackfillRequest } from '../models';
26
+ // @ts-ignore
27
+ import type { EmbeddingBackfillStatus } from '../models';
28
+ /**
29
+ * AIEmbeddingsApi - axios parameter creator
30
+ */
31
+ export const AIEmbeddingsApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ * Queues every FILE without a chunk in the vector store (or every FILE when force), optionally under one folder, and returns the job at once. Poll GET /backfill/{jobId}. Run it after wiping the vector store for an embedding-provider switch.
35
+ * @summary Embed existing documents
36
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ backfill1: async (embeddingBackfillRequest?: EmbeddingBackfillRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
41
+ const localVarPath = `/api/v1/ai/embeddings/backfill`;
42
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
43
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
44
+ let baseOptions;
45
+ if (configuration) {
46
+ baseOptions = configuration.baseOptions;
47
+ }
48
+
49
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
50
+ const localVarHeaderParameter = {} as any;
51
+ const localVarQueryParameter = {} as any;
52
+
53
+ // authentication keycloak_auth required
54
+ // http bearer authentication required
55
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
56
+
57
+ localVarHeaderParameter['Content-Type'] = 'application/json';
58
+ localVarHeaderParameter['Accept'] = 'application/json';
59
+
60
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
61
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
62
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
63
+ localVarRequestOptions.data = serializeDataIfNeeded(embeddingBackfillRequest, localVarRequestOptions, configuration)
64
+
65
+ return {
66
+ url: toPathString(localVarUrlObj),
67
+ options: localVarRequestOptions,
68
+ };
69
+ },
70
+ /**
71
+ *
72
+ * @summary Progress of an embedding backfill job
73
+ * @param {string} jobId
74
+ * @param {*} [options] Override http request option.
75
+ * @throws {RequiredError}
76
+ */
77
+ backfillStatus1: async (jobId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
78
+ // verify required parameter 'jobId' is not null or undefined
79
+ assertParamExists('backfillStatus1', 'jobId', jobId)
80
+ const localVarPath = `/api/v1/ai/embeddings/backfill/{jobId}`
81
+ .replace('{jobId}', encodeURIComponent(String(jobId)));
82
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
83
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
84
+ let baseOptions;
85
+ if (configuration) {
86
+ baseOptions = configuration.baseOptions;
87
+ }
88
+
89
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
90
+ const localVarHeaderParameter = {} as any;
91
+ const localVarQueryParameter = {} as any;
92
+
93
+ // authentication keycloak_auth required
94
+ // http bearer authentication required
95
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
96
+
97
+ localVarHeaderParameter['Accept'] = 'application/json';
98
+
99
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
100
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
101
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
102
+
103
+ return {
104
+ url: toPathString(localVarUrlObj),
105
+ options: localVarRequestOptions,
106
+ };
107
+ },
108
+ }
109
+ };
110
+
111
+ /**
112
+ * AIEmbeddingsApi - functional programming interface
113
+ */
114
+ export const AIEmbeddingsApiFp = function(configuration?: Configuration) {
115
+ const localVarAxiosParamCreator = AIEmbeddingsApiAxiosParamCreator(configuration)
116
+ return {
117
+ /**
118
+ * Queues every FILE without a chunk in the vector store (or every FILE when force), optionally under one folder, and returns the job at once. Poll GET /backfill/{jobId}. Run it after wiping the vector store for an embedding-provider switch.
119
+ * @summary Embed existing documents
120
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
121
+ * @param {*} [options] Override http request option.
122
+ * @throws {RequiredError}
123
+ */
124
+ async backfill1(embeddingBackfillRequest?: EmbeddingBackfillRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmbeddingBackfillStatus>> {
125
+ const localVarAxiosArgs = await localVarAxiosParamCreator.backfill1(embeddingBackfillRequest, options);
126
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
127
+ const localVarOperationServerBasePath = operationServerMap['AIEmbeddingsApi.backfill1']?.[localVarOperationServerIndex]?.url;
128
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
129
+ },
130
+ /**
131
+ *
132
+ * @summary Progress of an embedding backfill job
133
+ * @param {string} jobId
134
+ * @param {*} [options] Override http request option.
135
+ * @throws {RequiredError}
136
+ */
137
+ async backfillStatus1(jobId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmbeddingBackfillStatus>> {
138
+ const localVarAxiosArgs = await localVarAxiosParamCreator.backfillStatus1(jobId, options);
139
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
140
+ const localVarOperationServerBasePath = operationServerMap['AIEmbeddingsApi.backfillStatus1']?.[localVarOperationServerIndex]?.url;
141
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
142
+ },
143
+ }
144
+ };
145
+
146
+ /**
147
+ * AIEmbeddingsApi - factory interface
148
+ */
149
+ export const AIEmbeddingsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
150
+ const localVarFp = AIEmbeddingsApiFp(configuration)
151
+ return {
152
+ /**
153
+ * Queues every FILE without a chunk in the vector store (or every FILE when force), optionally under one folder, and returns the job at once. Poll GET /backfill/{jobId}. Run it after wiping the vector store for an embedding-provider switch.
154
+ * @summary Embed existing documents
155
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
156
+ * @param {*} [options] Override http request option.
157
+ * @throws {RequiredError}
158
+ */
159
+ backfill1(embeddingBackfillRequest?: EmbeddingBackfillRequest, options?: RawAxiosRequestConfig): AxiosPromise<EmbeddingBackfillStatus> {
160
+ return localVarFp.backfill1(embeddingBackfillRequest, options).then((request) => request(axios, basePath));
161
+ },
162
+ /**
163
+ *
164
+ * @summary Progress of an embedding backfill job
165
+ * @param {string} jobId
166
+ * @param {*} [options] Override http request option.
167
+ * @throws {RequiredError}
168
+ */
169
+ backfillStatus1(jobId: string, options?: RawAxiosRequestConfig): AxiosPromise<EmbeddingBackfillStatus> {
170
+ return localVarFp.backfillStatus1(jobId, options).then((request) => request(axios, basePath));
171
+ },
172
+ };
173
+ };
174
+
175
+ /**
176
+ * AIEmbeddingsApi - object-oriented interface
177
+ */
178
+ export class AIEmbeddingsApi extends BaseAPI {
179
+ /**
180
+ * Queues every FILE without a chunk in the vector store (or every FILE when force), optionally under one folder, and returns the job at once. Poll GET /backfill/{jobId}. Run it after wiping the vector store for an embedding-provider switch.
181
+ * @summary Embed existing documents
182
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
183
+ * @param {*} [options] Override http request option.
184
+ * @throws {RequiredError}
185
+ */
186
+ public backfill1(embeddingBackfillRequest?: EmbeddingBackfillRequest, options?: RawAxiosRequestConfig) {
187
+ return AIEmbeddingsApiFp(this.configuration).backfill1(embeddingBackfillRequest, options).then((request) => request(this.axios, this.basePath));
188
+ }
189
+
190
+ /**
191
+ *
192
+ * @summary Progress of an embedding backfill job
193
+ * @param {string} jobId
194
+ * @param {*} [options] Override http request option.
195
+ * @throws {RequiredError}
196
+ */
197
+ public backfillStatus1(jobId: string, options?: RawAxiosRequestConfig) {
198
+ return AIEmbeddingsApiFp(this.configuration).backfillStatus1(jobId, options).then((request) => request(this.axios, this.basePath));
199
+ }
200
+ }
201
+
@@ -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/api.ts CHANGED
@@ -15,6 +15,7 @@
15
15
 
16
16
 
17
17
  export * from './api/aichat-api';
18
+ export * from './api/aiembeddings-api';
18
19
  export * from './api/aisettings-api';
19
20
  export * from './api/collaboration-audit-controller-api';
20
21
  export * from './api/collaboration-controller-api';
@@ -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, {}, 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, {}, any>>;
264
297
  }