@knowledge-stack/ksapi 1.82.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 (62) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +11 -2
  3. package/dist/apis/WorkflowRunsApi.d.ts +233 -1
  4. package/dist/apis/WorkflowRunsApi.js +236 -0
  5. package/dist/esm/apis/WorkflowRunsApi.d.ts +233 -1
  6. package/dist/esm/apis/WorkflowRunsApi.js +237 -1
  7. package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +6 -0
  8. package/dist/esm/models/CreateWorkflowDefinitionRequest.js +2 -0
  9. package/dist/esm/models/PathPartApprovalDecision.d.ts +30 -0
  10. package/dist/esm/models/PathPartApprovalDecision.js +48 -0
  11. package/dist/esm/models/PathPartApprovalResponse.d.ts +111 -0
  12. package/dist/esm/models/PathPartApprovalResponse.js +85 -0
  13. package/dist/esm/models/RejectFileRequest.d.ts +47 -0
  14. package/dist/esm/models/RejectFileRequest.js +49 -0
  15. package/dist/esm/models/RunLockResponse.d.ts +59 -0
  16. package/dist/esm/models/RunLockResponse.js +52 -0
  17. package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +6 -0
  18. package/dist/esm/models/UpdateWorkflowDefinitionRequest.js +2 -0
  19. package/dist/esm/models/WorkflowDefinitionResponse.d.ts +6 -0
  20. package/dist/esm/models/WorkflowDefinitionResponse.js +4 -0
  21. package/dist/esm/models/WorkflowRunStatus.d.ts +20 -2
  22. package/dist/esm/models/WorkflowRunStatus.js +20 -2
  23. package/dist/esm/models/index.d.ts +4 -0
  24. package/dist/esm/models/index.js +4 -0
  25. package/dist/models/CreateWorkflowDefinitionRequest.d.ts +6 -0
  26. package/dist/models/CreateWorkflowDefinitionRequest.js +2 -0
  27. package/dist/models/PathPartApprovalDecision.d.ts +30 -0
  28. package/dist/models/PathPartApprovalDecision.js +56 -0
  29. package/dist/models/PathPartApprovalResponse.d.ts +111 -0
  30. package/dist/models/PathPartApprovalResponse.js +93 -0
  31. package/dist/models/RejectFileRequest.d.ts +47 -0
  32. package/dist/models/RejectFileRequest.js +57 -0
  33. package/dist/models/RunLockResponse.d.ts +59 -0
  34. package/dist/models/RunLockResponse.js +60 -0
  35. package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +6 -0
  36. package/dist/models/UpdateWorkflowDefinitionRequest.js +2 -0
  37. package/dist/models/WorkflowDefinitionResponse.d.ts +6 -0
  38. package/dist/models/WorkflowDefinitionResponse.js +4 -0
  39. package/dist/models/WorkflowRunStatus.d.ts +20 -2
  40. package/dist/models/WorkflowRunStatus.js +20 -2
  41. package/dist/models/index.d.ts +4 -0
  42. package/dist/models/index.js +4 -0
  43. package/docs/CreateWorkflowDefinitionRequest.md +2 -0
  44. package/docs/PathPartApprovalDecision.md +33 -0
  45. package/docs/PathPartApprovalResponse.md +55 -0
  46. package/docs/RejectFileRequest.md +35 -0
  47. package/docs/RunLockResponse.md +39 -0
  48. package/docs/UpdateWorkflowDefinitionRequest.md +2 -0
  49. package/docs/WorkflowDefinitionResponse.md +2 -0
  50. package/docs/WorkflowRunStatus.md +1 -1
  51. package/docs/WorkflowRunsApi.md +387 -0
  52. package/package.json +1 -1
  53. package/src/apis/WorkflowRunsApi.ts +479 -0
  54. package/src/models/CreateWorkflowDefinitionRequest.ts +8 -0
  55. package/src/models/PathPartApprovalDecision.ts +58 -0
  56. package/src/models/PathPartApprovalResponse.ts +186 -0
  57. package/src/models/RejectFileRequest.ts +87 -0
  58. package/src/models/RunLockResponse.ts +101 -0
  59. package/src/models/UpdateWorkflowDefinitionRequest.ts +8 -0
  60. package/src/models/WorkflowDefinitionResponse.ts +9 -0
  61. package/src/models/WorkflowRunStatus.ts +20 -2
  62. package/src/models/index.ts +4 -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
+ }
@@ -82,6 +82,12 @@ export interface UpdateWorkflowDefinitionRequest {
82
82
  * @memberof UpdateWorkflowDefinitionRequest
83
83
  */
84
84
  isActive?: boolean;
85
+ /**
86
+ *
87
+ * @type {boolean}
88
+ * @memberof UpdateWorkflowDefinitionRequest
89
+ */
90
+ approvalRequired?: boolean;
85
91
  }
86
92
  export declare const UpdateWorkflowDefinitionRequestPropertyValidationAttributesMap: {
87
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
  };
@@ -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) {
@@ -116,6 +116,8 @@ export * from './PasswordResetRequest';
116
116
  export * from './PasswordResetWithTokenRequest';
117
117
  export * from './PathOrder';
118
118
  export * from './PathPartAncestorItem';
119
+ export * from './PathPartApprovalDecision';
120
+ export * from './PathPartApprovalResponse';
119
121
  export * from './PathPartResponse';
120
122
  export * from './PathPartTagsResponse';
121
123
  export * from './PermissionCapability';
@@ -125,9 +127,11 @@ export * from './PipelineStatus';
125
127
  export * from './Polygon';
126
128
  export * from './PolygonReference';
127
129
  export * from './ReferenceType';
130
+ export * from './RejectFileRequest';
128
131
  export * from './ResolvedReferenceInput';
129
132
  export * from './ResolvedReferenceOutput';
130
133
  export * from './RootResponse';
134
+ export * from './RunLockResponse';
131
135
  export * from './SSOInitiateResponse';
132
136
  export * from './ScoredChunkResponse';
133
137
  export * from './SearchSortOrder';
@@ -118,6 +118,8 @@ export * from './PasswordResetRequest';
118
118
  export * from './PasswordResetWithTokenRequest';
119
119
  export * from './PathOrder';
120
120
  export * from './PathPartAncestorItem';
121
+ export * from './PathPartApprovalDecision';
122
+ export * from './PathPartApprovalResponse';
121
123
  export * from './PathPartResponse';
122
124
  export * from './PathPartTagsResponse';
123
125
  export * from './PermissionCapability';
@@ -127,9 +129,11 @@ export * from './PipelineStatus';
127
129
  export * from './Polygon';
128
130
  export * from './PolygonReference';
129
131
  export * from './ReferenceType';
132
+ export * from './RejectFileRequest';
130
133
  export * from './ResolvedReferenceInput';
131
134
  export * from './ResolvedReferenceOutput';
132
135
  export * from './RootResponse';
136
+ export * from './RunLockResponse';
133
137
  export * from './SSOInitiateResponse';
134
138
  export * from './ScoredChunkResponse';
135
139
  export * from './SearchSortOrder';
@@ -78,6 +78,12 @@ export interface CreateWorkflowDefinitionRequest {
78
78
  * @memberof CreateWorkflowDefinitionRequest
79
79
  */
80
80
  templatePathPartId?: string | null;
81
+ /**
82
+ *
83
+ * @type {boolean}
84
+ * @memberof CreateWorkflowDefinitionRequest
85
+ */
86
+ approvalRequired?: boolean;
81
87
  }
82
88
  export declare const CreateWorkflowDefinitionRequestPropertyValidationAttributesMap: {
83
89
  [property: string]: {
@@ -77,6 +77,7 @@ function CreateWorkflowDefinitionRequestFromJSONTyped(json, ignoreDiscriminator)
77
77
  'instructionPathPartIds': json['instruction_path_part_ids'] == null ? undefined : json['instruction_path_part_ids'],
78
78
  'outputPathPartIds': json['output_path_part_ids'],
79
79
  'templatePathPartId': json['template_path_part_id'] == null ? undefined : json['template_path_part_id'],
80
+ 'approvalRequired': json['approval_required'] == null ? undefined : json['approval_required'],
80
81
  };
81
82
  }
82
83
  function CreateWorkflowDefinitionRequestToJSON(json) {
@@ -96,5 +97,6 @@ function CreateWorkflowDefinitionRequestToJSONTyped(value, ignoreDiscriminator =
96
97
  'instruction_path_part_ids': value['instructionPathPartIds'],
97
98
  'output_path_part_ids': value['outputPathPartIds'],
98
99
  'template_path_part_id': value['templatePathPartId'],
100
+ 'approval_required': value['approvalRequired'],
99
101
  };
100
102
  }
@@ -0,0 +1,30 @@
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
+ * Per-file review status within a run (SeaHonor pilot).
14
+ *
15
+ * Now retained as the audit-history record (one row per (run, file));
16
+ * the current state of truth is ``path_part.approval_state``. The
17
+ * service dual-writes both.
18
+ * @export
19
+ */
20
+ export declare const PathPartApprovalDecision: {
21
+ readonly Pending: "pending";
22
+ readonly Approved: "approved";
23
+ readonly Rejected: "rejected";
24
+ };
25
+ export type PathPartApprovalDecision = typeof PathPartApprovalDecision[keyof typeof PathPartApprovalDecision];
26
+ export declare function instanceOfPathPartApprovalDecision(value: any): boolean;
27
+ export declare function PathPartApprovalDecisionFromJSON(json: any): PathPartApprovalDecision;
28
+ export declare function PathPartApprovalDecisionFromJSONTyped(json: any, ignoreDiscriminator: boolean): PathPartApprovalDecision;
29
+ export declare function PathPartApprovalDecisionToJSON(value?: PathPartApprovalDecision | null): any;
30
+ export declare function PathPartApprovalDecisionToJSONTyped(value: any, ignoreDiscriminator: boolean): PathPartApprovalDecision;