@knowledge-stack/ksapi 1.52.1 → 1.53.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 (98) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +7 -2
  3. package/dist/apis/DocumentVersionsApi.d.ts +48 -1
  4. package/dist/apis/DocumentVersionsApi.js +50 -0
  5. package/dist/esm/apis/DocumentVersionsApi.d.ts +48 -1
  6. package/dist/esm/apis/DocumentVersionsApi.js +51 -1
  7. package/dist/esm/models/ChunkBulkResponse.d.ts +6 -0
  8. package/dist/esm/models/ChunkBulkResponse.js +2 -0
  9. package/dist/esm/models/ChunkResponse.d.ts +6 -0
  10. package/dist/esm/models/ChunkResponse.js +2 -0
  11. package/dist/esm/models/DocumentVersionAction.d.ts +24 -0
  12. package/dist/esm/models/DocumentVersionAction.js +42 -0
  13. package/dist/esm/models/DocumentVersionActionResponse.d.ts +60 -0
  14. package/dist/esm/models/DocumentVersionActionResponse.js +53 -0
  15. package/dist/esm/models/DocumentVersionMetadata.d.ts +8 -1
  16. package/dist/esm/models/DocumentVersionMetadata.js +3 -0
  17. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +7 -0
  18. package/dist/esm/models/DocumentVersionMetadataUpdate.js +3 -0
  19. package/dist/esm/models/DocumentVersionResponse.d.ts +1 -1
  20. package/dist/esm/models/DocumentVersionResponse.js +2 -2
  21. package/dist/esm/models/InformationStatistics.d.ts +67 -0
  22. package/dist/esm/models/InformationStatistics.js +48 -0
  23. package/dist/esm/models/PipelineState.d.ts +8 -2
  24. package/dist/esm/models/PipelineState.js +4 -4
  25. package/dist/esm/models/ScoredChunkResponse.d.ts +6 -0
  26. package/dist/esm/models/ScoredChunkResponse.js +2 -0
  27. package/dist/esm/models/SectionResponse.d.ts +7 -0
  28. package/dist/esm/models/SectionResponse.js +3 -0
  29. package/dist/esm/models/SectionSystemMetadata.d.ts +48 -0
  30. package/dist/esm/models/SectionSystemMetadata.js +43 -0
  31. package/dist/esm/models/WorkflowDetailResponse.d.ts +6 -0
  32. package/dist/esm/models/WorkflowDetailResponse.js +2 -0
  33. package/dist/esm/models/WorkflowSummaryResponse.d.ts +6 -0
  34. package/dist/esm/models/WorkflowSummaryResponse.js +2 -0
  35. package/dist/esm/models/index.d.ts +4 -0
  36. package/dist/esm/models/index.js +4 -0
  37. package/dist/models/ChunkBulkResponse.d.ts +6 -0
  38. package/dist/models/ChunkBulkResponse.js +2 -0
  39. package/dist/models/ChunkResponse.d.ts +6 -0
  40. package/dist/models/ChunkResponse.js +2 -0
  41. package/dist/models/DocumentVersionAction.d.ts +24 -0
  42. package/dist/models/DocumentVersionAction.js +50 -0
  43. package/dist/models/DocumentVersionActionResponse.d.ts +60 -0
  44. package/dist/models/DocumentVersionActionResponse.js +61 -0
  45. package/dist/models/DocumentVersionMetadata.d.ts +8 -1
  46. package/dist/models/DocumentVersionMetadata.js +3 -0
  47. package/dist/models/DocumentVersionMetadataUpdate.d.ts +7 -0
  48. package/dist/models/DocumentVersionMetadataUpdate.js +3 -0
  49. package/dist/models/DocumentVersionResponse.d.ts +1 -1
  50. package/dist/models/DocumentVersionResponse.js +2 -2
  51. package/dist/models/InformationStatistics.d.ts +67 -0
  52. package/dist/models/InformationStatistics.js +56 -0
  53. package/dist/models/PipelineState.d.ts +8 -2
  54. package/dist/models/PipelineState.js +4 -4
  55. package/dist/models/ScoredChunkResponse.d.ts +6 -0
  56. package/dist/models/ScoredChunkResponse.js +2 -0
  57. package/dist/models/SectionResponse.d.ts +7 -0
  58. package/dist/models/SectionResponse.js +3 -0
  59. package/dist/models/SectionSystemMetadata.d.ts +48 -0
  60. package/dist/models/SectionSystemMetadata.js +51 -0
  61. package/dist/models/WorkflowDetailResponse.d.ts +6 -0
  62. package/dist/models/WorkflowDetailResponse.js +2 -0
  63. package/dist/models/WorkflowSummaryResponse.d.ts +6 -0
  64. package/dist/models/WorkflowSummaryResponse.js +2 -0
  65. package/dist/models/index.d.ts +4 -0
  66. package/dist/models/index.js +4 -0
  67. package/docs/ChunkBulkResponse.md +2 -0
  68. package/docs/ChunkResponse.md +2 -0
  69. package/docs/DocumentVersionAction.md +33 -0
  70. package/docs/DocumentVersionActionResponse.md +39 -0
  71. package/docs/DocumentVersionMetadata.md +3 -1
  72. package/docs/DocumentVersionMetadataUpdate.md +2 -0
  73. package/docs/DocumentVersionResponse.md +2 -2
  74. package/docs/DocumentVersionsApi.md +78 -0
  75. package/docs/InformationStatistics.md +41 -0
  76. package/docs/PipelineState.md +2 -0
  77. package/docs/ScoredChunkResponse.md +2 -0
  78. package/docs/SectionResponse.md +2 -0
  79. package/docs/SectionSystemMetadata.md +35 -0
  80. package/docs/WorkflowDetailResponse.md +2 -0
  81. package/docs/WorkflowSummaryResponse.md +2 -0
  82. package/package.json +1 -1
  83. package/src/apis/DocumentVersionsApi.ts +105 -0
  84. package/src/models/ChunkBulkResponse.ts +8 -0
  85. package/src/models/ChunkResponse.ts +8 -0
  86. package/src/models/DocumentVersionAction.ts +52 -0
  87. package/src/models/DocumentVersionActionResponse.ts +111 -0
  88. package/src/models/DocumentVersionMetadata.ts +16 -1
  89. package/src/models/DocumentVersionMetadataUpdate.ts +15 -0
  90. package/src/models/DocumentVersionResponse.ts +3 -3
  91. package/src/models/InformationStatistics.ts +106 -0
  92. package/src/models/PipelineState.ts +12 -5
  93. package/src/models/ScoredChunkResponse.ts +8 -0
  94. package/src/models/SectionResponse.ts +16 -0
  95. package/src/models/SectionSystemMetadata.ts +90 -0
  96. package/src/models/WorkflowDetailResponse.ts +8 -0
  97. package/src/models/WorkflowSummaryResponse.ts +8 -0
  98. package/src/models/index.ts +4 -0
@@ -0,0 +1,50 @@
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.DocumentVersionAction = void 0;
17
+ exports.instanceOfDocumentVersionAction = instanceOfDocumentVersionAction;
18
+ exports.DocumentVersionActionFromJSON = DocumentVersionActionFromJSON;
19
+ exports.DocumentVersionActionFromJSONTyped = DocumentVersionActionFromJSONTyped;
20
+ exports.DocumentVersionActionToJSON = DocumentVersionActionToJSON;
21
+ exports.DocumentVersionActionToJSONTyped = DocumentVersionActionToJSONTyped;
22
+ /**
23
+ * Actions that can be performed on a document version.
24
+ * @export
25
+ */
26
+ exports.DocumentVersionAction = {
27
+ Reembed: 'reembed'
28
+ };
29
+ function instanceOfDocumentVersionAction(value) {
30
+ for (const key in exports.DocumentVersionAction) {
31
+ if (Object.prototype.hasOwnProperty.call(exports.DocumentVersionAction, key)) {
32
+ if (exports.DocumentVersionAction[key] === value) {
33
+ return true;
34
+ }
35
+ }
36
+ }
37
+ return false;
38
+ }
39
+ function DocumentVersionActionFromJSON(json) {
40
+ return DocumentVersionActionFromJSONTyped(json, false);
41
+ }
42
+ function DocumentVersionActionFromJSONTyped(json, ignoreDiscriminator) {
43
+ return json;
44
+ }
45
+ function DocumentVersionActionToJSON(value) {
46
+ return value;
47
+ }
48
+ function DocumentVersionActionToJSONTyped(value, ignoreDiscriminator) {
49
+ return value;
50
+ }
@@ -0,0 +1,60 @@
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 { DocumentVersionAction } from './DocumentVersionAction';
13
+ /**
14
+ * Response from a document version action.
15
+ * @export
16
+ * @interface DocumentVersionActionResponse
17
+ */
18
+ export interface DocumentVersionActionResponse {
19
+ /**
20
+ * DocumentVersion ID
21
+ * @type {string}
22
+ * @memberof DocumentVersionActionResponse
23
+ */
24
+ versionId: string;
25
+ /**
26
+ *
27
+ * @type {DocumentVersionAction}
28
+ * @memberof DocumentVersionActionResponse
29
+ */
30
+ action: DocumentVersionAction;
31
+ /**
32
+ * Temporal workflow ID
33
+ * @type {string}
34
+ * @memberof DocumentVersionActionResponse
35
+ */
36
+ workflowId: string;
37
+ }
38
+ /**
39
+ * Check if a given object implements the DocumentVersionActionResponse interface.
40
+ */
41
+ export declare function instanceOfDocumentVersionActionResponse(value: object): value is DocumentVersionActionResponse;
42
+ export declare function DocumentVersionActionResponseFromJSON(json: any): DocumentVersionActionResponse;
43
+ export declare function DocumentVersionActionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionActionResponse;
44
+ export declare function DocumentVersionActionResponseToJSON(json: any): DocumentVersionActionResponse;
45
+ export declare function DocumentVersionActionResponseToJSONTyped(value?: DocumentVersionActionResponse | null, ignoreDiscriminator?: boolean): any;
46
+ export declare const DocumentVersionActionResponsePropertyValidationAttributesMap: {
47
+ [property: string]: {
48
+ maxLength?: number;
49
+ minLength?: number;
50
+ pattern?: string;
51
+ maximum?: number;
52
+ exclusiveMaximum?: boolean;
53
+ minimum?: number;
54
+ exclusiveMinimum?: boolean;
55
+ multipleOf?: number;
56
+ maxItems?: number;
57
+ minItems?: number;
58
+ uniqueItems?: boolean;
59
+ };
60
+ };
@@ -0,0 +1,61 @@
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.DocumentVersionActionResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfDocumentVersionActionResponse = instanceOfDocumentVersionActionResponse;
18
+ exports.DocumentVersionActionResponseFromJSON = DocumentVersionActionResponseFromJSON;
19
+ exports.DocumentVersionActionResponseFromJSONTyped = DocumentVersionActionResponseFromJSONTyped;
20
+ exports.DocumentVersionActionResponseToJSON = DocumentVersionActionResponseToJSON;
21
+ exports.DocumentVersionActionResponseToJSONTyped = DocumentVersionActionResponseToJSONTyped;
22
+ const DocumentVersionAction_1 = require("./DocumentVersionAction");
23
+ /**
24
+ * Check if a given object implements the DocumentVersionActionResponse interface.
25
+ */
26
+ function instanceOfDocumentVersionActionResponse(value) {
27
+ if (!('versionId' in value) || value['versionId'] === undefined)
28
+ return false;
29
+ if (!('action' in value) || value['action'] === undefined)
30
+ return false;
31
+ if (!('workflowId' in value) || value['workflowId'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function DocumentVersionActionResponseFromJSON(json) {
36
+ return DocumentVersionActionResponseFromJSONTyped(json, false);
37
+ }
38
+ function DocumentVersionActionResponseFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'versionId': json['version_id'],
44
+ 'action': (0, DocumentVersionAction_1.DocumentVersionActionFromJSON)(json['action']),
45
+ 'workflowId': json['workflow_id'],
46
+ };
47
+ }
48
+ function DocumentVersionActionResponseToJSON(json) {
49
+ return DocumentVersionActionResponseToJSONTyped(json, false);
50
+ }
51
+ function DocumentVersionActionResponseToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'version_id': value['versionId'],
57
+ 'action': (0, DocumentVersionAction_1.DocumentVersionActionToJSON)(value['action']),
58
+ 'workflow_id': value['workflowId'],
59
+ };
60
+ }
61
+ exports.DocumentVersionActionResponsePropertyValidationAttributesMap = {};
@@ -10,8 +10,9 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { PipelineState } from './PipelineState';
13
+ import type { InformationStatistics } from './InformationStatistics';
13
14
  /**
14
- * Schema for document_version.metadata JSONB field.
15
+ * Schema for document_version.system_metadata JSONB field.
15
16
  *
16
17
  * Tracks S3 URLs for generated artifacts, pipeline execution state,
17
18
  * and document statistics. Convention-based paths (images, page screenshots)
@@ -97,6 +98,12 @@ export interface DocumentVersionMetadata {
97
98
  xlsxKpiCatalog?: Array<{
98
99
  [key: string]: any;
99
100
  }> | null;
101
+ /**
102
+ *
103
+ * @type {InformationStatistics}
104
+ * @memberof DocumentVersionMetadata
105
+ */
106
+ informationStatistics?: InformationStatistics;
100
107
  }
101
108
  /**
102
109
  * Check if a given object implements the DocumentVersionMetadata interface.
@@ -20,6 +20,7 @@ exports.DocumentVersionMetadataFromJSONTyped = DocumentVersionMetadataFromJSONTy
20
20
  exports.DocumentVersionMetadataToJSON = DocumentVersionMetadataToJSON;
21
21
  exports.DocumentVersionMetadataToJSONTyped = DocumentVersionMetadataToJSONTyped;
22
22
  const PipelineState_1 = require("./PipelineState");
23
+ const InformationStatistics_1 = require("./InformationStatistics");
23
24
  /**
24
25
  * Check if a given object implements the DocumentVersionMetadata interface.
25
26
  */
@@ -46,6 +47,7 @@ function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator) {
46
47
  'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
47
48
  'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
48
49
  'xlsxKpiCatalog': json['xlsx_kpi_catalog'] == null ? undefined : json['xlsx_kpi_catalog'],
50
+ 'informationStatistics': json['information_statistics'] == null ? undefined : (0, InformationStatistics_1.InformationStatisticsFromJSON)(json['information_statistics']),
49
51
  };
50
52
  }
51
53
  function DocumentVersionMetadataToJSON(json) {
@@ -68,6 +70,7 @@ function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator = false)
68
70
  'xlsx_parse_result_s3': value['xlsxParseResultS3'],
69
71
  'xlsx_named_ranges': value['xlsxNamedRanges'],
70
72
  'xlsx_kpi_catalog': value['xlsxKpiCatalog'],
73
+ 'information_statistics': (0, InformationStatistics_1.InformationStatisticsToJSON)(value['informationStatistics']),
71
74
  };
72
75
  }
73
76
  exports.DocumentVersionMetadataPropertyValidationAttributesMap = {};
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { PipelineState } from './PipelineState';
13
+ import type { InformationStatistics } from './InformationStatistics';
13
14
  /**
14
15
  * Partial update schema for document version metadata.
15
16
  *
@@ -95,6 +96,12 @@ export interface DocumentVersionMetadataUpdate {
95
96
  xlsxKpiCatalog?: Array<{
96
97
  [key: string]: any;
97
98
  }> | null;
99
+ /**
100
+ *
101
+ * @type {InformationStatistics}
102
+ * @memberof DocumentVersionMetadataUpdate
103
+ */
104
+ informationStatistics?: InformationStatistics;
98
105
  }
99
106
  /**
100
107
  * Check if a given object implements the DocumentVersionMetadataUpdate interface.
@@ -20,6 +20,7 @@ exports.DocumentVersionMetadataUpdateFromJSONTyped = DocumentVersionMetadataUpda
20
20
  exports.DocumentVersionMetadataUpdateToJSON = DocumentVersionMetadataUpdateToJSON;
21
21
  exports.DocumentVersionMetadataUpdateToJSONTyped = DocumentVersionMetadataUpdateToJSONTyped;
22
22
  const PipelineState_1 = require("./PipelineState");
23
+ const InformationStatistics_1 = require("./InformationStatistics");
23
24
  /**
24
25
  * Check if a given object implements the DocumentVersionMetadataUpdate interface.
25
26
  */
@@ -46,6 +47,7 @@ function DocumentVersionMetadataUpdateFromJSONTyped(json, ignoreDiscriminator) {
46
47
  'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
47
48
  'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
48
49
  'xlsxKpiCatalog': json['xlsx_kpi_catalog'] == null ? undefined : json['xlsx_kpi_catalog'],
50
+ 'informationStatistics': json['information_statistics'] == null ? undefined : (0, InformationStatistics_1.InformationStatisticsFromJSON)(json['information_statistics']),
49
51
  };
50
52
  }
51
53
  function DocumentVersionMetadataUpdateToJSON(json) {
@@ -68,6 +70,7 @@ function DocumentVersionMetadataUpdateToJSONTyped(value, ignoreDiscriminator = f
68
70
  'xlsx_parse_result_s3': value['xlsxParseResultS3'],
69
71
  'xlsx_named_ranges': value['xlsxNamedRanges'],
70
72
  'xlsx_kpi_catalog': value['xlsxKpiCatalog'],
73
+ 'information_statistics': (0, InformationStatistics_1.InformationStatisticsToJSON)(value['informationStatistics']),
71
74
  };
72
75
  }
73
76
  exports.DocumentVersionMetadataUpdatePropertyValidationAttributesMap = {};
@@ -90,7 +90,7 @@ export interface DocumentVersionResponse {
90
90
  * @type {DocumentVersionMetadata}
91
91
  * @memberof DocumentVersionResponse
92
92
  */
93
- metadata?: DocumentVersionMetadata;
93
+ systemMetadata?: DocumentVersionMetadata;
94
94
  }
95
95
  /**
96
96
  * Check if a given object implements the DocumentVersionResponse interface.
@@ -65,7 +65,7 @@ function DocumentVersionResponseFromJSONTyped(json, ignoreDiscriminator) {
65
65
  'createdAt': (new Date(json['created_at'])),
66
66
  'updatedAt': (new Date(json['updated_at'])),
67
67
  'assetS3Url': json['asset_s3_url'] == null ? undefined : json['asset_s3_url'],
68
- 'metadata': json['metadata'] == null ? undefined : (0, DocumentVersionMetadata_1.DocumentVersionMetadataFromJSON)(json['metadata']),
68
+ 'systemMetadata': json['system_metadata'] == null ? undefined : (0, DocumentVersionMetadata_1.DocumentVersionMetadataFromJSON)(json['system_metadata']),
69
69
  };
70
70
  }
71
71
  function DocumentVersionResponseToJSON(json) {
@@ -87,7 +87,7 @@ function DocumentVersionResponseToJSONTyped(value, ignoreDiscriminator = false)
87
87
  'created_at': value['createdAt'].toISOString(),
88
88
  'updated_at': value['updatedAt'].toISOString(),
89
89
  'asset_s3_url': value['assetS3Url'],
90
- 'metadata': (0, DocumentVersionMetadata_1.DocumentVersionMetadataToJSON)(value['metadata']),
90
+ 'system_metadata': (0, DocumentVersionMetadata_1.DocumentVersionMetadataToJSON)(value['systemMetadata']),
91
91
  };
92
92
  }
93
93
  exports.DocumentVersionResponsePropertyValidationAttributesMap = {};
@@ -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
+ /**
13
+ * Aggregate statistics for a section subtree or document version.
14
+ * @export
15
+ * @interface InformationStatistics
16
+ */
17
+ export interface InformationStatistics {
18
+ /**
19
+ * Count of chunks by type (e.g. {"TEXT": 42, "TABLE": 3})
20
+ * @type {{ [key: string]: number; }}
21
+ * @memberof InformationStatistics
22
+ */
23
+ numChunksByType?: {
24
+ [key: string]: number;
25
+ };
26
+ /**
27
+ * Sum of all chunk content tokens in subtree
28
+ * @type {number}
29
+ * @memberof InformationStatistics
30
+ */
31
+ totalTokens?: number;
32
+ /**
33
+ * Count of immediate children (sections + chunks)
34
+ * @type {number}
35
+ * @memberof InformationStatistics
36
+ */
37
+ numDirectChildren?: number;
38
+ /**
39
+ * Max depth to deepest leaf (0 = no children)
40
+ * @type {number}
41
+ * @memberof InformationStatistics
42
+ */
43
+ childrenDepth?: number;
44
+ }
45
+ /**
46
+ * Check if a given object implements the InformationStatistics interface.
47
+ */
48
+ export declare function instanceOfInformationStatistics(value: object): value is InformationStatistics;
49
+ export declare function InformationStatisticsFromJSON(json: any): InformationStatistics;
50
+ export declare function InformationStatisticsFromJSONTyped(json: any, ignoreDiscriminator: boolean): InformationStatistics;
51
+ export declare function InformationStatisticsToJSON(json: any): InformationStatistics;
52
+ export declare function InformationStatisticsToJSONTyped(value?: InformationStatistics | null, ignoreDiscriminator?: boolean): any;
53
+ export declare const InformationStatisticsPropertyValidationAttributesMap: {
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,56 @@
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.InformationStatisticsPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfInformationStatistics = instanceOfInformationStatistics;
18
+ exports.InformationStatisticsFromJSON = InformationStatisticsFromJSON;
19
+ exports.InformationStatisticsFromJSONTyped = InformationStatisticsFromJSONTyped;
20
+ exports.InformationStatisticsToJSON = InformationStatisticsToJSON;
21
+ exports.InformationStatisticsToJSONTyped = InformationStatisticsToJSONTyped;
22
+ /**
23
+ * Check if a given object implements the InformationStatistics interface.
24
+ */
25
+ function instanceOfInformationStatistics(value) {
26
+ return true;
27
+ }
28
+ function InformationStatisticsFromJSON(json) {
29
+ return InformationStatisticsFromJSONTyped(json, false);
30
+ }
31
+ function InformationStatisticsFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'numChunksByType': json['num_chunks_by_type'] == null ? undefined : json['num_chunks_by_type'],
37
+ 'totalTokens': json['total_tokens'] == null ? undefined : json['total_tokens'],
38
+ 'numDirectChildren': json['num_direct_children'] == null ? undefined : json['num_direct_children'],
39
+ 'childrenDepth': json['children_depth'] == null ? undefined : json['children_depth'],
40
+ };
41
+ }
42
+ function InformationStatisticsToJSON(json) {
43
+ return InformationStatisticsToJSONTyped(json, false);
44
+ }
45
+ function InformationStatisticsToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'num_chunks_by_type': value['numChunksByType'],
51
+ 'total_tokens': value['totalTokens'],
52
+ 'num_direct_children': value['numDirectChildren'],
53
+ 'children_depth': value['childrenDepth'],
54
+ };
55
+ }
56
+ exports.InformationStatisticsPropertyValidationAttributesMap = {};
@@ -25,11 +25,17 @@ export interface PipelineState {
25
25
  */
26
26
  status: PipelineStatus;
27
27
  /**
28
- * Timestamp of the last pipeline execution attempt
28
+ * Timestamp of the last pipeline execution attempt (set once when a run starts)
29
29
  * @type {Date}
30
30
  * @memberof PipelineState
31
31
  */
32
- lastRunTimestamp: Date;
32
+ lastRunTimestamp?: Date | null;
33
+ /**
34
+ * Timestamp of the last pipeline state change (set by activities)
35
+ * @type {Date}
36
+ * @memberof PipelineState
37
+ */
38
+ lastStateUpdateTimestamp?: Date | null;
33
39
  /**
34
40
  * Name of the last activity that executed (e.g., 'docling_conversion')
35
41
  * @type {string}
@@ -28,8 +28,6 @@ const ChunkType_1 = require("./ChunkType");
28
28
  function instanceOfPipelineState(value) {
29
29
  if (!('status' in value) || value['status'] === undefined)
30
30
  return false;
31
- if (!('lastRunTimestamp' in value) || value['lastRunTimestamp'] === undefined)
32
- return false;
33
31
  return true;
34
32
  }
35
33
  function PipelineStateFromJSON(json) {
@@ -41,7 +39,8 @@ function PipelineStateFromJSONTyped(json, ignoreDiscriminator) {
41
39
  }
42
40
  return {
43
41
  'status': (0, PipelineStatus_1.PipelineStatusFromJSON)(json['status']),
44
- 'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
42
+ 'lastRunTimestamp': json['last_run_timestamp'] == null ? undefined : (new Date(json['last_run_timestamp'])),
43
+ 'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
45
44
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
46
45
  'error': json['error'] == null ? undefined : json['error'],
47
46
  'temporalWorkflowId': json['temporal_workflow_id'] == null ? undefined : json['temporal_workflow_id'],
@@ -60,7 +59,8 @@ function PipelineStateToJSONTyped(value, ignoreDiscriminator = false) {
60
59
  }
61
60
  return {
62
61
  'status': (0, PipelineStatus_1.PipelineStatusToJSON)(value['status']),
63
- 'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
62
+ 'last_run_timestamp': value['lastRunTimestamp'] == null ? value['lastRunTimestamp'] : value['lastRunTimestamp'].toISOString(),
63
+ 'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
64
64
  'last_activity': value['lastActivity'],
65
65
  'error': value['error'],
66
66
  'temporal_workflow_id': value['temporalWorkflowId'],
@@ -55,6 +55,12 @@ export interface ScoredChunkResponse {
55
55
  * @memberof ScoredChunkResponse
56
56
  */
57
57
  chunkMetadata: ChunkMetadataOutput;
58
+ /**
59
+ * Number of tokens in chunk content
60
+ * @type {number}
61
+ * @memberof ScoredChunkResponse
62
+ */
63
+ numTokens?: number | null;
58
64
  /**
59
65
  * Parent PathPart ID
60
66
  * @type {string}
@@ -69,6 +69,7 @@ function ScoredChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
69
69
  'content': json['content'],
70
70
  'chunkType': (0, ChunkType_1.ChunkTypeFromJSON)(json['chunk_type']),
71
71
  'chunkMetadata': (0, ChunkMetadataOutput_1.ChunkMetadataOutputFromJSON)(json['chunk_metadata']),
72
+ 'numTokens': json['num_tokens'] == null ? undefined : json['num_tokens'],
72
73
  'parentPathId': json['parent_path_id'],
73
74
  'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
74
75
  'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
@@ -97,6 +98,7 @@ function ScoredChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
97
98
  'content': value['content'],
98
99
  'chunk_type': (0, ChunkType_1.ChunkTypeToJSON)(value['chunkType']),
99
100
  'chunk_metadata': (0, ChunkMetadataOutput_1.ChunkMetadataOutputToJSON)(value['chunkMetadata']),
101
+ 'num_tokens': value['numTokens'],
100
102
  'parent_path_id': value['parentPathId'],
101
103
  'prev_sibling_path_id': value['prevSiblingPathId'],
102
104
  'next_sibling_path_id': value['nextSiblingPathId'],
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { SectionSystemMetadata } from './SectionSystemMetadata';
12
13
  /**
13
14
  * Section response model.
14
15
  * @export
@@ -69,6 +70,12 @@ export interface SectionResponse {
69
70
  * @memberof SectionResponse
70
71
  */
71
72
  systemManaged: boolean;
73
+ /**
74
+ *
75
+ * @type {SectionSystemMetadata}
76
+ * @memberof SectionResponse
77
+ */
78
+ systemMetadata?: SectionSystemMetadata;
72
79
  /**
73
80
  * Tenant ID
74
81
  * @type {string}
@@ -19,6 +19,7 @@ exports.SectionResponseFromJSON = SectionResponseFromJSON;
19
19
  exports.SectionResponseFromJSONTyped = SectionResponseFromJSONTyped;
20
20
  exports.SectionResponseToJSON = SectionResponseToJSON;
21
21
  exports.SectionResponseToJSONTyped = SectionResponseToJSONTyped;
22
+ const SectionSystemMetadata_1 = require("./SectionSystemMetadata");
22
23
  /**
23
24
  * Check if a given object implements the SectionResponse interface.
24
25
  */
@@ -60,6 +61,7 @@ function SectionResponseFromJSONTyped(json, ignoreDiscriminator) {
60
61
  'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
61
62
  'materializedPath': json['materialized_path'],
62
63
  'systemManaged': json['system_managed'],
64
+ 'systemMetadata': json['system_metadata'] == null ? undefined : (0, SectionSystemMetadata_1.SectionSystemMetadataFromJSON)(json['system_metadata']),
63
65
  'tenantId': json['tenant_id'],
64
66
  'createdAt': (new Date(json['created_at'])),
65
67
  'updatedAt': (new Date(json['updated_at'])),
@@ -82,6 +84,7 @@ function SectionResponseToJSONTyped(value, ignoreDiscriminator = false) {
82
84
  'next_sibling_path_id': value['nextSiblingPathId'],
83
85
  'materialized_path': value['materializedPath'],
84
86
  'system_managed': value['systemManaged'],
87
+ 'system_metadata': (0, SectionSystemMetadata_1.SectionSystemMetadataToJSON)(value['systemMetadata']),
85
88
  'tenant_id': value['tenantId'],
86
89
  'created_at': value['createdAt'].toISOString(),
87
90
  'updated_at': value['updatedAt'].toISOString(),
@@ -0,0 +1,48 @@
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 { InformationStatistics } from './InformationStatistics';
13
+ /**
14
+ * Schema for section.system_metadata JSONB field.
15
+ * @export
16
+ * @interface SectionSystemMetadata
17
+ */
18
+ export interface SectionSystemMetadata {
19
+ /**
20
+ *
21
+ * @type {InformationStatistics}
22
+ * @memberof SectionSystemMetadata
23
+ */
24
+ informationStatistics?: InformationStatistics;
25
+ }
26
+ /**
27
+ * Check if a given object implements the SectionSystemMetadata interface.
28
+ */
29
+ export declare function instanceOfSectionSystemMetadata(value: object): value is SectionSystemMetadata;
30
+ export declare function SectionSystemMetadataFromJSON(json: any): SectionSystemMetadata;
31
+ export declare function SectionSystemMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SectionSystemMetadata;
32
+ export declare function SectionSystemMetadataToJSON(json: any): SectionSystemMetadata;
33
+ export declare function SectionSystemMetadataToJSONTyped(value?: SectionSystemMetadata | null, ignoreDiscriminator?: boolean): any;
34
+ export declare const SectionSystemMetadataPropertyValidationAttributesMap: {
35
+ [property: string]: {
36
+ maxLength?: number;
37
+ minLength?: number;
38
+ pattern?: string;
39
+ maximum?: number;
40
+ exclusiveMaximum?: boolean;
41
+ minimum?: number;
42
+ exclusiveMinimum?: boolean;
43
+ multipleOf?: number;
44
+ maxItems?: number;
45
+ minItems?: number;
46
+ uniqueItems?: boolean;
47
+ };
48
+ };
@@ -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.SectionSystemMetadataPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfSectionSystemMetadata = instanceOfSectionSystemMetadata;
18
+ exports.SectionSystemMetadataFromJSON = SectionSystemMetadataFromJSON;
19
+ exports.SectionSystemMetadataFromJSONTyped = SectionSystemMetadataFromJSONTyped;
20
+ exports.SectionSystemMetadataToJSON = SectionSystemMetadataToJSON;
21
+ exports.SectionSystemMetadataToJSONTyped = SectionSystemMetadataToJSONTyped;
22
+ const InformationStatistics_1 = require("./InformationStatistics");
23
+ /**
24
+ * Check if a given object implements the SectionSystemMetadata interface.
25
+ */
26
+ function instanceOfSectionSystemMetadata(value) {
27
+ return true;
28
+ }
29
+ function SectionSystemMetadataFromJSON(json) {
30
+ return SectionSystemMetadataFromJSONTyped(json, false);
31
+ }
32
+ function SectionSystemMetadataFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'informationStatistics': json['information_statistics'] == null ? undefined : (0, InformationStatistics_1.InformationStatisticsFromJSON)(json['information_statistics']),
38
+ };
39
+ }
40
+ function SectionSystemMetadataToJSON(json) {
41
+ return SectionSystemMetadataToJSONTyped(json, false);
42
+ }
43
+ function SectionSystemMetadataToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'information_statistics': (0, InformationStatistics_1.InformationStatisticsToJSON)(value['informationStatistics']),
49
+ };
50
+ }
51
+ exports.SectionSystemMetadataPropertyValidationAttributesMap = {};
@@ -58,6 +58,12 @@ export interface WorkflowDetailResponse {
58
58
  * @memberof WorkflowDetailResponse
59
59
  */
60
60
  lastRunTimestamp: Date;
61
+ /**
62
+ *
63
+ * @type {Date}
64
+ * @memberof WorkflowDetailResponse
65
+ */
66
+ lastStateUpdateTimestamp?: Date | null;
61
67
  /**
62
68
  *
63
69
  * @type {Date}