@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
@@ -16,7 +16,8 @@
16
16
  * @export
17
17
  */
18
18
  export const WorkflowRunnerType = {
19
- SelfHosted: 'SELF_HOSTED'
19
+ SelfHosted: 'SELF_HOSTED',
20
+ KsInternal: 'KS_INTERNAL'
20
21
  };
21
22
  export function instanceOfWorkflowRunnerType(value) {
22
23
  for (const key in WorkflowRunnerType) {
@@ -74,6 +74,7 @@ export * from './ImageTaxonomy';
74
74
  export * from './InformationStatistics';
75
75
  export * from './IngestDocumentResponse';
76
76
  export * from './IngestionMode';
77
+ export * from './InstructionSnapshot';
77
78
  export * from './InviteLinkSettingsRequest';
78
79
  export * from './InviteLinkSettingsResponse';
79
80
  export * from './InviteResponse';
@@ -115,6 +116,8 @@ export * from './PasswordResetRequest';
115
116
  export * from './PasswordResetWithTokenRequest';
116
117
  export * from './PathOrder';
117
118
  export * from './PathPartAncestorItem';
119
+ export * from './PathPartApprovalDecision';
120
+ export * from './PathPartApprovalResponse';
118
121
  export * from './PathPartResponse';
119
122
  export * from './PathPartTagsResponse';
120
123
  export * from './PermissionCapability';
@@ -124,9 +127,11 @@ export * from './PipelineStatus';
124
127
  export * from './Polygon';
125
128
  export * from './PolygonReference';
126
129
  export * from './ReferenceType';
130
+ export * from './RejectFileRequest';
127
131
  export * from './ResolvedReferenceInput';
128
132
  export * from './ResolvedReferenceOutput';
129
133
  export * from './RootResponse';
134
+ export * from './RunLockResponse';
130
135
  export * from './SSOInitiateResponse';
131
136
  export * from './ScoredChunkResponse';
132
137
  export * from './SearchSortOrder';
@@ -76,6 +76,7 @@ export * from './ImageTaxonomy';
76
76
  export * from './InformationStatistics';
77
77
  export * from './IngestDocumentResponse';
78
78
  export * from './IngestionMode';
79
+ export * from './InstructionSnapshot';
79
80
  export * from './InviteLinkSettingsRequest';
80
81
  export * from './InviteLinkSettingsResponse';
81
82
  export * from './InviteResponse';
@@ -117,6 +118,8 @@ export * from './PasswordResetRequest';
117
118
  export * from './PasswordResetWithTokenRequest';
118
119
  export * from './PathOrder';
119
120
  export * from './PathPartAncestorItem';
121
+ export * from './PathPartApprovalDecision';
122
+ export * from './PathPartApprovalResponse';
120
123
  export * from './PathPartResponse';
121
124
  export * from './PathPartTagsResponse';
122
125
  export * from './PermissionCapability';
@@ -126,9 +129,11 @@ export * from './PipelineStatus';
126
129
  export * from './Polygon';
127
130
  export * from './PolygonReference';
128
131
  export * from './ReferenceType';
132
+ export * from './RejectFileRequest';
129
133
  export * from './ResolvedReferenceInput';
130
134
  export * from './ResolvedReferenceOutput';
131
135
  export * from './RootResponse';
136
+ export * from './RunLockResponse';
132
137
  export * from './SSOInitiateResponse';
133
138
  export * from './ScoredChunkResponse';
134
139
  export * from './SearchSortOrder';
@@ -13,6 +13,13 @@ import type { SelfHostedRunnerConfig } from './SelfHostedRunnerConfig';
13
13
  import type { WorkflowRunnerType } from './WorkflowRunnerType';
14
14
  /**
15
15
  * Create a new workflow definition.
16
+ *
17
+ * ``instruction_path_part_ids`` semantics depend on ``runner_type``:
18
+ *
19
+ * - ``KS_INTERNAL``: must be empty (``[]``); the server auto-provisions a
20
+ * single ``instruction.md`` and stores ``[doc.path_part_id]``.
21
+ * - ``SELF_HOSTED``: caller-supplied list of one-or-more document
22
+ * PathPart IDs. Must contain at least one entry.
16
23
  * @export
17
24
  * @interface CreateWorkflowDefinitionRequest
18
25
  */
@@ -58,7 +65,7 @@ export interface CreateWorkflowDefinitionRequest {
58
65
  * @type {Array<string>}
59
66
  * @memberof CreateWorkflowDefinitionRequest
60
67
  */
61
- instructionPathPartIds: Array<string>;
68
+ instructionPathPartIds?: Array<string>;
62
69
  /**
63
70
  *
64
71
  * @type {Array<string>}
@@ -71,6 +78,12 @@ export interface CreateWorkflowDefinitionRequest {
71
78
  * @memberof CreateWorkflowDefinitionRequest
72
79
  */
73
80
  templatePathPartId?: string | null;
81
+ /**
82
+ *
83
+ * @type {boolean}
84
+ * @memberof CreateWorkflowDefinitionRequest
85
+ */
86
+ approvalRequired?: boolean;
74
87
  }
75
88
  export declare const CreateWorkflowDefinitionRequestPropertyValidationAttributesMap: {
76
89
  [property: string]: {
@@ -38,7 +38,6 @@ exports.CreateWorkflowDefinitionRequestPropertyValidationAttributesMap = {
38
38
  },
39
39
  instructionPathPartIds: {
40
40
  maxItems: 20,
41
- minItems: 1,
42
41
  uniqueItems: false,
43
42
  },
44
43
  outputPathPartIds: {
@@ -57,8 +56,6 @@ function instanceOfCreateWorkflowDefinitionRequest(value) {
57
56
  return false;
58
57
  if (!('sourcePathPartIds' in value) || value['sourcePathPartIds'] === undefined)
59
58
  return false;
60
- if (!('instructionPathPartIds' in value) || value['instructionPathPartIds'] === undefined)
61
- return false;
62
59
  if (!('outputPathPartIds' in value) || value['outputPathPartIds'] === undefined)
63
60
  return false;
64
61
  return true;
@@ -77,9 +74,10 @@ function CreateWorkflowDefinitionRequestFromJSONTyped(json, ignoreDiscriminator)
77
74
  'runnerConfig': json['runner_config'] == null ? undefined : (0, SelfHostedRunnerConfig_1.SelfHostedRunnerConfigFromJSON)(json['runner_config']),
78
75
  'maxRunDurationSeconds': json['max_run_duration_seconds'] == null ? undefined : json['max_run_duration_seconds'],
79
76
  'sourcePathPartIds': json['source_path_part_ids'],
80
- 'instructionPathPartIds': json['instruction_path_part_ids'],
77
+ 'instructionPathPartIds': json['instruction_path_part_ids'] == null ? undefined : json['instruction_path_part_ids'],
81
78
  'outputPathPartIds': json['output_path_part_ids'],
82
79
  'templatePathPartId': json['template_path_part_id'] == null ? undefined : json['template_path_part_id'],
80
+ 'approvalRequired': json['approval_required'] == null ? undefined : json['approval_required'],
83
81
  };
84
82
  }
85
83
  function CreateWorkflowDefinitionRequestToJSON(json) {
@@ -99,5 +97,6 @@ function CreateWorkflowDefinitionRequestToJSONTyped(value, ignoreDiscriminator =
99
97
  'instruction_path_part_ids': value['instructionPathPartIds'],
100
98
  'output_path_part_ids': value['outputPathPartIds'],
101
99
  'template_path_part_id': value['templatePathPartId'],
100
+ 'approval_required': value['approvalRequired'],
102
101
  };
103
102
  }
@@ -0,0 +1,71 @@
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 { PartType } from './PartType';
13
+ /**
14
+ * Snapshot of one instruction document, pinned at trigger time.
15
+ *
16
+ * The instruction file is the workflow's **contract**: the agent reads
17
+ * this exact ``document_version_id`` for the duration of the run, even
18
+ * if the document is edited mid-flight or after the run completes.
19
+ * Reproducibility and audit replay depend on this pinning.
20
+ * @export
21
+ * @interface InstructionSnapshot
22
+ */
23
+ export interface InstructionSnapshot {
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof InstructionSnapshot
28
+ */
29
+ pathPartId: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof InstructionSnapshot
34
+ */
35
+ materializedPath: string;
36
+ /**
37
+ *
38
+ * @type {PartType}
39
+ * @memberof InstructionSnapshot
40
+ */
41
+ partType: PartType;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof InstructionSnapshot
46
+ */
47
+ documentVersionId: string;
48
+ }
49
+ export declare const InstructionSnapshotPropertyValidationAttributesMap: {
50
+ [property: string]: {
51
+ maxLength?: number;
52
+ minLength?: number;
53
+ pattern?: string;
54
+ maximum?: number;
55
+ exclusiveMaximum?: boolean;
56
+ minimum?: number;
57
+ exclusiveMinimum?: boolean;
58
+ multipleOf?: number;
59
+ maxItems?: number;
60
+ minItems?: number;
61
+ uniqueItems?: boolean;
62
+ };
63
+ };
64
+ /**
65
+ * Check if a given object implements the InstructionSnapshot interface.
66
+ */
67
+ export declare function instanceOfInstructionSnapshot(value: object): value is InstructionSnapshot;
68
+ export declare function InstructionSnapshotFromJSON(json: any): InstructionSnapshot;
69
+ export declare function InstructionSnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstructionSnapshot;
70
+ export declare function InstructionSnapshotToJSON(json: any): InstructionSnapshot;
71
+ export declare function InstructionSnapshotToJSONTyped(value?: InstructionSnapshot | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,65 @@
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.InstructionSnapshotPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfInstructionSnapshot = instanceOfInstructionSnapshot;
18
+ exports.InstructionSnapshotFromJSON = InstructionSnapshotFromJSON;
19
+ exports.InstructionSnapshotFromJSONTyped = InstructionSnapshotFromJSONTyped;
20
+ exports.InstructionSnapshotToJSON = InstructionSnapshotToJSON;
21
+ exports.InstructionSnapshotToJSONTyped = InstructionSnapshotToJSONTyped;
22
+ const PartType_1 = require("./PartType");
23
+ exports.InstructionSnapshotPropertyValidationAttributesMap = {};
24
+ /**
25
+ * Check if a given object implements the InstructionSnapshot interface.
26
+ */
27
+ function instanceOfInstructionSnapshot(value) {
28
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
29
+ return false;
30
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
31
+ return false;
32
+ if (!('partType' in value) || value['partType'] === undefined)
33
+ return false;
34
+ if (!('documentVersionId' in value) || value['documentVersionId'] === undefined)
35
+ return false;
36
+ return true;
37
+ }
38
+ function InstructionSnapshotFromJSON(json) {
39
+ return InstructionSnapshotFromJSONTyped(json, false);
40
+ }
41
+ function InstructionSnapshotFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'pathPartId': json['path_part_id'],
47
+ 'materializedPath': json['materialized_path'],
48
+ 'partType': (0, PartType_1.PartTypeFromJSON)(json['part_type']),
49
+ 'documentVersionId': json['document_version_id'],
50
+ };
51
+ }
52
+ function InstructionSnapshotToJSON(json) {
53
+ return InstructionSnapshotToJSONTyped(json, false);
54
+ }
55
+ function InstructionSnapshotToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'path_part_id': value['pathPartId'],
61
+ 'materialized_path': value['materializedPath'],
62
+ 'part_type': (0, PartType_1.PartTypeToJSON)(value['partType']),
63
+ 'document_version_id': value['documentVersionId'],
64
+ };
65
+ }
@@ -21,6 +21,12 @@ export interface InvokeWorkflowRequest {
21
21
  * @memberof InvokeWorkflowRequest
22
22
  */
23
23
  idempotencyKey?: string | null;
24
+ /**
25
+ * 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.
26
+ * @type {Array<string>}
27
+ * @memberof InvokeWorkflowRequest
28
+ */
29
+ inputPathPartIds?: Array<string>;
24
30
  }
25
31
  export declare const InvokeWorkflowRequestPropertyValidationAttributesMap: {
26
32
  [property: string]: {
@@ -23,6 +23,10 @@ exports.InvokeWorkflowRequestPropertyValidationAttributesMap = {
23
23
  idempotencyKey: {
24
24
  maxLength: 255,
25
25
  },
26
+ inputPathPartIds: {
27
+ maxItems: 50,
28
+ uniqueItems: false,
29
+ },
26
30
  };
27
31
  /**
28
32
  * Check if a given object implements the InvokeWorkflowRequest interface.
@@ -39,6 +43,7 @@ function InvokeWorkflowRequestFromJSONTyped(json, ignoreDiscriminator) {
39
43
  }
40
44
  return {
41
45
  'idempotencyKey': json['idempotency_key'] == null ? undefined : json['idempotency_key'],
46
+ 'inputPathPartIds': json['input_path_part_ids'] == null ? undefined : json['input_path_part_ids'],
42
47
  };
43
48
  }
44
49
  function InvokeWorkflowRequestToJSON(json) {
@@ -50,5 +55,6 @@ function InvokeWorkflowRequestToJSONTyped(value, ignoreDiscriminator = false) {
50
55
  }
51
56
  return {
52
57
  'idempotency_key': value['idempotencyKey'],
58
+ 'input_path_part_ids': value['inputPathPartIds'],
53
59
  };
54
60
  }
@@ -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;
@@ -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;