@knowledge-stack/ksapi 1.15.0 → 1.16.0

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 (68) hide show
  1. package/.openapi-generator/FILES +7 -0
  2. package/README.md +2 -2
  3. package/dist/apis/AuthApi.d.ts +30 -1
  4. package/dist/apis/AuthApi.js +39 -0
  5. package/dist/apis/DocumentVersionsApi.d.ts +32 -1
  6. package/dist/apis/DocumentVersionsApi.js +37 -0
  7. package/dist/apis/DocumentsApi.d.ts +34 -1
  8. package/dist/apis/DocumentsApi.js +59 -0
  9. package/dist/apis/TenantsApi.d.ts +4 -4
  10. package/dist/apis/TenantsApi.js +2 -2
  11. package/dist/esm/apis/AuthApi.d.ts +30 -1
  12. package/dist/esm/apis/AuthApi.js +40 -1
  13. package/dist/esm/apis/DocumentVersionsApi.d.ts +32 -1
  14. package/dist/esm/apis/DocumentVersionsApi.js +38 -1
  15. package/dist/esm/apis/DocumentsApi.d.ts +34 -1
  16. package/dist/esm/apis/DocumentsApi.js +60 -1
  17. package/dist/esm/apis/TenantsApi.d.ts +4 -4
  18. package/dist/esm/apis/TenantsApi.js +2 -2
  19. package/dist/esm/models/AssumeUserRequest.d.ts +53 -0
  20. package/dist/esm/models/AssumeUserRequest.js +48 -0
  21. package/dist/esm/models/AssumeUserResponse.d.ts +47 -0
  22. package/dist/esm/models/AssumeUserResponse.js +44 -0
  23. package/dist/esm/models/DocumentVersionMetadata.d.ts +89 -0
  24. package/dist/esm/models/DocumentVersionMetadata.js +55 -0
  25. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +87 -0
  26. package/dist/esm/models/DocumentVersionMetadataUpdate.js +55 -0
  27. package/dist/esm/models/DocumentVersionResponse.d.ts +13 -0
  28. package/dist/esm/models/DocumentVersionResponse.js +5 -0
  29. package/dist/esm/models/IngestDocumentResponse.d.ts +59 -0
  30. package/dist/esm/models/IngestDocumentResponse.js +52 -0
  31. package/dist/esm/models/PipelineState.d.ts +78 -0
  32. package/dist/esm/models/PipelineState.js +57 -0
  33. package/dist/esm/models/PipelineStatus.d.ts +27 -0
  34. package/dist/esm/models/PipelineStatus.js +45 -0
  35. package/dist/esm/models/index.d.ts +7 -0
  36. package/dist/esm/models/index.js +7 -0
  37. package/dist/models/AssumeUserRequest.d.ts +53 -0
  38. package/dist/models/AssumeUserRequest.js +56 -0
  39. package/dist/models/AssumeUserResponse.d.ts +47 -0
  40. package/dist/models/AssumeUserResponse.js +52 -0
  41. package/dist/models/DocumentVersionMetadata.d.ts +89 -0
  42. package/dist/models/DocumentVersionMetadata.js +63 -0
  43. package/dist/models/DocumentVersionMetadataUpdate.d.ts +87 -0
  44. package/dist/models/DocumentVersionMetadataUpdate.js +63 -0
  45. package/dist/models/DocumentVersionResponse.d.ts +13 -0
  46. package/dist/models/DocumentVersionResponse.js +5 -0
  47. package/dist/models/IngestDocumentResponse.d.ts +59 -0
  48. package/dist/models/IngestDocumentResponse.js +60 -0
  49. package/dist/models/PipelineState.d.ts +78 -0
  50. package/dist/models/PipelineState.js +65 -0
  51. package/dist/models/PipelineStatus.d.ts +27 -0
  52. package/dist/models/PipelineStatus.js +53 -0
  53. package/dist/models/index.d.ts +7 -0
  54. package/dist/models/index.js +7 -0
  55. package/package.json +1 -1
  56. package/src/apis/AuthApi.ts +80 -0
  57. package/src/apis/DocumentVersionsApi.ts +76 -0
  58. package/src/apis/DocumentsApi.ts +103 -0
  59. package/src/apis/TenantsApi.ts +4 -4
  60. package/src/models/AssumeUserRequest.ts +92 -0
  61. package/src/models/AssumeUserResponse.ts +83 -0
  62. package/src/models/DocumentVersionMetadata.ts +143 -0
  63. package/src/models/DocumentVersionMetadataUpdate.ts +141 -0
  64. package/src/models/DocumentVersionResponse.ts +24 -0
  65. package/src/models/IngestDocumentResponse.ts +101 -0
  66. package/src/models/PipelineState.ts +134 -0
  67. package/src/models/PipelineStatus.ts +55 -0
  68. package/src/models/index.ts +7 -0
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateDocumentRequest, DocumentResponse, PaginatedResponseDocumentResponse, PathOrder, UpdateDocumentRequest } from '../models/index';
13
+ import type { CreateDocumentRequest, DocumentResponse, IngestDocumentResponse, PaginatedResponseDocumentResponse, PathOrder, UpdateDocumentRequest } from '../models/index';
14
14
  export interface CreateDocumentOperationRequest {
15
15
  createDocumentRequest: CreateDocumentRequest;
16
16
  ksUat?: string;
@@ -23,6 +23,12 @@ export interface GetDocumentRequest {
23
23
  documentId: string;
24
24
  ksUat?: string;
25
25
  }
26
+ export interface IngestDocumentRequest {
27
+ file: Blob;
28
+ folderId: string;
29
+ ksUat?: string;
30
+ name?: string;
31
+ }
26
32
  export interface ListDocumentsRequest {
27
33
  parentId?: string;
28
34
  sortOrder?: PathOrder;
@@ -87,6 +93,23 @@ export interface DocumentsApiInterface {
87
93
  * Get Document Handler
88
94
  */
89
95
  getDocument(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
96
+ /**
97
+ * Upload a file, create document + version, and trigger ingestion workflow. Returns 201 with the Temporal workflow ID. Design decision — S3 upload happens *before* the DB write: We pre-generate document and version UUIDs, upload the source file to S3, and only then persist the DB records. If the DB write fails, an orphaned S3 object is left behind (acceptable storage cost cleaned up by the S3 deletion cronjob). The reverse — a committed DB record pointing to a missing S3 object — would crash downstream pipeline activities that expect the file to exist.
98
+ * @summary Ingest Document Handler
99
+ * @param {Blob} file
100
+ * @param {string} folderId Parent folder ID
101
+ * @param {string} [ksUat]
102
+ * @param {string} [name] Document name (defaults to filename)
103
+ * @param {*} [options] Override http request option.
104
+ * @throws {RequiredError}
105
+ * @memberof DocumentsApiInterface
106
+ */
107
+ ingestDocumentRaw(requestParameters: IngestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IngestDocumentResponse>>;
108
+ /**
109
+ * Upload a file, create document + version, and trigger ingestion workflow. Returns 201 with the Temporal workflow ID. Design decision — S3 upload happens *before* the DB write: We pre-generate document and version UUIDs, upload the source file to S3, and only then persist the DB records. If the DB write fails, an orphaned S3 object is left behind (acceptable storage cost cleaned up by the S3 deletion cronjob). The reverse — a committed DB record pointing to a missing S3 object — would crash downstream pipeline activities that expect the file to exist.
110
+ * Ingest Document Handler
111
+ */
112
+ ingestDocument(requestParameters: IngestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestDocumentResponse>;
90
113
  /**
91
114
  * List documents in a folder. Returns only direct child documents (depth=1) of the specified parent folder. If parent_id is not provided, lists documents in the root folder.
92
115
  * @summary List Documents Handler
@@ -156,6 +179,16 @@ export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsAp
156
179
  * Get Document Handler
157
180
  */
158
181
  getDocument(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
182
+ /**
183
+ * Upload a file, create document + version, and trigger ingestion workflow. Returns 201 with the Temporal workflow ID. Design decision — S3 upload happens *before* the DB write: We pre-generate document and version UUIDs, upload the source file to S3, and only then persist the DB records. If the DB write fails, an orphaned S3 object is left behind (acceptable storage cost cleaned up by the S3 deletion cronjob). The reverse — a committed DB record pointing to a missing S3 object — would crash downstream pipeline activities that expect the file to exist.
184
+ * Ingest Document Handler
185
+ */
186
+ ingestDocumentRaw(requestParameters: IngestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IngestDocumentResponse>>;
187
+ /**
188
+ * Upload a file, create document + version, and trigger ingestion workflow. Returns 201 with the Temporal workflow ID. Design decision — S3 upload happens *before* the DB write: We pre-generate document and version UUIDs, upload the source file to S3, and only then persist the DB records. If the DB write fails, an orphaned S3 object is left behind (acceptable storage cost cleaned up by the S3 deletion cronjob). The reverse — a committed DB record pointing to a missing S3 object — would crash downstream pipeline activities that expect the file to exist.
189
+ * Ingest Document Handler
190
+ */
191
+ ingestDocument(requestParameters: IngestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestDocumentResponse>;
159
192
  /**
160
193
  * List documents in a folder. Returns only direct child documents (depth=1) of the specified parent folder. If parent_id is not provided, lists documents in the root folder.
161
194
  * List Documents Handler
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { CreateDocumentRequestToJSON, DocumentResponseFromJSON, PaginatedResponseDocumentResponseFromJSON, UpdateDocumentRequestToJSON, } from '../models/index';
24
+ import { CreateDocumentRequestToJSON, DocumentResponseFromJSON, IngestDocumentResponseFromJSON, PaginatedResponseDocumentResponseFromJSON, UpdateDocumentRequestToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -122,6 +122,65 @@ export class DocumentsApi extends runtime.BaseAPI {
122
122
  return yield response.value();
123
123
  });
124
124
  }
125
+ /**
126
+ * Upload a file, create document + version, and trigger ingestion workflow. Returns 201 with the Temporal workflow ID. Design decision — S3 upload happens *before* the DB write: We pre-generate document and version UUIDs, upload the source file to S3, and only then persist the DB records. If the DB write fails, an orphaned S3 object is left behind (acceptable storage cost cleaned up by the S3 deletion cronjob). The reverse — a committed DB record pointing to a missing S3 object — would crash downstream pipeline activities that expect the file to exist.
127
+ * Ingest Document Handler
128
+ */
129
+ ingestDocumentRaw(requestParameters, initOverrides) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ if (requestParameters['file'] == null) {
132
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling ingestDocument().');
133
+ }
134
+ if (requestParameters['folderId'] == null) {
135
+ throw new runtime.RequiredError('folderId', 'Required parameter "folderId" was null or undefined when calling ingestDocument().');
136
+ }
137
+ const queryParameters = {};
138
+ const headerParameters = {};
139
+ const consumes = [
140
+ { contentType: 'multipart/form-data' },
141
+ ];
142
+ // @ts-ignore: canConsumeForm may be unused
143
+ const canConsumeForm = runtime.canConsumeForm(consumes);
144
+ let formParams;
145
+ let useForm = false;
146
+ // use FormData to transmit files using content-type "multipart/form-data"
147
+ useForm = canConsumeForm;
148
+ if (useForm) {
149
+ formParams = new FormData();
150
+ }
151
+ else {
152
+ formParams = new URLSearchParams();
153
+ }
154
+ if (requestParameters['file'] != null) {
155
+ formParams.append('file', requestParameters['file']);
156
+ }
157
+ if (requestParameters['folderId'] != null) {
158
+ formParams.append('folder_id', requestParameters['folderId']);
159
+ }
160
+ if (requestParameters['name'] != null) {
161
+ formParams.append('name', requestParameters['name']);
162
+ }
163
+ let urlPath = `/v1/documents/ingest`;
164
+ const response = yield this.request({
165
+ path: urlPath,
166
+ method: 'POST',
167
+ headers: headerParameters,
168
+ query: queryParameters,
169
+ body: formParams,
170
+ }, initOverrides);
171
+ return new runtime.JSONApiResponse(response, (jsonValue) => IngestDocumentResponseFromJSON(jsonValue));
172
+ });
173
+ }
174
+ /**
175
+ * Upload a file, create document + version, and trigger ingestion workflow. Returns 201 with the Temporal workflow ID. Design decision — S3 upload happens *before* the DB write: We pre-generate document and version UUIDs, upload the source file to S3, and only then persist the DB records. If the DB write fails, an orphaned S3 object is left behind (acceptable storage cost cleaned up by the S3 deletion cronjob). The reverse — a committed DB record pointing to a missing S3 object — would crash downstream pipeline activities that expect the file to exist.
176
+ * Ingest Document Handler
177
+ */
178
+ ingestDocument(requestParameters, initOverrides) {
179
+ return __awaiter(this, void 0, void 0, function* () {
180
+ const response = yield this.ingestDocumentRaw(requestParameters, initOverrides);
181
+ return yield response.value();
182
+ });
183
+ }
125
184
  /**
126
185
  * List documents in a folder. Returns only direct child documents (depth=1) of the specified parent folder. If parent_id is not provided, lists documents in the root folder.
127
186
  * List Documents Handler
@@ -62,7 +62,7 @@ export interface TenantsApiInterface {
62
62
  */
63
63
  createTenant(requestParameters: CreateTenantOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
64
64
  /**
65
- * Delete a tenant. Requires OWNER role in the tenant.
65
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
66
66
  * @summary Delete Tenant
67
67
  * @param {string} tenantId
68
68
  * @param {string} [ksUat]
@@ -72,7 +72,7 @@ export interface TenantsApiInterface {
72
72
  */
73
73
  deleteTenantRaw(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
74
74
  /**
75
- * Delete a tenant. Requires OWNER role in the tenant.
75
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
76
76
  * Delete Tenant
77
77
  */
78
78
  deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -156,12 +156,12 @@ export declare class TenantsApi extends runtime.BaseAPI implements TenantsApiInt
156
156
  */
157
157
  createTenant(requestParameters: CreateTenantOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
158
158
  /**
159
- * Delete a tenant. Requires OWNER role in the tenant.
159
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
160
160
  * Delete Tenant
161
161
  */
162
162
  deleteTenantRaw(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
163
163
  /**
164
- * Delete a tenant. Requires OWNER role in the tenant.
164
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
165
165
  * Delete Tenant
166
166
  */
167
167
  deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -60,7 +60,7 @@ export class TenantsApi extends runtime.BaseAPI {
60
60
  });
61
61
  }
62
62
  /**
63
- * Delete a tenant. Requires OWNER role in the tenant.
63
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
64
64
  * Delete Tenant
65
65
  */
66
66
  deleteTenantRaw(requestParameters, initOverrides) {
@@ -82,7 +82,7 @@ export class TenantsApi extends runtime.BaseAPI {
82
82
  });
83
83
  }
84
84
  /**
85
- * Delete a tenant. Requires OWNER role in the tenant.
85
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
86
86
  * Delete Tenant
87
87
  */
88
88
  deleteTenant(requestParameters, initOverrides) {
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.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
+ /**
13
+ *
14
+ * @export
15
+ * @interface AssumeUserRequest
16
+ */
17
+ export interface AssumeUserRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AssumeUserRequest
22
+ */
23
+ tenantId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AssumeUserRequest
28
+ */
29
+ userId: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the AssumeUserRequest interface.
33
+ */
34
+ export declare function instanceOfAssumeUserRequest(value: object): value is AssumeUserRequest;
35
+ export declare function AssumeUserRequestFromJSON(json: any): AssumeUserRequest;
36
+ export declare function AssumeUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssumeUserRequest;
37
+ export declare function AssumeUserRequestToJSON(json: any): AssumeUserRequest;
38
+ export declare function AssumeUserRequestToJSONTyped(value?: AssumeUserRequest | null, ignoreDiscriminator?: boolean): any;
39
+ export declare const AssumeUserRequestPropertyValidationAttributesMap: {
40
+ [property: string]: {
41
+ maxLength?: number;
42
+ minLength?: number;
43
+ pattern?: string;
44
+ maximum?: number;
45
+ exclusiveMaximum?: boolean;
46
+ minimum?: number;
47
+ exclusiveMinimum?: boolean;
48
+ multipleOf?: number;
49
+ maxItems?: number;
50
+ minItems?: number;
51
+ uniqueItems?: boolean;
52
+ };
53
+ };
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.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
+ * Check if a given object implements the AssumeUserRequest interface.
16
+ */
17
+ export function instanceOfAssumeUserRequest(value) {
18
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
19
+ return false;
20
+ if (!('userId' in value) || value['userId'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function AssumeUserRequestFromJSON(json) {
25
+ return AssumeUserRequestFromJSONTyped(json, false);
26
+ }
27
+ export function AssumeUserRequestFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'tenantId': json['tenant_id'],
33
+ 'userId': json['user_id'],
34
+ };
35
+ }
36
+ export function AssumeUserRequestToJSON(json) {
37
+ return AssumeUserRequestToJSONTyped(json, false);
38
+ }
39
+ export function AssumeUserRequestToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'tenant_id': value['tenantId'],
45
+ 'user_id': value['userId'],
46
+ };
47
+ }
48
+ export const AssumeUserRequestPropertyValidationAttributesMap = {};
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.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
+ /**
13
+ *
14
+ * @export
15
+ * @interface AssumeUserResponse
16
+ */
17
+ export interface AssumeUserResponse {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AssumeUserResponse
22
+ */
23
+ token: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the AssumeUserResponse interface.
27
+ */
28
+ export declare function instanceOfAssumeUserResponse(value: object): value is AssumeUserResponse;
29
+ export declare function AssumeUserResponseFromJSON(json: any): AssumeUserResponse;
30
+ export declare function AssumeUserResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssumeUserResponse;
31
+ export declare function AssumeUserResponseToJSON(json: any): AssumeUserResponse;
32
+ export declare function AssumeUserResponseToJSONTyped(value?: AssumeUserResponse | null, ignoreDiscriminator?: boolean): any;
33
+ export declare const AssumeUserResponsePropertyValidationAttributesMap: {
34
+ [property: string]: {
35
+ maxLength?: number;
36
+ minLength?: number;
37
+ pattern?: string;
38
+ maximum?: number;
39
+ exclusiveMaximum?: boolean;
40
+ minimum?: number;
41
+ exclusiveMinimum?: boolean;
42
+ multipleOf?: number;
43
+ maxItems?: number;
44
+ minItems?: number;
45
+ uniqueItems?: boolean;
46
+ };
47
+ };
@@ -0,0 +1,44 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.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
+ * Check if a given object implements the AssumeUserResponse interface.
16
+ */
17
+ export function instanceOfAssumeUserResponse(value) {
18
+ if (!('token' in value) || value['token'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function AssumeUserResponseFromJSON(json) {
23
+ return AssumeUserResponseFromJSONTyped(json, false);
24
+ }
25
+ export function AssumeUserResponseFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'token': json['token'],
31
+ };
32
+ }
33
+ export function AssumeUserResponseToJSON(json) {
34
+ return AssumeUserResponseToJSONTyped(json, false);
35
+ }
36
+ export function AssumeUserResponseToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'token': value['token'],
42
+ };
43
+ }
44
+ export const AssumeUserResponsePropertyValidationAttributesMap = {};
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.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 { PipelineState } from './PipelineState';
13
+ /**
14
+ * Schema for document_version.metadata JSONB field.
15
+ *
16
+ * Tracks S3 URLs for generated artifacts, pipeline execution state,
17
+ * and document statistics. Convention-based paths (images, page screenshots)
18
+ * are derived from document_id/document_version_id via s3_paths helpers,
19
+ * using a flat S3 layout: documents/{document_id}/{document_version_id}/...
20
+ * @export
21
+ * @interface DocumentVersionMetadata
22
+ */
23
+ export interface DocumentVersionMetadata {
24
+ /**
25
+ * S3 URL to the source document (set by API on upload)
26
+ * @type {string}
27
+ * @memberof DocumentVersionMetadata
28
+ */
29
+ sourceS3?: string;
30
+ /**
31
+ * S3 URL to watermark-removed source document
32
+ * @type {string}
33
+ * @memberof DocumentVersionMetadata
34
+ */
35
+ cleanedSourceS3?: string;
36
+ /**
37
+ * S3 URL to the Docling JSON conversion output
38
+ * @type {string}
39
+ * @memberof DocumentVersionMetadata
40
+ */
41
+ doclingJsonS3?: string;
42
+ /**
43
+ * Current state of the ingestion pipeline workflow
44
+ * @type {PipelineState}
45
+ * @memberof DocumentVersionMetadata
46
+ */
47
+ pipelineState?: PipelineState;
48
+ /**
49
+ * Total number of pages in the document
50
+ * @type {number}
51
+ * @memberof DocumentVersionMetadata
52
+ */
53
+ totalPages?: number;
54
+ /**
55
+ * Total number of sections created
56
+ * @type {number}
57
+ * @memberof DocumentVersionMetadata
58
+ */
59
+ totalSections?: number;
60
+ /**
61
+ * Total number of chunks created
62
+ * @type {number}
63
+ * @memberof DocumentVersionMetadata
64
+ */
65
+ totalChunks?: number;
66
+ }
67
+ /**
68
+ * Check if a given object implements the DocumentVersionMetadata interface.
69
+ */
70
+ export declare function instanceOfDocumentVersionMetadata(value: object): value is DocumentVersionMetadata;
71
+ export declare function DocumentVersionMetadataFromJSON(json: any): DocumentVersionMetadata;
72
+ export declare function DocumentVersionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionMetadata;
73
+ export declare function DocumentVersionMetadataToJSON(json: any): DocumentVersionMetadata;
74
+ export declare function DocumentVersionMetadataToJSONTyped(value?: DocumentVersionMetadata | null, ignoreDiscriminator?: boolean): any;
75
+ export declare const DocumentVersionMetadataPropertyValidationAttributesMap: {
76
+ [property: string]: {
77
+ maxLength?: number;
78
+ minLength?: number;
79
+ pattern?: string;
80
+ maximum?: number;
81
+ exclusiveMaximum?: boolean;
82
+ minimum?: number;
83
+ exclusiveMinimum?: boolean;
84
+ multipleOf?: number;
85
+ maxItems?: number;
86
+ minItems?: number;
87
+ uniqueItems?: boolean;
88
+ };
89
+ };
@@ -0,0 +1,55 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.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
+ import { PipelineStateFromJSON, PipelineStateToJSON, } from './PipelineState';
15
+ /**
16
+ * Check if a given object implements the DocumentVersionMetadata interface.
17
+ */
18
+ export function instanceOfDocumentVersionMetadata(value) {
19
+ return true;
20
+ }
21
+ export function DocumentVersionMetadataFromJSON(json) {
22
+ return DocumentVersionMetadataFromJSONTyped(json, false);
23
+ }
24
+ export function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator) {
25
+ if (json == null) {
26
+ return json;
27
+ }
28
+ return {
29
+ 'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
30
+ 'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
31
+ 'doclingJsonS3': json['docling_json_s3'] == null ? undefined : json['docling_json_s3'],
32
+ 'pipelineState': json['pipeline_state'] == null ? undefined : PipelineStateFromJSON(json['pipeline_state']),
33
+ 'totalPages': json['total_pages'] == null ? undefined : json['total_pages'],
34
+ 'totalSections': json['total_sections'] == null ? undefined : json['total_sections'],
35
+ 'totalChunks': json['total_chunks'] == null ? undefined : json['total_chunks'],
36
+ };
37
+ }
38
+ export function DocumentVersionMetadataToJSON(json) {
39
+ return DocumentVersionMetadataToJSONTyped(json, false);
40
+ }
41
+ export function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'source_s3': value['sourceS3'],
47
+ 'cleaned_source_s3': value['cleanedSourceS3'],
48
+ 'docling_json_s3': value['doclingJsonS3'],
49
+ 'pipeline_state': PipelineStateToJSON(value['pipelineState']),
50
+ 'total_pages': value['totalPages'],
51
+ 'total_sections': value['totalSections'],
52
+ 'total_chunks': value['totalChunks'],
53
+ };
54
+ }
55
+ export const DocumentVersionMetadataPropertyValidationAttributesMap = {};
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.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 { PipelineState } from './PipelineState';
13
+ /**
14
+ * Partial update schema for document version metadata.
15
+ *
16
+ * All fields are optional. Only non-``None`` fields are merged into
17
+ * the existing metadata dict.
18
+ * @export
19
+ * @interface DocumentVersionMetadataUpdate
20
+ */
21
+ export interface DocumentVersionMetadataUpdate {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof DocumentVersionMetadataUpdate
26
+ */
27
+ sourceS3?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof DocumentVersionMetadataUpdate
32
+ */
33
+ cleanedSourceS3?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof DocumentVersionMetadataUpdate
38
+ */
39
+ doclingJsonS3?: string;
40
+ /**
41
+ *
42
+ * @type {PipelineState}
43
+ * @memberof DocumentVersionMetadataUpdate
44
+ */
45
+ pipelineState?: PipelineState;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof DocumentVersionMetadataUpdate
50
+ */
51
+ totalPages?: number;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof DocumentVersionMetadataUpdate
56
+ */
57
+ totalSections?: number;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof DocumentVersionMetadataUpdate
62
+ */
63
+ totalChunks?: number;
64
+ }
65
+ /**
66
+ * Check if a given object implements the DocumentVersionMetadataUpdate interface.
67
+ */
68
+ export declare function instanceOfDocumentVersionMetadataUpdate(value: object): value is DocumentVersionMetadataUpdate;
69
+ export declare function DocumentVersionMetadataUpdateFromJSON(json: any): DocumentVersionMetadataUpdate;
70
+ export declare function DocumentVersionMetadataUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionMetadataUpdate;
71
+ export declare function DocumentVersionMetadataUpdateToJSON(json: any): DocumentVersionMetadataUpdate;
72
+ export declare function DocumentVersionMetadataUpdateToJSONTyped(value?: DocumentVersionMetadataUpdate | null, ignoreDiscriminator?: boolean): any;
73
+ export declare const DocumentVersionMetadataUpdatePropertyValidationAttributesMap: {
74
+ [property: string]: {
75
+ maxLength?: number;
76
+ minLength?: number;
77
+ pattern?: string;
78
+ maximum?: number;
79
+ exclusiveMaximum?: boolean;
80
+ minimum?: number;
81
+ exclusiveMinimum?: boolean;
82
+ multipleOf?: number;
83
+ maxItems?: number;
84
+ minItems?: number;
85
+ uniqueItems?: boolean;
86
+ };
87
+ };
@@ -0,0 +1,55 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.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
+ import { PipelineStateFromJSON, PipelineStateToJSON, } from './PipelineState';
15
+ /**
16
+ * Check if a given object implements the DocumentVersionMetadataUpdate interface.
17
+ */
18
+ export function instanceOfDocumentVersionMetadataUpdate(value) {
19
+ return true;
20
+ }
21
+ export function DocumentVersionMetadataUpdateFromJSON(json) {
22
+ return DocumentVersionMetadataUpdateFromJSONTyped(json, false);
23
+ }
24
+ export function DocumentVersionMetadataUpdateFromJSONTyped(json, ignoreDiscriminator) {
25
+ if (json == null) {
26
+ return json;
27
+ }
28
+ return {
29
+ 'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
30
+ 'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
31
+ 'doclingJsonS3': json['docling_json_s3'] == null ? undefined : json['docling_json_s3'],
32
+ 'pipelineState': json['pipeline_state'] == null ? undefined : PipelineStateFromJSON(json['pipeline_state']),
33
+ 'totalPages': json['total_pages'] == null ? undefined : json['total_pages'],
34
+ 'totalSections': json['total_sections'] == null ? undefined : json['total_sections'],
35
+ 'totalChunks': json['total_chunks'] == null ? undefined : json['total_chunks'],
36
+ };
37
+ }
38
+ export function DocumentVersionMetadataUpdateToJSON(json) {
39
+ return DocumentVersionMetadataUpdateToJSONTyped(json, false);
40
+ }
41
+ export function DocumentVersionMetadataUpdateToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'source_s3': value['sourceS3'],
47
+ 'cleaned_source_s3': value['cleanedSourceS3'],
48
+ 'docling_json_s3': value['doclingJsonS3'],
49
+ 'pipeline_state': PipelineStateToJSON(value['pipelineState']),
50
+ 'total_pages': value['totalPages'],
51
+ 'total_sections': value['totalSections'],
52
+ 'total_chunks': value['totalChunks'],
53
+ };
54
+ }
55
+ export const DocumentVersionMetadataUpdatePropertyValidationAttributesMap = {};