@knowledge-stack/ksapi 1.139.1 → 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.
Files changed (97) hide show
  1. package/.openapi-generator/FILES +28 -0
  2. package/README.md +25 -11
  3. package/dist/apis/AdminKbApi.d.ts +109 -0
  4. package/dist/apis/AdminKbApi.js +172 -0
  5. package/dist/apis/AdminWorkflowsApi.d.ts +252 -0
  6. package/dist/apis/AdminWorkflowsApi.js +337 -0
  7. package/dist/apis/index.d.ts +2 -0
  8. package/dist/apis/index.js +2 -0
  9. package/dist/esm/apis/AdminKbApi.d.ts +109 -0
  10. package/dist/esm/apis/AdminKbApi.js +135 -0
  11. package/dist/esm/apis/AdminWorkflowsApi.d.ts +252 -0
  12. package/dist/esm/apis/AdminWorkflowsApi.js +300 -0
  13. package/dist/esm/apis/index.d.ts +2 -0
  14. package/dist/esm/apis/index.js +2 -0
  15. package/dist/esm/models/DefinitionOutputStat.d.ts +65 -0
  16. package/dist/esm/models/DefinitionOutputStat.js +56 -0
  17. package/dist/esm/models/HourHistogramResponse.d.ts +53 -0
  18. package/dist/esm/models/HourHistogramResponse.js +54 -0
  19. package/dist/esm/models/KbMetric.d.ts +26 -0
  20. package/dist/esm/models/KbMetric.js +44 -0
  21. package/dist/esm/models/KbSummaryResponse.d.ts +152 -0
  22. package/dist/esm/models/KbSummaryResponse.js +109 -0
  23. package/dist/esm/models/KbTimeseriesResponse.d.ts +71 -0
  24. package/dist/esm/models/KbTimeseriesResponse.js +57 -0
  25. package/dist/esm/models/LabeledSeries.d.ts +54 -0
  26. package/dist/esm/models/LabeledSeries.js +47 -0
  27. package/dist/esm/models/LeaderboardEntry.d.ts +59 -0
  28. package/dist/esm/models/LeaderboardEntry.js +52 -0
  29. package/dist/esm/models/RunTimeseriesResponse.d.ts +61 -0
  30. package/dist/esm/models/RunTimeseriesResponse.js +52 -0
  31. package/dist/esm/models/TimeBucket.d.ts +27 -0
  32. package/dist/esm/models/TimeBucket.js +45 -0
  33. package/dist/esm/models/TimeseriesPoint.d.ts +53 -0
  34. package/dist/esm/models/TimeseriesPoint.js +48 -0
  35. package/dist/esm/models/WorkflowLeaderboardResponse.d.ts +54 -0
  36. package/dist/esm/models/WorkflowLeaderboardResponse.js +45 -0
  37. package/dist/esm/models/WorkflowOutputStatsResponse.d.ts +54 -0
  38. package/dist/esm/models/WorkflowOutputStatsResponse.js +47 -0
  39. package/dist/esm/models/index.d.ts +12 -0
  40. package/dist/esm/models/index.js +12 -0
  41. package/dist/models/DefinitionOutputStat.d.ts +65 -0
  42. package/dist/models/DefinitionOutputStat.js +64 -0
  43. package/dist/models/HourHistogramResponse.d.ts +53 -0
  44. package/dist/models/HourHistogramResponse.js +62 -0
  45. package/dist/models/KbMetric.d.ts +26 -0
  46. package/dist/models/KbMetric.js +52 -0
  47. package/dist/models/KbSummaryResponse.d.ts +152 -0
  48. package/dist/models/KbSummaryResponse.js +117 -0
  49. package/dist/models/KbTimeseriesResponse.d.ts +71 -0
  50. package/dist/models/KbTimeseriesResponse.js +65 -0
  51. package/dist/models/LabeledSeries.d.ts +54 -0
  52. package/dist/models/LabeledSeries.js +55 -0
  53. package/dist/models/LeaderboardEntry.d.ts +59 -0
  54. package/dist/models/LeaderboardEntry.js +60 -0
  55. package/dist/models/RunTimeseriesResponse.d.ts +61 -0
  56. package/dist/models/RunTimeseriesResponse.js +60 -0
  57. package/dist/models/TimeBucket.d.ts +27 -0
  58. package/dist/models/TimeBucket.js +53 -0
  59. package/dist/models/TimeseriesPoint.d.ts +53 -0
  60. package/dist/models/TimeseriesPoint.js +56 -0
  61. package/dist/models/WorkflowLeaderboardResponse.d.ts +54 -0
  62. package/dist/models/WorkflowLeaderboardResponse.js +53 -0
  63. package/dist/models/WorkflowOutputStatsResponse.d.ts +54 -0
  64. package/dist/models/WorkflowOutputStatsResponse.js +55 -0
  65. package/dist/models/index.d.ts +12 -0
  66. package/dist/models/index.js +12 -0
  67. package/docs/AdminKbApi.md +163 -0
  68. package/docs/AdminWorkflowsApi.md +424 -0
  69. package/docs/DefinitionOutputStat.md +41 -0
  70. package/docs/HourHistogramResponse.md +37 -0
  71. package/docs/KbMetric.md +33 -0
  72. package/docs/KbSummaryResponse.md +67 -0
  73. package/docs/KbTimeseriesResponse.md +41 -0
  74. package/docs/LabeledSeries.md +37 -0
  75. package/docs/LeaderboardEntry.md +39 -0
  76. package/docs/RunTimeseriesResponse.md +39 -0
  77. package/docs/TimeBucket.md +33 -0
  78. package/docs/TimeseriesPoint.md +37 -0
  79. package/docs/WorkflowLeaderboardResponse.md +37 -0
  80. package/docs/WorkflowOutputStatsResponse.md +37 -0
  81. package/package.json +1 -1
  82. package/src/apis/AdminKbApi.ts +237 -0
  83. package/src/apis/AdminWorkflowsApi.ts +539 -0
  84. package/src/apis/index.ts +2 -0
  85. package/src/models/DefinitionOutputStat.ts +110 -0
  86. package/src/models/HourHistogramResponse.ts +97 -0
  87. package/src/models/KbMetric.ts +54 -0
  88. package/src/models/KbSummaryResponse.ts +235 -0
  89. package/src/models/KbTimeseriesResponse.ts +136 -0
  90. package/src/models/LabeledSeries.ts +99 -0
  91. package/src/models/LeaderboardEntry.ts +101 -0
  92. package/src/models/RunTimeseriesResponse.ts +117 -0
  93. package/src/models/TimeBucket.ts +55 -0
  94. package/src/models/TimeseriesPoint.ts +92 -0
  95. package/src/models/WorkflowLeaderboardResponse.ts +98 -0
  96. package/src/models/WorkflowOutputStatsResponse.ts +99 -0
  97. package/src/models/index.ts +12 -0
@@ -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
+
@@ -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
+
@@ -0,0 +1,33 @@
1
+
2
+ # KbMetric
3
+
4
+ A knowledge-base time series the dashboard can request.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { KbMetric } from '@knowledge-stack/ksapi'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ } satisfies KbMetric
19
+
20
+ console.log(example)
21
+
22
+ // Convert the instance to a JSON string
23
+ const exampleJSON: string = JSON.stringify(example)
24
+ console.log(exampleJSON)
25
+
26
+ // Parse the JSON string back to an object
27
+ const exampleParsed = JSON.parse(exampleJSON) as KbMetric
28
+ console.log(exampleParsed)
29
+ ```
30
+
31
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
32
+
33
+
@@ -0,0 +1,67 @@
1
+
2
+ # KbSummaryResponse
3
+
4
+ Point-in-time knowledge-base totals for a tenant.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `documentsTotal` | number
11
+ `documentsByOrigin` | { [key: string]: number; }
12
+ `documentsByType` | { [key: string]: number; }
13
+ `documentVersionsTotal` | number
14
+ `chunksTotal` | number
15
+ `chunksByType` | { [key: string]: number; }
16
+ `tokensTotal` | number
17
+ `sectionsTotal` | number
18
+ `threadsTotal` | number
19
+ `messagesTotal` | number
20
+ `messagesByRole` | { [key: string]: number; }
21
+ `dataSourcesTotal` | number
22
+ `dataSourceTablesTotal` | number
23
+ `documentsCheckedOut` | number
24
+ `quota` | [Array<MeteredQuotaStatus>](MeteredQuotaStatus.md)
25
+ `feedbackUp` | number
26
+ `feedbackDown` | number
27
+
28
+ ## Example
29
+
30
+ ```typescript
31
+ import type { KbSummaryResponse } from '@knowledge-stack/ksapi'
32
+
33
+ // TODO: Update the object below with actual values
34
+ const example = {
35
+ "documentsTotal": null,
36
+ "documentsByOrigin": null,
37
+ "documentsByType": null,
38
+ "documentVersionsTotal": null,
39
+ "chunksTotal": null,
40
+ "chunksByType": null,
41
+ "tokensTotal": null,
42
+ "sectionsTotal": null,
43
+ "threadsTotal": null,
44
+ "messagesTotal": null,
45
+ "messagesByRole": null,
46
+ "dataSourcesTotal": null,
47
+ "dataSourceTablesTotal": null,
48
+ "documentsCheckedOut": null,
49
+ "quota": null,
50
+ "feedbackUp": null,
51
+ "feedbackDown": null,
52
+ } satisfies KbSummaryResponse
53
+
54
+ console.log(example)
55
+
56
+ // Convert the instance to a JSON string
57
+ const exampleJSON: string = JSON.stringify(example)
58
+ console.log(exampleJSON)
59
+
60
+ // Parse the JSON string back to an object
61
+ const exampleParsed = JSON.parse(exampleJSON) as KbSummaryResponse
62
+ console.log(exampleParsed)
63
+ ```
64
+
65
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
66
+
67
+
@@ -0,0 +1,41 @@
1
+
2
+ # KbTimeseriesResponse
3
+
4
+ A knowledge-base metric bucketed over time. ``series`` carries one entry per split — two (SOURCE / GENERATED) for ``document_uploads``, one for the ingestion metrics.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `metric` | [KbMetric](KbMetric.md)
11
+ `timezone` | string
12
+ `bucket` | [TimeBucket](TimeBucket.md)
13
+ `series` | [Array<LabeledSeries>](LabeledSeries.md)
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import type { KbTimeseriesResponse } from '@knowledge-stack/ksapi'
19
+
20
+ // TODO: Update the object below with actual values
21
+ const example = {
22
+ "metric": null,
23
+ "timezone": null,
24
+ "bucket": null,
25
+ "series": null,
26
+ } satisfies KbTimeseriesResponse
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 KbTimeseriesResponse
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
+
@@ -0,0 +1,37 @@
1
+
2
+ # LabeledSeries
3
+
4
+ A named series (e.g. one per document origin or ingestion outcome).
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `label` | string
11
+ `points` | [Array<TimeseriesPoint>](TimeseriesPoint.md)
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { LabeledSeries } from '@knowledge-stack/ksapi'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "label": null,
21
+ "points": null,
22
+ } satisfies LabeledSeries
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 LabeledSeries
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
+