@@ -35,7 +35,6 @@ import type {
35
35
GetEventsProps ,
36
36
GetRunProps ,
37
37
GetRunsProps ,
38
- GetRunsByTaskIDProps ,
39
38
GetSourceProps ,
40
39
GetSourcesProps ,
41
40
GetTaskProps ,
@@ -719,10 +718,12 @@ export function createIngestionClient({
719
718
* @param getEvents.runID - The run uuid.
720
719
* @param getEvents.itemsPerPage - The number of items per page to return.
721
720
* @param getEvents.page - The page number to fetch, starting at 1.
721
+ * @param getEvents.status - Filter the status of the events.
722
+ * @param getEvents.type - Filter the type of the events.
722
723
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
723
724
*/
724
725
getEvents (
725
- { runID, itemsPerPage, page } : GetEventsProps ,
726
+ { runID, itemsPerPage, page, status , type } : GetEventsProps ,
726
727
requestOptions ?: RequestOptions
727
728
) : Promise < ListEventsResponse > {
728
729
if ( ! runID ) {
@@ -746,6 +747,14 @@ export function createIngestionClient({
746
747
queryParameters . page = page . toString ( ) ;
747
748
}
748
749
750
+ if ( status !== undefined ) {
751
+ queryParameters . status = status . toString ( ) ;
752
+ }
753
+
754
+ if ( type !== undefined ) {
755
+ queryParameters . type = type . toString ( ) ;
756
+ }
757
+
749
758
const request : Request = {
750
759
method : 'GET' ,
751
760
path : requestPath ,
@@ -796,10 +805,12 @@ export function createIngestionClient({
796
805
* @param getRuns - The getRuns object.
797
806
* @param getRuns.itemsPerPage - The number of items per page to return.
798
807
* @param getRuns.page - The page number to fetch, starting at 1.
808
+ * @param getRuns.status - Filter the status of the runs.
809
+ * @param getRuns.taskID - Filter by taskID.
799
810
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
800
811
*/
801
812
getRuns (
802
- { itemsPerPage, page } : GetRunsProps = { } ,
813
+ { itemsPerPage, page, status , taskID } : GetRunsProps = { } ,
803
814
requestOptions : RequestOptions | undefined = undefined
804
815
) : Promise < RunListResponse > {
805
816
const requestPath = '/1/runs' ;
@@ -814,49 +825,12 @@ export function createIngestionClient({
814
825
queryParameters . page = page . toString ( ) ;
815
826
}
816
827
817
- const request : Request = {
818
- method : 'GET' ,
819
- path : requestPath ,
820
- queryParameters,
821
- headers,
822
- } ;
823
-
824
- return transporter . request ( request , requestOptions ) ;
825
- } ,
826
-
827
- /**
828
- * Get a list of runs associated with a taskID.
829
- *
830
- * @summary Get a list of runs associated with a taskID.
831
- * @param getRunsByTaskID - The getRunsByTaskID object.
832
- * @param getRunsByTaskID.taskID - The task uuid.
833
- * @param getRunsByTaskID.itemsPerPage - The number of items per page to return.
834
- * @param getRunsByTaskID.page - The page number to fetch, starting at 1.
835
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
836
- */
837
- getRunsByTaskID (
838
- { taskID, itemsPerPage, page } : GetRunsByTaskIDProps ,
839
- requestOptions ?: RequestOptions
840
- ) : Promise < RunListResponse > {
841
- if ( ! taskID ) {
842
- throw new Error (
843
- 'Parameter `taskID` is required when calling `getRunsByTaskID`.'
844
- ) ;
845
- }
846
-
847
- const requestPath = '/1/runs/tasks/{taskID}' . replace (
848
- '{taskID}' ,
849
- encodeURIComponent ( taskID )
850
- ) ;
851
- const headers : Headers = { } ;
852
- const queryParameters : QueryParameters = { } ;
853
-
854
- if ( itemsPerPage !== undefined ) {
855
- queryParameters . itemsPerPage = itemsPerPage . toString ( ) ;
828
+ if ( status !== undefined ) {
829
+ queryParameters . status = status . toString ( ) ;
856
830
}
857
831
858
- if ( page !== undefined ) {
859
- queryParameters . page = page . toString ( ) ;
832
+ if ( taskID !== undefined ) {
833
+ queryParameters . taskID = taskID . toString ( ) ;
860
834
}
861
835
862
836
const request : Request = {
0 commit comments