@knowledge-stack/ksapi 1.139.0 → 1.140.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 +28 -0
- package/README.md +25 -11
- package/dist/apis/AdminKbApi.d.ts +109 -0
- package/dist/apis/AdminKbApi.js +172 -0
- package/dist/apis/AdminWorkflowsApi.d.ts +252 -0
- package/dist/apis/AdminWorkflowsApi.js +337 -0
- package/dist/apis/SkillsApi.d.ts +4 -4
- package/dist/apis/SkillsApi.js +2 -2
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/AdminKbApi.d.ts +109 -0
- package/dist/esm/apis/AdminKbApi.js +135 -0
- package/dist/esm/apis/AdminWorkflowsApi.d.ts +252 -0
- package/dist/esm/apis/AdminWorkflowsApi.js +300 -0
- package/dist/esm/apis/SkillsApi.d.ts +4 -4
- package/dist/esm/apis/SkillsApi.js +2 -2
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/DefinitionOutputStat.d.ts +65 -0
- package/dist/esm/models/DefinitionOutputStat.js +56 -0
- package/dist/esm/models/HourHistogramResponse.d.ts +53 -0
- package/dist/esm/models/HourHistogramResponse.js +54 -0
- package/dist/esm/models/KbMetric.d.ts +26 -0
- package/dist/esm/models/KbMetric.js +44 -0
- package/dist/esm/models/KbSummaryResponse.d.ts +152 -0
- package/dist/esm/models/KbSummaryResponse.js +109 -0
- package/dist/esm/models/KbTimeseriesResponse.d.ts +71 -0
- package/dist/esm/models/KbTimeseriesResponse.js +57 -0
- package/dist/esm/models/LabeledSeries.d.ts +54 -0
- package/dist/esm/models/LabeledSeries.js +47 -0
- package/dist/esm/models/LeaderboardEntry.d.ts +59 -0
- package/dist/esm/models/LeaderboardEntry.js +52 -0
- package/dist/esm/models/RunTimeseriesResponse.d.ts +61 -0
- package/dist/esm/models/RunTimeseriesResponse.js +52 -0
- package/dist/esm/models/SkillResponse.d.ts +7 -0
- package/dist/esm/models/SkillResponse.js +3 -0
- package/dist/esm/models/TimeBucket.d.ts +27 -0
- package/dist/esm/models/TimeBucket.js +45 -0
- package/dist/esm/models/TimeseriesPoint.d.ts +53 -0
- package/dist/esm/models/TimeseriesPoint.js +48 -0
- package/dist/esm/models/WorkflowLeaderboardResponse.d.ts +54 -0
- package/dist/esm/models/WorkflowLeaderboardResponse.js +45 -0
- package/dist/esm/models/WorkflowOutputStatsResponse.d.ts +54 -0
- package/dist/esm/models/WorkflowOutputStatsResponse.js +47 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/DefinitionOutputStat.d.ts +65 -0
- package/dist/models/DefinitionOutputStat.js +64 -0
- package/dist/models/HourHistogramResponse.d.ts +53 -0
- package/dist/models/HourHistogramResponse.js +62 -0
- package/dist/models/KbMetric.d.ts +26 -0
- package/dist/models/KbMetric.js +52 -0
- package/dist/models/KbSummaryResponse.d.ts +152 -0
- package/dist/models/KbSummaryResponse.js +117 -0
- package/dist/models/KbTimeseriesResponse.d.ts +71 -0
- package/dist/models/KbTimeseriesResponse.js +65 -0
- package/dist/models/LabeledSeries.d.ts +54 -0
- package/dist/models/LabeledSeries.js +55 -0
- package/dist/models/LeaderboardEntry.d.ts +59 -0
- package/dist/models/LeaderboardEntry.js +60 -0
- package/dist/models/RunTimeseriesResponse.d.ts +61 -0
- package/dist/models/RunTimeseriesResponse.js +60 -0
- package/dist/models/SkillResponse.d.ts +7 -0
- package/dist/models/SkillResponse.js +3 -0
- package/dist/models/TimeBucket.d.ts +27 -0
- package/dist/models/TimeBucket.js +53 -0
- package/dist/models/TimeseriesPoint.d.ts +53 -0
- package/dist/models/TimeseriesPoint.js +56 -0
- package/dist/models/WorkflowLeaderboardResponse.d.ts +54 -0
- package/dist/models/WorkflowLeaderboardResponse.js +53 -0
- package/dist/models/WorkflowOutputStatsResponse.d.ts +54 -0
- package/dist/models/WorkflowOutputStatsResponse.js +55 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/docs/AdminKbApi.md +163 -0
- package/docs/AdminWorkflowsApi.md +424 -0
- package/docs/DefinitionOutputStat.md +41 -0
- package/docs/FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.md +2 -0
- package/docs/HourHistogramResponse.md +37 -0
- package/docs/KbMetric.md +33 -0
- package/docs/KbSummaryResponse.md +67 -0
- package/docs/KbTimeseriesResponse.md +41 -0
- package/docs/LabeledSeries.md +37 -0
- package/docs/LeaderboardEntry.md +39 -0
- package/docs/RunTimeseriesResponse.md +39 -0
- package/docs/SkillResponse.md +2 -0
- package/docs/SkillsApi.md +1 -1
- package/docs/TimeBucket.md +33 -0
- package/docs/TimeseriesPoint.md +37 -0
- package/docs/WorkflowLeaderboardResponse.md +37 -0
- package/docs/WorkflowOutputStatsResponse.md +37 -0
- package/package.json +1 -1
- package/src/apis/AdminKbApi.ts +237 -0
- package/src/apis/AdminWorkflowsApi.ts +539 -0
- package/src/apis/SkillsApi.ts +4 -4
- package/src/apis/index.ts +2 -0
- package/src/models/DefinitionOutputStat.ts +110 -0
- package/src/models/HourHistogramResponse.ts +97 -0
- package/src/models/KbMetric.ts +54 -0
- package/src/models/KbSummaryResponse.ts +235 -0
- package/src/models/KbTimeseriesResponse.ts +136 -0
- package/src/models/LabeledSeries.ts +99 -0
- package/src/models/LeaderboardEntry.ts +101 -0
- package/src/models/RunTimeseriesResponse.ts +117 -0
- package/src/models/SkillResponse.ts +15 -0
- package/src/models/TimeBucket.ts +55 -0
- package/src/models/TimeseriesPoint.ts +92 -0
- package/src/models/WorkflowLeaderboardResponse.ts +98 -0
- package/src/models/WorkflowOutputStatsResponse.ts +99 -0
- package/src/models/index.ts +12 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# AdminKbApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**getAdminKbSummary**](AdminKbApi.md#getadminkbsummary) | **GET** /v1/admin/kb/summary | Get Admin Kb Summary Handler |
|
|
8
|
+
| [**getAdminKbTimeseries**](AdminKbApi.md#getadminkbtimeseries) | **GET** /v1/admin/kb/timeseries | Get Admin Kb Timeseries Handler |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## getAdminKbSummary
|
|
13
|
+
|
|
14
|
+
> KbSummaryResponse getAdminKbSummary()
|
|
15
|
+
|
|
16
|
+
Get Admin Kb Summary Handler
|
|
17
|
+
|
|
18
|
+
Point-in-time knowledge-base totals for the tenant.
|
|
19
|
+
|
|
20
|
+
### Example
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import {
|
|
24
|
+
Configuration,
|
|
25
|
+
AdminKbApi,
|
|
26
|
+
} from '@knowledge-stack/ksapi';
|
|
27
|
+
import type { GetAdminKbSummaryRequest } from '@knowledge-stack/ksapi';
|
|
28
|
+
|
|
29
|
+
async function example() {
|
|
30
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
31
|
+
const config = new Configuration({
|
|
32
|
+
// To configure API key authorization: cookieAuth
|
|
33
|
+
apiKey: "YOUR API KEY",
|
|
34
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
35
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
36
|
+
});
|
|
37
|
+
const api = new AdminKbApi(config);
|
|
38
|
+
|
|
39
|
+
try {
|
|
40
|
+
const data = await api.getAdminKbSummary();
|
|
41
|
+
console.log(data);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error(error);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Run the test
|
|
48
|
+
example().catch(console.error);
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Parameters
|
|
52
|
+
|
|
53
|
+
This endpoint does not need any parameter.
|
|
54
|
+
|
|
55
|
+
### Return type
|
|
56
|
+
|
|
57
|
+
[**KbSummaryResponse**](KbSummaryResponse.md)
|
|
58
|
+
|
|
59
|
+
### Authorization
|
|
60
|
+
|
|
61
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
62
|
+
|
|
63
|
+
### HTTP request headers
|
|
64
|
+
|
|
65
|
+
- **Content-Type**: Not defined
|
|
66
|
+
- **Accept**: `application/json`
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### HTTP response details
|
|
70
|
+
| Status code | Description | Response headers |
|
|
71
|
+
|-------------|-------------|------------------|
|
|
72
|
+
| **200** | Successful Response | - |
|
|
73
|
+
| **0** | Error response. | - |
|
|
74
|
+
|
|
75
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## getAdminKbTimeseries
|
|
79
|
+
|
|
80
|
+
> KbTimeseriesResponse getAdminKbTimeseries(metric, since, until, bucket, timezone)
|
|
81
|
+
|
|
82
|
+
Get Admin Kb Timeseries Handler
|
|
83
|
+
|
|
84
|
+
A knowledge-base metric bucketed over time, in the resolved timezone.
|
|
85
|
+
|
|
86
|
+
### Example
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
import {
|
|
90
|
+
Configuration,
|
|
91
|
+
AdminKbApi,
|
|
92
|
+
} from '@knowledge-stack/ksapi';
|
|
93
|
+
import type { GetAdminKbTimeseriesRequest } from '@knowledge-stack/ksapi';
|
|
94
|
+
|
|
95
|
+
async function example() {
|
|
96
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
97
|
+
const config = new Configuration({
|
|
98
|
+
// To configure API key authorization: cookieAuth
|
|
99
|
+
apiKey: "YOUR API KEY",
|
|
100
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
101
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
102
|
+
});
|
|
103
|
+
const api = new AdminKbApi(config);
|
|
104
|
+
|
|
105
|
+
const body = {
|
|
106
|
+
// KbMetric | Which KB metric to bucket.
|
|
107
|
+
metric: ...,
|
|
108
|
+
// Date | Window start. (optional)
|
|
109
|
+
since: 2013-10-20T19:20:30+01:00,
|
|
110
|
+
// Date | Window end. (optional)
|
|
111
|
+
until: 2013-10-20T19:20:30+01:00,
|
|
112
|
+
// TimeBucket | Bucket size. (optional)
|
|
113
|
+
bucket: ...,
|
|
114
|
+
// string | IANA tz override; defaults to tenant setting. (optional)
|
|
115
|
+
timezone: timezone_example,
|
|
116
|
+
} satisfies GetAdminKbTimeseriesRequest;
|
|
117
|
+
|
|
118
|
+
try {
|
|
119
|
+
const data = await api.getAdminKbTimeseries(body);
|
|
120
|
+
console.log(data);
|
|
121
|
+
} catch (error) {
|
|
122
|
+
console.error(error);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Run the test
|
|
127
|
+
example().catch(console.error);
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Parameters
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
| Name | Type | Description | Notes |
|
|
134
|
+
|------------- | ------------- | ------------- | -------------|
|
|
135
|
+
| **metric** | `KbMetric` | Which KB metric to bucket. | [Defaults to `undefined`] [Enum: document_uploads, ingestion_completed, ingestion_failed] |
|
|
136
|
+
| **since** | `Date` | Window start. | [Optional] [Defaults to `undefined`] |
|
|
137
|
+
| **until** | `Date` | Window end. | [Optional] [Defaults to `undefined`] |
|
|
138
|
+
| **bucket** | `TimeBucket` | Bucket size. | [Optional] [Defaults to `undefined`] [Enum: hour, day, week, month] |
|
|
139
|
+
| **timezone** | `string` | IANA tz override; defaults to tenant setting. | [Optional] [Defaults to `undefined`] |
|
|
140
|
+
|
|
141
|
+
### Return type
|
|
142
|
+
|
|
143
|
+
[**KbTimeseriesResponse**](KbTimeseriesResponse.md)
|
|
144
|
+
|
|
145
|
+
### Authorization
|
|
146
|
+
|
|
147
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
148
|
+
|
|
149
|
+
### HTTP request headers
|
|
150
|
+
|
|
151
|
+
- **Content-Type**: Not defined
|
|
152
|
+
- **Accept**: `application/json`
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
### HTTP response details
|
|
156
|
+
| Status code | Description | Response headers |
|
|
157
|
+
|-------------|-------------|------------------|
|
|
158
|
+
| **200** | Successful Response | - |
|
|
159
|
+
| **422** | Validation Error | - |
|
|
160
|
+
| **0** | Error response. | - |
|
|
161
|
+
|
|
162
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
163
|
+
|
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
# AdminWorkflowsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**getAdminWorkflowByHour**](AdminWorkflowsApi.md#getadminworkflowbyhour) | **GET** /v1/admin/workflows/by-hour | Get Admin Workflow By Hour Handler |
|
|
8
|
+
| [**getAdminWorkflowLeaderboard**](AdminWorkflowsApi.md#getadminworkflowleaderboard) | **GET** /v1/admin/workflows/leaderboard | Get Admin Workflow Leaderboard Handler |
|
|
9
|
+
| [**getAdminWorkflowOutputStats**](AdminWorkflowsApi.md#getadminworkflowoutputstats) | **GET** /v1/admin/workflows/output-stats | Get Admin Workflow Output Stats Handler |
|
|
10
|
+
| [**getAdminWorkflowSummary**](AdminWorkflowsApi.md#getadminworkflowsummary) | **GET** /v1/admin/workflows/summary | Get Admin Workflow Summary Handler |
|
|
11
|
+
| [**getAdminWorkflowTimeseries**](AdminWorkflowsApi.md#getadminworkflowtimeseries) | **GET** /v1/admin/workflows/timeseries | Get Admin Workflow Timeseries Handler |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## getAdminWorkflowByHour
|
|
16
|
+
|
|
17
|
+
> HourHistogramResponse getAdminWorkflowByHour(since, until, timezone, definitionId)
|
|
18
|
+
|
|
19
|
+
Get Admin Workflow By Hour Handler
|
|
20
|
+
|
|
21
|
+
Runs per hour-of-day (0-23) in the resolved timezone.
|
|
22
|
+
|
|
23
|
+
### Example
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import {
|
|
27
|
+
Configuration,
|
|
28
|
+
AdminWorkflowsApi,
|
|
29
|
+
} from '@knowledge-stack/ksapi';
|
|
30
|
+
import type { GetAdminWorkflowByHourRequest } from '@knowledge-stack/ksapi';
|
|
31
|
+
|
|
32
|
+
async function example() {
|
|
33
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
34
|
+
const config = new Configuration({
|
|
35
|
+
// To configure API key authorization: cookieAuth
|
|
36
|
+
apiKey: "YOUR API KEY",
|
|
37
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
38
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
39
|
+
});
|
|
40
|
+
const api = new AdminWorkflowsApi(config);
|
|
41
|
+
|
|
42
|
+
const body = {
|
|
43
|
+
// Date | Window start. (optional)
|
|
44
|
+
since: 2013-10-20T19:20:30+01:00,
|
|
45
|
+
// Date | Window end. (optional)
|
|
46
|
+
until: 2013-10-20T19:20:30+01:00,
|
|
47
|
+
// string | IANA tz override; defaults to tenant setting. (optional)
|
|
48
|
+
timezone: timezone_example,
|
|
49
|
+
// string | Scope to one workflow. (optional)
|
|
50
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
51
|
+
} satisfies GetAdminWorkflowByHourRequest;
|
|
52
|
+
|
|
53
|
+
try {
|
|
54
|
+
const data = await api.getAdminWorkflowByHour(body);
|
|
55
|
+
console.log(data);
|
|
56
|
+
} catch (error) {
|
|
57
|
+
console.error(error);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Run the test
|
|
62
|
+
example().catch(console.error);
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Parameters
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
| Name | Type | Description | Notes |
|
|
69
|
+
|------------- | ------------- | ------------- | -------------|
|
|
70
|
+
| **since** | `Date` | Window start. | [Optional] [Defaults to `undefined`] |
|
|
71
|
+
| **until** | `Date` | Window end. | [Optional] [Defaults to `undefined`] |
|
|
72
|
+
| **timezone** | `string` | IANA tz override; defaults to tenant setting. | [Optional] [Defaults to `undefined`] |
|
|
73
|
+
| **definitionId** | `string` | Scope to one workflow. | [Optional] [Defaults to `undefined`] |
|
|
74
|
+
|
|
75
|
+
### Return type
|
|
76
|
+
|
|
77
|
+
[**HourHistogramResponse**](HourHistogramResponse.md)
|
|
78
|
+
|
|
79
|
+
### Authorization
|
|
80
|
+
|
|
81
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
82
|
+
|
|
83
|
+
### HTTP request headers
|
|
84
|
+
|
|
85
|
+
- **Content-Type**: Not defined
|
|
86
|
+
- **Accept**: `application/json`
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
### HTTP response details
|
|
90
|
+
| Status code | Description | Response headers |
|
|
91
|
+
|-------------|-------------|------------------|
|
|
92
|
+
| **200** | Successful Response | - |
|
|
93
|
+
| **422** | Validation Error | - |
|
|
94
|
+
| **0** | Error response. | - |
|
|
95
|
+
|
|
96
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
## getAdminWorkflowLeaderboard
|
|
100
|
+
|
|
101
|
+
> WorkflowLeaderboardResponse getAdminWorkflowLeaderboard(since, until, limit)
|
|
102
|
+
|
|
103
|
+
Get Admin Workflow Leaderboard Handler
|
|
104
|
+
|
|
105
|
+
Top workflows and top run owners by run count.
|
|
106
|
+
|
|
107
|
+
### Example
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
import {
|
|
111
|
+
Configuration,
|
|
112
|
+
AdminWorkflowsApi,
|
|
113
|
+
} from '@knowledge-stack/ksapi';
|
|
114
|
+
import type { GetAdminWorkflowLeaderboardRequest } from '@knowledge-stack/ksapi';
|
|
115
|
+
|
|
116
|
+
async function example() {
|
|
117
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
118
|
+
const config = new Configuration({
|
|
119
|
+
// To configure API key authorization: cookieAuth
|
|
120
|
+
apiKey: "YOUR API KEY",
|
|
121
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
122
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
123
|
+
});
|
|
124
|
+
const api = new AdminWorkflowsApi(config);
|
|
125
|
+
|
|
126
|
+
const body = {
|
|
127
|
+
// Date | Window start. (optional)
|
|
128
|
+
since: 2013-10-20T19:20:30+01:00,
|
|
129
|
+
// Date | Window end. (optional)
|
|
130
|
+
until: 2013-10-20T19:20:30+01:00,
|
|
131
|
+
// number | Top-N per leaderboard. (optional)
|
|
132
|
+
limit: 56,
|
|
133
|
+
} satisfies GetAdminWorkflowLeaderboardRequest;
|
|
134
|
+
|
|
135
|
+
try {
|
|
136
|
+
const data = await api.getAdminWorkflowLeaderboard(body);
|
|
137
|
+
console.log(data);
|
|
138
|
+
} catch (error) {
|
|
139
|
+
console.error(error);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Run the test
|
|
144
|
+
example().catch(console.error);
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Parameters
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
| Name | Type | Description | Notes |
|
|
151
|
+
|------------- | ------------- | ------------- | -------------|
|
|
152
|
+
| **since** | `Date` | Window start. | [Optional] [Defaults to `undefined`] |
|
|
153
|
+
| **until** | `Date` | Window end. | [Optional] [Defaults to `undefined`] |
|
|
154
|
+
| **limit** | `number` | Top-N per leaderboard. | [Optional] [Defaults to `10`] |
|
|
155
|
+
|
|
156
|
+
### Return type
|
|
157
|
+
|
|
158
|
+
[**WorkflowLeaderboardResponse**](WorkflowLeaderboardResponse.md)
|
|
159
|
+
|
|
160
|
+
### Authorization
|
|
161
|
+
|
|
162
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
163
|
+
|
|
164
|
+
### HTTP request headers
|
|
165
|
+
|
|
166
|
+
- **Content-Type**: Not defined
|
|
167
|
+
- **Accept**: `application/json`
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
### HTTP response details
|
|
171
|
+
| Status code | Description | Response headers |
|
|
172
|
+
|-------------|-------------|------------------|
|
|
173
|
+
| **200** | Successful Response | - |
|
|
174
|
+
| **422** | Validation Error | - |
|
|
175
|
+
| **0** | Error response. | - |
|
|
176
|
+
|
|
177
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
## getAdminWorkflowOutputStats
|
|
181
|
+
|
|
182
|
+
> WorkflowOutputStatsResponse getAdminWorkflowOutputStats(since, until)
|
|
183
|
+
|
|
184
|
+
Get Admin Workflow Output Stats Handler
|
|
185
|
+
|
|
186
|
+
Average output DOCUMENTs generated per workflow definition (completed runs).
|
|
187
|
+
|
|
188
|
+
### Example
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
import {
|
|
192
|
+
Configuration,
|
|
193
|
+
AdminWorkflowsApi,
|
|
194
|
+
} from '@knowledge-stack/ksapi';
|
|
195
|
+
import type { GetAdminWorkflowOutputStatsRequest } from '@knowledge-stack/ksapi';
|
|
196
|
+
|
|
197
|
+
async function example() {
|
|
198
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
199
|
+
const config = new Configuration({
|
|
200
|
+
// To configure API key authorization: cookieAuth
|
|
201
|
+
apiKey: "YOUR API KEY",
|
|
202
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
203
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
204
|
+
});
|
|
205
|
+
const api = new AdminWorkflowsApi(config);
|
|
206
|
+
|
|
207
|
+
const body = {
|
|
208
|
+
// Date | Window start. (optional)
|
|
209
|
+
since: 2013-10-20T19:20:30+01:00,
|
|
210
|
+
// Date | Window end. (optional)
|
|
211
|
+
until: 2013-10-20T19:20:30+01:00,
|
|
212
|
+
} satisfies GetAdminWorkflowOutputStatsRequest;
|
|
213
|
+
|
|
214
|
+
try {
|
|
215
|
+
const data = await api.getAdminWorkflowOutputStats(body);
|
|
216
|
+
console.log(data);
|
|
217
|
+
} catch (error) {
|
|
218
|
+
console.error(error);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Run the test
|
|
223
|
+
example().catch(console.error);
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Parameters
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
| Name | Type | Description | Notes |
|
|
230
|
+
|------------- | ------------- | ------------- | -------------|
|
|
231
|
+
| **since** | `Date` | Window start. | [Optional] [Defaults to `undefined`] |
|
|
232
|
+
| **until** | `Date` | Window end. | [Optional] [Defaults to `undefined`] |
|
|
233
|
+
|
|
234
|
+
### Return type
|
|
235
|
+
|
|
236
|
+
[**WorkflowOutputStatsResponse**](WorkflowOutputStatsResponse.md)
|
|
237
|
+
|
|
238
|
+
### Authorization
|
|
239
|
+
|
|
240
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
241
|
+
|
|
242
|
+
### HTTP request headers
|
|
243
|
+
|
|
244
|
+
- **Content-Type**: Not defined
|
|
245
|
+
- **Accept**: `application/json`
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
### HTTP response details
|
|
249
|
+
| Status code | Description | Response headers |
|
|
250
|
+
|-------------|-------------|------------------|
|
|
251
|
+
| **200** | Successful Response | - |
|
|
252
|
+
| **422** | Validation Error | - |
|
|
253
|
+
| **0** | Error response. | - |
|
|
254
|
+
|
|
255
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
## getAdminWorkflowSummary
|
|
259
|
+
|
|
260
|
+
> WorkflowRunSummaryResponse getAdminWorkflowSummary(since, until, definitionId)
|
|
261
|
+
|
|
262
|
+
Get Admin Workflow Summary Handler
|
|
263
|
+
|
|
264
|
+
Tenant-wide run health: counts, failure rate, durations, approval backlog.
|
|
265
|
+
|
|
266
|
+
### Example
|
|
267
|
+
|
|
268
|
+
```ts
|
|
269
|
+
import {
|
|
270
|
+
Configuration,
|
|
271
|
+
AdminWorkflowsApi,
|
|
272
|
+
} from '@knowledge-stack/ksapi';
|
|
273
|
+
import type { GetAdminWorkflowSummaryRequest } from '@knowledge-stack/ksapi';
|
|
274
|
+
|
|
275
|
+
async function example() {
|
|
276
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
277
|
+
const config = new Configuration({
|
|
278
|
+
// To configure API key authorization: cookieAuth
|
|
279
|
+
apiKey: "YOUR API KEY",
|
|
280
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
281
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
282
|
+
});
|
|
283
|
+
const api = new AdminWorkflowsApi(config);
|
|
284
|
+
|
|
285
|
+
const body = {
|
|
286
|
+
// Date | Window start (inclusive). Defaults to 7 days ago. (optional)
|
|
287
|
+
since: 2013-10-20T19:20:30+01:00,
|
|
288
|
+
// Date | Window end (inclusive). (optional)
|
|
289
|
+
until: 2013-10-20T19:20:30+01:00,
|
|
290
|
+
// string | Scope all numbers to one workflow. (optional)
|
|
291
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
292
|
+
} satisfies GetAdminWorkflowSummaryRequest;
|
|
293
|
+
|
|
294
|
+
try {
|
|
295
|
+
const data = await api.getAdminWorkflowSummary(body);
|
|
296
|
+
console.log(data);
|
|
297
|
+
} catch (error) {
|
|
298
|
+
console.error(error);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// Run the test
|
|
303
|
+
example().catch(console.error);
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Parameters
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
| Name | Type | Description | Notes |
|
|
310
|
+
|------------- | ------------- | ------------- | -------------|
|
|
311
|
+
| **since** | `Date` | Window start (inclusive). Defaults to 7 days ago. | [Optional] [Defaults to `undefined`] |
|
|
312
|
+
| **until** | `Date` | Window end (inclusive). | [Optional] [Defaults to `undefined`] |
|
|
313
|
+
| **definitionId** | `string` | Scope all numbers to one workflow. | [Optional] [Defaults to `undefined`] |
|
|
314
|
+
|
|
315
|
+
### Return type
|
|
316
|
+
|
|
317
|
+
[**WorkflowRunSummaryResponse**](WorkflowRunSummaryResponse.md)
|
|
318
|
+
|
|
319
|
+
### Authorization
|
|
320
|
+
|
|
321
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
322
|
+
|
|
323
|
+
### HTTP request headers
|
|
324
|
+
|
|
325
|
+
- **Content-Type**: Not defined
|
|
326
|
+
- **Accept**: `application/json`
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
### HTTP response details
|
|
330
|
+
| Status code | Description | Response headers |
|
|
331
|
+
|-------------|-------------|------------------|
|
|
332
|
+
| **200** | Successful Response | - |
|
|
333
|
+
| **422** | Validation Error | - |
|
|
334
|
+
| **0** | Error response. | - |
|
|
335
|
+
|
|
336
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
## getAdminWorkflowTimeseries
|
|
340
|
+
|
|
341
|
+
> RunTimeseriesResponse getAdminWorkflowTimeseries(since, until, bucket, timezone, definitionId)
|
|
342
|
+
|
|
343
|
+
Get Admin Workflow Timeseries Handler
|
|
344
|
+
|
|
345
|
+
Run counts bucketed over time, in the resolved timezone.
|
|
346
|
+
|
|
347
|
+
### Example
|
|
348
|
+
|
|
349
|
+
```ts
|
|
350
|
+
import {
|
|
351
|
+
Configuration,
|
|
352
|
+
AdminWorkflowsApi,
|
|
353
|
+
} from '@knowledge-stack/ksapi';
|
|
354
|
+
import type { GetAdminWorkflowTimeseriesRequest } from '@knowledge-stack/ksapi';
|
|
355
|
+
|
|
356
|
+
async function example() {
|
|
357
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
358
|
+
const config = new Configuration({
|
|
359
|
+
// To configure API key authorization: cookieAuth
|
|
360
|
+
apiKey: "YOUR API KEY",
|
|
361
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
362
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
363
|
+
});
|
|
364
|
+
const api = new AdminWorkflowsApi(config);
|
|
365
|
+
|
|
366
|
+
const body = {
|
|
367
|
+
// Date | Window start. (optional)
|
|
368
|
+
since: 2013-10-20T19:20:30+01:00,
|
|
369
|
+
// Date | Window end. (optional)
|
|
370
|
+
until: 2013-10-20T19:20:30+01:00,
|
|
371
|
+
// TimeBucket | Bucket size. (optional)
|
|
372
|
+
bucket: ...,
|
|
373
|
+
// string | IANA tz override; defaults to tenant setting. (optional)
|
|
374
|
+
timezone: timezone_example,
|
|
375
|
+
// string | Scope to one workflow. (optional)
|
|
376
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
377
|
+
} satisfies GetAdminWorkflowTimeseriesRequest;
|
|
378
|
+
|
|
379
|
+
try {
|
|
380
|
+
const data = await api.getAdminWorkflowTimeseries(body);
|
|
381
|
+
console.log(data);
|
|
382
|
+
} catch (error) {
|
|
383
|
+
console.error(error);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// Run the test
|
|
388
|
+
example().catch(console.error);
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Parameters
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
| Name | Type | Description | Notes |
|
|
395
|
+
|------------- | ------------- | ------------- | -------------|
|
|
396
|
+
| **since** | `Date` | Window start. | [Optional] [Defaults to `undefined`] |
|
|
397
|
+
| **until** | `Date` | Window end. | [Optional] [Defaults to `undefined`] |
|
|
398
|
+
| **bucket** | `TimeBucket` | Bucket size. | [Optional] [Defaults to `undefined`] [Enum: hour, day, week, month] |
|
|
399
|
+
| **timezone** | `string` | IANA tz override; defaults to tenant setting. | [Optional] [Defaults to `undefined`] |
|
|
400
|
+
| **definitionId** | `string` | Scope to one workflow. | [Optional] [Defaults to `undefined`] |
|
|
401
|
+
|
|
402
|
+
### Return type
|
|
403
|
+
|
|
404
|
+
[**RunTimeseriesResponse**](RunTimeseriesResponse.md)
|
|
405
|
+
|
|
406
|
+
### Authorization
|
|
407
|
+
|
|
408
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
409
|
+
|
|
410
|
+
### HTTP request headers
|
|
411
|
+
|
|
412
|
+
- **Content-Type**: Not defined
|
|
413
|
+
- **Accept**: `application/json`
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
### HTTP response details
|
|
417
|
+
| Status code | Description | Response headers |
|
|
418
|
+
|-------------|-------------|------------------|
|
|
419
|
+
| **200** | Successful Response | - |
|
|
420
|
+
| **422** | Validation Error | - |
|
|
421
|
+
| **0** | Error response. | - |
|
|
422
|
+
|
|
423
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
424
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# DefinitionOutputStat
|
|
3
|
+
|
|
4
|
+
Average output-document count for one workflow definition.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`definitionId` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`completedRuns` | number
|
|
13
|
+
`avgDocuments` | number
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { DefinitionOutputStat } from '@knowledge-stack/ksapi'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"definitionId": null,
|
|
23
|
+
"name": null,
|
|
24
|
+
"completedRuns": null,
|
|
25
|
+
"avgDocuments": null,
|
|
26
|
+
} satisfies DefinitionOutputStat
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as DefinitionOutputStat
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
|
@@ -66,6 +66,7 @@ Name | Type
|
|
|
66
66
|
`disclaimerAcceptedBy` | string
|
|
67
67
|
`skillMd` | string
|
|
68
68
|
`scriptNames` | Array<string>
|
|
69
|
+
`scripts` | [Array<SkillScriptFile>](SkillScriptFile.md)
|
|
69
70
|
`hasUnpublishedChanges` | boolean
|
|
70
71
|
|
|
71
72
|
## Example
|
|
@@ -135,6 +136,7 @@ const example = {
|
|
|
135
136
|
"disclaimerAcceptedBy": null,
|
|
136
137
|
"skillMd": null,
|
|
137
138
|
"scriptNames": null,
|
|
139
|
+
"scripts": null,
|
|
138
140
|
"hasUnpublishedChanges": null,
|
|
139
141
|
} satisfies FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR
|
|
140
142
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# HourHistogramResponse
|
|
3
|
+
|
|
4
|
+
Workflow runs by hour-of-day (0-23) in the resolved timezone.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`timezone` | string
|
|
11
|
+
`countsByHour` | Array<number>
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { HourHistogramResponse } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"timezone": null,
|
|
21
|
+
"countsByHour": null,
|
|
22
|
+
} satisfies HourHistogramResponse
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as HourHistogramResponse
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|