@knowledge-stack/ksapi 1.57.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 +4 -2
- package/README.md +9 -6
- package/dist/apis/WorkflowsApi.d.ts +144 -59
- package/dist/apis/WorkflowsApi.js +131 -49
- package/dist/esm/apis/WorkflowsApi.d.ts +144 -59
- package/dist/esm/apis/WorkflowsApi.js +132 -50
- package/dist/esm/models/TemporalWorkflowStatusResponse.d.ts +83 -0
- package/dist/esm/models/TemporalWorkflowStatusResponse.js +66 -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 +2 -1
- package/dist/esm/models/index.js +2 -1
- package/dist/models/TemporalWorkflowStatusResponse.d.ts +83 -0
- package/dist/models/TemporalWorkflowStatusResponse.js +74 -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 +2 -1
- package/dist/models/index.js +2 -1
- package/docs/TemporalWorkflowStatusResponse.md +47 -0
- package/docs/WorkflowActionResponse.md +1 -1
- package/docs/{WorkflowAction.md → WorkflowCancelResponse.md} +9 -5
- package/docs/WorkflowsApi.md +183 -36
- package/package.json +1 -1
- package/src/apis/WorkflowsApi.ts +249 -90
- package/src/models/TemporalWorkflowStatusResponse.ts +136 -0
- package/src/models/WorkflowActionResponse.ts +1 -1
- package/src/models/WorkflowCancelResponse.ts +92 -0
- package/src/models/index.ts +2 -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
|
@@ -0,0 +1,74 @@
|
|
|
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.TemporalWorkflowStatusResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfTemporalWorkflowStatusResponse = instanceOfTemporalWorkflowStatusResponse;
|
|
18
|
+
exports.TemporalWorkflowStatusResponseFromJSON = TemporalWorkflowStatusResponseFromJSON;
|
|
19
|
+
exports.TemporalWorkflowStatusResponseFromJSONTyped = TemporalWorkflowStatusResponseFromJSONTyped;
|
|
20
|
+
exports.TemporalWorkflowStatusResponseToJSON = TemporalWorkflowStatusResponseToJSON;
|
|
21
|
+
exports.TemporalWorkflowStatusResponseToJSONTyped = TemporalWorkflowStatusResponseToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the TemporalWorkflowStatusResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfTemporalWorkflowStatusResponse(value) {
|
|
26
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('temporalStatus' in value) || value['temporalStatus'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('workflowType' in value) || value['workflowType'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('taskQueue' in value) || value['taskQueue'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('startTime' in value) || value['startTime'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('runId' in value) || value['runId'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
function TemporalWorkflowStatusResponseFromJSON(json) {
|
|
41
|
+
return TemporalWorkflowStatusResponseFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function TemporalWorkflowStatusResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
if (json == null) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'workflowId': json['workflow_id'],
|
|
49
|
+
'temporalStatus': json['temporal_status'],
|
|
50
|
+
'workflowType': json['workflow_type'],
|
|
51
|
+
'taskQueue': json['task_queue'],
|
|
52
|
+
'startTime': (new Date(json['start_time'])),
|
|
53
|
+
'closeTime': json['close_time'] == null ? undefined : (new Date(json['close_time'])),
|
|
54
|
+
'runId': json['run_id'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function TemporalWorkflowStatusResponseToJSON(json) {
|
|
58
|
+
return TemporalWorkflowStatusResponseToJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
function TemporalWorkflowStatusResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
'workflow_id': value['workflowId'],
|
|
66
|
+
'temporal_status': value['temporalStatus'],
|
|
67
|
+
'workflow_type': value['workflowType'],
|
|
68
|
+
'task_queue': value['taskQueue'],
|
|
69
|
+
'start_time': value['startTime'].toISOString(),
|
|
70
|
+
'close_time': value['closeTime'] == null ? value['closeTime'] : value['closeTime'].toISOString(),
|
|
71
|
+
'run_id': value['runId'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
exports.TemporalWorkflowStatusResponsePropertyValidationAttributesMap = {};
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
* Response for generic workflow cancellation.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface WorkflowCancelResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface WorkflowCancelResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof WorkflowCancelResponse
|
|
22
|
+
*/
|
|
23
|
+
workflowId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof WorkflowCancelResponse
|
|
28
|
+
*/
|
|
29
|
+
message: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the WorkflowCancelResponse interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfWorkflowCancelResponse(value: object): value is WorkflowCancelResponse;
|
|
35
|
+
export declare function WorkflowCancelResponseFromJSON(json: any): WorkflowCancelResponse;
|
|
36
|
+
export declare function WorkflowCancelResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowCancelResponse;
|
|
37
|
+
export declare function WorkflowCancelResponseToJSON(json: any): WorkflowCancelResponse;
|
|
38
|
+
export declare function WorkflowCancelResponseToJSONTyped(value?: WorkflowCancelResponse | null, ignoreDiscriminator?: boolean): any;
|
|
39
|
+
export declare const WorkflowCancelResponsePropertyValidationAttributesMap: {
|
|
40
|
+
[property: string]: {
|
|
41
|
+
maxLength?: number;
|
|
42
|
+
minLength?: number;
|
|
43
|
+
pattern?: string;
|
|
44
|
+
maximum?: number;
|
|
45
|
+
exclusiveMaximum?: boolean;
|
|
46
|
+
minimum?: number;
|
|
47
|
+
exclusiveMinimum?: boolean;
|
|
48
|
+
multipleOf?: number;
|
|
49
|
+
maxItems?: number;
|
|
50
|
+
minItems?: number;
|
|
51
|
+
uniqueItems?: boolean;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -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.WorkflowCancelResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfWorkflowCancelResponse = instanceOfWorkflowCancelResponse;
|
|
18
|
+
exports.WorkflowCancelResponseFromJSON = WorkflowCancelResponseFromJSON;
|
|
19
|
+
exports.WorkflowCancelResponseFromJSONTyped = WorkflowCancelResponseFromJSONTyped;
|
|
20
|
+
exports.WorkflowCancelResponseToJSON = WorkflowCancelResponseToJSON;
|
|
21
|
+
exports.WorkflowCancelResponseToJSONTyped = WorkflowCancelResponseToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the WorkflowCancelResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfWorkflowCancelResponse(value) {
|
|
26
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('message' in value) || value['message'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function WorkflowCancelResponseFromJSON(json) {
|
|
33
|
+
return WorkflowCancelResponseFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function WorkflowCancelResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'workflowId': json['workflow_id'],
|
|
41
|
+
'message': json['message'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function WorkflowCancelResponseToJSON(json) {
|
|
45
|
+
return WorkflowCancelResponseToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function WorkflowCancelResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'workflow_id': value['workflowId'],
|
|
53
|
+
'message': value['message'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
exports.WorkflowCancelResponsePropertyValidationAttributesMap = {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -108,6 +108,7 @@ export * from './SubtreeChunkGroup';
|
|
|
108
108
|
export * from './SubtreeChunksResponse';
|
|
109
109
|
export * from './SupportedLanguage';
|
|
110
110
|
export * from './TagResponse';
|
|
111
|
+
export * from './TemporalWorkflowStatusResponse';
|
|
111
112
|
export * from './TenantBrandingResponse';
|
|
112
113
|
export * from './TenantResponse';
|
|
113
114
|
export * from './TenantSettingsResponse';
|
|
@@ -135,7 +136,7 @@ export * from './UserMessageResponse';
|
|
|
135
136
|
export * from './UserResponse';
|
|
136
137
|
export * from './ValidationError';
|
|
137
138
|
export * from './VersionChunkIdsResponse';
|
|
138
|
-
export * from './WorkflowAction';
|
|
139
139
|
export * from './WorkflowActionResponse';
|
|
140
|
+
export * from './WorkflowCancelResponse';
|
|
140
141
|
export * from './WorkflowDetailResponse';
|
|
141
142
|
export * from './WorkflowSummaryResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -126,6 +126,7 @@ __exportStar(require("./SubtreeChunkGroup"), exports);
|
|
|
126
126
|
__exportStar(require("./SubtreeChunksResponse"), exports);
|
|
127
127
|
__exportStar(require("./SupportedLanguage"), exports);
|
|
128
128
|
__exportStar(require("./TagResponse"), exports);
|
|
129
|
+
__exportStar(require("./TemporalWorkflowStatusResponse"), exports);
|
|
129
130
|
__exportStar(require("./TenantBrandingResponse"), exports);
|
|
130
131
|
__exportStar(require("./TenantResponse"), exports);
|
|
131
132
|
__exportStar(require("./TenantSettingsResponse"), exports);
|
|
@@ -153,7 +154,7 @@ __exportStar(require("./UserMessageResponse"), exports);
|
|
|
153
154
|
__exportStar(require("./UserResponse"), exports);
|
|
154
155
|
__exportStar(require("./ValidationError"), exports);
|
|
155
156
|
__exportStar(require("./VersionChunkIdsResponse"), exports);
|
|
156
|
-
__exportStar(require("./WorkflowAction"), exports);
|
|
157
157
|
__exportStar(require("./WorkflowActionResponse"), exports);
|
|
158
|
+
__exportStar(require("./WorkflowCancelResponse"), exports);
|
|
158
159
|
__exportStar(require("./WorkflowDetailResponse"), exports);
|
|
159
160
|
__exportStar(require("./WorkflowSummaryResponse"), exports);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
# TemporalWorkflowStatusResponse
|
|
3
|
+
|
|
4
|
+
Generic Temporal workflow status — no DB interaction.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`workflowId` | string
|
|
11
|
+
`temporalStatus` | string
|
|
12
|
+
`workflowType` | string
|
|
13
|
+
`taskQueue` | string
|
|
14
|
+
`startTime` | Date
|
|
15
|
+
`closeTime` | Date
|
|
16
|
+
`runId` | string
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { TemporalWorkflowStatusResponse } from '@knowledge-stack/ksapi'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"workflowId": null,
|
|
26
|
+
"temporalStatus": null,
|
|
27
|
+
"workflowType": null,
|
|
28
|
+
"taskQueue": null,
|
|
29
|
+
"startTime": null,
|
|
30
|
+
"closeTime": null,
|
|
31
|
+
"runId": null,
|
|
32
|
+
} satisfies TemporalWorkflowStatusResponse
|
|
33
|
+
|
|
34
|
+
console.log(example)
|
|
35
|
+
|
|
36
|
+
// Convert the instance to a JSON string
|
|
37
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
38
|
+
console.log(exampleJSON)
|
|
39
|
+
|
|
40
|
+
// Parse the JSON string back to an object
|
|
41
|
+
const exampleParsed = JSON.parse(exampleJSON) as TemporalWorkflowStatusResponse
|
|
42
|
+
console.log(exampleParsed)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
46
|
+
|
|
47
|
+
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# WorkflowCancelResponse
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Response for generic workflow cancellation.
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
|
+
`workflowId` | string
|
|
11
|
+
`message` | string
|
|
10
12
|
|
|
11
13
|
## Example
|
|
12
14
|
|
|
13
15
|
```typescript
|
|
14
|
-
import type {
|
|
16
|
+
import type { WorkflowCancelResponse } from '@knowledge-stack/ksapi'
|
|
15
17
|
|
|
16
18
|
// TODO: Update the object below with actual values
|
|
17
19
|
const example = {
|
|
18
|
-
|
|
20
|
+
"workflowId": null,
|
|
21
|
+
"message": null,
|
|
22
|
+
} satisfies WorkflowCancelResponse
|
|
19
23
|
|
|
20
24
|
console.log(example)
|
|
21
25
|
|
|
@@ -24,7 +28,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
24
28
|
console.log(exampleJSON)
|
|
25
29
|
|
|
26
30
|
// Parse the JSON string back to an object
|
|
27
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as WorkflowCancelResponse
|
|
28
32
|
console.log(exampleParsed)
|
|
29
33
|
```
|
|
30
34
|
|
package/docs/WorkflowsApi.md
CHANGED
|
@@ -4,19 +4,21 @@ All URIs are relative to *http://localhost:8000*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
-
| [**
|
|
8
|
-
| [**
|
|
9
|
-
| [**
|
|
7
|
+
| [**cancelTemporalWorkflow**](WorkflowsApi.md#canceltemporalworkflow) | **DELETE** /v1/workflows/{workflow_id} | Cancel Temporal Workflow Handler |
|
|
8
|
+
| [**dvWorkflowRerun**](WorkflowsApi.md#dvworkflowrerun) | **POST** /v1/workflows/document_versions/{workflow_id} | Dv Workflow Rerun Handler |
|
|
9
|
+
| [**getDvWorkflow**](WorkflowsApi.md#getdvworkflow) | **GET** /v1/workflows/document_versions/{workflow_id} | Get Dv Workflow Handler |
|
|
10
|
+
| [**getTemporalWorkflowStatus**](WorkflowsApi.md#gettemporalworkflowstatus) | **GET** /v1/workflows/{workflow_id} | Get Temporal Workflow Status Handler |
|
|
11
|
+
| [**listDvWorkflows**](WorkflowsApi.md#listdvworkflows) | **GET** /v1/workflows/document_versions | List Dv Workflows Handler |
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
|
|
13
|
-
##
|
|
15
|
+
## cancelTemporalWorkflow
|
|
14
16
|
|
|
15
|
-
>
|
|
17
|
+
> WorkflowCancelResponse cancelTemporalWorkflow(workflowId, authorization, ksUat)
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
Cancel Temporal Workflow Handler
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
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.
|
|
20
22
|
|
|
21
23
|
### Example
|
|
22
24
|
|
|
@@ -25,7 +27,7 @@ import {
|
|
|
25
27
|
Configuration,
|
|
26
28
|
WorkflowsApi,
|
|
27
29
|
} from '@knowledge-stack/ksapi';
|
|
28
|
-
import type {
|
|
30
|
+
import type { CancelTemporalWorkflowRequest } from '@knowledge-stack/ksapi';
|
|
29
31
|
|
|
30
32
|
async function example() {
|
|
31
33
|
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
@@ -38,10 +40,10 @@ async function example() {
|
|
|
38
40
|
authorization: authorization_example,
|
|
39
41
|
// string (optional)
|
|
40
42
|
ksUat: ksUat_example,
|
|
41
|
-
} satisfies
|
|
43
|
+
} satisfies CancelTemporalWorkflowRequest;
|
|
42
44
|
|
|
43
45
|
try {
|
|
44
|
-
const data = await api.
|
|
46
|
+
const data = await api.cancelTemporalWorkflow(body);
|
|
45
47
|
console.log(data);
|
|
46
48
|
} catch (error) {
|
|
47
49
|
console.error(error);
|
|
@@ -63,7 +65,7 @@ example().catch(console.error);
|
|
|
63
65
|
|
|
64
66
|
### Return type
|
|
65
67
|
|
|
66
|
-
[**
|
|
68
|
+
[**WorkflowCancelResponse**](WorkflowCancelResponse.md)
|
|
67
69
|
|
|
68
70
|
### Authorization
|
|
69
71
|
|
|
@@ -84,13 +86,13 @@ No authorization required
|
|
|
84
86
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
85
87
|
|
|
86
88
|
|
|
87
|
-
##
|
|
89
|
+
## dvWorkflowRerun
|
|
88
90
|
|
|
89
|
-
>
|
|
91
|
+
> WorkflowActionResponse dvWorkflowRerun(workflowId, authorization, ksUat)
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
Dv Workflow Rerun Handler
|
|
92
94
|
|
|
93
|
-
|
|
95
|
+
Rerun a workflow. USER role requires ``can_write`` on the document path.
|
|
94
96
|
|
|
95
97
|
### Example
|
|
96
98
|
|
|
@@ -99,25 +101,23 @@ import {
|
|
|
99
101
|
Configuration,
|
|
100
102
|
WorkflowsApi,
|
|
101
103
|
} from '@knowledge-stack/ksapi';
|
|
102
|
-
import type {
|
|
104
|
+
import type { DvWorkflowRerunRequest } from '@knowledge-stack/ksapi';
|
|
103
105
|
|
|
104
106
|
async function example() {
|
|
105
107
|
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
106
108
|
const api = new WorkflowsApi();
|
|
107
109
|
|
|
108
110
|
const body = {
|
|
109
|
-
//
|
|
110
|
-
|
|
111
|
-
// number | Number of items to skip (optional)
|
|
112
|
-
offset: 56,
|
|
111
|
+
// string
|
|
112
|
+
workflowId: workflowId_example,
|
|
113
113
|
// string (optional)
|
|
114
114
|
authorization: authorization_example,
|
|
115
115
|
// string (optional)
|
|
116
116
|
ksUat: ksUat_example,
|
|
117
|
-
} satisfies
|
|
117
|
+
} satisfies DvWorkflowRerunRequest;
|
|
118
118
|
|
|
119
119
|
try {
|
|
120
|
-
const data = await api.
|
|
120
|
+
const data = await api.dvWorkflowRerun(body);
|
|
121
121
|
console.log(data);
|
|
122
122
|
} catch (error) {
|
|
123
123
|
console.error(error);
|
|
@@ -133,14 +133,13 @@ example().catch(console.error);
|
|
|
133
133
|
|
|
134
134
|
| Name | Type | Description | Notes |
|
|
135
135
|
|------------- | ------------- | ------------- | -------------|
|
|
136
|
-
| **
|
|
137
|
-
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
136
|
+
| **workflowId** | `string` | | [Defaults to `undefined`] |
|
|
138
137
|
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
139
138
|
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
140
139
|
|
|
141
140
|
### Return type
|
|
142
141
|
|
|
143
|
-
[**
|
|
142
|
+
[**WorkflowActionResponse**](WorkflowActionResponse.md)
|
|
144
143
|
|
|
145
144
|
### Authorization
|
|
146
145
|
|
|
@@ -161,13 +160,13 @@ No authorization required
|
|
|
161
160
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
162
161
|
|
|
163
162
|
|
|
164
|
-
##
|
|
163
|
+
## getDvWorkflow
|
|
165
164
|
|
|
166
|
-
>
|
|
165
|
+
> WorkflowDetailResponse getDvWorkflow(workflowId, authorization, ksUat)
|
|
167
166
|
|
|
168
|
-
Workflow
|
|
167
|
+
Get Dv Workflow Handler
|
|
169
168
|
|
|
170
|
-
|
|
169
|
+
Get single workflow detail with live Temporal status.
|
|
171
170
|
|
|
172
171
|
### Example
|
|
173
172
|
|
|
@@ -176,7 +175,7 @@ import {
|
|
|
176
175
|
Configuration,
|
|
177
176
|
WorkflowsApi,
|
|
178
177
|
} from '@knowledge-stack/ksapi';
|
|
179
|
-
import type {
|
|
178
|
+
import type { GetDvWorkflowRequest } from '@knowledge-stack/ksapi';
|
|
180
179
|
|
|
181
180
|
async function example() {
|
|
182
181
|
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
@@ -185,16 +184,14 @@ async function example() {
|
|
|
185
184
|
const body = {
|
|
186
185
|
// string
|
|
187
186
|
workflowId: workflowId_example,
|
|
188
|
-
// WorkflowAction | Action to perform
|
|
189
|
-
action: ...,
|
|
190
187
|
// string (optional)
|
|
191
188
|
authorization: authorization_example,
|
|
192
189
|
// string (optional)
|
|
193
190
|
ksUat: ksUat_example,
|
|
194
|
-
} satisfies
|
|
191
|
+
} satisfies GetDvWorkflowRequest;
|
|
195
192
|
|
|
196
193
|
try {
|
|
197
|
-
const data = await api.
|
|
194
|
+
const data = await api.getDvWorkflow(body);
|
|
198
195
|
console.log(data);
|
|
199
196
|
} catch (error) {
|
|
200
197
|
console.error(error);
|
|
@@ -211,13 +208,163 @@ example().catch(console.error);
|
|
|
211
208
|
| Name | Type | Description | Notes |
|
|
212
209
|
|------------- | ------------- | ------------- | -------------|
|
|
213
210
|
| **workflowId** | `string` | | [Defaults to `undefined`] |
|
|
214
|
-
| **action** | `WorkflowAction` | Action to perform | [Defaults to `undefined`] [Enum: rerun, cancel] |
|
|
215
211
|
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
216
212
|
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
217
213
|
|
|
218
214
|
### Return type
|
|
219
215
|
|
|
220
|
-
[**
|
|
216
|
+
[**WorkflowDetailResponse**](WorkflowDetailResponse.md)
|
|
217
|
+
|
|
218
|
+
### Authorization
|
|
219
|
+
|
|
220
|
+
No authorization required
|
|
221
|
+
|
|
222
|
+
### HTTP request headers
|
|
223
|
+
|
|
224
|
+
- **Content-Type**: Not defined
|
|
225
|
+
- **Accept**: `application/json`
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
### HTTP response details
|
|
229
|
+
| Status code | Description | Response headers |
|
|
230
|
+
|-------------|-------------|------------------|
|
|
231
|
+
| **200** | Successful Response | - |
|
|
232
|
+
| **422** | Validation Error | - |
|
|
233
|
+
|
|
234
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
## getTemporalWorkflowStatus
|
|
238
|
+
|
|
239
|
+
> TemporalWorkflowStatusResponse getTemporalWorkflowStatus(workflowId, authorization, ksUat)
|
|
240
|
+
|
|
241
|
+
Get Temporal Workflow Status Handler
|
|
242
|
+
|
|
243
|
+
Get live Temporal status for any workflow owned by the caller\'s tenant.
|
|
244
|
+
|
|
245
|
+
### Example
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
import {
|
|
249
|
+
Configuration,
|
|
250
|
+
WorkflowsApi,
|
|
251
|
+
} from '@knowledge-stack/ksapi';
|
|
252
|
+
import type { GetTemporalWorkflowStatusRequest } from '@knowledge-stack/ksapi';
|
|
253
|
+
|
|
254
|
+
async function example() {
|
|
255
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
256
|
+
const api = new WorkflowsApi();
|
|
257
|
+
|
|
258
|
+
const body = {
|
|
259
|
+
// string
|
|
260
|
+
workflowId: workflowId_example,
|
|
261
|
+
// string (optional)
|
|
262
|
+
authorization: authorization_example,
|
|
263
|
+
// string (optional)
|
|
264
|
+
ksUat: ksUat_example,
|
|
265
|
+
} satisfies GetTemporalWorkflowStatusRequest;
|
|
266
|
+
|
|
267
|
+
try {
|
|
268
|
+
const data = await api.getTemporalWorkflowStatus(body);
|
|
269
|
+
console.log(data);
|
|
270
|
+
} catch (error) {
|
|
271
|
+
console.error(error);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Run the test
|
|
276
|
+
example().catch(console.error);
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Parameters
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
| Name | Type | Description | Notes |
|
|
283
|
+
|------------- | ------------- | ------------- | -------------|
|
|
284
|
+
| **workflowId** | `string` | | [Defaults to `undefined`] |
|
|
285
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
286
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
287
|
+
|
|
288
|
+
### Return type
|
|
289
|
+
|
|
290
|
+
[**TemporalWorkflowStatusResponse**](TemporalWorkflowStatusResponse.md)
|
|
291
|
+
|
|
292
|
+
### Authorization
|
|
293
|
+
|
|
294
|
+
No authorization required
|
|
295
|
+
|
|
296
|
+
### HTTP request headers
|
|
297
|
+
|
|
298
|
+
- **Content-Type**: Not defined
|
|
299
|
+
- **Accept**: `application/json`
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
### HTTP response details
|
|
303
|
+
| Status code | Description | Response headers |
|
|
304
|
+
|-------------|-------------|------------------|
|
|
305
|
+
| **200** | Successful Response | - |
|
|
306
|
+
| **422** | Validation Error | - |
|
|
307
|
+
|
|
308
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
## listDvWorkflows
|
|
312
|
+
|
|
313
|
+
> PaginatedResponseWorkflowSummaryResponse listDvWorkflows(limit, offset, authorization, ksUat)
|
|
314
|
+
|
|
315
|
+
List Dv Workflows Handler
|
|
316
|
+
|
|
317
|
+
List all workflows for the current tenant (paginated, DB-backed). ADMIN/OWNER see all workflows; USER sees only those under permitted paths.
|
|
318
|
+
|
|
319
|
+
### Example
|
|
320
|
+
|
|
321
|
+
```ts
|
|
322
|
+
import {
|
|
323
|
+
Configuration,
|
|
324
|
+
WorkflowsApi,
|
|
325
|
+
} from '@knowledge-stack/ksapi';
|
|
326
|
+
import type { ListDvWorkflowsRequest } from '@knowledge-stack/ksapi';
|
|
327
|
+
|
|
328
|
+
async function example() {
|
|
329
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
330
|
+
const api = new WorkflowsApi();
|
|
331
|
+
|
|
332
|
+
const body = {
|
|
333
|
+
// number | Number of items per page (optional)
|
|
334
|
+
limit: 56,
|
|
335
|
+
// number | Number of items to skip (optional)
|
|
336
|
+
offset: 56,
|
|
337
|
+
// string (optional)
|
|
338
|
+
authorization: authorization_example,
|
|
339
|
+
// string (optional)
|
|
340
|
+
ksUat: ksUat_example,
|
|
341
|
+
} satisfies ListDvWorkflowsRequest;
|
|
342
|
+
|
|
343
|
+
try {
|
|
344
|
+
const data = await api.listDvWorkflows(body);
|
|
345
|
+
console.log(data);
|
|
346
|
+
} catch (error) {
|
|
347
|
+
console.error(error);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// Run the test
|
|
352
|
+
example().catch(console.error);
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Parameters
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
| Name | Type | Description | Notes |
|
|
359
|
+
|------------- | ------------- | ------------- | -------------|
|
|
360
|
+
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
361
|
+
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
362
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
363
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
364
|
+
|
|
365
|
+
### Return type
|
|
366
|
+
|
|
367
|
+
[**PaginatedResponseWorkflowSummaryResponse**](PaginatedResponseWorkflowSummaryResponse.md)
|
|
221
368
|
|
|
222
369
|
### Authorization
|
|
223
370
|
|