@knowledge-stack/ksapi 3.18.2 → 3.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@3.18.2
1
+ # @knowledge-stack/ksapi@3.19.0
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -776,7 +776,7 @@ and is automatically generated by the
776
776
  [OpenAPI Generator](https://openapi-generator.tech) project:
777
777
 
778
778
  - API version: `0.1.0`
779
- - Package version: `3.18.2`
779
+ - Package version: `3.19.0`
780
780
  - Generator version: `7.21.0`
781
781
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
782
782
 
@@ -83,7 +83,7 @@ export interface SystemJobsApiInterface {
83
83
  */
84
84
  cancelTemporalWorkflowRequestOpts(requestParameters: CancelTemporalWorkflowRequest): Promise<runtime.RequestOpts>;
85
85
  /**
86
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
86
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
87
87
  * @summary Cancel Temporal Workflow Handler
88
88
  * @param {string} workflowId
89
89
  * @param {*} [options] Override http request option.
@@ -92,7 +92,7 @@ export interface SystemJobsApiInterface {
92
92
  */
93
93
  cancelTemporalWorkflowRaw(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowCancelResponse>>;
94
94
  /**
95
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
95
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
96
96
  * Cancel Temporal Workflow Handler
97
97
  */
98
98
  cancelTemporalWorkflow(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowCancelResponse>;
@@ -270,12 +270,12 @@ export declare class SystemJobsApi extends runtime.BaseAPI implements SystemJobs
270
270
  */
271
271
  cancelTemporalWorkflowRequestOpts(requestParameters: CancelTemporalWorkflowRequest): Promise<runtime.RequestOpts>;
272
272
  /**
273
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
273
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
274
274
  * Cancel Temporal Workflow Handler
275
275
  */
276
276
  cancelTemporalWorkflowRaw(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowCancelResponse>>;
277
277
  /**
278
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
278
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
279
279
  * Cancel Temporal Workflow Handler
280
280
  */
281
281
  cancelTemporalWorkflow(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowCancelResponse>;
@@ -139,7 +139,7 @@ class SystemJobsApi extends runtime.BaseAPI {
139
139
  });
140
140
  }
141
141
  /**
142
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
142
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
143
143
  * Cancel Temporal Workflow Handler
144
144
  */
145
145
  cancelTemporalWorkflowRaw(requestParameters, initOverrides) {
@@ -150,7 +150,7 @@ class SystemJobsApi extends runtime.BaseAPI {
150
150
  });
151
151
  }
152
152
  /**
153
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
153
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
154
154
  * Cancel Temporal Workflow Handler
155
155
  */
156
156
  cancelTemporalWorkflow(requestParameters, initOverrides) {
@@ -83,7 +83,7 @@ export interface SystemJobsApiInterface {
83
83
  */
84
84
  cancelTemporalWorkflowRequestOpts(requestParameters: CancelTemporalWorkflowRequest): Promise<runtime.RequestOpts>;
85
85
  /**
86
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
86
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
87
87
  * @summary Cancel Temporal Workflow Handler
88
88
  * @param {string} workflowId
89
89
  * @param {*} [options] Override http request option.
@@ -92,7 +92,7 @@ export interface SystemJobsApiInterface {
92
92
  */
93
93
  cancelTemporalWorkflowRaw(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowCancelResponse>>;
94
94
  /**
95
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
95
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
96
96
  * Cancel Temporal Workflow Handler
97
97
  */
98
98
  cancelTemporalWorkflow(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowCancelResponse>;
@@ -270,12 +270,12 @@ export declare class SystemJobsApi extends runtime.BaseAPI implements SystemJobs
270
270
  */
271
271
  cancelTemporalWorkflowRequestOpts(requestParameters: CancelTemporalWorkflowRequest): Promise<runtime.RequestOpts>;
272
272
  /**
273
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
273
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
274
274
  * Cancel Temporal Workflow Handler
275
275
  */
276
276
  cancelTemporalWorkflowRaw(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowCancelResponse>>;
277
277
  /**
278
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
278
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
279
279
  * Cancel Temporal Workflow Handler
280
280
  */
281
281
  cancelTemporalWorkflow(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowCancelResponse>;
@@ -103,7 +103,7 @@ export class SystemJobsApi extends runtime.BaseAPI {
103
103
  });
104
104
  }
105
105
  /**
106
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
106
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
107
107
  * Cancel Temporal Workflow Handler
108
108
  */
109
109
  cancelTemporalWorkflowRaw(requestParameters, initOverrides) {
@@ -114,7 +114,7 @@ export class SystemJobsApi extends runtime.BaseAPI {
114
114
  });
115
115
  }
116
116
  /**
117
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
117
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
118
118
  * Cancel Temporal Workflow Handler
119
119
  */
120
120
  cancelTemporalWorkflow(requestParameters, initOverrides) {
@@ -19,6 +19,12 @@ import type { ChunkType } from './ChunkType';
19
19
  * @interface PipelineState
20
20
  */
21
21
  export interface PipelineState {
22
+ /**
23
+ * Zero-based retry count for the current stage; maximum across fan-out activities. Managed by ingestion.
24
+ * @type {number}
25
+ * @memberof PipelineState
26
+ */
27
+ readonly lastStageRetryAttempt?: number;
22
28
  /**
23
29
  *
24
30
  * @type {PipelineStatus}
@@ -38,13 +44,13 @@ export interface PipelineState {
38
44
  */
39
45
  lastStateUpdateTimestamp?: Date | null;
40
46
  /**
41
- * Name of the last activity that executed (e.g., 'pdf_preparation_activity')
47
+ * Current ingestion stage, recorded before its activity starts
42
48
  * @type {string}
43
49
  * @memberof PipelineState
44
50
  */
45
51
  lastActivity?: string | null;
46
52
  /**
47
- * Error message if pipeline failed
53
+ * Latest stage failure; retained during retries and cleared on the next stage or success
48
54
  * @type {string}
49
55
  * @memberof PipelineState
50
56
  */
@@ -108,4 +114,4 @@ export declare function instanceOfPipelineState(value: object): value is Pipelin
108
114
  export declare function PipelineStateFromJSON(json: any): PipelineState;
109
115
  export declare function PipelineStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): PipelineState;
110
116
  export declare function PipelineStateToJSON(json: any): PipelineState;
111
- export declare function PipelineStateToJSONTyped(value?: PipelineState | null, ignoreDiscriminator?: boolean): any;
117
+ export declare function PipelineStateToJSONTyped(value?: Omit<PipelineState, 'last_stage_retry_attempt'> | null, ignoreDiscriminator?: boolean): any;
@@ -15,7 +15,12 @@ import { PipelineStatusFromJSON, PipelineStatusToJSON, } from './PipelineStatus'
15
15
  import { ImageTaxonomyFromJSON, ImageTaxonomyToJSON, } from './ImageTaxonomy';
16
16
  import { IngestionModeFromJSON, IngestionModeToJSON, } from './IngestionMode';
17
17
  import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
18
- export const PipelineStatePropertyValidationAttributesMap = {};
18
+ export const PipelineStatePropertyValidationAttributesMap = {
19
+ lastStageRetryAttempt: {
20
+ minimum: 0,
21
+ exclusiveMinimum: false,
22
+ },
23
+ };
19
24
  /**
20
25
  * Check if a given object implements the PipelineState interface.
21
26
  */
@@ -32,6 +37,7 @@ export function PipelineStateFromJSONTyped(json, ignoreDiscriminator) {
32
37
  return json;
33
38
  }
34
39
  return {
40
+ 'lastStageRetryAttempt': json['last_stage_retry_attempt'] == null ? undefined : json['last_stage_retry_attempt'],
35
41
  'status': PipelineStatusFromJSON(json['status']),
36
42
  'lastRunTimestamp': json['last_run_timestamp'] == null ? undefined : (new Date(json['last_run_timestamp'])),
37
43
  'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
@@ -71,6 +71,12 @@ export interface WorkflowDetailResponse {
71
71
  * @memberof WorkflowDetailResponse
72
72
  */
73
73
  lastActivity?: string | null;
74
+ /**
75
+ *
76
+ * @type {number}
77
+ * @memberof WorkflowDetailResponse
78
+ */
79
+ lastStageRetryAttempt?: number;
74
80
  /**
75
81
  *
76
82
  * @type {string}
@@ -13,7 +13,12 @@
13
13
  */
14
14
  import { PipelineStatusFromJSON, PipelineStatusToJSON, } from './PipelineStatus';
15
15
  import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
16
- export const WorkflowDetailResponsePropertyValidationAttributesMap = {};
16
+ export const WorkflowDetailResponsePropertyValidationAttributesMap = {
17
+ lastStageRetryAttempt: {
18
+ minimum: 0,
19
+ exclusiveMinimum: false,
20
+ },
21
+ };
17
22
  /**
18
23
  * Check if a given object implements the WorkflowDetailResponse interface.
19
24
  */
@@ -67,6 +72,7 @@ export function WorkflowDetailResponseFromJSONTyped(json, ignoreDiscriminator) {
67
72
  'uploader': UserInfoFromJSON(json['uploader']),
68
73
  'status': PipelineStatusFromJSON(json['status']),
69
74
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
75
+ 'lastStageRetryAttempt': json['last_stage_retry_attempt'] == null ? undefined : json['last_stage_retry_attempt'],
70
76
  'error': json['error'] == null ? undefined : json['error'],
71
77
  'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
72
78
  'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
@@ -97,6 +103,7 @@ export function WorkflowDetailResponseToJSONTyped(value, ignoreDiscriminator = f
97
103
  'uploader': UserInfoToJSON(value['uploader']),
98
104
  'status': PipelineStatusToJSON(value['status']),
99
105
  'last_activity': value['lastActivity'],
106
+ 'last_stage_retry_attempt': value['lastStageRetryAttempt'],
100
107
  'error': value['error'],
101
108
  'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
102
109
  'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
@@ -71,6 +71,12 @@ export interface WorkflowSummaryResponse {
71
71
  * @memberof WorkflowSummaryResponse
72
72
  */
73
73
  lastActivity?: string | null;
74
+ /**
75
+ *
76
+ * @type {number}
77
+ * @memberof WorkflowSummaryResponse
78
+ */
79
+ lastStageRetryAttempt?: number;
74
80
  /**
75
81
  *
76
82
  * @type {string}
@@ -13,7 +13,12 @@
13
13
  */
14
14
  import { PipelineStatusFromJSON, PipelineStatusToJSON, } from './PipelineStatus';
15
15
  import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
16
- export const WorkflowSummaryResponsePropertyValidationAttributesMap = {};
16
+ export const WorkflowSummaryResponsePropertyValidationAttributesMap = {
17
+ lastStageRetryAttempt: {
18
+ minimum: 0,
19
+ exclusiveMinimum: false,
20
+ },
21
+ };
17
22
  /**
18
23
  * Check if a given object implements the WorkflowSummaryResponse interface.
19
24
  */
@@ -57,6 +62,7 @@ export function WorkflowSummaryResponseFromJSONTyped(json, ignoreDiscriminator)
57
62
  'uploader': UserInfoFromJSON(json['uploader']),
58
63
  'status': PipelineStatusFromJSON(json['status']),
59
64
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
65
+ 'lastStageRetryAttempt': json['last_stage_retry_attempt'] == null ? undefined : json['last_stage_retry_attempt'],
60
66
  'error': json['error'] == null ? undefined : json['error'],
61
67
  'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
62
68
  'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
@@ -80,6 +86,7 @@ export function WorkflowSummaryResponseToJSONTyped(value, ignoreDiscriminator =
80
86
  'uploader': UserInfoToJSON(value['uploader']),
81
87
  'status': PipelineStatusToJSON(value['status']),
82
88
  'last_activity': value['lastActivity'],
89
+ 'last_stage_retry_attempt': value['lastStageRetryAttempt'],
83
90
  'error': value['error'],
84
91
  'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
85
92
  'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
@@ -19,6 +19,12 @@ import type { ChunkType } from './ChunkType';
19
19
  * @interface PipelineState
20
20
  */
21
21
  export interface PipelineState {
22
+ /**
23
+ * Zero-based retry count for the current stage; maximum across fan-out activities. Managed by ingestion.
24
+ * @type {number}
25
+ * @memberof PipelineState
26
+ */
27
+ readonly lastStageRetryAttempt?: number;
22
28
  /**
23
29
  *
24
30
  * @type {PipelineStatus}
@@ -38,13 +44,13 @@ export interface PipelineState {
38
44
  */
39
45
  lastStateUpdateTimestamp?: Date | null;
40
46
  /**
41
- * Name of the last activity that executed (e.g., 'pdf_preparation_activity')
47
+ * Current ingestion stage, recorded before its activity starts
42
48
  * @type {string}
43
49
  * @memberof PipelineState
44
50
  */
45
51
  lastActivity?: string | null;
46
52
  /**
47
- * Error message if pipeline failed
53
+ * Latest stage failure; retained during retries and cleared on the next stage or success
48
54
  * @type {string}
49
55
  * @memberof PipelineState
50
56
  */
@@ -108,4 +114,4 @@ export declare function instanceOfPipelineState(value: object): value is Pipelin
108
114
  export declare function PipelineStateFromJSON(json: any): PipelineState;
109
115
  export declare function PipelineStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): PipelineState;
110
116
  export declare function PipelineStateToJSON(json: any): PipelineState;
111
- export declare function PipelineStateToJSONTyped(value?: PipelineState | null, ignoreDiscriminator?: boolean): any;
117
+ export declare function PipelineStateToJSONTyped(value?: Omit<PipelineState, 'last_stage_retry_attempt'> | null, ignoreDiscriminator?: boolean): any;
@@ -23,7 +23,12 @@ const PipelineStatus_1 = require("./PipelineStatus");
23
23
  const ImageTaxonomy_1 = require("./ImageTaxonomy");
24
24
  const IngestionMode_1 = require("./IngestionMode");
25
25
  const ChunkType_1 = require("./ChunkType");
26
- exports.PipelineStatePropertyValidationAttributesMap = {};
26
+ exports.PipelineStatePropertyValidationAttributesMap = {
27
+ lastStageRetryAttempt: {
28
+ minimum: 0,
29
+ exclusiveMinimum: false,
30
+ },
31
+ };
27
32
  /**
28
33
  * Check if a given object implements the PipelineState interface.
29
34
  */
@@ -40,6 +45,7 @@ function PipelineStateFromJSONTyped(json, ignoreDiscriminator) {
40
45
  return json;
41
46
  }
42
47
  return {
48
+ 'lastStageRetryAttempt': json['last_stage_retry_attempt'] == null ? undefined : json['last_stage_retry_attempt'],
43
49
  'status': (0, PipelineStatus_1.PipelineStatusFromJSON)(json['status']),
44
50
  'lastRunTimestamp': json['last_run_timestamp'] == null ? undefined : (new Date(json['last_run_timestamp'])),
45
51
  'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
@@ -71,6 +71,12 @@ export interface WorkflowDetailResponse {
71
71
  * @memberof WorkflowDetailResponse
72
72
  */
73
73
  lastActivity?: string | null;
74
+ /**
75
+ *
76
+ * @type {number}
77
+ * @memberof WorkflowDetailResponse
78
+ */
79
+ lastStageRetryAttempt?: number;
74
80
  /**
75
81
  *
76
82
  * @type {string}
@@ -21,7 +21,12 @@ exports.WorkflowDetailResponseToJSON = WorkflowDetailResponseToJSON;
21
21
  exports.WorkflowDetailResponseToJSONTyped = WorkflowDetailResponseToJSONTyped;
22
22
  const PipelineStatus_1 = require("./PipelineStatus");
23
23
  const UserInfo_1 = require("./UserInfo");
24
- exports.WorkflowDetailResponsePropertyValidationAttributesMap = {};
24
+ exports.WorkflowDetailResponsePropertyValidationAttributesMap = {
25
+ lastStageRetryAttempt: {
26
+ minimum: 0,
27
+ exclusiveMinimum: false,
28
+ },
29
+ };
25
30
  /**
26
31
  * Check if a given object implements the WorkflowDetailResponse interface.
27
32
  */
@@ -75,6 +80,7 @@ function WorkflowDetailResponseFromJSONTyped(json, ignoreDiscriminator) {
75
80
  'uploader': (0, UserInfo_1.UserInfoFromJSON)(json['uploader']),
76
81
  'status': (0, PipelineStatus_1.PipelineStatusFromJSON)(json['status']),
77
82
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
83
+ 'lastStageRetryAttempt': json['last_stage_retry_attempt'] == null ? undefined : json['last_stage_retry_attempt'],
78
84
  'error': json['error'] == null ? undefined : json['error'],
79
85
  'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
80
86
  'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
@@ -105,6 +111,7 @@ function WorkflowDetailResponseToJSONTyped(value, ignoreDiscriminator = false) {
105
111
  'uploader': (0, UserInfo_1.UserInfoToJSON)(value['uploader']),
106
112
  'status': (0, PipelineStatus_1.PipelineStatusToJSON)(value['status']),
107
113
  'last_activity': value['lastActivity'],
114
+ 'last_stage_retry_attempt': value['lastStageRetryAttempt'],
108
115
  'error': value['error'],
109
116
  'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
110
117
  'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
@@ -71,6 +71,12 @@ export interface WorkflowSummaryResponse {
71
71
  * @memberof WorkflowSummaryResponse
72
72
  */
73
73
  lastActivity?: string | null;
74
+ /**
75
+ *
76
+ * @type {number}
77
+ * @memberof WorkflowSummaryResponse
78
+ */
79
+ lastStageRetryAttempt?: number;
74
80
  /**
75
81
  *
76
82
  * @type {string}
@@ -21,7 +21,12 @@ exports.WorkflowSummaryResponseToJSON = WorkflowSummaryResponseToJSON;
21
21
  exports.WorkflowSummaryResponseToJSONTyped = WorkflowSummaryResponseToJSONTyped;
22
22
  const PipelineStatus_1 = require("./PipelineStatus");
23
23
  const UserInfo_1 = require("./UserInfo");
24
- exports.WorkflowSummaryResponsePropertyValidationAttributesMap = {};
24
+ exports.WorkflowSummaryResponsePropertyValidationAttributesMap = {
25
+ lastStageRetryAttempt: {
26
+ minimum: 0,
27
+ exclusiveMinimum: false,
28
+ },
29
+ };
25
30
  /**
26
31
  * Check if a given object implements the WorkflowSummaryResponse interface.
27
32
  */
@@ -65,6 +70,7 @@ function WorkflowSummaryResponseFromJSONTyped(json, ignoreDiscriminator) {
65
70
  'uploader': (0, UserInfo_1.UserInfoFromJSON)(json['uploader']),
66
71
  'status': (0, PipelineStatus_1.PipelineStatusFromJSON)(json['status']),
67
72
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
73
+ 'lastStageRetryAttempt': json['last_stage_retry_attempt'] == null ? undefined : json['last_stage_retry_attempt'],
68
74
  'error': json['error'] == null ? undefined : json['error'],
69
75
  'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
70
76
  'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
@@ -88,6 +94,7 @@ function WorkflowSummaryResponseToJSONTyped(value, ignoreDiscriminator = false)
88
94
  'uploader': (0, UserInfo_1.UserInfoToJSON)(value['uploader']),
89
95
  'status': (0, PipelineStatus_1.PipelineStatusToJSON)(value['status']),
90
96
  'last_activity': value['lastActivity'],
97
+ 'last_stage_retry_attempt': value['lastStageRetryAttempt'],
91
98
  'error': value['error'],
92
99
  'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
93
100
  'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
@@ -7,6 +7,7 @@ Pipeline execution state tracking.
7
7
 
8
8
  Name | Type
9
9
  ------------ | -------------
10
+ `lastStageRetryAttempt` | number
10
11
  `status` | [PipelineStatus](PipelineStatus.md)
11
12
  `lastRunTimestamp` | Date
12
13
  `lastStateUpdateTimestamp` | Date
@@ -26,6 +27,7 @@ import type { PipelineState } from '@knowledge-stack/ksapi'
26
27
 
27
28
  // TODO: Update the object below with actual values
28
29
  const example = {
30
+ "lastStageRetryAttempt": null,
29
31
  "status": null,
30
32
  "lastRunTimestamp": null,
31
33
  "lastStateUpdateTimestamp": null,
@@ -96,7 +96,7 @@ example().catch(console.error);
96
96
 
97
97
  Cancel Temporal Workflow Handler
98
98
 
99
- Cancel any Temporal workflow owned by the caller\&#39;s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs &#x60;&#x60;can_write&#x60;&#x60;) so it can be re-run.
99
+ Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
100
100
 
101
101
  ### Example
102
102
 
@@ -16,6 +16,7 @@ Name | Type
16
16
  `uploader` | [UserInfo](UserInfo.md)
17
17
  `status` | [PipelineStatus](PipelineStatus.md)
18
18
  `lastActivity` | string
19
+ `lastStageRetryAttempt` | number
19
20
  `error` | string
20
21
  `lastRunTimestamp` | Date
21
22
  `lastStateUpdateTimestamp` | Date
@@ -44,6 +45,7 @@ const example = {
44
45
  "uploader": null,
45
46
  "status": null,
46
47
  "lastActivity": null,
48
+ "lastStageRetryAttempt": null,
47
49
  "error": null,
48
50
  "lastRunTimestamp": null,
49
51
  "lastStateUpdateTimestamp": null,
@@ -16,6 +16,7 @@ Name | Type
16
16
  `uploader` | [UserInfo](UserInfo.md)
17
17
  `status` | [PipelineStatus](PipelineStatus.md)
18
18
  `lastActivity` | string
19
+ `lastStageRetryAttempt` | number
19
20
  `error` | string
20
21
  `lastRunTimestamp` | Date
21
22
  `lastStateUpdateTimestamp` | Date
@@ -37,6 +38,7 @@ const example = {
37
38
  "uploader": null,
38
39
  "status": null,
39
40
  "lastActivity": null,
41
+ "lastStageRetryAttempt": null,
40
42
  "error": null,
41
43
  "lastRunTimestamp": null,
42
44
  "lastStateUpdateTimestamp": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "3.18.2",
3
+ "version": "3.19.0",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -142,7 +142,7 @@ export interface SystemJobsApiInterface {
142
142
  cancelTemporalWorkflowRequestOpts(requestParameters: CancelTemporalWorkflowRequest): Promise<runtime.RequestOpts>;
143
143
 
144
144
  /**
145
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
145
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
146
146
  * @summary Cancel Temporal Workflow Handler
147
147
  * @param {string} workflowId
148
148
  * @param {*} [options] Override http request option.
@@ -152,7 +152,7 @@ export interface SystemJobsApiInterface {
152
152
  cancelTemporalWorkflowRaw(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowCancelResponse>>;
153
153
 
154
154
  /**
155
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
155
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
156
156
  * Cancel Temporal Workflow Handler
157
157
  */
158
158
  cancelTemporalWorkflow(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowCancelResponse>;
@@ -425,7 +425,7 @@ export class SystemJobsApi extends runtime.BaseAPI implements SystemJobsApiInter
425
425
  }
426
426
 
427
427
  /**
428
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
428
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
429
429
  * Cancel Temporal Workflow Handler
430
430
  */
431
431
  async cancelTemporalWorkflowRaw(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowCancelResponse>> {
@@ -436,7 +436,7 @@ export class SystemJobsApi extends runtime.BaseAPI implements SystemJobsApiInter
436
436
  }
437
437
 
438
438
  /**
439
- * Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side. A run no worker ever picked up is terminated instead, since a cancel request is itself a workflow task nobody would process. When Temporal no longer has the run, or it was terminated here, a document version still showing it running is settled as cancelled (needs ``can_write``) so it can be re-run.
439
+ * Cancel a tenant workflow; tracked ingestion also requires document write access. Tracked attempts are settled before cancelling their matching Temporal run, including attempts not yet dispatched. Unstarted executions are terminated because cancellation needs a worker. Temporal operations pin the described run so a concurrent rerun is left alone.
440
440
  * Cancel Temporal Workflow Handler
441
441
  */
442
442
  async cancelTemporalWorkflow(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowCancelResponse> {
@@ -48,6 +48,12 @@ import {
48
48
  * @interface PipelineState
49
49
  */
50
50
  export interface PipelineState {
51
+ /**
52
+ * Zero-based retry count for the current stage; maximum across fan-out activities. Managed by ingestion.
53
+ * @type {number}
54
+ * @memberof PipelineState
55
+ */
56
+ readonly lastStageRetryAttempt?: number;
51
57
  /**
52
58
  *
53
59
  * @type {PipelineStatus}
@@ -67,13 +73,13 @@ export interface PipelineState {
67
73
  */
68
74
  lastStateUpdateTimestamp?: Date | null;
69
75
  /**
70
- * Name of the last activity that executed (e.g., 'pdf_preparation_activity')
76
+ * Current ingestion stage, recorded before its activity starts
71
77
  * @type {string}
72
78
  * @memberof PipelineState
73
79
  */
74
80
  lastActivity?: string | null;
75
81
  /**
76
- * Error message if pipeline failed
82
+ * Latest stage failure; retained during retries and cleared on the next stage or success
77
83
  * @type {string}
78
84
  * @memberof PipelineState
79
85
  */
@@ -132,6 +138,10 @@ export const PipelineStatePropertyValidationAttributesMap: {
132
138
  uniqueItems?: boolean
133
139
  }
134
140
  } = {
141
+ lastStageRetryAttempt: {
142
+ minimum: 0,
143
+ exclusiveMinimum: false,
144
+ },
135
145
  }
136
146
 
137
147
 
@@ -153,6 +163,7 @@ export function PipelineStateFromJSONTyped(json: any, ignoreDiscriminator: boole
153
163
  }
154
164
  return {
155
165
 
166
+ 'lastStageRetryAttempt': json['last_stage_retry_attempt'] == null ? undefined : json['last_stage_retry_attempt'],
156
167
  'status': PipelineStatusFromJSON(json['status']),
157
168
  'lastRunTimestamp': json['last_run_timestamp'] == null ? undefined : (new Date(json['last_run_timestamp'])),
158
169
  'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
@@ -171,7 +182,7 @@ export function PipelineStateToJSON(json: any): PipelineState {
171
182
  return PipelineStateToJSONTyped(json, false);
172
183
  }
173
184
 
174
- export function PipelineStateToJSONTyped(value?: PipelineState | null, ignoreDiscriminator: boolean = false): any {
185
+ export function PipelineStateToJSONTyped(value?: Omit<PipelineState, 'last_stage_retry_attempt'> | null, ignoreDiscriminator: boolean = false): any {
175
186
  if (value == null) {
176
187
  return value;
177
188
  }
@@ -88,6 +88,12 @@ export interface WorkflowDetailResponse {
88
88
  * @memberof WorkflowDetailResponse
89
89
  */
90
90
  lastActivity?: string | null;
91
+ /**
92
+ *
93
+ * @type {number}
94
+ * @memberof WorkflowDetailResponse
95
+ */
96
+ lastStageRetryAttempt?: number;
91
97
  /**
92
98
  *
93
99
  * @type {string}
@@ -172,6 +178,10 @@ export const WorkflowDetailResponsePropertyValidationAttributesMap: {
172
178
  uniqueItems?: boolean
173
179
  }
174
180
  } = {
181
+ lastStageRetryAttempt: {
182
+ minimum: 0,
183
+ exclusiveMinimum: false,
184
+ },
175
185
  }
176
186
 
177
187
 
@@ -216,6 +226,7 @@ export function WorkflowDetailResponseFromJSONTyped(json: any, ignoreDiscriminat
216
226
  'uploader': UserInfoFromJSON(json['uploader']),
217
227
  'status': PipelineStatusFromJSON(json['status']),
218
228
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
229
+ 'lastStageRetryAttempt': json['last_stage_retry_attempt'] == null ? undefined : json['last_stage_retry_attempt'],
219
230
  'error': json['error'] == null ? undefined : json['error'],
220
231
  'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
221
232
  'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
@@ -250,6 +261,7 @@ export function WorkflowDetailResponseToJSONTyped(value?: WorkflowDetailResponse
250
261
  'uploader': UserInfoToJSON(value['uploader']),
251
262
  'status': PipelineStatusToJSON(value['status']),
252
263
  'last_activity': value['lastActivity'],
264
+ 'last_stage_retry_attempt': value['lastStageRetryAttempt'],
253
265
  'error': value['error'],
254
266
  'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
255
267
  'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),
@@ -88,6 +88,12 @@ export interface WorkflowSummaryResponse {
88
88
  * @memberof WorkflowSummaryResponse
89
89
  */
90
90
  lastActivity?: string | null;
91
+ /**
92
+ *
93
+ * @type {number}
94
+ * @memberof WorkflowSummaryResponse
95
+ */
96
+ lastStageRetryAttempt?: number;
91
97
  /**
92
98
  *
93
99
  * @type {string}
@@ -130,6 +136,10 @@ export const WorkflowSummaryResponsePropertyValidationAttributesMap: {
130
136
  uniqueItems?: boolean
131
137
  }
132
138
  } = {
139
+ lastStageRetryAttempt: {
140
+ minimum: 0,
141
+ exclusiveMinimum: false,
142
+ },
133
143
  }
134
144
 
135
145
 
@@ -169,6 +179,7 @@ export function WorkflowSummaryResponseFromJSONTyped(json: any, ignoreDiscrimina
169
179
  'uploader': UserInfoFromJSON(json['uploader']),
170
180
  'status': PipelineStatusFromJSON(json['status']),
171
181
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
182
+ 'lastStageRetryAttempt': json['last_stage_retry_attempt'] == null ? undefined : json['last_stage_retry_attempt'],
172
183
  'error': json['error'] == null ? undefined : json['error'],
173
184
  'lastRunTimestamp': (new Date(json['last_run_timestamp'])),
174
185
  'lastStateUpdateTimestamp': json['last_state_update_timestamp'] == null ? undefined : (new Date(json['last_state_update_timestamp'])),
@@ -196,6 +207,7 @@ export function WorkflowSummaryResponseToJSONTyped(value?: WorkflowSummaryRespon
196
207
  'uploader': UserInfoToJSON(value['uploader']),
197
208
  'status': PipelineStatusToJSON(value['status']),
198
209
  'last_activity': value['lastActivity'],
210
+ 'last_stage_retry_attempt': value['lastStageRetryAttempt'],
199
211
  'error': value['error'],
200
212
  'last_run_timestamp': value['lastRunTimestamp'].toISOString(),
201
213
  'last_state_update_timestamp': value['lastStateUpdateTimestamp'] == null ? value['lastStateUpdateTimestamp'] : value['lastStateUpdateTimestamp'].toISOString(),