@knowledge-stack/ksapi 1.104.0 → 1.106.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 +4 -3
- package/dist/apis/WorkflowRunsApi.d.ts +15 -12
- package/dist/apis/WorkflowRunsApi.js +4 -2
- package/dist/esm/apis/WorkflowRunsApi.d.ts +15 -12
- package/dist/esm/apis/WorkflowRunsApi.js +5 -3
- package/dist/esm/models/DirectorySyncResponse.d.ts +30 -0
- package/dist/esm/models/DirectorySyncResponse.js +10 -0
- package/dist/esm/models/GroupResponse.d.ts +6 -0
- package/dist/esm/models/GroupResponse.js +2 -0
- package/dist/esm/models/MembershipResponse.d.ts +6 -0
- package/dist/esm/models/MembershipResponse.js +2 -0
- package/dist/esm/models/StartWorkflowRunRequest.d.ts +53 -0
- package/dist/esm/models/StartWorkflowRunRequest.js +46 -0
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +6 -0
- package/dist/esm/models/WorkflowRunSnapshot.js +7 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/DirectorySyncResponse.d.ts +30 -0
- package/dist/models/DirectorySyncResponse.js +10 -0
- package/dist/models/GroupResponse.d.ts +6 -0
- package/dist/models/GroupResponse.js +2 -0
- package/dist/models/MembershipResponse.d.ts +6 -0
- package/dist/models/MembershipResponse.js +2 -0
- package/dist/models/StartWorkflowRunRequest.d.ts +53 -0
- package/dist/models/StartWorkflowRunRequest.js +54 -0
- package/dist/models/WorkflowRunSnapshot.d.ts +6 -0
- package/dist/models/WorkflowRunSnapshot.js +7 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/DirectorySyncResponse.md +10 -0
- package/docs/GroupResponse.md +2 -0
- package/docs/MembershipResponse.md +2 -0
- package/docs/StartWorkflowRunRequest.md +35 -0
- package/docs/WorkflowRunSnapshot.md +2 -0
- package/docs/WorkflowRunsApi.md +9 -6
- package/package.json +1 -1
- package/src/apis/WorkflowRunsApi.ts +20 -11
- package/src/models/DirectorySyncResponse.ts +40 -0
- package/src/models/GroupResponse.ts +8 -0
- package/src/models/MembershipResponse.ts +8 -0
- package/src/models/StartWorkflowRunRequest.ts +91 -0
- package/src/models/WorkflowRunSnapshot.ts +11 -0
- package/src/models/index.ts +1 -0
|
@@ -50,6 +50,7 @@ function GroupResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
50
|
'tenantId': json['tenant_id'],
|
|
51
51
|
'name': json['name'],
|
|
52
52
|
'description': json['description'],
|
|
53
|
+
'idpGroupId': json['idp_group_id'] == null ? undefined : json['idp_group_id'],
|
|
53
54
|
'memberCount': json['member_count'] == null ? undefined : json['member_count'],
|
|
54
55
|
'createdAt': (new Date(json['created_at'])),
|
|
55
56
|
'updatedAt': (new Date(json['updated_at'])),
|
|
@@ -67,6 +68,7 @@ function GroupResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
67
68
|
'tenant_id': value['tenantId'],
|
|
68
69
|
'name': value['name'],
|
|
69
70
|
'description': value['description'],
|
|
71
|
+
'idp_group_id': value['idpGroupId'],
|
|
70
72
|
'member_count': value['memberCount'],
|
|
71
73
|
'created_at': value['createdAt'].toISOString(),
|
|
72
74
|
'updated_at': value['updatedAt'].toISOString(),
|
|
@@ -50,6 +50,7 @@ function MembershipResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
50
|
'tenantId': json['tenant_id'],
|
|
51
51
|
'groupId': json['group_id'],
|
|
52
52
|
'userId': json['user_id'],
|
|
53
|
+
'idpManaged': json['idp_managed'] == null ? undefined : json['idp_managed'],
|
|
53
54
|
'createdAt': (new Date(json['created_at'])),
|
|
54
55
|
'updatedAt': (new Date(json['updated_at'])),
|
|
55
56
|
};
|
|
@@ -66,6 +67,7 @@ function MembershipResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
66
67
|
'tenant_id': value['tenantId'],
|
|
67
68
|
'group_id': value['groupId'],
|
|
68
69
|
'user_id': value['userId'],
|
|
70
|
+
'idp_managed': value['idpManaged'],
|
|
69
71
|
'created_at': value['createdAt'].toISOString(),
|
|
70
72
|
'updated_at': value['updatedAt'].toISOString(),
|
|
71
73
|
};
|
|
@@ -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
|
+
* Optional JSON body for ``POST /v1/workflow-runs/{id}/start``.
|
|
14
|
+
*
|
|
15
|
+
* The whole body is optional: an absent body starts the run with just
|
|
16
|
+
* the localized "Started workflow: X" opening message, exactly as
|
|
17
|
+
* before. When ``user_message`` is set it is appended to that opening
|
|
18
|
+
* thread message AND injected into the runner's first user turn, so the
|
|
19
|
+
* agent acts on it as guidance layered on the workflow instruction.
|
|
20
|
+
* @export
|
|
21
|
+
* @interface StartWorkflowRunRequest
|
|
22
|
+
*/
|
|
23
|
+
export interface StartWorkflowRunRequest {
|
|
24
|
+
/**
|
|
25
|
+
* Free-text instruction shown in the run thread and passed to the agent as additional guidance on top of the workflow instruction. Optional.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof StartWorkflowRunRequest
|
|
28
|
+
*/
|
|
29
|
+
userMessage?: string | null;
|
|
30
|
+
}
|
|
31
|
+
export declare const StartWorkflowRunRequestPropertyValidationAttributesMap: {
|
|
32
|
+
[property: string]: {
|
|
33
|
+
maxLength?: number;
|
|
34
|
+
minLength?: number;
|
|
35
|
+
pattern?: string;
|
|
36
|
+
maximum?: number;
|
|
37
|
+
exclusiveMaximum?: boolean;
|
|
38
|
+
minimum?: number;
|
|
39
|
+
exclusiveMinimum?: boolean;
|
|
40
|
+
multipleOf?: number;
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
minItems?: number;
|
|
43
|
+
uniqueItems?: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the StartWorkflowRunRequest interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfStartWorkflowRunRequest(value: object): value is StartWorkflowRunRequest;
|
|
50
|
+
export declare function StartWorkflowRunRequestFromJSON(json: any): StartWorkflowRunRequest;
|
|
51
|
+
export declare function StartWorkflowRunRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): StartWorkflowRunRequest;
|
|
52
|
+
export declare function StartWorkflowRunRequestToJSON(json: any): StartWorkflowRunRequest;
|
|
53
|
+
export declare function StartWorkflowRunRequestToJSONTyped(value?: StartWorkflowRunRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.StartWorkflowRunRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfStartWorkflowRunRequest = instanceOfStartWorkflowRunRequest;
|
|
18
|
+
exports.StartWorkflowRunRequestFromJSON = StartWorkflowRunRequestFromJSON;
|
|
19
|
+
exports.StartWorkflowRunRequestFromJSONTyped = StartWorkflowRunRequestFromJSONTyped;
|
|
20
|
+
exports.StartWorkflowRunRequestToJSON = StartWorkflowRunRequestToJSON;
|
|
21
|
+
exports.StartWorkflowRunRequestToJSONTyped = StartWorkflowRunRequestToJSONTyped;
|
|
22
|
+
exports.StartWorkflowRunRequestPropertyValidationAttributesMap = {
|
|
23
|
+
userMessage: {
|
|
24
|
+
maxLength: 4000,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given object implements the StartWorkflowRunRequest interface.
|
|
29
|
+
*/
|
|
30
|
+
function instanceOfStartWorkflowRunRequest(value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function StartWorkflowRunRequestFromJSON(json) {
|
|
34
|
+
return StartWorkflowRunRequestFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function StartWorkflowRunRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'userMessage': json['user_message'] == null ? undefined : json['user_message'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function StartWorkflowRunRequestToJSON(json) {
|
|
45
|
+
return StartWorkflowRunRequestToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function StartWorkflowRunRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'user_message': value['userMessage'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -49,6 +49,12 @@ export interface WorkflowRunSnapshot {
|
|
|
49
49
|
* @memberof WorkflowRunSnapshot
|
|
50
50
|
*/
|
|
51
51
|
inputs: Array<InputSnapshot>;
|
|
52
|
+
/**
|
|
53
|
+
* Optional free-text message the caller supplied at Start. Pinned here so the runner injects it into the agent's first user turn and it survives retry, redrive, and workflow-thread follow-ups (all of which re-assemble the prompt from this snapshot).
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof WorkflowRunSnapshot
|
|
56
|
+
*/
|
|
57
|
+
userMessage?: string | null;
|
|
52
58
|
}
|
|
53
59
|
export declare const WorkflowRunSnapshotPropertyValidationAttributesMap: {
|
|
54
60
|
[property: string]: {
|
|
@@ -21,7 +21,11 @@ exports.WorkflowRunSnapshotToJSON = WorkflowRunSnapshotToJSON;
|
|
|
21
21
|
exports.WorkflowRunSnapshotToJSONTyped = WorkflowRunSnapshotToJSONTyped;
|
|
22
22
|
const InputSnapshot_1 = require("./InputSnapshot");
|
|
23
23
|
const InstructionSnapshot_1 = require("./InstructionSnapshot");
|
|
24
|
-
exports.WorkflowRunSnapshotPropertyValidationAttributesMap = {
|
|
24
|
+
exports.WorkflowRunSnapshotPropertyValidationAttributesMap = {
|
|
25
|
+
userMessage: {
|
|
26
|
+
maxLength: 4000,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
25
29
|
/**
|
|
26
30
|
* Check if a given object implements the WorkflowRunSnapshot interface.
|
|
27
31
|
*/
|
|
@@ -48,6 +52,7 @@ function WorkflowRunSnapshotFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
52
|
'maxRunDurationSeconds': json['max_run_duration_seconds'],
|
|
49
53
|
'instruction': (0, InstructionSnapshot_1.InstructionSnapshotFromJSON)(json['instruction']),
|
|
50
54
|
'inputs': (json['inputs'].map(InputSnapshot_1.InputSnapshotFromJSON)),
|
|
55
|
+
'userMessage': json['user_message'] == null ? undefined : json['user_message'],
|
|
51
56
|
};
|
|
52
57
|
}
|
|
53
58
|
function WorkflowRunSnapshotToJSON(json) {
|
|
@@ -62,5 +67,6 @@ function WorkflowRunSnapshotToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
62
67
|
'max_run_duration_seconds': value['maxRunDurationSeconds'],
|
|
63
68
|
'instruction': (0, InstructionSnapshot_1.InstructionSnapshotToJSON)(value['instruction']),
|
|
64
69
|
'inputs': (value['inputs'].map(InputSnapshot_1.InputSnapshotToJSON)),
|
|
70
|
+
'user_message': value['userMessage'],
|
|
65
71
|
};
|
|
66
72
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -211,6 +211,7 @@ export * from './SetApprovalStateRequest';
|
|
|
211
211
|
export * from './SetWorkflowRunApprovalRequest';
|
|
212
212
|
export * from './SignInRequest';
|
|
213
213
|
export * from './SortDirection';
|
|
214
|
+
export * from './StartWorkflowRunRequest';
|
|
214
215
|
export * from './StepInput';
|
|
215
216
|
export * from './StepKind';
|
|
216
217
|
export * from './StepOutput';
|
package/dist/models/index.js
CHANGED
|
@@ -229,6 +229,7 @@ __exportStar(require("./SetApprovalStateRequest"), exports);
|
|
|
229
229
|
__exportStar(require("./SetWorkflowRunApprovalRequest"), exports);
|
|
230
230
|
__exportStar(require("./SignInRequest"), exports);
|
|
231
231
|
__exportStar(require("./SortDirection"), exports);
|
|
232
|
+
__exportStar(require("./StartWorkflowRunRequest"), exports);
|
|
232
233
|
__exportStar(require("./StepInput"), exports);
|
|
233
234
|
__exportStar(require("./StepKind"), exports);
|
|
234
235
|
__exportStar(require("./StepOutput"), exports);
|
|
@@ -12,6 +12,11 @@ Name | Type
|
|
|
12
12
|
`usersActivated` | number
|
|
13
13
|
`usersDeactivated` | number
|
|
14
14
|
`usersSkipped` | number
|
|
15
|
+
`seatCapExcludedNum` | number
|
|
16
|
+
`groupsCreated` | number
|
|
17
|
+
`groupsUpdated` | number
|
|
18
|
+
`groupMembershipsAdded` | number
|
|
19
|
+
`groupMembershipsRemoved` | number
|
|
15
20
|
`warnings` | Array<string>
|
|
16
21
|
`errors` | Array<string>
|
|
17
22
|
|
|
@@ -27,6 +32,11 @@ const example = {
|
|
|
27
32
|
"usersActivated": null,
|
|
28
33
|
"usersDeactivated": null,
|
|
29
34
|
"usersSkipped": null,
|
|
35
|
+
"seatCapExcludedNum": null,
|
|
36
|
+
"groupsCreated": null,
|
|
37
|
+
"groupsUpdated": null,
|
|
38
|
+
"groupMembershipsAdded": null,
|
|
39
|
+
"groupMembershipsRemoved": null,
|
|
30
40
|
"warnings": null,
|
|
31
41
|
"errors": null,
|
|
32
42
|
} satisfies DirectorySyncResponse
|
package/docs/GroupResponse.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`tenantId` | string
|
|
11
11
|
`name` | string
|
|
12
12
|
`description` | string
|
|
13
|
+
`idpGroupId` | string
|
|
13
14
|
`memberCount` | number
|
|
14
15
|
`createdAt` | Date
|
|
15
16
|
`updatedAt` | Date
|
|
@@ -25,6 +26,7 @@ const example = {
|
|
|
25
26
|
"tenantId": null,
|
|
26
27
|
"name": null,
|
|
27
28
|
"description": null,
|
|
29
|
+
"idpGroupId": null,
|
|
28
30
|
"memberCount": null,
|
|
29
31
|
"createdAt": null,
|
|
30
32
|
"updatedAt": null,
|
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`tenantId` | string
|
|
11
11
|
`groupId` | string
|
|
12
12
|
`userId` | string
|
|
13
|
+
`idpManaged` | boolean
|
|
13
14
|
`createdAt` | Date
|
|
14
15
|
`updatedAt` | Date
|
|
15
16
|
|
|
@@ -24,6 +25,7 @@ const example = {
|
|
|
24
25
|
"tenantId": null,
|
|
25
26
|
"groupId": null,
|
|
26
27
|
"userId": null,
|
|
28
|
+
"idpManaged": null,
|
|
27
29
|
"createdAt": null,
|
|
28
30
|
"updatedAt": null,
|
|
29
31
|
} satisfies MembershipResponse
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# StartWorkflowRunRequest
|
|
3
|
+
|
|
4
|
+
Optional JSON body for ``POST /v1/workflow-runs/{id}/start``. The whole body is optional: an absent body starts the run with just the localized \"Started workflow: X\" opening message, exactly as before. When ``user_message`` is set it is appended to that opening thread message AND injected into the runner\'s first user turn, so the agent acts on it as guidance layered on the workflow instruction.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`userMessage` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { StartWorkflowRunRequest } from '@knowledge-stack/ksapi'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"userMessage": null,
|
|
20
|
+
} satisfies StartWorkflowRunRequest
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as StartWorkflowRunRequest
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`maxRunDurationSeconds` | number
|
|
12
12
|
`instruction` | [InstructionSnapshot](InstructionSnapshot.md)
|
|
13
13
|
`inputs` | [Array<InputSnapshot>](InputSnapshot.md)
|
|
14
|
+
`userMessage` | string
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -23,6 +24,7 @@ const example = {
|
|
|
23
24
|
"maxRunDurationSeconds": null,
|
|
24
25
|
"instruction": null,
|
|
25
26
|
"inputs": null,
|
|
27
|
+
"userMessage": null,
|
|
26
28
|
} satisfies WorkflowRunSnapshot
|
|
27
29
|
|
|
28
30
|
console.log(example)
|
package/docs/WorkflowRunsApi.md
CHANGED
|
@@ -11,7 +11,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
11
11
|
| [**listWorkflowRunsForTenant**](WorkflowRunsApi.md#listworkflowrunsfortenant) | **GET** /v1/workflow-runs | List Workflow Runs For Tenant Handler |
|
|
12
12
|
| [**retryWorkflowRun**](WorkflowRunsApi.md#retryworkflowrun) | **POST** /v1/workflow-runs/{run_id}/retry | Retry Workflow Run Handler |
|
|
13
13
|
| [**setWorkflowRunApproval**](WorkflowRunsApi.md#setworkflowrunapprovaloperation) | **POST** /v1/workflow-runs/{run_id}/approval | Set Workflow Run Approval Handler |
|
|
14
|
-
| [**startWorkflowRun**](WorkflowRunsApi.md#
|
|
14
|
+
| [**startWorkflowRun**](WorkflowRunsApi.md#startworkflowrunoperation) | **POST** /v1/workflow-runs/{run_id}/start | Start Workflow Run Handler |
|
|
15
15
|
| [**stopWorkflowRun**](WorkflowRunsApi.md#stopworkflowrun) | **POST** /v1/workflow-runs/{run_id}/stop | Stop Workflow Run Handler |
|
|
16
16
|
| [**updateWorkflowRun**](WorkflowRunsApi.md#updateworkflowrunoperation) | **PATCH** /v1/workflow-runs/{run_id} | Update Workflow Run Handler |
|
|
17
17
|
| [**workflowRunCallback**](WorkflowRunsApi.md#workflowruncallbackoperation) | **POST** /v1/workflow-runs/{run_id}/callback | Workflow Run Callback Handler |
|
|
@@ -589,11 +589,11 @@ example().catch(console.error);
|
|
|
589
589
|
|
|
590
590
|
## startWorkflowRun
|
|
591
591
|
|
|
592
|
-
> WorkflowRunResponse startWorkflowRun(runId)
|
|
592
|
+
> WorkflowRunResponse startWorkflowRun(runId, startWorkflowRunRequest)
|
|
593
593
|
|
|
594
594
|
Start Workflow Run Handler
|
|
595
595
|
|
|
596
|
-
Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live).
|
|
596
|
+
Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live). The body is optional; ``user_message`` (when sent) is pinned into the snapshot and shown in the run thread (see ``StartWorkflowRunRequest``).
|
|
597
597
|
|
|
598
598
|
### Example
|
|
599
599
|
|
|
@@ -602,7 +602,7 @@ import {
|
|
|
602
602
|
Configuration,
|
|
603
603
|
WorkflowRunsApi,
|
|
604
604
|
} from '@knowledge-stack/ksapi';
|
|
605
|
-
import type {
|
|
605
|
+
import type { StartWorkflowRunOperationRequest } from '@knowledge-stack/ksapi';
|
|
606
606
|
|
|
607
607
|
async function example() {
|
|
608
608
|
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
@@ -617,7 +617,9 @@ async function example() {
|
|
|
617
617
|
const body = {
|
|
618
618
|
// string
|
|
619
619
|
runId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
620
|
-
|
|
620
|
+
// StartWorkflowRunRequest (optional)
|
|
621
|
+
startWorkflowRunRequest: ...,
|
|
622
|
+
} satisfies StartWorkflowRunOperationRequest;
|
|
621
623
|
|
|
622
624
|
try {
|
|
623
625
|
const data = await api.startWorkflowRun(body);
|
|
@@ -637,6 +639,7 @@ example().catch(console.error);
|
|
|
637
639
|
| Name | Type | Description | Notes |
|
|
638
640
|
|------------- | ------------- | ------------- | -------------|
|
|
639
641
|
| **runId** | `string` | | [Defaults to `undefined`] |
|
|
642
|
+
| **startWorkflowRunRequest** | [StartWorkflowRunRequest](StartWorkflowRunRequest.md) | | [Optional] |
|
|
640
643
|
|
|
641
644
|
### Return type
|
|
642
645
|
|
|
@@ -648,7 +651,7 @@ example().catch(console.error);
|
|
|
648
651
|
|
|
649
652
|
### HTTP request headers
|
|
650
653
|
|
|
651
|
-
- **Content-Type**:
|
|
654
|
+
- **Content-Type**: `application/json`
|
|
652
655
|
- **Accept**: `application/json`
|
|
653
656
|
|
|
654
657
|
|
package/package.json
CHANGED
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
PaginatedResponseWorkflowRunResponse,
|
|
22
22
|
SetWorkflowRunApprovalRequest,
|
|
23
23
|
SortDirection,
|
|
24
|
+
StartWorkflowRunRequest,
|
|
24
25
|
UpdateWorkflowRunRequest,
|
|
25
26
|
WorkflowCallbackResponse,
|
|
26
27
|
WorkflowExecutionState,
|
|
@@ -42,6 +43,8 @@ import {
|
|
|
42
43
|
SetWorkflowRunApprovalRequestToJSON,
|
|
43
44
|
SortDirectionFromJSON,
|
|
44
45
|
SortDirectionToJSON,
|
|
46
|
+
StartWorkflowRunRequestFromJSON,
|
|
47
|
+
StartWorkflowRunRequestToJSON,
|
|
45
48
|
UpdateWorkflowRunRequestFromJSON,
|
|
46
49
|
UpdateWorkflowRunRequestToJSON,
|
|
47
50
|
WorkflowCallbackResponseFromJSON,
|
|
@@ -102,8 +105,9 @@ export interface SetWorkflowRunApprovalOperationRequest {
|
|
|
102
105
|
setWorkflowRunApprovalRequest: SetWorkflowRunApprovalRequest;
|
|
103
106
|
}
|
|
104
107
|
|
|
105
|
-
export interface
|
|
108
|
+
export interface StartWorkflowRunOperationRequest {
|
|
106
109
|
runId: string;
|
|
110
|
+
startWorkflowRunRequest?: StartWorkflowRunRequest | null;
|
|
107
111
|
}
|
|
108
112
|
|
|
109
113
|
export interface StopWorkflowRunRequest {
|
|
@@ -328,26 +332,28 @@ export interface WorkflowRunsApiInterface {
|
|
|
328
332
|
/**
|
|
329
333
|
* Creates request options for startWorkflowRun without sending the request
|
|
330
334
|
* @param {string} runId
|
|
335
|
+
* @param {StartWorkflowRunRequest} [startWorkflowRunRequest]
|
|
331
336
|
* @throws {RequiredError}
|
|
332
337
|
* @memberof WorkflowRunsApiInterface
|
|
333
338
|
*/
|
|
334
|
-
startWorkflowRunRequestOpts(requestParameters:
|
|
339
|
+
startWorkflowRunRequestOpts(requestParameters: StartWorkflowRunOperationRequest): Promise<runtime.RequestOpts>;
|
|
335
340
|
|
|
336
341
|
/**
|
|
337
|
-
* Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live).
|
|
342
|
+
* Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live). The body is optional; ``user_message`` (when sent) is pinned into the snapshot and shown in the run thread (see ``StartWorkflowRunRequest``).
|
|
338
343
|
* @summary Start Workflow Run Handler
|
|
339
344
|
* @param {string} runId
|
|
345
|
+
* @param {StartWorkflowRunRequest} [startWorkflowRunRequest]
|
|
340
346
|
* @param {*} [options] Override http request option.
|
|
341
347
|
* @throws {RequiredError}
|
|
342
348
|
* @memberof WorkflowRunsApiInterface
|
|
343
349
|
*/
|
|
344
|
-
startWorkflowRunRaw(requestParameters:
|
|
350
|
+
startWorkflowRunRaw(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
|
|
345
351
|
|
|
346
352
|
/**
|
|
347
|
-
* Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live).
|
|
353
|
+
* Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live). The body is optional; ``user_message`` (when sent) is pinned into the snapshot and shown in the run thread (see ``StartWorkflowRunRequest``).
|
|
348
354
|
* Start Workflow Run Handler
|
|
349
355
|
*/
|
|
350
|
-
startWorkflowRun(requestParameters:
|
|
356
|
+
startWorkflowRun(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
|
|
351
357
|
|
|
352
358
|
/**
|
|
353
359
|
* Creates request options for stopWorkflowRun without sending the request
|
|
@@ -883,7 +889,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
|
|
|
883
889
|
/**
|
|
884
890
|
* Creates request options for startWorkflowRun without sending the request
|
|
885
891
|
*/
|
|
886
|
-
async startWorkflowRunRequestOpts(requestParameters:
|
|
892
|
+
async startWorkflowRunRequestOpts(requestParameters: StartWorkflowRunOperationRequest): Promise<runtime.RequestOpts> {
|
|
887
893
|
if (requestParameters['runId'] == null) {
|
|
888
894
|
throw new runtime.RequiredError(
|
|
889
895
|
'runId',
|
|
@@ -895,6 +901,8 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
|
|
|
895
901
|
|
|
896
902
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
897
903
|
|
|
904
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
905
|
+
|
|
898
906
|
if (this.configuration && this.configuration.accessToken) {
|
|
899
907
|
const token = this.configuration.accessToken;
|
|
900
908
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -912,14 +920,15 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
|
|
|
912
920
|
method: 'POST',
|
|
913
921
|
headers: headerParameters,
|
|
914
922
|
query: queryParameters,
|
|
923
|
+
body: StartWorkflowRunRequestToJSON(requestParameters['startWorkflowRunRequest']),
|
|
915
924
|
};
|
|
916
925
|
}
|
|
917
926
|
|
|
918
927
|
/**
|
|
919
|
-
* Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live).
|
|
928
|
+
* Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live). The body is optional; ``user_message`` (when sent) is pinned into the snapshot and shown in the run thread (see ``StartWorkflowRunRequest``).
|
|
920
929
|
* Start Workflow Run Handler
|
|
921
930
|
*/
|
|
922
|
-
async startWorkflowRunRaw(requestParameters:
|
|
931
|
+
async startWorkflowRunRaw(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>> {
|
|
923
932
|
const requestOptions = await this.startWorkflowRunRequestOpts(requestParameters);
|
|
924
933
|
const response = await this.request(requestOptions, initOverrides);
|
|
925
934
|
|
|
@@ -927,10 +936,10 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
|
|
|
927
936
|
}
|
|
928
937
|
|
|
929
938
|
/**
|
|
930
|
-
* Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live).
|
|
939
|
+
* Flip a NOT_STARTED run to IN_PROGRESS and dispatch its agent run. Idempotent on IN_PROGRESS (returns the row). Terminal states → 409. Inputs still ingesting or in a failed terminal state → 409. The snapshot is built at this point (KB DOCUMENTs resolve to active versions, uploaded DVs are walked from inputs/, KB FOLDERs stay live). The body is optional; ``user_message`` (when sent) is pinned into the snapshot and shown in the run thread (see ``StartWorkflowRunRequest``).
|
|
931
940
|
* Start Workflow Run Handler
|
|
932
941
|
*/
|
|
933
|
-
async startWorkflowRun(requestParameters:
|
|
942
|
+
async startWorkflowRun(requestParameters: StartWorkflowRunOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse> {
|
|
934
943
|
const response = await this.startWorkflowRunRaw(requestParameters, initOverrides);
|
|
935
944
|
return await response.value();
|
|
936
945
|
}
|
|
@@ -49,6 +49,36 @@ export interface DirectorySyncResponse {
|
|
|
49
49
|
* @memberof DirectorySyncResponse
|
|
50
50
|
*/
|
|
51
51
|
usersSkipped?: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof DirectorySyncResponse
|
|
56
|
+
*/
|
|
57
|
+
seatCapExcludedNum?: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof DirectorySyncResponse
|
|
62
|
+
*/
|
|
63
|
+
groupsCreated?: number;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof DirectorySyncResponse
|
|
68
|
+
*/
|
|
69
|
+
groupsUpdated?: number;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof DirectorySyncResponse
|
|
74
|
+
*/
|
|
75
|
+
groupMembershipsAdded?: number;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof DirectorySyncResponse
|
|
80
|
+
*/
|
|
81
|
+
groupMembershipsRemoved?: number;
|
|
52
82
|
/**
|
|
53
83
|
*
|
|
54
84
|
* @type {Array<string>}
|
|
@@ -102,6 +132,11 @@ export function DirectorySyncResponseFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
102
132
|
'usersActivated': json['users_activated'] == null ? undefined : json['users_activated'],
|
|
103
133
|
'usersDeactivated': json['users_deactivated'] == null ? undefined : json['users_deactivated'],
|
|
104
134
|
'usersSkipped': json['users_skipped'] == null ? undefined : json['users_skipped'],
|
|
135
|
+
'seatCapExcludedNum': json['seat_cap_excluded_num'] == null ? undefined : json['seat_cap_excluded_num'],
|
|
136
|
+
'groupsCreated': json['groups_created'] == null ? undefined : json['groups_created'],
|
|
137
|
+
'groupsUpdated': json['groups_updated'] == null ? undefined : json['groups_updated'],
|
|
138
|
+
'groupMembershipsAdded': json['group_memberships_added'] == null ? undefined : json['group_memberships_added'],
|
|
139
|
+
'groupMembershipsRemoved': json['group_memberships_removed'] == null ? undefined : json['group_memberships_removed'],
|
|
105
140
|
'warnings': json['warnings'] == null ? undefined : json['warnings'],
|
|
106
141
|
'errors': json['errors'] == null ? undefined : json['errors'],
|
|
107
142
|
};
|
|
@@ -123,6 +158,11 @@ export function DirectorySyncResponseToJSONTyped(value?: DirectorySyncResponse |
|
|
|
123
158
|
'users_activated': value['usersActivated'],
|
|
124
159
|
'users_deactivated': value['usersDeactivated'],
|
|
125
160
|
'users_skipped': value['usersSkipped'],
|
|
161
|
+
'seat_cap_excluded_num': value['seatCapExcludedNum'],
|
|
162
|
+
'groups_created': value['groupsCreated'],
|
|
163
|
+
'groups_updated': value['groupsUpdated'],
|
|
164
|
+
'group_memberships_added': value['groupMembershipsAdded'],
|
|
165
|
+
'group_memberships_removed': value['groupMembershipsRemoved'],
|
|
126
166
|
'warnings': value['warnings'],
|
|
127
167
|
'errors': value['errors'],
|
|
128
168
|
};
|
|
@@ -43,6 +43,12 @@ export interface GroupResponse {
|
|
|
43
43
|
* @memberof GroupResponse
|
|
44
44
|
*/
|
|
45
45
|
description: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof GroupResponse
|
|
50
|
+
*/
|
|
51
|
+
idpGroupId?: string | null;
|
|
46
52
|
/**
|
|
47
53
|
*
|
|
48
54
|
* @type {number}
|
|
@@ -107,6 +113,7 @@ export function GroupResponseFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
107
113
|
'tenantId': json['tenant_id'],
|
|
108
114
|
'name': json['name'],
|
|
109
115
|
'description': json['description'],
|
|
116
|
+
'idpGroupId': json['idp_group_id'] == null ? undefined : json['idp_group_id'],
|
|
110
117
|
'memberCount': json['member_count'] == null ? undefined : json['member_count'],
|
|
111
118
|
'createdAt': (new Date(json['created_at'])),
|
|
112
119
|
'updatedAt': (new Date(json['updated_at'])),
|
|
@@ -128,6 +135,7 @@ export function GroupResponseToJSONTyped(value?: GroupResponse | null, ignoreDis
|
|
|
128
135
|
'tenant_id': value['tenantId'],
|
|
129
136
|
'name': value['name'],
|
|
130
137
|
'description': value['description'],
|
|
138
|
+
'idp_group_id': value['idpGroupId'],
|
|
131
139
|
'member_count': value['memberCount'],
|
|
132
140
|
'created_at': value['createdAt'].toISOString(),
|
|
133
141
|
'updated_at': value['updatedAt'].toISOString(),
|
|
@@ -43,6 +43,12 @@ export interface MembershipResponse {
|
|
|
43
43
|
* @memberof MembershipResponse
|
|
44
44
|
*/
|
|
45
45
|
userId: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
* @memberof MembershipResponse
|
|
50
|
+
*/
|
|
51
|
+
idpManaged?: boolean;
|
|
46
52
|
/**
|
|
47
53
|
*
|
|
48
54
|
* @type {Date}
|
|
@@ -101,6 +107,7 @@ export function MembershipResponseFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
101
107
|
'tenantId': json['tenant_id'],
|
|
102
108
|
'groupId': json['group_id'],
|
|
103
109
|
'userId': json['user_id'],
|
|
110
|
+
'idpManaged': json['idp_managed'] == null ? undefined : json['idp_managed'],
|
|
104
111
|
'createdAt': (new Date(json['created_at'])),
|
|
105
112
|
'updatedAt': (new Date(json['updated_at'])),
|
|
106
113
|
};
|
|
@@ -121,6 +128,7 @@ export function MembershipResponseToJSONTyped(value?: MembershipResponse | null,
|
|
|
121
128
|
'tenant_id': value['tenantId'],
|
|
122
129
|
'group_id': value['groupId'],
|
|
123
130
|
'user_id': value['userId'],
|
|
131
|
+
'idp_managed': value['idpManaged'],
|
|
124
132
|
'created_at': value['createdAt'].toISOString(),
|
|
125
133
|
'updated_at': value['updatedAt'].toISOString(),
|
|
126
134
|
};
|