@knowledge-stack/ksapi 1.8.0 → 1.9.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 +4 -0
- package/README.md +2 -2
- package/dist/apis/DocumentVersionsApi.d.ts +36 -1
- package/dist/apis/DocumentVersionsApi.js +41 -0
- package/dist/apis/FoldersApi.d.ts +38 -1
- package/dist/apis/FoldersApi.js +44 -0
- package/dist/apis/PathPartsApi.d.ts +4 -6
- package/dist/apis/PathPartsApi.js +2 -5
- package/dist/esm/apis/DocumentVersionsApi.d.ts +36 -1
- package/dist/esm/apis/DocumentVersionsApi.js +42 -1
- package/dist/esm/apis/FoldersApi.d.ts +38 -1
- package/dist/esm/apis/FoldersApi.js +45 -1
- package/dist/esm/apis/PathPartsApi.d.ts +4 -6
- package/dist/esm/apis/PathPartsApi.js +2 -5
- package/dist/esm/models/DocumentContentPathPart.d.ts +119 -0
- package/dist/esm/models/DocumentContentPathPart.js +83 -0
- package/dist/esm/models/FolderDocumentResponse.d.ts +138 -0
- package/dist/esm/models/FolderDocumentResponse.js +88 -0
- package/dist/esm/models/PaginatedResponseDocumentContentPathPart.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseDocumentContentPathPart.js +70 -0
- package/dist/esm/models/PaginatedResponseFolderDocumentResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseFolderDocumentResponse.js +70 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/DocumentContentPathPart.d.ts +119 -0
- package/dist/models/DocumentContentPathPart.js +91 -0
- package/dist/models/FolderDocumentResponse.d.ts +138 -0
- package/dist/models/FolderDocumentResponse.js +96 -0
- package/dist/models/PaginatedResponseDocumentContentPathPart.d.ts +66 -0
- package/dist/models/PaginatedResponseDocumentContentPathPart.js +78 -0
- package/dist/models/PaginatedResponseFolderDocumentResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseFolderDocumentResponse.js +78 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/DocumentVersionsApi.ts +82 -0
- package/src/apis/FoldersApi.ts +88 -0
- package/src/apis/PathPartsApi.ts +4 -10
- package/src/models/DocumentContentPathPart.ts +205 -0
- package/src/models/FolderDocumentResponse.ts +234 -0
- package/src/models/PaginatedResponseDocumentContentPathPart.ts +130 -0
- package/src/models/PaginatedResponseFolderDocumentResponse.ts +130 -0
- package/src/models/index.ts +4 -0
|
@@ -17,7 +17,6 @@ export interface GetPathPartRequest {
|
|
|
17
17
|
}
|
|
18
18
|
export interface ListPathPartsRequest {
|
|
19
19
|
parentId?: string;
|
|
20
|
-
includeDocuments?: boolean;
|
|
21
20
|
maxDepth?: number;
|
|
22
21
|
sortOrder?: PathOrder;
|
|
23
22
|
limit?: number;
|
|
@@ -47,10 +46,9 @@ export interface PathPartsApiInterface {
|
|
|
47
46
|
*/
|
|
48
47
|
getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
|
|
49
48
|
/**
|
|
50
|
-
* List path parts under a parent with
|
|
49
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
51
50
|
* @summary List Path Parts Handler
|
|
52
51
|
* @param {string} [parentId] Parent PathPart ID (defaults to root)
|
|
53
|
-
* @param {boolean} [includeDocuments] Include documents in results (default: False, folders only)
|
|
54
52
|
* @param {number} [maxDepth] Maximum depth to traverse (1 = direct children, default: 1)
|
|
55
53
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
56
54
|
* @param {number} [limit] Number of items per page
|
|
@@ -62,7 +60,7 @@ export interface PathPartsApiInterface {
|
|
|
62
60
|
*/
|
|
63
61
|
listPathPartsRaw(requestParameters: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponsePathPartResponse>>;
|
|
64
62
|
/**
|
|
65
|
-
* List path parts under a parent with
|
|
63
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
66
64
|
* List Path Parts Handler
|
|
67
65
|
*/
|
|
68
66
|
listPathParts(requestParameters: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponsePathPartResponse>;
|
|
@@ -82,12 +80,12 @@ export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsAp
|
|
|
82
80
|
*/
|
|
83
81
|
getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
|
|
84
82
|
/**
|
|
85
|
-
* List path parts under a parent with
|
|
83
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
86
84
|
* List Path Parts Handler
|
|
87
85
|
*/
|
|
88
86
|
listPathPartsRaw(requestParameters: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponsePathPartResponse>>;
|
|
89
87
|
/**
|
|
90
|
-
* List path parts under a parent with
|
|
88
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
91
89
|
* List Path Parts Handler
|
|
92
90
|
*/
|
|
93
91
|
listPathParts(requestParameters?: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponsePathPartResponse>;
|
|
@@ -59,7 +59,7 @@ export class PathPartsApi extends runtime.BaseAPI {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* List path parts under a parent with
|
|
62
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
63
63
|
* List Path Parts Handler
|
|
64
64
|
*/
|
|
65
65
|
listPathPartsRaw(requestParameters, initOverrides) {
|
|
@@ -68,9 +68,6 @@ export class PathPartsApi extends runtime.BaseAPI {
|
|
|
68
68
|
if (requestParameters['parentId'] != null) {
|
|
69
69
|
queryParameters['parent_id'] = requestParameters['parentId'];
|
|
70
70
|
}
|
|
71
|
-
if (requestParameters['includeDocuments'] != null) {
|
|
72
|
-
queryParameters['include_documents'] = requestParameters['includeDocuments'];
|
|
73
|
-
}
|
|
74
71
|
if (requestParameters['maxDepth'] != null) {
|
|
75
72
|
queryParameters['max_depth'] = requestParameters['maxDepth'];
|
|
76
73
|
}
|
|
@@ -95,7 +92,7 @@ export class PathPartsApi extends runtime.BaseAPI {
|
|
|
95
92
|
});
|
|
96
93
|
}
|
|
97
94
|
/**
|
|
98
|
-
* List path parts under a parent with
|
|
95
|
+
* List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
99
96
|
* List Path Parts Handler
|
|
100
97
|
*/
|
|
101
98
|
listPathParts() {
|
|
@@ -0,0 +1,119 @@
|
|
|
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 type { PartType } from './PartType';
|
|
13
|
+
import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
14
|
+
import type { ChunkType } from './ChunkType';
|
|
15
|
+
/**
|
|
16
|
+
* Response model for a single item in the document version contents list.
|
|
17
|
+
*
|
|
18
|
+
* Represents a section or chunk with enriched data (content, metadata)
|
|
19
|
+
* returned in depth-first logical order.
|
|
20
|
+
* @export
|
|
21
|
+
* @interface DocumentContentPathPart
|
|
22
|
+
*/
|
|
23
|
+
export interface DocumentContentPathPart {
|
|
24
|
+
/**
|
|
25
|
+
* PathPart ID
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof DocumentContentPathPart
|
|
28
|
+
*/
|
|
29
|
+
pathPartId: string;
|
|
30
|
+
/**
|
|
31
|
+
* PathPart name
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof DocumentContentPathPart
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* SECTION or CHUNK
|
|
38
|
+
* @type {PartType}
|
|
39
|
+
* @memberof DocumentContentPathPart
|
|
40
|
+
*/
|
|
41
|
+
partType: PartType;
|
|
42
|
+
/**
|
|
43
|
+
* Parent PathPart ID
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof DocumentContentPathPart
|
|
46
|
+
*/
|
|
47
|
+
parentId: string;
|
|
48
|
+
/**
|
|
49
|
+
* Section ID or Chunk ID
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof DocumentContentPathPart
|
|
52
|
+
*/
|
|
53
|
+
metadataObjId: string;
|
|
54
|
+
/**
|
|
55
|
+
* Depth relative to document version root
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof DocumentContentPathPart
|
|
58
|
+
*/
|
|
59
|
+
depth: number;
|
|
60
|
+
/**
|
|
61
|
+
* Chunk content (None for sections)
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof DocumentContentPathPart
|
|
64
|
+
*/
|
|
65
|
+
content?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Chunk type (None for sections)
|
|
68
|
+
* @type {ChunkType}
|
|
69
|
+
* @memberof DocumentContentPathPart
|
|
70
|
+
*/
|
|
71
|
+
chunkType?: ChunkType;
|
|
72
|
+
/**
|
|
73
|
+
* Chunk metadata (None for sections)
|
|
74
|
+
* @type {ChunkMetadataOutput}
|
|
75
|
+
* @memberof DocumentContentPathPart
|
|
76
|
+
*/
|
|
77
|
+
chunkMetadata?: ChunkMetadataOutput;
|
|
78
|
+
/**
|
|
79
|
+
* Section page number (None for chunks)
|
|
80
|
+
* @type {number}
|
|
81
|
+
* @memberof DocumentContentPathPart
|
|
82
|
+
*/
|
|
83
|
+
pageNumber?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Creation timestamp
|
|
86
|
+
* @type {Date}
|
|
87
|
+
* @memberof DocumentContentPathPart
|
|
88
|
+
*/
|
|
89
|
+
createdAt: Date;
|
|
90
|
+
/**
|
|
91
|
+
* Last update timestamp
|
|
92
|
+
* @type {Date}
|
|
93
|
+
* @memberof DocumentContentPathPart
|
|
94
|
+
*/
|
|
95
|
+
updatedAt: Date;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Check if a given object implements the DocumentContentPathPart interface.
|
|
99
|
+
*/
|
|
100
|
+
export declare function instanceOfDocumentContentPathPart(value: object): value is DocumentContentPathPart;
|
|
101
|
+
export declare function DocumentContentPathPartFromJSON(json: any): DocumentContentPathPart;
|
|
102
|
+
export declare function DocumentContentPathPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentContentPathPart;
|
|
103
|
+
export declare function DocumentContentPathPartToJSON(json: any): DocumentContentPathPart;
|
|
104
|
+
export declare function DocumentContentPathPartToJSONTyped(value?: DocumentContentPathPart | null, ignoreDiscriminator?: boolean): any;
|
|
105
|
+
export declare const DocumentContentPathPartPropertyValidationAttributesMap: {
|
|
106
|
+
[property: string]: {
|
|
107
|
+
maxLength?: number;
|
|
108
|
+
minLength?: number;
|
|
109
|
+
pattern?: string;
|
|
110
|
+
maximum?: number;
|
|
111
|
+
exclusiveMaximum?: boolean;
|
|
112
|
+
minimum?: number;
|
|
113
|
+
exclusiveMinimum?: boolean;
|
|
114
|
+
multipleOf?: number;
|
|
115
|
+
maxItems?: number;
|
|
116
|
+
minItems?: number;
|
|
117
|
+
uniqueItems?: boolean;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
import { PartTypeFromJSON, PartTypeToJSON, } from './PartType';
|
|
15
|
+
import { ChunkMetadataOutputFromJSON, ChunkMetadataOutputToJSON, } from './ChunkMetadataOutput';
|
|
16
|
+
import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the DocumentContentPathPart interface.
|
|
19
|
+
*/
|
|
20
|
+
export function instanceOfDocumentContentPathPart(value) {
|
|
21
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('partType' in value) || value['partType'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('parentId' in value) || value['parentId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('metadataObjId' in value) || value['metadataObjId'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('depth' in value) || value['depth'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
export function DocumentContentPathPartFromJSON(json) {
|
|
40
|
+
return DocumentContentPathPartFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
export function DocumentContentPathPartFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'pathPartId': json['path_part_id'],
|
|
48
|
+
'name': json['name'],
|
|
49
|
+
'partType': PartTypeFromJSON(json['part_type']),
|
|
50
|
+
'parentId': json['parent_id'],
|
|
51
|
+
'metadataObjId': json['metadata_obj_id'],
|
|
52
|
+
'depth': json['depth'],
|
|
53
|
+
'content': json['content'] == null ? undefined : json['content'],
|
|
54
|
+
'chunkType': json['chunk_type'] == null ? undefined : ChunkTypeFromJSON(json['chunk_type']),
|
|
55
|
+
'chunkMetadata': json['chunk_metadata'] == null ? undefined : ChunkMetadataOutputFromJSON(json['chunk_metadata']),
|
|
56
|
+
'pageNumber': json['page_number'] == null ? undefined : json['page_number'],
|
|
57
|
+
'createdAt': (new Date(json['created_at'])),
|
|
58
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export function DocumentContentPathPartToJSON(json) {
|
|
62
|
+
return DocumentContentPathPartToJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
export function DocumentContentPathPartToJSONTyped(value, ignoreDiscriminator = false) {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
'path_part_id': value['pathPartId'],
|
|
70
|
+
'name': value['name'],
|
|
71
|
+
'part_type': PartTypeToJSON(value['partType']),
|
|
72
|
+
'parent_id': value['parentId'],
|
|
73
|
+
'metadata_obj_id': value['metadataObjId'],
|
|
74
|
+
'depth': value['depth'],
|
|
75
|
+
'content': value['content'],
|
|
76
|
+
'chunk_type': ChunkTypeToJSON(value['chunkType']),
|
|
77
|
+
'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
|
|
78
|
+
'page_number': value['pageNumber'],
|
|
79
|
+
'created_at': value['createdAt'].toISOString(),
|
|
80
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export const DocumentContentPathPartPropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,138 @@
|
|
|
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 type { DocumentOrigin } from './DocumentOrigin';
|
|
13
|
+
import type { PartType } from './PartType';
|
|
14
|
+
import type { DocumentType } from './DocumentType';
|
|
15
|
+
import type { DocumentVersionResponse } from './DocumentVersionResponse';
|
|
16
|
+
/**
|
|
17
|
+
* Response for folder contents - can be either a Folder or a Document.
|
|
18
|
+
*
|
|
19
|
+
* Inherits PathPart fields from PathPartResponse and adds type-specific fields.
|
|
20
|
+
*
|
|
21
|
+
* Discriminated union based on part_type:
|
|
22
|
+
* - FOLDER: folder_id is set, document fields are None
|
|
23
|
+
* - DOCUMENT: document_id and document fields are set, folder_id is None
|
|
24
|
+
*
|
|
25
|
+
* Inherited fields from PathPartResponse:
|
|
26
|
+
* - path_part_id, name, part_type, parent_id, metadata_obj_id, created_at, updated_at
|
|
27
|
+
* @export
|
|
28
|
+
* @interface FolderDocumentResponse
|
|
29
|
+
*/
|
|
30
|
+
export interface FolderDocumentResponse {
|
|
31
|
+
/**
|
|
32
|
+
* PathPart ID
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof FolderDocumentResponse
|
|
35
|
+
*/
|
|
36
|
+
pathPartId: string;
|
|
37
|
+
/**
|
|
38
|
+
* Item name
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof FolderDocumentResponse
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
* Type (FOLDER, DOCUMENT, etc.)
|
|
45
|
+
* @type {PartType}
|
|
46
|
+
* @memberof FolderDocumentResponse
|
|
47
|
+
*/
|
|
48
|
+
partType: PartType;
|
|
49
|
+
/**
|
|
50
|
+
* Parent PathPart ID
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof FolderDocumentResponse
|
|
53
|
+
*/
|
|
54
|
+
parentId: string;
|
|
55
|
+
/**
|
|
56
|
+
* ID of the underlying object
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof FolderDocumentResponse
|
|
59
|
+
*/
|
|
60
|
+
metadataObjId: string;
|
|
61
|
+
/**
|
|
62
|
+
* Creation timestamp
|
|
63
|
+
* @type {Date}
|
|
64
|
+
* @memberof FolderDocumentResponse
|
|
65
|
+
*/
|
|
66
|
+
createdAt: Date;
|
|
67
|
+
/**
|
|
68
|
+
* Last update timestamp
|
|
69
|
+
* @type {Date}
|
|
70
|
+
* @memberof FolderDocumentResponse
|
|
71
|
+
*/
|
|
72
|
+
updatedAt: Date;
|
|
73
|
+
/**
|
|
74
|
+
* Folder ID (present for folders)
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof FolderDocumentResponse
|
|
77
|
+
*/
|
|
78
|
+
folderId?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Document ID (present for documents)
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof FolderDocumentResponse
|
|
83
|
+
*/
|
|
84
|
+
documentId?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Document type (present for documents)
|
|
87
|
+
* @type {DocumentType}
|
|
88
|
+
* @memberof FolderDocumentResponse
|
|
89
|
+
*/
|
|
90
|
+
documentType?: DocumentType;
|
|
91
|
+
/**
|
|
92
|
+
* Document origin (present for documents)
|
|
93
|
+
* @type {DocumentOrigin}
|
|
94
|
+
* @memberof FolderDocumentResponse
|
|
95
|
+
*/
|
|
96
|
+
documentOrigin?: DocumentOrigin;
|
|
97
|
+
/**
|
|
98
|
+
* Active version ID (present for documents)
|
|
99
|
+
* @type {string}
|
|
100
|
+
* @memberof FolderDocumentResponse
|
|
101
|
+
*/
|
|
102
|
+
activeVersionId?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Active version details (present for documents)
|
|
105
|
+
* @type {DocumentVersionResponse}
|
|
106
|
+
* @memberof FolderDocumentResponse
|
|
107
|
+
*/
|
|
108
|
+
activeVersion?: DocumentVersionResponse;
|
|
109
|
+
/**
|
|
110
|
+
* Tenant ID
|
|
111
|
+
* @type {string}
|
|
112
|
+
* @memberof FolderDocumentResponse
|
|
113
|
+
*/
|
|
114
|
+
tenantId: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Check if a given object implements the FolderDocumentResponse interface.
|
|
118
|
+
*/
|
|
119
|
+
export declare function instanceOfFolderDocumentResponse(value: object): value is FolderDocumentResponse;
|
|
120
|
+
export declare function FolderDocumentResponseFromJSON(json: any): FolderDocumentResponse;
|
|
121
|
+
export declare function FolderDocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderDocumentResponse;
|
|
122
|
+
export declare function FolderDocumentResponseToJSON(json: any): FolderDocumentResponse;
|
|
123
|
+
export declare function FolderDocumentResponseToJSONTyped(value?: FolderDocumentResponse | null, ignoreDiscriminator?: boolean): any;
|
|
124
|
+
export declare const FolderDocumentResponsePropertyValidationAttributesMap: {
|
|
125
|
+
[property: string]: {
|
|
126
|
+
maxLength?: number;
|
|
127
|
+
minLength?: number;
|
|
128
|
+
pattern?: string;
|
|
129
|
+
maximum?: number;
|
|
130
|
+
exclusiveMaximum?: boolean;
|
|
131
|
+
minimum?: number;
|
|
132
|
+
exclusiveMinimum?: boolean;
|
|
133
|
+
multipleOf?: number;
|
|
134
|
+
maxItems?: number;
|
|
135
|
+
minItems?: number;
|
|
136
|
+
uniqueItems?: boolean;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
import { DocumentOriginFromJSON, DocumentOriginToJSON, } from './DocumentOrigin';
|
|
15
|
+
import { PartTypeFromJSON, PartTypeToJSON, } from './PartType';
|
|
16
|
+
import { DocumentTypeFromJSON, DocumentTypeToJSON, } from './DocumentType';
|
|
17
|
+
import { DocumentVersionResponseFromJSON, DocumentVersionResponseToJSON, } from './DocumentVersionResponse';
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the FolderDocumentResponse interface.
|
|
20
|
+
*/
|
|
21
|
+
export function instanceOfFolderDocumentResponse(value) {
|
|
22
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('partType' in value) || value['partType'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('parentId' in value) || value['parentId'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('metadataObjId' in value) || value['metadataObjId'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
export function FolderDocumentResponseFromJSON(json) {
|
|
41
|
+
return FolderDocumentResponseFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
export function FolderDocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
if (json == null) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'pathPartId': json['path_part_id'],
|
|
49
|
+
'name': json['name'],
|
|
50
|
+
'partType': PartTypeFromJSON(json['part_type']),
|
|
51
|
+
'parentId': json['parent_id'],
|
|
52
|
+
'metadataObjId': json['metadata_obj_id'],
|
|
53
|
+
'createdAt': (new Date(json['created_at'])),
|
|
54
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
55
|
+
'folderId': json['folder_id'] == null ? undefined : json['folder_id'],
|
|
56
|
+
'documentId': json['document_id'] == null ? undefined : json['document_id'],
|
|
57
|
+
'documentType': json['document_type'] == null ? undefined : DocumentTypeFromJSON(json['document_type']),
|
|
58
|
+
'documentOrigin': json['document_origin'] == null ? undefined : DocumentOriginFromJSON(json['document_origin']),
|
|
59
|
+
'activeVersionId': json['active_version_id'] == null ? undefined : json['active_version_id'],
|
|
60
|
+
'activeVersion': json['active_version'] == null ? undefined : DocumentVersionResponseFromJSON(json['active_version']),
|
|
61
|
+
'tenantId': json['tenant_id'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export function FolderDocumentResponseToJSON(json) {
|
|
65
|
+
return FolderDocumentResponseToJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
export function FolderDocumentResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
'path_part_id': value['pathPartId'],
|
|
73
|
+
'name': value['name'],
|
|
74
|
+
'part_type': PartTypeToJSON(value['partType']),
|
|
75
|
+
'parent_id': value['parentId'],
|
|
76
|
+
'metadata_obj_id': value['metadataObjId'],
|
|
77
|
+
'created_at': value['createdAt'].toISOString(),
|
|
78
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
79
|
+
'folder_id': value['folderId'],
|
|
80
|
+
'document_id': value['documentId'],
|
|
81
|
+
'document_type': DocumentTypeToJSON(value['documentType']),
|
|
82
|
+
'document_origin': DocumentOriginToJSON(value['documentOrigin']),
|
|
83
|
+
'active_version_id': value['activeVersionId'],
|
|
84
|
+
'active_version': DocumentVersionResponseToJSON(value['activeVersion']),
|
|
85
|
+
'tenant_id': value['tenantId'],
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export const FolderDocumentResponsePropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,66 @@
|
|
|
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 type { DocumentContentPathPart } from './DocumentContentPathPart';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PaginatedResponseDocumentContentPathPart
|
|
17
|
+
*/
|
|
18
|
+
export interface PaginatedResponseDocumentContentPathPart {
|
|
19
|
+
/**
|
|
20
|
+
* List of items
|
|
21
|
+
* @type {Array<DocumentContentPathPart>}
|
|
22
|
+
* @memberof PaginatedResponseDocumentContentPathPart
|
|
23
|
+
*/
|
|
24
|
+
items: Array<DocumentContentPathPart>;
|
|
25
|
+
/**
|
|
26
|
+
* Total number of items
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof PaginatedResponseDocumentContentPathPart
|
|
29
|
+
*/
|
|
30
|
+
total: number;
|
|
31
|
+
/**
|
|
32
|
+
* Number of items per page
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof PaginatedResponseDocumentContentPathPart
|
|
35
|
+
*/
|
|
36
|
+
limit: number;
|
|
37
|
+
/**
|
|
38
|
+
* Number of items to skip
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof PaginatedResponseDocumentContentPathPart
|
|
41
|
+
*/
|
|
42
|
+
offset: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the PaginatedResponseDocumentContentPathPart interface.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instanceOfPaginatedResponseDocumentContentPathPart(value: object): value is PaginatedResponseDocumentContentPathPart;
|
|
48
|
+
export declare function PaginatedResponseDocumentContentPathPartFromJSON(json: any): PaginatedResponseDocumentContentPathPart;
|
|
49
|
+
export declare function PaginatedResponseDocumentContentPathPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseDocumentContentPathPart;
|
|
50
|
+
export declare function PaginatedResponseDocumentContentPathPartToJSON(json: any): PaginatedResponseDocumentContentPathPart;
|
|
51
|
+
export declare function PaginatedResponseDocumentContentPathPartToJSONTyped(value?: PaginatedResponseDocumentContentPathPart | null, ignoreDiscriminator?: boolean): any;
|
|
52
|
+
export declare const PaginatedResponseDocumentContentPathPartPropertyValidationAttributesMap: {
|
|
53
|
+
[property: string]: {
|
|
54
|
+
maxLength?: number;
|
|
55
|
+
minLength?: number;
|
|
56
|
+
pattern?: string;
|
|
57
|
+
maximum?: number;
|
|
58
|
+
exclusiveMaximum?: boolean;
|
|
59
|
+
minimum?: number;
|
|
60
|
+
exclusiveMinimum?: boolean;
|
|
61
|
+
multipleOf?: number;
|
|
62
|
+
maxItems?: number;
|
|
63
|
+
minItems?: number;
|
|
64
|
+
uniqueItems?: boolean;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
import { DocumentContentPathPartFromJSON, DocumentContentPathPartToJSON, } from './DocumentContentPathPart';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the PaginatedResponseDocumentContentPathPart interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfPaginatedResponseDocumentContentPathPart(value) {
|
|
19
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('total' in value) || value['total'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('limit' in value) || value['limit'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('offset' in value) || value['offset'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
export function PaginatedResponseDocumentContentPathPartFromJSON(json) {
|
|
30
|
+
return PaginatedResponseDocumentContentPathPartFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function PaginatedResponseDocumentContentPathPartFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'items': (json['items'].map(DocumentContentPathPartFromJSON)),
|
|
38
|
+
'total': json['total'],
|
|
39
|
+
'limit': json['limit'],
|
|
40
|
+
'offset': json['offset'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function PaginatedResponseDocumentContentPathPartToJSON(json) {
|
|
44
|
+
return PaginatedResponseDocumentContentPathPartToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function PaginatedResponseDocumentContentPathPartToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'items': (value['items'].map(DocumentContentPathPartToJSON)),
|
|
52
|
+
'total': value['total'],
|
|
53
|
+
'limit': value['limit'],
|
|
54
|
+
'offset': value['offset'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export const PaginatedResponseDocumentContentPathPartPropertyValidationAttributesMap = {
|
|
58
|
+
total: {
|
|
59
|
+
minimum: 0,
|
|
60
|
+
exclusiveMinimum: false,
|
|
61
|
+
},
|
|
62
|
+
limit: {
|
|
63
|
+
minimum: 1,
|
|
64
|
+
exclusiveMinimum: false,
|
|
65
|
+
},
|
|
66
|
+
offset: {
|
|
67
|
+
minimum: 0,
|
|
68
|
+
exclusiveMinimum: false,
|
|
69
|
+
},
|
|
70
|
+
};
|