@knowledge-stack/ksapi 1.4.0 → 1.5.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 +8 -0
- package/README.md +2 -2
- package/dist/apis/DocumentsApi.d.ts +179 -0
- package/dist/apis/DocumentsApi.js +206 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/DocumentsApi.d.ts +179 -0
- package/dist/esm/apis/DocumentsApi.js +202 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/CreateDocumentRequest.d.ts +67 -0
- package/dist/esm/models/CreateDocumentRequest.js +63 -0
- package/dist/esm/models/DocumentOrigin.d.ts +25 -0
- package/dist/esm/models/DocumentOrigin.js +43 -0
- package/dist/esm/models/DocumentResponse.d.ts +110 -0
- package/dist/esm/models/DocumentResponse.js +87 -0
- package/dist/esm/models/DocumentType.d.ts +25 -0
- package/dist/esm/models/DocumentType.js +43 -0
- package/dist/esm/models/DocumentVersionResponse.d.ts +92 -0
- package/dist/esm/models/DocumentVersionResponse.js +72 -0
- package/dist/esm/models/PaginatedResponseDocumentResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseDocumentResponse.js +70 -0
- package/dist/esm/models/UpdateDocumentRequest.d.ts +59 -0
- package/dist/esm/models/UpdateDocumentRequest.js +51 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -0
- package/dist/models/CreateDocumentRequest.d.ts +67 -0
- package/dist/models/CreateDocumentRequest.js +71 -0
- package/dist/models/DocumentOrigin.d.ts +25 -0
- package/dist/models/DocumentOrigin.js +51 -0
- package/dist/models/DocumentResponse.d.ts +110 -0
- package/dist/models/DocumentResponse.js +95 -0
- package/dist/models/DocumentType.d.ts +25 -0
- package/dist/models/DocumentType.js +51 -0
- package/dist/models/DocumentVersionResponse.d.ts +92 -0
- package/dist/models/DocumentVersionResponse.js +80 -0
- package/dist/models/PaginatedResponseDocumentResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseDocumentResponse.js +78 -0
- package/dist/models/UpdateDocumentRequest.d.ts +59 -0
- package/dist/models/UpdateDocumentRequest.js +59 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/package.json +1 -1
- package/src/apis/DocumentsApi.ts +386 -0
- package/src/apis/index.ts +1 -0
- package/src/models/CreateDocumentRequest.ts +131 -0
- package/src/models/DocumentOrigin.ts +53 -0
- package/src/models/DocumentResponse.ts +197 -0
- package/src/models/DocumentType.ts +53 -0
- package/src/models/DocumentVersionResponse.ts +149 -0
- package/src/models/PaginatedResponseDocumentResponse.ts +130 -0
- package/src/models/UpdateDocumentRequest.ts +102 -0
- package/src/models/index.ts +7 -0
|
@@ -0,0 +1,131 @@
|
|
|
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 { DocumentOrigin } from './DocumentOrigin';
|
|
17
|
+
import {
|
|
18
|
+
DocumentOriginFromJSON,
|
|
19
|
+
DocumentOriginFromJSONTyped,
|
|
20
|
+
DocumentOriginToJSON,
|
|
21
|
+
DocumentOriginToJSONTyped,
|
|
22
|
+
} from './DocumentOrigin';
|
|
23
|
+
import type { DocumentType } from './DocumentType';
|
|
24
|
+
import {
|
|
25
|
+
DocumentTypeFromJSON,
|
|
26
|
+
DocumentTypeFromJSONTyped,
|
|
27
|
+
DocumentTypeToJSON,
|
|
28
|
+
DocumentTypeToJSONTyped,
|
|
29
|
+
} from './DocumentType';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Request to create a new document.
|
|
33
|
+
* @export
|
|
34
|
+
* @interface CreateDocumentRequest
|
|
35
|
+
*/
|
|
36
|
+
export interface CreateDocumentRequest {
|
|
37
|
+
/**
|
|
38
|
+
* Document name
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof CreateDocumentRequest
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
* Parent folder PathPart ID
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof CreateDocumentRequest
|
|
47
|
+
*/
|
|
48
|
+
parentId: string;
|
|
49
|
+
/**
|
|
50
|
+
* Type of document (PDF, UNKNOWN, etc.)
|
|
51
|
+
* @type {DocumentType}
|
|
52
|
+
* @memberof CreateDocumentRequest
|
|
53
|
+
*/
|
|
54
|
+
documentType: DocumentType;
|
|
55
|
+
/**
|
|
56
|
+
* Origin of document (SOURCE, GENERATED)
|
|
57
|
+
* @type {DocumentOrigin}
|
|
58
|
+
* @memberof CreateDocumentRequest
|
|
59
|
+
*/
|
|
60
|
+
documentOrigin: DocumentOrigin;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Check if a given object implements the CreateDocumentRequest interface.
|
|
67
|
+
*/
|
|
68
|
+
export function instanceOfCreateDocumentRequest(value: object): value is CreateDocumentRequest {
|
|
69
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
70
|
+
if (!('parentId' in value) || value['parentId'] === undefined) return false;
|
|
71
|
+
if (!('documentType' in value) || value['documentType'] === undefined) return false;
|
|
72
|
+
if (!('documentOrigin' in value) || value['documentOrigin'] === undefined) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function CreateDocumentRequestFromJSON(json: any): CreateDocumentRequest {
|
|
77
|
+
return CreateDocumentRequestFromJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function CreateDocumentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateDocumentRequest {
|
|
81
|
+
if (json == null) {
|
|
82
|
+
return json;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'name': json['name'],
|
|
87
|
+
'parentId': json['parent_id'],
|
|
88
|
+
'documentType': DocumentTypeFromJSON(json['document_type']),
|
|
89
|
+
'documentOrigin': DocumentOriginFromJSON(json['document_origin']),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function CreateDocumentRequestToJSON(json: any): CreateDocumentRequest {
|
|
94
|
+
return CreateDocumentRequestToJSONTyped(json, false);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function CreateDocumentRequestToJSONTyped(value?: CreateDocumentRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
98
|
+
if (value == null) {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
|
|
104
|
+
'name': value['name'],
|
|
105
|
+
'parent_id': value['parentId'],
|
|
106
|
+
'document_type': DocumentTypeToJSON(value['documentType']),
|
|
107
|
+
'document_origin': DocumentOriginToJSON(value['documentOrigin']),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export const CreateDocumentRequestPropertyValidationAttributesMap: {
|
|
112
|
+
[property: string]: {
|
|
113
|
+
maxLength?: number,
|
|
114
|
+
minLength?: number,
|
|
115
|
+
pattern?: string,
|
|
116
|
+
maximum?: number,
|
|
117
|
+
exclusiveMaximum?: boolean,
|
|
118
|
+
minimum?: number,
|
|
119
|
+
exclusiveMinimum?: boolean,
|
|
120
|
+
multipleOf?: number,
|
|
121
|
+
maxItems?: number,
|
|
122
|
+
minItems?: number,
|
|
123
|
+
uniqueItems?: boolean
|
|
124
|
+
}
|
|
125
|
+
} = {
|
|
126
|
+
name: {
|
|
127
|
+
maxLength: 255,
|
|
128
|
+
minLength: 1,
|
|
129
|
+
},
|
|
130
|
+
}
|
|
131
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
* Origin of document - source/purpose (all origins are first-class).
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const DocumentOrigin = {
|
|
21
|
+
Source: 'SOURCE',
|
|
22
|
+
Generated: 'GENERATED'
|
|
23
|
+
} as const;
|
|
24
|
+
export type DocumentOrigin = typeof DocumentOrigin[keyof typeof DocumentOrigin];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfDocumentOrigin(value: any): boolean {
|
|
28
|
+
for (const key in DocumentOrigin) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(DocumentOrigin, key)) {
|
|
30
|
+
if (DocumentOrigin[key as keyof typeof DocumentOrigin] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function DocumentOriginFromJSON(json: any): DocumentOrigin {
|
|
39
|
+
return DocumentOriginFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function DocumentOriginFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentOrigin {
|
|
43
|
+
return json as DocumentOrigin;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function DocumentOriginToJSON(value?: DocumentOrigin | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function DocumentOriginToJSONTyped(value: any, ignoreDiscriminator: boolean): DocumentOrigin {
|
|
51
|
+
return value as DocumentOrigin;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,197 @@
|
|
|
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 { DocumentOrigin } from './DocumentOrigin';
|
|
17
|
+
import {
|
|
18
|
+
DocumentOriginFromJSON,
|
|
19
|
+
DocumentOriginFromJSONTyped,
|
|
20
|
+
DocumentOriginToJSON,
|
|
21
|
+
DocumentOriginToJSONTyped,
|
|
22
|
+
} from './DocumentOrigin';
|
|
23
|
+
import type { DocumentType } from './DocumentType';
|
|
24
|
+
import {
|
|
25
|
+
DocumentTypeFromJSON,
|
|
26
|
+
DocumentTypeFromJSONTyped,
|
|
27
|
+
DocumentTypeToJSON,
|
|
28
|
+
DocumentTypeToJSONTyped,
|
|
29
|
+
} from './DocumentType';
|
|
30
|
+
import type { DocumentVersionResponse } from './DocumentVersionResponse';
|
|
31
|
+
import {
|
|
32
|
+
DocumentVersionResponseFromJSON,
|
|
33
|
+
DocumentVersionResponseFromJSONTyped,
|
|
34
|
+
DocumentVersionResponseToJSON,
|
|
35
|
+
DocumentVersionResponseToJSONTyped,
|
|
36
|
+
} from './DocumentVersionResponse';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Document response model.
|
|
40
|
+
* @export
|
|
41
|
+
* @interface DocumentResponse
|
|
42
|
+
*/
|
|
43
|
+
export interface DocumentResponse {
|
|
44
|
+
/**
|
|
45
|
+
* Document ID
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof DocumentResponse
|
|
48
|
+
*/
|
|
49
|
+
id: string;
|
|
50
|
+
/**
|
|
51
|
+
* PathPart ID
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof DocumentResponse
|
|
54
|
+
*/
|
|
55
|
+
pathPartId: string;
|
|
56
|
+
/**
|
|
57
|
+
* Document name
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof DocumentResponse
|
|
60
|
+
*/
|
|
61
|
+
name: string;
|
|
62
|
+
/**
|
|
63
|
+
* Parent PathPart ID
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @memberof DocumentResponse
|
|
66
|
+
*/
|
|
67
|
+
parentId: string;
|
|
68
|
+
/**
|
|
69
|
+
* Type of document
|
|
70
|
+
* @type {DocumentType}
|
|
71
|
+
* @memberof DocumentResponse
|
|
72
|
+
*/
|
|
73
|
+
documentType: DocumentType;
|
|
74
|
+
/**
|
|
75
|
+
* Origin of document
|
|
76
|
+
* @type {DocumentOrigin}
|
|
77
|
+
* @memberof DocumentResponse
|
|
78
|
+
*/
|
|
79
|
+
documentOrigin: DocumentOrigin;
|
|
80
|
+
/**
|
|
81
|
+
* Active version ID
|
|
82
|
+
* @type {string}
|
|
83
|
+
* @memberof DocumentResponse
|
|
84
|
+
*/
|
|
85
|
+
activeVersionId: string;
|
|
86
|
+
/**
|
|
87
|
+
* Active version details
|
|
88
|
+
* @type {DocumentVersionResponse}
|
|
89
|
+
* @memberof DocumentResponse
|
|
90
|
+
*/
|
|
91
|
+
activeVersion: DocumentVersionResponse;
|
|
92
|
+
/**
|
|
93
|
+
* Tenant ID
|
|
94
|
+
* @type {string}
|
|
95
|
+
* @memberof DocumentResponse
|
|
96
|
+
*/
|
|
97
|
+
tenantId: string;
|
|
98
|
+
/**
|
|
99
|
+
* Creation timestamp
|
|
100
|
+
* @type {Date}
|
|
101
|
+
* @memberof DocumentResponse
|
|
102
|
+
*/
|
|
103
|
+
createdAt: Date;
|
|
104
|
+
/**
|
|
105
|
+
* Last update timestamp
|
|
106
|
+
* @type {Date}
|
|
107
|
+
* @memberof DocumentResponse
|
|
108
|
+
*/
|
|
109
|
+
updatedAt: Date;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Check if a given object implements the DocumentResponse interface.
|
|
116
|
+
*/
|
|
117
|
+
export function instanceOfDocumentResponse(value: object): value is DocumentResponse {
|
|
118
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
119
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
|
|
120
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
121
|
+
if (!('parentId' in value) || value['parentId'] === undefined) return false;
|
|
122
|
+
if (!('documentType' in value) || value['documentType'] === undefined) return false;
|
|
123
|
+
if (!('documentOrigin' in value) || value['documentOrigin'] === undefined) return false;
|
|
124
|
+
if (!('activeVersionId' in value) || value['activeVersionId'] === undefined) return false;
|
|
125
|
+
if (!('activeVersion' in value) || value['activeVersion'] === undefined) return false;
|
|
126
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
|
|
127
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
128
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function DocumentResponseFromJSON(json: any): DocumentResponse {
|
|
133
|
+
return DocumentResponseFromJSONTyped(json, false);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function DocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentResponse {
|
|
137
|
+
if (json == null) {
|
|
138
|
+
return json;
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
|
|
142
|
+
'id': json['id'],
|
|
143
|
+
'pathPartId': json['path_part_id'],
|
|
144
|
+
'name': json['name'],
|
|
145
|
+
'parentId': json['parent_id'],
|
|
146
|
+
'documentType': DocumentTypeFromJSON(json['document_type']),
|
|
147
|
+
'documentOrigin': DocumentOriginFromJSON(json['document_origin']),
|
|
148
|
+
'activeVersionId': json['active_version_id'],
|
|
149
|
+
'activeVersion': DocumentVersionResponseFromJSON(json['active_version']),
|
|
150
|
+
'tenantId': json['tenant_id'],
|
|
151
|
+
'createdAt': (new Date(json['created_at'])),
|
|
152
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function DocumentResponseToJSON(json: any): DocumentResponse {
|
|
157
|
+
return DocumentResponseToJSONTyped(json, false);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function DocumentResponseToJSONTyped(value?: DocumentResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
161
|
+
if (value == null) {
|
|
162
|
+
return value;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return {
|
|
166
|
+
|
|
167
|
+
'id': value['id'],
|
|
168
|
+
'path_part_id': value['pathPartId'],
|
|
169
|
+
'name': value['name'],
|
|
170
|
+
'parent_id': value['parentId'],
|
|
171
|
+
'document_type': DocumentTypeToJSON(value['documentType']),
|
|
172
|
+
'document_origin': DocumentOriginToJSON(value['documentOrigin']),
|
|
173
|
+
'active_version_id': value['activeVersionId'],
|
|
174
|
+
'active_version': DocumentVersionResponseToJSON(value['activeVersion']),
|
|
175
|
+
'tenant_id': value['tenantId'],
|
|
176
|
+
'created_at': value['createdAt'].toISOString(),
|
|
177
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export const DocumentResponsePropertyValidationAttributesMap: {
|
|
182
|
+
[property: string]: {
|
|
183
|
+
maxLength?: number,
|
|
184
|
+
minLength?: number,
|
|
185
|
+
pattern?: string,
|
|
186
|
+
maximum?: number,
|
|
187
|
+
exclusiveMaximum?: boolean,
|
|
188
|
+
minimum?: number,
|
|
189
|
+
exclusiveMinimum?: boolean,
|
|
190
|
+
multipleOf?: number,
|
|
191
|
+
maxItems?: number,
|
|
192
|
+
minItems?: number,
|
|
193
|
+
uniqueItems?: boolean
|
|
194
|
+
}
|
|
195
|
+
} = {
|
|
196
|
+
}
|
|
197
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
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 document.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const DocumentType = {
|
|
21
|
+
Pdf: 'PDF',
|
|
22
|
+
Unknown: 'UNKNOWN'
|
|
23
|
+
} as const;
|
|
24
|
+
export type DocumentType = typeof DocumentType[keyof typeof DocumentType];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfDocumentType(value: any): boolean {
|
|
28
|
+
for (const key in DocumentType) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(DocumentType, key)) {
|
|
30
|
+
if (DocumentType[key as keyof typeof DocumentType] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function DocumentTypeFromJSON(json: any): DocumentType {
|
|
39
|
+
return DocumentTypeFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function DocumentTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentType {
|
|
43
|
+
return json as DocumentType;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function DocumentTypeToJSON(value?: DocumentType | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function DocumentTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): DocumentType {
|
|
51
|
+
return value as DocumentType;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,149 @@
|
|
|
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
|
+
* DocumentVersion response model.
|
|
18
|
+
*
|
|
19
|
+
* Shared schema for DocumentVersion responses, used by Document endpoints
|
|
20
|
+
* and future DocumentVersion endpoints.
|
|
21
|
+
* @export
|
|
22
|
+
* @interface DocumentVersionResponse
|
|
23
|
+
*/
|
|
24
|
+
export interface DocumentVersionResponse {
|
|
25
|
+
/**
|
|
26
|
+
* DocumentVersion ID
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof DocumentVersionResponse
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* PathPart ID
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof DocumentVersionResponse
|
|
35
|
+
*/
|
|
36
|
+
pathPartId: string;
|
|
37
|
+
/**
|
|
38
|
+
* Version number (0, 1, 2...)
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof DocumentVersionResponse
|
|
41
|
+
*/
|
|
42
|
+
version: number;
|
|
43
|
+
/**
|
|
44
|
+
* Auto-generated name from path_part (v0, v1, ...)
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof DocumentVersionResponse
|
|
47
|
+
*/
|
|
48
|
+
name: string;
|
|
49
|
+
/**
|
|
50
|
+
* Document's PathPart ID
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof DocumentVersionResponse
|
|
53
|
+
*/
|
|
54
|
+
parentId: string;
|
|
55
|
+
/**
|
|
56
|
+
* Tenant ID
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof DocumentVersionResponse
|
|
59
|
+
*/
|
|
60
|
+
tenantId: string;
|
|
61
|
+
/**
|
|
62
|
+
* Creation timestamp
|
|
63
|
+
* @type {Date}
|
|
64
|
+
* @memberof DocumentVersionResponse
|
|
65
|
+
*/
|
|
66
|
+
createdAt: Date;
|
|
67
|
+
/**
|
|
68
|
+
* Last update timestamp
|
|
69
|
+
* @type {Date}
|
|
70
|
+
* @memberof DocumentVersionResponse
|
|
71
|
+
*/
|
|
72
|
+
updatedAt: Date;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Check if a given object implements the DocumentVersionResponse interface.
|
|
77
|
+
*/
|
|
78
|
+
export function instanceOfDocumentVersionResponse(value: object): value is DocumentVersionResponse {
|
|
79
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
80
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
|
|
81
|
+
if (!('version' in value) || value['version'] === undefined) return false;
|
|
82
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
83
|
+
if (!('parentId' in value) || value['parentId'] === undefined) return false;
|
|
84
|
+
if (!('tenantId' in value) || value['tenantId'] === 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 DocumentVersionResponseFromJSON(json: any): DocumentVersionResponse {
|
|
91
|
+
return DocumentVersionResponseFromJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function DocumentVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionResponse {
|
|
95
|
+
if (json == null) {
|
|
96
|
+
return json;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
|
|
100
|
+
'id': json['id'],
|
|
101
|
+
'pathPartId': json['path_part_id'],
|
|
102
|
+
'version': json['version'],
|
|
103
|
+
'name': json['name'],
|
|
104
|
+
'parentId': json['parent_id'],
|
|
105
|
+
'tenantId': json['tenant_id'],
|
|
106
|
+
'createdAt': (new Date(json['created_at'])),
|
|
107
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function DocumentVersionResponseToJSON(json: any): DocumentVersionResponse {
|
|
112
|
+
return DocumentVersionResponseToJSONTyped(json, false);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function DocumentVersionResponseToJSONTyped(value?: DocumentVersionResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
116
|
+
if (value == null) {
|
|
117
|
+
return value;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
|
|
122
|
+
'id': value['id'],
|
|
123
|
+
'path_part_id': value['pathPartId'],
|
|
124
|
+
'version': value['version'],
|
|
125
|
+
'name': value['name'],
|
|
126
|
+
'parent_id': value['parentId'],
|
|
127
|
+
'tenant_id': value['tenantId'],
|
|
128
|
+
'created_at': value['createdAt'].toISOString(),
|
|
129
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export const DocumentVersionResponsePropertyValidationAttributesMap: {
|
|
134
|
+
[property: string]: {
|
|
135
|
+
maxLength?: number,
|
|
136
|
+
minLength?: number,
|
|
137
|
+
pattern?: string,
|
|
138
|
+
maximum?: number,
|
|
139
|
+
exclusiveMaximum?: boolean,
|
|
140
|
+
minimum?: number,
|
|
141
|
+
exclusiveMinimum?: boolean,
|
|
142
|
+
multipleOf?: number,
|
|
143
|
+
maxItems?: number,
|
|
144
|
+
minItems?: number,
|
|
145
|
+
uniqueItems?: boolean
|
|
146
|
+
}
|
|
147
|
+
} = {
|
|
148
|
+
}
|
|
149
|
+
|