@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,56 @@
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.PathPartApprovalDecision = void 0;
17
+ exports.instanceOfPathPartApprovalDecision = instanceOfPathPartApprovalDecision;
18
+ exports.PathPartApprovalDecisionFromJSON = PathPartApprovalDecisionFromJSON;
19
+ exports.PathPartApprovalDecisionFromJSONTyped = PathPartApprovalDecisionFromJSONTyped;
20
+ exports.PathPartApprovalDecisionToJSON = PathPartApprovalDecisionToJSON;
21
+ exports.PathPartApprovalDecisionToJSONTyped = PathPartApprovalDecisionToJSONTyped;
22
+ /**
23
+ * Per-file review status within a run (SeaHonor pilot).
24
+ *
25
+ * Now retained as the audit-history record (one row per (run, file));
26
+ * the current state of truth is ``path_part.approval_state``. The
27
+ * service dual-writes both.
28
+ * @export
29
+ */
30
+ exports.PathPartApprovalDecision = {
31
+ Pending: 'pending',
32
+ Approved: 'approved',
33
+ Rejected: 'rejected'
34
+ };
35
+ function instanceOfPathPartApprovalDecision(value) {
36
+ for (const key in exports.PathPartApprovalDecision) {
37
+ if (Object.prototype.hasOwnProperty.call(exports.PathPartApprovalDecision, key)) {
38
+ if (exports.PathPartApprovalDecision[key] === value) {
39
+ return true;
40
+ }
41
+ }
42
+ }
43
+ return false;
44
+ }
45
+ function PathPartApprovalDecisionFromJSON(json) {
46
+ return PathPartApprovalDecisionFromJSONTyped(json, false);
47
+ }
48
+ function PathPartApprovalDecisionFromJSONTyped(json, ignoreDiscriminator) {
49
+ return json;
50
+ }
51
+ function PathPartApprovalDecisionToJSON(value) {
52
+ return value;
53
+ }
54
+ function PathPartApprovalDecisionToJSONTyped(value, ignoreDiscriminator) {
55
+ return value;
56
+ }
@@ -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,93 @@
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.PathPartApprovalResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfPathPartApprovalResponse = instanceOfPathPartApprovalResponse;
18
+ exports.PathPartApprovalResponseFromJSON = PathPartApprovalResponseFromJSON;
19
+ exports.PathPartApprovalResponseFromJSONTyped = PathPartApprovalResponseFromJSONTyped;
20
+ exports.PathPartApprovalResponseToJSON = PathPartApprovalResponseToJSON;
21
+ exports.PathPartApprovalResponseToJSONTyped = PathPartApprovalResponseToJSONTyped;
22
+ const PathPartApprovalDecision_1 = require("./PathPartApprovalDecision");
23
+ exports.PathPartApprovalResponsePropertyValidationAttributesMap = {};
24
+ /**
25
+ * Check if a given object implements the PathPartApprovalResponse interface.
26
+ */
27
+ function instanceOfPathPartApprovalResponse(value) {
28
+ if (!('id' in value) || value['id'] === undefined)
29
+ return false;
30
+ if (!('runId' in value) || value['runId'] === undefined)
31
+ return false;
32
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
33
+ return false;
34
+ if (!('status' in value) || value['status'] === undefined)
35
+ return false;
36
+ if (!('reviewerId' in value) || value['reviewerId'] === undefined)
37
+ return false;
38
+ if (!('reviewedAt' in value) || value['reviewedAt'] === undefined)
39
+ return false;
40
+ if (!('rejectionReason' in value) || value['rejectionReason'] === undefined)
41
+ return false;
42
+ if (!('unapprovedBy' in value) || value['unapprovedBy'] === undefined)
43
+ return false;
44
+ if (!('unapprovedAt' in value) || value['unapprovedAt'] === undefined)
45
+ return false;
46
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
47
+ return false;
48
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
49
+ return false;
50
+ return true;
51
+ }
52
+ function PathPartApprovalResponseFromJSON(json) {
53
+ return PathPartApprovalResponseFromJSONTyped(json, false);
54
+ }
55
+ function PathPartApprovalResponseFromJSONTyped(json, ignoreDiscriminator) {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+ 'id': json['id'],
61
+ 'runId': json['run_id'],
62
+ 'pathPartId': json['path_part_id'],
63
+ 'status': (0, PathPartApprovalDecision_1.PathPartApprovalDecisionFromJSON)(json['status']),
64
+ 'reviewerId': json['reviewer_id'],
65
+ 'reviewedAt': (json['reviewed_at'] == null ? null : new Date(json['reviewed_at'])),
66
+ 'rejectionReason': json['rejection_reason'],
67
+ 'unapprovedBy': json['unapproved_by'],
68
+ 'unapprovedAt': (json['unapproved_at'] == null ? null : new Date(json['unapproved_at'])),
69
+ 'createdAt': (new Date(json['created_at'])),
70
+ 'updatedAt': (new Date(json['updated_at'])),
71
+ };
72
+ }
73
+ function PathPartApprovalResponseToJSON(json) {
74
+ return PathPartApprovalResponseToJSONTyped(json, false);
75
+ }
76
+ function PathPartApprovalResponseToJSONTyped(value, ignoreDiscriminator = false) {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+ return {
81
+ 'id': value['id'],
82
+ 'run_id': value['runId'],
83
+ 'path_part_id': value['pathPartId'],
84
+ 'status': (0, PathPartApprovalDecision_1.PathPartApprovalDecisionToJSON)(value['status']),
85
+ 'reviewer_id': value['reviewerId'],
86
+ 'reviewed_at': value['reviewedAt'] == null ? value['reviewedAt'] : value['reviewedAt'].toISOString(),
87
+ 'rejection_reason': value['rejectionReason'],
88
+ 'unapproved_by': value['unapprovedBy'],
89
+ 'unapproved_at': value['unapprovedAt'] == null ? value['unapprovedAt'] : value['unapprovedAt'].toISOString(),
90
+ 'created_at': value['createdAt'].toISOString(),
91
+ 'updated_at': value['updatedAt'].toISOString(),
92
+ };
93
+ }
@@ -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,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
+ }
@@ -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]: {
@@ -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
  };
@@ -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];
@@ -20,13 +20,31 @@ exports.WorkflowRunStatusFromJSONTyped = WorkflowRunStatusFromJSONTyped;
20
20
  exports.WorkflowRunStatusToJSON = WorkflowRunStatusToJSON;
21
21
  exports.WorkflowRunStatusToJSONTyped = WorkflowRunStatusToJSONTyped;
22
22
  /**
23
- * Lifecycle status of a workflow run.
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
- Running: 'RUNNING',
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) {
@@ -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';
@@ -134,6 +134,8 @@ __exportStar(require("./PasswordResetRequest"), exports);
134
134
  __exportStar(require("./PasswordResetWithTokenRequest"), exports);
135
135
  __exportStar(require("./PathOrder"), exports);
136
136
  __exportStar(require("./PathPartAncestorItem"), exports);
137
+ __exportStar(require("./PathPartApprovalDecision"), exports);
138
+ __exportStar(require("./PathPartApprovalResponse"), exports);
137
139
  __exportStar(require("./PathPartResponse"), exports);
138
140
  __exportStar(require("./PathPartTagsResponse"), exports);
139
141
  __exportStar(require("./PermissionCapability"), exports);
@@ -143,9 +145,11 @@ __exportStar(require("./PipelineStatus"), exports);
143
145
  __exportStar(require("./Polygon"), exports);
144
146
  __exportStar(require("./PolygonReference"), exports);
145
147
  __exportStar(require("./ReferenceType"), exports);
148
+ __exportStar(require("./RejectFileRequest"), exports);
146
149
  __exportStar(require("./ResolvedReferenceInput"), exports);
147
150
  __exportStar(require("./ResolvedReferenceOutput"), exports);
148
151
  __exportStar(require("./RootResponse"), exports);
152
+ __exportStar(require("./RunLockResponse"), exports);
149
153
  __exportStar(require("./SSOInitiateResponse"), exports);
150
154
  __exportStar(require("./ScoredChunkResponse"), exports);
151
155
  __exportStar(require("./SearchSortOrder"), exports);