@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,305 @@
|
|
|
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
|
+
CreateSectionRequest,
|
|
19
|
+
HTTPValidationError,
|
|
20
|
+
SectionResponse,
|
|
21
|
+
UpdateSectionRequest,
|
|
22
|
+
} from '../models/index';
|
|
23
|
+
import {
|
|
24
|
+
CreateSectionRequestFromJSON,
|
|
25
|
+
CreateSectionRequestToJSON,
|
|
26
|
+
HTTPValidationErrorFromJSON,
|
|
27
|
+
HTTPValidationErrorToJSON,
|
|
28
|
+
SectionResponseFromJSON,
|
|
29
|
+
SectionResponseToJSON,
|
|
30
|
+
UpdateSectionRequestFromJSON,
|
|
31
|
+
UpdateSectionRequestToJSON,
|
|
32
|
+
} from '../models/index';
|
|
33
|
+
|
|
34
|
+
export interface CreateSectionOperationRequest {
|
|
35
|
+
createSectionRequest: CreateSectionRequest;
|
|
36
|
+
ksUat?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface DeleteSectionRequest {
|
|
40
|
+
sectionId: string;
|
|
41
|
+
ksUat?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface GetSectionRequest {
|
|
45
|
+
sectionId: string;
|
|
46
|
+
ksUat?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface UpdateSectionOperationRequest {
|
|
50
|
+
sectionId: string;
|
|
51
|
+
updateSectionRequest: UpdateSectionRequest;
|
|
52
|
+
ksUat?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* SectionsApi - interface
|
|
57
|
+
*
|
|
58
|
+
* @export
|
|
59
|
+
* @interface SectionsApiInterface
|
|
60
|
+
*/
|
|
61
|
+
export interface SectionsApiInterface {
|
|
62
|
+
/**
|
|
63
|
+
* Create a new section. The section is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). If prev_sibling_path_id is provided, the section is inserted after that sibling; otherwise it is appended to the end of the sibling list.
|
|
64
|
+
* @summary Create Section Handler
|
|
65
|
+
* @param {CreateSectionRequest} createSectionRequest
|
|
66
|
+
* @param {string} [ksUat]
|
|
67
|
+
* @param {*} [options] Override http request option.
|
|
68
|
+
* @throws {RequiredError}
|
|
69
|
+
* @memberof SectionsApiInterface
|
|
70
|
+
*/
|
|
71
|
+
createSectionRaw(requestParameters: CreateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>>;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Create a new section. The section is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). If prev_sibling_path_id is provided, the section is inserted after that sibling; otherwise it is appended to the end of the sibling list.
|
|
75
|
+
* Create Section Handler
|
|
76
|
+
*/
|
|
77
|
+
createSection(requestParameters: CreateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Delete a section and all its children. WARNING: This cascades to all child sections due to parent_id ON DELETE CASCADE.
|
|
81
|
+
* @summary Delete Section Handler
|
|
82
|
+
* @param {string} sectionId
|
|
83
|
+
* @param {string} [ksUat]
|
|
84
|
+
* @param {*} [options] Override http request option.
|
|
85
|
+
* @throws {RequiredError}
|
|
86
|
+
* @memberof SectionsApiInterface
|
|
87
|
+
*/
|
|
88
|
+
deleteSectionRaw(requestParameters: DeleteSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Delete a section and all its children. WARNING: This cascades to all child sections due to parent_id ON DELETE CASCADE.
|
|
92
|
+
* Delete Section Handler
|
|
93
|
+
*/
|
|
94
|
+
deleteSection(requestParameters: DeleteSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Get a section by its ID.
|
|
98
|
+
* @summary Get Section Handler
|
|
99
|
+
* @param {string} sectionId
|
|
100
|
+
* @param {string} [ksUat]
|
|
101
|
+
* @param {*} [options] Override http request option.
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
* @memberof SectionsApiInterface
|
|
104
|
+
*/
|
|
105
|
+
getSectionRaw(requestParameters: GetSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Get a section by its ID.
|
|
109
|
+
* Get Section Handler
|
|
110
|
+
*/
|
|
111
|
+
getSection(requestParameters: GetSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Update a section. Can update name, page_number, and/or reorder within siblings. To move: provide prev_sibling_path_id OR move_to_head (not both). Moving is only allowed within the same document version. Note: Section names can contain any characters. The corresponding path_part.name will be automatically normalized by a database trigger.
|
|
115
|
+
* @summary Update Section Handler
|
|
116
|
+
* @param {string} sectionId
|
|
117
|
+
* @param {UpdateSectionRequest} updateSectionRequest
|
|
118
|
+
* @param {string} [ksUat]
|
|
119
|
+
* @param {*} [options] Override http request option.
|
|
120
|
+
* @throws {RequiredError}
|
|
121
|
+
* @memberof SectionsApiInterface
|
|
122
|
+
*/
|
|
123
|
+
updateSectionRaw(requestParameters: UpdateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Update a section. Can update name, page_number, and/or reorder within siblings. To move: provide prev_sibling_path_id OR move_to_head (not both). Moving is only allowed within the same document version. Note: Section names can contain any characters. The corresponding path_part.name will be automatically normalized by a database trigger.
|
|
127
|
+
* Update Section Handler
|
|
128
|
+
*/
|
|
129
|
+
updateSection(requestParameters: UpdateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
|
|
130
|
+
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
*/
|
|
136
|
+
export class SectionsApi extends runtime.BaseAPI implements SectionsApiInterface {
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Create a new section. The section is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). If prev_sibling_path_id is provided, the section is inserted after that sibling; otherwise it is appended to the end of the sibling list.
|
|
140
|
+
* Create Section Handler
|
|
141
|
+
*/
|
|
142
|
+
async createSectionRaw(requestParameters: CreateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>> {
|
|
143
|
+
if (requestParameters['createSectionRequest'] == null) {
|
|
144
|
+
throw new runtime.RequiredError(
|
|
145
|
+
'createSectionRequest',
|
|
146
|
+
'Required parameter "createSectionRequest" was null or undefined when calling createSection().'
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const queryParameters: any = {};
|
|
151
|
+
|
|
152
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
153
|
+
|
|
154
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
let urlPath = `/v1/sections`;
|
|
158
|
+
|
|
159
|
+
const response = await this.request({
|
|
160
|
+
path: urlPath,
|
|
161
|
+
method: 'POST',
|
|
162
|
+
headers: headerParameters,
|
|
163
|
+
query: queryParameters,
|
|
164
|
+
body: CreateSectionRequestToJSON(requestParameters['createSectionRequest']),
|
|
165
|
+
}, initOverrides);
|
|
166
|
+
|
|
167
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SectionResponseFromJSON(jsonValue));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Create a new section. The section is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). If prev_sibling_path_id is provided, the section is inserted after that sibling; otherwise it is appended to the end of the sibling list.
|
|
172
|
+
* Create Section Handler
|
|
173
|
+
*/
|
|
174
|
+
async createSection(requestParameters: CreateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse> {
|
|
175
|
+
const response = await this.createSectionRaw(requestParameters, initOverrides);
|
|
176
|
+
return await response.value();
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Delete a section and all its children. WARNING: This cascades to all child sections due to parent_id ON DELETE CASCADE.
|
|
181
|
+
* Delete Section Handler
|
|
182
|
+
*/
|
|
183
|
+
async deleteSectionRaw(requestParameters: DeleteSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
184
|
+
if (requestParameters['sectionId'] == null) {
|
|
185
|
+
throw new runtime.RequiredError(
|
|
186
|
+
'sectionId',
|
|
187
|
+
'Required parameter "sectionId" was null or undefined when calling deleteSection().'
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const queryParameters: any = {};
|
|
192
|
+
|
|
193
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
let urlPath = `/v1/sections/{section_id}`;
|
|
197
|
+
urlPath = urlPath.replace(`{${"section_id"}}`, encodeURIComponent(String(requestParameters['sectionId'])));
|
|
198
|
+
|
|
199
|
+
const response = await this.request({
|
|
200
|
+
path: urlPath,
|
|
201
|
+
method: 'DELETE',
|
|
202
|
+
headers: headerParameters,
|
|
203
|
+
query: queryParameters,
|
|
204
|
+
}, initOverrides);
|
|
205
|
+
|
|
206
|
+
return new runtime.VoidApiResponse(response);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Delete a section and all its children. WARNING: This cascades to all child sections due to parent_id ON DELETE CASCADE.
|
|
211
|
+
* Delete Section Handler
|
|
212
|
+
*/
|
|
213
|
+
async deleteSection(requestParameters: DeleteSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
214
|
+
await this.deleteSectionRaw(requestParameters, initOverrides);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Get a section by its ID.
|
|
219
|
+
* Get Section Handler
|
|
220
|
+
*/
|
|
221
|
+
async getSectionRaw(requestParameters: GetSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>> {
|
|
222
|
+
if (requestParameters['sectionId'] == null) {
|
|
223
|
+
throw new runtime.RequiredError(
|
|
224
|
+
'sectionId',
|
|
225
|
+
'Required parameter "sectionId" was null or undefined when calling getSection().'
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const queryParameters: any = {};
|
|
230
|
+
|
|
231
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
let urlPath = `/v1/sections/{section_id}`;
|
|
235
|
+
urlPath = urlPath.replace(`{${"section_id"}}`, encodeURIComponent(String(requestParameters['sectionId'])));
|
|
236
|
+
|
|
237
|
+
const response = await this.request({
|
|
238
|
+
path: urlPath,
|
|
239
|
+
method: 'GET',
|
|
240
|
+
headers: headerParameters,
|
|
241
|
+
query: queryParameters,
|
|
242
|
+
}, initOverrides);
|
|
243
|
+
|
|
244
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SectionResponseFromJSON(jsonValue));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Get a section by its ID.
|
|
249
|
+
* Get Section Handler
|
|
250
|
+
*/
|
|
251
|
+
async getSection(requestParameters: GetSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse> {
|
|
252
|
+
const response = await this.getSectionRaw(requestParameters, initOverrides);
|
|
253
|
+
return await response.value();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Update a section. Can update name, page_number, and/or reorder within siblings. To move: provide prev_sibling_path_id OR move_to_head (not both). Moving is only allowed within the same document version. Note: Section names can contain any characters. The corresponding path_part.name will be automatically normalized by a database trigger.
|
|
258
|
+
* Update Section Handler
|
|
259
|
+
*/
|
|
260
|
+
async updateSectionRaw(requestParameters: UpdateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>> {
|
|
261
|
+
if (requestParameters['sectionId'] == null) {
|
|
262
|
+
throw new runtime.RequiredError(
|
|
263
|
+
'sectionId',
|
|
264
|
+
'Required parameter "sectionId" was null or undefined when calling updateSection().'
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (requestParameters['updateSectionRequest'] == null) {
|
|
269
|
+
throw new runtime.RequiredError(
|
|
270
|
+
'updateSectionRequest',
|
|
271
|
+
'Required parameter "updateSectionRequest" was null or undefined when calling updateSection().'
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const queryParameters: any = {};
|
|
276
|
+
|
|
277
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
278
|
+
|
|
279
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
let urlPath = `/v1/sections/{section_id}`;
|
|
283
|
+
urlPath = urlPath.replace(`{${"section_id"}}`, encodeURIComponent(String(requestParameters['sectionId'])));
|
|
284
|
+
|
|
285
|
+
const response = await this.request({
|
|
286
|
+
path: urlPath,
|
|
287
|
+
method: 'PATCH',
|
|
288
|
+
headers: headerParameters,
|
|
289
|
+
query: queryParameters,
|
|
290
|
+
body: UpdateSectionRequestToJSON(requestParameters['updateSectionRequest']),
|
|
291
|
+
}, initOverrides);
|
|
292
|
+
|
|
293
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SectionResponseFromJSON(jsonValue));
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Update a section. Can update name, page_number, and/or reorder within siblings. To move: provide prev_sibling_path_id OR move_to_head (not both). Moving is only allowed within the same document version. Note: Section names can contain any characters. The corresponding path_part.name will be automatically normalized by a database trigger.
|
|
298
|
+
* Update Section Handler
|
|
299
|
+
*/
|
|
300
|
+
async updateSection(requestParameters: UpdateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse> {
|
|
301
|
+
const response = await this.updateSectionRaw(requestParameters, initOverrides);
|
|
302
|
+
return await response.value();
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export * from './AuthApi';
|
|
4
|
+
export * from './ChunksApi';
|
|
4
5
|
export * from './DefaultApi';
|
|
5
6
|
export * from './DocumentVersionsApi';
|
|
6
7
|
export * from './DocumentsApi';
|
|
7
8
|
export * from './FoldersApi';
|
|
8
9
|
export * from './InvitesApi';
|
|
9
10
|
export * from './PathPartsApi';
|
|
11
|
+
export * from './SectionsApi';
|
|
10
12
|
export * from './TenantsApi';
|
|
11
13
|
export * from './UsersApi';
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { PolygonReference } from './PolygonReference';
|
|
17
|
+
import {
|
|
18
|
+
PolygonReferenceFromJSON,
|
|
19
|
+
PolygonReferenceFromJSONTyped,
|
|
20
|
+
PolygonReferenceToJSON,
|
|
21
|
+
PolygonReferenceToJSONTyped,
|
|
22
|
+
} from './PolygonReference';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Metadata for a chunk including source document references.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ChunkMetadataInput
|
|
28
|
+
*/
|
|
29
|
+
export interface ChunkMetadataInput {
|
|
30
|
+
/**
|
|
31
|
+
* List of bounding boxes in the source document for the chunk, potentially from multiple areas of multiple pages.
|
|
32
|
+
* @type {Array<PolygonReference>}
|
|
33
|
+
* @memberof ChunkMetadataInput
|
|
34
|
+
*/
|
|
35
|
+
polygons?: Array<PolygonReference>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the ChunkMetadataInput interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfChunkMetadataInput(value: object): value is ChunkMetadataInput {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ChunkMetadataInputFromJSON(json: any): ChunkMetadataInput {
|
|
46
|
+
return ChunkMetadataInputFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ChunkMetadataInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkMetadataInput {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'polygons': json['polygons'] == null ? undefined : ((json['polygons'] as Array<any>).map(PolygonReferenceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ChunkMetadataInputToJSON(json: any): ChunkMetadataInput {
|
|
60
|
+
return ChunkMetadataInputToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ChunkMetadataInputToJSONTyped(value?: ChunkMetadataInput | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'polygons': value['polygons'] == null ? undefined : ((value['polygons'] as Array<any>).map(PolygonReferenceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const ChunkMetadataInputPropertyValidationAttributesMap: {
|
|
75
|
+
[property: string]: {
|
|
76
|
+
maxLength?: number,
|
|
77
|
+
minLength?: number,
|
|
78
|
+
pattern?: string,
|
|
79
|
+
maximum?: number,
|
|
80
|
+
exclusiveMaximum?: boolean,
|
|
81
|
+
minimum?: number,
|
|
82
|
+
exclusiveMinimum?: boolean,
|
|
83
|
+
multipleOf?: number,
|
|
84
|
+
maxItems?: number,
|
|
85
|
+
minItems?: number,
|
|
86
|
+
uniqueItems?: boolean
|
|
87
|
+
}
|
|
88
|
+
} = {
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { PolygonReference } from './PolygonReference';
|
|
17
|
+
import {
|
|
18
|
+
PolygonReferenceFromJSON,
|
|
19
|
+
PolygonReferenceFromJSONTyped,
|
|
20
|
+
PolygonReferenceToJSON,
|
|
21
|
+
PolygonReferenceToJSONTyped,
|
|
22
|
+
} from './PolygonReference';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Metadata for a chunk including source document references.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ChunkMetadataOutput
|
|
28
|
+
*/
|
|
29
|
+
export interface ChunkMetadataOutput {
|
|
30
|
+
/**
|
|
31
|
+
* List of bounding boxes in the source document for the chunk, potentially from multiple areas of multiple pages.
|
|
32
|
+
* @type {Array<PolygonReference>}
|
|
33
|
+
* @memberof ChunkMetadataOutput
|
|
34
|
+
*/
|
|
35
|
+
polygons?: Array<PolygonReference>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the ChunkMetadataOutput interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfChunkMetadataOutput(value: object): value is ChunkMetadataOutput {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ChunkMetadataOutputFromJSON(json: any): ChunkMetadataOutput {
|
|
46
|
+
return ChunkMetadataOutputFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ChunkMetadataOutputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkMetadataOutput {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'polygons': json['polygons'] == null ? undefined : ((json['polygons'] as Array<any>).map(PolygonReferenceFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ChunkMetadataOutputToJSON(json: any): ChunkMetadataOutput {
|
|
60
|
+
return ChunkMetadataOutputToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ChunkMetadataOutputToJSONTyped(value?: ChunkMetadataOutput | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'polygons': value['polygons'] == null ? undefined : ((value['polygons'] as Array<any>).map(PolygonReferenceToJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const ChunkMetadataOutputPropertyValidationAttributesMap: {
|
|
75
|
+
[property: string]: {
|
|
76
|
+
maxLength?: number,
|
|
77
|
+
minLength?: number,
|
|
78
|
+
pattern?: string,
|
|
79
|
+
maximum?: number,
|
|
80
|
+
exclusiveMaximum?: boolean,
|
|
81
|
+
minimum?: number,
|
|
82
|
+
exclusiveMinimum?: boolean,
|
|
83
|
+
multipleOf?: number,
|
|
84
|
+
maxItems?: number,
|
|
85
|
+
minItems?: number,
|
|
86
|
+
uniqueItems?: boolean
|
|
87
|
+
}
|
|
88
|
+
} = {
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,197 @@
|
|
|
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 { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
17
|
+
import {
|
|
18
|
+
ChunkMetadataOutputFromJSON,
|
|
19
|
+
ChunkMetadataOutputFromJSONTyped,
|
|
20
|
+
ChunkMetadataOutputToJSON,
|
|
21
|
+
ChunkMetadataOutputToJSONTyped,
|
|
22
|
+
} from './ChunkMetadataOutput';
|
|
23
|
+
import type { ChunkType } from './ChunkType';
|
|
24
|
+
import {
|
|
25
|
+
ChunkTypeFromJSON,
|
|
26
|
+
ChunkTypeFromJSONTyped,
|
|
27
|
+
ChunkTypeToJSON,
|
|
28
|
+
ChunkTypeToJSONTyped,
|
|
29
|
+
} from './ChunkType';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Chunk response model.
|
|
33
|
+
* @export
|
|
34
|
+
* @interface ChunkResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface ChunkResponse {
|
|
37
|
+
/**
|
|
38
|
+
* Chunk ID
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ChunkResponse
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
/**
|
|
44
|
+
* PathPart ID
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ChunkResponse
|
|
47
|
+
*/
|
|
48
|
+
pathPartId: string;
|
|
49
|
+
/**
|
|
50
|
+
* ChunkContent ID
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof ChunkResponse
|
|
53
|
+
*/
|
|
54
|
+
contentId: string;
|
|
55
|
+
/**
|
|
56
|
+
* Chunk text content
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof ChunkResponse
|
|
59
|
+
*/
|
|
60
|
+
content: string;
|
|
61
|
+
/**
|
|
62
|
+
* Type of chunk content
|
|
63
|
+
* @type {ChunkType}
|
|
64
|
+
* @memberof ChunkResponse
|
|
65
|
+
*/
|
|
66
|
+
chunkType: ChunkType;
|
|
67
|
+
/**
|
|
68
|
+
* Chunk metadata
|
|
69
|
+
* @type {ChunkMetadataOutput}
|
|
70
|
+
* @memberof ChunkResponse
|
|
71
|
+
*/
|
|
72
|
+
chunkMetadata: ChunkMetadataOutput;
|
|
73
|
+
/**
|
|
74
|
+
* Parent PathPart ID
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof ChunkResponse
|
|
77
|
+
*/
|
|
78
|
+
parentId: string;
|
|
79
|
+
/**
|
|
80
|
+
* Previous sibling PathPart ID
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof ChunkResponse
|
|
83
|
+
*/
|
|
84
|
+
prevSiblingPathId?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Next sibling PathPart ID
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof ChunkResponse
|
|
89
|
+
*/
|
|
90
|
+
nextSiblingId?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Tenant ID
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof ChunkResponse
|
|
95
|
+
*/
|
|
96
|
+
tenantId: string;
|
|
97
|
+
/**
|
|
98
|
+
* Creation timestamp
|
|
99
|
+
* @type {Date}
|
|
100
|
+
* @memberof ChunkResponse
|
|
101
|
+
*/
|
|
102
|
+
createdAt: Date;
|
|
103
|
+
/**
|
|
104
|
+
* Last update timestamp
|
|
105
|
+
* @type {Date}
|
|
106
|
+
* @memberof ChunkResponse
|
|
107
|
+
*/
|
|
108
|
+
updatedAt: Date;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Check if a given object implements the ChunkResponse interface.
|
|
115
|
+
*/
|
|
116
|
+
export function instanceOfChunkResponse(value: object): value is ChunkResponse {
|
|
117
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
118
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
|
|
119
|
+
if (!('contentId' in value) || value['contentId'] === undefined) return false;
|
|
120
|
+
if (!('content' in value) || value['content'] === undefined) return false;
|
|
121
|
+
if (!('chunkType' in value) || value['chunkType'] === undefined) return false;
|
|
122
|
+
if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined) return false;
|
|
123
|
+
if (!('parentId' in value) || value['parentId'] === undefined) return false;
|
|
124
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
|
|
125
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
126
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function ChunkResponseFromJSON(json: any): ChunkResponse {
|
|
131
|
+
return ChunkResponseFromJSONTyped(json, false);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function ChunkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkResponse {
|
|
135
|
+
if (json == null) {
|
|
136
|
+
return json;
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
|
|
140
|
+
'id': json['id'],
|
|
141
|
+
'pathPartId': json['path_part_id'],
|
|
142
|
+
'contentId': json['content_id'],
|
|
143
|
+
'content': json['content'],
|
|
144
|
+
'chunkType': ChunkTypeFromJSON(json['chunk_type']),
|
|
145
|
+
'chunkMetadata': ChunkMetadataOutputFromJSON(json['chunk_metadata']),
|
|
146
|
+
'parentId': json['parent_id'],
|
|
147
|
+
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
148
|
+
'nextSiblingId': json['next_sibling_id'] == null ? undefined : json['next_sibling_id'],
|
|
149
|
+
'tenantId': json['tenant_id'],
|
|
150
|
+
'createdAt': (new Date(json['created_at'])),
|
|
151
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function ChunkResponseToJSON(json: any): ChunkResponse {
|
|
156
|
+
return ChunkResponseToJSONTyped(json, false);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function ChunkResponseToJSONTyped(value?: ChunkResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
160
|
+
if (value == null) {
|
|
161
|
+
return value;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
return {
|
|
165
|
+
|
|
166
|
+
'id': value['id'],
|
|
167
|
+
'path_part_id': value['pathPartId'],
|
|
168
|
+
'content_id': value['contentId'],
|
|
169
|
+
'content': value['content'],
|
|
170
|
+
'chunk_type': ChunkTypeToJSON(value['chunkType']),
|
|
171
|
+
'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
|
|
172
|
+
'parent_id': value['parentId'],
|
|
173
|
+
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
174
|
+
'next_sibling_id': value['nextSiblingId'],
|
|
175
|
+
'tenant_id': value['tenantId'],
|
|
176
|
+
'created_at': value['createdAt'].toISOString(),
|
|
177
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export const ChunkResponsePropertyValidationAttributesMap: {
|
|
182
|
+
[property: string]: {
|
|
183
|
+
maxLength?: number,
|
|
184
|
+
minLength?: number,
|
|
185
|
+
pattern?: string,
|
|
186
|
+
maximum?: number,
|
|
187
|
+
exclusiveMaximum?: boolean,
|
|
188
|
+
minimum?: number,
|
|
189
|
+
exclusiveMinimum?: boolean,
|
|
190
|
+
multipleOf?: number,
|
|
191
|
+
maxItems?: number,
|
|
192
|
+
minItems?: number,
|
|
193
|
+
uniqueItems?: boolean
|
|
194
|
+
}
|
|
195
|
+
} = {
|
|
196
|
+
}
|
|
197
|
+
|