Skip to content

Commit

Permalink
fix(specs): correct query params for ingestion [skip-bc] (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3830

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
Co-authored-by: shortcuts <vannicattec@gmail.com>
  • Loading branch information
3 people committed Sep 25, 2024
1 parent a6b050c commit f7047c6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
32 changes: 20 additions & 12 deletions lib/Api/IngestionClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -1216,8 +1216,8 @@ public function getTransformation($transformationID, $requestOptions = [])
* @param int $itemsPerPage Number of items per page. (optional, default to 10)
* @param int $page Page number of the paginated API response. (optional)
* @param array $type Type of authentication resource to retrieve. (optional)
* @param array $platform Ecommerce platform for which to retrieve authentication resources. (optional)
* @param array $sort Property by which to sort the list of authentication resources. (optional)
* @param array $platform Ecommerce platform for which to retrieve authentications. (optional)
* @param array $sort Property by which to sort the list of authentications. (optional)
* @param array $order Sort order of the response, ascending or descending. (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
Expand Down Expand Up @@ -1282,17 +1282,18 @@ public function listAuthentications($itemsPerPage = null, $page = null, $type =
* - deleteIndex
* - editSettings
*
* @param int $itemsPerPage Number of items per page. (optional, default to 10)
* @param int $page Page number of the paginated API response. (optional)
* @param array $type Destination type. (optional)
* @param array $authenticationID Authentication ID used by destinations. (optional)
* @param array $sort Property by which to sort the destinations. (optional)
* @param array $order Sort order of the response, ascending or descending. (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
* @param int $itemsPerPage Number of items per page. (optional, default to 10)
* @param int $page Page number of the paginated API response. (optional)
* @param array $type Destination type. (optional)
* @param array $authenticationID Authentication ID used by destinations. (optional)
* @param string $transformationID Get the list of destinations used by a transformation. (optional)
* @param array $sort Property by which to sort the destinations. (optional)
* @param array $order Sort order of the response, ascending or descending. (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
* @return \Algolia\AlgoliaSearch\Model\Ingestion\ListDestinationsResponse|array<string, mixed>
*/
public function listDestinations($itemsPerPage = null, $page = null, $type = null, $authenticationID = null, $sort = null, $order = null, $requestOptions = [])
public function listDestinations($itemsPerPage = null, $page = null, $type = null, $authenticationID = null, $transformationID = null, $sort = null, $order = null, $requestOptions = [])
{
if (null !== $itemsPerPage && $itemsPerPage > 100) {
throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listDestinations, must be smaller than or equal to 100.');
Expand Down Expand Up @@ -1332,6 +1333,13 @@ public function listDestinations($itemsPerPage = null, $page = null, $type = nul
$queryParameters['authenticationID'] = $authenticationID;
}

if (is_array($transformationID)) {
$transformationID = ObjectSerializer::serializeCollection($transformationID, 'form', true);
}
if (null !== $transformationID) {
$queryParameters['transformationID'] = $transformationID;
}

if (null !== $sort) {
$queryParameters['sort'] = $sort;
}
Expand Down Expand Up @@ -1521,7 +1529,7 @@ public function listRuns($itemsPerPage = null, $page = null, $status = null, $ty
* @param int $itemsPerPage Number of items per page. (optional, default to 10)
* @param int $page Page number of the paginated API response. (optional)
* @param array $type Source type. Some sources require authentication. (optional)
* @param array $authenticationID Authentication IDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication resource. (optional)
* @param array $authenticationID Authentication IDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication. (optional)
* @param array $sort Property by which to sort the list of sources. (optional)
* @param array $order Sort order of the response, ascending or descending. (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
Expand Down Expand Up @@ -1769,7 +1777,7 @@ public function listTasksV1($itemsPerPage = null, $page = null, $action = null,
*
* @param int $itemsPerPage Number of items per page. (optional, default to 10)
* @param int $page Page number of the paginated API response. (optional)
* @param array $sort Property by which to sort the list. (optional)
* @param array $sort Property by which to sort the list of transformations. (optional)
* @param array $order Sort order of the response, ascending or descending. (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/Ingestion/AuthenticationSortKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @category Class
*
* @description Property by which to sort the list of authentication resources.
* @description Property by which to sort the list of authentications.
*/
class AuthenticationSortKeys
{
Expand All @@ -18,7 +18,7 @@ class AuthenticationSortKeys
*/
public const NAME = 'name';

public const AUTH_TYPE = 'auth_type';
public const TYPE = 'type';

public const PLATFORM = 'platform';

Expand All @@ -35,7 +35,7 @@ public static function getAllowableEnumValues()
{
return [
self::NAME,
self::AUTH_TYPE,
self::TYPE,
self::PLATFORM,
self::UPDATED_AT,
self::CREATED_AT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@
namespace Algolia\AlgoliaSearch\Model\Ingestion;

/**
* SortKeys Class Doc Comment.
* TransformationSortKeys Class Doc Comment.
*
* @category Class
*
* @description Property by which to sort the list.
* @description Property by which to sort the list of transformations.
*/
class SortKeys
class TransformationSortKeys
{
/**
* Possible values of this enum.
*/
public const NAME = 'name';

public const TYPE = 'type';

public const UPDATED_AT = 'updatedAt';

public const CREATED_AT = 'createdAt';
Expand All @@ -33,7 +31,6 @@ public static function getAllowableEnumValues()
{
return [
self::NAME,
self::TYPE,
self::UPDATED_AT,
self::CREATED_AT,
];
Expand Down

0 comments on commit f7047c6

Please sign in to comment.