@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.
Files changed (97) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +12 -2
  3. package/dist/apis/WorkflowDefinitionsApi.d.ts +4 -1
  4. package/dist/apis/WorkflowDefinitionsApi.js +2 -0
  5. package/dist/apis/WorkflowRunsApi.d.ts +233 -1
  6. package/dist/apis/WorkflowRunsApi.js +236 -0
  7. package/dist/esm/apis/WorkflowDefinitionsApi.d.ts +4 -1
  8. package/dist/esm/apis/WorkflowDefinitionsApi.js +2 -0
  9. package/dist/esm/apis/WorkflowRunsApi.d.ts +233 -1
  10. package/dist/esm/apis/WorkflowRunsApi.js +237 -1
  11. package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +14 -1
  12. package/dist/esm/models/CreateWorkflowDefinitionRequest.js +3 -4
  13. package/dist/esm/models/InstructionSnapshot.d.ts +71 -0
  14. package/dist/esm/models/InstructionSnapshot.js +57 -0
  15. package/dist/esm/models/InvokeWorkflowRequest.d.ts +6 -0
  16. package/dist/esm/models/InvokeWorkflowRequest.js +6 -0
  17. package/dist/esm/models/PathPartApprovalDecision.d.ts +30 -0
  18. package/dist/esm/models/PathPartApprovalDecision.js +48 -0
  19. package/dist/esm/models/PathPartApprovalResponse.d.ts +111 -0
  20. package/dist/esm/models/PathPartApprovalResponse.js +85 -0
  21. package/dist/esm/models/RejectFileRequest.d.ts +47 -0
  22. package/dist/esm/models/RejectFileRequest.js +49 -0
  23. package/dist/esm/models/RunLockResponse.d.ts +59 -0
  24. package/dist/esm/models/RunLockResponse.js +52 -0
  25. package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +12 -1
  26. package/dist/esm/models/UpdateWorkflowDefinitionRequest.js +2 -0
  27. package/dist/esm/models/WorkflowDefinitionResponse.d.ts +6 -0
  28. package/dist/esm/models/WorkflowDefinitionResponse.js +4 -0
  29. package/dist/esm/models/WorkflowRunResponse.d.ts +17 -0
  30. package/dist/esm/models/WorkflowRunResponse.js +8 -0
  31. package/dist/esm/models/WorkflowRunSnapshot.d.ts +3 -2
  32. package/dist/esm/models/WorkflowRunSnapshot.js +3 -2
  33. package/dist/esm/models/WorkflowRunStatus.d.ts +20 -2
  34. package/dist/esm/models/WorkflowRunStatus.js +20 -2
  35. package/dist/esm/models/WorkflowRunnerType.d.ts +1 -0
  36. package/dist/esm/models/WorkflowRunnerType.js +2 -1
  37. package/dist/esm/models/index.d.ts +5 -0
  38. package/dist/esm/models/index.js +5 -0
  39. package/dist/models/CreateWorkflowDefinitionRequest.d.ts +14 -1
  40. package/dist/models/CreateWorkflowDefinitionRequest.js +3 -4
  41. package/dist/models/InstructionSnapshot.d.ts +71 -0
  42. package/dist/models/InstructionSnapshot.js +65 -0
  43. package/dist/models/InvokeWorkflowRequest.d.ts +6 -0
  44. package/dist/models/InvokeWorkflowRequest.js +6 -0
  45. package/dist/models/PathPartApprovalDecision.d.ts +30 -0
  46. package/dist/models/PathPartApprovalDecision.js +56 -0
  47. package/dist/models/PathPartApprovalResponse.d.ts +111 -0
  48. package/dist/models/PathPartApprovalResponse.js +93 -0
  49. package/dist/models/RejectFileRequest.d.ts +47 -0
  50. package/dist/models/RejectFileRequest.js +57 -0
  51. package/dist/models/RunLockResponse.d.ts +59 -0
  52. package/dist/models/RunLockResponse.js +60 -0
  53. package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +12 -1
  54. package/dist/models/UpdateWorkflowDefinitionRequest.js +2 -0
  55. package/dist/models/WorkflowDefinitionResponse.d.ts +6 -0
  56. package/dist/models/WorkflowDefinitionResponse.js +4 -0
  57. package/dist/models/WorkflowRunResponse.d.ts +17 -0
  58. package/dist/models/WorkflowRunResponse.js +8 -0
  59. package/dist/models/WorkflowRunSnapshot.d.ts +3 -2
  60. package/dist/models/WorkflowRunSnapshot.js +3 -2
  61. package/dist/models/WorkflowRunStatus.d.ts +20 -2
  62. package/dist/models/WorkflowRunStatus.js +20 -2
  63. package/dist/models/WorkflowRunnerType.d.ts +1 -0
  64. package/dist/models/WorkflowRunnerType.js +2 -1
  65. package/dist/models/index.d.ts +5 -0
  66. package/dist/models/index.js +5 -0
  67. package/docs/CreateWorkflowDefinitionRequest.md +3 -1
  68. package/docs/InstructionSnapshot.md +41 -0
  69. package/docs/InvokeWorkflowRequest.md +2 -0
  70. package/docs/PathPartApprovalDecision.md +33 -0
  71. package/docs/PathPartApprovalResponse.md +55 -0
  72. package/docs/RejectFileRequest.md +35 -0
  73. package/docs/RunLockResponse.md +39 -0
  74. package/docs/UpdateWorkflowDefinitionRequest.md +3 -1
  75. package/docs/WorkflowDefinitionResponse.md +2 -0
  76. package/docs/WorkflowDefinitionsApi.md +2 -0
  77. package/docs/WorkflowRunResponse.md +5 -1
  78. package/docs/WorkflowRunSnapshot.md +1 -1
  79. package/docs/WorkflowRunStatus.md +1 -1
  80. package/docs/WorkflowRunsApi.md +387 -0
  81. package/package.json +1 -1
  82. package/src/apis/WorkflowDefinitionsApi.ts +4 -1
  83. package/src/apis/WorkflowRunsApi.ts +479 -0
  84. package/src/models/CreateWorkflowDefinitionRequest.ts +17 -4
  85. package/src/models/InstructionSnapshot.ts +125 -0
  86. package/src/models/InvokeWorkflowRequest.ts +12 -0
  87. package/src/models/PathPartApprovalDecision.ts +58 -0
  88. package/src/models/PathPartApprovalResponse.ts +186 -0
  89. package/src/models/RejectFileRequest.ts +87 -0
  90. package/src/models/RunLockResponse.ts +101 -0
  91. package/src/models/UpdateWorkflowDefinitionRequest.ts +14 -1
  92. package/src/models/WorkflowDefinitionResponse.ts +9 -0
  93. package/src/models/WorkflowRunResponse.ts +23 -0
  94. package/src/models/WorkflowRunSnapshot.ts +11 -4
  95. package/src/models/WorkflowRunStatus.ts +20 -2
  96. package/src/models/WorkflowRunnerType.ts +2 -1
  97. package/src/models/index.ts +5 -0
@@ -0,0 +1,111 @@
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 { PathPartApprovalDecision } from './PathPartApprovalDecision';
13
+ /**
14
+ * Approval audit-history row over any path_part (file or folder).
15
+ *
16
+ * ``run_id`` is optional — None when the path_part was approved directly
17
+ * without a workflow-run context.
18
+ * @export
19
+ * @interface PathPartApprovalResponse
20
+ */
21
+ export interface PathPartApprovalResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof PathPartApprovalResponse
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof PathPartApprovalResponse
32
+ */
33
+ runId: string | null;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof PathPartApprovalResponse
38
+ */
39
+ pathPartId: string;
40
+ /**
41
+ *
42
+ * @type {PathPartApprovalDecision}
43
+ * @memberof PathPartApprovalResponse
44
+ */
45
+ status: PathPartApprovalDecision;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof PathPartApprovalResponse
50
+ */
51
+ reviewerId: string | null;
52
+ /**
53
+ *
54
+ * @type {Date}
55
+ * @memberof PathPartApprovalResponse
56
+ */
57
+ reviewedAt: Date | null;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof PathPartApprovalResponse
62
+ */
63
+ rejectionReason: string | null;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof PathPartApprovalResponse
68
+ */
69
+ unapprovedBy: string | null;
70
+ /**
71
+ *
72
+ * @type {Date}
73
+ * @memberof PathPartApprovalResponse
74
+ */
75
+ unapprovedAt: Date | null;
76
+ /**
77
+ *
78
+ * @type {Date}
79
+ * @memberof PathPartApprovalResponse
80
+ */
81
+ createdAt: Date;
82
+ /**
83
+ *
84
+ * @type {Date}
85
+ * @memberof PathPartApprovalResponse
86
+ */
87
+ updatedAt: Date;
88
+ }
89
+ export declare const PathPartApprovalResponsePropertyValidationAttributesMap: {
90
+ [property: string]: {
91
+ maxLength?: number;
92
+ minLength?: number;
93
+ pattern?: string;
94
+ maximum?: number;
95
+ exclusiveMaximum?: boolean;
96
+ minimum?: number;
97
+ exclusiveMinimum?: boolean;
98
+ multipleOf?: number;
99
+ maxItems?: number;
100
+ minItems?: number;
101
+ uniqueItems?: boolean;
102
+ };
103
+ };
104
+ /**
105
+ * Check if a given object implements the PathPartApprovalResponse interface.
106
+ */
107
+ export declare function instanceOfPathPartApprovalResponse(value: object): value is PathPartApprovalResponse;
108
+ export declare function PathPartApprovalResponseFromJSON(json: any): PathPartApprovalResponse;
109
+ export declare function PathPartApprovalResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PathPartApprovalResponse;
110
+ export declare function PathPartApprovalResponseToJSON(json: any): PathPartApprovalResponse;
111
+ export declare function PathPartApprovalResponseToJSONTyped(value?: PathPartApprovalResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,85 @@
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 { PathPartApprovalDecisionFromJSON, PathPartApprovalDecisionToJSON, } from './PathPartApprovalDecision';
15
+ export const PathPartApprovalResponsePropertyValidationAttributesMap = {};
16
+ /**
17
+ * Check if a given object implements the PathPartApprovalResponse interface.
18
+ */
19
+ export function instanceOfPathPartApprovalResponse(value) {
20
+ if (!('id' in value) || value['id'] === undefined)
21
+ return false;
22
+ if (!('runId' in value) || value['runId'] === undefined)
23
+ return false;
24
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
25
+ return false;
26
+ if (!('status' in value) || value['status'] === undefined)
27
+ return false;
28
+ if (!('reviewerId' in value) || value['reviewerId'] === undefined)
29
+ return false;
30
+ if (!('reviewedAt' in value) || value['reviewedAt'] === undefined)
31
+ return false;
32
+ if (!('rejectionReason' in value) || value['rejectionReason'] === undefined)
33
+ return false;
34
+ if (!('unapprovedBy' in value) || value['unapprovedBy'] === undefined)
35
+ return false;
36
+ if (!('unapprovedAt' in value) || value['unapprovedAt'] === undefined)
37
+ return false;
38
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
39
+ return false;
40
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
41
+ return false;
42
+ return true;
43
+ }
44
+ export function PathPartApprovalResponseFromJSON(json) {
45
+ return PathPartApprovalResponseFromJSONTyped(json, false);
46
+ }
47
+ export function PathPartApprovalResponseFromJSONTyped(json, ignoreDiscriminator) {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+ 'id': json['id'],
53
+ 'runId': json['run_id'],
54
+ 'pathPartId': json['path_part_id'],
55
+ 'status': PathPartApprovalDecisionFromJSON(json['status']),
56
+ 'reviewerId': json['reviewer_id'],
57
+ 'reviewedAt': (json['reviewed_at'] == null ? null : new Date(json['reviewed_at'])),
58
+ 'rejectionReason': json['rejection_reason'],
59
+ 'unapprovedBy': json['unapproved_by'],
60
+ 'unapprovedAt': (json['unapproved_at'] == null ? null : new Date(json['unapproved_at'])),
61
+ 'createdAt': (new Date(json['created_at'])),
62
+ 'updatedAt': (new Date(json['updated_at'])),
63
+ };
64
+ }
65
+ export function PathPartApprovalResponseToJSON(json) {
66
+ return PathPartApprovalResponseToJSONTyped(json, false);
67
+ }
68
+ export function PathPartApprovalResponseToJSONTyped(value, ignoreDiscriminator = false) {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+ return {
73
+ 'id': value['id'],
74
+ 'run_id': value['runId'],
75
+ 'path_part_id': value['pathPartId'],
76
+ 'status': PathPartApprovalDecisionToJSON(value['status']),
77
+ 'reviewer_id': value['reviewerId'],
78
+ 'reviewed_at': value['reviewedAt'] == null ? value['reviewedAt'] : value['reviewedAt'].toISOString(),
79
+ 'rejection_reason': value['rejectionReason'],
80
+ 'unapproved_by': value['unapprovedBy'],
81
+ 'unapproved_at': value['unapprovedAt'] == null ? value['unapprovedAt'] : value['unapprovedAt'].toISOString(),
82
+ 'created_at': value['createdAt'].toISOString(),
83
+ 'updated_at': value['updatedAt'].toISOString(),
84
+ };
85
+ }
@@ -0,0 +1,47 @@
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
+ * Body for ``POST /workflow-runs/{run}/files/{file}/reject``.
14
+ * @export
15
+ * @interface RejectFileRequest
16
+ */
17
+ export interface RejectFileRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof RejectFileRequest
22
+ */
23
+ reason: string;
24
+ }
25
+ export declare const RejectFileRequestPropertyValidationAttributesMap: {
26
+ [property: string]: {
27
+ maxLength?: number;
28
+ minLength?: number;
29
+ pattern?: string;
30
+ maximum?: number;
31
+ exclusiveMaximum?: boolean;
32
+ minimum?: number;
33
+ exclusiveMinimum?: boolean;
34
+ multipleOf?: number;
35
+ maxItems?: number;
36
+ minItems?: number;
37
+ uniqueItems?: boolean;
38
+ };
39
+ };
40
+ /**
41
+ * Check if a given object implements the RejectFileRequest interface.
42
+ */
43
+ export declare function instanceOfRejectFileRequest(value: object): value is RejectFileRequest;
44
+ export declare function RejectFileRequestFromJSON(json: any): RejectFileRequest;
45
+ export declare function RejectFileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RejectFileRequest;
46
+ export declare function RejectFileRequestToJSON(json: any): RejectFileRequest;
47
+ export declare function RejectFileRequestToJSONTyped(value?: RejectFileRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
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
+ export const RejectFileRequestPropertyValidationAttributesMap = {
15
+ reason: {
16
+ maxLength: 2048,
17
+ minLength: 1,
18
+ },
19
+ };
20
+ /**
21
+ * Check if a given object implements the RejectFileRequest interface.
22
+ */
23
+ export function instanceOfRejectFileRequest(value) {
24
+ if (!('reason' in value) || value['reason'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function RejectFileRequestFromJSON(json) {
29
+ return RejectFileRequestFromJSONTyped(json, false);
30
+ }
31
+ export function RejectFileRequestFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'reason': json['reason'],
37
+ };
38
+ }
39
+ export function RejectFileRequestToJSON(json) {
40
+ return RejectFileRequestToJSONTyped(json, false);
41
+ }
42
+ export function RejectFileRequestToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'reason': value['reason'],
48
+ };
49
+ }
@@ -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,52 @@
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
+ export const RunLockResponsePropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the RunLockResponse interface.
17
+ */
18
+ export function instanceOfRunLockResponse(value) {
19
+ if (!('runId' in value) || value['runId'] === undefined)
20
+ return false;
21
+ if (!('lockUserId' in value) || value['lockUserId'] === undefined)
22
+ return false;
23
+ if (!('lockAcquiredAt' in value) || value['lockAcquiredAt'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ export function RunLockResponseFromJSON(json) {
28
+ return RunLockResponseFromJSONTyped(json, false);
29
+ }
30
+ export function RunLockResponseFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'runId': json['run_id'],
36
+ 'lockUserId': json['lock_user_id'],
37
+ 'lockAcquiredAt': (json['lock_acquired_at'] == null ? null : new Date(json['lock_acquired_at'])),
38
+ };
39
+ }
40
+ export function RunLockResponseToJSON(json) {
41
+ return RunLockResponseToJSONTyped(json, false);
42
+ }
43
+ export function RunLockResponseToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'run_id': value['runId'],
49
+ 'lock_user_id': value['lockUserId'],
50
+ 'lock_acquired_at': value['lockAcquiredAt'] == null ? value['lockAcquiredAt'] : value['lockAcquiredAt'].toISOString(),
51
+ };
52
+ }
@@ -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). All fields are required.
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]: {
@@ -73,6 +73,7 @@ export function UpdateWorkflowDefinitionRequestFromJSONTyped(json, ignoreDiscrim
73
73
  'outputPathPartIds': json['output_path_part_ids'],
74
74
  'templatePathPartId': json['template_path_part_id'] == null ? undefined : json['template_path_part_id'],
75
75
  'isActive': json['is_active'] == null ? undefined : json['is_active'],
76
+ 'approvalRequired': json['approval_required'] == null ? undefined : json['approval_required'],
76
77
  };
77
78
  }
78
79
  export function UpdateWorkflowDefinitionRequestToJSON(json) {
@@ -93,5 +94,6 @@ export function UpdateWorkflowDefinitionRequestToJSONTyped(value, ignoreDiscrimi
93
94
  'output_path_part_ids': value['outputPathPartIds'],
94
95
  'template_path_part_id': value['templatePathPartId'],
95
96
  'is_active': value['isActive'],
97
+ 'approval_required': value['approvalRequired'],
96
98
  };
97
99
  }
@@ -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}
@@ -40,6 +40,8 @@ export function instanceOfWorkflowDefinitionResponse(value) {
40
40
  return false;
41
41
  if (!('isActive' in value) || value['isActive'] === undefined)
42
42
  return false;
43
+ if (!('approvalRequired' in value) || value['approvalRequired'] === undefined)
44
+ return false;
43
45
  if (!('createdAt' in value) || value['createdAt'] === undefined)
44
46
  return false;
45
47
  if (!('updatedAt' in value) || value['updatedAt'] === undefined)
@@ -65,6 +67,7 @@ export function WorkflowDefinitionResponseFromJSONTyped(json, ignoreDiscriminato
65
67
  'outputPathPartIds': json['output_path_part_ids'],
66
68
  'templatePathPartId': json['template_path_part_id'],
67
69
  'isActive': json['is_active'],
70
+ 'approvalRequired': json['approval_required'],
68
71
  'createdAt': (new Date(json['created_at'])),
69
72
  'updatedAt': (new Date(json['updated_at'])),
70
73
  };
@@ -88,6 +91,7 @@ export function WorkflowDefinitionResponseToJSONTyped(value, ignoreDiscriminator
88
91
  'output_path_part_ids': value['outputPathPartIds'],
89
92
  'template_path_part_id': value['templatePathPartId'],
90
93
  'is_active': value['isActive'],
94
+ 'approval_required': value['approvalRequired'],
91
95
  'created_at': value['createdAt'].toISOString(),
92
96
  'updated_at': value['updatedAt'].toISOString(),
93
97
  };
@@ -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}
@@ -37,6 +37,10 @@ export function instanceOfWorkflowRunResponse(value) {
37
37
  return false;
38
38
  if (!('error' in value) || value['error'] === undefined)
39
39
  return false;
40
+ if (!('inputPathPartIds' in value) || value['inputPathPartIds'] === undefined)
41
+ return false;
42
+ if (!('inputVersionIds' in value) || value['inputVersionIds'] === undefined)
43
+ return false;
40
44
  if (!('createdAt' in value) || value['createdAt'] === undefined)
41
45
  return false;
42
46
  if (!('updatedAt' in value) || value['updatedAt'] === undefined)
@@ -60,6 +64,8 @@ export function WorkflowRunResponseFromJSONTyped(json, ignoreDiscriminator) {
60
64
  'completedAt': (json['completed_at'] == null ? null : new Date(json['completed_at'])),
61
65
  'runSnapshot': WorkflowRunSnapshotFromJSON(json['run_snapshot']),
62
66
  'error': json['error'],
67
+ 'inputPathPartIds': json['input_path_part_ids'],
68
+ 'inputVersionIds': json['input_version_ids'],
63
69
  'createdAt': (new Date(json['created_at'])),
64
70
  'updatedAt': (new Date(json['updated_at'])),
65
71
  };
@@ -81,6 +87,8 @@ export function WorkflowRunResponseToJSONTyped(value, ignoreDiscriminator = fals
81
87
  'completed_at': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
82
88
  'run_snapshot': WorkflowRunSnapshotToJSON(value['runSnapshot']),
83
89
  'error': value['error'],
90
+ 'input_path_part_ids': value['inputPathPartIds'],
91
+ 'input_version_ids': value['inputVersionIds'],
84
92
  'created_at': value['createdAt'].toISOString(),
85
93
  'updated_at': value['updatedAt'].toISOString(),
86
94
  };
@@ -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<ABCDPathSnapshot>}
59
+ * @type {Array<InstructionSnapshot>}
59
60
  * @memberof WorkflowRunSnapshot
60
61
  */
61
- instructions: Array<ABCDPathSnapshot>;
62
+ instructions: Array<InstructionSnapshot>;
62
63
  /**
63
64
  *
64
65
  * @type {Array<ABCDPathSnapshot>}
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { ABCDPathSnapshotFromJSON, ABCDPathSnapshotToJSON, } from './ABCDPathSnapshot';
15
+ import { InstructionSnapshotFromJSON, InstructionSnapshotToJSON, } from './InstructionSnapshot';
15
16
  import { WorkflowRunnerTypeFromJSON, WorkflowRunnerTypeToJSON, } from './WorkflowRunnerType';
16
17
  export const WorkflowRunSnapshotPropertyValidationAttributesMap = {};
17
18
  /**
@@ -52,7 +53,7 @@ export function WorkflowRunSnapshotFromJSONTyped(json, ignoreDiscriminator) {
52
53
  'userId': json['user_id'],
53
54
  'maxRunDurationSeconds': json['max_run_duration_seconds'],
54
55
  'sources': (json['sources'].map(ABCDPathSnapshotFromJSON)),
55
- 'instructions': (json['instructions'].map(ABCDPathSnapshotFromJSON)),
56
+ 'instructions': (json['instructions'].map(InstructionSnapshotFromJSON)),
56
57
  'outputs': (json['outputs'].map(ABCDPathSnapshotFromJSON)),
57
58
  'template': ABCDPathSnapshotFromJSON(json['template']),
58
59
  };
@@ -71,7 +72,7 @@ export function WorkflowRunSnapshotToJSONTyped(value, ignoreDiscriminator = fals
71
72
  'user_id': value['userId'],
72
73
  'max_run_duration_seconds': value['maxRunDurationSeconds'],
73
74
  'sources': (value['sources'].map(ABCDPathSnapshotToJSON)),
74
- 'instructions': (value['instructions'].map(ABCDPathSnapshotToJSON)),
75
+ 'instructions': (value['instructions'].map(InstructionSnapshotToJSON)),
75
76
  'outputs': (value['outputs'].map(ABCDPathSnapshotToJSON)),
76
77
  'template': ABCDPathSnapshotToJSON(value['template']),
77
78
  };
@@ -10,13 +10,31 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Lifecycle status of a workflow run.
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 Running: "RUNNING";
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];
@@ -12,13 +12,31 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  /**
15
- * Lifecycle status of a workflow run.
15
+ * Combined lifecycle + approval-rollup status of a workflow run.
16
+ *
17
+ * Absorbs the prior split between ``status`` (PENDING/RUNNING/COMPLETED/
18
+ * FAILED) and ``approval_state`` (in_progress/awaiting_review/approved/
19
+ * rejected/failed). One state field per run.
20
+ *
21
+ * Allowed transitions::
22
+ *
23
+ * PENDING -> IN_PROGRESS (agent dispatched)
24
+ * IN_PROGRESS -> COMPLETED (workflow.approval_required=FALSE)
25
+ * IN_PROGRESS -> NEEDS_APPROVAL (workflow.approval_required=TRUE, agent done)
26
+ * NEEDS_APPROVAL -> APPROVED (run folder approved by reviewer)
27
+ * NEEDS_APPROVAL -> REJECTED (run folder or any child rejected)
28
+ * APPROVED -> NEEDS_APPROVAL (run folder unapproved)
29
+ * REJECTED -> NEEDS_APPROVAL (rejection reversed; mutable)
30
+ * any non-terminal -> FAILED (agent error)
16
31
  * @export
17
32
  */
18
33
  export const WorkflowRunStatus = {
19
34
  Pending: 'PENDING',
20
- Running: 'RUNNING',
35
+ InProgress: 'IN_PROGRESS',
21
36
  Completed: 'COMPLETED',
37
+ NeedsApproval: 'NEEDS_APPROVAL',
38
+ Approved: 'APPROVED',
39
+ Rejected: 'REJECTED',
22
40
  Failed: 'FAILED'
23
41
  };
24
42
  export 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;