@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.
Files changed (43) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/dist/apis/ChunkLineagesApi.d.ts +117 -0
  4. package/dist/apis/ChunkLineagesApi.js +140 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/apis/ChunkLineagesApi.d.ts +117 -0
  8. package/dist/esm/apis/ChunkLineagesApi.js +136 -0
  9. package/dist/esm/apis/index.d.ts +1 -0
  10. package/dist/esm/apis/index.js +1 -0
  11. package/dist/esm/models/ChunkLineageResponse.d.ts +65 -0
  12. package/dist/esm/models/ChunkLineageResponse.js +56 -0
  13. package/dist/esm/models/CreateChunkLineageRequest.d.ts +53 -0
  14. package/dist/esm/models/CreateChunkLineageRequest.js +53 -0
  15. package/dist/esm/models/LineageEdgeResponse.d.ts +53 -0
  16. package/dist/esm/models/LineageEdgeResponse.js +48 -0
  17. package/dist/esm/models/LineageGraphResponse.d.ts +55 -0
  18. package/dist/esm/models/LineageGraphResponse.js +50 -0
  19. package/dist/esm/models/LineageNodeResponse.d.ts +85 -0
  20. package/dist/esm/models/LineageNodeResponse.js +70 -0
  21. package/dist/esm/models/index.d.ts +5 -0
  22. package/dist/esm/models/index.js +5 -0
  23. package/dist/models/ChunkLineageResponse.d.ts +65 -0
  24. package/dist/models/ChunkLineageResponse.js +64 -0
  25. package/dist/models/CreateChunkLineageRequest.d.ts +53 -0
  26. package/dist/models/CreateChunkLineageRequest.js +61 -0
  27. package/dist/models/LineageEdgeResponse.d.ts +53 -0
  28. package/dist/models/LineageEdgeResponse.js +56 -0
  29. package/dist/models/LineageGraphResponse.d.ts +55 -0
  30. package/dist/models/LineageGraphResponse.js +58 -0
  31. package/dist/models/LineageNodeResponse.d.ts +85 -0
  32. package/dist/models/LineageNodeResponse.js +78 -0
  33. package/dist/models/index.d.ts +5 -0
  34. package/dist/models/index.js +5 -0
  35. package/package.json +1 -1
  36. package/src/apis/ChunkLineagesApi.ts +254 -0
  37. package/src/apis/index.ts +1 -0
  38. package/src/models/ChunkLineageResponse.ts +110 -0
  39. package/src/models/CreateChunkLineageRequest.ts +96 -0
  40. package/src/models/LineageEdgeResponse.ts +92 -0
  41. package/src/models/LineageGraphResponse.ts +107 -0
  42. package/src/models/LineageNodeResponse.ts +154 -0
  43. package/src/models/index.ts +5 -0
@@ -0,0 +1,254 @@
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
+ ChunkLineageResponse,
19
+ CreateChunkLineageRequest,
20
+ HTTPValidationError,
21
+ LineageGraphResponse,
22
+ } from '../models/index';
23
+ import {
24
+ ChunkLineageResponseFromJSON,
25
+ ChunkLineageResponseToJSON,
26
+ CreateChunkLineageRequestFromJSON,
27
+ CreateChunkLineageRequestToJSON,
28
+ HTTPValidationErrorFromJSON,
29
+ HTTPValidationErrorToJSON,
30
+ LineageGraphResponseFromJSON,
31
+ LineageGraphResponseToJSON,
32
+ } from '../models/index';
33
+
34
+ export interface CreateChunkLineageOperationRequest {
35
+ createChunkLineageRequest: CreateChunkLineageRequest;
36
+ ksUat?: string;
37
+ }
38
+
39
+ export interface DeleteChunkLineageRequest {
40
+ parentChunkId: string;
41
+ chunkId: string;
42
+ ksUat?: string;
43
+ }
44
+
45
+ export interface GetChunkLineageRequest {
46
+ chunkId: string;
47
+ maxDepth?: number;
48
+ ksUat?: string;
49
+ }
50
+
51
+ /**
52
+ * ChunkLineagesApi - interface
53
+ *
54
+ * @export
55
+ * @interface ChunkLineagesApiInterface
56
+ */
57
+ export interface ChunkLineagesApiInterface {
58
+ /**
59
+ * 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.
60
+ * @summary Create Chunk Lineage Handler
61
+ * @param {CreateChunkLineageRequest} createChunkLineageRequest
62
+ * @param {string} [ksUat]
63
+ * @param {*} [options] Override http request option.
64
+ * @throws {RequiredError}
65
+ * @memberof ChunkLineagesApiInterface
66
+ */
67
+ createChunkLineageRaw(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ChunkLineageResponse>>>;
68
+
69
+ /**
70
+ * 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.
71
+ * Create Chunk Lineage Handler
72
+ */
73
+ createChunkLineage(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChunkLineageResponse>>;
74
+
75
+ /**
76
+ * Delete a single lineage edge between parent and child chunks.
77
+ * @summary Delete Chunk Lineage Handler
78
+ * @param {string} parentChunkId Parent chunk ID
79
+ * @param {string} chunkId Child chunk ID
80
+ * @param {string} [ksUat]
81
+ * @param {*} [options] Override http request option.
82
+ * @throws {RequiredError}
83
+ * @memberof ChunkLineagesApiInterface
84
+ */
85
+ deleteChunkLineageRaw(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
86
+
87
+ /**
88
+ * Delete a single lineage edge between parent and child chunks.
89
+ * Delete Chunk Lineage Handler
90
+ */
91
+ deleteChunkLineage(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
92
+
93
+ /**
94
+ * Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
95
+ * @summary Get Chunk Lineage Handler
96
+ * @param {string} chunkId
97
+ * @param {number} [maxDepth]
98
+ * @param {string} [ksUat]
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ * @memberof ChunkLineagesApiInterface
102
+ */
103
+ getChunkLineageRaw(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LineageGraphResponse>>;
104
+
105
+ /**
106
+ * Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
107
+ * Get Chunk Lineage Handler
108
+ */
109
+ getChunkLineage(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LineageGraphResponse>;
110
+
111
+ }
112
+
113
+ /**
114
+ *
115
+ */
116
+ export class ChunkLineagesApi extends runtime.BaseAPI implements ChunkLineagesApiInterface {
117
+
118
+ /**
119
+ * 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.
120
+ * Create Chunk Lineage Handler
121
+ */
122
+ async createChunkLineageRaw(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ChunkLineageResponse>>> {
123
+ if (requestParameters['createChunkLineageRequest'] == null) {
124
+ throw new runtime.RequiredError(
125
+ 'createChunkLineageRequest',
126
+ 'Required parameter "createChunkLineageRequest" was null or undefined when calling createChunkLineage().'
127
+ );
128
+ }
129
+
130
+ const queryParameters: any = {};
131
+
132
+ const headerParameters: runtime.HTTPHeaders = {};
133
+
134
+ headerParameters['Content-Type'] = 'application/json';
135
+
136
+
137
+ let urlPath = `/v1/chunk-lineages`;
138
+
139
+ const response = await this.request({
140
+ path: urlPath,
141
+ method: 'POST',
142
+ headers: headerParameters,
143
+ query: queryParameters,
144
+ body: CreateChunkLineageRequestToJSON(requestParameters['createChunkLineageRequest']),
145
+ }, initOverrides);
146
+
147
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ChunkLineageResponseFromJSON));
148
+ }
149
+
150
+ /**
151
+ * 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.
152
+ * Create Chunk Lineage Handler
153
+ */
154
+ async createChunkLineage(requestParameters: CreateChunkLineageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChunkLineageResponse>> {
155
+ const response = await this.createChunkLineageRaw(requestParameters, initOverrides);
156
+ return await response.value();
157
+ }
158
+
159
+ /**
160
+ * Delete a single lineage edge between parent and child chunks.
161
+ * Delete Chunk Lineage Handler
162
+ */
163
+ async deleteChunkLineageRaw(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
164
+ if (requestParameters['parentChunkId'] == null) {
165
+ throw new runtime.RequiredError(
166
+ 'parentChunkId',
167
+ 'Required parameter "parentChunkId" was null or undefined when calling deleteChunkLineage().'
168
+ );
169
+ }
170
+
171
+ if (requestParameters['chunkId'] == null) {
172
+ throw new runtime.RequiredError(
173
+ 'chunkId',
174
+ 'Required parameter "chunkId" was null or undefined when calling deleteChunkLineage().'
175
+ );
176
+ }
177
+
178
+ const queryParameters: any = {};
179
+
180
+ if (requestParameters['parentChunkId'] != null) {
181
+ queryParameters['parent_chunk_id'] = requestParameters['parentChunkId'];
182
+ }
183
+
184
+ if (requestParameters['chunkId'] != null) {
185
+ queryParameters['chunk_id'] = requestParameters['chunkId'];
186
+ }
187
+
188
+ const headerParameters: runtime.HTTPHeaders = {};
189
+
190
+
191
+ let urlPath = `/v1/chunk-lineages`;
192
+
193
+ const response = await this.request({
194
+ path: urlPath,
195
+ method: 'DELETE',
196
+ headers: headerParameters,
197
+ query: queryParameters,
198
+ }, initOverrides);
199
+
200
+ return new runtime.VoidApiResponse(response);
201
+ }
202
+
203
+ /**
204
+ * Delete a single lineage edge between parent and child chunks.
205
+ * Delete Chunk Lineage Handler
206
+ */
207
+ async deleteChunkLineage(requestParameters: DeleteChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
208
+ await this.deleteChunkLineageRaw(requestParameters, initOverrides);
209
+ }
210
+
211
+ /**
212
+ * Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
213
+ * Get Chunk Lineage Handler
214
+ */
215
+ async getChunkLineageRaw(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LineageGraphResponse>> {
216
+ if (requestParameters['chunkId'] == null) {
217
+ throw new runtime.RequiredError(
218
+ 'chunkId',
219
+ 'Required parameter "chunkId" was null or undefined when calling getChunkLineage().'
220
+ );
221
+ }
222
+
223
+ const queryParameters: any = {};
224
+
225
+ if (requestParameters['maxDepth'] != null) {
226
+ queryParameters['max_depth'] = requestParameters['maxDepth'];
227
+ }
228
+
229
+ const headerParameters: runtime.HTTPHeaders = {};
230
+
231
+
232
+ let urlPath = `/v1/chunk-lineages/{chunk_id}`;
233
+ urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
234
+
235
+ const response = await this.request({
236
+ path: urlPath,
237
+ method: 'GET',
238
+ headers: headerParameters,
239
+ query: queryParameters,
240
+ }, initOverrides);
241
+
242
+ return new runtime.JSONApiResponse(response, (jsonValue) => LineageGraphResponseFromJSON(jsonValue));
243
+ }
244
+
245
+ /**
246
+ * Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
247
+ * Get Chunk Lineage Handler
248
+ */
249
+ async getChunkLineage(requestParameters: GetChunkLineageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LineageGraphResponse> {
250
+ const response = await this.getChunkLineageRaw(requestParameters, initOverrides);
251
+ return await response.value();
252
+ }
253
+
254
+ }
package/src/apis/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './AuthApi';
4
+ export * from './ChunkLineagesApi';
4
5
  export * from './ChunksApi';
5
6
  export * from './DefaultApi';
6
7
  export * from './DocumentVersionsApi';
@@ -0,0 +1,110 @@
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
+ /**
17
+ * Single chunk lineage edge response.
18
+ * @export
19
+ * @interface ChunkLineageResponse
20
+ */
21
+ export interface ChunkLineageResponse {
22
+ /**
23
+ * Parent chunk ID
24
+ * @type {string}
25
+ * @memberof ChunkLineageResponse
26
+ */
27
+ parentChunkId: string;
28
+ /**
29
+ * Child chunk ID
30
+ * @type {string}
31
+ * @memberof ChunkLineageResponse
32
+ */
33
+ chunkId: string;
34
+ /**
35
+ * Tenant ID
36
+ * @type {string}
37
+ * @memberof ChunkLineageResponse
38
+ */
39
+ tenantId: string;
40
+ /**
41
+ * Creation timestamp
42
+ * @type {Date}
43
+ * @memberof ChunkLineageResponse
44
+ */
45
+ createdAt: Date;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the ChunkLineageResponse interface.
50
+ */
51
+ export function instanceOfChunkLineageResponse(value: object): value is ChunkLineageResponse {
52
+ if (!('parentChunkId' in value) || value['parentChunkId'] === undefined) return false;
53
+ if (!('chunkId' in value) || value['chunkId'] === undefined) return false;
54
+ if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
55
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function ChunkLineageResponseFromJSON(json: any): ChunkLineageResponse {
60
+ return ChunkLineageResponseFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function ChunkLineageResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkLineageResponse {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'parentChunkId': json['parent_chunk_id'],
70
+ 'chunkId': json['chunk_id'],
71
+ 'tenantId': json['tenant_id'],
72
+ 'createdAt': (new Date(json['created_at'])),
73
+ };
74
+ }
75
+
76
+ export function ChunkLineageResponseToJSON(json: any): ChunkLineageResponse {
77
+ return ChunkLineageResponseToJSONTyped(json, false);
78
+ }
79
+
80
+ export function ChunkLineageResponseToJSONTyped(value?: ChunkLineageResponse | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'parent_chunk_id': value['parentChunkId'],
88
+ 'chunk_id': value['chunkId'],
89
+ 'tenant_id': value['tenantId'],
90
+ 'created_at': value['createdAt'].toISOString(),
91
+ };
92
+ }
93
+
94
+ export const ChunkLineageResponsePropertyValidationAttributesMap: {
95
+ [property: string]: {
96
+ maxLength?: number,
97
+ minLength?: number,
98
+ pattern?: string,
99
+ maximum?: number,
100
+ exclusiveMaximum?: boolean,
101
+ minimum?: number,
102
+ exclusiveMinimum?: boolean,
103
+ multipleOf?: number,
104
+ maxItems?: number,
105
+ minItems?: number,
106
+ uniqueItems?: boolean
107
+ }
108
+ } = {
109
+ }
110
+
@@ -0,0 +1,96 @@
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
+ /**
17
+ * Request to batch-create lineage edges for a child chunk.
18
+ * @export
19
+ * @interface CreateChunkLineageRequest
20
+ */
21
+ export interface CreateChunkLineageRequest {
22
+ /**
23
+ * Child chunk ID
24
+ * @type {string}
25
+ * @memberof CreateChunkLineageRequest
26
+ */
27
+ chunkId: string;
28
+ /**
29
+ * List of parent chunk IDs
30
+ * @type {Array<string>}
31
+ * @memberof CreateChunkLineageRequest
32
+ */
33
+ parentChunkIds: Array<string>;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the CreateChunkLineageRequest interface.
38
+ */
39
+ export function instanceOfCreateChunkLineageRequest(value: object): value is CreateChunkLineageRequest {
40
+ if (!('chunkId' in value) || value['chunkId'] === undefined) return false;
41
+ if (!('parentChunkIds' in value) || value['parentChunkIds'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function CreateChunkLineageRequestFromJSON(json: any): CreateChunkLineageRequest {
46
+ return CreateChunkLineageRequestFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function CreateChunkLineageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateChunkLineageRequest {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'chunkId': json['chunk_id'],
56
+ 'parentChunkIds': json['parent_chunk_ids'],
57
+ };
58
+ }
59
+
60
+ export function CreateChunkLineageRequestToJSON(json: any): CreateChunkLineageRequest {
61
+ return CreateChunkLineageRequestToJSONTyped(json, false);
62
+ }
63
+
64
+ export function CreateChunkLineageRequestToJSONTyped(value?: CreateChunkLineageRequest | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'chunk_id': value['chunkId'],
72
+ 'parent_chunk_ids': value['parentChunkIds'],
73
+ };
74
+ }
75
+
76
+ export const CreateChunkLineageRequestPropertyValidationAttributesMap: {
77
+ [property: string]: {
78
+ maxLength?: number,
79
+ minLength?: number,
80
+ pattern?: string,
81
+ maximum?: number,
82
+ exclusiveMaximum?: boolean,
83
+ minimum?: number,
84
+ exclusiveMinimum?: boolean,
85
+ multipleOf?: number,
86
+ maxItems?: number,
87
+ minItems?: number,
88
+ uniqueItems?: boolean
89
+ }
90
+ } = {
91
+ parentChunkIds: {
92
+ minItems: 1,
93
+ uniqueItems: false,
94
+ },
95
+ }
96
+
@@ -0,0 +1,92 @@
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
+ /**
17
+ * An edge in the lineage graph.
18
+ * @export
19
+ * @interface LineageEdgeResponse
20
+ */
21
+ export interface LineageEdgeResponse {
22
+ /**
23
+ * Parent chunk ID (source)
24
+ * @type {string}
25
+ * @memberof LineageEdgeResponse
26
+ */
27
+ parentChunkId: string;
28
+ /**
29
+ * Child chunk ID (derived)
30
+ * @type {string}
31
+ * @memberof LineageEdgeResponse
32
+ */
33
+ chunkId: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the LineageEdgeResponse interface.
38
+ */
39
+ export function instanceOfLineageEdgeResponse(value: object): value is LineageEdgeResponse {
40
+ if (!('parentChunkId' in value) || value['parentChunkId'] === undefined) return false;
41
+ if (!('chunkId' in value) || value['chunkId'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function LineageEdgeResponseFromJSON(json: any): LineageEdgeResponse {
46
+ return LineageEdgeResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function LineageEdgeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LineageEdgeResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'parentChunkId': json['parent_chunk_id'],
56
+ 'chunkId': json['chunk_id'],
57
+ };
58
+ }
59
+
60
+ export function LineageEdgeResponseToJSON(json: any): LineageEdgeResponse {
61
+ return LineageEdgeResponseToJSONTyped(json, false);
62
+ }
63
+
64
+ export function LineageEdgeResponseToJSONTyped(value?: LineageEdgeResponse | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'parent_chunk_id': value['parentChunkId'],
72
+ 'chunk_id': value['chunkId'],
73
+ };
74
+ }
75
+
76
+ export const LineageEdgeResponsePropertyValidationAttributesMap: {
77
+ [property: string]: {
78
+ maxLength?: number,
79
+ minLength?: number,
80
+ pattern?: string,
81
+ maximum?: number,
82
+ exclusiveMaximum?: boolean,
83
+ minimum?: number,
84
+ exclusiveMinimum?: boolean,
85
+ multipleOf?: number,
86
+ maxItems?: number,
87
+ minItems?: number,
88
+ uniqueItems?: boolean
89
+ }
90
+ } = {
91
+ }
92
+
@@ -0,0 +1,107 @@
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 { LineageEdgeResponse } from './LineageEdgeResponse';
17
+ import {
18
+ LineageEdgeResponseFromJSON,
19
+ LineageEdgeResponseFromJSONTyped,
20
+ LineageEdgeResponseToJSON,
21
+ LineageEdgeResponseToJSONTyped,
22
+ } from './LineageEdgeResponse';
23
+ import type { LineageNodeResponse } from './LineageNodeResponse';
24
+ import {
25
+ LineageNodeResponseFromJSON,
26
+ LineageNodeResponseFromJSONTyped,
27
+ LineageNodeResponseToJSON,
28
+ LineageNodeResponseToJSONTyped,
29
+ } from './LineageNodeResponse';
30
+
31
+ /**
32
+ * Complete lineage graph with nodes and edges.
33
+ * @export
34
+ * @interface LineageGraphResponse
35
+ */
36
+ export interface LineageGraphResponse {
37
+ /**
38
+ * Chunk nodes in the graph
39
+ * @type {Array<LineageNodeResponse>}
40
+ * @memberof LineageGraphResponse
41
+ */
42
+ nodes: Array<LineageNodeResponse>;
43
+ /**
44
+ * Lineage edges in the graph
45
+ * @type {Array<LineageEdgeResponse>}
46
+ * @memberof LineageGraphResponse
47
+ */
48
+ edges: Array<LineageEdgeResponse>;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the LineageGraphResponse interface.
53
+ */
54
+ export function instanceOfLineageGraphResponse(value: object): value is LineageGraphResponse {
55
+ if (!('nodes' in value) || value['nodes'] === undefined) return false;
56
+ if (!('edges' in value) || value['edges'] === undefined) return false;
57
+ return true;
58
+ }
59
+
60
+ export function LineageGraphResponseFromJSON(json: any): LineageGraphResponse {
61
+ return LineageGraphResponseFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function LineageGraphResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LineageGraphResponse {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'nodes': ((json['nodes'] as Array<any>).map(LineageNodeResponseFromJSON)),
71
+ 'edges': ((json['edges'] as Array<any>).map(LineageEdgeResponseFromJSON)),
72
+ };
73
+ }
74
+
75
+ export function LineageGraphResponseToJSON(json: any): LineageGraphResponse {
76
+ return LineageGraphResponseToJSONTyped(json, false);
77
+ }
78
+
79
+ export function LineageGraphResponseToJSONTyped(value?: LineageGraphResponse | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'nodes': ((value['nodes'] as Array<any>).map(LineageNodeResponseToJSON)),
87
+ 'edges': ((value['edges'] as Array<any>).map(LineageEdgeResponseToJSON)),
88
+ };
89
+ }
90
+
91
+ export const LineageGraphResponsePropertyValidationAttributesMap: {
92
+ [property: string]: {
93
+ maxLength?: number,
94
+ minLength?: number,
95
+ pattern?: string,
96
+ maximum?: number,
97
+ exclusiveMaximum?: boolean,
98
+ minimum?: number,
99
+ exclusiveMinimum?: boolean,
100
+ multipleOf?: number,
101
+ maxItems?: number,
102
+ minItems?: number,
103
+ uniqueItems?: boolean
104
+ }
105
+ } = {
106
+ }
107
+