@knowledge-stack/ksapi 1.6.0 → 1.8.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 +14 -0
- package/README.md +2 -2
- package/dist/apis/ChunksApi.d.ts +175 -0
- package/dist/apis/ChunksApi.js +203 -0
- package/dist/apis/PathPartsApi.d.ts +30 -1
- package/dist/apis/PathPartsApi.js +32 -0
- package/dist/apis/SectionsApi.d.ts +144 -0
- package/dist/apis/SectionsApi.js +166 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/ChunksApi.d.ts +175 -0
- package/dist/esm/apis/ChunksApi.js +199 -0
- package/dist/esm/apis/PathPartsApi.d.ts +30 -1
- package/dist/esm/apis/PathPartsApi.js +33 -1
- package/dist/esm/apis/SectionsApi.d.ts +144 -0
- package/dist/esm/apis/SectionsApi.js +162 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/ChunkMetadataInput.d.ts +48 -0
- package/dist/esm/models/ChunkMetadataInput.js +43 -0
- package/dist/esm/models/ChunkMetadataOutput.d.ts +48 -0
- package/dist/esm/models/ChunkMetadataOutput.js +43 -0
- package/dist/esm/models/ChunkResponse.d.ts +115 -0
- package/dist/esm/models/ChunkResponse.js +86 -0
- package/dist/esm/models/ChunkType.d.ts +27 -0
- package/dist/esm/models/ChunkType.js +45 -0
- package/dist/esm/models/CreateChunkRequest.d.ts +73 -0
- package/dist/esm/models/CreateChunkRequest.js +64 -0
- package/dist/esm/models/CreateSectionRequest.d.ts +65 -0
- package/dist/esm/models/CreateSectionRequest.js +57 -0
- package/dist/esm/models/PasswordResetWithTokenRequest.d.ts +2 -8
- package/dist/esm/models/PasswordResetWithTokenRequest.js +3 -7
- package/dist/esm/models/Polygon.d.ts +65 -0
- package/dist/esm/models/Polygon.js +56 -0
- package/dist/esm/models/PolygonReference.d.ts +54 -0
- package/dist/esm/models/PolygonReference.js +49 -0
- package/dist/esm/models/SectionResponse.d.ts +101 -0
- package/dist/esm/models/SectionResponse.js +74 -0
- package/dist/esm/models/UpdateChunkContentRequest.d.ts +54 -0
- package/dist/esm/models/UpdateChunkContentRequest.js +51 -0
- package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +48 -0
- package/dist/esm/models/UpdateChunkMetadataRequest.js +45 -0
- package/dist/esm/models/UpdateSectionRequest.d.ts +65 -0
- package/dist/esm/models/UpdateSectionRequest.js +53 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/ChunkMetadataInput.d.ts +48 -0
- package/dist/models/ChunkMetadataInput.js +51 -0
- package/dist/models/ChunkMetadataOutput.d.ts +48 -0
- package/dist/models/ChunkMetadataOutput.js +51 -0
- package/dist/models/ChunkResponse.d.ts +115 -0
- package/dist/models/ChunkResponse.js +94 -0
- package/dist/models/ChunkType.d.ts +27 -0
- package/dist/models/ChunkType.js +53 -0
- package/dist/models/CreateChunkRequest.d.ts +73 -0
- package/dist/models/CreateChunkRequest.js +72 -0
- package/dist/models/CreateSectionRequest.d.ts +65 -0
- package/dist/models/CreateSectionRequest.js +65 -0
- package/dist/models/PasswordResetWithTokenRequest.d.ts +2 -8
- package/dist/models/PasswordResetWithTokenRequest.js +3 -7
- package/dist/models/Polygon.d.ts +65 -0
- package/dist/models/Polygon.js +64 -0
- package/dist/models/PolygonReference.d.ts +54 -0
- package/dist/models/PolygonReference.js +57 -0
- package/dist/models/SectionResponse.d.ts +101 -0
- package/dist/models/SectionResponse.js +82 -0
- package/dist/models/UpdateChunkContentRequest.d.ts +54 -0
- package/dist/models/UpdateChunkContentRequest.js +59 -0
- package/dist/models/UpdateChunkMetadataRequest.d.ts +48 -0
- package/dist/models/UpdateChunkMetadataRequest.js +53 -0
- package/dist/models/UpdateSectionRequest.d.ts +65 -0
- package/dist/models/UpdateSectionRequest.js +61 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/package.json +1 -1
- package/src/apis/ChunksApi.ts +381 -0
- package/src/apis/PathPartsApi.ts +64 -0
- package/src/apis/SectionsApi.ts +305 -0
- package/src/apis/index.ts +2 -0
- package/src/models/ChunkMetadataInput.ts +90 -0
- package/src/models/ChunkMetadataOutput.ts +90 -0
- package/src/models/ChunkResponse.ts +197 -0
- package/src/models/ChunkType.ts +55 -0
- package/src/models/CreateChunkRequest.ts +138 -0
- package/src/models/CreateSectionRequest.ts +112 -0
- package/src/models/PasswordResetWithTokenRequest.ts +5 -14
- package/src/models/Polygon.ts +110 -0
- package/src/models/PolygonReference.ts +100 -0
- package/src/models/SectionResponse.ts +161 -0
- package/src/models/UpdateChunkContentRequest.ts +104 -0
- package/src/models/UpdateChunkMetadataRequest.ts +91 -0
- package/src/models/UpdateSectionRequest.ts +110 -0
- package/src/models/index.ts +12 -0
|
@@ -0,0 +1,381 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
ChunkResponse,
|
|
19
|
+
CreateChunkRequest,
|
|
20
|
+
HTTPValidationError,
|
|
21
|
+
UpdateChunkContentRequest,
|
|
22
|
+
UpdateChunkMetadataRequest,
|
|
23
|
+
} from '../models/index';
|
|
24
|
+
import {
|
|
25
|
+
ChunkResponseFromJSON,
|
|
26
|
+
ChunkResponseToJSON,
|
|
27
|
+
CreateChunkRequestFromJSON,
|
|
28
|
+
CreateChunkRequestToJSON,
|
|
29
|
+
HTTPValidationErrorFromJSON,
|
|
30
|
+
HTTPValidationErrorToJSON,
|
|
31
|
+
UpdateChunkContentRequestFromJSON,
|
|
32
|
+
UpdateChunkContentRequestToJSON,
|
|
33
|
+
UpdateChunkMetadataRequestFromJSON,
|
|
34
|
+
UpdateChunkMetadataRequestToJSON,
|
|
35
|
+
} from '../models/index';
|
|
36
|
+
|
|
37
|
+
export interface CreateChunkOperationRequest {
|
|
38
|
+
createChunkRequest: CreateChunkRequest;
|
|
39
|
+
ksUat?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface DeleteChunkRequest {
|
|
43
|
+
chunkId: string;
|
|
44
|
+
ksUat?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface GetChunkRequest {
|
|
48
|
+
chunkId: string;
|
|
49
|
+
ksUat?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface UpdateChunkContentOperationRequest {
|
|
53
|
+
chunkId: string;
|
|
54
|
+
updateChunkContentRequest: UpdateChunkContentRequest;
|
|
55
|
+
ksUat?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface UpdateChunkMetadataOperationRequest {
|
|
59
|
+
chunkId: string;
|
|
60
|
+
updateChunkMetadataRequest: UpdateChunkMetadataRequest;
|
|
61
|
+
ksUat?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* ChunksApi - interface
|
|
66
|
+
*
|
|
67
|
+
* @export
|
|
68
|
+
* @interface ChunksApiInterface
|
|
69
|
+
*/
|
|
70
|
+
export interface ChunksApiInterface {
|
|
71
|
+
/**
|
|
72
|
+
* Create a new chunk with content. The chunk is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). Content is deduplicated by SHA256 hash.
|
|
73
|
+
* @summary Create Chunk Handler
|
|
74
|
+
* @param {CreateChunkRequest} createChunkRequest
|
|
75
|
+
* @param {string} [ksUat]
|
|
76
|
+
* @param {*} [options] Override http request option.
|
|
77
|
+
* @throws {RequiredError}
|
|
78
|
+
* @memberof ChunksApiInterface
|
|
79
|
+
*/
|
|
80
|
+
createChunkRaw(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Create a new chunk with content. The chunk is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). Content is deduplicated by SHA256 hash.
|
|
84
|
+
* Create Chunk Handler
|
|
85
|
+
*/
|
|
86
|
+
createChunk(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
90
|
+
* @summary Delete Chunk Handler
|
|
91
|
+
* @param {string} chunkId
|
|
92
|
+
* @param {string} [ksUat]
|
|
93
|
+
* @param {*} [options] Override http request option.
|
|
94
|
+
* @throws {RequiredError}
|
|
95
|
+
* @memberof ChunksApiInterface
|
|
96
|
+
*/
|
|
97
|
+
deleteChunkRaw(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
101
|
+
* Delete Chunk Handler
|
|
102
|
+
*/
|
|
103
|
+
deleteChunk(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Get a chunk by its ID, including content.
|
|
107
|
+
* @summary Get Chunk Handler
|
|
108
|
+
* @param {string} chunkId
|
|
109
|
+
* @param {string} [ksUat]
|
|
110
|
+
* @param {*} [options] Override http request option.
|
|
111
|
+
* @throws {RequiredError}
|
|
112
|
+
* @memberof ChunksApiInterface
|
|
113
|
+
*/
|
|
114
|
+
getChunkRaw(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Get a chunk by its ID, including content.
|
|
118
|
+
* Get Chunk Handler
|
|
119
|
+
*/
|
|
120
|
+
getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
|
|
124
|
+
* @summary Update Chunk Content Handler
|
|
125
|
+
* @param {string} chunkId
|
|
126
|
+
* @param {UpdateChunkContentRequest} updateChunkContentRequest
|
|
127
|
+
* @param {string} [ksUat]
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
* @memberof ChunksApiInterface
|
|
131
|
+
*/
|
|
132
|
+
updateChunkContentRaw(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
|
|
136
|
+
* Update Chunk Content Handler
|
|
137
|
+
*/
|
|
138
|
+
updateChunkContent(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
142
|
+
* @summary Update Chunk Metadata Handler
|
|
143
|
+
* @param {string} chunkId
|
|
144
|
+
* @param {UpdateChunkMetadataRequest} updateChunkMetadataRequest
|
|
145
|
+
* @param {string} [ksUat]
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
* @memberof ChunksApiInterface
|
|
149
|
+
*/
|
|
150
|
+
updateChunkMetadataRaw(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
154
|
+
* Update Chunk Metadata Handler
|
|
155
|
+
*/
|
|
156
|
+
updateChunkMetadata(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
157
|
+
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
*
|
|
162
|
+
*/
|
|
163
|
+
export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Create a new chunk with content. The chunk is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). Content is deduplicated by SHA256 hash.
|
|
167
|
+
* Create Chunk Handler
|
|
168
|
+
*/
|
|
169
|
+
async createChunkRaw(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>> {
|
|
170
|
+
if (requestParameters['createChunkRequest'] == null) {
|
|
171
|
+
throw new runtime.RequiredError(
|
|
172
|
+
'createChunkRequest',
|
|
173
|
+
'Required parameter "createChunkRequest" was null or undefined when calling createChunk().'
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const queryParameters: any = {};
|
|
178
|
+
|
|
179
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
180
|
+
|
|
181
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
let urlPath = `/v1/chunks`;
|
|
185
|
+
|
|
186
|
+
const response = await this.request({
|
|
187
|
+
path: urlPath,
|
|
188
|
+
method: 'POST',
|
|
189
|
+
headers: headerParameters,
|
|
190
|
+
query: queryParameters,
|
|
191
|
+
body: CreateChunkRequestToJSON(requestParameters['createChunkRequest']),
|
|
192
|
+
}, initOverrides);
|
|
193
|
+
|
|
194
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Create a new chunk with content. The chunk is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). Content is deduplicated by SHA256 hash.
|
|
199
|
+
* Create Chunk Handler
|
|
200
|
+
*/
|
|
201
|
+
async createChunk(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse> {
|
|
202
|
+
const response = await this.createChunkRaw(requestParameters, initOverrides);
|
|
203
|
+
return await response.value();
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
208
|
+
* Delete Chunk Handler
|
|
209
|
+
*/
|
|
210
|
+
async deleteChunkRaw(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
211
|
+
if (requestParameters['chunkId'] == null) {
|
|
212
|
+
throw new runtime.RequiredError(
|
|
213
|
+
'chunkId',
|
|
214
|
+
'Required parameter "chunkId" was null or undefined when calling deleteChunk().'
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const queryParameters: any = {};
|
|
219
|
+
|
|
220
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
let urlPath = `/v1/chunks/{chunk_id}`;
|
|
224
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
225
|
+
|
|
226
|
+
const response = await this.request({
|
|
227
|
+
path: urlPath,
|
|
228
|
+
method: 'DELETE',
|
|
229
|
+
headers: headerParameters,
|
|
230
|
+
query: queryParameters,
|
|
231
|
+
}, initOverrides);
|
|
232
|
+
|
|
233
|
+
return new runtime.VoidApiResponse(response);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
238
|
+
* Delete Chunk Handler
|
|
239
|
+
*/
|
|
240
|
+
async deleteChunk(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
241
|
+
await this.deleteChunkRaw(requestParameters, initOverrides);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Get a chunk by its ID, including content.
|
|
246
|
+
* Get Chunk Handler
|
|
247
|
+
*/
|
|
248
|
+
async getChunkRaw(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>> {
|
|
249
|
+
if (requestParameters['chunkId'] == null) {
|
|
250
|
+
throw new runtime.RequiredError(
|
|
251
|
+
'chunkId',
|
|
252
|
+
'Required parameter "chunkId" was null or undefined when calling getChunk().'
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const queryParameters: any = {};
|
|
257
|
+
|
|
258
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
let urlPath = `/v1/chunks/{chunk_id}`;
|
|
262
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
263
|
+
|
|
264
|
+
const response = await this.request({
|
|
265
|
+
path: urlPath,
|
|
266
|
+
method: 'GET',
|
|
267
|
+
headers: headerParameters,
|
|
268
|
+
query: queryParameters,
|
|
269
|
+
}, initOverrides);
|
|
270
|
+
|
|
271
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Get a chunk by its ID, including content.
|
|
276
|
+
* Get Chunk Handler
|
|
277
|
+
*/
|
|
278
|
+
async getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse> {
|
|
279
|
+
const response = await this.getChunkRaw(requestParameters, initOverrides);
|
|
280
|
+
return await response.value();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
|
|
285
|
+
* Update Chunk Content Handler
|
|
286
|
+
*/
|
|
287
|
+
async updateChunkContentRaw(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>> {
|
|
288
|
+
if (requestParameters['chunkId'] == null) {
|
|
289
|
+
throw new runtime.RequiredError(
|
|
290
|
+
'chunkId',
|
|
291
|
+
'Required parameter "chunkId" was null or undefined when calling updateChunkContent().'
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (requestParameters['updateChunkContentRequest'] == null) {
|
|
296
|
+
throw new runtime.RequiredError(
|
|
297
|
+
'updateChunkContentRequest',
|
|
298
|
+
'Required parameter "updateChunkContentRequest" was null or undefined when calling updateChunkContent().'
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const queryParameters: any = {};
|
|
303
|
+
|
|
304
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
305
|
+
|
|
306
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
let urlPath = `/v1/chunks/{chunk_id}/content`;
|
|
310
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
311
|
+
|
|
312
|
+
const response = await this.request({
|
|
313
|
+
path: urlPath,
|
|
314
|
+
method: 'PATCH',
|
|
315
|
+
headers: headerParameters,
|
|
316
|
+
query: queryParameters,
|
|
317
|
+
body: UpdateChunkContentRequestToJSON(requestParameters['updateChunkContentRequest']),
|
|
318
|
+
}, initOverrides);
|
|
319
|
+
|
|
320
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
|
|
325
|
+
* Update Chunk Content Handler
|
|
326
|
+
*/
|
|
327
|
+
async updateChunkContent(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse> {
|
|
328
|
+
const response = await this.updateChunkContentRaw(requestParameters, initOverrides);
|
|
329
|
+
return await response.value();
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
334
|
+
* Update Chunk Metadata Handler
|
|
335
|
+
*/
|
|
336
|
+
async updateChunkMetadataRaw(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>> {
|
|
337
|
+
if (requestParameters['chunkId'] == null) {
|
|
338
|
+
throw new runtime.RequiredError(
|
|
339
|
+
'chunkId',
|
|
340
|
+
'Required parameter "chunkId" was null or undefined when calling updateChunkMetadata().'
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
if (requestParameters['updateChunkMetadataRequest'] == null) {
|
|
345
|
+
throw new runtime.RequiredError(
|
|
346
|
+
'updateChunkMetadataRequest',
|
|
347
|
+
'Required parameter "updateChunkMetadataRequest" was null or undefined when calling updateChunkMetadata().'
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
const queryParameters: any = {};
|
|
352
|
+
|
|
353
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
354
|
+
|
|
355
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
let urlPath = `/v1/chunks/{chunk_id}/metadata`;
|
|
359
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
360
|
+
|
|
361
|
+
const response = await this.request({
|
|
362
|
+
path: urlPath,
|
|
363
|
+
method: 'PATCH',
|
|
364
|
+
headers: headerParameters,
|
|
365
|
+
query: queryParameters,
|
|
366
|
+
body: UpdateChunkMetadataRequestToJSON(requestParameters['updateChunkMetadataRequest']),
|
|
367
|
+
}, initOverrides);
|
|
368
|
+
|
|
369
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
374
|
+
* Update Chunk Metadata Handler
|
|
375
|
+
*/
|
|
376
|
+
async updateChunkMetadata(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse> {
|
|
377
|
+
const response = await this.updateChunkMetadataRaw(requestParameters, initOverrides);
|
|
378
|
+
return await response.value();
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
}
|
package/src/apis/PathPartsApi.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
HTTPValidationError,
|
|
19
19
|
PaginatedResponsePathPartResponse,
|
|
20
20
|
PathOrder,
|
|
21
|
+
PathPartResponse,
|
|
21
22
|
} from '../models/index';
|
|
22
23
|
import {
|
|
23
24
|
HTTPValidationErrorFromJSON,
|
|
@@ -26,8 +27,15 @@ import {
|
|
|
26
27
|
PaginatedResponsePathPartResponseToJSON,
|
|
27
28
|
PathOrderFromJSON,
|
|
28
29
|
PathOrderToJSON,
|
|
30
|
+
PathPartResponseFromJSON,
|
|
31
|
+
PathPartResponseToJSON,
|
|
29
32
|
} from '../models/index';
|
|
30
33
|
|
|
34
|
+
export interface GetPathPartRequest {
|
|
35
|
+
pathPartId: string;
|
|
36
|
+
ksUat?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
31
39
|
export interface ListPathPartsRequest {
|
|
32
40
|
parentId?: string;
|
|
33
41
|
includeDocuments?: boolean;
|
|
@@ -45,6 +53,23 @@ export interface ListPathPartsRequest {
|
|
|
45
53
|
* @interface PathPartsApiInterface
|
|
46
54
|
*/
|
|
47
55
|
export interface PathPartsApiInterface {
|
|
56
|
+
/**
|
|
57
|
+
* Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
|
|
58
|
+
* @summary Get Path Part Handler
|
|
59
|
+
* @param {string} pathPartId
|
|
60
|
+
* @param {string} [ksUat]
|
|
61
|
+
* @param {*} [options] Override http request option.
|
|
62
|
+
* @throws {RequiredError}
|
|
63
|
+
* @memberof PathPartsApiInterface
|
|
64
|
+
*/
|
|
65
|
+
getPathPartRaw(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartResponse>>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
|
|
69
|
+
* Get Path Part Handler
|
|
70
|
+
*/
|
|
71
|
+
getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
|
|
72
|
+
|
|
48
73
|
/**
|
|
49
74
|
* List path parts under a parent with flexible filtering and traversal. This is a generic endpoint for traversing the path hierarchy. It can return folders, documents, or both depending on the filters provided. - If parent_id is not provided, lists contents of the root folder. - If include_documents is True, includes both FOLDER and DOCUMENT types. Documents act as traversal boundaries (their children are not traversed). - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT.
|
|
50
75
|
* @summary List Path Parts Handler
|
|
@@ -74,6 +99,45 @@ export interface PathPartsApiInterface {
|
|
|
74
99
|
*/
|
|
75
100
|
export class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterface {
|
|
76
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
|
|
104
|
+
* Get Path Part Handler
|
|
105
|
+
*/
|
|
106
|
+
async getPathPartRaw(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartResponse>> {
|
|
107
|
+
if (requestParameters['pathPartId'] == null) {
|
|
108
|
+
throw new runtime.RequiredError(
|
|
109
|
+
'pathPartId',
|
|
110
|
+
'Required parameter "pathPartId" was null or undefined when calling getPathPart().'
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const queryParameters: any = {};
|
|
115
|
+
|
|
116
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
let urlPath = `/v1/path-parts/{path_part_id}`;
|
|
120
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
121
|
+
|
|
122
|
+
const response = await this.request({
|
|
123
|
+
path: urlPath,
|
|
124
|
+
method: 'GET',
|
|
125
|
+
headers: headerParameters,
|
|
126
|
+
query: queryParameters,
|
|
127
|
+
}, initOverrides);
|
|
128
|
+
|
|
129
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PathPartResponseFromJSON(jsonValue));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
|
|
134
|
+
* Get Path Part Handler
|
|
135
|
+
*/
|
|
136
|
+
async getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse> {
|
|
137
|
+
const response = await this.getPathPartRaw(requestParameters, initOverrides);
|
|
138
|
+
return await response.value();
|
|
139
|
+
}
|
|
140
|
+
|
|
77
141
|
/**
|
|
78
142
|
* List path parts under a parent with flexible filtering and traversal. This is a generic endpoint for traversing the path hierarchy. It can return folders, documents, or both depending on the filters provided. - If parent_id is not provided, lists contents of the root folder. - If include_documents is True, includes both FOLDER and DOCUMENT types. Documents act as traversal boundaries (their children are not traversed). - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT.
|
|
79
143
|
* List Path Parts Handler
|