@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,125 @@
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
+
15
+ import { mapValues } from '../runtime';
16
+ import type { PartType } from './PartType';
17
+ import {
18
+ PartTypeFromJSON,
19
+ PartTypeFromJSONTyped,
20
+ PartTypeToJSON,
21
+ PartTypeToJSONTyped,
22
+ } from './PartType';
23
+
24
+ /**
25
+ * Snapshot of one instruction document, pinned at trigger time.
26
+ *
27
+ * The instruction file is the workflow's **contract**: the agent reads
28
+ * this exact ``document_version_id`` for the duration of the run, even
29
+ * if the document is edited mid-flight or after the run completes.
30
+ * Reproducibility and audit replay depend on this pinning.
31
+ * @export
32
+ * @interface InstructionSnapshot
33
+ */
34
+ export interface InstructionSnapshot {
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof InstructionSnapshot
39
+ */
40
+ pathPartId: string;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof InstructionSnapshot
45
+ */
46
+ materializedPath: string;
47
+ /**
48
+ *
49
+ * @type {PartType}
50
+ * @memberof InstructionSnapshot
51
+ */
52
+ partType: PartType;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof InstructionSnapshot
57
+ */
58
+ documentVersionId: string;
59
+ }
60
+
61
+
62
+ export const InstructionSnapshotPropertyValidationAttributesMap: {
63
+ [property: string]: {
64
+ maxLength?: number,
65
+ minLength?: number,
66
+ pattern?: string,
67
+ maximum?: number,
68
+ exclusiveMaximum?: boolean,
69
+ minimum?: number,
70
+ exclusiveMinimum?: boolean,
71
+ multipleOf?: number,
72
+ maxItems?: number,
73
+ minItems?: number,
74
+ uniqueItems?: boolean
75
+ }
76
+ } = {
77
+ }
78
+
79
+
80
+ /**
81
+ * Check if a given object implements the InstructionSnapshot interface.
82
+ */
83
+ export function instanceOfInstructionSnapshot(value: object): value is InstructionSnapshot {
84
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
85
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined) return false;
86
+ if (!('partType' in value) || value['partType'] === undefined) return false;
87
+ if (!('documentVersionId' in value) || value['documentVersionId'] === undefined) return false;
88
+ return true;
89
+ }
90
+
91
+ export function InstructionSnapshotFromJSON(json: any): InstructionSnapshot {
92
+ return InstructionSnapshotFromJSONTyped(json, false);
93
+ }
94
+
95
+ export function InstructionSnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstructionSnapshot {
96
+ if (json == null) {
97
+ return json;
98
+ }
99
+ return {
100
+
101
+ 'pathPartId': json['path_part_id'],
102
+ 'materializedPath': json['materialized_path'],
103
+ 'partType': PartTypeFromJSON(json['part_type']),
104
+ 'documentVersionId': json['document_version_id'],
105
+ };
106
+ }
107
+
108
+ export function InstructionSnapshotToJSON(json: any): InstructionSnapshot {
109
+ return InstructionSnapshotToJSONTyped(json, false);
110
+ }
111
+
112
+ export function InstructionSnapshotToJSONTyped(value?: InstructionSnapshot | null, ignoreDiscriminator: boolean = false): any {
113
+ if (value == null) {
114
+ return value;
115
+ }
116
+
117
+ return {
118
+
119
+ 'path_part_id': value['pathPartId'],
120
+ 'materialized_path': value['materializedPath'],
121
+ 'part_type': PartTypeToJSON(value['partType']),
122
+ 'document_version_id': value['documentVersionId'],
123
+ };
124
+ }
125
+
@@ -25,6 +25,12 @@ export interface InvokeWorkflowRequest {
25
25
  * @memberof InvokeWorkflowRequest
26
26
  */
27
27
  idempotencyKey?: string | null;
28
+ /**
29
+ * Path part IDs of input documents to pin to this run. Each path_part must be a DOCUMENT readable by the caller. Active document_version_id is captured at trigger time.
30
+ * @type {Array<string>}
31
+ * @memberof InvokeWorkflowRequest
32
+ */
33
+ inputPathPartIds?: Array<string>;
28
34
  }
29
35
  export const InvokeWorkflowRequestPropertyValidationAttributesMap: {
30
36
  [property: string]: {
@@ -44,6 +50,10 @@ export const InvokeWorkflowRequestPropertyValidationAttributesMap: {
44
50
  idempotencyKey: {
45
51
  maxLength: 255,
46
52
  },
53
+ inputPathPartIds: {
54
+ maxItems: 50,
55
+ uniqueItems: false,
56
+ },
47
57
  }
48
58
 
49
59
 
@@ -65,6 +75,7 @@ export function InvokeWorkflowRequestFromJSONTyped(json: any, ignoreDiscriminato
65
75
  return {
66
76
 
67
77
  'idempotencyKey': json['idempotency_key'] == null ? undefined : json['idempotency_key'],
78
+ 'inputPathPartIds': json['input_path_part_ids'] == null ? undefined : json['input_path_part_ids'],
68
79
  };
69
80
  }
70
81
 
@@ -80,6 +91,7 @@ export function InvokeWorkflowRequestToJSONTyped(value?: InvokeWorkflowRequest |
80
91
  return {
81
92
 
82
93
  'idempotency_key': value['idempotencyKey'],
94
+ 'input_path_part_ids': value['inputPathPartIds'],
83
95
  };
84
96
  }
85
97
 
@@ -0,0 +1,58 @@
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
+
15
+
16
+ /**
17
+ * Per-file review status within a run (SeaHonor pilot).
18
+ *
19
+ * Now retained as the audit-history record (one row per (run, file));
20
+ * the current state of truth is ``path_part.approval_state``. The
21
+ * service dual-writes both.
22
+ * @export
23
+ */
24
+ export const PathPartApprovalDecision = {
25
+ Pending: 'pending',
26
+ Approved: 'approved',
27
+ Rejected: 'rejected'
28
+ } as const;
29
+ export type PathPartApprovalDecision = typeof PathPartApprovalDecision[keyof typeof PathPartApprovalDecision];
30
+
31
+
32
+ export function instanceOfPathPartApprovalDecision(value: any): boolean {
33
+ for (const key in PathPartApprovalDecision) {
34
+ if (Object.prototype.hasOwnProperty.call(PathPartApprovalDecision, key)) {
35
+ if (PathPartApprovalDecision[key as keyof typeof PathPartApprovalDecision] === value) {
36
+ return true;
37
+ }
38
+ }
39
+ }
40
+ return false;
41
+ }
42
+
43
+ export function PathPartApprovalDecisionFromJSON(json: any): PathPartApprovalDecision {
44
+ return PathPartApprovalDecisionFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function PathPartApprovalDecisionFromJSONTyped(json: any, ignoreDiscriminator: boolean): PathPartApprovalDecision {
48
+ return json as PathPartApprovalDecision;
49
+ }
50
+
51
+ export function PathPartApprovalDecisionToJSON(value?: PathPartApprovalDecision | null): any {
52
+ return value as any;
53
+ }
54
+
55
+ export function PathPartApprovalDecisionToJSONTyped(value: any, ignoreDiscriminator: boolean): PathPartApprovalDecision {
56
+ return value as PathPartApprovalDecision;
57
+ }
58
+
@@ -0,0 +1,186 @@
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
+
15
+ import { mapValues } from '../runtime';
16
+ import type { PathPartApprovalDecision } from './PathPartApprovalDecision';
17
+ import {
18
+ PathPartApprovalDecisionFromJSON,
19
+ PathPartApprovalDecisionFromJSONTyped,
20
+ PathPartApprovalDecisionToJSON,
21
+ PathPartApprovalDecisionToJSONTyped,
22
+ } from './PathPartApprovalDecision';
23
+
24
+ /**
25
+ * Approval audit-history row over any path_part (file or folder).
26
+ *
27
+ * ``run_id`` is optional — None when the path_part was approved directly
28
+ * without a workflow-run context.
29
+ * @export
30
+ * @interface PathPartApprovalResponse
31
+ */
32
+ export interface PathPartApprovalResponse {
33
+ /**
34
+ *
35
+ * @type {string}
36
+ * @memberof PathPartApprovalResponse
37
+ */
38
+ id: string;
39
+ /**
40
+ *
41
+ * @type {string}
42
+ * @memberof PathPartApprovalResponse
43
+ */
44
+ runId: string | null;
45
+ /**
46
+ *
47
+ * @type {string}
48
+ * @memberof PathPartApprovalResponse
49
+ */
50
+ pathPartId: string;
51
+ /**
52
+ *
53
+ * @type {PathPartApprovalDecision}
54
+ * @memberof PathPartApprovalResponse
55
+ */
56
+ status: PathPartApprovalDecision;
57
+ /**
58
+ *
59
+ * @type {string}
60
+ * @memberof PathPartApprovalResponse
61
+ */
62
+ reviewerId: string | null;
63
+ /**
64
+ *
65
+ * @type {Date}
66
+ * @memberof PathPartApprovalResponse
67
+ */
68
+ reviewedAt: Date | null;
69
+ /**
70
+ *
71
+ * @type {string}
72
+ * @memberof PathPartApprovalResponse
73
+ */
74
+ rejectionReason: string | null;
75
+ /**
76
+ *
77
+ * @type {string}
78
+ * @memberof PathPartApprovalResponse
79
+ */
80
+ unapprovedBy: string | null;
81
+ /**
82
+ *
83
+ * @type {Date}
84
+ * @memberof PathPartApprovalResponse
85
+ */
86
+ unapprovedAt: Date | null;
87
+ /**
88
+ *
89
+ * @type {Date}
90
+ * @memberof PathPartApprovalResponse
91
+ */
92
+ createdAt: Date;
93
+ /**
94
+ *
95
+ * @type {Date}
96
+ * @memberof PathPartApprovalResponse
97
+ */
98
+ updatedAt: Date;
99
+ }
100
+
101
+
102
+ export const PathPartApprovalResponsePropertyValidationAttributesMap: {
103
+ [property: string]: {
104
+ maxLength?: number,
105
+ minLength?: number,
106
+ pattern?: string,
107
+ maximum?: number,
108
+ exclusiveMaximum?: boolean,
109
+ minimum?: number,
110
+ exclusiveMinimum?: boolean,
111
+ multipleOf?: number,
112
+ maxItems?: number,
113
+ minItems?: number,
114
+ uniqueItems?: boolean
115
+ }
116
+ } = {
117
+ }
118
+
119
+
120
+ /**
121
+ * Check if a given object implements the PathPartApprovalResponse interface.
122
+ */
123
+ export function instanceOfPathPartApprovalResponse(value: object): value is PathPartApprovalResponse {
124
+ if (!('id' in value) || value['id'] === undefined) return false;
125
+ if (!('runId' in value) || value['runId'] === undefined) return false;
126
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
127
+ if (!('status' in value) || value['status'] === undefined) return false;
128
+ if (!('reviewerId' in value) || value['reviewerId'] === undefined) return false;
129
+ if (!('reviewedAt' in value) || value['reviewedAt'] === undefined) return false;
130
+ if (!('rejectionReason' in value) || value['rejectionReason'] === undefined) return false;
131
+ if (!('unapprovedBy' in value) || value['unapprovedBy'] === undefined) return false;
132
+ if (!('unapprovedAt' in value) || value['unapprovedAt'] === undefined) return false;
133
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
134
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
135
+ return true;
136
+ }
137
+
138
+ export function PathPartApprovalResponseFromJSON(json: any): PathPartApprovalResponse {
139
+ return PathPartApprovalResponseFromJSONTyped(json, false);
140
+ }
141
+
142
+ export function PathPartApprovalResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PathPartApprovalResponse {
143
+ if (json == null) {
144
+ return json;
145
+ }
146
+ return {
147
+
148
+ 'id': json['id'],
149
+ 'runId': json['run_id'],
150
+ 'pathPartId': json['path_part_id'],
151
+ 'status': PathPartApprovalDecisionFromJSON(json['status']),
152
+ 'reviewerId': json['reviewer_id'],
153
+ 'reviewedAt': (json['reviewed_at'] == null ? null : new Date(json['reviewed_at'])),
154
+ 'rejectionReason': json['rejection_reason'],
155
+ 'unapprovedBy': json['unapproved_by'],
156
+ 'unapprovedAt': (json['unapproved_at'] == null ? null : new Date(json['unapproved_at'])),
157
+ 'createdAt': (new Date(json['created_at'])),
158
+ 'updatedAt': (new Date(json['updated_at'])),
159
+ };
160
+ }
161
+
162
+ export function PathPartApprovalResponseToJSON(json: any): PathPartApprovalResponse {
163
+ return PathPartApprovalResponseToJSONTyped(json, false);
164
+ }
165
+
166
+ export function PathPartApprovalResponseToJSONTyped(value?: PathPartApprovalResponse | null, ignoreDiscriminator: boolean = false): any {
167
+ if (value == null) {
168
+ return value;
169
+ }
170
+
171
+ return {
172
+
173
+ 'id': value['id'],
174
+ 'run_id': value['runId'],
175
+ 'path_part_id': value['pathPartId'],
176
+ 'status': PathPartApprovalDecisionToJSON(value['status']),
177
+ 'reviewer_id': value['reviewerId'],
178
+ 'reviewed_at': value['reviewedAt'] == null ? value['reviewedAt'] : value['reviewedAt'].toISOString(),
179
+ 'rejection_reason': value['rejectionReason'],
180
+ 'unapproved_by': value['unapprovedBy'],
181
+ 'unapproved_at': value['unapprovedAt'] == null ? value['unapprovedAt'] : value['unapprovedAt'].toISOString(),
182
+ 'created_at': value['createdAt'].toISOString(),
183
+ 'updated_at': value['updatedAt'].toISOString(),
184
+ };
185
+ }
186
+
@@ -0,0 +1,87 @@
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
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Body for ``POST /workflow-runs/{run}/files/{file}/reject``.
18
+ * @export
19
+ * @interface RejectFileRequest
20
+ */
21
+ export interface RejectFileRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof RejectFileRequest
26
+ */
27
+ reason: string;
28
+ }
29
+ export const RejectFileRequestPropertyValidationAttributesMap: {
30
+ [property: string]: {
31
+ maxLength?: number,
32
+ minLength?: number,
33
+ pattern?: string,
34
+ maximum?: number,
35
+ exclusiveMaximum?: boolean,
36
+ minimum?: number,
37
+ exclusiveMinimum?: boolean,
38
+ multipleOf?: number,
39
+ maxItems?: number,
40
+ minItems?: number,
41
+ uniqueItems?: boolean
42
+ }
43
+ } = {
44
+ reason: {
45
+ maxLength: 2048,
46
+ minLength: 1,
47
+ },
48
+ }
49
+
50
+
51
+ /**
52
+ * Check if a given object implements the RejectFileRequest interface.
53
+ */
54
+ export function instanceOfRejectFileRequest(value: object): value is RejectFileRequest {
55
+ if (!('reason' in value) || value['reason'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function RejectFileRequestFromJSON(json: any): RejectFileRequest {
60
+ return RejectFileRequestFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function RejectFileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RejectFileRequest {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'reason': json['reason'],
70
+ };
71
+ }
72
+
73
+ export function RejectFileRequestToJSON(json: any): RejectFileRequest {
74
+ return RejectFileRequestToJSONTyped(json, false);
75
+ }
76
+
77
+ export function RejectFileRequestToJSONTyped(value?: RejectFileRequest | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'reason': value['reason'],
85
+ };
86
+ }
87
+
@@ -0,0 +1,101 @@
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
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Reviewer-lock state on a workflow run.
18
+ * @export
19
+ * @interface RunLockResponse
20
+ */
21
+ export interface RunLockResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof RunLockResponse
26
+ */
27
+ runId: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof RunLockResponse
32
+ */
33
+ lockUserId: string | null;
34
+ /**
35
+ *
36
+ * @type {Date}
37
+ * @memberof RunLockResponse
38
+ */
39
+ lockAcquiredAt: Date | null;
40
+ }
41
+ export const RunLockResponsePropertyValidationAttributesMap: {
42
+ [property: string]: {
43
+ maxLength?: number,
44
+ minLength?: number,
45
+ pattern?: string,
46
+ maximum?: number,
47
+ exclusiveMaximum?: boolean,
48
+ minimum?: number,
49
+ exclusiveMinimum?: boolean,
50
+ multipleOf?: number,
51
+ maxItems?: number,
52
+ minItems?: number,
53
+ uniqueItems?: boolean
54
+ }
55
+ } = {
56
+ }
57
+
58
+
59
+ /**
60
+ * Check if a given object implements the RunLockResponse interface.
61
+ */
62
+ export function instanceOfRunLockResponse(value: object): value is RunLockResponse {
63
+ if (!('runId' in value) || value['runId'] === undefined) return false;
64
+ if (!('lockUserId' in value) || value['lockUserId'] === undefined) return false;
65
+ if (!('lockAcquiredAt' in value) || value['lockAcquiredAt'] === undefined) return false;
66
+ return true;
67
+ }
68
+
69
+ export function RunLockResponseFromJSON(json: any): RunLockResponse {
70
+ return RunLockResponseFromJSONTyped(json, false);
71
+ }
72
+
73
+ export function RunLockResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RunLockResponse {
74
+ if (json == null) {
75
+ return json;
76
+ }
77
+ return {
78
+
79
+ 'runId': json['run_id'],
80
+ 'lockUserId': json['lock_user_id'],
81
+ 'lockAcquiredAt': (json['lock_acquired_at'] == null ? null : new Date(json['lock_acquired_at'])),
82
+ };
83
+ }
84
+
85
+ export function RunLockResponseToJSON(json: any): RunLockResponse {
86
+ return RunLockResponseToJSONTyped(json, false);
87
+ }
88
+
89
+ export function RunLockResponseToJSONTyped(value?: RunLockResponse | null, ignoreDiscriminator: boolean = false): any {
90
+ if (value == null) {
91
+ return value;
92
+ }
93
+
94
+ return {
95
+
96
+ 'run_id': value['runId'],
97
+ 'lock_user_id': value['lockUserId'],
98
+ 'lock_acquired_at': value['lockAcquiredAt'] == null ? value['lockAcquiredAt'] : value['lockAcquiredAt'].toISOString(),
99
+ };
100
+ }
101
+
@@ -29,7 +29,12 @@ import {
29
29
  } from './WorkflowRunnerType';
30
30
 
31
31
  /**
32
- * Full replacement (PUT semantics). All fields are required.
32
+ * Full replacement (PUT semantics).
33
+ *
34
+ * ``instruction_path_part_ids``:
35
+ *
36
+ * - ``KS_INTERNAL``: must remain ``len == 1`` (the auto-provisioned doc).
37
+ * - ``SELF_HOSTED``: ``len ≥ 1``; callers may swap or add documents.
33
38
  * @export
34
39
  * @interface UpdateWorkflowDefinitionRequest
35
40
  */
@@ -94,6 +99,12 @@ export interface UpdateWorkflowDefinitionRequest {
94
99
  * @memberof UpdateWorkflowDefinitionRequest
95
100
  */
96
101
  isActive?: boolean;
102
+ /**
103
+ *
104
+ * @type {boolean}
105
+ * @memberof UpdateWorkflowDefinitionRequest
106
+ */
107
+ approvalRequired?: boolean;
97
108
  }
98
109
 
99
110
 
@@ -171,6 +182,7 @@ export function UpdateWorkflowDefinitionRequestFromJSONTyped(json: any, ignoreDi
171
182
  'outputPathPartIds': json['output_path_part_ids'],
172
183
  'templatePathPartId': json['template_path_part_id'] == null ? undefined : json['template_path_part_id'],
173
184
  'isActive': json['is_active'] == null ? undefined : json['is_active'],
185
+ 'approvalRequired': json['approval_required'] == null ? undefined : json['approval_required'],
174
186
  };
175
187
  }
176
188
 
@@ -195,6 +207,7 @@ export function UpdateWorkflowDefinitionRequestToJSONTyped(value?: UpdateWorkflo
195
207
  'output_path_part_ids': value['outputPathPartIds'],
196
208
  'template_path_part_id': value['templatePathPartId'],
197
209
  'is_active': value['isActive'],
210
+ 'approval_required': value['approvalRequired'],
198
211
  };
199
212
  }
200
213
 
@@ -100,6 +100,12 @@ export interface WorkflowDefinitionResponse {
100
100
  * @memberof WorkflowDefinitionResponse
101
101
  */
102
102
  isActive: boolean;
103
+ /**
104
+ *
105
+ * @type {boolean}
106
+ * @memberof WorkflowDefinitionResponse
107
+ */
108
+ approvalRequired: boolean;
103
109
  /**
104
110
  *
105
111
  * @type {Date}
@@ -148,6 +154,7 @@ export function instanceOfWorkflowDefinitionResponse(value: object): value is Wo
148
154
  if (!('outputPathPartIds' in value) || value['outputPathPartIds'] === undefined) return false;
149
155
  if (!('templatePathPartId' in value) || value['templatePathPartId'] === undefined) return false;
150
156
  if (!('isActive' in value) || value['isActive'] === undefined) return false;
157
+ if (!('approvalRequired' in value) || value['approvalRequired'] === undefined) return false;
151
158
  if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
152
159
  if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
153
160
  return true;
@@ -174,6 +181,7 @@ export function WorkflowDefinitionResponseFromJSONTyped(json: any, ignoreDiscrim
174
181
  'outputPathPartIds': json['output_path_part_ids'],
175
182
  'templatePathPartId': json['template_path_part_id'],
176
183
  'isActive': json['is_active'],
184
+ 'approvalRequired': json['approval_required'],
177
185
  'createdAt': (new Date(json['created_at'])),
178
186
  'updatedAt': (new Date(json['updated_at'])),
179
187
  };
@@ -201,6 +209,7 @@ export function WorkflowDefinitionResponseToJSONTyped(value?: WorkflowDefinition
201
209
  'output_path_part_ids': value['outputPathPartIds'],
202
210
  'template_path_part_id': value['templatePathPartId'],
203
211
  'is_active': value['isActive'],
212
+ 'approval_required': value['approvalRequired'],
204
213
  'created_at': value['createdAt'].toISOString(),
205
214
  'updated_at': value['updatedAt'].toISOString(),
206
215
  };