@knowledge-stack/ksapi 1.81.0 → 1.82.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.
- package/.openapi-generator/FILES +2 -0
- package/README.md +3 -2
- package/dist/apis/WorkflowDefinitionsApi.d.ts +4 -1
- package/dist/apis/WorkflowDefinitionsApi.js +2 -0
- package/dist/esm/apis/WorkflowDefinitionsApi.d.ts +4 -1
- package/dist/esm/apis/WorkflowDefinitionsApi.js +2 -0
- package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +8 -1
- package/dist/esm/models/CreateWorkflowDefinitionRequest.js +1 -4
- package/dist/esm/models/InstructionSnapshot.d.ts +71 -0
- package/dist/esm/models/InstructionSnapshot.js +57 -0
- package/dist/esm/models/InvokeWorkflowRequest.d.ts +6 -0
- package/dist/esm/models/InvokeWorkflowRequest.js +6 -0
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +6 -1
- package/dist/esm/models/WorkflowRunResponse.d.ts +17 -0
- package/dist/esm/models/WorkflowRunResponse.js +8 -0
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +3 -2
- package/dist/esm/models/WorkflowRunSnapshot.js +3 -2
- package/dist/esm/models/WorkflowRunnerType.d.ts +1 -0
- package/dist/esm/models/WorkflowRunnerType.js +2 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/CreateWorkflowDefinitionRequest.d.ts +8 -1
- package/dist/models/CreateWorkflowDefinitionRequest.js +1 -4
- package/dist/models/InstructionSnapshot.d.ts +71 -0
- package/dist/models/InstructionSnapshot.js +65 -0
- package/dist/models/InvokeWorkflowRequest.d.ts +6 -0
- package/dist/models/InvokeWorkflowRequest.js +6 -0
- package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +6 -1
- package/dist/models/WorkflowRunResponse.d.ts +17 -0
- package/dist/models/WorkflowRunResponse.js +8 -0
- package/dist/models/WorkflowRunSnapshot.d.ts +3 -2
- package/dist/models/WorkflowRunSnapshot.js +3 -2
- package/dist/models/WorkflowRunnerType.d.ts +1 -0
- package/dist/models/WorkflowRunnerType.js +2 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/CreateWorkflowDefinitionRequest.md +1 -1
- package/docs/InstructionSnapshot.md +41 -0
- package/docs/InvokeWorkflowRequest.md +2 -0
- package/docs/UpdateWorkflowDefinitionRequest.md +1 -1
- package/docs/WorkflowDefinitionsApi.md +2 -0
- package/docs/WorkflowRunResponse.md +5 -1
- package/docs/WorkflowRunSnapshot.md +1 -1
- package/package.json +1 -1
- package/src/apis/WorkflowDefinitionsApi.ts +4 -1
- package/src/models/CreateWorkflowDefinitionRequest.ts +9 -4
- package/src/models/InstructionSnapshot.ts +125 -0
- package/src/models/InvokeWorkflowRequest.ts +12 -0
- package/src/models/UpdateWorkflowDefinitionRequest.ts +6 -1
- package/src/models/WorkflowRunResponse.ts +23 -0
- package/src/models/WorkflowRunSnapshot.ts +11 -4
- package/src/models/WorkflowRunnerType.ts +2 -1
- package/src/models/index.ts +1 -0
|
@@ -29,7 +29,12 @@ import {
|
|
|
29
29
|
} from './WorkflowRunnerType';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* Full replacement (PUT semantics).
|
|
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
|
*/
|
|
@@ -37,6 +37,11 @@ import {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Workflow run response.
|
|
40
|
+
*
|
|
41
|
+
* Note: ``run_token_jti`` is intentionally NOT exposed. It's an
|
|
42
|
+
* internal token identifier persisted on the run row for callback
|
|
43
|
+
* auth — clients should treat run dispatch state as observable via
|
|
44
|
+
* ``status`` (RUNNING => dispatched), not via JTI presence.
|
|
40
45
|
* @export
|
|
41
46
|
* @interface WorkflowRunResponse
|
|
42
47
|
*/
|
|
@@ -95,6 +100,18 @@ export interface WorkflowRunResponse {
|
|
|
95
100
|
* @memberof WorkflowRunResponse
|
|
96
101
|
*/
|
|
97
102
|
error: string | null;
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @type {Array<string>}
|
|
106
|
+
* @memberof WorkflowRunResponse
|
|
107
|
+
*/
|
|
108
|
+
inputPathPartIds: Array<string>;
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @type {Array<string>}
|
|
112
|
+
* @memberof WorkflowRunResponse
|
|
113
|
+
*/
|
|
114
|
+
inputVersionIds: Array<string>;
|
|
98
115
|
/**
|
|
99
116
|
*
|
|
100
117
|
* @type {Date}
|
|
@@ -141,6 +158,8 @@ export function instanceOfWorkflowRunResponse(value: object): value is WorkflowR
|
|
|
141
158
|
if (!('completedAt' in value) || value['completedAt'] === undefined) return false;
|
|
142
159
|
if (!('runSnapshot' in value) || value['runSnapshot'] === undefined) return false;
|
|
143
160
|
if (!('error' in value) || value['error'] === undefined) return false;
|
|
161
|
+
if (!('inputPathPartIds' in value) || value['inputPathPartIds'] === undefined) return false;
|
|
162
|
+
if (!('inputVersionIds' in value) || value['inputVersionIds'] === undefined) return false;
|
|
144
163
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
145
164
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
146
165
|
return true;
|
|
@@ -165,6 +184,8 @@ export function WorkflowRunResponseFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
165
184
|
'completedAt': (json['completed_at'] == null ? null : new Date(json['completed_at'])),
|
|
166
185
|
'runSnapshot': WorkflowRunSnapshotFromJSON(json['run_snapshot']),
|
|
167
186
|
'error': json['error'],
|
|
187
|
+
'inputPathPartIds': json['input_path_part_ids'],
|
|
188
|
+
'inputVersionIds': json['input_version_ids'],
|
|
168
189
|
'createdAt': (new Date(json['created_at'])),
|
|
169
190
|
'updatedAt': (new Date(json['updated_at'])),
|
|
170
191
|
};
|
|
@@ -190,6 +211,8 @@ export function WorkflowRunResponseToJSONTyped(value?: WorkflowRunResponse | nul
|
|
|
190
211
|
'completed_at': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
|
|
191
212
|
'run_snapshot': WorkflowRunSnapshotToJSON(value['runSnapshot']),
|
|
192
213
|
'error': value['error'],
|
|
214
|
+
'input_path_part_ids': value['inputPathPartIds'],
|
|
215
|
+
'input_version_ids': value['inputVersionIds'],
|
|
193
216
|
'created_at': value['createdAt'].toISOString(),
|
|
194
217
|
'updated_at': value['updatedAt'].toISOString(),
|
|
195
218
|
};
|
|
@@ -20,6 +20,13 @@ import {
|
|
|
20
20
|
ABCDPathSnapshotToJSON,
|
|
21
21
|
ABCDPathSnapshotToJSONTyped,
|
|
22
22
|
} from './ABCDPathSnapshot';
|
|
23
|
+
import type { InstructionSnapshot } from './InstructionSnapshot';
|
|
24
|
+
import {
|
|
25
|
+
InstructionSnapshotFromJSON,
|
|
26
|
+
InstructionSnapshotFromJSONTyped,
|
|
27
|
+
InstructionSnapshotToJSON,
|
|
28
|
+
InstructionSnapshotToJSONTyped,
|
|
29
|
+
} from './InstructionSnapshot';
|
|
23
30
|
import type { WorkflowRunnerType } from './WorkflowRunnerType';
|
|
24
31
|
import {
|
|
25
32
|
WorkflowRunnerTypeFromJSON,
|
|
@@ -72,10 +79,10 @@ export interface WorkflowRunSnapshot {
|
|
|
72
79
|
sources: Array<ABCDPathSnapshot>;
|
|
73
80
|
/**
|
|
74
81
|
*
|
|
75
|
-
* @type {Array<
|
|
82
|
+
* @type {Array<InstructionSnapshot>}
|
|
76
83
|
* @memberof WorkflowRunSnapshot
|
|
77
84
|
*/
|
|
78
|
-
instructions: Array<
|
|
85
|
+
instructions: Array<InstructionSnapshot>;
|
|
79
86
|
/**
|
|
80
87
|
*
|
|
81
88
|
* @type {Array<ABCDPathSnapshot>}
|
|
@@ -141,7 +148,7 @@ export function WorkflowRunSnapshotFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
141
148
|
'userId': json['user_id'],
|
|
142
149
|
'maxRunDurationSeconds': json['max_run_duration_seconds'],
|
|
143
150
|
'sources': ((json['sources'] as Array<any>).map(ABCDPathSnapshotFromJSON)),
|
|
144
|
-
'instructions': ((json['instructions'] as Array<any>).map(
|
|
151
|
+
'instructions': ((json['instructions'] as Array<any>).map(InstructionSnapshotFromJSON)),
|
|
145
152
|
'outputs': ((json['outputs'] as Array<any>).map(ABCDPathSnapshotFromJSON)),
|
|
146
153
|
'template': ABCDPathSnapshotFromJSON(json['template']),
|
|
147
154
|
};
|
|
@@ -164,7 +171,7 @@ export function WorkflowRunSnapshotToJSONTyped(value?: WorkflowRunSnapshot | nul
|
|
|
164
171
|
'user_id': value['userId'],
|
|
165
172
|
'max_run_duration_seconds': value['maxRunDurationSeconds'],
|
|
166
173
|
'sources': ((value['sources'] as Array<any>).map(ABCDPathSnapshotToJSON)),
|
|
167
|
-
'instructions': ((value['instructions'] as Array<any>).map(
|
|
174
|
+
'instructions': ((value['instructions'] as Array<any>).map(InstructionSnapshotToJSON)),
|
|
168
175
|
'outputs': ((value['outputs'] as Array<any>).map(ABCDPathSnapshotToJSON)),
|
|
169
176
|
'template': ABCDPathSnapshotToJSON(value['template']),
|
|
170
177
|
};
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
* @export
|
|
19
19
|
*/
|
|
20
20
|
export const WorkflowRunnerType = {
|
|
21
|
-
SelfHosted: 'SELF_HOSTED'
|
|
21
|
+
SelfHosted: 'SELF_HOSTED',
|
|
22
|
+
KsInternal: 'KS_INTERNAL'
|
|
22
23
|
} as const;
|
|
23
24
|
export type WorkflowRunnerType = typeof WorkflowRunnerType[keyof typeof WorkflowRunnerType];
|
|
24
25
|
|
package/src/models/index.ts
CHANGED
|
@@ -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';
|