@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
@@ -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;
@@ -0,0 +1,100 @@
1
+ /**
2
+ * openfilz-api
3
+ * API for Document Management System
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import { type RequestArgs, BaseAPI } from '../base';
15
+ import type { EmbeddingBackfillRequest } from '../models';
16
+ import type { EmbeddingBackfillStatus } from '../models';
17
+ /**
18
+ * AIEmbeddingsApi - axios parameter creator
19
+ */
20
+ export declare const AIEmbeddingsApiAxiosParamCreator: (configuration?: Configuration) => {
21
+ /**
22
+ * 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.
23
+ * @summary Embed existing documents
24
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
25
+ * @param {*} [options] Override http request option.
26
+ * @throws {RequiredError}
27
+ */
28
+ backfill1: (embeddingBackfillRequest?: EmbeddingBackfillRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
29
+ /**
30
+ *
31
+ * @summary Progress of an embedding backfill job
32
+ * @param {string} jobId
33
+ * @param {*} [options] Override http request option.
34
+ * @throws {RequiredError}
35
+ */
36
+ backfillStatus1: (jobId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
37
+ };
38
+ /**
39
+ * AIEmbeddingsApi - functional programming interface
40
+ */
41
+ export declare const AIEmbeddingsApiFp: (configuration?: Configuration) => {
42
+ /**
43
+ * 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.
44
+ * @summary Embed existing documents
45
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ */
49
+ backfill1(embeddingBackfillRequest?: EmbeddingBackfillRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmbeddingBackfillStatus>>;
50
+ /**
51
+ *
52
+ * @summary Progress of an embedding backfill job
53
+ * @param {string} jobId
54
+ * @param {*} [options] Override http request option.
55
+ * @throws {RequiredError}
56
+ */
57
+ backfillStatus1(jobId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmbeddingBackfillStatus>>;
58
+ };
59
+ /**
60
+ * AIEmbeddingsApi - factory interface
61
+ */
62
+ export declare const AIEmbeddingsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
63
+ /**
64
+ * 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.
65
+ * @summary Embed existing documents
66
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
67
+ * @param {*} [options] Override http request option.
68
+ * @throws {RequiredError}
69
+ */
70
+ backfill1(embeddingBackfillRequest?: EmbeddingBackfillRequest, options?: RawAxiosRequestConfig): AxiosPromise<EmbeddingBackfillStatus>;
71
+ /**
72
+ *
73
+ * @summary Progress of an embedding backfill job
74
+ * @param {string} jobId
75
+ * @param {*} [options] Override http request option.
76
+ * @throws {RequiredError}
77
+ */
78
+ backfillStatus1(jobId: string, options?: RawAxiosRequestConfig): AxiosPromise<EmbeddingBackfillStatus>;
79
+ };
80
+ /**
81
+ * AIEmbeddingsApi - object-oriented interface
82
+ */
83
+ export declare class AIEmbeddingsApi extends BaseAPI {
84
+ /**
85
+ * 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.
86
+ * @summary Embed existing documents
87
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
88
+ * @param {*} [options] Override http request option.
89
+ * @throws {RequiredError}
90
+ */
91
+ backfill1(embeddingBackfillRequest?: EmbeddingBackfillRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EmbeddingBackfillStatus, any, {}, any>>;
92
+ /**
93
+ *
94
+ * @summary Progress of an embedding backfill job
95
+ * @param {string} jobId
96
+ * @param {*} [options] Override http request option.
97
+ * @throws {RequiredError}
98
+ */
99
+ backfillStatus1(jobId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EmbeddingBackfillStatus, any, {}, any>>;
100
+ }
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * openfilz-api
6
+ * API for Document Management System
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.AIEmbeddingsApi = exports.AIEmbeddingsApiFactory = exports.AIEmbeddingsApiFp = exports.AIEmbeddingsApiAxiosParamCreator = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("../common");
30
+ // @ts-ignore
31
+ const base_1 = require("../base");
32
+ /**
33
+ * AIEmbeddingsApi - axios parameter creator
34
+ */
35
+ const AIEmbeddingsApiAxiosParamCreator = function (configuration) {
36
+ return {
37
+ /**
38
+ * 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.
39
+ * @summary Embed existing documents
40
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ backfill1: (embeddingBackfillRequest_1, ...args_1) => __awaiter(this, [embeddingBackfillRequest_1, ...args_1], void 0, function* (embeddingBackfillRequest, options = {}) {
45
+ const localVarPath = `/api/v1/ai/embeddings/backfill`;
46
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
47
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
48
+ let baseOptions;
49
+ if (configuration) {
50
+ baseOptions = configuration.baseOptions;
51
+ }
52
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
53
+ const localVarHeaderParameter = {};
54
+ const localVarQueryParameter = {};
55
+ // authentication keycloak_auth required
56
+ // http bearer authentication required
57
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
58
+ localVarHeaderParameter['Content-Type'] = 'application/json';
59
+ localVarHeaderParameter['Accept'] = 'application/json';
60
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
61
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
62
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
63
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(embeddingBackfillRequest, localVarRequestOptions, configuration);
64
+ return {
65
+ url: (0, common_1.toPathString)(localVarUrlObj),
66
+ options: localVarRequestOptions,
67
+ };
68
+ }),
69
+ /**
70
+ *
71
+ * @summary Progress of an embedding backfill job
72
+ * @param {string} jobId
73
+ * @param {*} [options] Override http request option.
74
+ * @throws {RequiredError}
75
+ */
76
+ backfillStatus1: (jobId_1, ...args_1) => __awaiter(this, [jobId_1, ...args_1], void 0, function* (jobId, options = {}) {
77
+ // verify required parameter 'jobId' is not null or undefined
78
+ (0, common_1.assertParamExists)('backfillStatus1', 'jobId', jobId);
79
+ const localVarPath = `/api/v1/ai/embeddings/backfill/{jobId}`
80
+ .replace('{jobId}', encodeURIComponent(String(jobId)));
81
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
82
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
83
+ let baseOptions;
84
+ if (configuration) {
85
+ baseOptions = configuration.baseOptions;
86
+ }
87
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
88
+ const localVarHeaderParameter = {};
89
+ const localVarQueryParameter = {};
90
+ // authentication keycloak_auth required
91
+ // http bearer authentication required
92
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
93
+ localVarHeaderParameter['Accept'] = 'application/json';
94
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
95
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
96
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
97
+ return {
98
+ url: (0, common_1.toPathString)(localVarUrlObj),
99
+ options: localVarRequestOptions,
100
+ };
101
+ }),
102
+ };
103
+ };
104
+ exports.AIEmbeddingsApiAxiosParamCreator = AIEmbeddingsApiAxiosParamCreator;
105
+ /**
106
+ * AIEmbeddingsApi - functional programming interface
107
+ */
108
+ const AIEmbeddingsApiFp = function (configuration) {
109
+ const localVarAxiosParamCreator = (0, exports.AIEmbeddingsApiAxiosParamCreator)(configuration);
110
+ return {
111
+ /**
112
+ * 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.
113
+ * @summary Embed existing documents
114
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
115
+ * @param {*} [options] Override http request option.
116
+ * @throws {RequiredError}
117
+ */
118
+ backfill1(embeddingBackfillRequest, options) {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ var _a, _b, _c;
121
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.backfill1(embeddingBackfillRequest, options);
122
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
123
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIEmbeddingsApi.backfill1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
124
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
125
+ });
126
+ },
127
+ /**
128
+ *
129
+ * @summary Progress of an embedding backfill job
130
+ * @param {string} jobId
131
+ * @param {*} [options] Override http request option.
132
+ * @throws {RequiredError}
133
+ */
134
+ backfillStatus1(jobId, options) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ var _a, _b, _c;
137
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.backfillStatus1(jobId, options);
138
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
139
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AIEmbeddingsApi.backfillStatus1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
140
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
141
+ });
142
+ },
143
+ };
144
+ };
145
+ exports.AIEmbeddingsApiFp = AIEmbeddingsApiFp;
146
+ /**
147
+ * AIEmbeddingsApi - factory interface
148
+ */
149
+ const AIEmbeddingsApiFactory = function (configuration, basePath, axios) {
150
+ const localVarFp = (0, exports.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, options) {
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, options) {
170
+ return localVarFp.backfillStatus1(jobId, options).then((request) => request(axios, basePath));
171
+ },
172
+ };
173
+ };
174
+ exports.AIEmbeddingsApiFactory = AIEmbeddingsApiFactory;
175
+ /**
176
+ * AIEmbeddingsApi - object-oriented interface
177
+ */
178
+ class AIEmbeddingsApi extends base_1.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
+ backfill1(embeddingBackfillRequest, options) {
187
+ return (0, exports.AIEmbeddingsApiFp)(this.configuration).backfill1(embeddingBackfillRequest, options).then((request) => request(this.axios, this.basePath));
188
+ }
189
+ /**
190
+ *
191
+ * @summary Progress of an embedding backfill job
192
+ * @param {string} jobId
193
+ * @param {*} [options] Override http request option.
194
+ * @throws {RequiredError}
195
+ */
196
+ backfillStatus1(jobId, options) {
197
+ return (0, exports.AIEmbeddingsApiFp)(this.configuration).backfillStatus1(jobId, options).then((request) => request(this.axios, this.basePath));
198
+ }
199
+ }
200
+ exports.AIEmbeddingsApi = AIEmbeddingsApi;
@@ -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, {}, 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, {}, 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;
package/dist/api.d.ts CHANGED
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  export * from './api/aichat-api';
13
+ export * from './api/aiembeddings-api';
13
14
  export * from './api/aisettings-api';
14
15
  export * from './api/collaboration-audit-controller-api';
15
16
  export * from './api/collaboration-controller-api';
package/dist/api.js CHANGED
@@ -28,6 +28,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  __exportStar(require("./api/aichat-api"), exports);
31
+ __exportStar(require("./api/aiembeddings-api"), exports);
31
32
  __exportStar(require("./api/aisettings-api"), exports);
32
33
  __exportStar(require("./api/collaboration-audit-controller-api"), exports);
33
34
  __exportStar(require("./api/collaboration-controller-api"), exports);
@@ -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
  }