@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,539 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
ErrorResponse,
|
|
19
|
+
HTTPValidationError,
|
|
20
|
+
HourHistogramResponse,
|
|
21
|
+
RunTimeseriesResponse,
|
|
22
|
+
TimeBucket,
|
|
23
|
+
WorkflowLeaderboardResponse,
|
|
24
|
+
WorkflowOutputStatsResponse,
|
|
25
|
+
WorkflowRunSummaryResponse,
|
|
26
|
+
} from '../models/index';
|
|
27
|
+
import {
|
|
28
|
+
ErrorResponseFromJSON,
|
|
29
|
+
ErrorResponseToJSON,
|
|
30
|
+
HTTPValidationErrorFromJSON,
|
|
31
|
+
HTTPValidationErrorToJSON,
|
|
32
|
+
HourHistogramResponseFromJSON,
|
|
33
|
+
HourHistogramResponseToJSON,
|
|
34
|
+
RunTimeseriesResponseFromJSON,
|
|
35
|
+
RunTimeseriesResponseToJSON,
|
|
36
|
+
TimeBucketFromJSON,
|
|
37
|
+
TimeBucketToJSON,
|
|
38
|
+
WorkflowLeaderboardResponseFromJSON,
|
|
39
|
+
WorkflowLeaderboardResponseToJSON,
|
|
40
|
+
WorkflowOutputStatsResponseFromJSON,
|
|
41
|
+
WorkflowOutputStatsResponseToJSON,
|
|
42
|
+
WorkflowRunSummaryResponseFromJSON,
|
|
43
|
+
WorkflowRunSummaryResponseToJSON,
|
|
44
|
+
} from '../models/index';
|
|
45
|
+
|
|
46
|
+
export interface GetAdminWorkflowByHourRequest {
|
|
47
|
+
since?: Date | null;
|
|
48
|
+
until?: Date | null;
|
|
49
|
+
timezone?: string | null;
|
|
50
|
+
definitionId?: string | null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface GetAdminWorkflowLeaderboardRequest {
|
|
54
|
+
since?: Date | null;
|
|
55
|
+
until?: Date | null;
|
|
56
|
+
limit?: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface GetAdminWorkflowOutputStatsRequest {
|
|
60
|
+
since?: Date | null;
|
|
61
|
+
until?: Date | null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface GetAdminWorkflowSummaryRequest {
|
|
65
|
+
since?: Date | null;
|
|
66
|
+
until?: Date | null;
|
|
67
|
+
definitionId?: string | null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface GetAdminWorkflowTimeseriesRequest {
|
|
71
|
+
since?: Date | null;
|
|
72
|
+
until?: Date | null;
|
|
73
|
+
bucket?: TimeBucket;
|
|
74
|
+
timezone?: string | null;
|
|
75
|
+
definitionId?: string | null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* AdminWorkflowsApi - interface
|
|
80
|
+
*
|
|
81
|
+
* @export
|
|
82
|
+
* @interface AdminWorkflowsApiInterface
|
|
83
|
+
*/
|
|
84
|
+
export interface AdminWorkflowsApiInterface {
|
|
85
|
+
/**
|
|
86
|
+
* Creates request options for getAdminWorkflowByHour without sending the request
|
|
87
|
+
* @param {Date} [since] Window start.
|
|
88
|
+
* @param {Date} [until] Window end.
|
|
89
|
+
* @param {string} [timezone] IANA tz override; defaults to tenant setting.
|
|
90
|
+
* @param {string} [definitionId] Scope to one workflow.
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
* @memberof AdminWorkflowsApiInterface
|
|
93
|
+
*/
|
|
94
|
+
getAdminWorkflowByHourRequestOpts(requestParameters: GetAdminWorkflowByHourRequest): Promise<runtime.RequestOpts>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Runs per hour-of-day (0-23) in the resolved timezone.
|
|
98
|
+
* @summary Get Admin Workflow By Hour Handler
|
|
99
|
+
* @param {Date} [since] Window start.
|
|
100
|
+
* @param {Date} [until] Window end.
|
|
101
|
+
* @param {string} [timezone] IANA tz override; defaults to tenant setting.
|
|
102
|
+
* @param {string} [definitionId] Scope to one workflow.
|
|
103
|
+
* @param {*} [options] Override http request option.
|
|
104
|
+
* @throws {RequiredError}
|
|
105
|
+
* @memberof AdminWorkflowsApiInterface
|
|
106
|
+
*/
|
|
107
|
+
getAdminWorkflowByHourRaw(requestParameters: GetAdminWorkflowByHourRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HourHistogramResponse>>;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Runs per hour-of-day (0-23) in the resolved timezone.
|
|
111
|
+
* Get Admin Workflow By Hour Handler
|
|
112
|
+
*/
|
|
113
|
+
getAdminWorkflowByHour(requestParameters: GetAdminWorkflowByHourRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HourHistogramResponse>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Creates request options for getAdminWorkflowLeaderboard without sending the request
|
|
117
|
+
* @param {Date} [since] Window start.
|
|
118
|
+
* @param {Date} [until] Window end.
|
|
119
|
+
* @param {number} [limit] Top-N per leaderboard.
|
|
120
|
+
* @throws {RequiredError}
|
|
121
|
+
* @memberof AdminWorkflowsApiInterface
|
|
122
|
+
*/
|
|
123
|
+
getAdminWorkflowLeaderboardRequestOpts(requestParameters: GetAdminWorkflowLeaderboardRequest): Promise<runtime.RequestOpts>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Top workflows and top run owners by run count.
|
|
127
|
+
* @summary Get Admin Workflow Leaderboard Handler
|
|
128
|
+
* @param {Date} [since] Window start.
|
|
129
|
+
* @param {Date} [until] Window end.
|
|
130
|
+
* @param {number} [limit] Top-N per leaderboard.
|
|
131
|
+
* @param {*} [options] Override http request option.
|
|
132
|
+
* @throws {RequiredError}
|
|
133
|
+
* @memberof AdminWorkflowsApiInterface
|
|
134
|
+
*/
|
|
135
|
+
getAdminWorkflowLeaderboardRaw(requestParameters: GetAdminWorkflowLeaderboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowLeaderboardResponse>>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Top workflows and top run owners by run count.
|
|
139
|
+
* Get Admin Workflow Leaderboard Handler
|
|
140
|
+
*/
|
|
141
|
+
getAdminWorkflowLeaderboard(requestParameters: GetAdminWorkflowLeaderboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowLeaderboardResponse>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Creates request options for getAdminWorkflowOutputStats without sending the request
|
|
145
|
+
* @param {Date} [since] Window start.
|
|
146
|
+
* @param {Date} [until] Window end.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
* @memberof AdminWorkflowsApiInterface
|
|
149
|
+
*/
|
|
150
|
+
getAdminWorkflowOutputStatsRequestOpts(requestParameters: GetAdminWorkflowOutputStatsRequest): Promise<runtime.RequestOpts>;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Average output DOCUMENTs generated per workflow definition (completed runs).
|
|
154
|
+
* @summary Get Admin Workflow Output Stats Handler
|
|
155
|
+
* @param {Date} [since] Window start.
|
|
156
|
+
* @param {Date} [until] Window end.
|
|
157
|
+
* @param {*} [options] Override http request option.
|
|
158
|
+
* @throws {RequiredError}
|
|
159
|
+
* @memberof AdminWorkflowsApiInterface
|
|
160
|
+
*/
|
|
161
|
+
getAdminWorkflowOutputStatsRaw(requestParameters: GetAdminWorkflowOutputStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowOutputStatsResponse>>;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Average output DOCUMENTs generated per workflow definition (completed runs).
|
|
165
|
+
* Get Admin Workflow Output Stats Handler
|
|
166
|
+
*/
|
|
167
|
+
getAdminWorkflowOutputStats(requestParameters: GetAdminWorkflowOutputStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowOutputStatsResponse>;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Creates request options for getAdminWorkflowSummary without sending the request
|
|
171
|
+
* @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
|
|
172
|
+
* @param {Date} [until] Window end (inclusive).
|
|
173
|
+
* @param {string} [definitionId] Scope all numbers to one workflow.
|
|
174
|
+
* @throws {RequiredError}
|
|
175
|
+
* @memberof AdminWorkflowsApiInterface
|
|
176
|
+
*/
|
|
177
|
+
getAdminWorkflowSummaryRequestOpts(requestParameters: GetAdminWorkflowSummaryRequest): Promise<runtime.RequestOpts>;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Tenant-wide run health: counts, failure rate, durations, approval backlog.
|
|
181
|
+
* @summary Get Admin Workflow Summary Handler
|
|
182
|
+
* @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
|
|
183
|
+
* @param {Date} [until] Window end (inclusive).
|
|
184
|
+
* @param {string} [definitionId] Scope all numbers to one workflow.
|
|
185
|
+
* @param {*} [options] Override http request option.
|
|
186
|
+
* @throws {RequiredError}
|
|
187
|
+
* @memberof AdminWorkflowsApiInterface
|
|
188
|
+
*/
|
|
189
|
+
getAdminWorkflowSummaryRaw(requestParameters: GetAdminWorkflowSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunSummaryResponse>>;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Tenant-wide run health: counts, failure rate, durations, approval backlog.
|
|
193
|
+
* Get Admin Workflow Summary Handler
|
|
194
|
+
*/
|
|
195
|
+
getAdminWorkflowSummary(requestParameters: GetAdminWorkflowSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunSummaryResponse>;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Creates request options for getAdminWorkflowTimeseries without sending the request
|
|
199
|
+
* @param {Date} [since] Window start.
|
|
200
|
+
* @param {Date} [until] Window end.
|
|
201
|
+
* @param {TimeBucket} [bucket] Bucket size.
|
|
202
|
+
* @param {string} [timezone] IANA tz override; defaults to tenant setting.
|
|
203
|
+
* @param {string} [definitionId] Scope to one workflow.
|
|
204
|
+
* @throws {RequiredError}
|
|
205
|
+
* @memberof AdminWorkflowsApiInterface
|
|
206
|
+
*/
|
|
207
|
+
getAdminWorkflowTimeseriesRequestOpts(requestParameters: GetAdminWorkflowTimeseriesRequest): Promise<runtime.RequestOpts>;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Run counts bucketed over time, in the resolved timezone.
|
|
211
|
+
* @summary Get Admin Workflow Timeseries Handler
|
|
212
|
+
* @param {Date} [since] Window start.
|
|
213
|
+
* @param {Date} [until] Window end.
|
|
214
|
+
* @param {TimeBucket} [bucket] Bucket size.
|
|
215
|
+
* @param {string} [timezone] IANA tz override; defaults to tenant setting.
|
|
216
|
+
* @param {string} [definitionId] Scope to one workflow.
|
|
217
|
+
* @param {*} [options] Override http request option.
|
|
218
|
+
* @throws {RequiredError}
|
|
219
|
+
* @memberof AdminWorkflowsApiInterface
|
|
220
|
+
*/
|
|
221
|
+
getAdminWorkflowTimeseriesRaw(requestParameters: GetAdminWorkflowTimeseriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RunTimeseriesResponse>>;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Run counts bucketed over time, in the resolved timezone.
|
|
225
|
+
* Get Admin Workflow Timeseries Handler
|
|
226
|
+
*/
|
|
227
|
+
getAdminWorkflowTimeseries(requestParameters: GetAdminWorkflowTimeseriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RunTimeseriesResponse>;
|
|
228
|
+
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
*
|
|
233
|
+
*/
|
|
234
|
+
export class AdminWorkflowsApi extends runtime.BaseAPI implements AdminWorkflowsApiInterface {
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Creates request options for getAdminWorkflowByHour without sending the request
|
|
238
|
+
*/
|
|
239
|
+
async getAdminWorkflowByHourRequestOpts(requestParameters: GetAdminWorkflowByHourRequest): Promise<runtime.RequestOpts> {
|
|
240
|
+
const queryParameters: any = {};
|
|
241
|
+
|
|
242
|
+
if (requestParameters['since'] != null) {
|
|
243
|
+
queryParameters['since'] = (requestParameters['since'] as any).toISOString();
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (requestParameters['until'] != null) {
|
|
247
|
+
queryParameters['until'] = (requestParameters['until'] as any).toISOString();
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (requestParameters['timezone'] != null) {
|
|
251
|
+
queryParameters['timezone'] = requestParameters['timezone'];
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (requestParameters['definitionId'] != null) {
|
|
255
|
+
queryParameters['definition_id'] = requestParameters['definitionId'];
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
259
|
+
|
|
260
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
261
|
+
const token = this.configuration.accessToken;
|
|
262
|
+
const tokenString = await token("bearerAuth", []);
|
|
263
|
+
|
|
264
|
+
if (tokenString) {
|
|
265
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
let urlPath = `/v1/admin/workflows/by-hour`;
|
|
270
|
+
|
|
271
|
+
return {
|
|
272
|
+
path: urlPath,
|
|
273
|
+
method: 'GET',
|
|
274
|
+
headers: headerParameters,
|
|
275
|
+
query: queryParameters,
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Runs per hour-of-day (0-23) in the resolved timezone.
|
|
281
|
+
* Get Admin Workflow By Hour Handler
|
|
282
|
+
*/
|
|
283
|
+
async getAdminWorkflowByHourRaw(requestParameters: GetAdminWorkflowByHourRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HourHistogramResponse>> {
|
|
284
|
+
const requestOptions = await this.getAdminWorkflowByHourRequestOpts(requestParameters);
|
|
285
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
286
|
+
|
|
287
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => HourHistogramResponseFromJSON(jsonValue));
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Runs per hour-of-day (0-23) in the resolved timezone.
|
|
292
|
+
* Get Admin Workflow By Hour Handler
|
|
293
|
+
*/
|
|
294
|
+
async getAdminWorkflowByHour(requestParameters: GetAdminWorkflowByHourRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HourHistogramResponse> {
|
|
295
|
+
const response = await this.getAdminWorkflowByHourRaw(requestParameters, initOverrides);
|
|
296
|
+
return await response.value();
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Creates request options for getAdminWorkflowLeaderboard without sending the request
|
|
301
|
+
*/
|
|
302
|
+
async getAdminWorkflowLeaderboardRequestOpts(requestParameters: GetAdminWorkflowLeaderboardRequest): Promise<runtime.RequestOpts> {
|
|
303
|
+
const queryParameters: any = {};
|
|
304
|
+
|
|
305
|
+
if (requestParameters['since'] != null) {
|
|
306
|
+
queryParameters['since'] = (requestParameters['since'] as any).toISOString();
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (requestParameters['until'] != null) {
|
|
310
|
+
queryParameters['until'] = (requestParameters['until'] as any).toISOString();
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
if (requestParameters['limit'] != null) {
|
|
314
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
318
|
+
|
|
319
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
320
|
+
const token = this.configuration.accessToken;
|
|
321
|
+
const tokenString = await token("bearerAuth", []);
|
|
322
|
+
|
|
323
|
+
if (tokenString) {
|
|
324
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
let urlPath = `/v1/admin/workflows/leaderboard`;
|
|
329
|
+
|
|
330
|
+
return {
|
|
331
|
+
path: urlPath,
|
|
332
|
+
method: 'GET',
|
|
333
|
+
headers: headerParameters,
|
|
334
|
+
query: queryParameters,
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Top workflows and top run owners by run count.
|
|
340
|
+
* Get Admin Workflow Leaderboard Handler
|
|
341
|
+
*/
|
|
342
|
+
async getAdminWorkflowLeaderboardRaw(requestParameters: GetAdminWorkflowLeaderboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowLeaderboardResponse>> {
|
|
343
|
+
const requestOptions = await this.getAdminWorkflowLeaderboardRequestOpts(requestParameters);
|
|
344
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
345
|
+
|
|
346
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowLeaderboardResponseFromJSON(jsonValue));
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Top workflows and top run owners by run count.
|
|
351
|
+
* Get Admin Workflow Leaderboard Handler
|
|
352
|
+
*/
|
|
353
|
+
async getAdminWorkflowLeaderboard(requestParameters: GetAdminWorkflowLeaderboardRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowLeaderboardResponse> {
|
|
354
|
+
const response = await this.getAdminWorkflowLeaderboardRaw(requestParameters, initOverrides);
|
|
355
|
+
return await response.value();
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Creates request options for getAdminWorkflowOutputStats without sending the request
|
|
360
|
+
*/
|
|
361
|
+
async getAdminWorkflowOutputStatsRequestOpts(requestParameters: GetAdminWorkflowOutputStatsRequest): Promise<runtime.RequestOpts> {
|
|
362
|
+
const queryParameters: any = {};
|
|
363
|
+
|
|
364
|
+
if (requestParameters['since'] != null) {
|
|
365
|
+
queryParameters['since'] = (requestParameters['since'] as any).toISOString();
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
if (requestParameters['until'] != null) {
|
|
369
|
+
queryParameters['until'] = (requestParameters['until'] as any).toISOString();
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
373
|
+
|
|
374
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
375
|
+
const token = this.configuration.accessToken;
|
|
376
|
+
const tokenString = await token("bearerAuth", []);
|
|
377
|
+
|
|
378
|
+
if (tokenString) {
|
|
379
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
let urlPath = `/v1/admin/workflows/output-stats`;
|
|
384
|
+
|
|
385
|
+
return {
|
|
386
|
+
path: urlPath,
|
|
387
|
+
method: 'GET',
|
|
388
|
+
headers: headerParameters,
|
|
389
|
+
query: queryParameters,
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Average output DOCUMENTs generated per workflow definition (completed runs).
|
|
395
|
+
* Get Admin Workflow Output Stats Handler
|
|
396
|
+
*/
|
|
397
|
+
async getAdminWorkflowOutputStatsRaw(requestParameters: GetAdminWorkflowOutputStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowOutputStatsResponse>> {
|
|
398
|
+
const requestOptions = await this.getAdminWorkflowOutputStatsRequestOpts(requestParameters);
|
|
399
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
400
|
+
|
|
401
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowOutputStatsResponseFromJSON(jsonValue));
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Average output DOCUMENTs generated per workflow definition (completed runs).
|
|
406
|
+
* Get Admin Workflow Output Stats Handler
|
|
407
|
+
*/
|
|
408
|
+
async getAdminWorkflowOutputStats(requestParameters: GetAdminWorkflowOutputStatsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowOutputStatsResponse> {
|
|
409
|
+
const response = await this.getAdminWorkflowOutputStatsRaw(requestParameters, initOverrides);
|
|
410
|
+
return await response.value();
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Creates request options for getAdminWorkflowSummary without sending the request
|
|
415
|
+
*/
|
|
416
|
+
async getAdminWorkflowSummaryRequestOpts(requestParameters: GetAdminWorkflowSummaryRequest): Promise<runtime.RequestOpts> {
|
|
417
|
+
const queryParameters: any = {};
|
|
418
|
+
|
|
419
|
+
if (requestParameters['since'] != null) {
|
|
420
|
+
queryParameters['since'] = (requestParameters['since'] as any).toISOString();
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
if (requestParameters['until'] != null) {
|
|
424
|
+
queryParameters['until'] = (requestParameters['until'] as any).toISOString();
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
if (requestParameters['definitionId'] != null) {
|
|
428
|
+
queryParameters['definition_id'] = requestParameters['definitionId'];
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
432
|
+
|
|
433
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
434
|
+
const token = this.configuration.accessToken;
|
|
435
|
+
const tokenString = await token("bearerAuth", []);
|
|
436
|
+
|
|
437
|
+
if (tokenString) {
|
|
438
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
let urlPath = `/v1/admin/workflows/summary`;
|
|
443
|
+
|
|
444
|
+
return {
|
|
445
|
+
path: urlPath,
|
|
446
|
+
method: 'GET',
|
|
447
|
+
headers: headerParameters,
|
|
448
|
+
query: queryParameters,
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Tenant-wide run health: counts, failure rate, durations, approval backlog.
|
|
454
|
+
* Get Admin Workflow Summary Handler
|
|
455
|
+
*/
|
|
456
|
+
async getAdminWorkflowSummaryRaw(requestParameters: GetAdminWorkflowSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunSummaryResponse>> {
|
|
457
|
+
const requestOptions = await this.getAdminWorkflowSummaryRequestOpts(requestParameters);
|
|
458
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
459
|
+
|
|
460
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowRunSummaryResponseFromJSON(jsonValue));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Tenant-wide run health: counts, failure rate, durations, approval backlog.
|
|
465
|
+
* Get Admin Workflow Summary Handler
|
|
466
|
+
*/
|
|
467
|
+
async getAdminWorkflowSummary(requestParameters: GetAdminWorkflowSummaryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunSummaryResponse> {
|
|
468
|
+
const response = await this.getAdminWorkflowSummaryRaw(requestParameters, initOverrides);
|
|
469
|
+
return await response.value();
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Creates request options for getAdminWorkflowTimeseries without sending the request
|
|
474
|
+
*/
|
|
475
|
+
async getAdminWorkflowTimeseriesRequestOpts(requestParameters: GetAdminWorkflowTimeseriesRequest): Promise<runtime.RequestOpts> {
|
|
476
|
+
const queryParameters: any = {};
|
|
477
|
+
|
|
478
|
+
if (requestParameters['since'] != null) {
|
|
479
|
+
queryParameters['since'] = (requestParameters['since'] as any).toISOString();
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
if (requestParameters['until'] != null) {
|
|
483
|
+
queryParameters['until'] = (requestParameters['until'] as any).toISOString();
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
if (requestParameters['bucket'] != null) {
|
|
487
|
+
queryParameters['bucket'] = requestParameters['bucket'];
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
if (requestParameters['timezone'] != null) {
|
|
491
|
+
queryParameters['timezone'] = requestParameters['timezone'];
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
if (requestParameters['definitionId'] != null) {
|
|
495
|
+
queryParameters['definition_id'] = requestParameters['definitionId'];
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
499
|
+
|
|
500
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
501
|
+
const token = this.configuration.accessToken;
|
|
502
|
+
const tokenString = await token("bearerAuth", []);
|
|
503
|
+
|
|
504
|
+
if (tokenString) {
|
|
505
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
let urlPath = `/v1/admin/workflows/timeseries`;
|
|
510
|
+
|
|
511
|
+
return {
|
|
512
|
+
path: urlPath,
|
|
513
|
+
method: 'GET',
|
|
514
|
+
headers: headerParameters,
|
|
515
|
+
query: queryParameters,
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Run counts bucketed over time, in the resolved timezone.
|
|
521
|
+
* Get Admin Workflow Timeseries Handler
|
|
522
|
+
*/
|
|
523
|
+
async getAdminWorkflowTimeseriesRaw(requestParameters: GetAdminWorkflowTimeseriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RunTimeseriesResponse>> {
|
|
524
|
+
const requestOptions = await this.getAdminWorkflowTimeseriesRequestOpts(requestParameters);
|
|
525
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
526
|
+
|
|
527
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RunTimeseriesResponseFromJSON(jsonValue));
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Run counts bucketed over time, in the resolved timezone.
|
|
532
|
+
* Get Admin Workflow Timeseries Handler
|
|
533
|
+
*/
|
|
534
|
+
async getAdminWorkflowTimeseries(requestParameters: GetAdminWorkflowTimeseriesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RunTimeseriesResponse> {
|
|
535
|
+
const response = await this.getAdminWorkflowTimeseriesRaw(requestParameters, initOverrides);
|
|
536
|
+
return await response.value();
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
}
|
package/src/apis/SkillsApi.ts
CHANGED
|
@@ -306,7 +306,7 @@ export interface SkillsApiInterface {
|
|
|
306
306
|
getSkillRequestOpts(requestParameters: GetSkillRequest): Promise<runtime.RequestOpts>;
|
|
307
307
|
|
|
308
308
|
/**
|
|
309
|
-
* Skill detail: SKILL.md,
|
|
309
|
+
* Skill detail: SKILL.md, script contents, has_unpublished_changes, perms.
|
|
310
310
|
* @summary Get Skill Handler
|
|
311
311
|
* @param {string} skillId
|
|
312
312
|
* @param {*} [options] Override http request option.
|
|
@@ -316,7 +316,7 @@ export interface SkillsApiInterface {
|
|
|
316
316
|
getSkillRaw(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SkillResponse>>;
|
|
317
317
|
|
|
318
318
|
/**
|
|
319
|
-
* Skill detail: SKILL.md,
|
|
319
|
+
* Skill detail: SKILL.md, script contents, has_unpublished_changes, perms.
|
|
320
320
|
* Get Skill Handler
|
|
321
321
|
*/
|
|
322
322
|
getSkill(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillResponse>;
|
|
@@ -925,7 +925,7 @@ export class SkillsApi extends runtime.BaseAPI implements SkillsApiInterface {
|
|
|
925
925
|
}
|
|
926
926
|
|
|
927
927
|
/**
|
|
928
|
-
* Skill detail: SKILL.md,
|
|
928
|
+
* Skill detail: SKILL.md, script contents, has_unpublished_changes, perms.
|
|
929
929
|
* Get Skill Handler
|
|
930
930
|
*/
|
|
931
931
|
async getSkillRaw(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SkillResponse>> {
|
|
@@ -936,7 +936,7 @@ export class SkillsApi extends runtime.BaseAPI implements SkillsApiInterface {
|
|
|
936
936
|
}
|
|
937
937
|
|
|
938
938
|
/**
|
|
939
|
-
* Skill detail: SKILL.md,
|
|
939
|
+
* Skill detail: SKILL.md, script contents, has_unpublished_changes, perms.
|
|
940
940
|
* Get Skill Handler
|
|
941
941
|
*/
|
|
942
942
|
async getSkill(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillResponse> {
|