Skip to content

Commit 8ef8240

Browse files
algolia-botmillotpshortcuts
committed
fix(specs): correct query params for ingestion [skip-bc] (generated)
algolia/api-clients-automation#3830 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]> Co-authored-by: shortcuts <[email protected]>
1 parent 440b369 commit 8ef8240

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import algoliasearch.ingestion.RunSourcePayload
4444
import algoliasearch.ingestion.RunSourceResponse
4545
import algoliasearch.ingestion.RunStatus._
4646
import algoliasearch.ingestion.RunType._
47-
import algoliasearch.ingestion.SortKeys._
4847
import algoliasearch.ingestion.Source
4948
import algoliasearch.ingestion.SourceCreate
5049
import algoliasearch.ingestion.SourceCreateResponse
@@ -68,6 +67,7 @@ import algoliasearch.ingestion.Transformation
6867
import algoliasearch.ingestion.TransformationCreate
6968
import algoliasearch.ingestion.TransformationCreateResponse
7069
import algoliasearch.ingestion.TransformationSearch
70+
import algoliasearch.ingestion.TransformationSortKeys._
7171
import algoliasearch.ingestion.TransformationTry
7272
import algoliasearch.ingestion.TransformationTryResponse
7373
import algoliasearch.ingestion.TransformationUpdateResponse
@@ -780,9 +780,9 @@ class IngestionClient(
780780
* @param `type`
781781
* Type of authentication resource to retrieve.
782782
* @param platform
783-
* Ecommerce platform for which to retrieve authentication resources.
783+
* Ecommerce platform for which to retrieve authentications.
784784
* @param sort
785-
* Property by which to sort the list of authentication resources.
785+
* Property by which to sort the list of authentications.
786786
* @param order
787787
* Sort order of the response, ascending or descending.
788788
*/
@@ -825,6 +825,8 @@ class IngestionClient(
825825
* Destination type.
826826
* @param authenticationID
827827
* Authentication ID used by destinations.
828+
* @param transformationID
829+
* Get the list of destinations used by a transformation.
828830
* @param sort
829831
* Property by which to sort the destinations.
830832
* @param order
@@ -835,6 +837,7 @@ class IngestionClient(
835837
page: Option[Int] = None,
836838
`type`: Option[Seq[DestinationType]] = None,
837839
authenticationID: Option[Seq[String]] = None,
840+
transformationID: Option[String] = None,
838841
sort: Option[DestinationSortKeys] = None,
839842
order: Option[OrderKeys] = None,
840843
requestOptions: Option[RequestOptions] = None
@@ -848,6 +851,7 @@ class IngestionClient(
848851
.withQueryParameter("page", page)
849852
.withQueryParameter("type", `type`)
850853
.withQueryParameter("authenticationID", authenticationID)
854+
.withQueryParameter("transformationID", transformationID)
851855
.withQueryParameter("sort", sort)
852856
.withQueryParameter("order", order)
853857
.build()
@@ -981,8 +985,7 @@ class IngestionClient(
981985
* @param `type`
982986
* Source type. Some sources require authentication.
983987
* @param authenticationID
984-
* Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication
985-
* resource.
988+
* Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication.
986989
* @param sort
987990
* Property by which to sort the list of sources.
988991
* @param order
@@ -1136,14 +1139,14 @@ class IngestionClient(
11361139
* @param page
11371140
* Page number of the paginated API response.
11381141
* @param sort
1139-
* Property by which to sort the list.
1142+
* Property by which to sort the list of transformations.
11401143
* @param order
11411144
* Sort order of the response, ascending or descending.
11421145
*/
11431146
def listTransformations(
11441147
itemsPerPage: Option[Int] = None,
11451148
page: Option[Int] = None,
1146-
sort: Option[SortKeys] = None,
1149+
sort: Option[TransformationSortKeys] = None,
11471150
order: Option[OrderKeys] = None,
11481151
requestOptions: Option[RequestOptions] = None
11491152
)(implicit ec: ExecutionContext): Future[ListTransformationsResponse] = Future {

src/main/scala/algoliasearch/ingestion/AuthenticationSortKeys.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ import org.json4s._
2727

2828
sealed trait AuthenticationSortKeys
2929

30-
/** Property by which to sort the list of authentication resources.
30+
/** Property by which to sort the list of authentications.
3131
*/
3232
object AuthenticationSortKeys {
3333
case object Name extends AuthenticationSortKeys {
3434
override def toString = "name"
3535
}
36-
case object AuthType extends AuthenticationSortKeys {
37-
override def toString = "auth_type"
36+
case object `Type` extends AuthenticationSortKeys {
37+
override def toString = "type"
3838
}
3939
case object Platform extends AuthenticationSortKeys {
4040
override def toString = "platform"
@@ -45,7 +45,7 @@ object AuthenticationSortKeys {
4545
case object CreatedAt extends AuthenticationSortKeys {
4646
override def toString = "createdAt"
4747
}
48-
val values: Seq[AuthenticationSortKeys] = Seq(Name, AuthType, Platform, UpdatedAt, CreatedAt)
48+
val values: Seq[AuthenticationSortKeys] = Seq(Name, `Type`, Platform, UpdatedAt, CreatedAt)
4949

5050
def withName(name: String): AuthenticationSortKeys = AuthenticationSortKeys.values
5151
.find(_.toString == name)

src/main/scala/algoliasearch/ingestion/JsonSupport.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ object JsonSupport {
5555
new RunStatusSerializer() :+
5656
new RunTypeSerializer() :+
5757
new ScheduleTriggerTypeSerializer() :+
58-
new SortKeysSerializer() :+
5958
new SourceSortKeysSerializer() :+
6059
new SourceTypeSerializer() :+
6160
new StreamingTriggerTypeSerializer() :+
6261
new SubscriptionTriggerTypeSerializer() :+
6362
new TaskSortKeysSerializer() :+
63+
new TransformationSortKeysSerializer() :+
6464
new TriggerTypeSerializer()
6565

6666
private def oneOfsSerializers: Seq[Serializer[_]] = Seq[Serializer[_]]() :+

src/main/scala/algoliasearch/ingestion/SortKeys.scala renamed to src/main/scala/algoliasearch/ingestion/TransformationSortKeys.scala

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,35 @@ package algoliasearch.ingestion
2525

2626
import org.json4s._
2727

28-
sealed trait SortKeys
28+
sealed trait TransformationSortKeys
2929

30-
/** Property by which to sort the list.
30+
/** Property by which to sort the list of transformations.
3131
*/
32-
object SortKeys {
33-
case object Name extends SortKeys {
32+
object TransformationSortKeys {
33+
case object Name extends TransformationSortKeys {
3434
override def toString = "name"
3535
}
36-
case object `Type` extends SortKeys {
37-
override def toString = "type"
38-
}
39-
case object UpdatedAt extends SortKeys {
36+
case object UpdatedAt extends TransformationSortKeys {
4037
override def toString = "updatedAt"
4138
}
42-
case object CreatedAt extends SortKeys {
39+
case object CreatedAt extends TransformationSortKeys {
4340
override def toString = "createdAt"
4441
}
45-
val values: Seq[SortKeys] = Seq(Name, `Type`, UpdatedAt, CreatedAt)
42+
val values: Seq[TransformationSortKeys] = Seq(Name, UpdatedAt, CreatedAt)
4643

47-
def withName(name: String): SortKeys = SortKeys.values
44+
def withName(name: String): TransformationSortKeys = TransformationSortKeys.values
4845
.find(_.toString == name)
49-
.getOrElse(throw new MappingException(s"Unknown SortKeys value: $name"))
46+
.getOrElse(throw new MappingException(s"Unknown TransformationSortKeys value: $name"))
5047
}
5148

52-
class SortKeysSerializer
53-
extends CustomSerializer[SortKeys](_ =>
49+
class TransformationSortKeysSerializer
50+
extends CustomSerializer[TransformationSortKeys](_ =>
5451
(
5552
{
56-
case JString(value) => SortKeys.withName(value)
53+
case JString(value) => TransformationSortKeys.withName(value)
5754
case JNull => null
5855
},
59-
{ case value: SortKeys =>
56+
{ case value: TransformationSortKeys =>
6057
JString(value.toString)
6158
}
6259
)

0 commit comments

Comments
 (0)