@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,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 { DocumentVersionResponseFromJSON, DocumentVersionResponseToJSON, } from './DocumentVersionResponse';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the PaginatedResponseDocumentVersionResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfPaginatedResponseDocumentVersionResponse(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 PaginatedResponseDocumentVersionResponseFromJSON(json) {
|
|
30
|
+
return PaginatedResponseDocumentVersionResponseFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function PaginatedResponseDocumentVersionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'items': (json['items'].map(DocumentVersionResponseFromJSON)),
|
|
38
|
+
'total': json['total'],
|
|
39
|
+
'limit': json['limit'],
|
|
40
|
+
'offset': json['offset'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function PaginatedResponseDocumentVersionResponseToJSON(json) {
|
|
44
|
+
return PaginatedResponseDocumentVersionResponseToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function PaginatedResponseDocumentVersionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'items': (value['items'].map(DocumentVersionResponseToJSON)),
|
|
52
|
+
'total': value['total'],
|
|
53
|
+
'limit': value['limit'],
|
|
54
|
+
'offset': value['offset'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export const PaginatedResponseDocumentVersionResponsePropertyValidationAttributesMap = {
|
|
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
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
/**
|
|
13
|
+
* Request to update a document (rename, move, and/or change active version).
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UpdateDocumentRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface UpdateDocumentRequest {
|
|
18
|
+
/**
|
|
19
|
+
* New document name
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UpdateDocumentRequest
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
/**
|
|
25
|
+
* New parent folder PathPart ID (for move)
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof UpdateDocumentRequest
|
|
28
|
+
*/
|
|
29
|
+
parentId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* New active version ID
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UpdateDocumentRequest
|
|
34
|
+
*/
|
|
35
|
+
activeVersionId?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the UpdateDocumentRequest interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfUpdateDocumentRequest(value: object): value is UpdateDocumentRequest;
|
|
41
|
+
export declare function UpdateDocumentRequestFromJSON(json: any): UpdateDocumentRequest;
|
|
42
|
+
export declare function UpdateDocumentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateDocumentRequest;
|
|
43
|
+
export declare function UpdateDocumentRequestToJSON(json: any): UpdateDocumentRequest;
|
|
44
|
+
export declare function UpdateDocumentRequestToJSONTyped(value?: UpdateDocumentRequest | null, ignoreDiscriminator?: boolean): any;
|
|
45
|
+
export declare const UpdateDocumentRequestPropertyValidationAttributesMap: {
|
|
46
|
+
[property: string]: {
|
|
47
|
+
maxLength?: number;
|
|
48
|
+
minLength?: number;
|
|
49
|
+
pattern?: string;
|
|
50
|
+
maximum?: number;
|
|
51
|
+
exclusiveMaximum?: boolean;
|
|
52
|
+
minimum?: number;
|
|
53
|
+
exclusiveMinimum?: boolean;
|
|
54
|
+
multipleOf?: number;
|
|
55
|
+
maxItems?: number;
|
|
56
|
+
minItems?: number;
|
|
57
|
+
uniqueItems?: boolean;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
* Check if a given object implements the UpdateDocumentRequest interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfUpdateDocumentRequest(value) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
export function UpdateDocumentRequestFromJSON(json) {
|
|
21
|
+
return UpdateDocumentRequestFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function UpdateDocumentRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
29
|
+
'parentId': json['parent_id'] == null ? undefined : json['parent_id'],
|
|
30
|
+
'activeVersionId': json['active_version_id'] == null ? undefined : json['active_version_id'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function UpdateDocumentRequestToJSON(json) {
|
|
34
|
+
return UpdateDocumentRequestToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function UpdateDocumentRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'name': value['name'],
|
|
42
|
+
'parent_id': value['parentId'],
|
|
43
|
+
'active_version_id': value['activeVersionId'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export const UpdateDocumentRequestPropertyValidationAttributesMap = {
|
|
47
|
+
name: {
|
|
48
|
+
maxLength: 255,
|
|
49
|
+
minLength: 1,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
export * from './CreateDocumentRequest';
|
|
1
2
|
export * from './CreateFolderRequest';
|
|
2
3
|
export * from './CreatePasswordUserRequest';
|
|
3
4
|
export * from './CreateTenantRequest';
|
|
5
|
+
export * from './DocumentOrigin';
|
|
6
|
+
export * from './DocumentResponse';
|
|
7
|
+
export * from './DocumentType';
|
|
8
|
+
export * from './DocumentVersionResponse';
|
|
4
9
|
export * from './EmailSentResponse';
|
|
5
10
|
export * from './EmailVerificationRequest';
|
|
6
11
|
export * from './FolderResponse';
|
|
@@ -11,6 +16,8 @@ export * from './InviteResponse';
|
|
|
11
16
|
export * from './InviteStatus';
|
|
12
17
|
export * from './InviteUserRequest';
|
|
13
18
|
export * from './OAuth2Config';
|
|
19
|
+
export * from './PaginatedResponseDocumentResponse';
|
|
20
|
+
export * from './PaginatedResponseDocumentVersionResponse';
|
|
14
21
|
export * from './PaginatedResponseFolderResponse';
|
|
15
22
|
export * from './PaginatedResponseInviteResponse';
|
|
16
23
|
export * from './PaginatedResponsePathPartResponse';
|
|
@@ -26,6 +33,7 @@ export * from './SignInRequest';
|
|
|
26
33
|
export * from './TenantResponse';
|
|
27
34
|
export * from './TenantUserInTenantResponse';
|
|
28
35
|
export * from './TenantUserRole';
|
|
36
|
+
export * from './UpdateDocumentRequest';
|
|
29
37
|
export * from './UpdateFolderRequest';
|
|
30
38
|
export * from './UpdateTenantRequest';
|
|
31
39
|
export * from './UpdateUserRequest';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './CreateDocumentRequest';
|
|
3
4
|
export * from './CreateFolderRequest';
|
|
4
5
|
export * from './CreatePasswordUserRequest';
|
|
5
6
|
export * from './CreateTenantRequest';
|
|
7
|
+
export * from './DocumentOrigin';
|
|
8
|
+
export * from './DocumentResponse';
|
|
9
|
+
export * from './DocumentType';
|
|
10
|
+
export * from './DocumentVersionResponse';
|
|
6
11
|
export * from './EmailSentResponse';
|
|
7
12
|
export * from './EmailVerificationRequest';
|
|
8
13
|
export * from './FolderResponse';
|
|
@@ -13,6 +18,8 @@ export * from './InviteResponse';
|
|
|
13
18
|
export * from './InviteStatus';
|
|
14
19
|
export * from './InviteUserRequest';
|
|
15
20
|
export * from './OAuth2Config';
|
|
21
|
+
export * from './PaginatedResponseDocumentResponse';
|
|
22
|
+
export * from './PaginatedResponseDocumentVersionResponse';
|
|
16
23
|
export * from './PaginatedResponseFolderResponse';
|
|
17
24
|
export * from './PaginatedResponseInviteResponse';
|
|
18
25
|
export * from './PaginatedResponsePathPartResponse';
|
|
@@ -28,6 +35,7 @@ export * from './SignInRequest';
|
|
|
28
35
|
export * from './TenantResponse';
|
|
29
36
|
export * from './TenantUserInTenantResponse';
|
|
30
37
|
export * from './TenantUserRole';
|
|
38
|
+
export * from './UpdateDocumentRequest';
|
|
31
39
|
export * from './UpdateFolderRequest';
|
|
32
40
|
export * from './UpdateTenantRequest';
|
|
33
41
|
export * from './UpdateUserRequest';
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { DocumentType } from './DocumentType';
|
|
14
|
+
/**
|
|
15
|
+
* Request to create a new document.
|
|
16
|
+
* @export
|
|
17
|
+
* @interface CreateDocumentRequest
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateDocumentRequest {
|
|
20
|
+
/**
|
|
21
|
+
* Document name
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof CreateDocumentRequest
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/**
|
|
27
|
+
* Parent folder PathPart ID
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof CreateDocumentRequest
|
|
30
|
+
*/
|
|
31
|
+
parentId: string;
|
|
32
|
+
/**
|
|
33
|
+
* Type of document (PDF, UNKNOWN, etc.)
|
|
34
|
+
* @type {DocumentType}
|
|
35
|
+
* @memberof CreateDocumentRequest
|
|
36
|
+
*/
|
|
37
|
+
documentType: DocumentType;
|
|
38
|
+
/**
|
|
39
|
+
* Origin of document (SOURCE, GENERATED)
|
|
40
|
+
* @type {DocumentOrigin}
|
|
41
|
+
* @memberof CreateDocumentRequest
|
|
42
|
+
*/
|
|
43
|
+
documentOrigin: DocumentOrigin;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the CreateDocumentRequest interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfCreateDocumentRequest(value: object): value is CreateDocumentRequest;
|
|
49
|
+
export declare function CreateDocumentRequestFromJSON(json: any): CreateDocumentRequest;
|
|
50
|
+
export declare function CreateDocumentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateDocumentRequest;
|
|
51
|
+
export declare function CreateDocumentRequestToJSON(json: any): CreateDocumentRequest;
|
|
52
|
+
export declare function CreateDocumentRequestToJSONTyped(value?: CreateDocumentRequest | null, ignoreDiscriminator?: boolean): any;
|
|
53
|
+
export declare const CreateDocumentRequestPropertyValidationAttributesMap: {
|
|
54
|
+
[property: string]: {
|
|
55
|
+
maxLength?: number;
|
|
56
|
+
minLength?: number;
|
|
57
|
+
pattern?: string;
|
|
58
|
+
maximum?: number;
|
|
59
|
+
exclusiveMaximum?: boolean;
|
|
60
|
+
minimum?: number;
|
|
61
|
+
exclusiveMinimum?: boolean;
|
|
62
|
+
multipleOf?: number;
|
|
63
|
+
maxItems?: number;
|
|
64
|
+
minItems?: number;
|
|
65
|
+
uniqueItems?: boolean;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CreateDocumentRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfCreateDocumentRequest = instanceOfCreateDocumentRequest;
|
|
18
|
+
exports.CreateDocumentRequestFromJSON = CreateDocumentRequestFromJSON;
|
|
19
|
+
exports.CreateDocumentRequestFromJSONTyped = CreateDocumentRequestFromJSONTyped;
|
|
20
|
+
exports.CreateDocumentRequestToJSON = CreateDocumentRequestToJSON;
|
|
21
|
+
exports.CreateDocumentRequestToJSONTyped = CreateDocumentRequestToJSONTyped;
|
|
22
|
+
const DocumentOrigin_1 = require("./DocumentOrigin");
|
|
23
|
+
const DocumentType_1 = require("./DocumentType");
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the CreateDocumentRequest interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfCreateDocumentRequest(value) {
|
|
28
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('parentId' in value) || value['parentId'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('documentType' in value) || value['documentType'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('documentOrigin' in value) || value['documentOrigin'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function CreateDocumentRequestFromJSON(json) {
|
|
39
|
+
return CreateDocumentRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function CreateDocumentRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'name': json['name'],
|
|
47
|
+
'parentId': json['parent_id'],
|
|
48
|
+
'documentType': (0, DocumentType_1.DocumentTypeFromJSON)(json['document_type']),
|
|
49
|
+
'documentOrigin': (0, DocumentOrigin_1.DocumentOriginFromJSON)(json['document_origin']),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function CreateDocumentRequestToJSON(json) {
|
|
53
|
+
return CreateDocumentRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function CreateDocumentRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'name': value['name'],
|
|
61
|
+
'parent_id': value['parentId'],
|
|
62
|
+
'document_type': (0, DocumentType_1.DocumentTypeToJSON)(value['documentType']),
|
|
63
|
+
'document_origin': (0, DocumentOrigin_1.DocumentOriginToJSON)(value['documentOrigin']),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
exports.CreateDocumentRequestPropertyValidationAttributesMap = {
|
|
67
|
+
name: {
|
|
68
|
+
maxLength: 255,
|
|
69
|
+
minLength: 1,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
/**
|
|
13
|
+
* Origin of document - source/purpose (all origins are first-class).
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const DocumentOrigin: {
|
|
17
|
+
readonly Source: "SOURCE";
|
|
18
|
+
readonly Generated: "GENERATED";
|
|
19
|
+
};
|
|
20
|
+
export type DocumentOrigin = typeof DocumentOrigin[keyof typeof DocumentOrigin];
|
|
21
|
+
export declare function instanceOfDocumentOrigin(value: any): boolean;
|
|
22
|
+
export declare function DocumentOriginFromJSON(json: any): DocumentOrigin;
|
|
23
|
+
export declare function DocumentOriginFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentOrigin;
|
|
24
|
+
export declare function DocumentOriginToJSON(value?: DocumentOrigin | null): any;
|
|
25
|
+
export declare function DocumentOriginToJSONTyped(value: any, ignoreDiscriminator: boolean): DocumentOrigin;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.DocumentOrigin = void 0;
|
|
17
|
+
exports.instanceOfDocumentOrigin = instanceOfDocumentOrigin;
|
|
18
|
+
exports.DocumentOriginFromJSON = DocumentOriginFromJSON;
|
|
19
|
+
exports.DocumentOriginFromJSONTyped = DocumentOriginFromJSONTyped;
|
|
20
|
+
exports.DocumentOriginToJSON = DocumentOriginToJSON;
|
|
21
|
+
exports.DocumentOriginToJSONTyped = DocumentOriginToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Origin of document - source/purpose (all origins are first-class).
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.DocumentOrigin = {
|
|
27
|
+
Source: 'SOURCE',
|
|
28
|
+
Generated: 'GENERATED'
|
|
29
|
+
};
|
|
30
|
+
function instanceOfDocumentOrigin(value) {
|
|
31
|
+
for (const key in exports.DocumentOrigin) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(exports.DocumentOrigin, key)) {
|
|
33
|
+
if (exports.DocumentOrigin[key] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
function DocumentOriginFromJSON(json) {
|
|
41
|
+
return DocumentOriginFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function DocumentOriginFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
function DocumentOriginToJSON(value) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
function DocumentOriginToJSONTyped(value, ignoreDiscriminator) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
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 { DocumentType } from './DocumentType';
|
|
14
|
+
import type { DocumentVersionResponse } from './DocumentVersionResponse';
|
|
15
|
+
/**
|
|
16
|
+
* Document response model.
|
|
17
|
+
* @export
|
|
18
|
+
* @interface DocumentResponse
|
|
19
|
+
*/
|
|
20
|
+
export interface DocumentResponse {
|
|
21
|
+
/**
|
|
22
|
+
* Document ID
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof DocumentResponse
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* PathPart ID
|
|
29
|
+
* @type {string}
|
|
30
|
+
* @memberof DocumentResponse
|
|
31
|
+
*/
|
|
32
|
+
pathPartId: string;
|
|
33
|
+
/**
|
|
34
|
+
* Document name
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof DocumentResponse
|
|
37
|
+
*/
|
|
38
|
+
name: string;
|
|
39
|
+
/**
|
|
40
|
+
* Parent PathPart ID
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof DocumentResponse
|
|
43
|
+
*/
|
|
44
|
+
parentId: string;
|
|
45
|
+
/**
|
|
46
|
+
* Type of document
|
|
47
|
+
* @type {DocumentType}
|
|
48
|
+
* @memberof DocumentResponse
|
|
49
|
+
*/
|
|
50
|
+
documentType: DocumentType;
|
|
51
|
+
/**
|
|
52
|
+
* Origin of document
|
|
53
|
+
* @type {DocumentOrigin}
|
|
54
|
+
* @memberof DocumentResponse
|
|
55
|
+
*/
|
|
56
|
+
documentOrigin: DocumentOrigin;
|
|
57
|
+
/**
|
|
58
|
+
* Active version ID
|
|
59
|
+
* @type {string}
|
|
60
|
+
* @memberof DocumentResponse
|
|
61
|
+
*/
|
|
62
|
+
activeVersionId: string;
|
|
63
|
+
/**
|
|
64
|
+
* Active version details
|
|
65
|
+
* @type {DocumentVersionResponse}
|
|
66
|
+
* @memberof DocumentResponse
|
|
67
|
+
*/
|
|
68
|
+
activeVersion: DocumentVersionResponse;
|
|
69
|
+
/**
|
|
70
|
+
* Tenant ID
|
|
71
|
+
* @type {string}
|
|
72
|
+
* @memberof DocumentResponse
|
|
73
|
+
*/
|
|
74
|
+
tenantId: string;
|
|
75
|
+
/**
|
|
76
|
+
* Creation timestamp
|
|
77
|
+
* @type {Date}
|
|
78
|
+
* @memberof DocumentResponse
|
|
79
|
+
*/
|
|
80
|
+
createdAt: Date;
|
|
81
|
+
/**
|
|
82
|
+
* Last update timestamp
|
|
83
|
+
* @type {Date}
|
|
84
|
+
* @memberof DocumentResponse
|
|
85
|
+
*/
|
|
86
|
+
updatedAt: Date;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Check if a given object implements the DocumentResponse interface.
|
|
90
|
+
*/
|
|
91
|
+
export declare function instanceOfDocumentResponse(value: object): value is DocumentResponse;
|
|
92
|
+
export declare function DocumentResponseFromJSON(json: any): DocumentResponse;
|
|
93
|
+
export declare function DocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentResponse;
|
|
94
|
+
export declare function DocumentResponseToJSON(json: any): DocumentResponse;
|
|
95
|
+
export declare function DocumentResponseToJSONTyped(value?: DocumentResponse | null, ignoreDiscriminator?: boolean): any;
|
|
96
|
+
export declare const DocumentResponsePropertyValidationAttributesMap: {
|
|
97
|
+
[property: string]: {
|
|
98
|
+
maxLength?: number;
|
|
99
|
+
minLength?: number;
|
|
100
|
+
pattern?: string;
|
|
101
|
+
maximum?: number;
|
|
102
|
+
exclusiveMaximum?: boolean;
|
|
103
|
+
minimum?: number;
|
|
104
|
+
exclusiveMinimum?: boolean;
|
|
105
|
+
multipleOf?: number;
|
|
106
|
+
maxItems?: number;
|
|
107
|
+
minItems?: number;
|
|
108
|
+
uniqueItems?: boolean;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.DocumentResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfDocumentResponse = instanceOfDocumentResponse;
|
|
18
|
+
exports.DocumentResponseFromJSON = DocumentResponseFromJSON;
|
|
19
|
+
exports.DocumentResponseFromJSONTyped = DocumentResponseFromJSONTyped;
|
|
20
|
+
exports.DocumentResponseToJSON = DocumentResponseToJSON;
|
|
21
|
+
exports.DocumentResponseToJSONTyped = DocumentResponseToJSONTyped;
|
|
22
|
+
const DocumentOrigin_1 = require("./DocumentOrigin");
|
|
23
|
+
const DocumentType_1 = require("./DocumentType");
|
|
24
|
+
const DocumentVersionResponse_1 = require("./DocumentVersionResponse");
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the DocumentResponse interface.
|
|
27
|
+
*/
|
|
28
|
+
function instanceOfDocumentResponse(value) {
|
|
29
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('parentId' in value) || value['parentId'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('documentType' in value) || value['documentType'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('documentOrigin' in value) || value['documentOrigin'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('activeVersionId' in value) || value['activeVersionId'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('activeVersion' in value) || value['activeVersion'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
function DocumentResponseFromJSON(json) {
|
|
54
|
+
return DocumentResponseFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function DocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'id': json['id'],
|
|
62
|
+
'pathPartId': json['path_part_id'],
|
|
63
|
+
'name': json['name'],
|
|
64
|
+
'parentId': json['parent_id'],
|
|
65
|
+
'documentType': (0, DocumentType_1.DocumentTypeFromJSON)(json['document_type']),
|
|
66
|
+
'documentOrigin': (0, DocumentOrigin_1.DocumentOriginFromJSON)(json['document_origin']),
|
|
67
|
+
'activeVersionId': json['active_version_id'],
|
|
68
|
+
'activeVersion': (0, DocumentVersionResponse_1.DocumentVersionResponseFromJSON)(json['active_version']),
|
|
69
|
+
'tenantId': json['tenant_id'],
|
|
70
|
+
'createdAt': (new Date(json['created_at'])),
|
|
71
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function DocumentResponseToJSON(json) {
|
|
75
|
+
return DocumentResponseToJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
function DocumentResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
'id': value['id'],
|
|
83
|
+
'path_part_id': value['pathPartId'],
|
|
84
|
+
'name': value['name'],
|
|
85
|
+
'parent_id': value['parentId'],
|
|
86
|
+
'document_type': (0, DocumentType_1.DocumentTypeToJSON)(value['documentType']),
|
|
87
|
+
'document_origin': (0, DocumentOrigin_1.DocumentOriginToJSON)(value['documentOrigin']),
|
|
88
|
+
'active_version_id': value['activeVersionId'],
|
|
89
|
+
'active_version': (0, DocumentVersionResponse_1.DocumentVersionResponseToJSON)(value['activeVersion']),
|
|
90
|
+
'tenant_id': value['tenantId'],
|
|
91
|
+
'created_at': value['createdAt'].toISOString(),
|
|
92
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
exports.DocumentResponsePropertyValidationAttributesMap = {};
|