@knowledge-stack/ksapi 1.56.0 → 1.58.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 +14 -2
- package/README.md +14 -6
- package/dist/apis/DocumentVersionsApi.d.ts +8 -5
- package/dist/apis/DocumentVersionsApi.js +5 -2
- package/dist/apis/ThreadMessagesApi.d.ts +6 -6
- package/dist/apis/ThreadMessagesApi.js +2 -2
- package/dist/apis/WorkflowsApi.d.ts +144 -59
- package/dist/apis/WorkflowsApi.js +131 -49
- package/dist/esm/apis/DocumentVersionsApi.d.ts +8 -5
- package/dist/esm/apis/DocumentVersionsApi.js +5 -2
- package/dist/esm/apis/ThreadMessagesApi.d.ts +6 -6
- package/dist/esm/apis/ThreadMessagesApi.js +2 -2
- package/dist/esm/apis/WorkflowsApi.d.ts +144 -59
- package/dist/esm/apis/WorkflowsApi.js +132 -50
- package/dist/esm/models/CreateThreadMessageRequest.d.ts +6 -0
- package/dist/esm/models/CreateThreadMessageRequest.js +2 -0
- package/dist/esm/models/DocumentVersionContentTypeFilter.d.ts +25 -0
- package/dist/esm/models/DocumentVersionContentTypeFilter.js +43 -0
- package/dist/esm/models/EnrichedThreadMessageContent.d.ts +13 -0
- package/dist/esm/models/EnrichedThreadMessageContent.js +5 -0
- package/dist/esm/models/NonFilesystemReferenceType.d.ts +27 -0
- package/dist/esm/models/NonFilesystemReferenceType.js +45 -0
- package/dist/esm/models/ReferenceType.d.ts +34 -0
- package/dist/esm/models/ReferenceType.js +52 -0
- package/dist/esm/models/ResolvedReferenceInput.d.ts +70 -0
- package/dist/esm/models/ResolvedReferenceInput.js +55 -0
- package/dist/esm/models/ResolvedReferenceOutput.d.ts +69 -0
- package/dist/esm/models/ResolvedReferenceOutput.js +54 -0
- package/dist/esm/models/StepInput.d.ts +6 -0
- package/dist/esm/models/StepInput.js +4 -0
- package/dist/esm/models/StepKind.d.ts +1 -0
- package/dist/esm/models/StepKind.js +1 -0
- package/dist/esm/models/StepOutput.d.ts +6 -0
- package/dist/esm/models/StepOutput.js +4 -0
- package/dist/esm/models/TemporalWorkflowStatusResponse.d.ts +83 -0
- package/dist/esm/models/TemporalWorkflowStatusResponse.js +66 -0
- package/dist/esm/models/ThreadMessageContent.d.ts +13 -0
- package/dist/esm/models/ThreadMessageContent.js +5 -0
- package/dist/esm/models/WorkflowActionResponse.d.ts +1 -1
- package/dist/esm/models/WorkflowCancelResponse.d.ts +53 -0
- package/dist/esm/models/WorkflowCancelResponse.js +48 -0
- package/dist/esm/models/index.d.ts +7 -1
- package/dist/esm/models/index.js +7 -1
- package/dist/models/CreateThreadMessageRequest.d.ts +6 -0
- package/dist/models/CreateThreadMessageRequest.js +2 -0
- package/dist/models/DocumentVersionContentTypeFilter.d.ts +25 -0
- package/dist/models/DocumentVersionContentTypeFilter.js +51 -0
- package/dist/models/EnrichedThreadMessageContent.d.ts +13 -0
- package/dist/models/EnrichedThreadMessageContent.js +5 -0
- package/dist/models/NonFilesystemReferenceType.d.ts +27 -0
- package/dist/models/NonFilesystemReferenceType.js +53 -0
- package/dist/models/ReferenceType.d.ts +34 -0
- package/dist/models/ReferenceType.js +60 -0
- package/dist/models/ResolvedReferenceInput.d.ts +70 -0
- package/dist/models/ResolvedReferenceInput.js +63 -0
- package/dist/models/ResolvedReferenceOutput.d.ts +69 -0
- package/dist/models/ResolvedReferenceOutput.js +62 -0
- package/dist/models/StepInput.d.ts +6 -0
- package/dist/models/StepInput.js +4 -0
- package/dist/models/StepKind.d.ts +1 -0
- package/dist/models/StepKind.js +1 -0
- package/dist/models/StepOutput.d.ts +6 -0
- package/dist/models/StepOutput.js +4 -0
- package/dist/models/TemporalWorkflowStatusResponse.d.ts +83 -0
- package/dist/models/TemporalWorkflowStatusResponse.js +74 -0
- package/dist/models/ThreadMessageContent.d.ts +13 -0
- package/dist/models/ThreadMessageContent.js +5 -0
- package/dist/models/WorkflowActionResponse.d.ts +1 -1
- package/dist/models/WorkflowCancelResponse.d.ts +53 -0
- package/dist/models/WorkflowCancelResponse.js +56 -0
- package/dist/models/index.d.ts +7 -1
- package/dist/models/index.js +7 -1
- package/docs/CreateThreadMessageRequest.md +2 -0
- package/docs/DocumentVersionContentTypeFilter.md +33 -0
- package/docs/DocumentVersionsApi.md +5 -2
- package/docs/EnrichedThreadMessageContent.md +4 -0
- package/docs/NonFilesystemReferenceType.md +33 -0
- package/docs/{WorkflowAction.md → ReferenceType.md} +4 -5
- package/docs/ResolvedReferenceInput.md +41 -0
- package/docs/ResolvedReferenceOutput.md +41 -0
- package/docs/StepInput.md +2 -0
- package/docs/StepOutput.md +2 -0
- package/docs/TemporalWorkflowStatusResponse.md +47 -0
- package/docs/ThreadMessageContent.md +4 -0
- package/docs/ThreadMessagesApi.md +3 -3
- package/docs/WorkflowActionResponse.md +1 -1
- package/docs/WorkflowCancelResponse.md +37 -0
- package/docs/WorkflowsApi.md +183 -36
- package/package.json +1 -1
- package/src/apis/DocumentVersionsApi.ts +14 -4
- package/src/apis/ThreadMessagesApi.ts +6 -6
- package/src/apis/WorkflowsApi.ts +249 -90
- package/src/models/CreateThreadMessageRequest.ts +8 -0
- package/src/models/DocumentVersionContentTypeFilter.ts +53 -0
- package/src/models/EnrichedThreadMessageContent.ts +23 -0
- package/src/models/NonFilesystemReferenceType.ts +55 -0
- package/src/models/ReferenceType.ts +62 -0
- package/src/models/ResolvedReferenceInput.ts +123 -0
- package/src/models/ResolvedReferenceOutput.ts +113 -0
- package/src/models/StepInput.ts +9 -0
- package/src/models/StepKind.ts +1 -0
- package/src/models/StepOutput.ts +9 -0
- package/src/models/TemporalWorkflowStatusResponse.ts +136 -0
- package/src/models/ThreadMessageContent.ts +23 -0
- package/src/models/WorkflowActionResponse.ts +1 -1
- package/src/models/WorkflowCancelResponse.ts +92 -0
- package/src/models/index.ts +7 -1
- package/dist/esm/models/WorkflowAction.d.ts +0 -25
- package/dist/esm/models/WorkflowAction.js +0 -43
- package/dist/models/WorkflowAction.d.ts +0 -25
- package/dist/models/WorkflowAction.js +0 -51
- package/src/models/WorkflowAction.ts +0 -53
package/src/apis/WorkflowsApi.ts
CHANGED
|
@@ -17,8 +17,9 @@ import * as runtime from '../runtime';
|
|
|
17
17
|
import type {
|
|
18
18
|
HTTPValidationError,
|
|
19
19
|
PaginatedResponseWorkflowSummaryResponse,
|
|
20
|
-
|
|
20
|
+
TemporalWorkflowStatusResponse,
|
|
21
21
|
WorkflowActionResponse,
|
|
22
|
+
WorkflowCancelResponse,
|
|
22
23
|
WorkflowDetailResponse,
|
|
23
24
|
} from '../models/index';
|
|
24
25
|
import {
|
|
@@ -26,30 +27,43 @@ import {
|
|
|
26
27
|
HTTPValidationErrorToJSON,
|
|
27
28
|
PaginatedResponseWorkflowSummaryResponseFromJSON,
|
|
28
29
|
PaginatedResponseWorkflowSummaryResponseToJSON,
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
TemporalWorkflowStatusResponseFromJSON,
|
|
31
|
+
TemporalWorkflowStatusResponseToJSON,
|
|
31
32
|
WorkflowActionResponseFromJSON,
|
|
32
33
|
WorkflowActionResponseToJSON,
|
|
34
|
+
WorkflowCancelResponseFromJSON,
|
|
35
|
+
WorkflowCancelResponseToJSON,
|
|
33
36
|
WorkflowDetailResponseFromJSON,
|
|
34
37
|
WorkflowDetailResponseToJSON,
|
|
35
38
|
} from '../models/index';
|
|
36
39
|
|
|
37
|
-
export interface
|
|
40
|
+
export interface CancelTemporalWorkflowRequest {
|
|
38
41
|
workflowId: string;
|
|
39
42
|
authorization?: string | null;
|
|
40
43
|
ksUat?: string | null;
|
|
41
44
|
}
|
|
42
45
|
|
|
43
|
-
export interface
|
|
44
|
-
|
|
45
|
-
offset?: number;
|
|
46
|
+
export interface DvWorkflowRerunRequest {
|
|
47
|
+
workflowId: string;
|
|
46
48
|
authorization?: string | null;
|
|
47
49
|
ksUat?: string | null;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
export interface
|
|
52
|
+
export interface GetDvWorkflowRequest {
|
|
51
53
|
workflowId: string;
|
|
52
|
-
|
|
54
|
+
authorization?: string | null;
|
|
55
|
+
ksUat?: string | null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface GetTemporalWorkflowStatusRequest {
|
|
59
|
+
workflowId: string;
|
|
60
|
+
authorization?: string | null;
|
|
61
|
+
ksUat?: string | null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ListDvWorkflowsRequest {
|
|
65
|
+
limit?: number;
|
|
66
|
+
offset?: number;
|
|
53
67
|
authorization?: string | null;
|
|
54
68
|
ksUat?: string | null;
|
|
55
69
|
}
|
|
@@ -62,18 +76,18 @@ export interface WorkflowActionRequest {
|
|
|
62
76
|
*/
|
|
63
77
|
export interface WorkflowsApiInterface {
|
|
64
78
|
/**
|
|
65
|
-
* Creates request options for
|
|
79
|
+
* Creates request options for cancelTemporalWorkflow without sending the request
|
|
66
80
|
* @param {string} workflowId
|
|
67
81
|
* @param {string} [authorization]
|
|
68
82
|
* @param {string} [ksUat]
|
|
69
83
|
* @throws {RequiredError}
|
|
70
84
|
* @memberof WorkflowsApiInterface
|
|
71
85
|
*/
|
|
72
|
-
|
|
86
|
+
cancelTemporalWorkflowRequestOpts(requestParameters: CancelTemporalWorkflowRequest): Promise<runtime.RequestOpts>;
|
|
73
87
|
|
|
74
88
|
/**
|
|
75
|
-
*
|
|
76
|
-
* @summary
|
|
89
|
+
* Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side.
|
|
90
|
+
* @summary Cancel Temporal Workflow Handler
|
|
77
91
|
* @param {string} workflowId
|
|
78
92
|
* @param {string} [authorization]
|
|
79
93
|
* @param {string} [ksUat]
|
|
@@ -81,73 +95,127 @@ export interface WorkflowsApiInterface {
|
|
|
81
95
|
* @throws {RequiredError}
|
|
82
96
|
* @memberof WorkflowsApiInterface
|
|
83
97
|
*/
|
|
84
|
-
|
|
98
|
+
cancelTemporalWorkflowRaw(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowCancelResponse>>;
|
|
85
99
|
|
|
86
100
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
101
|
+
* Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side.
|
|
102
|
+
* Cancel Temporal Workflow Handler
|
|
89
103
|
*/
|
|
90
|
-
|
|
104
|
+
cancelTemporalWorkflow(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowCancelResponse>;
|
|
91
105
|
|
|
92
106
|
/**
|
|
93
|
-
* Creates request options for
|
|
94
|
-
* @param {
|
|
95
|
-
* @param {number} [offset] Number of items to skip
|
|
107
|
+
* Creates request options for dvWorkflowRerun without sending the request
|
|
108
|
+
* @param {string} workflowId
|
|
96
109
|
* @param {string} [authorization]
|
|
97
110
|
* @param {string} [ksUat]
|
|
98
111
|
* @throws {RequiredError}
|
|
99
112
|
* @memberof WorkflowsApiInterface
|
|
100
113
|
*/
|
|
101
|
-
|
|
114
|
+
dvWorkflowRerunRequestOpts(requestParameters: DvWorkflowRerunRequest): Promise<runtime.RequestOpts>;
|
|
102
115
|
|
|
103
116
|
/**
|
|
104
|
-
*
|
|
105
|
-
* @summary
|
|
106
|
-
* @param {
|
|
107
|
-
* @param {number} [offset] Number of items to skip
|
|
117
|
+
* Rerun a workflow. USER role requires ``can_write`` on the document path.
|
|
118
|
+
* @summary Dv Workflow Rerun Handler
|
|
119
|
+
* @param {string} workflowId
|
|
108
120
|
* @param {string} [authorization]
|
|
109
121
|
* @param {string} [ksUat]
|
|
110
122
|
* @param {*} [options] Override http request option.
|
|
111
123
|
* @throws {RequiredError}
|
|
112
124
|
* @memberof WorkflowsApiInterface
|
|
113
125
|
*/
|
|
114
|
-
|
|
126
|
+
dvWorkflowRerunRaw(requestParameters: DvWorkflowRerunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowActionResponse>>;
|
|
115
127
|
|
|
116
128
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
129
|
+
* Rerun a workflow. USER role requires ``can_write`` on the document path.
|
|
130
|
+
* Dv Workflow Rerun Handler
|
|
119
131
|
*/
|
|
120
|
-
|
|
132
|
+
dvWorkflowRerun(requestParameters: DvWorkflowRerunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowActionResponse>;
|
|
121
133
|
|
|
122
134
|
/**
|
|
123
|
-
* Creates request options for
|
|
135
|
+
* Creates request options for getDvWorkflow without sending the request
|
|
124
136
|
* @param {string} workflowId
|
|
125
|
-
* @param {WorkflowAction} action Action to perform
|
|
126
137
|
* @param {string} [authorization]
|
|
127
138
|
* @param {string} [ksUat]
|
|
128
139
|
* @throws {RequiredError}
|
|
129
140
|
* @memberof WorkflowsApiInterface
|
|
130
141
|
*/
|
|
131
|
-
|
|
142
|
+
getDvWorkflowRequestOpts(requestParameters: GetDvWorkflowRequest): Promise<runtime.RequestOpts>;
|
|
132
143
|
|
|
133
144
|
/**
|
|
134
|
-
*
|
|
135
|
-
* @summary Workflow
|
|
145
|
+
* Get single workflow detail with live Temporal status.
|
|
146
|
+
* @summary Get Dv Workflow Handler
|
|
136
147
|
* @param {string} workflowId
|
|
137
|
-
* @param {WorkflowAction} action Action to perform
|
|
138
148
|
* @param {string} [authorization]
|
|
139
149
|
* @param {string} [ksUat]
|
|
140
150
|
* @param {*} [options] Override http request option.
|
|
141
151
|
* @throws {RequiredError}
|
|
142
152
|
* @memberof WorkflowsApiInterface
|
|
143
153
|
*/
|
|
144
|
-
|
|
154
|
+
getDvWorkflowRaw(requestParameters: GetDvWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowDetailResponse>>;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Get single workflow detail with live Temporal status.
|
|
158
|
+
* Get Dv Workflow Handler
|
|
159
|
+
*/
|
|
160
|
+
getDvWorkflow(requestParameters: GetDvWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowDetailResponse>;
|
|
145
161
|
|
|
146
162
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
163
|
+
* Creates request options for getTemporalWorkflowStatus without sending the request
|
|
164
|
+
* @param {string} workflowId
|
|
165
|
+
* @param {string} [authorization]
|
|
166
|
+
* @param {string} [ksUat]
|
|
167
|
+
* @throws {RequiredError}
|
|
168
|
+
* @memberof WorkflowsApiInterface
|
|
149
169
|
*/
|
|
150
|
-
|
|
170
|
+
getTemporalWorkflowStatusRequestOpts(requestParameters: GetTemporalWorkflowStatusRequest): Promise<runtime.RequestOpts>;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Get live Temporal status for any workflow owned by the caller\'s tenant.
|
|
174
|
+
* @summary Get Temporal Workflow Status Handler
|
|
175
|
+
* @param {string} workflowId
|
|
176
|
+
* @param {string} [authorization]
|
|
177
|
+
* @param {string} [ksUat]
|
|
178
|
+
* @param {*} [options] Override http request option.
|
|
179
|
+
* @throws {RequiredError}
|
|
180
|
+
* @memberof WorkflowsApiInterface
|
|
181
|
+
*/
|
|
182
|
+
getTemporalWorkflowStatusRaw(requestParameters: GetTemporalWorkflowStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TemporalWorkflowStatusResponse>>;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Get live Temporal status for any workflow owned by the caller\'s tenant.
|
|
186
|
+
* Get Temporal Workflow Status Handler
|
|
187
|
+
*/
|
|
188
|
+
getTemporalWorkflowStatus(requestParameters: GetTemporalWorkflowStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TemporalWorkflowStatusResponse>;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Creates request options for listDvWorkflows without sending the request
|
|
192
|
+
* @param {number} [limit] Number of items per page
|
|
193
|
+
* @param {number} [offset] Number of items to skip
|
|
194
|
+
* @param {string} [authorization]
|
|
195
|
+
* @param {string} [ksUat]
|
|
196
|
+
* @throws {RequiredError}
|
|
197
|
+
* @memberof WorkflowsApiInterface
|
|
198
|
+
*/
|
|
199
|
+
listDvWorkflowsRequestOpts(requestParameters: ListDvWorkflowsRequest): Promise<runtime.RequestOpts>;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* List all workflows for the current tenant (paginated, DB-backed). ADMIN/OWNER see all workflows; USER sees only those under permitted paths.
|
|
203
|
+
* @summary List Dv Workflows Handler
|
|
204
|
+
* @param {number} [limit] Number of items per page
|
|
205
|
+
* @param {number} [offset] Number of items to skip
|
|
206
|
+
* @param {string} [authorization]
|
|
207
|
+
* @param {string} [ksUat]
|
|
208
|
+
* @param {*} [options] Override http request option.
|
|
209
|
+
* @throws {RequiredError}
|
|
210
|
+
* @memberof WorkflowsApiInterface
|
|
211
|
+
*/
|
|
212
|
+
listDvWorkflowsRaw(requestParameters: ListDvWorkflowsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseWorkflowSummaryResponse>>;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* List all workflows for the current tenant (paginated, DB-backed). ADMIN/OWNER see all workflows; USER sees only those under permitted paths.
|
|
216
|
+
* List Dv Workflows Handler
|
|
217
|
+
*/
|
|
218
|
+
listDvWorkflows(requestParameters: ListDvWorkflowsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseWorkflowSummaryResponse>;
|
|
151
219
|
|
|
152
220
|
}
|
|
153
221
|
|
|
@@ -157,13 +225,13 @@ export interface WorkflowsApiInterface {
|
|
|
157
225
|
export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterface {
|
|
158
226
|
|
|
159
227
|
/**
|
|
160
|
-
* Creates request options for
|
|
228
|
+
* Creates request options for cancelTemporalWorkflow without sending the request
|
|
161
229
|
*/
|
|
162
|
-
async
|
|
230
|
+
async cancelTemporalWorkflowRequestOpts(requestParameters: CancelTemporalWorkflowRequest): Promise<runtime.RequestOpts> {
|
|
163
231
|
if (requestParameters['workflowId'] == null) {
|
|
164
232
|
throw new runtime.RequiredError(
|
|
165
233
|
'workflowId',
|
|
166
|
-
'Required parameter "workflowId" was null or undefined when calling
|
|
234
|
+
'Required parameter "workflowId" was null or undefined when calling cancelTemporalWorkflow().'
|
|
167
235
|
);
|
|
168
236
|
}
|
|
169
237
|
|
|
@@ -181,46 +249,96 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
|
|
|
181
249
|
|
|
182
250
|
return {
|
|
183
251
|
path: urlPath,
|
|
184
|
-
method: '
|
|
252
|
+
method: 'DELETE',
|
|
185
253
|
headers: headerParameters,
|
|
186
254
|
query: queryParameters,
|
|
187
255
|
};
|
|
188
256
|
}
|
|
189
257
|
|
|
190
258
|
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
259
|
+
* Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side.
|
|
260
|
+
* Cancel Temporal Workflow Handler
|
|
193
261
|
*/
|
|
194
|
-
async
|
|
195
|
-
const requestOptions = await this.
|
|
262
|
+
async cancelTemporalWorkflowRaw(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowCancelResponse>> {
|
|
263
|
+
const requestOptions = await this.cancelTemporalWorkflowRequestOpts(requestParameters);
|
|
196
264
|
const response = await this.request(requestOptions, initOverrides);
|
|
197
265
|
|
|
198
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
266
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowCancelResponseFromJSON(jsonValue));
|
|
199
267
|
}
|
|
200
268
|
|
|
201
269
|
/**
|
|
202
|
-
*
|
|
203
|
-
*
|
|
270
|
+
* Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side.
|
|
271
|
+
* Cancel Temporal Workflow Handler
|
|
204
272
|
*/
|
|
205
|
-
async
|
|
206
|
-
const response = await this.
|
|
273
|
+
async cancelTemporalWorkflow(requestParameters: CancelTemporalWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowCancelResponse> {
|
|
274
|
+
const response = await this.cancelTemporalWorkflowRaw(requestParameters, initOverrides);
|
|
207
275
|
return await response.value();
|
|
208
276
|
}
|
|
209
277
|
|
|
210
278
|
/**
|
|
211
|
-
* Creates request options for
|
|
279
|
+
* Creates request options for dvWorkflowRerun without sending the request
|
|
212
280
|
*/
|
|
213
|
-
async
|
|
281
|
+
async dvWorkflowRerunRequestOpts(requestParameters: DvWorkflowRerunRequest): Promise<runtime.RequestOpts> {
|
|
282
|
+
if (requestParameters['workflowId'] == null) {
|
|
283
|
+
throw new runtime.RequiredError(
|
|
284
|
+
'workflowId',
|
|
285
|
+
'Required parameter "workflowId" was null or undefined when calling dvWorkflowRerun().'
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
|
|
214
289
|
const queryParameters: any = {};
|
|
215
290
|
|
|
216
|
-
|
|
217
|
-
|
|
291
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
292
|
+
|
|
293
|
+
if (requestParameters['authorization'] != null) {
|
|
294
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
218
295
|
}
|
|
219
296
|
|
|
220
|
-
|
|
221
|
-
|
|
297
|
+
|
|
298
|
+
let urlPath = `/v1/workflows/document_versions/{workflow_id}`;
|
|
299
|
+
urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
|
|
300
|
+
|
|
301
|
+
return {
|
|
302
|
+
path: urlPath,
|
|
303
|
+
method: 'POST',
|
|
304
|
+
headers: headerParameters,
|
|
305
|
+
query: queryParameters,
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Rerun a workflow. USER role requires ``can_write`` on the document path.
|
|
311
|
+
* Dv Workflow Rerun Handler
|
|
312
|
+
*/
|
|
313
|
+
async dvWorkflowRerunRaw(requestParameters: DvWorkflowRerunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowActionResponse>> {
|
|
314
|
+
const requestOptions = await this.dvWorkflowRerunRequestOpts(requestParameters);
|
|
315
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
316
|
+
|
|
317
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowActionResponseFromJSON(jsonValue));
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Rerun a workflow. USER role requires ``can_write`` on the document path.
|
|
322
|
+
* Dv Workflow Rerun Handler
|
|
323
|
+
*/
|
|
324
|
+
async dvWorkflowRerun(requestParameters: DvWorkflowRerunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowActionResponse> {
|
|
325
|
+
const response = await this.dvWorkflowRerunRaw(requestParameters, initOverrides);
|
|
326
|
+
return await response.value();
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Creates request options for getDvWorkflow without sending the request
|
|
331
|
+
*/
|
|
332
|
+
async getDvWorkflowRequestOpts(requestParameters: GetDvWorkflowRequest): Promise<runtime.RequestOpts> {
|
|
333
|
+
if (requestParameters['workflowId'] == null) {
|
|
334
|
+
throw new runtime.RequiredError(
|
|
335
|
+
'workflowId',
|
|
336
|
+
'Required parameter "workflowId" was null or undefined when calling getDvWorkflow().'
|
|
337
|
+
);
|
|
222
338
|
}
|
|
223
339
|
|
|
340
|
+
const queryParameters: any = {};
|
|
341
|
+
|
|
224
342
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
225
343
|
|
|
226
344
|
if (requestParameters['authorization'] != null) {
|
|
@@ -228,7 +346,8 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
|
|
|
228
346
|
}
|
|
229
347
|
|
|
230
348
|
|
|
231
|
-
let urlPath = `/v1/workflows`;
|
|
349
|
+
let urlPath = `/v1/workflows/document_versions/{workflow_id}`;
|
|
350
|
+
urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
|
|
232
351
|
|
|
233
352
|
return {
|
|
234
353
|
path: urlPath,
|
|
@@ -239,47 +358,88 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
|
|
|
239
358
|
}
|
|
240
359
|
|
|
241
360
|
/**
|
|
242
|
-
*
|
|
243
|
-
*
|
|
361
|
+
* Get single workflow detail with live Temporal status.
|
|
362
|
+
* Get Dv Workflow Handler
|
|
244
363
|
*/
|
|
245
|
-
async
|
|
246
|
-
const requestOptions = await this.
|
|
364
|
+
async getDvWorkflowRaw(requestParameters: GetDvWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowDetailResponse>> {
|
|
365
|
+
const requestOptions = await this.getDvWorkflowRequestOpts(requestParameters);
|
|
247
366
|
const response = await this.request(requestOptions, initOverrides);
|
|
248
367
|
|
|
249
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
368
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowDetailResponseFromJSON(jsonValue));
|
|
250
369
|
}
|
|
251
370
|
|
|
252
371
|
/**
|
|
253
|
-
*
|
|
254
|
-
*
|
|
372
|
+
* Get single workflow detail with live Temporal status.
|
|
373
|
+
* Get Dv Workflow Handler
|
|
255
374
|
*/
|
|
256
|
-
async
|
|
257
|
-
const response = await this.
|
|
375
|
+
async getDvWorkflow(requestParameters: GetDvWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowDetailResponse> {
|
|
376
|
+
const response = await this.getDvWorkflowRaw(requestParameters, initOverrides);
|
|
258
377
|
return await response.value();
|
|
259
378
|
}
|
|
260
379
|
|
|
261
380
|
/**
|
|
262
|
-
* Creates request options for
|
|
381
|
+
* Creates request options for getTemporalWorkflowStatus without sending the request
|
|
263
382
|
*/
|
|
264
|
-
async
|
|
383
|
+
async getTemporalWorkflowStatusRequestOpts(requestParameters: GetTemporalWorkflowStatusRequest): Promise<runtime.RequestOpts> {
|
|
265
384
|
if (requestParameters['workflowId'] == null) {
|
|
266
385
|
throw new runtime.RequiredError(
|
|
267
386
|
'workflowId',
|
|
268
|
-
'Required parameter "workflowId" was null or undefined when calling
|
|
387
|
+
'Required parameter "workflowId" was null or undefined when calling getTemporalWorkflowStatus().'
|
|
269
388
|
);
|
|
270
389
|
}
|
|
271
390
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
391
|
+
const queryParameters: any = {};
|
|
392
|
+
|
|
393
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
394
|
+
|
|
395
|
+
if (requestParameters['authorization'] != null) {
|
|
396
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
277
397
|
}
|
|
278
398
|
|
|
399
|
+
|
|
400
|
+
let urlPath = `/v1/workflows/{workflow_id}`;
|
|
401
|
+
urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
|
|
402
|
+
|
|
403
|
+
return {
|
|
404
|
+
path: urlPath,
|
|
405
|
+
method: 'GET',
|
|
406
|
+
headers: headerParameters,
|
|
407
|
+
query: queryParameters,
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Get live Temporal status for any workflow owned by the caller\'s tenant.
|
|
413
|
+
* Get Temporal Workflow Status Handler
|
|
414
|
+
*/
|
|
415
|
+
async getTemporalWorkflowStatusRaw(requestParameters: GetTemporalWorkflowStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TemporalWorkflowStatusResponse>> {
|
|
416
|
+
const requestOptions = await this.getTemporalWorkflowStatusRequestOpts(requestParameters);
|
|
417
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
418
|
+
|
|
419
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TemporalWorkflowStatusResponseFromJSON(jsonValue));
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Get live Temporal status for any workflow owned by the caller\'s tenant.
|
|
424
|
+
* Get Temporal Workflow Status Handler
|
|
425
|
+
*/
|
|
426
|
+
async getTemporalWorkflowStatus(requestParameters: GetTemporalWorkflowStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TemporalWorkflowStatusResponse> {
|
|
427
|
+
const response = await this.getTemporalWorkflowStatusRaw(requestParameters, initOverrides);
|
|
428
|
+
return await response.value();
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Creates request options for listDvWorkflows without sending the request
|
|
433
|
+
*/
|
|
434
|
+
async listDvWorkflowsRequestOpts(requestParameters: ListDvWorkflowsRequest): Promise<runtime.RequestOpts> {
|
|
279
435
|
const queryParameters: any = {};
|
|
280
436
|
|
|
281
|
-
if (requestParameters['
|
|
282
|
-
queryParameters['
|
|
437
|
+
if (requestParameters['limit'] != null) {
|
|
438
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
if (requestParameters['offset'] != null) {
|
|
442
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
283
443
|
}
|
|
284
444
|
|
|
285
445
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -289,34 +449,33 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
|
|
|
289
449
|
}
|
|
290
450
|
|
|
291
451
|
|
|
292
|
-
let urlPath = `/v1/workflows/
|
|
293
|
-
urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
|
|
452
|
+
let urlPath = `/v1/workflows/document_versions`;
|
|
294
453
|
|
|
295
454
|
return {
|
|
296
455
|
path: urlPath,
|
|
297
|
-
method: '
|
|
456
|
+
method: 'GET',
|
|
298
457
|
headers: headerParameters,
|
|
299
458
|
query: queryParameters,
|
|
300
459
|
};
|
|
301
460
|
}
|
|
302
461
|
|
|
303
462
|
/**
|
|
304
|
-
*
|
|
305
|
-
*
|
|
463
|
+
* List all workflows for the current tenant (paginated, DB-backed). ADMIN/OWNER see all workflows; USER sees only those under permitted paths.
|
|
464
|
+
* List Dv Workflows Handler
|
|
306
465
|
*/
|
|
307
|
-
async
|
|
308
|
-
const requestOptions = await this.
|
|
466
|
+
async listDvWorkflowsRaw(requestParameters: ListDvWorkflowsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseWorkflowSummaryResponse>> {
|
|
467
|
+
const requestOptions = await this.listDvWorkflowsRequestOpts(requestParameters);
|
|
309
468
|
const response = await this.request(requestOptions, initOverrides);
|
|
310
469
|
|
|
311
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
470
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResponseWorkflowSummaryResponseFromJSON(jsonValue));
|
|
312
471
|
}
|
|
313
472
|
|
|
314
473
|
/**
|
|
315
|
-
*
|
|
316
|
-
*
|
|
474
|
+
* List all workflows for the current tenant (paginated, DB-backed). ADMIN/OWNER see all workflows; USER sees only those under permitted paths.
|
|
475
|
+
* List Dv Workflows Handler
|
|
317
476
|
*/
|
|
318
|
-
async
|
|
319
|
-
const response = await this.
|
|
477
|
+
async listDvWorkflows(requestParameters: ListDvWorkflowsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseWorkflowSummaryResponse> {
|
|
478
|
+
const response = await this.listDvWorkflowsRaw(requestParameters, initOverrides);
|
|
320
479
|
return await response.value();
|
|
321
480
|
}
|
|
322
481
|
|
|
@@ -41,6 +41,12 @@ import {
|
|
|
41
41
|
* @interface CreateThreadMessageRequest
|
|
42
42
|
*/
|
|
43
43
|
export interface CreateThreadMessageRequest {
|
|
44
|
+
/**
|
|
45
|
+
* Optional caller-supplied ThreadMessage ID for idempotent creates.
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof CreateThreadMessageRequest
|
|
48
|
+
*/
|
|
49
|
+
messageId?: string | null;
|
|
44
50
|
/**
|
|
45
51
|
*
|
|
46
52
|
* @type {MessageRole}
|
|
@@ -82,6 +88,7 @@ export function CreateThreadMessageRequestFromJSONTyped(json: any, ignoreDiscrim
|
|
|
82
88
|
}
|
|
83
89
|
return {
|
|
84
90
|
|
|
91
|
+
'messageId': json['message_id'] == null ? undefined : json['message_id'],
|
|
85
92
|
'role': MessageRoleFromJSON(json['role']),
|
|
86
93
|
'content': ThreadMessageContentFromJSON(json['content']),
|
|
87
94
|
'details': json['details'] == null ? undefined : ThreadMessageDetailsInputFromJSON(json['details']),
|
|
@@ -99,6 +106,7 @@ export function CreateThreadMessageRequestToJSONTyped(value?: CreateThreadMessag
|
|
|
99
106
|
|
|
100
107
|
return {
|
|
101
108
|
|
|
109
|
+
'message_id': value['messageId'],
|
|
102
110
|
'role': MessageRoleToJSON(value['role']),
|
|
103
111
|
'content': ThreadMessageContentToJSON(value['content']),
|
|
104
112
|
'details': ThreadMessageDetailsInputToJSON(value['details']),
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
* Filter for the type of content rows to return.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const DocumentVersionContentTypeFilter = {
|
|
21
|
+
Section: 'SECTION',
|
|
22
|
+
Chunk: 'CHUNK'
|
|
23
|
+
} as const;
|
|
24
|
+
export type DocumentVersionContentTypeFilter = typeof DocumentVersionContentTypeFilter[keyof typeof DocumentVersionContentTypeFilter];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfDocumentVersionContentTypeFilter(value: any): boolean {
|
|
28
|
+
for (const key in DocumentVersionContentTypeFilter) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(DocumentVersionContentTypeFilter, key)) {
|
|
30
|
+
if (DocumentVersionContentTypeFilter[key as keyof typeof DocumentVersionContentTypeFilter] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function DocumentVersionContentTypeFilterFromJSON(json: any): DocumentVersionContentTypeFilter {
|
|
39
|
+
return DocumentVersionContentTypeFilterFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function DocumentVersionContentTypeFilterFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentVersionContentTypeFilter {
|
|
43
|
+
return json as DocumentVersionContentTypeFilter;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function DocumentVersionContentTypeFilterToJSON(value?: DocumentVersionContentTypeFilter | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function DocumentVersionContentTypeFilterToJSONTyped(value: any, ignoreDiscriminator: boolean): DocumentVersionContentTypeFilter {
|
|
51
|
+
return value as DocumentVersionContentTypeFilter;
|
|
52
|
+
}
|
|
53
|
+
|