@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
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { PipelineStateFromJSON, PipelineStateToJSON, } from './PipelineState';
15
+ import { InformationStatisticsFromJSON, InformationStatisticsToJSON, } from './InformationStatistics';
15
16
  /**
16
17
  * Check if a given object implements the DocumentVersionMetadata interface.
17
18
  */
@@ -38,6 +39,7 @@ export function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator)
38
39
  'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
39
40
  'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
40
41
  'xlsxKpiCatalog': json['xlsx_kpi_catalog'] == null ? undefined : json['xlsx_kpi_catalog'],
42
+ 'informationStatistics': json['information_statistics'] == null ? undefined : InformationStatisticsFromJSON(json['information_statistics']),
41
43
  };
42
44
  }
43
45
  export function DocumentVersionMetadataToJSON(json) {
@@ -60,6 +62,7 @@ export function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator =
60
62
  'xlsx_parse_result_s3': value['xlsxParseResultS3'],
61
63
  'xlsx_named_ranges': value['xlsxNamedRanges'],
62
64
  'xlsx_kpi_catalog': value['xlsxKpiCatalog'],
65
+ 'information_statistics': InformationStatisticsToJSON(value['informationStatistics']),
63
66
  };
64
67
  }
65
68
  export const 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.
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { PipelineStateFromJSON, PipelineStateToJSON, } from './PipelineState';
15
+ import { InformationStatisticsFromJSON, InformationStatisticsToJSON, } from './InformationStatistics';
15
16
  /**
16
17
  * Check if a given object implements the DocumentVersionMetadataUpdate interface.
17
18
  */
@@ -38,6 +39,7 @@ export function DocumentVersionMetadataUpdateFromJSONTyped(json, ignoreDiscrimin
38
39
  'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
39
40
  'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
40
41
  'xlsxKpiCatalog': json['xlsx_kpi_catalog'] == null ? undefined : json['xlsx_kpi_catalog'],
42
+ 'informationStatistics': json['information_statistics'] == null ? undefined : InformationStatisticsFromJSON(json['information_statistics']),
41
43
  };
42
44
  }
43
45
  export function DocumentVersionMetadataUpdateToJSON(json) {
@@ -60,6 +62,7 @@ export function DocumentVersionMetadataUpdateToJSONTyped(value, ignoreDiscrimina
60
62
  'xlsx_parse_result_s3': value['xlsxParseResultS3'],
61
63
  'xlsx_named_ranges': value['xlsxNamedRanges'],
62
64
  'xlsx_kpi_catalog': value['xlsxKpiCatalog'],
65
+ 'information_statistics': InformationStatisticsToJSON(value['informationStatistics']),
63
66
  };
64
67
  }
65
68
  export const 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.
@@ -57,7 +57,7 @@ export function DocumentVersionResponseFromJSONTyped(json, ignoreDiscriminator)
57
57
  'createdAt': (new Date(json['created_at'])),
58
58
  'updatedAt': (new Date(json['updated_at'])),
59
59
  'assetS3Url': json['asset_s3_url'] == null ? undefined : json['asset_s3_url'],
60
- 'metadata': json['metadata'] == null ? undefined : DocumentVersionMetadataFromJSON(json['metadata']),
60
+ 'systemMetadata': json['system_metadata'] == null ? undefined : DocumentVersionMetadataFromJSON(json['system_metadata']),
61
61
  };
62
62
  }
63
63
  export function DocumentVersionResponseToJSON(json) {
@@ -79,7 +79,7 @@ export function DocumentVersionResponseToJSONTyped(value, ignoreDiscriminator =
79
79
  'created_at': value['createdAt'].toISOString(),
80
80
  'updated_at': value['updatedAt'].toISOString(),
81
81
  'asset_s3_url': value['assetS3Url'],
82
- 'metadata': DocumentVersionMetadataToJSON(value['metadata']),
82
+ 'system_metadata': DocumentVersionMetadataToJSON(value['systemMetadata']),
83
83
  };
84
84
  }
85
85
  export const 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,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the InformationStatistics interface.
16
+ */
17
+ export function instanceOfInformationStatistics(value) {
18
+ return true;
19
+ }
20
+ export function InformationStatisticsFromJSON(json) {
21
+ return InformationStatisticsFromJSONTyped(json, false);
22
+ }
23
+ export function InformationStatisticsFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'numChunksByType': json['num_chunks_by_type'] == null ? undefined : json['num_chunks_by_type'],
29
+ 'totalTokens': json['total_tokens'] == null ? undefined : json['total_tokens'],
30
+ 'numDirectChildren': json['num_direct_children'] == null ? undefined : json['num_direct_children'],
31
+ 'childrenDepth': json['children_depth'] == null ? undefined : json['children_depth'],
32
+ };
33
+ }
34
+ export function InformationStatisticsToJSON(json) {
35
+ return InformationStatisticsToJSONTyped(json, false);
36
+ }
37
+ export function InformationStatisticsToJSONTyped(value, ignoreDiscriminator = false) {
38
+ if (value == null) {
39
+ return value;
40
+ }
41
+ return {
42
+ 'num_chunks_by_type': value['numChunksByType'],
43
+ 'total_tokens': value['totalTokens'],
44
+ 'num_direct_children': value['numDirectChildren'],
45
+ 'children_depth': value['childrenDepth'],
46
+ };
47
+ }
48
+ export const 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}
@@ -20,8 +20,6 @@ import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
20
20
  export function instanceOfPipelineState(value) {
21
21
  if (!('status' in value) || value['status'] === undefined)
22
22
  return false;
23
- if (!('lastRunTimestamp' in value) || value['lastRunTimestamp'] === undefined)
24
- return false;
25
23
  return true;
26
24
  }
27
25
  export function PipelineStateFromJSON(json) {
@@ -33,7 +31,8 @@ export function PipelineStateFromJSONTyped(json, ignoreDiscriminator) {
33
31
  }
34
32
  return {
35
33
  'status': PipelineStatusFromJSON(json['status']),
36
- 'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
34
+ 'lastRunTimestamp': json['last_run_timestamp'] == null ? undefined : (new Date(json['last_run_timestamp'])),
35
+ 'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
37
36
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
38
37
  'error': json['error'] == null ? undefined : json['error'],
39
38
  'temporalWorkflowId': json['temporal_workflow_id'] == null ? undefined : json['temporal_workflow_id'],
@@ -52,7 +51,8 @@ export function PipelineStateToJSONTyped(value, ignoreDiscriminator = false) {
52
51
  }
53
52
  return {
54
53
  'status': PipelineStatusToJSON(value['status']),
55
- 'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
54
+ 'last_run_timestamp': value['lastRunTimestamp'] == null ? value['lastRunTimestamp'] : value['lastRunTimestamp'].toISOString(),
55
+ 'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
56
56
  'last_activity': value['lastActivity'],
57
57
  'error': value['error'],
58
58
  '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}
@@ -61,6 +61,7 @@ export function ScoredChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
61
61
  'content': json['content'],
62
62
  'chunkType': ChunkTypeFromJSON(json['chunk_type']),
63
63
  'chunkMetadata': ChunkMetadataOutputFromJSON(json['chunk_metadata']),
64
+ 'numTokens': json['num_tokens'] == null ? undefined : json['num_tokens'],
64
65
  'parentPathId': json['parent_path_id'],
65
66
  'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
66
67
  'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
@@ -89,6 +90,7 @@ export function ScoredChunkResponseToJSONTyped(value, ignoreDiscriminator = fals
89
90
  'content': value['content'],
90
91
  'chunk_type': ChunkTypeToJSON(value['chunkType']),
91
92
  'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
93
+ 'num_tokens': value['numTokens'],
92
94
  'parent_path_id': value['parentPathId'],
93
95
  'prev_sibling_path_id': value['prevSiblingPathId'],
94
96
  '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}
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { SectionSystemMetadataFromJSON, SectionSystemMetadataToJSON, } from './SectionSystemMetadata';
14
15
  /**
15
16
  * Check if a given object implements the SectionResponse interface.
16
17
  */
@@ -52,6 +53,7 @@ export function SectionResponseFromJSONTyped(json, ignoreDiscriminator) {
52
53
  'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
53
54
  'materializedPath': json['materialized_path'],
54
55
  'systemManaged': json['system_managed'],
56
+ 'systemMetadata': json['system_metadata'] == null ? undefined : SectionSystemMetadataFromJSON(json['system_metadata']),
55
57
  'tenantId': json['tenant_id'],
56
58
  'createdAt': (new Date(json['created_at'])),
57
59
  'updatedAt': (new Date(json['updated_at'])),
@@ -74,6 +76,7 @@ export function SectionResponseToJSONTyped(value, ignoreDiscriminator = false) {
74
76
  'next_sibling_path_id': value['nextSiblingPathId'],
75
77
  'materialized_path': value['materializedPath'],
76
78
  'system_managed': value['systemManaged'],
79
+ 'system_metadata': SectionSystemMetadataToJSON(value['systemMetadata']),
77
80
  'tenant_id': value['tenantId'],
78
81
  'created_at': value['createdAt'].toISOString(),
79
82
  '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,43 @@
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 { InformationStatisticsFromJSON, InformationStatisticsToJSON, } from './InformationStatistics';
15
+ /**
16
+ * Check if a given object implements the SectionSystemMetadata interface.
17
+ */
18
+ export function instanceOfSectionSystemMetadata(value) {
19
+ return true;
20
+ }
21
+ export function SectionSystemMetadataFromJSON(json) {
22
+ return SectionSystemMetadataFromJSONTyped(json, false);
23
+ }
24
+ export function SectionSystemMetadataFromJSONTyped(json, ignoreDiscriminator) {
25
+ if (json == null) {
26
+ return json;
27
+ }
28
+ return {
29
+ 'informationStatistics': json['information_statistics'] == null ? undefined : InformationStatisticsFromJSON(json['information_statistics']),
30
+ };
31
+ }
32
+ export function SectionSystemMetadataToJSON(json) {
33
+ return SectionSystemMetadataToJSONTyped(json, false);
34
+ }
35
+ export function SectionSystemMetadataToJSONTyped(value, ignoreDiscriminator = false) {
36
+ if (value == null) {
37
+ return value;
38
+ }
39
+ return {
40
+ 'information_statistics': InformationStatisticsToJSON(value['informationStatistics']),
41
+ };
42
+ }
43
+ export const 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}
@@ -55,6 +55,7 @@ export function WorkflowDetailResponseFromJSONTyped(json, ignoreDiscriminator) {
55
55
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
56
56
  'error': json['error'] == null ? undefined : json['error'],
57
57
  'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
58
+ 'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
58
59
  'createdAt': (new Date(json['created_at'])),
59
60
  'temporalStatus': json['temporal_status'],
60
61
  'startTime': (new Date(json['start_time'])),
@@ -80,6 +81,7 @@ export function WorkflowDetailResponseToJSONTyped(value, ignoreDiscriminator = f
80
81
  'last_activity': value['lastActivity'],
81
82
  'error': value['error'],
82
83
  'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
84
+ 'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
83
85
  'created_at': value['createdAt'].toISOString(),
84
86
  'temporal_status': value['temporalStatus'],
85
87
  'start_time': value['startTime'].toISOString(),
@@ -58,6 +58,12 @@ export interface WorkflowSummaryResponse {
58
58
  * @memberof WorkflowSummaryResponse
59
59
  */
60
60
  lastRunTimestamp: Date;
61
+ /**
62
+ *
63
+ * @type {Date}
64
+ * @memberof WorkflowSummaryResponse
65
+ */
66
+ lastStateUpdateTimestamp?: Date | null;
61
67
  /**
62
68
  *
63
69
  * @type {Date}
@@ -45,6 +45,7 @@ export function WorkflowSummaryResponseFromJSONTyped(json, ignoreDiscriminator)
45
45
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
46
46
  'error': json['error'] == null ? undefined : json['error'],
47
47
  'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
48
+ 'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
48
49
  'createdAt': (new Date(json['created_at'])),
49
50
  };
50
51
  }
@@ -63,6 +64,7 @@ export function WorkflowSummaryResponseToJSONTyped(value, ignoreDiscriminator =
63
64
  'last_activity': value['lastActivity'],
64
65
  'error': value['error'],
65
66
  'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
67
+ 'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
66
68
  'created_at': value['createdAt'].toISOString(),
67
69
  };
68
70
  }
@@ -31,6 +31,8 @@ export * from './CreateThreadRequest';
31
31
  export * from './DocumentOrigin';
32
32
  export * from './DocumentResponse';
33
33
  export * from './DocumentType';
34
+ export * from './DocumentVersionAction';
35
+ export * from './DocumentVersionActionResponse';
34
36
  export * from './DocumentVersionMetadata';
35
37
  export * from './DocumentVersionMetadataUpdate';
36
38
  export * from './DocumentVersionResponse';
@@ -47,6 +49,7 @@ export * from './HTTPValidationError';
47
49
  export * from './HealthCheckResponse';
48
50
  export * from './IdpType';
49
51
  export * from './ImageTaxonomy';
52
+ export * from './InformationStatistics';
50
53
  export * from './IngestDocumentResponse';
51
54
  export * from './IngestionMode';
52
55
  export * from './InviteResponse';
@@ -91,6 +94,7 @@ export * from './SearchType';
91
94
  export * from './SectionContentItem';
92
95
  export * from './SectionContentItemOrChunkContentItem';
93
96
  export * from './SectionResponse';
97
+ export * from './SectionSystemMetadata';
94
98
  export * from './SignInRequest';
95
99
  export * from './StepInput';
96
100
  export * from './StepKind';
@@ -33,6 +33,8 @@ export * from './CreateThreadRequest';
33
33
  export * from './DocumentOrigin';
34
34
  export * from './DocumentResponse';
35
35
  export * from './DocumentType';
36
+ export * from './DocumentVersionAction';
37
+ export * from './DocumentVersionActionResponse';
36
38
  export * from './DocumentVersionMetadata';
37
39
  export * from './DocumentVersionMetadataUpdate';
38
40
  export * from './DocumentVersionResponse';
@@ -49,6 +51,7 @@ export * from './HTTPValidationError';
49
51
  export * from './HealthCheckResponse';
50
52
  export * from './IdpType';
51
53
  export * from './ImageTaxonomy';
54
+ export * from './InformationStatistics';
52
55
  export * from './IngestDocumentResponse';
53
56
  export * from './IngestionMode';
54
57
  export * from './InviteResponse';
@@ -93,6 +96,7 @@ export * from './SearchType';
93
96
  export * from './SectionContentItem';
94
97
  export * from './SectionContentItemOrChunkContentItem';
95
98
  export * from './SectionResponse';
99
+ export * from './SectionSystemMetadata';
96
100
  export * from './SignInRequest';
97
101
  export * from './StepInput';
98
102
  export * from './StepKind';
@@ -55,6 +55,12 @@ export interface ChunkBulkResponse {
55
55
  * @memberof ChunkBulkResponse
56
56
  */
57
57
  chunkMetadata: ChunkMetadataOutput;
58
+ /**
59
+ * Number of tokens in chunk content
60
+ * @type {number}
61
+ * @memberof ChunkBulkResponse
62
+ */
63
+ numTokens?: number | null;
58
64
  /**
59
65
  * Parent PathPart ID
60
66
  * @type {string}
@@ -69,6 +69,7 @@ function ChunkBulkResponseFromJSONTyped(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 ChunkBulkResponseToJSONTyped(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'],
@@ -55,6 +55,12 @@ export interface ChunkResponse {
55
55
  * @memberof ChunkResponse
56
56
  */
57
57
  chunkMetadata: ChunkMetadataOutput;
58
+ /**
59
+ * Number of tokens in chunk content
60
+ * @type {number}
61
+ * @memberof ChunkResponse
62
+ */
63
+ numTokens?: number | null;
58
64
  /**
59
65
  * Parent PathPart ID
60
66
  * @type {string}
@@ -67,6 +67,7 @@ function ChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
67
67
  'content': json['content'],
68
68
  'chunkType': (0, ChunkType_1.ChunkTypeFromJSON)(json['chunk_type']),
69
69
  'chunkMetadata': (0, ChunkMetadataOutput_1.ChunkMetadataOutputFromJSON)(json['chunk_metadata']),
70
+ 'numTokens': json['num_tokens'] == null ? undefined : json['num_tokens'],
70
71
  'parentPathId': json['parent_path_id'],
71
72
  'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
72
73
  'nextSiblingPathId': json['next_sibling_path_id'] == null ? undefined : json['next_sibling_path_id'],
@@ -94,6 +95,7 @@ function ChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
94
95
  'content': value['content'],
95
96
  'chunk_type': (0, ChunkType_1.ChunkTypeToJSON)(value['chunkType']),
96
97
  'chunk_metadata': (0, ChunkMetadataOutput_1.ChunkMetadataOutputToJSON)(value['chunkMetadata']),
98
+ 'num_tokens': value['numTokens'],
97
99
  'parent_path_id': value['parentPathId'],
98
100
  'prev_sibling_path_id': value['prevSiblingPathId'],
99
101
  'next_sibling_path_id': value['nextSiblingPathId'],
@@ -0,0 +1,24 @@
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
+ * Actions that can be performed on a document version.
14
+ * @export
15
+ */
16
+ export declare const DocumentVersionAction: {
17
+ readonly Reembed: "reembed";
18
+ };
19
+ export type DocumentVersionAction = typeof DocumentVersionAction[keyof typeof DocumentVersionAction];
20
+ export declare function instanceOfDocumentVersionAction(value: any): boolean;
21
+ export declare function DocumentVersionActionFromJSON(json: any): DocumentVersionAction;
22
+ export declare function DocumentVersionActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionAction;
23
+ export declare function DocumentVersionActionToJSON(value?: DocumentVersionAction | null): any;
24
+ export declare function DocumentVersionActionToJSONTyped(value: any, ignoreDiscriminator: boolean): DocumentVersionAction;