@knowledge-stack/ksapi 1.14.1 → 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.
- package/.openapi-generator/FILES +7 -0
- package/README.md +2 -2
- package/dist/apis/AuthApi.d.ts +30 -1
- package/dist/apis/AuthApi.js +39 -0
- package/dist/apis/DocumentVersionsApi.d.ts +32 -1
- package/dist/apis/DocumentVersionsApi.js +37 -0
- package/dist/apis/DocumentsApi.d.ts +34 -1
- package/dist/apis/DocumentsApi.js +59 -0
- package/dist/apis/InvitesApi.d.ts +29 -0
- package/dist/apis/InvitesApi.js +31 -0
- package/dist/apis/TenantsApi.d.ts +4 -4
- package/dist/apis/TenantsApi.js +2 -2
- package/dist/esm/apis/AuthApi.d.ts +30 -1
- package/dist/esm/apis/AuthApi.js +40 -1
- package/dist/esm/apis/DocumentVersionsApi.d.ts +32 -1
- package/dist/esm/apis/DocumentVersionsApi.js +38 -1
- package/dist/esm/apis/DocumentsApi.d.ts +34 -1
- package/dist/esm/apis/DocumentsApi.js +60 -1
- package/dist/esm/apis/InvitesApi.d.ts +29 -0
- package/dist/esm/apis/InvitesApi.js +31 -0
- package/dist/esm/apis/TenantsApi.d.ts +4 -4
- package/dist/esm/apis/TenantsApi.js +2 -2
- package/dist/esm/models/AssumeUserRequest.d.ts +53 -0
- package/dist/esm/models/AssumeUserRequest.js +48 -0
- package/dist/esm/models/AssumeUserResponse.d.ts +47 -0
- package/dist/esm/models/AssumeUserResponse.js +44 -0
- package/dist/esm/models/DocumentVersionMetadata.d.ts +89 -0
- package/dist/esm/models/DocumentVersionMetadata.js +55 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +87 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.js +55 -0
- package/dist/esm/models/DocumentVersionResponse.d.ts +13 -0
- package/dist/esm/models/DocumentVersionResponse.js +5 -0
- package/dist/esm/models/IngestDocumentResponse.d.ts +59 -0
- package/dist/esm/models/IngestDocumentResponse.js +52 -0
- package/dist/esm/models/PipelineState.d.ts +78 -0
- package/dist/esm/models/PipelineState.js +57 -0
- package/dist/esm/models/PipelineStatus.d.ts +27 -0
- package/dist/esm/models/PipelineStatus.js +45 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -0
- package/dist/models/AssumeUserRequest.d.ts +53 -0
- package/dist/models/AssumeUserRequest.js +56 -0
- package/dist/models/AssumeUserResponse.d.ts +47 -0
- package/dist/models/AssumeUserResponse.js +52 -0
- package/dist/models/DocumentVersionMetadata.d.ts +89 -0
- package/dist/models/DocumentVersionMetadata.js +63 -0
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +87 -0
- package/dist/models/DocumentVersionMetadataUpdate.js +63 -0
- package/dist/models/DocumentVersionResponse.d.ts +13 -0
- package/dist/models/DocumentVersionResponse.js +5 -0
- package/dist/models/IngestDocumentResponse.d.ts +59 -0
- package/dist/models/IngestDocumentResponse.js +60 -0
- package/dist/models/PipelineState.d.ts +78 -0
- package/dist/models/PipelineState.js +65 -0
- package/dist/models/PipelineStatus.d.ts +27 -0
- package/dist/models/PipelineStatus.js +53 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/package.json +1 -1
- package/src/apis/AuthApi.ts +80 -0
- package/src/apis/DocumentVersionsApi.ts +76 -0
- package/src/apis/DocumentsApi.ts +103 -0
- package/src/apis/InvitesApi.ts +60 -0
- package/src/apis/TenantsApi.ts +4 -4
- package/src/models/AssumeUserRequest.ts +92 -0
- package/src/models/AssumeUserResponse.ts +83 -0
- package/src/models/DocumentVersionMetadata.ts +143 -0
- package/src/models/DocumentVersionMetadataUpdate.ts +141 -0
- package/src/models/DocumentVersionResponse.ts +24 -0
- package/src/models/IngestDocumentResponse.ts +101 -0
- package/src/models/PipelineState.ts +134 -0
- package/src/models/PipelineStatus.ts +55 -0
- package/src/models/index.ts +7 -0
package/src/apis/DocumentsApi.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
CreateDocumentRequest,
|
|
19
19
|
DocumentResponse,
|
|
20
20
|
HTTPValidationError,
|
|
21
|
+
IngestDocumentResponse,
|
|
21
22
|
PaginatedResponseDocumentResponse,
|
|
22
23
|
PathOrder,
|
|
23
24
|
UpdateDocumentRequest,
|
|
@@ -29,6 +30,8 @@ import {
|
|
|
29
30
|
DocumentResponseToJSON,
|
|
30
31
|
HTTPValidationErrorFromJSON,
|
|
31
32
|
HTTPValidationErrorToJSON,
|
|
33
|
+
IngestDocumentResponseFromJSON,
|
|
34
|
+
IngestDocumentResponseToJSON,
|
|
32
35
|
PaginatedResponseDocumentResponseFromJSON,
|
|
33
36
|
PaginatedResponseDocumentResponseToJSON,
|
|
34
37
|
PathOrderFromJSON,
|
|
@@ -52,6 +55,13 @@ export interface GetDocumentRequest {
|
|
|
52
55
|
ksUat?: string;
|
|
53
56
|
}
|
|
54
57
|
|
|
58
|
+
export interface IngestDocumentRequest {
|
|
59
|
+
file: Blob;
|
|
60
|
+
folderId: string;
|
|
61
|
+
ksUat?: string;
|
|
62
|
+
name?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
55
65
|
export interface ListDocumentsRequest {
|
|
56
66
|
parentId?: string;
|
|
57
67
|
sortOrder?: PathOrder;
|
|
@@ -124,6 +134,25 @@ export interface DocumentsApiInterface {
|
|
|
124
134
|
*/
|
|
125
135
|
getDocument(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
|
|
126
136
|
|
|
137
|
+
/**
|
|
138
|
+
* 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.
|
|
139
|
+
* @summary Ingest Document Handler
|
|
140
|
+
* @param {Blob} file
|
|
141
|
+
* @param {string} folderId Parent folder ID
|
|
142
|
+
* @param {string} [ksUat]
|
|
143
|
+
* @param {string} [name] Document name (defaults to filename)
|
|
144
|
+
* @param {*} [options] Override http request option.
|
|
145
|
+
* @throws {RequiredError}
|
|
146
|
+
* @memberof DocumentsApiInterface
|
|
147
|
+
*/
|
|
148
|
+
ingestDocumentRaw(requestParameters: IngestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IngestDocumentResponse>>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* 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.
|
|
152
|
+
* Ingest Document Handler
|
|
153
|
+
*/
|
|
154
|
+
ingestDocument(requestParameters: IngestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestDocumentResponse>;
|
|
155
|
+
|
|
127
156
|
/**
|
|
128
157
|
* 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.
|
|
129
158
|
* @summary List Documents Handler
|
|
@@ -287,6 +316,80 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
|
|
|
287
316
|
return await response.value();
|
|
288
317
|
}
|
|
289
318
|
|
|
319
|
+
/**
|
|
320
|
+
* 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.
|
|
321
|
+
* Ingest Document Handler
|
|
322
|
+
*/
|
|
323
|
+
async ingestDocumentRaw(requestParameters: IngestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IngestDocumentResponse>> {
|
|
324
|
+
if (requestParameters['file'] == null) {
|
|
325
|
+
throw new runtime.RequiredError(
|
|
326
|
+
'file',
|
|
327
|
+
'Required parameter "file" was null or undefined when calling ingestDocument().'
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (requestParameters['folderId'] == null) {
|
|
332
|
+
throw new runtime.RequiredError(
|
|
333
|
+
'folderId',
|
|
334
|
+
'Required parameter "folderId" was null or undefined when calling ingestDocument().'
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
const queryParameters: any = {};
|
|
339
|
+
|
|
340
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
341
|
+
|
|
342
|
+
const consumes: runtime.Consume[] = [
|
|
343
|
+
{ contentType: 'multipart/form-data' },
|
|
344
|
+
];
|
|
345
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
346
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
347
|
+
|
|
348
|
+
let formParams: { append(param: string, value: any): any };
|
|
349
|
+
let useForm = false;
|
|
350
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
351
|
+
useForm = canConsumeForm;
|
|
352
|
+
if (useForm) {
|
|
353
|
+
formParams = new FormData();
|
|
354
|
+
} else {
|
|
355
|
+
formParams = new URLSearchParams();
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if (requestParameters['file'] != null) {
|
|
359
|
+
formParams.append('file', requestParameters['file'] as any);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
if (requestParameters['folderId'] != null) {
|
|
363
|
+
formParams.append('folder_id', requestParameters['folderId'] as any);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
if (requestParameters['name'] != null) {
|
|
367
|
+
formParams.append('name', requestParameters['name'] as any);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
let urlPath = `/v1/documents/ingest`;
|
|
372
|
+
|
|
373
|
+
const response = await this.request({
|
|
374
|
+
path: urlPath,
|
|
375
|
+
method: 'POST',
|
|
376
|
+
headers: headerParameters,
|
|
377
|
+
query: queryParameters,
|
|
378
|
+
body: formParams,
|
|
379
|
+
}, initOverrides);
|
|
380
|
+
|
|
381
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IngestDocumentResponseFromJSON(jsonValue));
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* 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.
|
|
386
|
+
* Ingest Document Handler
|
|
387
|
+
*/
|
|
388
|
+
async ingestDocument(requestParameters: IngestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestDocumentResponse> {
|
|
389
|
+
const response = await this.ingestDocumentRaw(requestParameters, initOverrides);
|
|
390
|
+
return await response.value();
|
|
391
|
+
}
|
|
392
|
+
|
|
290
393
|
/**
|
|
291
394
|
* 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.
|
|
292
395
|
* List Documents Handler
|
package/src/apis/InvitesApi.ts
CHANGED
|
@@ -44,6 +44,11 @@ export interface CreateInviteRequest {
|
|
|
44
44
|
ksUat?: string;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
export interface DeleteInviteRequest {
|
|
48
|
+
inviteId: string;
|
|
49
|
+
ksUat?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
export interface ListInvitesRequest {
|
|
48
53
|
email?: string;
|
|
49
54
|
status?: InviteStatus;
|
|
@@ -93,6 +98,23 @@ export interface InvitesApiInterface {
|
|
|
93
98
|
*/
|
|
94
99
|
createInvite(requestParameters: CreateInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteResponse>;
|
|
95
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Hard-delete an invite (admin/owner only). Permanently removes the invite. The invite must belong to the caller\'s current tenant.
|
|
103
|
+
* @summary Delete Invite
|
|
104
|
+
* @param {string} inviteId
|
|
105
|
+
* @param {string} [ksUat]
|
|
106
|
+
* @param {*} [options] Override http request option.
|
|
107
|
+
* @throws {RequiredError}
|
|
108
|
+
* @memberof InvitesApiInterface
|
|
109
|
+
*/
|
|
110
|
+
deleteInviteRaw(requestParameters: DeleteInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Hard-delete an invite (admin/owner only). Permanently removes the invite. The invite must belong to the caller\'s current tenant.
|
|
114
|
+
* Delete Invite
|
|
115
|
+
*/
|
|
116
|
+
deleteInvite(requestParameters: DeleteInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
117
|
+
|
|
96
118
|
/**
|
|
97
119
|
* List invites with pagination, filtering, and sorting. Supports filtering by tenant_id (requires admin access), email, and status. Results can be sorted by created_at, updated_at, expires_at, or accepted_at.
|
|
98
120
|
* @summary List Invites Handler
|
|
@@ -204,6 +226,44 @@ export class InvitesApi extends runtime.BaseAPI implements InvitesApiInterface {
|
|
|
204
226
|
return await response.value();
|
|
205
227
|
}
|
|
206
228
|
|
|
229
|
+
/**
|
|
230
|
+
* Hard-delete an invite (admin/owner only). Permanently removes the invite. The invite must belong to the caller\'s current tenant.
|
|
231
|
+
* Delete Invite
|
|
232
|
+
*/
|
|
233
|
+
async deleteInviteRaw(requestParameters: DeleteInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
234
|
+
if (requestParameters['inviteId'] == null) {
|
|
235
|
+
throw new runtime.RequiredError(
|
|
236
|
+
'inviteId',
|
|
237
|
+
'Required parameter "inviteId" was null or undefined when calling deleteInvite().'
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const queryParameters: any = {};
|
|
242
|
+
|
|
243
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
let urlPath = `/v1/invites/{invite_id}`;
|
|
247
|
+
urlPath = urlPath.replace(`{${"invite_id"}}`, encodeURIComponent(String(requestParameters['inviteId'])));
|
|
248
|
+
|
|
249
|
+
const response = await this.request({
|
|
250
|
+
path: urlPath,
|
|
251
|
+
method: 'DELETE',
|
|
252
|
+
headers: headerParameters,
|
|
253
|
+
query: queryParameters,
|
|
254
|
+
}, initOverrides);
|
|
255
|
+
|
|
256
|
+
return new runtime.VoidApiResponse(response);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Hard-delete an invite (admin/owner only). Permanently removes the invite. The invite must belong to the caller\'s current tenant.
|
|
261
|
+
* Delete Invite
|
|
262
|
+
*/
|
|
263
|
+
async deleteInvite(requestParameters: DeleteInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
264
|
+
await this.deleteInviteRaw(requestParameters, initOverrides);
|
|
265
|
+
}
|
|
266
|
+
|
|
207
267
|
/**
|
|
208
268
|
* List invites with pagination, filtering, and sorting. Supports filtering by tenant_id (requires admin access), email, and status. Results can be sorted by created_at, updated_at, expires_at, or accepted_at.
|
|
209
269
|
* List Invites Handler
|
package/src/apis/TenantsApi.ts
CHANGED
|
@@ -96,7 +96,7 @@ export interface TenantsApiInterface {
|
|
|
96
96
|
createTenant(requestParameters: CreateTenantOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
* Delete a tenant. Requires OWNER role in the tenant.
|
|
99
|
+
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
|
|
100
100
|
* @summary Delete Tenant
|
|
101
101
|
* @param {string} tenantId
|
|
102
102
|
* @param {string} [ksUat]
|
|
@@ -107,7 +107,7 @@ export interface TenantsApiInterface {
|
|
|
107
107
|
deleteTenantRaw(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
* Delete a tenant. Requires OWNER role in the tenant.
|
|
110
|
+
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
|
|
111
111
|
* Delete Tenant
|
|
112
112
|
*/
|
|
113
113
|
deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -233,7 +233,7 @@ export class TenantsApi extends runtime.BaseAPI implements TenantsApiInterface {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
|
-
* Delete a tenant. Requires OWNER role in the tenant.
|
|
236
|
+
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
|
|
237
237
|
* Delete Tenant
|
|
238
238
|
*/
|
|
239
239
|
async deleteTenantRaw(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
@@ -263,7 +263,7 @@ export class TenantsApi extends runtime.BaseAPI implements TenantsApiInterface {
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
|
-
* Delete a tenant. Requires OWNER role in the tenant.
|
|
266
|
+
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
|
|
267
267
|
* Delete Tenant
|
|
268
268
|
*/
|
|
269
269
|
async deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AssumeUserRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface AssumeUserRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AssumeUserRequest
|
|
26
|
+
*/
|
|
27
|
+
tenantId: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AssumeUserRequest
|
|
32
|
+
*/
|
|
33
|
+
userId: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the AssumeUserRequest interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfAssumeUserRequest(value: object): value is AssumeUserRequest {
|
|
40
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
|
|
41
|
+
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function AssumeUserRequestFromJSON(json: any): AssumeUserRequest {
|
|
46
|
+
return AssumeUserRequestFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function AssumeUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssumeUserRequest {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'tenantId': json['tenant_id'],
|
|
56
|
+
'userId': json['user_id'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function AssumeUserRequestToJSON(json: any): AssumeUserRequest {
|
|
61
|
+
return AssumeUserRequestToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function AssumeUserRequestToJSONTyped(value?: AssumeUserRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'tenant_id': value['tenantId'],
|
|
72
|
+
'user_id': value['userId'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const AssumeUserRequestPropertyValidationAttributesMap: {
|
|
77
|
+
[property: string]: {
|
|
78
|
+
maxLength?: number,
|
|
79
|
+
minLength?: number,
|
|
80
|
+
pattern?: string,
|
|
81
|
+
maximum?: number,
|
|
82
|
+
exclusiveMaximum?: boolean,
|
|
83
|
+
minimum?: number,
|
|
84
|
+
exclusiveMinimum?: boolean,
|
|
85
|
+
multipleOf?: number,
|
|
86
|
+
maxItems?: number,
|
|
87
|
+
minItems?: number,
|
|
88
|
+
uniqueItems?: boolean
|
|
89
|
+
}
|
|
90
|
+
} = {
|
|
91
|
+
}
|
|
92
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AssumeUserResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface AssumeUserResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AssumeUserResponse
|
|
26
|
+
*/
|
|
27
|
+
token: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the AssumeUserResponse interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfAssumeUserResponse(value: object): value is AssumeUserResponse {
|
|
34
|
+
if (!('token' in value) || value['token'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function AssumeUserResponseFromJSON(json: any): AssumeUserResponse {
|
|
39
|
+
return AssumeUserResponseFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function AssumeUserResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssumeUserResponse {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'token': json['token'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function AssumeUserResponseToJSON(json: any): AssumeUserResponse {
|
|
53
|
+
return AssumeUserResponseToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AssumeUserResponseToJSONTyped(value?: AssumeUserResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'token': value['token'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const AssumeUserResponsePropertyValidationAttributesMap: {
|
|
68
|
+
[property: string]: {
|
|
69
|
+
maxLength?: number,
|
|
70
|
+
minLength?: number,
|
|
71
|
+
pattern?: string,
|
|
72
|
+
maximum?: number,
|
|
73
|
+
exclusiveMaximum?: boolean,
|
|
74
|
+
minimum?: number,
|
|
75
|
+
exclusiveMinimum?: boolean,
|
|
76
|
+
multipleOf?: number,
|
|
77
|
+
maxItems?: number,
|
|
78
|
+
minItems?: number,
|
|
79
|
+
uniqueItems?: boolean
|
|
80
|
+
}
|
|
81
|
+
} = {
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PipelineState } from './PipelineState';
|
|
17
|
+
import {
|
|
18
|
+
PipelineStateFromJSON,
|
|
19
|
+
PipelineStateFromJSONTyped,
|
|
20
|
+
PipelineStateToJSON,
|
|
21
|
+
PipelineStateToJSONTyped,
|
|
22
|
+
} from './PipelineState';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Schema for document_version.metadata JSONB field.
|
|
26
|
+
*
|
|
27
|
+
* Tracks S3 URLs for generated artifacts, pipeline execution state,
|
|
28
|
+
* and document statistics. Convention-based paths (images, page screenshots)
|
|
29
|
+
* are derived from document_id/document_version_id via s3_paths helpers,
|
|
30
|
+
* using a flat S3 layout: documents/{document_id}/{document_version_id}/...
|
|
31
|
+
* @export
|
|
32
|
+
* @interface DocumentVersionMetadata
|
|
33
|
+
*/
|
|
34
|
+
export interface DocumentVersionMetadata {
|
|
35
|
+
/**
|
|
36
|
+
* S3 URL to the source document (set by API on upload)
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof DocumentVersionMetadata
|
|
39
|
+
*/
|
|
40
|
+
sourceS3?: string;
|
|
41
|
+
/**
|
|
42
|
+
* S3 URL to watermark-removed source document
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof DocumentVersionMetadata
|
|
45
|
+
*/
|
|
46
|
+
cleanedSourceS3?: string;
|
|
47
|
+
/**
|
|
48
|
+
* S3 URL to the Docling JSON conversion output
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof DocumentVersionMetadata
|
|
51
|
+
*/
|
|
52
|
+
doclingJsonS3?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Current state of the ingestion pipeline workflow
|
|
55
|
+
* @type {PipelineState}
|
|
56
|
+
* @memberof DocumentVersionMetadata
|
|
57
|
+
*/
|
|
58
|
+
pipelineState?: PipelineState;
|
|
59
|
+
/**
|
|
60
|
+
* Total number of pages in the document
|
|
61
|
+
* @type {number}
|
|
62
|
+
* @memberof DocumentVersionMetadata
|
|
63
|
+
*/
|
|
64
|
+
totalPages?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Total number of sections created
|
|
67
|
+
* @type {number}
|
|
68
|
+
* @memberof DocumentVersionMetadata
|
|
69
|
+
*/
|
|
70
|
+
totalSections?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Total number of chunks created
|
|
73
|
+
* @type {number}
|
|
74
|
+
* @memberof DocumentVersionMetadata
|
|
75
|
+
*/
|
|
76
|
+
totalChunks?: number;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the DocumentVersionMetadata interface.
|
|
81
|
+
*/
|
|
82
|
+
export function instanceOfDocumentVersionMetadata(value: object): value is DocumentVersionMetadata {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function DocumentVersionMetadataFromJSON(json: any): DocumentVersionMetadata {
|
|
87
|
+
return DocumentVersionMetadataFromJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function DocumentVersionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionMetadata {
|
|
91
|
+
if (json == null) {
|
|
92
|
+
return json;
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
|
|
96
|
+
'sourceS3': json['source_s3'] == null ? undefined : json['source_s3'],
|
|
97
|
+
'cleanedSourceS3': json['cleaned_source_s3'] == null ? undefined : json['cleaned_source_s3'],
|
|
98
|
+
'doclingJsonS3': json['docling_json_s3'] == null ? undefined : json['docling_json_s3'],
|
|
99
|
+
'pipelineState': json['pipeline_state'] == null ? undefined : PipelineStateFromJSON(json['pipeline_state']),
|
|
100
|
+
'totalPages': json['total_pages'] == null ? undefined : json['total_pages'],
|
|
101
|
+
'totalSections': json['total_sections'] == null ? undefined : json['total_sections'],
|
|
102
|
+
'totalChunks': json['total_chunks'] == null ? undefined : json['total_chunks'],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function DocumentVersionMetadataToJSON(json: any): DocumentVersionMetadata {
|
|
107
|
+
return DocumentVersionMetadataToJSONTyped(json, false);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function DocumentVersionMetadataToJSONTyped(value?: DocumentVersionMetadata | null, ignoreDiscriminator: boolean = false): any {
|
|
111
|
+
if (value == null) {
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
|
|
117
|
+
'source_s3': value['sourceS3'],
|
|
118
|
+
'cleaned_source_s3': value['cleanedSourceS3'],
|
|
119
|
+
'docling_json_s3': value['doclingJsonS3'],
|
|
120
|
+
'pipeline_state': PipelineStateToJSON(value['pipelineState']),
|
|
121
|
+
'total_pages': value['totalPages'],
|
|
122
|
+
'total_sections': value['totalSections'],
|
|
123
|
+
'total_chunks': value['totalChunks'],
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export const DocumentVersionMetadataPropertyValidationAttributesMap: {
|
|
128
|
+
[property: string]: {
|
|
129
|
+
maxLength?: number,
|
|
130
|
+
minLength?: number,
|
|
131
|
+
pattern?: string,
|
|
132
|
+
maximum?: number,
|
|
133
|
+
exclusiveMaximum?: boolean,
|
|
134
|
+
minimum?: number,
|
|
135
|
+
exclusiveMinimum?: boolean,
|
|
136
|
+
multipleOf?: number,
|
|
137
|
+
maxItems?: number,
|
|
138
|
+
minItems?: number,
|
|
139
|
+
uniqueItems?: boolean
|
|
140
|
+
}
|
|
141
|
+
} = {
|
|
142
|
+
}
|
|
143
|
+
|