@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
@@ -261,6 +261,38 @@ export const AIChatApiAxiosParamCreator = function (configuration) {
261
261
  options: localVarRequestOptions,
262
262
  };
263
263
  }),
264
+ /**
265
+ * 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.
266
+ * @summary Propose a reorganisation by kind of document — no model involved
267
+ * @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
268
+ * @param {*} [options] Override http request option.
269
+ * @throws {RequiredError}
270
+ */
271
+ proposeByKind: (reorganizationByKindRequest_1, ...args_1) => __awaiter(this, [reorganizationByKindRequest_1, ...args_1], void 0, function* (reorganizationByKindRequest, options = {}) {
272
+ const localVarPath = `/api/v1/ai/reorganization/by-kind`;
273
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
274
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
275
+ let baseOptions;
276
+ if (configuration) {
277
+ baseOptions = configuration.baseOptions;
278
+ }
279
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
280
+ const localVarHeaderParameter = {};
281
+ const localVarQueryParameter = {};
282
+ // authentication keycloak_auth required
283
+ // http bearer authentication required
284
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
285
+ localVarHeaderParameter['Content-Type'] = 'application/json';
286
+ localVarHeaderParameter['Accept'] = 'application/json';
287
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
288
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
289
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
290
+ localVarRequestOptions.data = serializeDataIfNeeded(reorganizationByKindRequest, localVarRequestOptions, configuration);
291
+ return {
292
+ url: toPathString(localVarUrlObj),
293
+ options: localVarRequestOptions,
294
+ };
295
+ }),
264
296
  };
265
297
  };
266
298
  /**
@@ -381,6 +413,22 @@ export const AIChatApiFp = function (configuration) {
381
413
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
382
414
  });
383
415
  },
416
+ /**
417
+ * 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.
418
+ * @summary Propose a reorganisation by kind of document — no model involved
419
+ * @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
420
+ * @param {*} [options] Override http request option.
421
+ * @throws {RequiredError}
422
+ */
423
+ proposeByKind(reorganizationByKindRequest, options) {
424
+ return __awaiter(this, void 0, void 0, function* () {
425
+ var _a, _b, _c;
426
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.proposeByKind(reorganizationByKindRequest, options);
427
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
428
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIChatApi.proposeByKind']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
429
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
430
+ });
431
+ },
384
432
  };
385
433
  };
386
434
  /**
@@ -459,6 +507,16 @@ export const AIChatApiFactory = function (configuration, basePath, axios) {
459
507
  listConversations(options) {
460
508
  return localVarFp.listConversations(options).then((request) => request(axios, basePath));
461
509
  },
510
+ /**
511
+ * 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.
512
+ * @summary Propose a reorganisation by kind of document — no model involved
513
+ * @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
514
+ * @param {*} [options] Override http request option.
515
+ * @throws {RequiredError}
516
+ */
517
+ proposeByKind(reorganizationByKindRequest, options) {
518
+ return localVarFp.proposeByKind(reorganizationByKindRequest, options).then((request) => request(axios, basePath));
519
+ },
462
520
  };
463
521
  };
464
522
  /**
@@ -535,4 +593,14 @@ export class AIChatApi extends BaseAPI {
535
593
  listConversations(options) {
536
594
  return AIChatApiFp(this.configuration).listConversations(options).then((request) => request(this.axios, this.basePath));
537
595
  }
596
+ /**
597
+ * 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.
598
+ * @summary Propose a reorganisation by kind of document — no model involved
599
+ * @param {ReorganizationByKindRequest} [reorganizationByKindRequest]
600
+ * @param {*} [options] Override http request option.
601
+ * @throws {RequiredError}
602
+ */
603
+ proposeByKind(reorganizationByKindRequest, options) {
604
+ return AIChatApiFp(this.configuration).proposeByKind(reorganizationByKindRequest, options).then((request) => request(this.axios, this.basePath));
605
+ }
538
606
  }
@@ -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,193 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * AIEmbeddingsApi - axios parameter creator
31
+ */
32
+ export const AIEmbeddingsApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * 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.
36
+ * @summary Embed existing documents
37
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ backfill1: (embeddingBackfillRequest_1, ...args_1) => __awaiter(this, [embeddingBackfillRequest_1, ...args_1], void 0, function* (embeddingBackfillRequest, options = {}) {
42
+ const localVarPath = `/api/v1/ai/embeddings/backfill`;
43
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
44
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
45
+ let baseOptions;
46
+ if (configuration) {
47
+ baseOptions = configuration.baseOptions;
48
+ }
49
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
50
+ const localVarHeaderParameter = {};
51
+ const localVarQueryParameter = {};
52
+ // authentication keycloak_auth required
53
+ // http bearer authentication required
54
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
55
+ localVarHeaderParameter['Content-Type'] = 'application/json';
56
+ localVarHeaderParameter['Accept'] = 'application/json';
57
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
58
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
59
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
60
+ localVarRequestOptions.data = serializeDataIfNeeded(embeddingBackfillRequest, localVarRequestOptions, configuration);
61
+ return {
62
+ url: toPathString(localVarUrlObj),
63
+ options: localVarRequestOptions,
64
+ };
65
+ }),
66
+ /**
67
+ *
68
+ * @summary Progress of an embedding backfill job
69
+ * @param {string} jobId
70
+ * @param {*} [options] Override http request option.
71
+ * @throws {RequiredError}
72
+ */
73
+ backfillStatus1: (jobId_1, ...args_1) => __awaiter(this, [jobId_1, ...args_1], void 0, function* (jobId, options = {}) {
74
+ // verify required parameter 'jobId' is not null or undefined
75
+ assertParamExists('backfillStatus1', 'jobId', jobId);
76
+ const localVarPath = `/api/v1/ai/embeddings/backfill/{jobId}`
77
+ .replace('{jobId}', encodeURIComponent(String(jobId)));
78
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
79
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
80
+ let baseOptions;
81
+ if (configuration) {
82
+ baseOptions = configuration.baseOptions;
83
+ }
84
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
85
+ const localVarHeaderParameter = {};
86
+ const localVarQueryParameter = {};
87
+ // authentication keycloak_auth required
88
+ // http bearer authentication required
89
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
90
+ localVarHeaderParameter['Accept'] = 'application/json';
91
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
92
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
93
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
94
+ return {
95
+ url: toPathString(localVarUrlObj),
96
+ options: localVarRequestOptions,
97
+ };
98
+ }),
99
+ };
100
+ };
101
+ /**
102
+ * AIEmbeddingsApi - functional programming interface
103
+ */
104
+ export const AIEmbeddingsApiFp = function (configuration) {
105
+ const localVarAxiosParamCreator = AIEmbeddingsApiAxiosParamCreator(configuration);
106
+ return {
107
+ /**
108
+ * 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.
109
+ * @summary Embed existing documents
110
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
111
+ * @param {*} [options] Override http request option.
112
+ * @throws {RequiredError}
113
+ */
114
+ backfill1(embeddingBackfillRequest, options) {
115
+ return __awaiter(this, void 0, void 0, function* () {
116
+ var _a, _b, _c;
117
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.backfill1(embeddingBackfillRequest, options);
118
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
119
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIEmbeddingsApi.backfill1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
120
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
121
+ });
122
+ },
123
+ /**
124
+ *
125
+ * @summary Progress of an embedding backfill job
126
+ * @param {string} jobId
127
+ * @param {*} [options] Override http request option.
128
+ * @throws {RequiredError}
129
+ */
130
+ backfillStatus1(jobId, options) {
131
+ return __awaiter(this, void 0, void 0, function* () {
132
+ var _a, _b, _c;
133
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.backfillStatus1(jobId, options);
134
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
135
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIEmbeddingsApi.backfillStatus1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
136
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
137
+ });
138
+ },
139
+ };
140
+ };
141
+ /**
142
+ * AIEmbeddingsApi - factory interface
143
+ */
144
+ export const AIEmbeddingsApiFactory = function (configuration, basePath, axios) {
145
+ const localVarFp = AIEmbeddingsApiFp(configuration);
146
+ return {
147
+ /**
148
+ * 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.
149
+ * @summary Embed existing documents
150
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ */
154
+ backfill1(embeddingBackfillRequest, options) {
155
+ return localVarFp.backfill1(embeddingBackfillRequest, options).then((request) => request(axios, basePath));
156
+ },
157
+ /**
158
+ *
159
+ * @summary Progress of an embedding backfill job
160
+ * @param {string} jobId
161
+ * @param {*} [options] Override http request option.
162
+ * @throws {RequiredError}
163
+ */
164
+ backfillStatus1(jobId, options) {
165
+ return localVarFp.backfillStatus1(jobId, options).then((request) => request(axios, basePath));
166
+ },
167
+ };
168
+ };
169
+ /**
170
+ * AIEmbeddingsApi - object-oriented interface
171
+ */
172
+ export class AIEmbeddingsApi extends BaseAPI {
173
+ /**
174
+ * 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.
175
+ * @summary Embed existing documents
176
+ * @param {EmbeddingBackfillRequest} [embeddingBackfillRequest]
177
+ * @param {*} [options] Override http request option.
178
+ * @throws {RequiredError}
179
+ */
180
+ backfill1(embeddingBackfillRequest, options) {
181
+ return AIEmbeddingsApiFp(this.configuration).backfill1(embeddingBackfillRequest, options).then((request) => request(this.axios, this.basePath));
182
+ }
183
+ /**
184
+ *
185
+ * @summary Progress of an embedding backfill job
186
+ * @param {string} jobId
187
+ * @param {*} [options] Override http request option.
188
+ * @throws {RequiredError}
189
+ */
190
+ backfillStatus1(jobId, options) {
191
+ return AIEmbeddingsApiFp(this.configuration).backfillStatus1(jobId, options).then((request) => request(this.axios, this.basePath));
192
+ }
193
+ }
@@ -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
  }
@@ -129,6 +129,44 @@ export const DocumentInsightsApiAxiosParamCreator = function (configuration) {
129
129
  options: localVarRequestOptions,
130
130
  };
131
131
  }),
132
+ /**
133
+ * 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.
134
+ * @summary Correct the kind of a document
135
+ * @param {string} documentId
136
+ * @param {InsightCategoryUpdate} insightCategoryUpdate
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ */
140
+ setCategory: (documentId_1, insightCategoryUpdate_1, ...args_1) => __awaiter(this, [documentId_1, insightCategoryUpdate_1, ...args_1], void 0, function* (documentId, insightCategoryUpdate, options = {}) {
141
+ // verify required parameter 'documentId' is not null or undefined
142
+ assertParamExists('setCategory', 'documentId', documentId);
143
+ // verify required parameter 'insightCategoryUpdate' is not null or undefined
144
+ assertParamExists('setCategory', 'insightCategoryUpdate', insightCategoryUpdate);
145
+ const localVarPath = `/api/v1/documents/{documentId}/insights`
146
+ .replace('{documentId}', encodeURIComponent(String(documentId)));
147
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
148
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
149
+ let baseOptions;
150
+ if (configuration) {
151
+ baseOptions = configuration.baseOptions;
152
+ }
153
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
154
+ const localVarHeaderParameter = {};
155
+ const localVarQueryParameter = {};
156
+ // authentication keycloak_auth required
157
+ // http bearer authentication required
158
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
159
+ localVarHeaderParameter['Content-Type'] = 'application/json';
160
+ localVarHeaderParameter['Accept'] = 'application/json';
161
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
162
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
163
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
164
+ localVarRequestOptions.data = serializeDataIfNeeded(insightCategoryUpdate, localVarRequestOptions, configuration);
165
+ return {
166
+ url: toPathString(localVarUrlObj),
167
+ options: localVarRequestOptions,
168
+ };
169
+ }),
132
170
  };
133
171
  };
134
172
  /**
@@ -185,6 +223,23 @@ export const DocumentInsightsApiFp = function (configuration) {
185
223
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
186
224
  });
187
225
  },
226
+ /**
227
+ * 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.
228
+ * @summary Correct the kind of a document
229
+ * @param {string} documentId
230
+ * @param {InsightCategoryUpdate} insightCategoryUpdate
231
+ * @param {*} [options] Override http request option.
232
+ * @throws {RequiredError}
233
+ */
234
+ setCategory(documentId, insightCategoryUpdate, options) {
235
+ return __awaiter(this, void 0, void 0, function* () {
236
+ var _a, _b, _c;
237
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.setCategory(documentId, insightCategoryUpdate, options);
238
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
239
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentInsightsApi.setCategory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
240
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
241
+ });
242
+ },
188
243
  };
189
244
  };
190
245
  /**
@@ -223,6 +278,17 @@ export const DocumentInsightsApiFactory = function (configuration, basePath, axi
223
278
  getInsights(documentId, options) {
224
279
  return localVarFp.getInsights(documentId, options).then((request) => request(axios, basePath));
225
280
  },
281
+ /**
282
+ * 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.
283
+ * @summary Correct the kind of a document
284
+ * @param {string} documentId
285
+ * @param {InsightCategoryUpdate} insightCategoryUpdate
286
+ * @param {*} [options] Override http request option.
287
+ * @throws {RequiredError}
288
+ */
289
+ setCategory(documentId, insightCategoryUpdate, options) {
290
+ return localVarFp.setCategory(documentId, insightCategoryUpdate, options).then((request) => request(axios, basePath));
291
+ },
226
292
  };
227
293
  };
228
294
  /**
@@ -259,4 +325,15 @@ export class DocumentInsightsApi extends BaseAPI {
259
325
  getInsights(documentId, options) {
260
326
  return DocumentInsightsApiFp(this.configuration).getInsights(documentId, options).then((request) => request(this.axios, this.basePath));
261
327
  }
328
+ /**
329
+ * 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.
330
+ * @summary Correct the kind of a document
331
+ * @param {string} documentId
332
+ * @param {InsightCategoryUpdate} insightCategoryUpdate
333
+ * @param {*} [options] Override http request option.
334
+ * @throws {RequiredError}
335
+ */
336
+ setCategory(documentId, insightCategoryUpdate, options) {
337
+ return DocumentInsightsApiFp(this.configuration).setCategory(documentId, insightCategoryUpdate, options).then((request) => request(this.axios, this.basePath));
338
+ }
262
339
  }
package/dist/esm/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/esm/api.js CHANGED
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  export * from './api/aichat-api';
15
+ export * from './api/aiembeddings-api';
15
16
  export * from './api/aisettings-api';
16
17
  export * from './api/collaboration-audit-controller-api';
17
18
  export * from './api/collaboration-controller-api';
@@ -0,0 +1,15 @@
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
+ export interface EmbeddingBackfillRequest {
13
+ 'folderId'?: string;
14
+ 'force'?: boolean;
15
+ }
@@ -0,0 +1,14 @@
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
+ export {};
@@ -0,0 +1,23 @@
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
+ export interface EmbeddingBackfillStatus {
13
+ 'jobId'?: string;
14
+ 'folderId'?: string;
15
+ 'force'?: boolean;
16
+ 'status'?: string;
17
+ 'total'?: number;
18
+ 'done'?: number;
19
+ 'failed'?: number;
20
+ 'skipped'?: number;
21
+ 'startedAt'?: string;
22
+ 'finishedAt'?: string;
23
+ }
@@ -0,0 +1,14 @@
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
+ export {};