@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
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { DocumentVersionResponse, PaginatedResponseDocumentContentPathPart, PaginatedResponseDocumentVersionResponse } from '../models/index';
|
|
13
|
+
import type { DocumentVersionMetadataUpdate, DocumentVersionResponse, PaginatedResponseDocumentContentPathPart, PaginatedResponseDocumentVersionResponse } from '../models/index';
|
|
14
14
|
export interface CreateDocumentVersionRequest {
|
|
15
15
|
documentId: string;
|
|
16
16
|
ksUat?: string;
|
|
@@ -36,6 +36,11 @@ export interface ListDocumentVersionsRequest {
|
|
|
36
36
|
offset?: number;
|
|
37
37
|
ksUat?: string;
|
|
38
38
|
}
|
|
39
|
+
export interface UpdateDocumentVersionMetadataRequest {
|
|
40
|
+
versionId: string;
|
|
41
|
+
documentVersionMetadataUpdate: DocumentVersionMetadataUpdate;
|
|
42
|
+
ksUat?: string;
|
|
43
|
+
}
|
|
39
44
|
/**
|
|
40
45
|
* DocumentVersionsApi - interface
|
|
41
46
|
*
|
|
@@ -123,6 +128,22 @@ export interface DocumentVersionsApiInterface {
|
|
|
123
128
|
* List Document Versions Handler
|
|
124
129
|
*/
|
|
125
130
|
listDocumentVersions(requestParameters: ListDocumentVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentVersionResponse>;
|
|
131
|
+
/**
|
|
132
|
+
* Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
|
|
133
|
+
* @summary Update Document Version Metadata Handler
|
|
134
|
+
* @param {string} versionId DocumentVersion ID
|
|
135
|
+
* @param {DocumentVersionMetadataUpdate} documentVersionMetadataUpdate
|
|
136
|
+
* @param {string} [ksUat]
|
|
137
|
+
* @param {*} [options] Override http request option.
|
|
138
|
+
* @throws {RequiredError}
|
|
139
|
+
* @memberof DocumentVersionsApiInterface
|
|
140
|
+
*/
|
|
141
|
+
updateDocumentVersionMetadataRaw(requestParameters: UpdateDocumentVersionMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentVersionResponse>>;
|
|
142
|
+
/**
|
|
143
|
+
* Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
|
|
144
|
+
* Update Document Version Metadata Handler
|
|
145
|
+
*/
|
|
146
|
+
updateDocumentVersionMetadata(requestParameters: UpdateDocumentVersionMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse>;
|
|
126
147
|
}
|
|
127
148
|
/**
|
|
128
149
|
*
|
|
@@ -178,4 +199,14 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
|
|
|
178
199
|
* List Document Versions Handler
|
|
179
200
|
*/
|
|
180
201
|
listDocumentVersions(requestParameters: ListDocumentVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentVersionResponse>;
|
|
202
|
+
/**
|
|
203
|
+
* Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
|
|
204
|
+
* Update Document Version Metadata Handler
|
|
205
|
+
*/
|
|
206
|
+
updateDocumentVersionMetadataRaw(requestParameters: UpdateDocumentVersionMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentVersionResponse>>;
|
|
207
|
+
/**
|
|
208
|
+
* Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
|
|
209
|
+
* Update Document Version Metadata Handler
|
|
210
|
+
*/
|
|
211
|
+
updateDocumentVersionMetadata(requestParameters: UpdateDocumentVersionMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse>;
|
|
181
212
|
}
|
|
@@ -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 { DocumentVersionResponseFromJSON, PaginatedResponseDocumentContentPathPartFromJSON, PaginatedResponseDocumentVersionResponseFromJSON, } from '../models/index';
|
|
24
|
+
import { DocumentVersionMetadataUpdateToJSON, DocumentVersionResponseFromJSON, PaginatedResponseDocumentContentPathPartFromJSON, PaginatedResponseDocumentVersionResponseFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -202,4 +202,41 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
202
202
|
return yield response.value();
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
|
|
207
|
+
* Update Document Version Metadata Handler
|
|
208
|
+
*/
|
|
209
|
+
updateDocumentVersionMetadataRaw(requestParameters, initOverrides) {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
if (requestParameters['versionId'] == null) {
|
|
212
|
+
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling updateDocumentVersionMetadata().');
|
|
213
|
+
}
|
|
214
|
+
if (requestParameters['documentVersionMetadataUpdate'] == null) {
|
|
215
|
+
throw new runtime.RequiredError('documentVersionMetadataUpdate', 'Required parameter "documentVersionMetadataUpdate" was null or undefined when calling updateDocumentVersionMetadata().');
|
|
216
|
+
}
|
|
217
|
+
const queryParameters = {};
|
|
218
|
+
const headerParameters = {};
|
|
219
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
220
|
+
let urlPath = `/v1/document_versions/{version_id}/metadata`;
|
|
221
|
+
urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
|
|
222
|
+
const response = yield this.request({
|
|
223
|
+
path: urlPath,
|
|
224
|
+
method: 'PATCH',
|
|
225
|
+
headers: headerParameters,
|
|
226
|
+
query: queryParameters,
|
|
227
|
+
body: DocumentVersionMetadataUpdateToJSON(requestParameters['documentVersionMetadataUpdate']),
|
|
228
|
+
}, initOverrides);
|
|
229
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentVersionResponseFromJSON(jsonValue));
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
|
|
234
|
+
* Update Document Version Metadata Handler
|
|
235
|
+
*/
|
|
236
|
+
updateDocumentVersionMetadata(requestParameters, initOverrides) {
|
|
237
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
238
|
+
const response = yield this.updateDocumentVersionMetadataRaw(requestParameters, initOverrides);
|
|
239
|
+
return yield response.value();
|
|
240
|
+
});
|
|
241
|
+
}
|
|
205
242
|
}
|
|
@@ -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
|
|
@@ -19,6 +19,10 @@ export interface CreateInviteRequest {
|
|
|
19
19
|
inviteUserRequest: InviteUserRequest;
|
|
20
20
|
ksUat?: string;
|
|
21
21
|
}
|
|
22
|
+
export interface DeleteInviteRequest {
|
|
23
|
+
inviteId: string;
|
|
24
|
+
ksUat?: string;
|
|
25
|
+
}
|
|
22
26
|
export interface ListInvitesRequest {
|
|
23
27
|
email?: string;
|
|
24
28
|
status?: InviteStatus;
|
|
@@ -63,6 +67,21 @@ export interface InvitesApiInterface {
|
|
|
63
67
|
* Create Invite
|
|
64
68
|
*/
|
|
65
69
|
createInvite(requestParameters: CreateInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Hard-delete an invite (admin/owner only). Permanently removes the invite. The invite must belong to the caller\'s current tenant.
|
|
72
|
+
* @summary Delete Invite
|
|
73
|
+
* @param {string} inviteId
|
|
74
|
+
* @param {string} [ksUat]
|
|
75
|
+
* @param {*} [options] Override http request option.
|
|
76
|
+
* @throws {RequiredError}
|
|
77
|
+
* @memberof InvitesApiInterface
|
|
78
|
+
*/
|
|
79
|
+
deleteInviteRaw(requestParameters: DeleteInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
80
|
+
/**
|
|
81
|
+
* Hard-delete an invite (admin/owner only). Permanently removes the invite. The invite must belong to the caller\'s current tenant.
|
|
82
|
+
* Delete Invite
|
|
83
|
+
*/
|
|
84
|
+
deleteInvite(requestParameters: DeleteInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
66
85
|
/**
|
|
67
86
|
* 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.
|
|
68
87
|
* @summary List Invites Handler
|
|
@@ -106,6 +125,16 @@ export declare class InvitesApi extends runtime.BaseAPI implements InvitesApiInt
|
|
|
106
125
|
* Create Invite
|
|
107
126
|
*/
|
|
108
127
|
createInvite(requestParameters: CreateInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteResponse>;
|
|
128
|
+
/**
|
|
129
|
+
* Hard-delete an invite (admin/owner only). Permanently removes the invite. The invite must belong to the caller\'s current tenant.
|
|
130
|
+
* Delete Invite
|
|
131
|
+
*/
|
|
132
|
+
deleteInviteRaw(requestParameters: DeleteInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
133
|
+
/**
|
|
134
|
+
* Hard-delete an invite (admin/owner only). Permanently removes the invite. The invite must belong to the caller\'s current tenant.
|
|
135
|
+
* Delete Invite
|
|
136
|
+
*/
|
|
137
|
+
deleteInvite(requestParameters: DeleteInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
109
138
|
/**
|
|
110
139
|
* 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.
|
|
111
140
|
* List Invites Handler
|
|
@@ -96,6 +96,37 @@ export class InvitesApi extends runtime.BaseAPI {
|
|
|
96
96
|
return yield response.value();
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Hard-delete an invite (admin/owner only). Permanently removes the invite. The invite must belong to the caller\'s current tenant.
|
|
101
|
+
* Delete Invite
|
|
102
|
+
*/
|
|
103
|
+
deleteInviteRaw(requestParameters, initOverrides) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
if (requestParameters['inviteId'] == null) {
|
|
106
|
+
throw new runtime.RequiredError('inviteId', 'Required parameter "inviteId" was null or undefined when calling deleteInvite().');
|
|
107
|
+
}
|
|
108
|
+
const queryParameters = {};
|
|
109
|
+
const headerParameters = {};
|
|
110
|
+
let urlPath = `/v1/invites/{invite_id}`;
|
|
111
|
+
urlPath = urlPath.replace(`{${"invite_id"}}`, encodeURIComponent(String(requestParameters['inviteId'])));
|
|
112
|
+
const response = yield this.request({
|
|
113
|
+
path: urlPath,
|
|
114
|
+
method: 'DELETE',
|
|
115
|
+
headers: headerParameters,
|
|
116
|
+
query: queryParameters,
|
|
117
|
+
}, initOverrides);
|
|
118
|
+
return new runtime.VoidApiResponse(response);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Hard-delete an invite (admin/owner only). Permanently removes the invite. The invite must belong to the caller\'s current tenant.
|
|
123
|
+
* Delete Invite
|
|
124
|
+
*/
|
|
125
|
+
deleteInvite(requestParameters, initOverrides) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
yield this.deleteInviteRaw(requestParameters, initOverrides);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
99
130
|
/**
|
|
100
131
|
* 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.
|
|
101
132
|
* List Invites 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 = {};
|