Skip to content

Commit 88ee3ba

Browse files
algolia-botmillotp
andcommitted
fix(specs): filter run list by type (generated)
algolia/api-clients-automation#3577 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
1 parent 85ecb15 commit 88ee3ba

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/main/scala/algoliasearch/api/IngestionClient.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import algoliasearch.ingestion.RunSortKeys._
4545
import algoliasearch.ingestion.RunSourcePayload
4646
import algoliasearch.ingestion.RunSourceResponse
4747
import algoliasearch.ingestion.RunStatus._
48+
import algoliasearch.ingestion.RunType._
4849
import algoliasearch.ingestion.SortKeys._
4950
import algoliasearch.ingestion.Source
5051
import algoliasearch.ingestion.SourceCreate
@@ -951,6 +952,8 @@ class IngestionClient(
951952
* Page number of the paginated API response.
952953
* @param status
953954
* Run status for filtering the list of task runs.
955+
* @param `type`
956+
* Run type for filtering the list of task runs.
954957
* @param taskID
955958
* Task ID for filtering the list of task runs.
956959
* @param sort
@@ -966,6 +969,7 @@ class IngestionClient(
966969
itemsPerPage: Option[Int] = None,
967970
page: Option[Int] = None,
968971
status: Option[Seq[RunStatus]] = None,
972+
`type`: Option[Seq[RunType]] = None,
969973
taskID: Option[String] = None,
970974
sort: Option[RunSortKeys] = None,
971975
order: Option[OrderKeys] = None,
@@ -981,6 +985,7 @@ class IngestionClient(
981985
.withQueryParameter("itemsPerPage", itemsPerPage)
982986
.withQueryParameter("page", page)
983987
.withQueryParameter("status", status)
988+
.withQueryParameter("type", `type`)
984989
.withQueryParameter("taskID", taskID)
985990
.withQueryParameter("sort", sort)
986991
.withQueryParameter("order", order)

src/main/scala/algoliasearch/ingestion/RunType.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ object RunType {
3939
case object Discover extends RunType {
4040
override def toString = "discover"
4141
}
42-
val values: Seq[RunType] = Seq(Reindex, Update, Discover)
42+
case object Validate extends RunType {
43+
override def toString = "validate"
44+
}
45+
case object Push extends RunType {
46+
override def toString = "push"
47+
}
48+
val values: Seq[RunType] = Seq(Reindex, Update, Discover, Validate, Push)
4349

4450
def withName(name: String): RunType = RunType.values
4551
.find(_.toString == name)

0 commit comments

Comments
 (0)