@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
package/.openapi-generator/FILES
CHANGED
|
@@ -4,19 +4,27 @@
|
|
|
4
4
|
README.md
|
|
5
5
|
package.json
|
|
6
6
|
src/apis/AuthApi.ts
|
|
7
|
+
src/apis/ChunksApi.ts
|
|
7
8
|
src/apis/DefaultApi.ts
|
|
8
9
|
src/apis/DocumentVersionsApi.ts
|
|
9
10
|
src/apis/DocumentsApi.ts
|
|
10
11
|
src/apis/FoldersApi.ts
|
|
11
12
|
src/apis/InvitesApi.ts
|
|
12
13
|
src/apis/PathPartsApi.ts
|
|
14
|
+
src/apis/SectionsApi.ts
|
|
13
15
|
src/apis/TenantsApi.ts
|
|
14
16
|
src/apis/UsersApi.ts
|
|
15
17
|
src/apis/index.ts
|
|
16
18
|
src/index.ts
|
|
19
|
+
src/models/ChunkMetadataInput.ts
|
|
20
|
+
src/models/ChunkMetadataOutput.ts
|
|
21
|
+
src/models/ChunkResponse.ts
|
|
22
|
+
src/models/ChunkType.ts
|
|
23
|
+
src/models/CreateChunkRequest.ts
|
|
17
24
|
src/models/CreateDocumentRequest.ts
|
|
18
25
|
src/models/CreateFolderRequest.ts
|
|
19
26
|
src/models/CreatePasswordUserRequest.ts
|
|
27
|
+
src/models/CreateSectionRequest.ts
|
|
20
28
|
src/models/CreateTenantRequest.ts
|
|
21
29
|
src/models/DocumentOrigin.ts
|
|
22
30
|
src/models/DocumentResponse.ts
|
|
@@ -44,13 +52,19 @@ src/models/PasswordResetRequest.ts
|
|
|
44
52
|
src/models/PasswordResetWithTokenRequest.ts
|
|
45
53
|
src/models/PathOrder.ts
|
|
46
54
|
src/models/PathPartResponse.ts
|
|
55
|
+
src/models/Polygon.ts
|
|
56
|
+
src/models/PolygonReference.ts
|
|
47
57
|
src/models/RootResponse.ts
|
|
58
|
+
src/models/SectionResponse.ts
|
|
48
59
|
src/models/SignInRequest.ts
|
|
49
60
|
src/models/TenantResponse.ts
|
|
50
61
|
src/models/TenantUserInTenantResponse.ts
|
|
51
62
|
src/models/TenantUserRole.ts
|
|
63
|
+
src/models/UpdateChunkContentRequest.ts
|
|
64
|
+
src/models/UpdateChunkMetadataRequest.ts
|
|
52
65
|
src/models/UpdateDocumentRequest.ts
|
|
53
66
|
src/models/UpdateFolderRequest.ts
|
|
67
|
+
src/models/UpdateSectionRequest.ts
|
|
54
68
|
src/models/UpdateTenantRequest.ts
|
|
55
69
|
src/models/UpdateUserRequest.ts
|
|
56
70
|
src/models/UserResponse.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @knowledge-stack/ksapi@1.
|
|
1
|
+
## @knowledge-stack/ksapi@1.8.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @knowledge-stack/ksapi@1.
|
|
39
|
+
npm install @knowledge-stack/ksapi@1.8.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { ChunkResponse, CreateChunkRequest, UpdateChunkContentRequest, UpdateChunkMetadataRequest } from '../models/index';
|
|
14
|
+
export interface CreateChunkOperationRequest {
|
|
15
|
+
createChunkRequest: CreateChunkRequest;
|
|
16
|
+
ksUat?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface DeleteChunkRequest {
|
|
19
|
+
chunkId: string;
|
|
20
|
+
ksUat?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface GetChunkRequest {
|
|
23
|
+
chunkId: string;
|
|
24
|
+
ksUat?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface UpdateChunkContentOperationRequest {
|
|
27
|
+
chunkId: string;
|
|
28
|
+
updateChunkContentRequest: UpdateChunkContentRequest;
|
|
29
|
+
ksUat?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface UpdateChunkMetadataOperationRequest {
|
|
32
|
+
chunkId: string;
|
|
33
|
+
updateChunkMetadataRequest: UpdateChunkMetadataRequest;
|
|
34
|
+
ksUat?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* ChunksApi - interface
|
|
38
|
+
*
|
|
39
|
+
* @export
|
|
40
|
+
* @interface ChunksApiInterface
|
|
41
|
+
*/
|
|
42
|
+
export interface ChunksApiInterface {
|
|
43
|
+
/**
|
|
44
|
+
* 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.
|
|
45
|
+
* @summary Create Chunk Handler
|
|
46
|
+
* @param {CreateChunkRequest} createChunkRequest
|
|
47
|
+
* @param {string} [ksUat]
|
|
48
|
+
* @param {*} [options] Override http request option.
|
|
49
|
+
* @throws {RequiredError}
|
|
50
|
+
* @memberof ChunksApiInterface
|
|
51
|
+
*/
|
|
52
|
+
createChunkRaw(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
53
|
+
/**
|
|
54
|
+
* 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.
|
|
55
|
+
* Create Chunk Handler
|
|
56
|
+
*/
|
|
57
|
+
createChunk(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
60
|
+
* @summary Delete Chunk Handler
|
|
61
|
+
* @param {string} chunkId
|
|
62
|
+
* @param {string} [ksUat]
|
|
63
|
+
* @param {*} [options] Override http request option.
|
|
64
|
+
* @throws {RequiredError}
|
|
65
|
+
* @memberof ChunksApiInterface
|
|
66
|
+
*/
|
|
67
|
+
deleteChunkRaw(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
68
|
+
/**
|
|
69
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
70
|
+
* Delete Chunk Handler
|
|
71
|
+
*/
|
|
72
|
+
deleteChunk(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Get a chunk by its ID, including content.
|
|
75
|
+
* @summary Get Chunk Handler
|
|
76
|
+
* @param {string} chunkId
|
|
77
|
+
* @param {string} [ksUat]
|
|
78
|
+
* @param {*} [options] Override http request option.
|
|
79
|
+
* @throws {RequiredError}
|
|
80
|
+
* @memberof ChunksApiInterface
|
|
81
|
+
*/
|
|
82
|
+
getChunkRaw(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
83
|
+
/**
|
|
84
|
+
* Get a chunk by its ID, including content.
|
|
85
|
+
* Get Chunk Handler
|
|
86
|
+
*/
|
|
87
|
+
getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
88
|
+
/**
|
|
89
|
+
* 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.
|
|
90
|
+
* @summary Update Chunk Content Handler
|
|
91
|
+
* @param {string} chunkId
|
|
92
|
+
* @param {UpdateChunkContentRequest} updateChunkContentRequest
|
|
93
|
+
* @param {string} [ksUat]
|
|
94
|
+
* @param {*} [options] Override http request option.
|
|
95
|
+
* @throws {RequiredError}
|
|
96
|
+
* @memberof ChunksApiInterface
|
|
97
|
+
*/
|
|
98
|
+
updateChunkContentRaw(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
99
|
+
/**
|
|
100
|
+
* 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.
|
|
101
|
+
* Update Chunk Content Handler
|
|
102
|
+
*/
|
|
103
|
+
updateChunkContent(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
104
|
+
/**
|
|
105
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
106
|
+
* @summary Update Chunk Metadata Handler
|
|
107
|
+
* @param {string} chunkId
|
|
108
|
+
* @param {UpdateChunkMetadataRequest} updateChunkMetadataRequest
|
|
109
|
+
* @param {string} [ksUat]
|
|
110
|
+
* @param {*} [options] Override http request option.
|
|
111
|
+
* @throws {RequiredError}
|
|
112
|
+
* @memberof ChunksApiInterface
|
|
113
|
+
*/
|
|
114
|
+
updateChunkMetadataRaw(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
115
|
+
/**
|
|
116
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
117
|
+
* Update Chunk Metadata Handler
|
|
118
|
+
*/
|
|
119
|
+
updateChunkMetadata(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
124
|
+
export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
125
|
+
/**
|
|
126
|
+
* 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.
|
|
127
|
+
* Create Chunk Handler
|
|
128
|
+
*/
|
|
129
|
+
createChunkRaw(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
130
|
+
/**
|
|
131
|
+
* 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.
|
|
132
|
+
* Create Chunk Handler
|
|
133
|
+
*/
|
|
134
|
+
createChunk(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
135
|
+
/**
|
|
136
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
137
|
+
* Delete Chunk Handler
|
|
138
|
+
*/
|
|
139
|
+
deleteChunkRaw(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
140
|
+
/**
|
|
141
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
142
|
+
* Delete Chunk Handler
|
|
143
|
+
*/
|
|
144
|
+
deleteChunk(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
145
|
+
/**
|
|
146
|
+
* Get a chunk by its ID, including content.
|
|
147
|
+
* Get Chunk Handler
|
|
148
|
+
*/
|
|
149
|
+
getChunkRaw(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
150
|
+
/**
|
|
151
|
+
* Get a chunk by its ID, including content.
|
|
152
|
+
* Get Chunk Handler
|
|
153
|
+
*/
|
|
154
|
+
getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
155
|
+
/**
|
|
156
|
+
* 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.
|
|
157
|
+
* Update Chunk Content Handler
|
|
158
|
+
*/
|
|
159
|
+
updateChunkContentRaw(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
160
|
+
/**
|
|
161
|
+
* 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.
|
|
162
|
+
* Update Chunk Content Handler
|
|
163
|
+
*/
|
|
164
|
+
updateChunkContent(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
165
|
+
/**
|
|
166
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
167
|
+
* Update Chunk Metadata Handler
|
|
168
|
+
*/
|
|
169
|
+
updateChunkMetadataRaw(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
170
|
+
/**
|
|
171
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
172
|
+
* Update Chunk Metadata Handler
|
|
173
|
+
*/
|
|
174
|
+
updateChunkMetadata(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
175
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ChunksApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class ChunksApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* 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.
|
|
34
|
+
* Create Chunk Handler
|
|
35
|
+
*/
|
|
36
|
+
createChunkRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['createChunkRequest'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('createChunkRequest', 'Required parameter "createChunkRequest" was null or undefined when calling createChunk().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
44
|
+
let urlPath = `/v1/chunks`;
|
|
45
|
+
const response = yield this.request({
|
|
46
|
+
path: urlPath,
|
|
47
|
+
method: 'POST',
|
|
48
|
+
headers: headerParameters,
|
|
49
|
+
query: queryParameters,
|
|
50
|
+
body: (0, index_1.CreateChunkRequestToJSON)(requestParameters['createChunkRequest']),
|
|
51
|
+
}, initOverrides);
|
|
52
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ChunkResponseFromJSON)(jsonValue));
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 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.
|
|
57
|
+
* Create Chunk Handler
|
|
58
|
+
*/
|
|
59
|
+
createChunk(requestParameters, initOverrides) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const response = yield this.createChunkRaw(requestParameters, initOverrides);
|
|
62
|
+
return yield response.value();
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
67
|
+
* Delete Chunk Handler
|
|
68
|
+
*/
|
|
69
|
+
deleteChunkRaw(requestParameters, initOverrides) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
if (requestParameters['chunkId'] == null) {
|
|
72
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling deleteChunk().');
|
|
73
|
+
}
|
|
74
|
+
const queryParameters = {};
|
|
75
|
+
const headerParameters = {};
|
|
76
|
+
let urlPath = `/v1/chunks/{chunk_id}`;
|
|
77
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
78
|
+
const response = yield this.request({
|
|
79
|
+
path: urlPath,
|
|
80
|
+
method: 'DELETE',
|
|
81
|
+
headers: headerParameters,
|
|
82
|
+
query: queryParameters,
|
|
83
|
+
}, initOverrides);
|
|
84
|
+
return new runtime.VoidApiResponse(response);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
89
|
+
* Delete Chunk Handler
|
|
90
|
+
*/
|
|
91
|
+
deleteChunk(requestParameters, initOverrides) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
yield this.deleteChunkRaw(requestParameters, initOverrides);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get a chunk by its ID, including content.
|
|
98
|
+
* Get Chunk Handler
|
|
99
|
+
*/
|
|
100
|
+
getChunkRaw(requestParameters, initOverrides) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
if (requestParameters['chunkId'] == null) {
|
|
103
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling getChunk().');
|
|
104
|
+
}
|
|
105
|
+
const queryParameters = {};
|
|
106
|
+
const headerParameters = {};
|
|
107
|
+
let urlPath = `/v1/chunks/{chunk_id}`;
|
|
108
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
109
|
+
const response = yield this.request({
|
|
110
|
+
path: urlPath,
|
|
111
|
+
method: 'GET',
|
|
112
|
+
headers: headerParameters,
|
|
113
|
+
query: queryParameters,
|
|
114
|
+
}, initOverrides);
|
|
115
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ChunkResponseFromJSON)(jsonValue));
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Get a chunk by its ID, including content.
|
|
120
|
+
* Get Chunk Handler
|
|
121
|
+
*/
|
|
122
|
+
getChunk(requestParameters, initOverrides) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
const response = yield this.getChunkRaw(requestParameters, initOverrides);
|
|
125
|
+
return yield response.value();
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* 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.
|
|
130
|
+
* Update Chunk Content Handler
|
|
131
|
+
*/
|
|
132
|
+
updateChunkContentRaw(requestParameters, initOverrides) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
if (requestParameters['chunkId'] == null) {
|
|
135
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling updateChunkContent().');
|
|
136
|
+
}
|
|
137
|
+
if (requestParameters['updateChunkContentRequest'] == null) {
|
|
138
|
+
throw new runtime.RequiredError('updateChunkContentRequest', 'Required parameter "updateChunkContentRequest" was null or undefined when calling updateChunkContent().');
|
|
139
|
+
}
|
|
140
|
+
const queryParameters = {};
|
|
141
|
+
const headerParameters = {};
|
|
142
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
143
|
+
let urlPath = `/v1/chunks/{chunk_id}/content`;
|
|
144
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
145
|
+
const response = yield this.request({
|
|
146
|
+
path: urlPath,
|
|
147
|
+
method: 'PATCH',
|
|
148
|
+
headers: headerParameters,
|
|
149
|
+
query: queryParameters,
|
|
150
|
+
body: (0, index_1.UpdateChunkContentRequestToJSON)(requestParameters['updateChunkContentRequest']),
|
|
151
|
+
}, initOverrides);
|
|
152
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ChunkResponseFromJSON)(jsonValue));
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* 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.
|
|
157
|
+
* Update Chunk Content Handler
|
|
158
|
+
*/
|
|
159
|
+
updateChunkContent(requestParameters, initOverrides) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
const response = yield this.updateChunkContentRaw(requestParameters, initOverrides);
|
|
162
|
+
return yield response.value();
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
167
|
+
* Update Chunk Metadata Handler
|
|
168
|
+
*/
|
|
169
|
+
updateChunkMetadataRaw(requestParameters, initOverrides) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
if (requestParameters['chunkId'] == null) {
|
|
172
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling updateChunkMetadata().');
|
|
173
|
+
}
|
|
174
|
+
if (requestParameters['updateChunkMetadataRequest'] == null) {
|
|
175
|
+
throw new runtime.RequiredError('updateChunkMetadataRequest', 'Required parameter "updateChunkMetadataRequest" was null or undefined when calling updateChunkMetadata().');
|
|
176
|
+
}
|
|
177
|
+
const queryParameters = {};
|
|
178
|
+
const headerParameters = {};
|
|
179
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
180
|
+
let urlPath = `/v1/chunks/{chunk_id}/metadata`;
|
|
181
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
182
|
+
const response = yield this.request({
|
|
183
|
+
path: urlPath,
|
|
184
|
+
method: 'PATCH',
|
|
185
|
+
headers: headerParameters,
|
|
186
|
+
query: queryParameters,
|
|
187
|
+
body: (0, index_1.UpdateChunkMetadataRequestToJSON)(requestParameters['updateChunkMetadataRequest']),
|
|
188
|
+
}, initOverrides);
|
|
189
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ChunkResponseFromJSON)(jsonValue));
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
194
|
+
* Update Chunk Metadata Handler
|
|
195
|
+
*/
|
|
196
|
+
updateChunkMetadata(requestParameters, initOverrides) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
const response = yield this.updateChunkMetadataRaw(requestParameters, initOverrides);
|
|
199
|
+
return yield response.value();
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
exports.ChunksApi = ChunksApi;
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { PaginatedResponsePathPartResponse, PathOrder } from '../models/index';
|
|
13
|
+
import type { PaginatedResponsePathPartResponse, PathOrder, PathPartResponse } from '../models/index';
|
|
14
|
+
export interface GetPathPartRequest {
|
|
15
|
+
pathPartId: string;
|
|
16
|
+
ksUat?: string;
|
|
17
|
+
}
|
|
14
18
|
export interface ListPathPartsRequest {
|
|
15
19
|
parentId?: string;
|
|
16
20
|
includeDocuments?: boolean;
|
|
@@ -27,6 +31,21 @@ export interface ListPathPartsRequest {
|
|
|
27
31
|
* @interface PathPartsApiInterface
|
|
28
32
|
*/
|
|
29
33
|
export interface PathPartsApiInterface {
|
|
34
|
+
/**
|
|
35
|
+
* Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
|
|
36
|
+
* @summary Get Path Part Handler
|
|
37
|
+
* @param {string} pathPartId
|
|
38
|
+
* @param {string} [ksUat]
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
* @memberof PathPartsApiInterface
|
|
42
|
+
*/
|
|
43
|
+
getPathPartRaw(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartResponse>>;
|
|
44
|
+
/**
|
|
45
|
+
* Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
|
|
46
|
+
* Get Path Part Handler
|
|
47
|
+
*/
|
|
48
|
+
getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
|
|
30
49
|
/**
|
|
31
50
|
* 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.
|
|
32
51
|
* @summary List Path Parts Handler
|
|
@@ -52,6 +71,16 @@ export interface PathPartsApiInterface {
|
|
|
52
71
|
*
|
|
53
72
|
*/
|
|
54
73
|
export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterface {
|
|
74
|
+
/**
|
|
75
|
+
* Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
|
|
76
|
+
* Get Path Part Handler
|
|
77
|
+
*/
|
|
78
|
+
getPathPartRaw(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartResponse>>;
|
|
79
|
+
/**
|
|
80
|
+
* Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
|
|
81
|
+
* Get Path Part Handler
|
|
82
|
+
*/
|
|
83
|
+
getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
|
|
55
84
|
/**
|
|
56
85
|
* 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.
|
|
57
86
|
* List Path Parts Handler
|
|
@@ -29,6 +29,38 @@ const index_1 = require("../models/index");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class PathPartsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
|
|
34
|
+
* Get Path Part Handler
|
|
35
|
+
*/
|
|
36
|
+
getPathPartRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['pathPartId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling getPathPart().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
let urlPath = `/v1/path-parts/{path_part_id}`;
|
|
44
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
45
|
+
const response = yield this.request({
|
|
46
|
+
path: urlPath,
|
|
47
|
+
method: 'GET',
|
|
48
|
+
headers: headerParameters,
|
|
49
|
+
query: queryParameters,
|
|
50
|
+
}, initOverrides);
|
|
51
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PathPartResponseFromJSON)(jsonValue));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
|
|
56
|
+
* Get Path Part Handler
|
|
57
|
+
*/
|
|
58
|
+
getPathPart(requestParameters, initOverrides) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const response = yield this.getPathPartRaw(requestParameters, initOverrides);
|
|
61
|
+
return yield response.value();
|
|
62
|
+
});
|
|
63
|
+
}
|
|
32
64
|
/**
|
|
33
65
|
* 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.
|
|
34
66
|
* List Path Parts Handler
|