@knowledge-stack/ksapi 1.46.0 → 1.48.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 (61) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +6 -2
  3. package/dist/esm/models/ChunkBulkResponse.d.ts +8 -6
  4. package/dist/esm/models/ChunkBulkResponse.js +6 -4
  5. package/dist/esm/models/ChunkDocumentResponse.d.ts +67 -0
  6. package/dist/esm/models/ChunkDocumentResponse.js +58 -0
  7. package/dist/esm/models/ChunkDocumentVersionResponse.d.ts +59 -0
  8. package/dist/esm/models/ChunkDocumentVersionResponse.js +52 -0
  9. package/dist/esm/models/ChunkResponse.d.ts +8 -6
  10. package/dist/esm/models/ChunkResponse.js +6 -4
  11. package/dist/esm/models/DocumentType.d.ts +1 -0
  12. package/dist/esm/models/DocumentType.js +1 -0
  13. package/dist/esm/models/EnrichedCitation.d.ts +101 -0
  14. package/dist/esm/models/EnrichedCitation.js +73 -0
  15. package/dist/esm/models/EnrichedThreadMessageContent.d.ts +54 -0
  16. package/dist/esm/models/EnrichedThreadMessageContent.js +47 -0
  17. package/dist/esm/models/ScoredChunkResponse.d.ts +8 -6
  18. package/dist/esm/models/ScoredChunkResponse.js +6 -4
  19. package/dist/esm/models/ThreadMessageResponse.d.ts +3 -3
  20. package/dist/esm/models/ThreadMessageResponse.js +3 -3
  21. package/dist/esm/models/index.d.ts +4 -0
  22. package/dist/esm/models/index.js +4 -0
  23. package/dist/models/ChunkBulkResponse.d.ts +8 -6
  24. package/dist/models/ChunkBulkResponse.js +6 -4
  25. package/dist/models/ChunkDocumentResponse.d.ts +67 -0
  26. package/dist/models/ChunkDocumentResponse.js +66 -0
  27. package/dist/models/ChunkDocumentVersionResponse.d.ts +59 -0
  28. package/dist/models/ChunkDocumentVersionResponse.js +60 -0
  29. package/dist/models/ChunkResponse.d.ts +8 -6
  30. package/dist/models/ChunkResponse.js +6 -4
  31. package/dist/models/DocumentType.d.ts +1 -0
  32. package/dist/models/DocumentType.js +1 -0
  33. package/dist/models/EnrichedCitation.d.ts +101 -0
  34. package/dist/models/EnrichedCitation.js +81 -0
  35. package/dist/models/EnrichedThreadMessageContent.d.ts +54 -0
  36. package/dist/models/EnrichedThreadMessageContent.js +55 -0
  37. package/dist/models/ScoredChunkResponse.d.ts +8 -6
  38. package/dist/models/ScoredChunkResponse.js +6 -4
  39. package/dist/models/ThreadMessageResponse.d.ts +3 -3
  40. package/dist/models/ThreadMessageResponse.js +3 -3
  41. package/dist/models/index.d.ts +4 -0
  42. package/dist/models/index.js +4 -0
  43. package/docs/ChunkBulkResponse.md +4 -4
  44. package/docs/ChunkDocumentResponse.md +41 -0
  45. package/docs/ChunkDocumentVersionResponse.md +39 -0
  46. package/docs/ChunkResponse.md +4 -4
  47. package/docs/EnrichedCitation.md +53 -0
  48. package/docs/EnrichedThreadMessageContent.md +37 -0
  49. package/docs/ScoredChunkResponse.md +4 -4
  50. package/docs/ThreadMessageResponse.md +1 -1
  51. package/package.json +1 -1
  52. package/src/models/ChunkBulkResponse.ts +24 -10
  53. package/src/models/ChunkDocumentResponse.ts +127 -0
  54. package/src/models/ChunkDocumentVersionResponse.ts +101 -0
  55. package/src/models/ChunkResponse.ts +24 -10
  56. package/src/models/DocumentType.ts +1 -0
  57. package/src/models/EnrichedCitation.ts +162 -0
  58. package/src/models/EnrichedThreadMessageContent.ts +99 -0
  59. package/src/models/ScoredChunkResponse.ts +24 -10
  60. package/src/models/ThreadMessageResponse.ts +11 -11
  61. package/src/models/index.ts +4 -0
@@ -0,0 +1,54 @@
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 { EnrichedCitation } from './EnrichedCitation';
13
+ /**
14
+ * ThreadMessageContent with enriched citations for API responses.
15
+ * @export
16
+ * @interface EnrichedThreadMessageContent
17
+ */
18
+ export interface EnrichedThreadMessageContent {
19
+ /**
20
+ * The text content of the message
21
+ * @type {string}
22
+ * @memberof EnrichedThreadMessageContent
23
+ */
24
+ text: string;
25
+ /**
26
+ * A list of citations with document context
27
+ * @type {Array<EnrichedCitation>}
28
+ * @memberof EnrichedThreadMessageContent
29
+ */
30
+ citations?: Array<EnrichedCitation> | null;
31
+ }
32
+ /**
33
+ * Check if a given object implements the EnrichedThreadMessageContent interface.
34
+ */
35
+ export declare function instanceOfEnrichedThreadMessageContent(value: object): value is EnrichedThreadMessageContent;
36
+ export declare function EnrichedThreadMessageContentFromJSON(json: any): EnrichedThreadMessageContent;
37
+ export declare function EnrichedThreadMessageContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrichedThreadMessageContent;
38
+ export declare function EnrichedThreadMessageContentToJSON(json: any): EnrichedThreadMessageContent;
39
+ export declare function EnrichedThreadMessageContentToJSONTyped(value?: EnrichedThreadMessageContent | null, ignoreDiscriminator?: boolean): any;
40
+ export declare const EnrichedThreadMessageContentPropertyValidationAttributesMap: {
41
+ [property: string]: {
42
+ maxLength?: number;
43
+ minLength?: number;
44
+ pattern?: string;
45
+ maximum?: number;
46
+ exclusiveMaximum?: boolean;
47
+ minimum?: number;
48
+ exclusiveMinimum?: boolean;
49
+ multipleOf?: number;
50
+ maxItems?: number;
51
+ minItems?: number;
52
+ uniqueItems?: boolean;
53
+ };
54
+ };
@@ -0,0 +1,47 @@
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 { EnrichedCitationFromJSON, EnrichedCitationToJSON, } from './EnrichedCitation';
15
+ /**
16
+ * Check if a given object implements the EnrichedThreadMessageContent interface.
17
+ */
18
+ export function instanceOfEnrichedThreadMessageContent(value) {
19
+ if (!('text' in value) || value['text'] === undefined)
20
+ return false;
21
+ return true;
22
+ }
23
+ export function EnrichedThreadMessageContentFromJSON(json) {
24
+ return EnrichedThreadMessageContentFromJSONTyped(json, false);
25
+ }
26
+ export function EnrichedThreadMessageContentFromJSONTyped(json, ignoreDiscriminator) {
27
+ if (json == null) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'text': json['text'],
32
+ 'citations': json['citations'] == null ? undefined : (json['citations'].map(EnrichedCitationFromJSON)),
33
+ };
34
+ }
35
+ export function EnrichedThreadMessageContentToJSON(json) {
36
+ return EnrichedThreadMessageContentToJSONTyped(json, false);
37
+ }
38
+ export function EnrichedThreadMessageContentToJSONTyped(value, ignoreDiscriminator = false) {
39
+ if (value == null) {
40
+ return value;
41
+ }
42
+ return {
43
+ 'text': value['text'],
44
+ 'citations': value['citations'] == null ? undefined : (value['citations'].map(EnrichedCitationToJSON)),
45
+ };
46
+ }
47
+ export const EnrichedThreadMessageContentPropertyValidationAttributesMap = {};
@@ -9,8 +9,10 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { ChunkDocumentResponse } from './ChunkDocumentResponse';
12
13
  import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
13
14
  import type { ChunkType } from './ChunkType';
15
+ import type { ChunkDocumentVersionResponse } from './ChunkDocumentVersionResponse';
14
16
  /**
15
17
  * Chunk response with similarity score.
16
18
  * @export
@@ -108,17 +110,17 @@ export interface ScoredChunkResponse {
108
110
  */
109
111
  assetS3Urls?: Array<string>;
110
112
  /**
111
- * ID of the ancestor document (populated when with_document=true)
112
- * @type {string}
113
+ *
114
+ * @type {ChunkDocumentResponse}
113
115
  * @memberof ScoredChunkResponse
114
116
  */
115
- documentId?: string | null;
117
+ document?: ChunkDocumentResponse;
116
118
  /**
117
- * ID of the ancestor document version (populated when with_document=true)
118
- * @type {string}
119
+ *
120
+ * @type {ChunkDocumentVersionResponse}
119
121
  * @memberof ScoredChunkResponse
120
122
  */
121
- documentVersionId?: string | null;
123
+ documentVersion?: ChunkDocumentVersionResponse;
122
124
  /**
123
125
  * Cosine similarity score (1 - cosine_distance)
124
126
  * @type {number}
@@ -11,8 +11,10 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { ChunkDocumentResponseFromJSON, ChunkDocumentResponseToJSON, } from './ChunkDocumentResponse';
14
15
  import { ChunkMetadataOutputFromJSON, ChunkMetadataOutputToJSON, } from './ChunkMetadataOutput';
15
16
  import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
17
+ import { ChunkDocumentVersionResponseFromJSON, ChunkDocumentVersionResponseToJSON, } from './ChunkDocumentVersionResponse';
16
18
  /**
17
19
  * Check if a given object implements the ScoredChunkResponse interface.
18
20
  */
@@ -68,8 +70,8 @@ export function ScoredChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
68
70
  'createdAt': (new Date(json['created_at'])),
69
71
  'updatedAt': (new Date(json['updated_at'])),
70
72
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
71
- 'documentId': json['document_id'] == null ? undefined : json['document_id'],
72
- 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
73
+ 'document': json['document'] == null ? undefined : ChunkDocumentResponseFromJSON(json['document']),
74
+ 'documentVersion': json['document_version'] == null ? undefined : ChunkDocumentVersionResponseFromJSON(json['document_version']),
73
75
  'score': json['score'],
74
76
  };
75
77
  }
@@ -96,8 +98,8 @@ export function ScoredChunkResponseToJSONTyped(value, ignoreDiscriminator = fals
96
98
  'created_at': value['createdAt'].toISOString(),
97
99
  'updated_at': value['updatedAt'].toISOString(),
98
100
  'asset_s3_urls': value['assetS3Urls'],
99
- 'document_id': value['documentId'],
100
- 'document_version_id': value['documentVersionId'],
101
+ 'document': ChunkDocumentResponseToJSON(value['document']),
102
+ 'document_version': ChunkDocumentVersionResponseToJSON(value['documentVersion']),
101
103
  'score': value['score'],
102
104
  };
103
105
  }
@@ -9,9 +9,9 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { EnrichedThreadMessageContent } from './EnrichedThreadMessageContent';
12
13
  import type { MessageRole } from './MessageRole';
13
14
  import type { ThreadMessageDetailsOutput } from './ThreadMessageDetailsOutput';
14
- import type { ThreadMessageContent } from './ThreadMessageContent';
15
15
  /**
16
16
  * Thread message response model.
17
17
  * @export
@@ -44,10 +44,10 @@ export interface ThreadMessageResponse {
44
44
  role: MessageRole;
45
45
  /**
46
46
  *
47
- * @type {ThreadMessageContent}
47
+ * @type {EnrichedThreadMessageContent}
48
48
  * @memberof ThreadMessageResponse
49
49
  */
50
- content: ThreadMessageContent;
50
+ content: EnrichedThreadMessageContent;
51
51
  /**
52
52
  *
53
53
  * @type {ThreadMessageDetailsOutput}
@@ -11,9 +11,9 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { EnrichedThreadMessageContentFromJSON, EnrichedThreadMessageContentToJSON, } from './EnrichedThreadMessageContent';
14
15
  import { MessageRoleFromJSON, MessageRoleToJSON, } from './MessageRole';
15
16
  import { ThreadMessageDetailsOutputFromJSON, ThreadMessageDetailsOutputToJSON, } from './ThreadMessageDetailsOutput';
16
- import { ThreadMessageContentFromJSON, ThreadMessageContentToJSON, } from './ThreadMessageContent';
17
17
  /**
18
18
  * Check if a given object implements the ThreadMessageResponse interface.
19
19
  */
@@ -52,7 +52,7 @@ export function ThreadMessageResponseFromJSONTyped(json, ignoreDiscriminator) {
52
52
  'pathPartId': json['path_part_id'],
53
53
  'sequence': json['sequence'],
54
54
  'role': MessageRoleFromJSON(json['role']),
55
- 'content': ThreadMessageContentFromJSON(json['content']),
55
+ 'content': EnrichedThreadMessageContentFromJSON(json['content']),
56
56
  'details': json['details'] == null ? undefined : ThreadMessageDetailsOutputFromJSON(json['details']),
57
57
  'parentPathId': json['parent_path_id'],
58
58
  'materializedPath': json['materialized_path'],
@@ -73,7 +73,7 @@ export function ThreadMessageResponseToJSONTyped(value, ignoreDiscriminator = fa
73
73
  'path_part_id': value['pathPartId'],
74
74
  'sequence': value['sequence'],
75
75
  'role': MessageRoleToJSON(value['role']),
76
- 'content': ThreadMessageContentToJSON(value['content']),
76
+ 'content': EnrichedThreadMessageContentToJSON(value['content']),
77
77
  'details': ThreadMessageDetailsOutputToJSON(value['details']),
78
78
  'parent_path_id': value['parentPathId'],
79
79
  'materialized_path': value['materializedPath'],
@@ -4,6 +4,8 @@ export * from './Args';
4
4
  export * from './BulkTagRequest';
5
5
  export * from './ChunkBulkResponse';
6
6
  export * from './ChunkContentItem';
7
+ export * from './ChunkDocumentResponse';
8
+ export * from './ChunkDocumentVersionResponse';
7
9
  export * from './ChunkLineageResponse';
8
10
  export * from './ChunkMetadataInput';
9
11
  export * from './ChunkMetadataOutput';
@@ -33,6 +35,8 @@ export * from './DocumentVersionMetadataUpdate';
33
35
  export * from './DocumentVersionResponse';
34
36
  export * from './EmailSentResponse';
35
37
  export * from './EmailVerificationRequest';
38
+ export * from './EnrichedCitation';
39
+ export * from './EnrichedThreadMessageContent';
36
40
  export * from './FolderAction';
37
41
  export * from './FolderActionResponse';
38
42
  export * from './FolderResponse';
@@ -6,6 +6,8 @@ export * from './Args';
6
6
  export * from './BulkTagRequest';
7
7
  export * from './ChunkBulkResponse';
8
8
  export * from './ChunkContentItem';
9
+ export * from './ChunkDocumentResponse';
10
+ export * from './ChunkDocumentVersionResponse';
9
11
  export * from './ChunkLineageResponse';
10
12
  export * from './ChunkMetadataInput';
11
13
  export * from './ChunkMetadataOutput';
@@ -35,6 +37,8 @@ export * from './DocumentVersionMetadataUpdate';
35
37
  export * from './DocumentVersionResponse';
36
38
  export * from './EmailSentResponse';
37
39
  export * from './EmailVerificationRequest';
40
+ export * from './EnrichedCitation';
41
+ export * from './EnrichedThreadMessageContent';
38
42
  export * from './FolderAction';
39
43
  export * from './FolderActionResponse';
40
44
  export * from './FolderResponse';
@@ -9,8 +9,10 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { ChunkDocumentResponse } from './ChunkDocumentResponse';
12
13
  import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
13
14
  import type { ChunkType } from './ChunkType';
15
+ import type { ChunkDocumentVersionResponse } from './ChunkDocumentVersionResponse';
14
16
  /**
15
17
  * Chunk response with ancestor path part IDs for Qdrant payload construction.
16
18
  * @export
@@ -108,17 +110,17 @@ export interface ChunkBulkResponse {
108
110
  */
109
111
  assetS3Urls?: Array<string>;
110
112
  /**
111
- * ID of the ancestor document (populated when with_document=true)
112
- * @type {string}
113
+ *
114
+ * @type {ChunkDocumentResponse}
113
115
  * @memberof ChunkBulkResponse
114
116
  */
115
- documentId?: string | null;
117
+ document?: ChunkDocumentResponse;
116
118
  /**
117
- * ID of the ancestor document version (populated when with_document=true)
118
- * @type {string}
119
+ *
120
+ * @type {ChunkDocumentVersionResponse}
119
121
  * @memberof ChunkBulkResponse
120
122
  */
121
- documentVersionId?: string | null;
123
+ documentVersion?: ChunkDocumentVersionResponse;
122
124
  /**
123
125
  * Ordered ancestor PathPart IDs from root to chunk
124
126
  * @type {Array<string>}
@@ -19,8 +19,10 @@ exports.ChunkBulkResponseFromJSON = ChunkBulkResponseFromJSON;
19
19
  exports.ChunkBulkResponseFromJSONTyped = ChunkBulkResponseFromJSONTyped;
20
20
  exports.ChunkBulkResponseToJSON = ChunkBulkResponseToJSON;
21
21
  exports.ChunkBulkResponseToJSONTyped = ChunkBulkResponseToJSONTyped;
22
+ const ChunkDocumentResponse_1 = require("./ChunkDocumentResponse");
22
23
  const ChunkMetadataOutput_1 = require("./ChunkMetadataOutput");
23
24
  const ChunkType_1 = require("./ChunkType");
25
+ const ChunkDocumentVersionResponse_1 = require("./ChunkDocumentVersionResponse");
24
26
  /**
25
27
  * Check if a given object implements the ChunkBulkResponse interface.
26
28
  */
@@ -76,8 +78,8 @@ function ChunkBulkResponseFromJSONTyped(json, ignoreDiscriminator) {
76
78
  'createdAt': (new Date(json['created_at'])),
77
79
  'updatedAt': (new Date(json['updated_at'])),
78
80
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
79
- 'documentId': json['document_id'] == null ? undefined : json['document_id'],
80
- 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
81
+ 'document': json['document'] == null ? undefined : (0, ChunkDocumentResponse_1.ChunkDocumentResponseFromJSON)(json['document']),
82
+ 'documentVersion': json['document_version'] == null ? undefined : (0, ChunkDocumentVersionResponse_1.ChunkDocumentVersionResponseFromJSON)(json['document_version']),
81
83
  'pathPartIdSegments': json['path_part_id_segments'],
82
84
  };
83
85
  }
@@ -104,8 +106,8 @@ function ChunkBulkResponseToJSONTyped(value, ignoreDiscriminator = false) {
104
106
  'created_at': value['createdAt'].toISOString(),
105
107
  'updated_at': value['updatedAt'].toISOString(),
106
108
  'asset_s3_urls': value['assetS3Urls'],
107
- 'document_id': value['documentId'],
108
- 'document_version_id': value['documentVersionId'],
109
+ 'document': (0, ChunkDocumentResponse_1.ChunkDocumentResponseToJSON)(value['document']),
110
+ 'document_version': (0, ChunkDocumentVersionResponse_1.ChunkDocumentVersionResponseToJSON)(value['documentVersion']),
109
111
  'path_part_id_segments': value['pathPartIdSegments'],
110
112
  };
111
113
  }
@@ -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
+ * Lightweight document info attached to a chunk response.
16
+ * @export
17
+ * @interface ChunkDocumentResponse
18
+ */
19
+ export interface ChunkDocumentResponse {
20
+ /**
21
+ * Document ID
22
+ * @type {string}
23
+ * @memberof ChunkDocumentResponse
24
+ */
25
+ id: string;
26
+ /**
27
+ * Document name
28
+ * @type {string}
29
+ * @memberof ChunkDocumentResponse
30
+ */
31
+ name: string;
32
+ /**
33
+ *
34
+ * @type {DocumentType}
35
+ * @memberof ChunkDocumentResponse
36
+ */
37
+ documentType: DocumentType;
38
+ /**
39
+ *
40
+ * @type {DocumentOrigin}
41
+ * @memberof ChunkDocumentResponse
42
+ */
43
+ documentOrigin: DocumentOrigin;
44
+ }
45
+ /**
46
+ * Check if a given object implements the ChunkDocumentResponse interface.
47
+ */
48
+ export declare function instanceOfChunkDocumentResponse(value: object): value is ChunkDocumentResponse;
49
+ export declare function ChunkDocumentResponseFromJSON(json: any): ChunkDocumentResponse;
50
+ export declare function ChunkDocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkDocumentResponse;
51
+ export declare function ChunkDocumentResponseToJSON(json: any): ChunkDocumentResponse;
52
+ export declare function ChunkDocumentResponseToJSONTyped(value?: ChunkDocumentResponse | null, ignoreDiscriminator?: boolean): any;
53
+ export declare const ChunkDocumentResponsePropertyValidationAttributesMap: {
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,66 @@
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.ChunkDocumentResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfChunkDocumentResponse = instanceOfChunkDocumentResponse;
18
+ exports.ChunkDocumentResponseFromJSON = ChunkDocumentResponseFromJSON;
19
+ exports.ChunkDocumentResponseFromJSONTyped = ChunkDocumentResponseFromJSONTyped;
20
+ exports.ChunkDocumentResponseToJSON = ChunkDocumentResponseToJSON;
21
+ exports.ChunkDocumentResponseToJSONTyped = ChunkDocumentResponseToJSONTyped;
22
+ const DocumentOrigin_1 = require("./DocumentOrigin");
23
+ const DocumentType_1 = require("./DocumentType");
24
+ /**
25
+ * Check if a given object implements the ChunkDocumentResponse interface.
26
+ */
27
+ function instanceOfChunkDocumentResponse(value) {
28
+ if (!('id' in value) || value['id'] === undefined)
29
+ return false;
30
+ if (!('name' in value) || value['name'] === 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 ChunkDocumentResponseFromJSON(json) {
39
+ return ChunkDocumentResponseFromJSONTyped(json, false);
40
+ }
41
+ function ChunkDocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'id': json['id'],
47
+ 'name': json['name'],
48
+ 'documentType': (0, DocumentType_1.DocumentTypeFromJSON)(json['document_type']),
49
+ 'documentOrigin': (0, DocumentOrigin_1.DocumentOriginFromJSON)(json['document_origin']),
50
+ };
51
+ }
52
+ function ChunkDocumentResponseToJSON(json) {
53
+ return ChunkDocumentResponseToJSONTyped(json, false);
54
+ }
55
+ function ChunkDocumentResponseToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'id': value['id'],
61
+ 'name': value['name'],
62
+ 'document_type': (0, DocumentType_1.DocumentTypeToJSON)(value['documentType']),
63
+ 'document_origin': (0, DocumentOrigin_1.DocumentOriginToJSON)(value['documentOrigin']),
64
+ };
65
+ }
66
+ exports.ChunkDocumentResponsePropertyValidationAttributesMap = {};
@@ -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
+ * Lightweight document version info attached to a chunk response.
14
+ * @export
15
+ * @interface ChunkDocumentVersionResponse
16
+ */
17
+ export interface ChunkDocumentVersionResponse {
18
+ /**
19
+ * DocumentVersion ID
20
+ * @type {string}
21
+ * @memberof ChunkDocumentVersionResponse
22
+ */
23
+ id: string;
24
+ /**
25
+ * Version number
26
+ * @type {number}
27
+ * @memberof ChunkDocumentVersionResponse
28
+ */
29
+ version: number;
30
+ /**
31
+ * Version path name (e.g. v0)
32
+ * @type {string}
33
+ * @memberof ChunkDocumentVersionResponse
34
+ */
35
+ name: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the ChunkDocumentVersionResponse interface.
39
+ */
40
+ export declare function instanceOfChunkDocumentVersionResponse(value: object): value is ChunkDocumentVersionResponse;
41
+ export declare function ChunkDocumentVersionResponseFromJSON(json: any): ChunkDocumentVersionResponse;
42
+ export declare function ChunkDocumentVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkDocumentVersionResponse;
43
+ export declare function ChunkDocumentVersionResponseToJSON(json: any): ChunkDocumentVersionResponse;
44
+ export declare function ChunkDocumentVersionResponseToJSONTyped(value?: ChunkDocumentVersionResponse | null, ignoreDiscriminator?: boolean): any;
45
+ export declare const ChunkDocumentVersionResponsePropertyValidationAttributesMap: {
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,60 @@
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.ChunkDocumentVersionResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfChunkDocumentVersionResponse = instanceOfChunkDocumentVersionResponse;
18
+ exports.ChunkDocumentVersionResponseFromJSON = ChunkDocumentVersionResponseFromJSON;
19
+ exports.ChunkDocumentVersionResponseFromJSONTyped = ChunkDocumentVersionResponseFromJSONTyped;
20
+ exports.ChunkDocumentVersionResponseToJSON = ChunkDocumentVersionResponseToJSON;
21
+ exports.ChunkDocumentVersionResponseToJSONTyped = ChunkDocumentVersionResponseToJSONTyped;
22
+ /**
23
+ * Check if a given object implements the ChunkDocumentVersionResponse interface.
24
+ */
25
+ function instanceOfChunkDocumentVersionResponse(value) {
26
+ if (!('id' in value) || value['id'] === undefined)
27
+ return false;
28
+ if (!('version' in value) || value['version'] === undefined)
29
+ return false;
30
+ if (!('name' in value) || value['name'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ function ChunkDocumentVersionResponseFromJSON(json) {
35
+ return ChunkDocumentVersionResponseFromJSONTyped(json, false);
36
+ }
37
+ function ChunkDocumentVersionResponseFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'id': json['id'],
43
+ 'version': json['version'],
44
+ 'name': json['name'],
45
+ };
46
+ }
47
+ function ChunkDocumentVersionResponseToJSON(json) {
48
+ return ChunkDocumentVersionResponseToJSONTyped(json, false);
49
+ }
50
+ function ChunkDocumentVersionResponseToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'id': value['id'],
56
+ 'version': value['version'],
57
+ 'name': value['name'],
58
+ };
59
+ }
60
+ exports.ChunkDocumentVersionResponsePropertyValidationAttributesMap = {};
@@ -9,8 +9,10 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { ChunkDocumentResponse } from './ChunkDocumentResponse';
12
13
  import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
13
14
  import type { ChunkType } from './ChunkType';
15
+ import type { ChunkDocumentVersionResponse } from './ChunkDocumentVersionResponse';
14
16
  /**
15
17
  * Chunk response model.
16
18
  * @export
@@ -108,17 +110,17 @@ export interface ChunkResponse {
108
110
  */
109
111
  assetS3Urls?: Array<string>;
110
112
  /**
111
- * ID of the ancestor document (populated when with_document=true)
112
- * @type {string}
113
+ *
114
+ * @type {ChunkDocumentResponse}
113
115
  * @memberof ChunkResponse
114
116
  */
115
- documentId?: string | null;
117
+ document?: ChunkDocumentResponse;
116
118
  /**
117
- * ID of the ancestor document version (populated when with_document=true)
118
- * @type {string}
119
+ *
120
+ * @type {ChunkDocumentVersionResponse}
119
121
  * @memberof ChunkResponse
120
122
  */
121
- documentVersionId?: string | null;
123
+ documentVersion?: ChunkDocumentVersionResponse;
122
124
  }
123
125
  /**
124
126
  * Check if a given object implements the ChunkResponse interface.
@@ -19,8 +19,10 @@ exports.ChunkResponseFromJSON = ChunkResponseFromJSON;
19
19
  exports.ChunkResponseFromJSONTyped = ChunkResponseFromJSONTyped;
20
20
  exports.ChunkResponseToJSON = ChunkResponseToJSON;
21
21
  exports.ChunkResponseToJSONTyped = ChunkResponseToJSONTyped;
22
+ const ChunkDocumentResponse_1 = require("./ChunkDocumentResponse");
22
23
  const ChunkMetadataOutput_1 = require("./ChunkMetadataOutput");
23
24
  const ChunkType_1 = require("./ChunkType");
25
+ const ChunkDocumentVersionResponse_1 = require("./ChunkDocumentVersionResponse");
24
26
  /**
25
27
  * Check if a given object implements the ChunkResponse interface.
26
28
  */
@@ -74,8 +76,8 @@ function ChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
74
76
  'createdAt': (new Date(json['created_at'])),
75
77
  'updatedAt': (new Date(json['updated_at'])),
76
78
  'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
77
- 'documentId': json['document_id'] == null ? undefined : json['document_id'],
78
- 'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
79
+ 'document': json['document'] == null ? undefined : (0, ChunkDocumentResponse_1.ChunkDocumentResponseFromJSON)(json['document']),
80
+ 'documentVersion': json['document_version'] == null ? undefined : (0, ChunkDocumentVersionResponse_1.ChunkDocumentVersionResponseFromJSON)(json['document_version']),
79
81
  };
80
82
  }
81
83
  function ChunkResponseToJSON(json) {
@@ -101,8 +103,8 @@ function ChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
101
103
  'created_at': value['createdAt'].toISOString(),
102
104
  'updated_at': value['updatedAt'].toISOString(),
103
105
  'asset_s3_urls': value['assetS3Urls'],
104
- 'document_id': value['documentId'],
105
- 'document_version_id': value['documentVersionId'],
106
+ 'document': (0, ChunkDocumentResponse_1.ChunkDocumentResponseToJSON)(value['document']),
107
+ 'document_version': (0, ChunkDocumentVersionResponse_1.ChunkDocumentVersionResponseToJSON)(value['documentVersion']),
106
108
  };
107
109
  }
108
110
  exports.ChunkResponsePropertyValidationAttributesMap = {};
@@ -19,6 +19,7 @@ export declare const DocumentType: {
19
19
  readonly Md: "MD";
20
20
  readonly Image: "IMAGE";
21
21
  readonly Xlsx: "XLSX";
22
+ readonly Pptx: "PPTX";
22
23
  readonly Unknown: "UNKNOWN";
23
24
  };
24
25
  export type DocumentType = typeof DocumentType[keyof typeof DocumentType];