@knowledge-stack/ksapi 1.81.0 → 1.83.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/.openapi-generator/FILES +10 -0
- package/README.md +12 -2
- package/dist/apis/WorkflowDefinitionsApi.d.ts +4 -1
- package/dist/apis/WorkflowDefinitionsApi.js +2 -0
- package/dist/apis/WorkflowRunsApi.d.ts +233 -1
- package/dist/apis/WorkflowRunsApi.js +236 -0
- package/dist/esm/apis/WorkflowDefinitionsApi.d.ts +4 -1
- package/dist/esm/apis/WorkflowDefinitionsApi.js +2 -0
- package/dist/esm/apis/WorkflowRunsApi.d.ts +233 -1
- package/dist/esm/apis/WorkflowRunsApi.js +237 -1
- package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +14 -1
- package/dist/esm/models/CreateWorkflowDefinitionRequest.js +3 -4
- package/dist/esm/models/InstructionSnapshot.d.ts +71 -0
- package/dist/esm/models/InstructionSnapshot.js +57 -0
- package/dist/esm/models/InvokeWorkflowRequest.d.ts +6 -0
- package/dist/esm/models/InvokeWorkflowRequest.js +6 -0
- package/dist/esm/models/PathPartApprovalDecision.d.ts +30 -0
- package/dist/esm/models/PathPartApprovalDecision.js +48 -0
- package/dist/esm/models/PathPartApprovalResponse.d.ts +111 -0
- package/dist/esm/models/PathPartApprovalResponse.js +85 -0
- package/dist/esm/models/RejectFileRequest.d.ts +47 -0
- package/dist/esm/models/RejectFileRequest.js +49 -0
- package/dist/esm/models/RunLockResponse.d.ts +59 -0
- package/dist/esm/models/RunLockResponse.js +52 -0
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +12 -1
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.js +2 -0
- package/dist/esm/models/WorkflowDefinitionResponse.d.ts +6 -0
- package/dist/esm/models/WorkflowDefinitionResponse.js +4 -0
- package/dist/esm/models/WorkflowRunResponse.d.ts +17 -0
- package/dist/esm/models/WorkflowRunResponse.js +8 -0
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +3 -2
- package/dist/esm/models/WorkflowRunSnapshot.js +3 -2
- package/dist/esm/models/WorkflowRunStatus.d.ts +20 -2
- package/dist/esm/models/WorkflowRunStatus.js +20 -2
- package/dist/esm/models/WorkflowRunnerType.d.ts +1 -0
- package/dist/esm/models/WorkflowRunnerType.js +2 -1
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/CreateWorkflowDefinitionRequest.d.ts +14 -1
- package/dist/models/CreateWorkflowDefinitionRequest.js +3 -4
- package/dist/models/InstructionSnapshot.d.ts +71 -0
- package/dist/models/InstructionSnapshot.js +65 -0
- package/dist/models/InvokeWorkflowRequest.d.ts +6 -0
- package/dist/models/InvokeWorkflowRequest.js +6 -0
- package/dist/models/PathPartApprovalDecision.d.ts +30 -0
- package/dist/models/PathPartApprovalDecision.js +56 -0
- package/dist/models/PathPartApprovalResponse.d.ts +111 -0
- package/dist/models/PathPartApprovalResponse.js +93 -0
- package/dist/models/RejectFileRequest.d.ts +47 -0
- package/dist/models/RejectFileRequest.js +57 -0
- package/dist/models/RunLockResponse.d.ts +59 -0
- package/dist/models/RunLockResponse.js +60 -0
- package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +12 -1
- package/dist/models/UpdateWorkflowDefinitionRequest.js +2 -0
- package/dist/models/WorkflowDefinitionResponse.d.ts +6 -0
- package/dist/models/WorkflowDefinitionResponse.js +4 -0
- package/dist/models/WorkflowRunResponse.d.ts +17 -0
- package/dist/models/WorkflowRunResponse.js +8 -0
- package/dist/models/WorkflowRunSnapshot.d.ts +3 -2
- package/dist/models/WorkflowRunSnapshot.js +3 -2
- package/dist/models/WorkflowRunStatus.d.ts +20 -2
- package/dist/models/WorkflowRunStatus.js +20 -2
- package/dist/models/WorkflowRunnerType.d.ts +1 -0
- package/dist/models/WorkflowRunnerType.js +2 -1
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/CreateWorkflowDefinitionRequest.md +3 -1
- package/docs/InstructionSnapshot.md +41 -0
- package/docs/InvokeWorkflowRequest.md +2 -0
- package/docs/PathPartApprovalDecision.md +33 -0
- package/docs/PathPartApprovalResponse.md +55 -0
- package/docs/RejectFileRequest.md +35 -0
- package/docs/RunLockResponse.md +39 -0
- package/docs/UpdateWorkflowDefinitionRequest.md +3 -1
- package/docs/WorkflowDefinitionResponse.md +2 -0
- package/docs/WorkflowDefinitionsApi.md +2 -0
- package/docs/WorkflowRunResponse.md +5 -1
- package/docs/WorkflowRunSnapshot.md +1 -1
- package/docs/WorkflowRunStatus.md +1 -1
- package/docs/WorkflowRunsApi.md +387 -0
- package/package.json +1 -1
- package/src/apis/WorkflowDefinitionsApi.ts +4 -1
- package/src/apis/WorkflowRunsApi.ts +479 -0
- package/src/models/CreateWorkflowDefinitionRequest.ts +17 -4
- package/src/models/InstructionSnapshot.ts +125 -0
- package/src/models/InvokeWorkflowRequest.ts +12 -0
- package/src/models/PathPartApprovalDecision.ts +58 -0
- package/src/models/PathPartApprovalResponse.ts +186 -0
- package/src/models/RejectFileRequest.ts +87 -0
- package/src/models/RunLockResponse.ts +101 -0
- package/src/models/UpdateWorkflowDefinitionRequest.ts +14 -1
- package/src/models/WorkflowDefinitionResponse.ts +9 -0
- package/src/models/WorkflowRunResponse.ts +23 -0
- package/src/models/WorkflowRunSnapshot.ts +11 -4
- package/src/models/WorkflowRunStatus.ts +20 -2
- package/src/models/WorkflowRunnerType.ts +2 -1
- package/src/models/index.ts +5 -0
|
@@ -0,0 +1,57 @@
|
|
|
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.RejectFileRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfRejectFileRequest = instanceOfRejectFileRequest;
|
|
18
|
+
exports.RejectFileRequestFromJSON = RejectFileRequestFromJSON;
|
|
19
|
+
exports.RejectFileRequestFromJSONTyped = RejectFileRequestFromJSONTyped;
|
|
20
|
+
exports.RejectFileRequestToJSON = RejectFileRequestToJSON;
|
|
21
|
+
exports.RejectFileRequestToJSONTyped = RejectFileRequestToJSONTyped;
|
|
22
|
+
exports.RejectFileRequestPropertyValidationAttributesMap = {
|
|
23
|
+
reason: {
|
|
24
|
+
maxLength: 2048,
|
|
25
|
+
minLength: 1,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the RejectFileRequest interface.
|
|
30
|
+
*/
|
|
31
|
+
function instanceOfRejectFileRequest(value) {
|
|
32
|
+
if (!('reason' in value) || value['reason'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
function RejectFileRequestFromJSON(json) {
|
|
37
|
+
return RejectFileRequestFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
function RejectFileRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
40
|
+
if (json == null) {
|
|
41
|
+
return json;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'reason': json['reason'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function RejectFileRequestToJSON(json) {
|
|
48
|
+
return RejectFileRequestToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function RejectFileRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'reason': value['reason'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Reviewer-lock state on a workflow run.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface RunLockResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface RunLockResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof RunLockResponse
|
|
22
|
+
*/
|
|
23
|
+
runId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof RunLockResponse
|
|
28
|
+
*/
|
|
29
|
+
lockUserId: string | null;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof RunLockResponse
|
|
34
|
+
*/
|
|
35
|
+
lockAcquiredAt: Date | null;
|
|
36
|
+
}
|
|
37
|
+
export declare const RunLockResponsePropertyValidationAttributesMap: {
|
|
38
|
+
[property: string]: {
|
|
39
|
+
maxLength?: number;
|
|
40
|
+
minLength?: number;
|
|
41
|
+
pattern?: string;
|
|
42
|
+
maximum?: number;
|
|
43
|
+
exclusiveMaximum?: boolean;
|
|
44
|
+
minimum?: number;
|
|
45
|
+
exclusiveMinimum?: boolean;
|
|
46
|
+
multipleOf?: number;
|
|
47
|
+
maxItems?: number;
|
|
48
|
+
minItems?: number;
|
|
49
|
+
uniqueItems?: boolean;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the RunLockResponse interface.
|
|
54
|
+
*/
|
|
55
|
+
export declare function instanceOfRunLockResponse(value: object): value is RunLockResponse;
|
|
56
|
+
export declare function RunLockResponseFromJSON(json: any): RunLockResponse;
|
|
57
|
+
export declare function RunLockResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RunLockResponse;
|
|
58
|
+
export declare function RunLockResponseToJSON(json: any): RunLockResponse;
|
|
59
|
+
export declare function RunLockResponseToJSONTyped(value?: RunLockResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.RunLockResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfRunLockResponse = instanceOfRunLockResponse;
|
|
18
|
+
exports.RunLockResponseFromJSON = RunLockResponseFromJSON;
|
|
19
|
+
exports.RunLockResponseFromJSONTyped = RunLockResponseFromJSONTyped;
|
|
20
|
+
exports.RunLockResponseToJSON = RunLockResponseToJSON;
|
|
21
|
+
exports.RunLockResponseToJSONTyped = RunLockResponseToJSONTyped;
|
|
22
|
+
exports.RunLockResponsePropertyValidationAttributesMap = {};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the RunLockResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfRunLockResponse(value) {
|
|
27
|
+
if (!('runId' in value) || value['runId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('lockUserId' in value) || value['lockUserId'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('lockAcquiredAt' in value) || value['lockAcquiredAt'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function RunLockResponseFromJSON(json) {
|
|
36
|
+
return RunLockResponseFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function RunLockResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'runId': json['run_id'],
|
|
44
|
+
'lockUserId': json['lock_user_id'],
|
|
45
|
+
'lockAcquiredAt': (json['lock_acquired_at'] == null ? null : new Date(json['lock_acquired_at'])),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function RunLockResponseToJSON(json) {
|
|
49
|
+
return RunLockResponseToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function RunLockResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'run_id': value['runId'],
|
|
57
|
+
'lock_user_id': value['lockUserId'],
|
|
58
|
+
'lock_acquired_at': value['lockAcquiredAt'] == null ? value['lockAcquiredAt'] : value['lockAcquiredAt'].toISOString(),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -12,7 +12,12 @@
|
|
|
12
12
|
import type { SelfHostedRunnerConfig } from './SelfHostedRunnerConfig';
|
|
13
13
|
import type { WorkflowRunnerType } from './WorkflowRunnerType';
|
|
14
14
|
/**
|
|
15
|
-
* Full replacement (PUT semantics).
|
|
15
|
+
* Full replacement (PUT semantics).
|
|
16
|
+
*
|
|
17
|
+
* ``instruction_path_part_ids``:
|
|
18
|
+
*
|
|
19
|
+
* - ``KS_INTERNAL``: must remain ``len == 1`` (the auto-provisioned doc).
|
|
20
|
+
* - ``SELF_HOSTED``: ``len ≥ 1``; callers may swap or add documents.
|
|
16
21
|
* @export
|
|
17
22
|
* @interface UpdateWorkflowDefinitionRequest
|
|
18
23
|
*/
|
|
@@ -77,6 +82,12 @@ export interface UpdateWorkflowDefinitionRequest {
|
|
|
77
82
|
* @memberof UpdateWorkflowDefinitionRequest
|
|
78
83
|
*/
|
|
79
84
|
isActive?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {boolean}
|
|
88
|
+
* @memberof UpdateWorkflowDefinitionRequest
|
|
89
|
+
*/
|
|
90
|
+
approvalRequired?: boolean;
|
|
80
91
|
}
|
|
81
92
|
export declare const UpdateWorkflowDefinitionRequestPropertyValidationAttributesMap: {
|
|
82
93
|
[property: string]: {
|
|
@@ -81,6 +81,7 @@ function UpdateWorkflowDefinitionRequestFromJSONTyped(json, ignoreDiscriminator)
|
|
|
81
81
|
'outputPathPartIds': json['output_path_part_ids'],
|
|
82
82
|
'templatePathPartId': json['template_path_part_id'] == null ? undefined : json['template_path_part_id'],
|
|
83
83
|
'isActive': json['is_active'] == null ? undefined : json['is_active'],
|
|
84
|
+
'approvalRequired': json['approval_required'] == null ? undefined : json['approval_required'],
|
|
84
85
|
};
|
|
85
86
|
}
|
|
86
87
|
function UpdateWorkflowDefinitionRequestToJSON(json) {
|
|
@@ -101,5 +102,6 @@ function UpdateWorkflowDefinitionRequestToJSONTyped(value, ignoreDiscriminator =
|
|
|
101
102
|
'output_path_part_ids': value['outputPathPartIds'],
|
|
102
103
|
'template_path_part_id': value['templatePathPartId'],
|
|
103
104
|
'is_active': value['isActive'],
|
|
105
|
+
'approval_required': value['approvalRequired'],
|
|
104
106
|
};
|
|
105
107
|
}
|
|
@@ -83,6 +83,12 @@ export interface WorkflowDefinitionResponse {
|
|
|
83
83
|
* @memberof WorkflowDefinitionResponse
|
|
84
84
|
*/
|
|
85
85
|
isActive: boolean;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {boolean}
|
|
89
|
+
* @memberof WorkflowDefinitionResponse
|
|
90
|
+
*/
|
|
91
|
+
approvalRequired: boolean;
|
|
86
92
|
/**
|
|
87
93
|
*
|
|
88
94
|
* @type {Date}
|
|
@@ -48,6 +48,8 @@ function instanceOfWorkflowDefinitionResponse(value) {
|
|
|
48
48
|
return false;
|
|
49
49
|
if (!('isActive' in value) || value['isActive'] === undefined)
|
|
50
50
|
return false;
|
|
51
|
+
if (!('approvalRequired' in value) || value['approvalRequired'] === undefined)
|
|
52
|
+
return false;
|
|
51
53
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
52
54
|
return false;
|
|
53
55
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
@@ -73,6 +75,7 @@ function WorkflowDefinitionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
73
75
|
'outputPathPartIds': json['output_path_part_ids'],
|
|
74
76
|
'templatePathPartId': json['template_path_part_id'],
|
|
75
77
|
'isActive': json['is_active'],
|
|
78
|
+
'approvalRequired': json['approval_required'],
|
|
76
79
|
'createdAt': (new Date(json['created_at'])),
|
|
77
80
|
'updatedAt': (new Date(json['updated_at'])),
|
|
78
81
|
};
|
|
@@ -96,6 +99,7 @@ function WorkflowDefinitionResponseToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
96
99
|
'output_path_part_ids': value['outputPathPartIds'],
|
|
97
100
|
'template_path_part_id': value['templatePathPartId'],
|
|
98
101
|
'is_active': value['isActive'],
|
|
102
|
+
'approval_required': value['approvalRequired'],
|
|
99
103
|
'created_at': value['createdAt'].toISOString(),
|
|
100
104
|
'updated_at': value['updatedAt'].toISOString(),
|
|
101
105
|
};
|
|
@@ -14,6 +14,11 @@ import type { WorkflowRunStatus } from './WorkflowRunStatus';
|
|
|
14
14
|
import type { WorkflowRunnerType } from './WorkflowRunnerType';
|
|
15
15
|
/**
|
|
16
16
|
* Workflow run response.
|
|
17
|
+
*
|
|
18
|
+
* Note: ``run_token_jti`` is intentionally NOT exposed. It's an
|
|
19
|
+
* internal token identifier persisted on the run row for callback
|
|
20
|
+
* auth — clients should treat run dispatch state as observable via
|
|
21
|
+
* ``status`` (RUNNING => dispatched), not via JTI presence.
|
|
17
22
|
* @export
|
|
18
23
|
* @interface WorkflowRunResponse
|
|
19
24
|
*/
|
|
@@ -72,6 +77,18 @@ export interface WorkflowRunResponse {
|
|
|
72
77
|
* @memberof WorkflowRunResponse
|
|
73
78
|
*/
|
|
74
79
|
error: string | null;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {Array<string>}
|
|
83
|
+
* @memberof WorkflowRunResponse
|
|
84
|
+
*/
|
|
85
|
+
inputPathPartIds: Array<string>;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {Array<string>}
|
|
89
|
+
* @memberof WorkflowRunResponse
|
|
90
|
+
*/
|
|
91
|
+
inputVersionIds: Array<string>;
|
|
75
92
|
/**
|
|
76
93
|
*
|
|
77
94
|
* @type {Date}
|
|
@@ -45,6 +45,10 @@ function instanceOfWorkflowRunResponse(value) {
|
|
|
45
45
|
return false;
|
|
46
46
|
if (!('error' in value) || value['error'] === undefined)
|
|
47
47
|
return false;
|
|
48
|
+
if (!('inputPathPartIds' in value) || value['inputPathPartIds'] === undefined)
|
|
49
|
+
return false;
|
|
50
|
+
if (!('inputVersionIds' in value) || value['inputVersionIds'] === undefined)
|
|
51
|
+
return false;
|
|
48
52
|
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
49
53
|
return false;
|
|
50
54
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
@@ -68,6 +72,8 @@ function WorkflowRunResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
68
72
|
'completedAt': (json['completed_at'] == null ? null : new Date(json['completed_at'])),
|
|
69
73
|
'runSnapshot': (0, WorkflowRunSnapshot_1.WorkflowRunSnapshotFromJSON)(json['run_snapshot']),
|
|
70
74
|
'error': json['error'],
|
|
75
|
+
'inputPathPartIds': json['input_path_part_ids'],
|
|
76
|
+
'inputVersionIds': json['input_version_ids'],
|
|
71
77
|
'createdAt': (new Date(json['created_at'])),
|
|
72
78
|
'updatedAt': (new Date(json['updated_at'])),
|
|
73
79
|
};
|
|
@@ -89,6 +95,8 @@ function WorkflowRunResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
89
95
|
'completed_at': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
|
|
90
96
|
'run_snapshot': (0, WorkflowRunSnapshot_1.WorkflowRunSnapshotToJSON)(value['runSnapshot']),
|
|
91
97
|
'error': value['error'],
|
|
98
|
+
'input_path_part_ids': value['inputPathPartIds'],
|
|
99
|
+
'input_version_ids': value['inputVersionIds'],
|
|
92
100
|
'created_at': value['createdAt'].toISOString(),
|
|
93
101
|
'updated_at': value['updatedAt'].toISOString(),
|
|
94
102
|
};
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ABCDPathSnapshot } from './ABCDPathSnapshot';
|
|
13
|
+
import type { InstructionSnapshot } from './InstructionSnapshot';
|
|
13
14
|
import type { WorkflowRunnerType } from './WorkflowRunnerType';
|
|
14
15
|
/**
|
|
15
16
|
* Frozen ABCD configuration captured at workflow trigger time.
|
|
@@ -55,10 +56,10 @@ export interface WorkflowRunSnapshot {
|
|
|
55
56
|
sources: Array<ABCDPathSnapshot>;
|
|
56
57
|
/**
|
|
57
58
|
*
|
|
58
|
-
* @type {Array<
|
|
59
|
+
* @type {Array<InstructionSnapshot>}
|
|
59
60
|
* @memberof WorkflowRunSnapshot
|
|
60
61
|
*/
|
|
61
|
-
instructions: Array<
|
|
62
|
+
instructions: Array<InstructionSnapshot>;
|
|
62
63
|
/**
|
|
63
64
|
*
|
|
64
65
|
* @type {Array<ABCDPathSnapshot>}
|
|
@@ -20,6 +20,7 @@ exports.WorkflowRunSnapshotFromJSONTyped = WorkflowRunSnapshotFromJSONTyped;
|
|
|
20
20
|
exports.WorkflowRunSnapshotToJSON = WorkflowRunSnapshotToJSON;
|
|
21
21
|
exports.WorkflowRunSnapshotToJSONTyped = WorkflowRunSnapshotToJSONTyped;
|
|
22
22
|
const ABCDPathSnapshot_1 = require("./ABCDPathSnapshot");
|
|
23
|
+
const InstructionSnapshot_1 = require("./InstructionSnapshot");
|
|
23
24
|
const WorkflowRunnerType_1 = require("./WorkflowRunnerType");
|
|
24
25
|
exports.WorkflowRunSnapshotPropertyValidationAttributesMap = {};
|
|
25
26
|
/**
|
|
@@ -60,7 +61,7 @@ function WorkflowRunSnapshotFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
61
|
'userId': json['user_id'],
|
|
61
62
|
'maxRunDurationSeconds': json['max_run_duration_seconds'],
|
|
62
63
|
'sources': (json['sources'].map(ABCDPathSnapshot_1.ABCDPathSnapshotFromJSON)),
|
|
63
|
-
'instructions': (json['instructions'].map(
|
|
64
|
+
'instructions': (json['instructions'].map(InstructionSnapshot_1.InstructionSnapshotFromJSON)),
|
|
64
65
|
'outputs': (json['outputs'].map(ABCDPathSnapshot_1.ABCDPathSnapshotFromJSON)),
|
|
65
66
|
'template': (0, ABCDPathSnapshot_1.ABCDPathSnapshotFromJSON)(json['template']),
|
|
66
67
|
};
|
|
@@ -79,7 +80,7 @@ function WorkflowRunSnapshotToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
79
80
|
'user_id': value['userId'],
|
|
80
81
|
'max_run_duration_seconds': value['maxRunDurationSeconds'],
|
|
81
82
|
'sources': (value['sources'].map(ABCDPathSnapshot_1.ABCDPathSnapshotToJSON)),
|
|
82
|
-
'instructions': (value['instructions'].map(
|
|
83
|
+
'instructions': (value['instructions'].map(InstructionSnapshot_1.InstructionSnapshotToJSON)),
|
|
83
84
|
'outputs': (value['outputs'].map(ABCDPathSnapshot_1.ABCDPathSnapshotToJSON)),
|
|
84
85
|
'template': (0, ABCDPathSnapshot_1.ABCDPathSnapshotToJSON)(value['template']),
|
|
85
86
|
};
|
|
@@ -10,13 +10,31 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Combined lifecycle + approval-rollup status of a workflow run.
|
|
14
|
+
*
|
|
15
|
+
* Absorbs the prior split between ``status`` (PENDING/RUNNING/COMPLETED/
|
|
16
|
+
* FAILED) and ``approval_state`` (in_progress/awaiting_review/approved/
|
|
17
|
+
* rejected/failed). One state field per run.
|
|
18
|
+
*
|
|
19
|
+
* Allowed transitions::
|
|
20
|
+
*
|
|
21
|
+
* PENDING -> IN_PROGRESS (agent dispatched)
|
|
22
|
+
* IN_PROGRESS -> COMPLETED (workflow.approval_required=FALSE)
|
|
23
|
+
* IN_PROGRESS -> NEEDS_APPROVAL (workflow.approval_required=TRUE, agent done)
|
|
24
|
+
* NEEDS_APPROVAL -> APPROVED (run folder approved by reviewer)
|
|
25
|
+
* NEEDS_APPROVAL -> REJECTED (run folder or any child rejected)
|
|
26
|
+
* APPROVED -> NEEDS_APPROVAL (run folder unapproved)
|
|
27
|
+
* REJECTED -> NEEDS_APPROVAL (rejection reversed; mutable)
|
|
28
|
+
* any non-terminal -> FAILED (agent error)
|
|
14
29
|
* @export
|
|
15
30
|
*/
|
|
16
31
|
export declare const WorkflowRunStatus: {
|
|
17
32
|
readonly Pending: "PENDING";
|
|
18
|
-
readonly
|
|
33
|
+
readonly InProgress: "IN_PROGRESS";
|
|
19
34
|
readonly Completed: "COMPLETED";
|
|
35
|
+
readonly NeedsApproval: "NEEDS_APPROVAL";
|
|
36
|
+
readonly Approved: "APPROVED";
|
|
37
|
+
readonly Rejected: "REJECTED";
|
|
20
38
|
readonly Failed: "FAILED";
|
|
21
39
|
};
|
|
22
40
|
export type WorkflowRunStatus = typeof WorkflowRunStatus[keyof typeof WorkflowRunStatus];
|
|
@@ -20,13 +20,31 @@ exports.WorkflowRunStatusFromJSONTyped = WorkflowRunStatusFromJSONTyped;
|
|
|
20
20
|
exports.WorkflowRunStatusToJSON = WorkflowRunStatusToJSON;
|
|
21
21
|
exports.WorkflowRunStatusToJSONTyped = WorkflowRunStatusToJSONTyped;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Combined lifecycle + approval-rollup status of a workflow run.
|
|
24
|
+
*
|
|
25
|
+
* Absorbs the prior split between ``status`` (PENDING/RUNNING/COMPLETED/
|
|
26
|
+
* FAILED) and ``approval_state`` (in_progress/awaiting_review/approved/
|
|
27
|
+
* rejected/failed). One state field per run.
|
|
28
|
+
*
|
|
29
|
+
* Allowed transitions::
|
|
30
|
+
*
|
|
31
|
+
* PENDING -> IN_PROGRESS (agent dispatched)
|
|
32
|
+
* IN_PROGRESS -> COMPLETED (workflow.approval_required=FALSE)
|
|
33
|
+
* IN_PROGRESS -> NEEDS_APPROVAL (workflow.approval_required=TRUE, agent done)
|
|
34
|
+
* NEEDS_APPROVAL -> APPROVED (run folder approved by reviewer)
|
|
35
|
+
* NEEDS_APPROVAL -> REJECTED (run folder or any child rejected)
|
|
36
|
+
* APPROVED -> NEEDS_APPROVAL (run folder unapproved)
|
|
37
|
+
* REJECTED -> NEEDS_APPROVAL (rejection reversed; mutable)
|
|
38
|
+
* any non-terminal -> FAILED (agent error)
|
|
24
39
|
* @export
|
|
25
40
|
*/
|
|
26
41
|
exports.WorkflowRunStatus = {
|
|
27
42
|
Pending: 'PENDING',
|
|
28
|
-
|
|
43
|
+
InProgress: 'IN_PROGRESS',
|
|
29
44
|
Completed: 'COMPLETED',
|
|
45
|
+
NeedsApproval: 'NEEDS_APPROVAL',
|
|
46
|
+
Approved: 'APPROVED',
|
|
47
|
+
Rejected: 'REJECTED',
|
|
30
48
|
Failed: 'FAILED'
|
|
31
49
|
};
|
|
32
50
|
function instanceOfWorkflowRunStatus(value) {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const WorkflowRunnerType: {
|
|
17
17
|
readonly SelfHosted: "SELF_HOSTED";
|
|
18
|
+
readonly KsInternal: "KS_INTERNAL";
|
|
18
19
|
};
|
|
19
20
|
export type WorkflowRunnerType = typeof WorkflowRunnerType[keyof typeof WorkflowRunnerType];
|
|
20
21
|
export declare function instanceOfWorkflowRunnerType(value: any): boolean;
|
|
@@ -24,7 +24,8 @@ exports.WorkflowRunnerTypeToJSONTyped = WorkflowRunnerTypeToJSONTyped;
|
|
|
24
24
|
* @export
|
|
25
25
|
*/
|
|
26
26
|
exports.WorkflowRunnerType = {
|
|
27
|
-
SelfHosted: 'SELF_HOSTED'
|
|
27
|
+
SelfHosted: 'SELF_HOSTED',
|
|
28
|
+
KsInternal: 'KS_INTERNAL'
|
|
28
29
|
};
|
|
29
30
|
function instanceOfWorkflowRunnerType(value) {
|
|
30
31
|
for (const key in exports.WorkflowRunnerType) {
|
package/dist/models/index.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export * from './ImageTaxonomy';
|
|
|
74
74
|
export * from './InformationStatistics';
|
|
75
75
|
export * from './IngestDocumentResponse';
|
|
76
76
|
export * from './IngestionMode';
|
|
77
|
+
export * from './InstructionSnapshot';
|
|
77
78
|
export * from './InviteLinkSettingsRequest';
|
|
78
79
|
export * from './InviteLinkSettingsResponse';
|
|
79
80
|
export * from './InviteResponse';
|
|
@@ -115,6 +116,8 @@ export * from './PasswordResetRequest';
|
|
|
115
116
|
export * from './PasswordResetWithTokenRequest';
|
|
116
117
|
export * from './PathOrder';
|
|
117
118
|
export * from './PathPartAncestorItem';
|
|
119
|
+
export * from './PathPartApprovalDecision';
|
|
120
|
+
export * from './PathPartApprovalResponse';
|
|
118
121
|
export * from './PathPartResponse';
|
|
119
122
|
export * from './PathPartTagsResponse';
|
|
120
123
|
export * from './PermissionCapability';
|
|
@@ -124,9 +127,11 @@ export * from './PipelineStatus';
|
|
|
124
127
|
export * from './Polygon';
|
|
125
128
|
export * from './PolygonReference';
|
|
126
129
|
export * from './ReferenceType';
|
|
130
|
+
export * from './RejectFileRequest';
|
|
127
131
|
export * from './ResolvedReferenceInput';
|
|
128
132
|
export * from './ResolvedReferenceOutput';
|
|
129
133
|
export * from './RootResponse';
|
|
134
|
+
export * from './RunLockResponse';
|
|
130
135
|
export * from './SSOInitiateResponse';
|
|
131
136
|
export * from './ScoredChunkResponse';
|
|
132
137
|
export * from './SearchSortOrder';
|
package/dist/models/index.js
CHANGED
|
@@ -92,6 +92,7 @@ __exportStar(require("./ImageTaxonomy"), exports);
|
|
|
92
92
|
__exportStar(require("./InformationStatistics"), exports);
|
|
93
93
|
__exportStar(require("./IngestDocumentResponse"), exports);
|
|
94
94
|
__exportStar(require("./IngestionMode"), exports);
|
|
95
|
+
__exportStar(require("./InstructionSnapshot"), exports);
|
|
95
96
|
__exportStar(require("./InviteLinkSettingsRequest"), exports);
|
|
96
97
|
__exportStar(require("./InviteLinkSettingsResponse"), exports);
|
|
97
98
|
__exportStar(require("./InviteResponse"), exports);
|
|
@@ -133,6 +134,8 @@ __exportStar(require("./PasswordResetRequest"), exports);
|
|
|
133
134
|
__exportStar(require("./PasswordResetWithTokenRequest"), exports);
|
|
134
135
|
__exportStar(require("./PathOrder"), exports);
|
|
135
136
|
__exportStar(require("./PathPartAncestorItem"), exports);
|
|
137
|
+
__exportStar(require("./PathPartApprovalDecision"), exports);
|
|
138
|
+
__exportStar(require("./PathPartApprovalResponse"), exports);
|
|
136
139
|
__exportStar(require("./PathPartResponse"), exports);
|
|
137
140
|
__exportStar(require("./PathPartTagsResponse"), exports);
|
|
138
141
|
__exportStar(require("./PermissionCapability"), exports);
|
|
@@ -142,9 +145,11 @@ __exportStar(require("./PipelineStatus"), exports);
|
|
|
142
145
|
__exportStar(require("./Polygon"), exports);
|
|
143
146
|
__exportStar(require("./PolygonReference"), exports);
|
|
144
147
|
__exportStar(require("./ReferenceType"), exports);
|
|
148
|
+
__exportStar(require("./RejectFileRequest"), exports);
|
|
145
149
|
__exportStar(require("./ResolvedReferenceInput"), exports);
|
|
146
150
|
__exportStar(require("./ResolvedReferenceOutput"), exports);
|
|
147
151
|
__exportStar(require("./RootResponse"), exports);
|
|
152
|
+
__exportStar(require("./RunLockResponse"), exports);
|
|
148
153
|
__exportStar(require("./SSOInitiateResponse"), exports);
|
|
149
154
|
__exportStar(require("./ScoredChunkResponse"), exports);
|
|
150
155
|
__exportStar(require("./SearchSortOrder"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
# CreateWorkflowDefinitionRequest
|
|
3
3
|
|
|
4
|
-
Create a new workflow definition.
|
|
4
|
+
Create a new workflow definition. ``instruction_path_part_ids`` semantics depend on ``runner_type``: - ``KS_INTERNAL``: must be empty (``[]``); the server auto-provisions a single ``instruction.md`` and stores ``[doc.path_part_id]``. - ``SELF_HOSTED``: caller-supplied list of one-or-more document PathPart IDs. Must contain at least one entry.
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
@@ -16,6 +16,7 @@ Name | Type
|
|
|
16
16
|
`instructionPathPartIds` | Array<string>
|
|
17
17
|
`outputPathPartIds` | Array<string>
|
|
18
18
|
`templatePathPartId` | string
|
|
19
|
+
`approvalRequired` | boolean
|
|
19
20
|
|
|
20
21
|
## Example
|
|
21
22
|
|
|
@@ -33,6 +34,7 @@ const example = {
|
|
|
33
34
|
"instructionPathPartIds": null,
|
|
34
35
|
"outputPathPartIds": null,
|
|
35
36
|
"templatePathPartId": null,
|
|
37
|
+
"approvalRequired": null,
|
|
36
38
|
} satisfies CreateWorkflowDefinitionRequest
|
|
37
39
|
|
|
38
40
|
console.log(example)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# InstructionSnapshot
|
|
3
|
+
|
|
4
|
+
Snapshot of one instruction document, pinned at trigger time. The instruction file is the workflow\'s **contract**: the agent reads this exact ``document_version_id`` for the duration of the run, even if the document is edited mid-flight or after the run completes. Reproducibility and audit replay depend on this pinning.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`pathPartId` | string
|
|
11
|
+
`materializedPath` | string
|
|
12
|
+
`partType` | [PartType](PartType.md)
|
|
13
|
+
`documentVersionId` | string
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { InstructionSnapshot } from '@knowledge-stack/ksapi'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"pathPartId": null,
|
|
23
|
+
"materializedPath": null,
|
|
24
|
+
"partType": null,
|
|
25
|
+
"documentVersionId": null,
|
|
26
|
+
} satisfies InstructionSnapshot
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as InstructionSnapshot
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
|
@@ -8,6 +8,7 @@ Request body for invoking a workflow definition.
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`idempotencyKey` | string
|
|
11
|
+
`inputPathPartIds` | Array<string>
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -17,6 +18,7 @@ import type { InvokeWorkflowRequest } from '@knowledge-stack/ksapi'
|
|
|
17
18
|
// TODO: Update the object below with actual values
|
|
18
19
|
const example = {
|
|
19
20
|
"idempotencyKey": null,
|
|
21
|
+
"inputPathPartIds": null,
|
|
20
22
|
} satisfies InvokeWorkflowRequest
|
|
21
23
|
|
|
22
24
|
console.log(example)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# PathPartApprovalDecision
|
|
3
|
+
|
|
4
|
+
Per-file review status within a run (SeaHonor pilot). Now retained as the audit-history record (one row per (run, file)); the current state of truth is ``path_part.approval_state``. The service dual-writes both.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PathPartApprovalDecision } from '@knowledge-stack/ksapi'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies PathPartApprovalDecision
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as PathPartApprovalDecision
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|