Skip to content

Commit

Permalink
fix(specs): filter run list by type (generated)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
algolia-bot and millotp committed Aug 27, 2024
1 parent 85ecb15 commit 88ee3ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/main/scala/algoliasearch/api/IngestionClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import algoliasearch.ingestion.RunSortKeys._
import algoliasearch.ingestion.RunSourcePayload
import algoliasearch.ingestion.RunSourceResponse
import algoliasearch.ingestion.RunStatus._
import algoliasearch.ingestion.RunType._
import algoliasearch.ingestion.SortKeys._
import algoliasearch.ingestion.Source
import algoliasearch.ingestion.SourceCreate
Expand Down Expand Up @@ -951,6 +952,8 @@ class IngestionClient(
* Page number of the paginated API response.
* @param status
* Run status for filtering the list of task runs.
* @param `type`
* Run type for filtering the list of task runs.
* @param taskID
* Task ID for filtering the list of task runs.
* @param sort
Expand All @@ -966,6 +969,7 @@ class IngestionClient(
itemsPerPage: Option[Int] = None,
page: Option[Int] = None,
status: Option[Seq[RunStatus]] = None,
`type`: Option[Seq[RunType]] = None,
taskID: Option[String] = None,
sort: Option[RunSortKeys] = None,
order: Option[OrderKeys] = None,
Expand All @@ -981,6 +985,7 @@ class IngestionClient(
.withQueryParameter("itemsPerPage", itemsPerPage)
.withQueryParameter("page", page)
.withQueryParameter("status", status)
.withQueryParameter("type", `type`)
.withQueryParameter("taskID", taskID)
.withQueryParameter("sort", sort)
.withQueryParameter("order", order)
Expand Down
8 changes: 7 additions & 1 deletion src/main/scala/algoliasearch/ingestion/RunType.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ object RunType {
case object Discover extends RunType {
override def toString = "discover"
}
val values: Seq[RunType] = Seq(Reindex, Update, Discover)
case object Validate extends RunType {
override def toString = "validate"
}
case object Push extends RunType {
override def toString = "push"
}
val values: Seq[RunType] = Seq(Reindex, Update, Discover, Validate, Push)

def withName(name: String): RunType = RunType.values
.find(_.toString == name)
Expand Down

0 comments on commit 88ee3ba

Please sign in to comment.