@knowledge-stack/ksapi 2.14.4 → 2.15.1

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.
@@ -77,7 +77,7 @@ This endpoint does not need any parameter.
77
77
 
78
78
  ## getAdminKbTimeseries
79
79
 
80
- > KbTimeseriesResponse getAdminKbTimeseries(metric, since, until, bucket, timezone)
80
+ > KbTimeseriesResponse getAdminKbTimeseries(metric, timezone, since, until, bucket)
81
81
 
82
82
  Get Admin Kb Timeseries Handler
83
83
 
@@ -105,14 +105,14 @@ async function example() {
105
105
  const body = {
106
106
  // KbMetric | Which KB metric to bucket.
107
107
  metric: ...,
108
- // Date | Window start. (optional)
108
+ // string | IANA tz override; defaults to tenant setting. (optional)
109
+ timezone: timezone_example,
110
+ // Date | Window start (inclusive). Defaults to 7 days ago. (optional)
109
111
  since: 2013-10-20T19:20:30+01:00,
110
- // Date | Window end. (optional)
112
+ // Date | Window end (inclusive). (optional)
111
113
  until: 2013-10-20T19:20:30+01:00,
112
114
  // TimeBucket | Bucket size. (optional)
113
115
  bucket: ...,
114
- // string | IANA tz override; defaults to tenant setting. (optional)
115
- timezone: timezone_example,
116
116
  } satisfies GetAdminKbTimeseriesRequest;
117
117
 
118
118
  try {
@@ -133,10 +133,10 @@ example().catch(console.error);
133
133
  | Name | Type | Description | Notes |
134
134
  |------------- | ------------- | ------------- | -------------|
135
135
  | **metric** | `KbMetric` | Which KB metric to bucket. | [Defaults to `undefined`] [Enum: document_uploads, ingestion_completed, ingestion_failed, message, search] |
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
136
  | **timezone** | `string` | IANA tz override; defaults to tenant setting. | [Optional] [Defaults to `undefined`] |
137
+ | **since** | `Date` | Window start (inclusive). Defaults to 7 days ago. | [Optional] [Defaults to `undefined`] |
138
+ | **until** | `Date` | Window end (inclusive). | [Optional] [Defaults to `undefined`] |
139
+ | **bucket** | `TimeBucket` | Bucket size. | [Optional] [Defaults to `undefined`] [Enum: hour, day, week, month] |
140
140
 
141
141
  ### Return type
142
142
 
@@ -14,7 +14,7 @@ All URIs are relative to *http://localhost:8000*
14
14
 
15
15
  ## getAdminWorkflowByHour
16
16
 
17
- > HourHistogramResponse getAdminWorkflowByHour(since, until, timezone, definitionId)
17
+ > HourHistogramResponse getAdminWorkflowByHour(timezone, definitionId, since, until)
18
18
 
19
19
  Get Admin Workflow By Hour Handler
20
20
 
@@ -40,14 +40,14 @@ async function example() {
40
40
  const api = new AdminWorkflowsApi(config);
41
41
 
42
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
43
  // string | IANA tz override; defaults to tenant setting. (optional)
48
44
  timezone: timezone_example,
49
45
  // string | Scope to one workflow. (optional)
50
46
  definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
47
+ // Date | Window start (inclusive). Defaults to 7 days ago. (optional)
48
+ since: 2013-10-20T19:20:30+01:00,
49
+ // Date | Window end (inclusive). (optional)
50
+ until: 2013-10-20T19:20:30+01:00,
51
51
  } satisfies GetAdminWorkflowByHourRequest;
52
52
 
53
53
  try {
@@ -67,10 +67,10 @@ example().catch(console.error);
67
67
 
68
68
  | Name | Type | Description | Notes |
69
69
  |------------- | ------------- | ------------- | -------------|
70
- | **since** | `Date` | Window start. | [Optional] [Defaults to `undefined`] |
71
- | **until** | `Date` | Window end. | [Optional] [Defaults to `undefined`] |
72
70
  | **timezone** | `string` | IANA tz override; defaults to tenant setting. | [Optional] [Defaults to `undefined`] |
73
71
  | **definitionId** | `string` | Scope to one workflow. | [Optional] [Defaults to `undefined`] |
72
+ | **since** | `Date` | Window start (inclusive). Defaults to 7 days ago. | [Optional] [Defaults to `undefined`] |
73
+ | **until** | `Date` | Window end (inclusive). | [Optional] [Defaults to `undefined`] |
74
74
 
75
75
  ### Return type
76
76
 
@@ -98,7 +98,7 @@ example().catch(console.error);
98
98
 
99
99
  ## getAdminWorkflowLeaderboard
100
100
 
101
- > WorkflowLeaderboardResponse getAdminWorkflowLeaderboard(since, until, limit)
101
+ > WorkflowLeaderboardResponse getAdminWorkflowLeaderboard(limit, since, until)
102
102
 
103
103
  Get Admin Workflow Leaderboard Handler
104
104
 
@@ -124,12 +124,12 @@ async function example() {
124
124
  const api = new AdminWorkflowsApi(config);
125
125
 
126
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
127
  // number | Top-N per leaderboard. (optional)
132
128
  limit: 56,
129
+ // Date | Window start (inclusive). Defaults to 7 days ago. (optional)
130
+ since: 2013-10-20T19:20:30+01:00,
131
+ // Date | Window end (inclusive). (optional)
132
+ until: 2013-10-20T19:20:30+01:00,
133
133
  } satisfies GetAdminWorkflowLeaderboardRequest;
134
134
 
135
135
  try {
@@ -149,9 +149,9 @@ example().catch(console.error);
149
149
 
150
150
  | Name | Type | Description | Notes |
151
151
  |------------- | ------------- | ------------- | -------------|
152
- | **since** | `Date` | Window start. | [Optional] [Defaults to `undefined`] |
153
- | **until** | `Date` | Window end. | [Optional] [Defaults to `undefined`] |
154
152
  | **limit** | `number` | Top-N per leaderboard. | [Optional] [Defaults to `10`] |
153
+ | **since** | `Date` | Window start (inclusive). Defaults to 7 days ago. | [Optional] [Defaults to `undefined`] |
154
+ | **until** | `Date` | Window end (inclusive). | [Optional] [Defaults to `undefined`] |
155
155
 
156
156
  ### Return type
157
157
 
@@ -205,9 +205,9 @@ async function example() {
205
205
  const api = new AdminWorkflowsApi(config);
206
206
 
207
207
  const body = {
208
- // Date | Window start. (optional)
208
+ // Date | Window start (inclusive). Defaults to 7 days ago. (optional)
209
209
  since: 2013-10-20T19:20:30+01:00,
210
- // Date | Window end. (optional)
210
+ // Date | Window end (inclusive). (optional)
211
211
  until: 2013-10-20T19:20:30+01:00,
212
212
  } satisfies GetAdminWorkflowOutputStatsRequest;
213
213
 
@@ -228,8 +228,8 @@ example().catch(console.error);
228
228
 
229
229
  | Name | Type | Description | Notes |
230
230
  |------------- | ------------- | ------------- | -------------|
231
- | **since** | `Date` | Window start. | [Optional] [Defaults to `undefined`] |
232
- | **until** | `Date` | Window end. | [Optional] [Defaults to `undefined`] |
231
+ | **since** | `Date` | Window start (inclusive). Defaults to 7 days ago. | [Optional] [Defaults to `undefined`] |
232
+ | **until** | `Date` | Window end (inclusive). | [Optional] [Defaults to `undefined`] |
233
233
 
234
234
  ### Return type
235
235
 
@@ -257,7 +257,7 @@ example().catch(console.error);
257
257
 
258
258
  ## getAdminWorkflowSummary
259
259
 
260
- > WorkflowRunSummaryResponse getAdminWorkflowSummary(since, until, definitionId)
260
+ > WorkflowRunSummaryResponse getAdminWorkflowSummary(definitionId, since, until)
261
261
 
262
262
  Get Admin Workflow Summary Handler
263
263
 
@@ -283,12 +283,12 @@ async function example() {
283
283
  const api = new AdminWorkflowsApi(config);
284
284
 
285
285
  const body = {
286
+ // string | Scope all numbers to one workflow. (optional)
287
+ definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
286
288
  // Date | Window start (inclusive). Defaults to 7 days ago. (optional)
287
289
  since: 2013-10-20T19:20:30+01:00,
288
290
  // Date | Window end (inclusive). (optional)
289
291
  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
292
  } satisfies GetAdminWorkflowSummaryRequest;
293
293
 
294
294
  try {
@@ -308,9 +308,9 @@ example().catch(console.error);
308
308
 
309
309
  | Name | Type | Description | Notes |
310
310
  |------------- | ------------- | ------------- | -------------|
311
+ | **definitionId** | `string` | Scope all numbers to one workflow. | [Optional] [Defaults to `undefined`] |
311
312
  | **since** | `Date` | Window start (inclusive). Defaults to 7 days ago. | [Optional] [Defaults to `undefined`] |
312
313
  | **until** | `Date` | Window end (inclusive). | [Optional] [Defaults to `undefined`] |
313
- | **definitionId** | `string` | Scope all numbers to one workflow. | [Optional] [Defaults to `undefined`] |
314
314
 
315
315
  ### Return type
316
316
 
@@ -338,7 +338,7 @@ example().catch(console.error);
338
338
 
339
339
  ## getAdminWorkflowTimeseries
340
340
 
341
- > RunTimeseriesResponse getAdminWorkflowTimeseries(since, until, bucket, timezone, definitionId)
341
+ > RunTimeseriesResponse getAdminWorkflowTimeseries(timezone, definitionId, since, until, bucket)
342
342
 
343
343
  Get Admin Workflow Timeseries Handler
344
344
 
@@ -364,16 +364,16 @@ async function example() {
364
364
  const api = new AdminWorkflowsApi(config);
365
365
 
366
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
367
  // string | IANA tz override; defaults to tenant setting. (optional)
374
368
  timezone: timezone_example,
375
369
  // string | Scope to one workflow. (optional)
376
370
  definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
371
+ // Date | Window start (inclusive). Defaults to 7 days ago. (optional)
372
+ since: 2013-10-20T19:20:30+01:00,
373
+ // Date | Window end (inclusive). (optional)
374
+ until: 2013-10-20T19:20:30+01:00,
375
+ // TimeBucket | Bucket size. (optional)
376
+ bucket: ...,
377
377
  } satisfies GetAdminWorkflowTimeseriesRequest;
378
378
 
379
379
  try {
@@ -393,11 +393,11 @@ example().catch(console.error);
393
393
 
394
394
  | Name | Type | Description | Notes |
395
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
396
  | **timezone** | `string` | IANA tz override; defaults to tenant setting. | [Optional] [Defaults to `undefined`] |
400
397
  | **definitionId** | `string` | Scope to one workflow. | [Optional] [Defaults to `undefined`] |
398
+ | **since** | `Date` | Window start (inclusive). Defaults to 7 days ago. | [Optional] [Defaults to `undefined`] |
399
+ | **until** | `Date` | Window end (inclusive). | [Optional] [Defaults to `undefined`] |
400
+ | **bucket** | `TimeBucket` | Bucket size. | [Optional] [Defaults to `undefined`] [Enum: hour, day, week, month] |
401
401
 
402
402
  ### Return type
403
403
 
@@ -0,0 +1,35 @@
1
+
2
+ # ExportSkillsRequest
3
+
4
+ Skills to pack into one ZIP, each under a top-level folder named after it.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `skillIds` | Array<string>
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { ExportSkillsRequest } from '@knowledge-stack/ksapi'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "skillIds": null,
20
+ } satisfies ExportSkillsRequest
21
+
22
+ console.log(example)
23
+
24
+ // Convert the instance to a JSON string
25
+ const exampleJSON: string = JSON.stringify(example)
26
+ console.log(exampleJSON)
27
+
28
+ // Parse the JSON string back to an object
29
+ const exampleParsed = JSON.parse(exampleJSON) as ExportSkillsRequest
30
+ console.log(exampleParsed)
31
+ ```
32
+
33
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
34
+
35
+
package/docs/SkillsApi.md CHANGED
@@ -11,6 +11,7 @@ All URIs are relative to *http://localhost:8000*
11
11
  | [**deleteSkill**](SkillsApi.md#deleteskill) | **DELETE** /v1/skills/{skill_id} | Delete Skill Handler |
12
12
  | [**discardSkillDraft**](SkillsApi.md#discardskilldraft) | **POST** /v1/skills/{skill_id}/discard-draft | Discard Skill Draft Handler |
13
13
  | [**exportSkill**](SkillsApi.md#exportskill) | **GET** /v1/skills/{skill_id}/export | Export Skill Handler |
14
+ | [**exportSkills**](SkillsApi.md#exportskillsoperation) | **POST** /v1/skills/export | Export Skills Handler |
14
15
  | [**getSkill**](SkillsApi.md#getskill) | **GET** /v1/skills/{skill_id} | Get Skill Handler |
15
16
  | [**importSkill**](SkillsApi.md#importskill) | **POST** /v1/skills/import | Import Skill Handler |
16
17
  | [**listSkillVersions**](SkillsApi.md#listskillversions) | **GET** /v1/skills/{skill_id}/versions | List Skill Versions Handler |
@@ -552,6 +553,81 @@ example().catch(console.error);
552
553
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
553
554
 
554
555
 
556
+ ## exportSkills
557
+
558
+ > Blob exportSkills(exportSkillsRequest)
559
+
560
+ Export Skills Handler
561
+
562
+ Download several skills\' active versions as one ZIP; needs can_read on each.
563
+
564
+ ### Example
565
+
566
+ ```ts
567
+ import {
568
+ Configuration,
569
+ SkillsApi,
570
+ } from '@knowledge-stack/ksapi';
571
+ import type { ExportSkillsOperationRequest } from '@knowledge-stack/ksapi';
572
+
573
+ async function example() {
574
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
575
+ const config = new Configuration({
576
+ // To configure API key authorization: cookieAuth
577
+ apiKey: "YOUR API KEY",
578
+ // Configure HTTP bearer authorization: bearerAuth
579
+ accessToken: "YOUR BEARER TOKEN",
580
+ });
581
+ const api = new SkillsApi(config);
582
+
583
+ const body = {
584
+ // ExportSkillsRequest
585
+ exportSkillsRequest: ...,
586
+ } satisfies ExportSkillsOperationRequest;
587
+
588
+ try {
589
+ const data = await api.exportSkills(body);
590
+ console.log(data);
591
+ } catch (error) {
592
+ console.error(error);
593
+ }
594
+ }
595
+
596
+ // Run the test
597
+ example().catch(console.error);
598
+ ```
599
+
600
+ ### Parameters
601
+
602
+
603
+ | Name | Type | Description | Notes |
604
+ |------------- | ------------- | ------------- | -------------|
605
+ | **exportSkillsRequest** | [ExportSkillsRequest](ExportSkillsRequest.md) | | |
606
+
607
+ ### Return type
608
+
609
+ **Blob**
610
+
611
+ ### Authorization
612
+
613
+ [cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
614
+
615
+ ### HTTP request headers
616
+
617
+ - **Content-Type**: `application/json`
618
+ - **Accept**: `application/zip`, `application/json`
619
+
620
+
621
+ ### HTTP response details
622
+ | Status code | Description | Response headers |
623
+ |-------------|-------------|------------------|
624
+ | **200** | One ZIP with a top-level folder per skill. | - |
625
+ | **422** | Validation Error | - |
626
+ | **0** | Error response. | - |
627
+
628
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
629
+
630
+
555
631
  ## getSkill
556
632
 
557
633
  > SkillResponse getSkill(skillId, includeFileContents)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "2.14.4",
3
+ "version": "2.15.1",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -39,10 +39,10 @@ import {
39
39
 
40
40
  export interface GetAdminKbTimeseriesRequest {
41
41
  metric: KbMetric;
42
+ timezone?: string | null;
42
43
  since?: Date | null;
43
44
  until?: Date | null;
44
45
  bucket?: TimeBucket;
45
- timezone?: string | null;
46
46
  }
47
47
 
48
48
  /**
@@ -77,10 +77,10 @@ export interface AdminKbApiInterface {
77
77
  /**
78
78
  * Creates request options for getAdminKbTimeseries without sending the request
79
79
  * @param {KbMetric} metric Which KB metric to bucket.
80
- * @param {Date} [since] Window start.
81
- * @param {Date} [until] Window end.
82
- * @param {TimeBucket} [bucket] Bucket size.
83
80
  * @param {string} [timezone] IANA tz override; defaults to tenant setting.
81
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
82
+ * @param {Date} [until] Window end (inclusive).
83
+ * @param {TimeBucket} [bucket] Bucket size.
84
84
  * @throws {RequiredError}
85
85
  * @memberof AdminKbApiInterface
86
86
  */
@@ -90,10 +90,10 @@ export interface AdminKbApiInterface {
90
90
  * A knowledge-base metric bucketed over time, in the resolved timezone.
91
91
  * @summary Get Admin Kb Timeseries Handler
92
92
  * @param {KbMetric} metric Which KB metric to bucket.
93
- * @param {Date} [since] Window start.
94
- * @param {Date} [until] Window end.
95
- * @param {TimeBucket} [bucket] Bucket size.
96
93
  * @param {string} [timezone] IANA tz override; defaults to tenant setting.
94
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
95
+ * @param {Date} [until] Window end (inclusive).
96
+ * @param {TimeBucket} [bucket] Bucket size.
97
97
  * @param {*} [options] Override http request option.
98
98
  * @throws {RequiredError}
99
99
  * @memberof AdminKbApiInterface
@@ -177,6 +177,10 @@ export class AdminKbApi extends runtime.BaseAPI implements AdminKbApiInterface {
177
177
  queryParameters['metric'] = requestParameters['metric'];
178
178
  }
179
179
 
180
+ if (requestParameters['timezone'] != null) {
181
+ queryParameters['timezone'] = requestParameters['timezone'];
182
+ }
183
+
180
184
  if (requestParameters['since'] != null) {
181
185
  queryParameters['since'] = (requestParameters['since'] as any).toISOString();
182
186
  }
@@ -189,10 +193,6 @@ export class AdminKbApi extends runtime.BaseAPI implements AdminKbApiInterface {
189
193
  queryParameters['bucket'] = requestParameters['bucket'];
190
194
  }
191
195
 
192
- if (requestParameters['timezone'] != null) {
193
- queryParameters['timezone'] = requestParameters['timezone'];
194
- }
195
-
196
196
  const headerParameters: runtime.HTTPHeaders = {};
197
197
 
198
198
  if (this.configuration && this.configuration.accessToken) {
@@ -44,16 +44,16 @@ import {
44
44
  } from '../models/index';
45
45
 
46
46
  export interface GetAdminWorkflowByHourRequest {
47
- since?: Date | null;
48
- until?: Date | null;
49
47
  timezone?: string | null;
50
48
  definitionId?: string | null;
49
+ since?: Date | null;
50
+ until?: Date | null;
51
51
  }
52
52
 
53
53
  export interface GetAdminWorkflowLeaderboardRequest {
54
+ limit?: number;
54
55
  since?: Date | null;
55
56
  until?: Date | null;
56
- limit?: number;
57
57
  }
58
58
 
59
59
  export interface GetAdminWorkflowOutputStatsRequest {
@@ -62,17 +62,17 @@ export interface GetAdminWorkflowOutputStatsRequest {
62
62
  }
63
63
 
64
64
  export interface GetAdminWorkflowSummaryRequest {
65
+ definitionId?: string | null;
65
66
  since?: Date | null;
66
67
  until?: Date | null;
67
- definitionId?: string | null;
68
68
  }
69
69
 
70
70
  export interface GetAdminWorkflowTimeseriesRequest {
71
+ timezone?: string | null;
72
+ definitionId?: string | null;
71
73
  since?: Date | null;
72
74
  until?: Date | null;
73
75
  bucket?: TimeBucket;
74
- timezone?: string | null;
75
- definitionId?: string | null;
76
76
  }
77
77
 
78
78
  /**
@@ -84,10 +84,10 @@ export interface GetAdminWorkflowTimeseriesRequest {
84
84
  export interface AdminWorkflowsApiInterface {
85
85
  /**
86
86
  * Creates request options for getAdminWorkflowByHour without sending the request
87
- * @param {Date} [since] Window start.
88
- * @param {Date} [until] Window end.
89
87
  * @param {string} [timezone] IANA tz override; defaults to tenant setting.
90
88
  * @param {string} [definitionId] Scope to one workflow.
89
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
90
+ * @param {Date} [until] Window end (inclusive).
91
91
  * @throws {RequiredError}
92
92
  * @memberof AdminWorkflowsApiInterface
93
93
  */
@@ -96,10 +96,10 @@ export interface AdminWorkflowsApiInterface {
96
96
  /**
97
97
  * Runs per hour-of-day (0-23) in the resolved timezone.
98
98
  * @summary Get Admin Workflow By Hour Handler
99
- * @param {Date} [since] Window start.
100
- * @param {Date} [until] Window end.
101
99
  * @param {string} [timezone] IANA tz override; defaults to tenant setting.
102
100
  * @param {string} [definitionId] Scope to one workflow.
101
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
102
+ * @param {Date} [until] Window end (inclusive).
103
103
  * @param {*} [options] Override http request option.
104
104
  * @throws {RequiredError}
105
105
  * @memberof AdminWorkflowsApiInterface
@@ -114,9 +114,9 @@ export interface AdminWorkflowsApiInterface {
114
114
 
115
115
  /**
116
116
  * Creates request options for getAdminWorkflowLeaderboard without sending the request
117
- * @param {Date} [since] Window start.
118
- * @param {Date} [until] Window end.
119
117
  * @param {number} [limit] Top-N per leaderboard.
118
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
119
+ * @param {Date} [until] Window end (inclusive).
120
120
  * @throws {RequiredError}
121
121
  * @memberof AdminWorkflowsApiInterface
122
122
  */
@@ -125,9 +125,9 @@ export interface AdminWorkflowsApiInterface {
125
125
  /**
126
126
  * Top workflows and top run owners by run count.
127
127
  * @summary Get Admin Workflow Leaderboard Handler
128
- * @param {Date} [since] Window start.
129
- * @param {Date} [until] Window end.
130
128
  * @param {number} [limit] Top-N per leaderboard.
129
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
130
+ * @param {Date} [until] Window end (inclusive).
131
131
  * @param {*} [options] Override http request option.
132
132
  * @throws {RequiredError}
133
133
  * @memberof AdminWorkflowsApiInterface
@@ -142,8 +142,8 @@ export interface AdminWorkflowsApiInterface {
142
142
 
143
143
  /**
144
144
  * Creates request options for getAdminWorkflowOutputStats without sending the request
145
- * @param {Date} [since] Window start.
146
- * @param {Date} [until] Window end.
145
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
146
+ * @param {Date} [until] Window end (inclusive).
147
147
  * @throws {RequiredError}
148
148
  * @memberof AdminWorkflowsApiInterface
149
149
  */
@@ -152,8 +152,8 @@ export interface AdminWorkflowsApiInterface {
152
152
  /**
153
153
  * Average output DOCUMENTs generated per workflow definition (completed runs).
154
154
  * @summary Get Admin Workflow Output Stats Handler
155
- * @param {Date} [since] Window start.
156
- * @param {Date} [until] Window end.
155
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
156
+ * @param {Date} [until] Window end (inclusive).
157
157
  * @param {*} [options] Override http request option.
158
158
  * @throws {RequiredError}
159
159
  * @memberof AdminWorkflowsApiInterface
@@ -168,9 +168,9 @@ export interface AdminWorkflowsApiInterface {
168
168
 
169
169
  /**
170
170
  * Creates request options for getAdminWorkflowSummary without sending the request
171
+ * @param {string} [definitionId] Scope all numbers to one workflow.
171
172
  * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
172
173
  * @param {Date} [until] Window end (inclusive).
173
- * @param {string} [definitionId] Scope all numbers to one workflow.
174
174
  * @throws {RequiredError}
175
175
  * @memberof AdminWorkflowsApiInterface
176
176
  */
@@ -179,9 +179,9 @@ export interface AdminWorkflowsApiInterface {
179
179
  /**
180
180
  * Tenant-wide run health: counts, failure rate, durations, approval backlog.
181
181
  * @summary Get Admin Workflow Summary Handler
182
+ * @param {string} [definitionId] Scope all numbers to one workflow.
182
183
  * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
183
184
  * @param {Date} [until] Window end (inclusive).
184
- * @param {string} [definitionId] Scope all numbers to one workflow.
185
185
  * @param {*} [options] Override http request option.
186
186
  * @throws {RequiredError}
187
187
  * @memberof AdminWorkflowsApiInterface
@@ -196,11 +196,11 @@ export interface AdminWorkflowsApiInterface {
196
196
 
197
197
  /**
198
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
199
  * @param {string} [timezone] IANA tz override; defaults to tenant setting.
203
200
  * @param {string} [definitionId] Scope to one workflow.
201
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
202
+ * @param {Date} [until] Window end (inclusive).
203
+ * @param {TimeBucket} [bucket] Bucket size.
204
204
  * @throws {RequiredError}
205
205
  * @memberof AdminWorkflowsApiInterface
206
206
  */
@@ -209,11 +209,11 @@ export interface AdminWorkflowsApiInterface {
209
209
  /**
210
210
  * Run counts bucketed over time, in the resolved timezone.
211
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
212
  * @param {string} [timezone] IANA tz override; defaults to tenant setting.
216
213
  * @param {string} [definitionId] Scope to one workflow.
214
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
215
+ * @param {Date} [until] Window end (inclusive).
216
+ * @param {TimeBucket} [bucket] Bucket size.
217
217
  * @param {*} [options] Override http request option.
218
218
  * @throws {RequiredError}
219
219
  * @memberof AdminWorkflowsApiInterface
@@ -239,14 +239,6 @@ export class AdminWorkflowsApi extends runtime.BaseAPI implements AdminWorkflows
239
239
  async getAdminWorkflowByHourRequestOpts(requestParameters: GetAdminWorkflowByHourRequest): Promise<runtime.RequestOpts> {
240
240
  const queryParameters: any = {};
241
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
242
  if (requestParameters['timezone'] != null) {
251
243
  queryParameters['timezone'] = requestParameters['timezone'];
252
244
  }
@@ -255,6 +247,14 @@ export class AdminWorkflowsApi extends runtime.BaseAPI implements AdminWorkflows
255
247
  queryParameters['definition_id'] = requestParameters['definitionId'];
256
248
  }
257
249
 
250
+ if (requestParameters['since'] != null) {
251
+ queryParameters['since'] = (requestParameters['since'] as any).toISOString();
252
+ }
253
+
254
+ if (requestParameters['until'] != null) {
255
+ queryParameters['until'] = (requestParameters['until'] as any).toISOString();
256
+ }
257
+
258
258
  const headerParameters: runtime.HTTPHeaders = {};
259
259
 
260
260
  if (this.configuration && this.configuration.accessToken) {
@@ -302,6 +302,10 @@ export class AdminWorkflowsApi extends runtime.BaseAPI implements AdminWorkflows
302
302
  async getAdminWorkflowLeaderboardRequestOpts(requestParameters: GetAdminWorkflowLeaderboardRequest): Promise<runtime.RequestOpts> {
303
303
  const queryParameters: any = {};
304
304
 
305
+ if (requestParameters['limit'] != null) {
306
+ queryParameters['limit'] = requestParameters['limit'];
307
+ }
308
+
305
309
  if (requestParameters['since'] != null) {
306
310
  queryParameters['since'] = (requestParameters['since'] as any).toISOString();
307
311
  }
@@ -310,10 +314,6 @@ export class AdminWorkflowsApi extends runtime.BaseAPI implements AdminWorkflows
310
314
  queryParameters['until'] = (requestParameters['until'] as any).toISOString();
311
315
  }
312
316
 
313
- if (requestParameters['limit'] != null) {
314
- queryParameters['limit'] = requestParameters['limit'];
315
- }
316
-
317
317
  const headerParameters: runtime.HTTPHeaders = {};
318
318
 
319
319
  if (this.configuration && this.configuration.accessToken) {
@@ -416,6 +416,10 @@ export class AdminWorkflowsApi extends runtime.BaseAPI implements AdminWorkflows
416
416
  async getAdminWorkflowSummaryRequestOpts(requestParameters: GetAdminWorkflowSummaryRequest): Promise<runtime.RequestOpts> {
417
417
  const queryParameters: any = {};
418
418
 
419
+ if (requestParameters['definitionId'] != null) {
420
+ queryParameters['definition_id'] = requestParameters['definitionId'];
421
+ }
422
+
419
423
  if (requestParameters['since'] != null) {
420
424
  queryParameters['since'] = (requestParameters['since'] as any).toISOString();
421
425
  }
@@ -424,10 +428,6 @@ export class AdminWorkflowsApi extends runtime.BaseAPI implements AdminWorkflows
424
428
  queryParameters['until'] = (requestParameters['until'] as any).toISOString();
425
429
  }
426
430
 
427
- if (requestParameters['definitionId'] != null) {
428
- queryParameters['definition_id'] = requestParameters['definitionId'];
429
- }
430
-
431
431
  const headerParameters: runtime.HTTPHeaders = {};
432
432
 
433
433
  if (this.configuration && this.configuration.accessToken) {
@@ -475,6 +475,14 @@ export class AdminWorkflowsApi extends runtime.BaseAPI implements AdminWorkflows
475
475
  async getAdminWorkflowTimeseriesRequestOpts(requestParameters: GetAdminWorkflowTimeseriesRequest): Promise<runtime.RequestOpts> {
476
476
  const queryParameters: any = {};
477
477
 
478
+ if (requestParameters['timezone'] != null) {
479
+ queryParameters['timezone'] = requestParameters['timezone'];
480
+ }
481
+
482
+ if (requestParameters['definitionId'] != null) {
483
+ queryParameters['definition_id'] = requestParameters['definitionId'];
484
+ }
485
+
478
486
  if (requestParameters['since'] != null) {
479
487
  queryParameters['since'] = (requestParameters['since'] as any).toISOString();
480
488
  }
@@ -487,14 +495,6 @@ export class AdminWorkflowsApi extends runtime.BaseAPI implements AdminWorkflows
487
495
  queryParameters['bucket'] = requestParameters['bucket'];
488
496
  }
489
497
 
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
498
  const headerParameters: runtime.HTTPHeaders = {};
499
499
 
500
500
  if (this.configuration && this.configuration.accessToken) {