@knowledge-stack/ksapi 1.2.0 → 1.3.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 +10 -0
- package/README.md +2 -2
- package/dist/apis/FoldersApi.d.ts +179 -0
- package/dist/apis/FoldersApi.js +206 -0
- package/dist/apis/PathPartsApi.d.ts +65 -0
- package/dist/apis/PathPartsApi.js +79 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/FoldersApi.d.ts +179 -0
- package/dist/esm/apis/FoldersApi.js +202 -0
- package/dist/esm/apis/PathPartsApi.d.ts +65 -0
- package/dist/esm/apis/PathPartsApi.js +75 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/CreateFolderRequest.d.ts +53 -0
- package/dist/esm/models/CreateFolderRequest.js +53 -0
- package/dist/esm/models/FolderResponse.d.ts +83 -0
- package/dist/esm/models/FolderResponse.js +68 -0
- package/dist/esm/models/PaginatedResponseFolderResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseFolderResponse.js +70 -0
- package/dist/esm/models/PaginatedResponsePathPartResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponsePathPartResponse.js +70 -0
- package/dist/esm/models/PartType.d.ts +30 -0
- package/dist/esm/models/PartType.js +48 -0
- package/dist/esm/models/PathOrder.d.ts +32 -0
- package/dist/esm/models/PathOrder.js +50 -0
- package/dist/esm/models/PathPartResponse.d.ts +84 -0
- package/dist/esm/models/PathPartResponse.js +69 -0
- package/dist/esm/models/UpdateFolderRequest.d.ts +53 -0
- package/dist/esm/models/UpdateFolderRequest.js +49 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/CreateFolderRequest.d.ts +53 -0
- package/dist/models/CreateFolderRequest.js +61 -0
- package/dist/models/FolderResponse.d.ts +83 -0
- package/dist/models/FolderResponse.js +76 -0
- package/dist/models/PaginatedResponseFolderResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseFolderResponse.js +78 -0
- package/dist/models/PaginatedResponsePathPartResponse.d.ts +66 -0
- package/dist/models/PaginatedResponsePathPartResponse.js +78 -0
- package/dist/models/PartType.d.ts +30 -0
- package/dist/models/PartType.js +56 -0
- package/dist/models/PathOrder.d.ts +32 -0
- package/dist/models/PathOrder.js +58 -0
- package/dist/models/PathPartResponse.d.ts +84 -0
- package/dist/models/PathPartResponse.js +77 -0
- package/dist/models/UpdateFolderRequest.d.ts +53 -0
- package/dist/models/UpdateFolderRequest.js +57 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/package.json +1 -1
- package/src/apis/FoldersApi.ts +386 -0
- package/src/apis/PathPartsApi.ts +132 -0
- package/src/apis/index.ts +2 -0
- package/src/models/CreateFolderRequest.ts +96 -0
- package/src/models/FolderResponse.ts +137 -0
- package/src/models/PaginatedResponseFolderResponse.ts +130 -0
- package/src/models/PaginatedResponsePathPartResponse.ts +130 -0
- package/src/models/PartType.ts +58 -0
- package/src/models/PathOrder.ts +60 -0
- package/src/models/PathPartResponse.ts +147 -0
- package/src/models/UpdateFolderRequest.ts +94 -0
- package/src/models/index.ts +8 -0
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
* Folder response model.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface FolderResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface FolderResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Folder ID
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof FolderResponse
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* PathPart ID
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof FolderResponse
|
|
32
|
+
*/
|
|
33
|
+
pathPartId: string;
|
|
34
|
+
/**
|
|
35
|
+
* Folder name
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof FolderResponse
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
/**
|
|
41
|
+
* Parent PathPart ID
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof FolderResponse
|
|
44
|
+
*/
|
|
45
|
+
parentId: string;
|
|
46
|
+
/**
|
|
47
|
+
* Tenant ID
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof FolderResponse
|
|
50
|
+
*/
|
|
51
|
+
tenantId: string;
|
|
52
|
+
/**
|
|
53
|
+
* Creation timestamp
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof FolderResponse
|
|
56
|
+
*/
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
/**
|
|
59
|
+
* Last update timestamp
|
|
60
|
+
* @type {Date}
|
|
61
|
+
* @memberof FolderResponse
|
|
62
|
+
*/
|
|
63
|
+
updatedAt: Date;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the FolderResponse interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfFolderResponse(value: object): value is FolderResponse {
|
|
70
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
71
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
|
|
72
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
73
|
+
if (!('parentId' in value) || value['parentId'] === undefined) return false;
|
|
74
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
|
|
75
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
76
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function FolderResponseFromJSON(json: any): FolderResponse {
|
|
81
|
+
return FolderResponseFromJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function FolderResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderResponse {
|
|
85
|
+
if (json == null) {
|
|
86
|
+
return json;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'id': json['id'],
|
|
91
|
+
'pathPartId': json['path_part_id'],
|
|
92
|
+
'name': json['name'],
|
|
93
|
+
'parentId': json['parent_id'],
|
|
94
|
+
'tenantId': json['tenant_id'],
|
|
95
|
+
'createdAt': (new Date(json['created_at'])),
|
|
96
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function FolderResponseToJSON(json: any): FolderResponse {
|
|
101
|
+
return FolderResponseToJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function FolderResponseToJSONTyped(value?: FolderResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
105
|
+
if (value == null) {
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'id': value['id'],
|
|
112
|
+
'path_part_id': value['pathPartId'],
|
|
113
|
+
'name': value['name'],
|
|
114
|
+
'parent_id': value['parentId'],
|
|
115
|
+
'tenant_id': value['tenantId'],
|
|
116
|
+
'created_at': value['createdAt'].toISOString(),
|
|
117
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export const FolderResponsePropertyValidationAttributesMap: {
|
|
122
|
+
[property: string]: {
|
|
123
|
+
maxLength?: number,
|
|
124
|
+
minLength?: number,
|
|
125
|
+
pattern?: string,
|
|
126
|
+
maximum?: number,
|
|
127
|
+
exclusiveMaximum?: boolean,
|
|
128
|
+
minimum?: number,
|
|
129
|
+
exclusiveMinimum?: boolean,
|
|
130
|
+
multipleOf?: number,
|
|
131
|
+
maxItems?: number,
|
|
132
|
+
minItems?: number,
|
|
133
|
+
uniqueItems?: boolean
|
|
134
|
+
}
|
|
135
|
+
} = {
|
|
136
|
+
}
|
|
137
|
+
|
|
@@ -0,0 +1,130 @@
|
|
|
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 { FolderResponse } from './FolderResponse';
|
|
17
|
+
import {
|
|
18
|
+
FolderResponseFromJSON,
|
|
19
|
+
FolderResponseFromJSONTyped,
|
|
20
|
+
FolderResponseToJSON,
|
|
21
|
+
FolderResponseToJSONTyped,
|
|
22
|
+
} from './FolderResponse';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PaginatedResponseFolderResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface PaginatedResponseFolderResponse {
|
|
30
|
+
/**
|
|
31
|
+
* List of items
|
|
32
|
+
* @type {Array<FolderResponse>}
|
|
33
|
+
* @memberof PaginatedResponseFolderResponse
|
|
34
|
+
*/
|
|
35
|
+
items: Array<FolderResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Total number of items
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PaginatedResponseFolderResponse
|
|
40
|
+
*/
|
|
41
|
+
total: number;
|
|
42
|
+
/**
|
|
43
|
+
* Number of items per page
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof PaginatedResponseFolderResponse
|
|
46
|
+
*/
|
|
47
|
+
limit: number;
|
|
48
|
+
/**
|
|
49
|
+
* Number of items to skip
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof PaginatedResponseFolderResponse
|
|
52
|
+
*/
|
|
53
|
+
offset: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the PaginatedResponseFolderResponse interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfPaginatedResponseFolderResponse(value: object): value is PaginatedResponseFolderResponse {
|
|
60
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
61
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
62
|
+
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
63
|
+
if (!('offset' in value) || value['offset'] === undefined) return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function PaginatedResponseFolderResponseFromJSON(json: any): PaginatedResponseFolderResponse {
|
|
68
|
+
return PaginatedResponseFolderResponseFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function PaginatedResponseFolderResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseFolderResponse {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'items': ((json['items'] as Array<any>).map(FolderResponseFromJSON)),
|
|
78
|
+
'total': json['total'],
|
|
79
|
+
'limit': json['limit'],
|
|
80
|
+
'offset': json['offset'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PaginatedResponseFolderResponseToJSON(json: any): PaginatedResponseFolderResponse {
|
|
85
|
+
return PaginatedResponseFolderResponseToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function PaginatedResponseFolderResponseToJSONTyped(value?: PaginatedResponseFolderResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'items': ((value['items'] as Array<any>).map(FolderResponseToJSON)),
|
|
96
|
+
'total': value['total'],
|
|
97
|
+
'limit': value['limit'],
|
|
98
|
+
'offset': value['offset'],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const PaginatedResponseFolderResponsePropertyValidationAttributesMap: {
|
|
103
|
+
[property: string]: {
|
|
104
|
+
maxLength?: number,
|
|
105
|
+
minLength?: number,
|
|
106
|
+
pattern?: string,
|
|
107
|
+
maximum?: number,
|
|
108
|
+
exclusiveMaximum?: boolean,
|
|
109
|
+
minimum?: number,
|
|
110
|
+
exclusiveMinimum?: boolean,
|
|
111
|
+
multipleOf?: number,
|
|
112
|
+
maxItems?: number,
|
|
113
|
+
minItems?: number,
|
|
114
|
+
uniqueItems?: boolean
|
|
115
|
+
}
|
|
116
|
+
} = {
|
|
117
|
+
total: {
|
|
118
|
+
minimum: 0,
|
|
119
|
+
exclusiveMinimum: false,
|
|
120
|
+
},
|
|
121
|
+
limit: {
|
|
122
|
+
minimum: 1,
|
|
123
|
+
exclusiveMinimum: false,
|
|
124
|
+
},
|
|
125
|
+
offset: {
|
|
126
|
+
minimum: 0,
|
|
127
|
+
exclusiveMinimum: false,
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
|
|
@@ -0,0 +1,130 @@
|
|
|
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 { PathPartResponse } from './PathPartResponse';
|
|
17
|
+
import {
|
|
18
|
+
PathPartResponseFromJSON,
|
|
19
|
+
PathPartResponseFromJSONTyped,
|
|
20
|
+
PathPartResponseToJSON,
|
|
21
|
+
PathPartResponseToJSONTyped,
|
|
22
|
+
} from './PathPartResponse';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PaginatedResponsePathPartResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface PaginatedResponsePathPartResponse {
|
|
30
|
+
/**
|
|
31
|
+
* List of items
|
|
32
|
+
* @type {Array<PathPartResponse>}
|
|
33
|
+
* @memberof PaginatedResponsePathPartResponse
|
|
34
|
+
*/
|
|
35
|
+
items: Array<PathPartResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Total number of items
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PaginatedResponsePathPartResponse
|
|
40
|
+
*/
|
|
41
|
+
total: number;
|
|
42
|
+
/**
|
|
43
|
+
* Number of items per page
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof PaginatedResponsePathPartResponse
|
|
46
|
+
*/
|
|
47
|
+
limit: number;
|
|
48
|
+
/**
|
|
49
|
+
* Number of items to skip
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof PaginatedResponsePathPartResponse
|
|
52
|
+
*/
|
|
53
|
+
offset: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the PaginatedResponsePathPartResponse interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfPaginatedResponsePathPartResponse(value: object): value is PaginatedResponsePathPartResponse {
|
|
60
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
61
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
62
|
+
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
63
|
+
if (!('offset' in value) || value['offset'] === undefined) return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function PaginatedResponsePathPartResponseFromJSON(json: any): PaginatedResponsePathPartResponse {
|
|
68
|
+
return PaginatedResponsePathPartResponseFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function PaginatedResponsePathPartResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponsePathPartResponse {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'items': ((json['items'] as Array<any>).map(PathPartResponseFromJSON)),
|
|
78
|
+
'total': json['total'],
|
|
79
|
+
'limit': json['limit'],
|
|
80
|
+
'offset': json['offset'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PaginatedResponsePathPartResponseToJSON(json: any): PaginatedResponsePathPartResponse {
|
|
85
|
+
return PaginatedResponsePathPartResponseToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function PaginatedResponsePathPartResponseToJSONTyped(value?: PaginatedResponsePathPartResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'items': ((value['items'] as Array<any>).map(PathPartResponseToJSON)),
|
|
96
|
+
'total': value['total'],
|
|
97
|
+
'limit': value['limit'],
|
|
98
|
+
'offset': value['offset'],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const PaginatedResponsePathPartResponsePropertyValidationAttributesMap: {
|
|
103
|
+
[property: string]: {
|
|
104
|
+
maxLength?: number,
|
|
105
|
+
minLength?: number,
|
|
106
|
+
pattern?: string,
|
|
107
|
+
maximum?: number,
|
|
108
|
+
exclusiveMaximum?: boolean,
|
|
109
|
+
minimum?: number,
|
|
110
|
+
exclusiveMinimum?: boolean,
|
|
111
|
+
multipleOf?: number,
|
|
112
|
+
maxItems?: number,
|
|
113
|
+
minItems?: number,
|
|
114
|
+
uniqueItems?: boolean
|
|
115
|
+
}
|
|
116
|
+
} = {
|
|
117
|
+
total: {
|
|
118
|
+
minimum: 0,
|
|
119
|
+
exclusiveMinimum: false,
|
|
120
|
+
},
|
|
121
|
+
limit: {
|
|
122
|
+
minimum: 1,
|
|
123
|
+
exclusiveMinimum: false,
|
|
124
|
+
},
|
|
125
|
+
offset: {
|
|
126
|
+
minimum: 0,
|
|
127
|
+
exclusiveMinimum: false,
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Type of path part in the filesystem.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const PartType = {
|
|
21
|
+
Folder: 'FOLDER',
|
|
22
|
+
Document: 'DOCUMENT',
|
|
23
|
+
DocumentVersion: 'DOCUMENT_VERSION',
|
|
24
|
+
Section: 'SECTION',
|
|
25
|
+
Chunk: 'CHUNK',
|
|
26
|
+
Thread: 'THREAD',
|
|
27
|
+
ThreadMessage: 'THREAD_MESSAGE'
|
|
28
|
+
} as const;
|
|
29
|
+
export type PartType = typeof PartType[keyof typeof PartType];
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export function instanceOfPartType(value: any): boolean {
|
|
33
|
+
for (const key in PartType) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(PartType, key)) {
|
|
35
|
+
if (PartType[key as keyof typeof PartType] === value) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function PartTypeFromJSON(json: any): PartType {
|
|
44
|
+
return PartTypeFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function PartTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartType {
|
|
48
|
+
return json as PartType;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function PartTypeToJSON(value?: PartType | null): any {
|
|
52
|
+
return value as any;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function PartTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): PartType {
|
|
56
|
+
return value as PartType;
|
|
57
|
+
}
|
|
58
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Ordering strategy for path traversal results.
|
|
18
|
+
*
|
|
19
|
+
* - LOGICAL: Use prev/next_sibling_path_part_id linked list order per depth level
|
|
20
|
+
* - NAME: Alphabetical by path_part.name (DEFAULT)
|
|
21
|
+
* - UPDATED_AT: By updated_at timestamp (most recent first)
|
|
22
|
+
* - CREATED_AT: By created_at timestamp (oldest first)
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export const PathOrder = {
|
|
26
|
+
Logical: 'LOGICAL',
|
|
27
|
+
Name: 'NAME',
|
|
28
|
+
UpdatedAt: 'UPDATED_AT',
|
|
29
|
+
CreatedAt: 'CREATED_AT'
|
|
30
|
+
} as const;
|
|
31
|
+
export type PathOrder = typeof PathOrder[keyof typeof PathOrder];
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export function instanceOfPathOrder(value: any): boolean {
|
|
35
|
+
for (const key in PathOrder) {
|
|
36
|
+
if (Object.prototype.hasOwnProperty.call(PathOrder, key)) {
|
|
37
|
+
if (PathOrder[key as keyof typeof PathOrder] === value) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function PathOrderFromJSON(json: any): PathOrder {
|
|
46
|
+
return PathOrderFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function PathOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): PathOrder {
|
|
50
|
+
return json as PathOrder;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function PathOrderToJSON(value?: PathOrder | null): any {
|
|
54
|
+
return value as any;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function PathOrderToJSONTyped(value: any, ignoreDiscriminator: boolean): PathOrder {
|
|
58
|
+
return value as PathOrder;
|
|
59
|
+
}
|
|
60
|
+
|
|
@@ -0,0 +1,147 @@
|
|
|
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 { PartType } from './PartType';
|
|
17
|
+
import {
|
|
18
|
+
PartTypeFromJSON,
|
|
19
|
+
PartTypeFromJSONTyped,
|
|
20
|
+
PartTypeToJSON,
|
|
21
|
+
PartTypeToJSONTyped,
|
|
22
|
+
} from './PartType';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Generic path part response model.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PathPartResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface PathPartResponse {
|
|
30
|
+
/**
|
|
31
|
+
* PathPart ID
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof PathPartResponse
|
|
34
|
+
*/
|
|
35
|
+
pathPartId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Item name
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof PathPartResponse
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
* Type (FOLDER, DOCUMENT, etc.)
|
|
44
|
+
* @type {PartType}
|
|
45
|
+
* @memberof PathPartResponse
|
|
46
|
+
*/
|
|
47
|
+
partType: PartType;
|
|
48
|
+
/**
|
|
49
|
+
* Parent PathPart ID
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof PathPartResponse
|
|
52
|
+
*/
|
|
53
|
+
parentId: string;
|
|
54
|
+
/**
|
|
55
|
+
* ID of the underlying object
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof PathPartResponse
|
|
58
|
+
*/
|
|
59
|
+
metadataObjId: string;
|
|
60
|
+
/**
|
|
61
|
+
* Creation timestamp
|
|
62
|
+
* @type {Date}
|
|
63
|
+
* @memberof PathPartResponse
|
|
64
|
+
*/
|
|
65
|
+
createdAt: Date;
|
|
66
|
+
/**
|
|
67
|
+
* Last update timestamp
|
|
68
|
+
* @type {Date}
|
|
69
|
+
* @memberof PathPartResponse
|
|
70
|
+
*/
|
|
71
|
+
updatedAt: Date;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Check if a given object implements the PathPartResponse interface.
|
|
78
|
+
*/
|
|
79
|
+
export function instanceOfPathPartResponse(value: object): value is PathPartResponse {
|
|
80
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
|
|
81
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
82
|
+
if (!('partType' in value) || value['partType'] === undefined) return false;
|
|
83
|
+
if (!('parentId' in value) || value['parentId'] === undefined) return false;
|
|
84
|
+
if (!('metadataObjId' in value) || value['metadataObjId'] === undefined) return false;
|
|
85
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
86
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function PathPartResponseFromJSON(json: any): PathPartResponse {
|
|
91
|
+
return PathPartResponseFromJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function PathPartResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PathPartResponse {
|
|
95
|
+
if (json == null) {
|
|
96
|
+
return json;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
|
|
100
|
+
'pathPartId': json['path_part_id'],
|
|
101
|
+
'name': json['name'],
|
|
102
|
+
'partType': PartTypeFromJSON(json['part_type']),
|
|
103
|
+
'parentId': json['parent_id'],
|
|
104
|
+
'metadataObjId': json['metadata_obj_id'],
|
|
105
|
+
'createdAt': (new Date(json['created_at'])),
|
|
106
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function PathPartResponseToJSON(json: any): PathPartResponse {
|
|
111
|
+
return PathPartResponseToJSONTyped(json, false);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function PathPartResponseToJSONTyped(value?: PathPartResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
115
|
+
if (value == null) {
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
|
|
121
|
+
'path_part_id': value['pathPartId'],
|
|
122
|
+
'name': value['name'],
|
|
123
|
+
'part_type': PartTypeToJSON(value['partType']),
|
|
124
|
+
'parent_id': value['parentId'],
|
|
125
|
+
'metadata_obj_id': value['metadataObjId'],
|
|
126
|
+
'created_at': value['createdAt'].toISOString(),
|
|
127
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export const PathPartResponsePropertyValidationAttributesMap: {
|
|
132
|
+
[property: string]: {
|
|
133
|
+
maxLength?: number,
|
|
134
|
+
minLength?: number,
|
|
135
|
+
pattern?: string,
|
|
136
|
+
maximum?: number,
|
|
137
|
+
exclusiveMaximum?: boolean,
|
|
138
|
+
minimum?: number,
|
|
139
|
+
exclusiveMinimum?: boolean,
|
|
140
|
+
multipleOf?: number,
|
|
141
|
+
maxItems?: number,
|
|
142
|
+
minItems?: number,
|
|
143
|
+
uniqueItems?: boolean
|
|
144
|
+
}
|
|
145
|
+
} = {
|
|
146
|
+
}
|
|
147
|
+
|