@knowledge-stack/ksapi 1.4.0 → 1.6.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/DocumentVersionsApi.d.ts +146 -0
- package/dist/apis/DocumentVersionsApi.js +168 -0
- package/dist/apis/DocumentsApi.d.ts +179 -0
- package/dist/apis/DocumentsApi.js +206 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/DocumentVersionsApi.d.ts +146 -0
- package/dist/esm/apis/DocumentVersionsApi.js +164 -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 +2 -0
- package/dist/esm/apis/index.js +2 -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/PaginatedResponseDocumentVersionResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseDocumentVersionResponse.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 +8 -0
- package/dist/esm/models/index.js +8 -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/PaginatedResponseDocumentVersionResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseDocumentVersionResponse.js +78 -0
- package/dist/models/UpdateDocumentRequest.d.ts +59 -0
- package/dist/models/UpdateDocumentRequest.js +59 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/package.json +1 -1
- package/src/apis/DocumentVersionsApi.ts +303 -0
- package/src/apis/DocumentsApi.ts +386 -0
- package/src/apis/index.ts +2 -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/PaginatedResponseDocumentVersionResponse.ts +130 -0
- package/src/models/UpdateDocumentRequest.ts +102 -0
- package/src/models/index.ts +8 -0
|
@@ -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 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
|
+
|
|
@@ -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 { DocumentResponse } from './DocumentResponse';
|
|
17
|
+
import {
|
|
18
|
+
DocumentResponseFromJSON,
|
|
19
|
+
DocumentResponseFromJSONTyped,
|
|
20
|
+
DocumentResponseToJSON,
|
|
21
|
+
DocumentResponseToJSONTyped,
|
|
22
|
+
} from './DocumentResponse';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PaginatedResponseDocumentResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface PaginatedResponseDocumentResponse {
|
|
30
|
+
/**
|
|
31
|
+
* List of items
|
|
32
|
+
* @type {Array<DocumentResponse>}
|
|
33
|
+
* @memberof PaginatedResponseDocumentResponse
|
|
34
|
+
*/
|
|
35
|
+
items: Array<DocumentResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Total number of items
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PaginatedResponseDocumentResponse
|
|
40
|
+
*/
|
|
41
|
+
total: number;
|
|
42
|
+
/**
|
|
43
|
+
* Number of items per page
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof PaginatedResponseDocumentResponse
|
|
46
|
+
*/
|
|
47
|
+
limit: number;
|
|
48
|
+
/**
|
|
49
|
+
* Number of items to skip
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof PaginatedResponseDocumentResponse
|
|
52
|
+
*/
|
|
53
|
+
offset: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the PaginatedResponseDocumentResponse interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfPaginatedResponseDocumentResponse(value: object): value is PaginatedResponseDocumentResponse {
|
|
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 PaginatedResponseDocumentResponseFromJSON(json: any): PaginatedResponseDocumentResponse {
|
|
68
|
+
return PaginatedResponseDocumentResponseFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function PaginatedResponseDocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseDocumentResponse {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'items': ((json['items'] as Array<any>).map(DocumentResponseFromJSON)),
|
|
78
|
+
'total': json['total'],
|
|
79
|
+
'limit': json['limit'],
|
|
80
|
+
'offset': json['offset'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PaginatedResponseDocumentResponseToJSON(json: any): PaginatedResponseDocumentResponse {
|
|
85
|
+
return PaginatedResponseDocumentResponseToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function PaginatedResponseDocumentResponseToJSONTyped(value?: PaginatedResponseDocumentResponse | 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(DocumentResponseToJSON)),
|
|
96
|
+
'total': value['total'],
|
|
97
|
+
'limit': value['limit'],
|
|
98
|
+
'offset': value['offset'],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const PaginatedResponseDocumentResponsePropertyValidationAttributesMap: {
|
|
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 { DocumentVersionResponse } from './DocumentVersionResponse';
|
|
17
|
+
import {
|
|
18
|
+
DocumentVersionResponseFromJSON,
|
|
19
|
+
DocumentVersionResponseFromJSONTyped,
|
|
20
|
+
DocumentVersionResponseToJSON,
|
|
21
|
+
DocumentVersionResponseToJSONTyped,
|
|
22
|
+
} from './DocumentVersionResponse';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PaginatedResponseDocumentVersionResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface PaginatedResponseDocumentVersionResponse {
|
|
30
|
+
/**
|
|
31
|
+
* List of items
|
|
32
|
+
* @type {Array<DocumentVersionResponse>}
|
|
33
|
+
* @memberof PaginatedResponseDocumentVersionResponse
|
|
34
|
+
*/
|
|
35
|
+
items: Array<DocumentVersionResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Total number of items
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PaginatedResponseDocumentVersionResponse
|
|
40
|
+
*/
|
|
41
|
+
total: number;
|
|
42
|
+
/**
|
|
43
|
+
* Number of items per page
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof PaginatedResponseDocumentVersionResponse
|
|
46
|
+
*/
|
|
47
|
+
limit: number;
|
|
48
|
+
/**
|
|
49
|
+
* Number of items to skip
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof PaginatedResponseDocumentVersionResponse
|
|
52
|
+
*/
|
|
53
|
+
offset: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the PaginatedResponseDocumentVersionResponse interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfPaginatedResponseDocumentVersionResponse(value: object): value is PaginatedResponseDocumentVersionResponse {
|
|
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 PaginatedResponseDocumentVersionResponseFromJSON(json: any): PaginatedResponseDocumentVersionResponse {
|
|
68
|
+
return PaginatedResponseDocumentVersionResponseFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function PaginatedResponseDocumentVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseDocumentVersionResponse {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'items': ((json['items'] as Array<any>).map(DocumentVersionResponseFromJSON)),
|
|
78
|
+
'total': json['total'],
|
|
79
|
+
'limit': json['limit'],
|
|
80
|
+
'offset': json['offset'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PaginatedResponseDocumentVersionResponseToJSON(json: any): PaginatedResponseDocumentVersionResponse {
|
|
85
|
+
return PaginatedResponseDocumentVersionResponseToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function PaginatedResponseDocumentVersionResponseToJSONTyped(value?: PaginatedResponseDocumentVersionResponse | 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(DocumentVersionResponseToJSON)),
|
|
96
|
+
'total': value['total'],
|
|
97
|
+
'limit': value['limit'],
|
|
98
|
+
'offset': value['offset'],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const PaginatedResponseDocumentVersionResponsePropertyValidationAttributesMap: {
|
|
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
|
+
|