@knowledge-stack/ksapi 1.10.0 → 1.11.1
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 +6 -0
- package/README.md +2 -2
- package/dist/apis/ChunkLineagesApi.d.ts +117 -0
- package/dist/apis/ChunkLineagesApi.js +140 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/ChunkLineagesApi.d.ts +117 -0
- package/dist/esm/apis/ChunkLineagesApi.js +136 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ChunkLineageResponse.d.ts +65 -0
- package/dist/esm/models/ChunkLineageResponse.js +56 -0
- package/dist/esm/models/CreateChunkLineageRequest.d.ts +53 -0
- package/dist/esm/models/CreateChunkLineageRequest.js +53 -0
- package/dist/esm/models/LineageEdgeResponse.d.ts +53 -0
- package/dist/esm/models/LineageEdgeResponse.js +48 -0
- package/dist/esm/models/LineageGraphResponse.d.ts +55 -0
- package/dist/esm/models/LineageGraphResponse.js +50 -0
- package/dist/esm/models/LineageNodeResponse.d.ts +85 -0
- package/dist/esm/models/LineageNodeResponse.js +70 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/ChunkLineageResponse.d.ts +65 -0
- package/dist/models/ChunkLineageResponse.js +64 -0
- package/dist/models/CreateChunkLineageRequest.d.ts +53 -0
- package/dist/models/CreateChunkLineageRequest.js +61 -0
- package/dist/models/LineageEdgeResponse.d.ts +53 -0
- package/dist/models/LineageEdgeResponse.js +56 -0
- package/dist/models/LineageGraphResponse.d.ts +55 -0
- package/dist/models/LineageGraphResponse.js +58 -0
- package/dist/models/LineageNodeResponse.d.ts +85 -0
- package/dist/models/LineageNodeResponse.js +78 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/package.json +1 -1
- package/src/apis/ChunkLineagesApi.ts +254 -0
- package/src/apis/index.ts +1 -0
- package/src/models/ChunkLineageResponse.ts +110 -0
- package/src/models/CreateChunkLineageRequest.ts +96 -0
- package/src/models/LineageEdgeResponse.ts +92 -0
- package/src/models/LineageGraphResponse.ts +107 -0
- package/src/models/LineageNodeResponse.ts +154 -0
- package/src/models/index.ts +5 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
README.md
|
|
5
5
|
package.json
|
|
6
6
|
src/apis/AuthApi.ts
|
|
7
|
+
src/apis/ChunkLineagesApi.ts
|
|
7
8
|
src/apis/ChunksApi.ts
|
|
8
9
|
src/apis/DefaultApi.ts
|
|
9
10
|
src/apis/DocumentVersionsApi.ts
|
|
@@ -18,10 +19,12 @@ src/apis/ThreadsApi.ts
|
|
|
18
19
|
src/apis/UsersApi.ts
|
|
19
20
|
src/apis/index.ts
|
|
20
21
|
src/index.ts
|
|
22
|
+
src/models/ChunkLineageResponse.ts
|
|
21
23
|
src/models/ChunkMetadataInput.ts
|
|
22
24
|
src/models/ChunkMetadataOutput.ts
|
|
23
25
|
src/models/ChunkResponse.ts
|
|
24
26
|
src/models/ChunkType.ts
|
|
27
|
+
src/models/CreateChunkLineageRequest.ts
|
|
25
28
|
src/models/CreateChunkRequest.ts
|
|
26
29
|
src/models/CreateDocumentRequest.ts
|
|
27
30
|
src/models/CreateFolderRequest.ts
|
|
@@ -45,6 +48,9 @@ src/models/IdpType.ts
|
|
|
45
48
|
src/models/InviteResponse.ts
|
|
46
49
|
src/models/InviteStatus.ts
|
|
47
50
|
src/models/InviteUserRequest.ts
|
|
51
|
+
src/models/LineageEdgeResponse.ts
|
|
52
|
+
src/models/LineageGraphResponse.ts
|
|
53
|
+
src/models/LineageNodeResponse.ts
|
|
48
54
|
src/models/MessageRole.ts
|
|
49
55
|
src/models/OAuth2Config.ts
|
|
50
56
|
src/models/PaginatedResponseDocumentContentPathPart.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @knowledge-stack/ksapi@1.
|
|
1
|
+
## @knowledge-stack/ksapi@1.11.1
|
|
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.11.1 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -0,0 +1,117 @@
|
|
|
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 { ChunkLineageResponse, CreateChunkLineageRequest, LineageGraphResponse } from '../models/index';
|
|
14
|
+
export interface CreateChunkLineageOperationRequest {
|
|
15
|
+
createChunkLineageRequest: CreateChunkLineageRequest;
|
|
16
|
+
ksUat?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface DeleteChunkLineageRequest {
|
|
19
|
+
parentChunkId: string;
|
|
20
|
+
chunkId: string;
|
|
21
|
+
ksUat?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface GetChunkLineageRequest {
|
|
24
|
+
chunkId: string;
|
|
25
|
+
maxDepth?: number;
|
|
26
|
+
ksUat?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* ChunkLineagesApi - interface
|
|
30
|
+
*
|
|
31
|
+
* @export
|
|
32
|
+
* @interface ChunkLineagesApiInterface
|
|
33
|
+
*/
|
|
34
|
+
export interface ChunkLineagesApiInterface {
|
|
35
|
+
/**
|
|
36
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
37
|
+
* @summary Create Chunk Lineage Handler
|
|
38
|
+
* @param {CreateChunkLineageRequest} createChunkLineageRequest
|
|
39
|
+
* @param {string} [ksUat]
|
|
40
|
+
* @param {*} [options] Override http request option.
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
* @memberof ChunkLineagesApiInterface
|
|
43
|
+
*/
|
|
44
|
+
createChunkLineageRaw(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ChunkLineageResponse>>>;
|
|
45
|
+
/**
|
|
46
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
47
|
+
* Create Chunk Lineage Handler
|
|
48
|
+
*/
|
|
49
|
+
createChunkLineage(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChunkLineageResponse>>;
|
|
50
|
+
/**
|
|
51
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
52
|
+
* @summary Delete Chunk Lineage Handler
|
|
53
|
+
* @param {string} parentChunkId Parent chunk ID
|
|
54
|
+
* @param {string} chunkId Child chunk ID
|
|
55
|
+
* @param {string} [ksUat]
|
|
56
|
+
* @param {*} [options] Override http request option.
|
|
57
|
+
* @throws {RequiredError}
|
|
58
|
+
* @memberof ChunkLineagesApiInterface
|
|
59
|
+
*/
|
|
60
|
+
deleteChunkLineageRaw(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
61
|
+
/**
|
|
62
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
63
|
+
* Delete Chunk Lineage Handler
|
|
64
|
+
*/
|
|
65
|
+
deleteChunkLineage(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
68
|
+
* @summary Get Chunk Lineage Handler
|
|
69
|
+
* @param {string} chunkId
|
|
70
|
+
* @param {number} [maxDepth]
|
|
71
|
+
* @param {string} [ksUat]
|
|
72
|
+
* @param {*} [options] Override http request option.
|
|
73
|
+
* @throws {RequiredError}
|
|
74
|
+
* @memberof ChunkLineagesApiInterface
|
|
75
|
+
*/
|
|
76
|
+
getChunkLineageRaw(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LineageGraphResponse>>;
|
|
77
|
+
/**
|
|
78
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
79
|
+
* Get Chunk Lineage Handler
|
|
80
|
+
*/
|
|
81
|
+
getChunkLineage(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LineageGraphResponse>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
export declare class ChunkLineagesApi extends runtime.BaseAPI implements ChunkLineagesApiInterface {
|
|
87
|
+
/**
|
|
88
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
89
|
+
* Create Chunk Lineage Handler
|
|
90
|
+
*/
|
|
91
|
+
createChunkLineageRaw(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ChunkLineageResponse>>>;
|
|
92
|
+
/**
|
|
93
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
94
|
+
* Create Chunk Lineage Handler
|
|
95
|
+
*/
|
|
96
|
+
createChunkLineage(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChunkLineageResponse>>;
|
|
97
|
+
/**
|
|
98
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
99
|
+
* Delete Chunk Lineage Handler
|
|
100
|
+
*/
|
|
101
|
+
deleteChunkLineageRaw(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
102
|
+
/**
|
|
103
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
104
|
+
* Delete Chunk Lineage Handler
|
|
105
|
+
*/
|
|
106
|
+
deleteChunkLineage(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
109
|
+
* Get Chunk Lineage Handler
|
|
110
|
+
*/
|
|
111
|
+
getChunkLineageRaw(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LineageGraphResponse>>;
|
|
112
|
+
/**
|
|
113
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
114
|
+
* Get Chunk Lineage Handler
|
|
115
|
+
*/
|
|
116
|
+
getChunkLineage(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LineageGraphResponse>;
|
|
117
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
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.ChunkLineagesApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class ChunkLineagesApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
34
|
+
* Create Chunk Lineage Handler
|
|
35
|
+
*/
|
|
36
|
+
createChunkLineageRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['createChunkLineageRequest'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('createChunkLineageRequest', 'Required parameter "createChunkLineageRequest" was null or undefined when calling createChunkLineage().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
44
|
+
let urlPath = `/v1/chunk-lineages`;
|
|
45
|
+
const response = yield this.request({
|
|
46
|
+
path: urlPath,
|
|
47
|
+
method: 'POST',
|
|
48
|
+
headers: headerParameters,
|
|
49
|
+
query: queryParameters,
|
|
50
|
+
body: (0, index_1.CreateChunkLineageRequestToJSON)(requestParameters['createChunkLineageRequest']),
|
|
51
|
+
}, initOverrides);
|
|
52
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ChunkLineageResponseFromJSON));
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
57
|
+
* Create Chunk Lineage Handler
|
|
58
|
+
*/
|
|
59
|
+
createChunkLineage(requestParameters, initOverrides) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const response = yield this.createChunkLineageRaw(requestParameters, initOverrides);
|
|
62
|
+
return yield response.value();
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
67
|
+
* Delete Chunk Lineage Handler
|
|
68
|
+
*/
|
|
69
|
+
deleteChunkLineageRaw(requestParameters, initOverrides) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
if (requestParameters['parentChunkId'] == null) {
|
|
72
|
+
throw new runtime.RequiredError('parentChunkId', 'Required parameter "parentChunkId" was null or undefined when calling deleteChunkLineage().');
|
|
73
|
+
}
|
|
74
|
+
if (requestParameters['chunkId'] == null) {
|
|
75
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling deleteChunkLineage().');
|
|
76
|
+
}
|
|
77
|
+
const queryParameters = {};
|
|
78
|
+
if (requestParameters['parentChunkId'] != null) {
|
|
79
|
+
queryParameters['parent_chunk_id'] = requestParameters['parentChunkId'];
|
|
80
|
+
}
|
|
81
|
+
if (requestParameters['chunkId'] != null) {
|
|
82
|
+
queryParameters['chunk_id'] = requestParameters['chunkId'];
|
|
83
|
+
}
|
|
84
|
+
const headerParameters = {};
|
|
85
|
+
let urlPath = `/v1/chunk-lineages`;
|
|
86
|
+
const response = yield this.request({
|
|
87
|
+
path: urlPath,
|
|
88
|
+
method: 'DELETE',
|
|
89
|
+
headers: headerParameters,
|
|
90
|
+
query: queryParameters,
|
|
91
|
+
}, initOverrides);
|
|
92
|
+
return new runtime.VoidApiResponse(response);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
97
|
+
* Delete Chunk Lineage Handler
|
|
98
|
+
*/
|
|
99
|
+
deleteChunkLineage(requestParameters, initOverrides) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
yield this.deleteChunkLineageRaw(requestParameters, initOverrides);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
106
|
+
* Get Chunk Lineage Handler
|
|
107
|
+
*/
|
|
108
|
+
getChunkLineageRaw(requestParameters, initOverrides) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
if (requestParameters['chunkId'] == null) {
|
|
111
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling getChunkLineage().');
|
|
112
|
+
}
|
|
113
|
+
const queryParameters = {};
|
|
114
|
+
if (requestParameters['maxDepth'] != null) {
|
|
115
|
+
queryParameters['max_depth'] = requestParameters['maxDepth'];
|
|
116
|
+
}
|
|
117
|
+
const headerParameters = {};
|
|
118
|
+
let urlPath = `/v1/chunk-lineages/{chunk_id}`;
|
|
119
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
120
|
+
const response = yield this.request({
|
|
121
|
+
path: urlPath,
|
|
122
|
+
method: 'GET',
|
|
123
|
+
headers: headerParameters,
|
|
124
|
+
query: queryParameters,
|
|
125
|
+
}, initOverrides);
|
|
126
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LineageGraphResponseFromJSON)(jsonValue));
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
131
|
+
* Get Chunk Lineage Handler
|
|
132
|
+
*/
|
|
133
|
+
getChunkLineage(requestParameters, initOverrides) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const response = yield this.getChunkLineageRaw(requestParameters, initOverrides);
|
|
136
|
+
return yield response.value();
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.ChunkLineagesApi = ChunkLineagesApi;
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./AuthApi"), exports);
|
|
20
|
+
__exportStar(require("./ChunkLineagesApi"), exports);
|
|
20
21
|
__exportStar(require("./ChunksApi"), exports);
|
|
21
22
|
__exportStar(require("./DefaultApi"), exports);
|
|
22
23
|
__exportStar(require("./DocumentVersionsApi"), exports);
|
|
@@ -0,0 +1,117 @@
|
|
|
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 { ChunkLineageResponse, CreateChunkLineageRequest, LineageGraphResponse } from '../models/index';
|
|
14
|
+
export interface CreateChunkLineageOperationRequest {
|
|
15
|
+
createChunkLineageRequest: CreateChunkLineageRequest;
|
|
16
|
+
ksUat?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface DeleteChunkLineageRequest {
|
|
19
|
+
parentChunkId: string;
|
|
20
|
+
chunkId: string;
|
|
21
|
+
ksUat?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface GetChunkLineageRequest {
|
|
24
|
+
chunkId: string;
|
|
25
|
+
maxDepth?: number;
|
|
26
|
+
ksUat?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* ChunkLineagesApi - interface
|
|
30
|
+
*
|
|
31
|
+
* @export
|
|
32
|
+
* @interface ChunkLineagesApiInterface
|
|
33
|
+
*/
|
|
34
|
+
export interface ChunkLineagesApiInterface {
|
|
35
|
+
/**
|
|
36
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
37
|
+
* @summary Create Chunk Lineage Handler
|
|
38
|
+
* @param {CreateChunkLineageRequest} createChunkLineageRequest
|
|
39
|
+
* @param {string} [ksUat]
|
|
40
|
+
* @param {*} [options] Override http request option.
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
* @memberof ChunkLineagesApiInterface
|
|
43
|
+
*/
|
|
44
|
+
createChunkLineageRaw(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ChunkLineageResponse>>>;
|
|
45
|
+
/**
|
|
46
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
47
|
+
* Create Chunk Lineage Handler
|
|
48
|
+
*/
|
|
49
|
+
createChunkLineage(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChunkLineageResponse>>;
|
|
50
|
+
/**
|
|
51
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
52
|
+
* @summary Delete Chunk Lineage Handler
|
|
53
|
+
* @param {string} parentChunkId Parent chunk ID
|
|
54
|
+
* @param {string} chunkId Child chunk ID
|
|
55
|
+
* @param {string} [ksUat]
|
|
56
|
+
* @param {*} [options] Override http request option.
|
|
57
|
+
* @throws {RequiredError}
|
|
58
|
+
* @memberof ChunkLineagesApiInterface
|
|
59
|
+
*/
|
|
60
|
+
deleteChunkLineageRaw(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
61
|
+
/**
|
|
62
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
63
|
+
* Delete Chunk Lineage Handler
|
|
64
|
+
*/
|
|
65
|
+
deleteChunkLineage(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
68
|
+
* @summary Get Chunk Lineage Handler
|
|
69
|
+
* @param {string} chunkId
|
|
70
|
+
* @param {number} [maxDepth]
|
|
71
|
+
* @param {string} [ksUat]
|
|
72
|
+
* @param {*} [options] Override http request option.
|
|
73
|
+
* @throws {RequiredError}
|
|
74
|
+
* @memberof ChunkLineagesApiInterface
|
|
75
|
+
*/
|
|
76
|
+
getChunkLineageRaw(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LineageGraphResponse>>;
|
|
77
|
+
/**
|
|
78
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
79
|
+
* Get Chunk Lineage Handler
|
|
80
|
+
*/
|
|
81
|
+
getChunkLineage(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LineageGraphResponse>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
export declare class ChunkLineagesApi extends runtime.BaseAPI implements ChunkLineagesApiInterface {
|
|
87
|
+
/**
|
|
88
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
89
|
+
* Create Chunk Lineage Handler
|
|
90
|
+
*/
|
|
91
|
+
createChunkLineageRaw(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ChunkLineageResponse>>>;
|
|
92
|
+
/**
|
|
93
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
94
|
+
* Create Chunk Lineage Handler
|
|
95
|
+
*/
|
|
96
|
+
createChunkLineage(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChunkLineageResponse>>;
|
|
97
|
+
/**
|
|
98
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
99
|
+
* Delete Chunk Lineage Handler
|
|
100
|
+
*/
|
|
101
|
+
deleteChunkLineageRaw(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
102
|
+
/**
|
|
103
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
104
|
+
* Delete Chunk Lineage Handler
|
|
105
|
+
*/
|
|
106
|
+
deleteChunkLineage(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
109
|
+
* Get Chunk Lineage Handler
|
|
110
|
+
*/
|
|
111
|
+
getChunkLineageRaw(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LineageGraphResponse>>;
|
|
112
|
+
/**
|
|
113
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
114
|
+
* Get Chunk Lineage Handler
|
|
115
|
+
*/
|
|
116
|
+
getChunkLineage(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LineageGraphResponse>;
|
|
117
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { ChunkLineageResponseFromJSON, CreateChunkLineageRequestToJSON, LineageGraphResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class ChunkLineagesApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
31
|
+
* Create Chunk Lineage Handler
|
|
32
|
+
*/
|
|
33
|
+
createChunkLineageRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['createChunkLineageRequest'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('createChunkLineageRequest', 'Required parameter "createChunkLineageRequest" was null or undefined when calling createChunkLineage().');
|
|
37
|
+
}
|
|
38
|
+
const queryParameters = {};
|
|
39
|
+
const headerParameters = {};
|
|
40
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
41
|
+
let urlPath = `/v1/chunk-lineages`;
|
|
42
|
+
const response = yield this.request({
|
|
43
|
+
path: urlPath,
|
|
44
|
+
method: 'POST',
|
|
45
|
+
headers: headerParameters,
|
|
46
|
+
query: queryParameters,
|
|
47
|
+
body: CreateChunkLineageRequestToJSON(requestParameters['createChunkLineageRequest']),
|
|
48
|
+
}, initOverrides);
|
|
49
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ChunkLineageResponseFromJSON));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
54
|
+
* Create Chunk Lineage Handler
|
|
55
|
+
*/
|
|
56
|
+
createChunkLineage(requestParameters, initOverrides) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const response = yield this.createChunkLineageRaw(requestParameters, initOverrides);
|
|
59
|
+
return yield response.value();
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
64
|
+
* Delete Chunk Lineage Handler
|
|
65
|
+
*/
|
|
66
|
+
deleteChunkLineageRaw(requestParameters, initOverrides) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
if (requestParameters['parentChunkId'] == null) {
|
|
69
|
+
throw new runtime.RequiredError('parentChunkId', 'Required parameter "parentChunkId" was null or undefined when calling deleteChunkLineage().');
|
|
70
|
+
}
|
|
71
|
+
if (requestParameters['chunkId'] == null) {
|
|
72
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling deleteChunkLineage().');
|
|
73
|
+
}
|
|
74
|
+
const queryParameters = {};
|
|
75
|
+
if (requestParameters['parentChunkId'] != null) {
|
|
76
|
+
queryParameters['parent_chunk_id'] = requestParameters['parentChunkId'];
|
|
77
|
+
}
|
|
78
|
+
if (requestParameters['chunkId'] != null) {
|
|
79
|
+
queryParameters['chunk_id'] = requestParameters['chunkId'];
|
|
80
|
+
}
|
|
81
|
+
const headerParameters = {};
|
|
82
|
+
let urlPath = `/v1/chunk-lineages`;
|
|
83
|
+
const response = yield this.request({
|
|
84
|
+
path: urlPath,
|
|
85
|
+
method: 'DELETE',
|
|
86
|
+
headers: headerParameters,
|
|
87
|
+
query: queryParameters,
|
|
88
|
+
}, initOverrides);
|
|
89
|
+
return new runtime.VoidApiResponse(response);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Delete a single lineage edge between parent and child chunks.
|
|
94
|
+
* Delete Chunk Lineage Handler
|
|
95
|
+
*/
|
|
96
|
+
deleteChunkLineage(requestParameters, initOverrides) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
yield this.deleteChunkLineageRaw(requestParameters, initOverrides);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
103
|
+
* Get Chunk Lineage Handler
|
|
104
|
+
*/
|
|
105
|
+
getChunkLineageRaw(requestParameters, initOverrides) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
if (requestParameters['chunkId'] == null) {
|
|
108
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling getChunkLineage().');
|
|
109
|
+
}
|
|
110
|
+
const queryParameters = {};
|
|
111
|
+
if (requestParameters['maxDepth'] != null) {
|
|
112
|
+
queryParameters['max_depth'] = requestParameters['maxDepth'];
|
|
113
|
+
}
|
|
114
|
+
const headerParameters = {};
|
|
115
|
+
let urlPath = `/v1/chunk-lineages/{chunk_id}`;
|
|
116
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
117
|
+
const response = yield this.request({
|
|
118
|
+
path: urlPath,
|
|
119
|
+
method: 'GET',
|
|
120
|
+
headers: headerParameters,
|
|
121
|
+
query: queryParameters,
|
|
122
|
+
}, initOverrides);
|
|
123
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LineageGraphResponseFromJSON(jsonValue));
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
128
|
+
* Get Chunk Lineage Handler
|
|
129
|
+
*/
|
|
130
|
+
getChunkLineage(requestParameters, initOverrides) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
const response = yield this.getChunkLineageRaw(requestParameters, initOverrides);
|
|
133
|
+
return yield response.value();
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Single chunk lineage edge response.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ChunkLineageResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface ChunkLineageResponse {
|
|
18
|
+
/**
|
|
19
|
+
* Parent chunk ID
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChunkLineageResponse
|
|
22
|
+
*/
|
|
23
|
+
parentChunkId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Child chunk ID
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ChunkLineageResponse
|
|
28
|
+
*/
|
|
29
|
+
chunkId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Tenant ID
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ChunkLineageResponse
|
|
34
|
+
*/
|
|
35
|
+
tenantId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Creation timestamp
|
|
38
|
+
* @type {Date}
|
|
39
|
+
* @memberof ChunkLineageResponse
|
|
40
|
+
*/
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the ChunkLineageResponse interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfChunkLineageResponse(value: object): value is ChunkLineageResponse;
|
|
47
|
+
export declare function ChunkLineageResponseFromJSON(json: any): ChunkLineageResponse;
|
|
48
|
+
export declare function ChunkLineageResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkLineageResponse;
|
|
49
|
+
export declare function ChunkLineageResponseToJSON(json: any): ChunkLineageResponse;
|
|
50
|
+
export declare function ChunkLineageResponseToJSONTyped(value?: ChunkLineageResponse | null, ignoreDiscriminator?: boolean): any;
|
|
51
|
+
export declare const ChunkLineageResponsePropertyValidationAttributesMap: {
|
|
52
|
+
[property: string]: {
|
|
53
|
+
maxLength?: number;
|
|
54
|
+
minLength?: number;
|
|
55
|
+
pattern?: string;
|
|
56
|
+
maximum?: number;
|
|
57
|
+
exclusiveMaximum?: boolean;
|
|
58
|
+
minimum?: number;
|
|
59
|
+
exclusiveMinimum?: boolean;
|
|
60
|
+
multipleOf?: number;
|
|
61
|
+
maxItems?: number;
|
|
62
|
+
minItems?: number;
|
|
63
|
+
uniqueItems?: boolean;
|
|
64
|
+
};
|
|
65
|
+
};
|