@knowledge-stack/ksapi 1.7.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/.openapi-generator/FILES +14 -0
  2. package/README.md +2 -2
  3. package/dist/apis/ChunksApi.d.ts +175 -0
  4. package/dist/apis/ChunksApi.js +203 -0
  5. package/dist/apis/DocumentVersionsApi.d.ts +36 -1
  6. package/dist/apis/DocumentVersionsApi.js +41 -0
  7. package/dist/apis/FoldersApi.d.ts +38 -1
  8. package/dist/apis/FoldersApi.js +44 -0
  9. package/dist/apis/PathPartsApi.d.ts +4 -6
  10. package/dist/apis/PathPartsApi.js +2 -5
  11. package/dist/apis/index.d.ts +1 -0
  12. package/dist/apis/index.js +1 -0
  13. package/dist/esm/apis/ChunksApi.d.ts +175 -0
  14. package/dist/esm/apis/ChunksApi.js +199 -0
  15. package/dist/esm/apis/DocumentVersionsApi.d.ts +36 -1
  16. package/dist/esm/apis/DocumentVersionsApi.js +42 -1
  17. package/dist/esm/apis/FoldersApi.d.ts +38 -1
  18. package/dist/esm/apis/FoldersApi.js +45 -1
  19. package/dist/esm/apis/PathPartsApi.d.ts +4 -6
  20. package/dist/esm/apis/PathPartsApi.js +2 -5
  21. package/dist/esm/apis/index.d.ts +1 -0
  22. package/dist/esm/apis/index.js +1 -0
  23. package/dist/esm/models/ChunkMetadataInput.d.ts +48 -0
  24. package/dist/esm/models/ChunkMetadataInput.js +43 -0
  25. package/dist/esm/models/ChunkMetadataOutput.d.ts +48 -0
  26. package/dist/esm/models/ChunkMetadataOutput.js +43 -0
  27. package/dist/esm/models/ChunkResponse.d.ts +115 -0
  28. package/dist/esm/models/ChunkResponse.js +86 -0
  29. package/dist/esm/models/ChunkType.d.ts +27 -0
  30. package/dist/esm/models/ChunkType.js +45 -0
  31. package/dist/esm/models/CreateChunkRequest.d.ts +73 -0
  32. package/dist/esm/models/CreateChunkRequest.js +64 -0
  33. package/dist/esm/models/DocumentContentPathPart.d.ts +119 -0
  34. package/dist/esm/models/DocumentContentPathPart.js +83 -0
  35. package/dist/esm/models/FolderDocumentResponse.d.ts +138 -0
  36. package/dist/esm/models/FolderDocumentResponse.js +88 -0
  37. package/dist/esm/models/PaginatedResponseDocumentContentPathPart.d.ts +66 -0
  38. package/dist/esm/models/PaginatedResponseDocumentContentPathPart.js +70 -0
  39. package/dist/esm/models/PaginatedResponseFolderDocumentResponse.d.ts +66 -0
  40. package/dist/esm/models/PaginatedResponseFolderDocumentResponse.js +70 -0
  41. package/dist/esm/models/PasswordResetWithTokenRequest.d.ts +2 -8
  42. package/dist/esm/models/PasswordResetWithTokenRequest.js +3 -7
  43. package/dist/esm/models/Polygon.d.ts +65 -0
  44. package/dist/esm/models/Polygon.js +56 -0
  45. package/dist/esm/models/PolygonReference.d.ts +54 -0
  46. package/dist/esm/models/PolygonReference.js +49 -0
  47. package/dist/esm/models/UpdateChunkContentRequest.d.ts +54 -0
  48. package/dist/esm/models/UpdateChunkContentRequest.js +51 -0
  49. package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +48 -0
  50. package/dist/esm/models/UpdateChunkMetadataRequest.js +45 -0
  51. package/dist/esm/models/index.d.ts +13 -0
  52. package/dist/esm/models/index.js +13 -0
  53. package/dist/models/ChunkMetadataInput.d.ts +48 -0
  54. package/dist/models/ChunkMetadataInput.js +51 -0
  55. package/dist/models/ChunkMetadataOutput.d.ts +48 -0
  56. package/dist/models/ChunkMetadataOutput.js +51 -0
  57. package/dist/models/ChunkResponse.d.ts +115 -0
  58. package/dist/models/ChunkResponse.js +94 -0
  59. package/dist/models/ChunkType.d.ts +27 -0
  60. package/dist/models/ChunkType.js +53 -0
  61. package/dist/models/CreateChunkRequest.d.ts +73 -0
  62. package/dist/models/CreateChunkRequest.js +72 -0
  63. package/dist/models/DocumentContentPathPart.d.ts +119 -0
  64. package/dist/models/DocumentContentPathPart.js +91 -0
  65. package/dist/models/FolderDocumentResponse.d.ts +138 -0
  66. package/dist/models/FolderDocumentResponse.js +96 -0
  67. package/dist/models/PaginatedResponseDocumentContentPathPart.d.ts +66 -0
  68. package/dist/models/PaginatedResponseDocumentContentPathPart.js +78 -0
  69. package/dist/models/PaginatedResponseFolderDocumentResponse.d.ts +66 -0
  70. package/dist/models/PaginatedResponseFolderDocumentResponse.js +78 -0
  71. package/dist/models/PasswordResetWithTokenRequest.d.ts +2 -8
  72. package/dist/models/PasswordResetWithTokenRequest.js +3 -7
  73. package/dist/models/Polygon.d.ts +65 -0
  74. package/dist/models/Polygon.js +64 -0
  75. package/dist/models/PolygonReference.d.ts +54 -0
  76. package/dist/models/PolygonReference.js +57 -0
  77. package/dist/models/UpdateChunkContentRequest.d.ts +54 -0
  78. package/dist/models/UpdateChunkContentRequest.js +59 -0
  79. package/dist/models/UpdateChunkMetadataRequest.d.ts +48 -0
  80. package/dist/models/UpdateChunkMetadataRequest.js +53 -0
  81. package/dist/models/index.d.ts +13 -0
  82. package/dist/models/index.js +13 -0
  83. package/package.json +1 -1
  84. package/src/apis/ChunksApi.ts +381 -0
  85. package/src/apis/DocumentVersionsApi.ts +82 -0
  86. package/src/apis/FoldersApi.ts +88 -0
  87. package/src/apis/PathPartsApi.ts +4 -10
  88. package/src/apis/index.ts +1 -0
  89. package/src/models/ChunkMetadataInput.ts +90 -0
  90. package/src/models/ChunkMetadataOutput.ts +90 -0
  91. package/src/models/ChunkResponse.ts +197 -0
  92. package/src/models/ChunkType.ts +55 -0
  93. package/src/models/CreateChunkRequest.ts +138 -0
  94. package/src/models/DocumentContentPathPart.ts +205 -0
  95. package/src/models/FolderDocumentResponse.ts +234 -0
  96. package/src/models/PaginatedResponseDocumentContentPathPart.ts +130 -0
  97. package/src/models/PaginatedResponseFolderDocumentResponse.ts +130 -0
  98. package/src/models/PasswordResetWithTokenRequest.ts +5 -14
  99. package/src/models/Polygon.ts +110 -0
  100. package/src/models/PolygonReference.ts +100 -0
  101. package/src/models/UpdateChunkContentRequest.ts +104 -0
  102. package/src/models/UpdateChunkMetadataRequest.ts +91 -0
  103. package/src/models/index.ts +13 -0
@@ -0,0 +1,73 @@
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 { ChunkMetadataInput } from './ChunkMetadataInput';
13
+ import type { ChunkType } from './ChunkType';
14
+ /**
15
+ * Request to create a new chunk.
16
+ * @export
17
+ * @interface CreateChunkRequest
18
+ */
19
+ export interface CreateChunkRequest {
20
+ /**
21
+ * Parent PathPart ID (must be DOCUMENT_VERSION or SECTION)
22
+ * @type {string}
23
+ * @memberof CreateChunkRequest
24
+ */
25
+ parentPathId: string;
26
+ /**
27
+ * Chunk text content
28
+ * @type {string}
29
+ * @memberof CreateChunkRequest
30
+ */
31
+ content: string;
32
+ /**
33
+ * Type of chunk content (TEXT, TABLE, IMAGE, UNKNOWN)
34
+ * @type {ChunkType}
35
+ * @memberof CreateChunkRequest
36
+ */
37
+ chunkType: ChunkType;
38
+ /**
39
+ * Chunk metadata as JSON (title, description, etc.)
40
+ * @type {ChunkMetadataInput}
41
+ * @memberof CreateChunkRequest
42
+ */
43
+ chunkMetadata: ChunkMetadataInput;
44
+ /**
45
+ * PathPart ID to insert after (null = append to tail)
46
+ * @type {string}
47
+ * @memberof CreateChunkRequest
48
+ */
49
+ prevSiblingPathId?: string;
50
+ }
51
+ /**
52
+ * Check if a given object implements the CreateChunkRequest interface.
53
+ */
54
+ export declare function instanceOfCreateChunkRequest(value: object): value is CreateChunkRequest;
55
+ export declare function CreateChunkRequestFromJSON(json: any): CreateChunkRequest;
56
+ export declare function CreateChunkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateChunkRequest;
57
+ export declare function CreateChunkRequestToJSON(json: any): CreateChunkRequest;
58
+ export declare function CreateChunkRequestToJSONTyped(value?: CreateChunkRequest | null, ignoreDiscriminator?: boolean): any;
59
+ export declare const CreateChunkRequestPropertyValidationAttributesMap: {
60
+ [property: string]: {
61
+ maxLength?: number;
62
+ minLength?: number;
63
+ pattern?: string;
64
+ maximum?: number;
65
+ exclusiveMaximum?: boolean;
66
+ minimum?: number;
67
+ exclusiveMinimum?: boolean;
68
+ multipleOf?: number;
69
+ maxItems?: number;
70
+ minItems?: number;
71
+ uniqueItems?: boolean;
72
+ };
73
+ };
@@ -0,0 +1,72 @@
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.CreateChunkRequestPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfCreateChunkRequest = instanceOfCreateChunkRequest;
18
+ exports.CreateChunkRequestFromJSON = CreateChunkRequestFromJSON;
19
+ exports.CreateChunkRequestFromJSONTyped = CreateChunkRequestFromJSONTyped;
20
+ exports.CreateChunkRequestToJSON = CreateChunkRequestToJSON;
21
+ exports.CreateChunkRequestToJSONTyped = CreateChunkRequestToJSONTyped;
22
+ const ChunkMetadataInput_1 = require("./ChunkMetadataInput");
23
+ const ChunkType_1 = require("./ChunkType");
24
+ /**
25
+ * Check if a given object implements the CreateChunkRequest interface.
26
+ */
27
+ function instanceOfCreateChunkRequest(value) {
28
+ if (!('parentPathId' in value) || value['parentPathId'] === undefined)
29
+ return false;
30
+ if (!('content' in value) || value['content'] === undefined)
31
+ return false;
32
+ if (!('chunkType' in value) || value['chunkType'] === undefined)
33
+ return false;
34
+ if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined)
35
+ return false;
36
+ return true;
37
+ }
38
+ function CreateChunkRequestFromJSON(json) {
39
+ return CreateChunkRequestFromJSONTyped(json, false);
40
+ }
41
+ function CreateChunkRequestFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'parentPathId': json['parent_path_id'],
47
+ 'content': json['content'],
48
+ 'chunkType': (0, ChunkType_1.ChunkTypeFromJSON)(json['chunk_type']),
49
+ 'chunkMetadata': (0, ChunkMetadataInput_1.ChunkMetadataInputFromJSON)(json['chunk_metadata']),
50
+ 'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
51
+ };
52
+ }
53
+ function CreateChunkRequestToJSON(json) {
54
+ return CreateChunkRequestToJSONTyped(json, false);
55
+ }
56
+ function CreateChunkRequestToJSONTyped(value, ignoreDiscriminator = false) {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'parent_path_id': value['parentPathId'],
62
+ 'content': value['content'],
63
+ 'chunk_type': (0, ChunkType_1.ChunkTypeToJSON)(value['chunkType']),
64
+ 'chunk_metadata': (0, ChunkMetadataInput_1.ChunkMetadataInputToJSON)(value['chunkMetadata']),
65
+ 'prev_sibling_path_id': value['prevSiblingPathId'],
66
+ };
67
+ }
68
+ exports.CreateChunkRequestPropertyValidationAttributesMap = {
69
+ content: {
70
+ minLength: 1,
71
+ },
72
+ };
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { PartType } from './PartType';
13
+ import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
14
+ import type { ChunkType } from './ChunkType';
15
+ /**
16
+ * Response model for a single item in the document version contents list.
17
+ *
18
+ * Represents a section or chunk with enriched data (content, metadata)
19
+ * returned in depth-first logical order.
20
+ * @export
21
+ * @interface DocumentContentPathPart
22
+ */
23
+ export interface DocumentContentPathPart {
24
+ /**
25
+ * PathPart ID
26
+ * @type {string}
27
+ * @memberof DocumentContentPathPart
28
+ */
29
+ pathPartId: string;
30
+ /**
31
+ * PathPart name
32
+ * @type {string}
33
+ * @memberof DocumentContentPathPart
34
+ */
35
+ name: string;
36
+ /**
37
+ * SECTION or CHUNK
38
+ * @type {PartType}
39
+ * @memberof DocumentContentPathPart
40
+ */
41
+ partType: PartType;
42
+ /**
43
+ * Parent PathPart ID
44
+ * @type {string}
45
+ * @memberof DocumentContentPathPart
46
+ */
47
+ parentId: string;
48
+ /**
49
+ * Section ID or Chunk ID
50
+ * @type {string}
51
+ * @memberof DocumentContentPathPart
52
+ */
53
+ metadataObjId: string;
54
+ /**
55
+ * Depth relative to document version root
56
+ * @type {number}
57
+ * @memberof DocumentContentPathPart
58
+ */
59
+ depth: number;
60
+ /**
61
+ * Chunk content (None for sections)
62
+ * @type {string}
63
+ * @memberof DocumentContentPathPart
64
+ */
65
+ content?: string;
66
+ /**
67
+ * Chunk type (None for sections)
68
+ * @type {ChunkType}
69
+ * @memberof DocumentContentPathPart
70
+ */
71
+ chunkType?: ChunkType;
72
+ /**
73
+ * Chunk metadata (None for sections)
74
+ * @type {ChunkMetadataOutput}
75
+ * @memberof DocumentContentPathPart
76
+ */
77
+ chunkMetadata?: ChunkMetadataOutput;
78
+ /**
79
+ * Section page number (None for chunks)
80
+ * @type {number}
81
+ * @memberof DocumentContentPathPart
82
+ */
83
+ pageNumber?: number;
84
+ /**
85
+ * Creation timestamp
86
+ * @type {Date}
87
+ * @memberof DocumentContentPathPart
88
+ */
89
+ createdAt: Date;
90
+ /**
91
+ * Last update timestamp
92
+ * @type {Date}
93
+ * @memberof DocumentContentPathPart
94
+ */
95
+ updatedAt: Date;
96
+ }
97
+ /**
98
+ * Check if a given object implements the DocumentContentPathPart interface.
99
+ */
100
+ export declare function instanceOfDocumentContentPathPart(value: object): value is DocumentContentPathPart;
101
+ export declare function DocumentContentPathPartFromJSON(json: any): DocumentContentPathPart;
102
+ export declare function DocumentContentPathPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentContentPathPart;
103
+ export declare function DocumentContentPathPartToJSON(json: any): DocumentContentPathPart;
104
+ export declare function DocumentContentPathPartToJSONTyped(value?: DocumentContentPathPart | null, ignoreDiscriminator?: boolean): any;
105
+ export declare const DocumentContentPathPartPropertyValidationAttributesMap: {
106
+ [property: string]: {
107
+ maxLength?: number;
108
+ minLength?: number;
109
+ pattern?: string;
110
+ maximum?: number;
111
+ exclusiveMaximum?: boolean;
112
+ minimum?: number;
113
+ exclusiveMinimum?: boolean;
114
+ multipleOf?: number;
115
+ maxItems?: number;
116
+ minItems?: number;
117
+ uniqueItems?: boolean;
118
+ };
119
+ };
@@ -0,0 +1,91 @@
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.DocumentContentPathPartPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfDocumentContentPathPart = instanceOfDocumentContentPathPart;
18
+ exports.DocumentContentPathPartFromJSON = DocumentContentPathPartFromJSON;
19
+ exports.DocumentContentPathPartFromJSONTyped = DocumentContentPathPartFromJSONTyped;
20
+ exports.DocumentContentPathPartToJSON = DocumentContentPathPartToJSON;
21
+ exports.DocumentContentPathPartToJSONTyped = DocumentContentPathPartToJSONTyped;
22
+ const PartType_1 = require("./PartType");
23
+ const ChunkMetadataOutput_1 = require("./ChunkMetadataOutput");
24
+ const ChunkType_1 = require("./ChunkType");
25
+ /**
26
+ * Check if a given object implements the DocumentContentPathPart interface.
27
+ */
28
+ function instanceOfDocumentContentPathPart(value) {
29
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
30
+ return false;
31
+ if (!('name' in value) || value['name'] === undefined)
32
+ return false;
33
+ if (!('partType' in value) || value['partType'] === undefined)
34
+ return false;
35
+ if (!('parentId' in value) || value['parentId'] === undefined)
36
+ return false;
37
+ if (!('metadataObjId' in value) || value['metadataObjId'] === undefined)
38
+ return false;
39
+ if (!('depth' in value) || value['depth'] === undefined)
40
+ return false;
41
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
42
+ return false;
43
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
44
+ return false;
45
+ return true;
46
+ }
47
+ function DocumentContentPathPartFromJSON(json) {
48
+ return DocumentContentPathPartFromJSONTyped(json, false);
49
+ }
50
+ function DocumentContentPathPartFromJSONTyped(json, ignoreDiscriminator) {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+ 'pathPartId': json['path_part_id'],
56
+ 'name': json['name'],
57
+ 'partType': (0, PartType_1.PartTypeFromJSON)(json['part_type']),
58
+ 'parentId': json['parent_id'],
59
+ 'metadataObjId': json['metadata_obj_id'],
60
+ 'depth': json['depth'],
61
+ 'content': json['content'] == null ? undefined : json['content'],
62
+ 'chunkType': json['chunk_type'] == null ? undefined : (0, ChunkType_1.ChunkTypeFromJSON)(json['chunk_type']),
63
+ 'chunkMetadata': json['chunk_metadata'] == null ? undefined : (0, ChunkMetadataOutput_1.ChunkMetadataOutputFromJSON)(json['chunk_metadata']),
64
+ 'pageNumber': json['page_number'] == null ? undefined : json['page_number'],
65
+ 'createdAt': (new Date(json['created_at'])),
66
+ 'updatedAt': (new Date(json['updated_at'])),
67
+ };
68
+ }
69
+ function DocumentContentPathPartToJSON(json) {
70
+ return DocumentContentPathPartToJSONTyped(json, false);
71
+ }
72
+ function DocumentContentPathPartToJSONTyped(value, ignoreDiscriminator = false) {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+ return {
77
+ 'path_part_id': value['pathPartId'],
78
+ 'name': value['name'],
79
+ 'part_type': (0, PartType_1.PartTypeToJSON)(value['partType']),
80
+ 'parent_id': value['parentId'],
81
+ 'metadata_obj_id': value['metadataObjId'],
82
+ 'depth': value['depth'],
83
+ 'content': value['content'],
84
+ 'chunk_type': (0, ChunkType_1.ChunkTypeToJSON)(value['chunkType']),
85
+ 'chunk_metadata': (0, ChunkMetadataOutput_1.ChunkMetadataOutputToJSON)(value['chunkMetadata']),
86
+ 'page_number': value['pageNumber'],
87
+ 'created_at': value['createdAt'].toISOString(),
88
+ 'updated_at': value['updatedAt'].toISOString(),
89
+ };
90
+ }
91
+ exports.DocumentContentPathPartPropertyValidationAttributesMap = {};
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { DocumentOrigin } from './DocumentOrigin';
13
+ import type { PartType } from './PartType';
14
+ import type { DocumentType } from './DocumentType';
15
+ import type { DocumentVersionResponse } from './DocumentVersionResponse';
16
+ /**
17
+ * Response for folder contents - can be either a Folder or a Document.
18
+ *
19
+ * Inherits PathPart fields from PathPartResponse and adds type-specific fields.
20
+ *
21
+ * Discriminated union based on part_type:
22
+ * - FOLDER: folder_id is set, document fields are None
23
+ * - DOCUMENT: document_id and document fields are set, folder_id is None
24
+ *
25
+ * Inherited fields from PathPartResponse:
26
+ * - path_part_id, name, part_type, parent_id, metadata_obj_id, created_at, updated_at
27
+ * @export
28
+ * @interface FolderDocumentResponse
29
+ */
30
+ export interface FolderDocumentResponse {
31
+ /**
32
+ * PathPart ID
33
+ * @type {string}
34
+ * @memberof FolderDocumentResponse
35
+ */
36
+ pathPartId: string;
37
+ /**
38
+ * Item name
39
+ * @type {string}
40
+ * @memberof FolderDocumentResponse
41
+ */
42
+ name: string;
43
+ /**
44
+ * Type (FOLDER, DOCUMENT, etc.)
45
+ * @type {PartType}
46
+ * @memberof FolderDocumentResponse
47
+ */
48
+ partType: PartType;
49
+ /**
50
+ * Parent PathPart ID
51
+ * @type {string}
52
+ * @memberof FolderDocumentResponse
53
+ */
54
+ parentId: string;
55
+ /**
56
+ * ID of the underlying object
57
+ * @type {string}
58
+ * @memberof FolderDocumentResponse
59
+ */
60
+ metadataObjId: string;
61
+ /**
62
+ * Creation timestamp
63
+ * @type {Date}
64
+ * @memberof FolderDocumentResponse
65
+ */
66
+ createdAt: Date;
67
+ /**
68
+ * Last update timestamp
69
+ * @type {Date}
70
+ * @memberof FolderDocumentResponse
71
+ */
72
+ updatedAt: Date;
73
+ /**
74
+ * Folder ID (present for folders)
75
+ * @type {string}
76
+ * @memberof FolderDocumentResponse
77
+ */
78
+ folderId?: string;
79
+ /**
80
+ * Document ID (present for documents)
81
+ * @type {string}
82
+ * @memberof FolderDocumentResponse
83
+ */
84
+ documentId?: string;
85
+ /**
86
+ * Document type (present for documents)
87
+ * @type {DocumentType}
88
+ * @memberof FolderDocumentResponse
89
+ */
90
+ documentType?: DocumentType;
91
+ /**
92
+ * Document origin (present for documents)
93
+ * @type {DocumentOrigin}
94
+ * @memberof FolderDocumentResponse
95
+ */
96
+ documentOrigin?: DocumentOrigin;
97
+ /**
98
+ * Active version ID (present for documents)
99
+ * @type {string}
100
+ * @memberof FolderDocumentResponse
101
+ */
102
+ activeVersionId?: string;
103
+ /**
104
+ * Active version details (present for documents)
105
+ * @type {DocumentVersionResponse}
106
+ * @memberof FolderDocumentResponse
107
+ */
108
+ activeVersion?: DocumentVersionResponse;
109
+ /**
110
+ * Tenant ID
111
+ * @type {string}
112
+ * @memberof FolderDocumentResponse
113
+ */
114
+ tenantId: string;
115
+ }
116
+ /**
117
+ * Check if a given object implements the FolderDocumentResponse interface.
118
+ */
119
+ export declare function instanceOfFolderDocumentResponse(value: object): value is FolderDocumentResponse;
120
+ export declare function FolderDocumentResponseFromJSON(json: any): FolderDocumentResponse;
121
+ export declare function FolderDocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderDocumentResponse;
122
+ export declare function FolderDocumentResponseToJSON(json: any): FolderDocumentResponse;
123
+ export declare function FolderDocumentResponseToJSONTyped(value?: FolderDocumentResponse | null, ignoreDiscriminator?: boolean): any;
124
+ export declare const FolderDocumentResponsePropertyValidationAttributesMap: {
125
+ [property: string]: {
126
+ maxLength?: number;
127
+ minLength?: number;
128
+ pattern?: string;
129
+ maximum?: number;
130
+ exclusiveMaximum?: boolean;
131
+ minimum?: number;
132
+ exclusiveMinimum?: boolean;
133
+ multipleOf?: number;
134
+ maxItems?: number;
135
+ minItems?: number;
136
+ uniqueItems?: boolean;
137
+ };
138
+ };
@@ -0,0 +1,96 @@
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.FolderDocumentResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfFolderDocumentResponse = instanceOfFolderDocumentResponse;
18
+ exports.FolderDocumentResponseFromJSON = FolderDocumentResponseFromJSON;
19
+ exports.FolderDocumentResponseFromJSONTyped = FolderDocumentResponseFromJSONTyped;
20
+ exports.FolderDocumentResponseToJSON = FolderDocumentResponseToJSON;
21
+ exports.FolderDocumentResponseToJSONTyped = FolderDocumentResponseToJSONTyped;
22
+ const DocumentOrigin_1 = require("./DocumentOrigin");
23
+ const PartType_1 = require("./PartType");
24
+ const DocumentType_1 = require("./DocumentType");
25
+ const DocumentVersionResponse_1 = require("./DocumentVersionResponse");
26
+ /**
27
+ * Check if a given object implements the FolderDocumentResponse interface.
28
+ */
29
+ function instanceOfFolderDocumentResponse(value) {
30
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
31
+ return false;
32
+ if (!('name' in value) || value['name'] === undefined)
33
+ return false;
34
+ if (!('partType' in value) || value['partType'] === undefined)
35
+ return false;
36
+ if (!('parentId' in value) || value['parentId'] === undefined)
37
+ return false;
38
+ if (!('metadataObjId' in value) || value['metadataObjId'] === undefined)
39
+ return false;
40
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
41
+ return false;
42
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
43
+ return false;
44
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
45
+ return false;
46
+ return true;
47
+ }
48
+ function FolderDocumentResponseFromJSON(json) {
49
+ return FolderDocumentResponseFromJSONTyped(json, false);
50
+ }
51
+ function FolderDocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
52
+ if (json == null) {
53
+ return json;
54
+ }
55
+ return {
56
+ 'pathPartId': json['path_part_id'],
57
+ 'name': json['name'],
58
+ 'partType': (0, PartType_1.PartTypeFromJSON)(json['part_type']),
59
+ 'parentId': json['parent_id'],
60
+ 'metadataObjId': json['metadata_obj_id'],
61
+ 'createdAt': (new Date(json['created_at'])),
62
+ 'updatedAt': (new Date(json['updated_at'])),
63
+ 'folderId': json['folder_id'] == null ? undefined : json['folder_id'],
64
+ 'documentId': json['document_id'] == null ? undefined : json['document_id'],
65
+ 'documentType': json['document_type'] == null ? undefined : (0, DocumentType_1.DocumentTypeFromJSON)(json['document_type']),
66
+ 'documentOrigin': json['document_origin'] == null ? undefined : (0, DocumentOrigin_1.DocumentOriginFromJSON)(json['document_origin']),
67
+ 'activeVersionId': json['active_version_id'] == null ? undefined : json['active_version_id'],
68
+ 'activeVersion': json['active_version'] == null ? undefined : (0, DocumentVersionResponse_1.DocumentVersionResponseFromJSON)(json['active_version']),
69
+ 'tenantId': json['tenant_id'],
70
+ };
71
+ }
72
+ function FolderDocumentResponseToJSON(json) {
73
+ return FolderDocumentResponseToJSONTyped(json, false);
74
+ }
75
+ function FolderDocumentResponseToJSONTyped(value, ignoreDiscriminator = false) {
76
+ if (value == null) {
77
+ return value;
78
+ }
79
+ return {
80
+ 'path_part_id': value['pathPartId'],
81
+ 'name': value['name'],
82
+ 'part_type': (0, PartType_1.PartTypeToJSON)(value['partType']),
83
+ 'parent_id': value['parentId'],
84
+ 'metadata_obj_id': value['metadataObjId'],
85
+ 'created_at': value['createdAt'].toISOString(),
86
+ 'updated_at': value['updatedAt'].toISOString(),
87
+ 'folder_id': value['folderId'],
88
+ 'document_id': value['documentId'],
89
+ 'document_type': (0, DocumentType_1.DocumentTypeToJSON)(value['documentType']),
90
+ 'document_origin': (0, DocumentOrigin_1.DocumentOriginToJSON)(value['documentOrigin']),
91
+ 'active_version_id': value['activeVersionId'],
92
+ 'active_version': (0, DocumentVersionResponse_1.DocumentVersionResponseToJSON)(value['activeVersion']),
93
+ 'tenant_id': value['tenantId'],
94
+ };
95
+ }
96
+ exports.FolderDocumentResponsePropertyValidationAttributesMap = {};
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { DocumentContentPathPart } from './DocumentContentPathPart';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PaginatedResponseDocumentContentPathPart
17
+ */
18
+ export interface PaginatedResponseDocumentContentPathPart {
19
+ /**
20
+ * List of items
21
+ * @type {Array<DocumentContentPathPart>}
22
+ * @memberof PaginatedResponseDocumentContentPathPart
23
+ */
24
+ items: Array<DocumentContentPathPart>;
25
+ /**
26
+ * Total number of items
27
+ * @type {number}
28
+ * @memberof PaginatedResponseDocumentContentPathPart
29
+ */
30
+ total: number;
31
+ /**
32
+ * Number of items per page
33
+ * @type {number}
34
+ * @memberof PaginatedResponseDocumentContentPathPart
35
+ */
36
+ limit: number;
37
+ /**
38
+ * Number of items to skip
39
+ * @type {number}
40
+ * @memberof PaginatedResponseDocumentContentPathPart
41
+ */
42
+ offset: number;
43
+ }
44
+ /**
45
+ * Check if a given object implements the PaginatedResponseDocumentContentPathPart interface.
46
+ */
47
+ export declare function instanceOfPaginatedResponseDocumentContentPathPart(value: object): value is PaginatedResponseDocumentContentPathPart;
48
+ export declare function PaginatedResponseDocumentContentPathPartFromJSON(json: any): PaginatedResponseDocumentContentPathPart;
49
+ export declare function PaginatedResponseDocumentContentPathPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseDocumentContentPathPart;
50
+ export declare function PaginatedResponseDocumentContentPathPartToJSON(json: any): PaginatedResponseDocumentContentPathPart;
51
+ export declare function PaginatedResponseDocumentContentPathPartToJSONTyped(value?: PaginatedResponseDocumentContentPathPart | null, ignoreDiscriminator?: boolean): any;
52
+ export declare const PaginatedResponseDocumentContentPathPartPropertyValidationAttributesMap: {
53
+ [property: string]: {
54
+ maxLength?: number;
55
+ minLength?: number;
56
+ pattern?: string;
57
+ maximum?: number;
58
+ exclusiveMaximum?: boolean;
59
+ minimum?: number;
60
+ exclusiveMinimum?: boolean;
61
+ multipleOf?: number;
62
+ maxItems?: number;
63
+ minItems?: number;
64
+ uniqueItems?: boolean;
65
+ };
66
+ };