Skip to content

Commit c98fd97

Browse files
feat(specs): allow filtering transformations type (generated)
algolia/api-clients-automation#5363 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent e0c4127 commit c98fd97

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

packages/ingestion/model/clientMethodProps.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ import type { TransformationCreate } from '../model/transformationCreate';
4242
import type { TransformationSortKeys } from '../model/transformationSortKeys';
4343
import type { TransformationTry } from '../model/transformationTry';
4444

45+
import type { TransformationType } from '../model/transformationType';
46+
4547
import type { TriggerType } from '../model/triggerType';
4648

4749
/**
@@ -582,6 +584,10 @@ export type ListTransformationsProps = {
582584
* Sort order of the response, ascending or descending.
583585
*/
584586
order?: OrderKeys | undefined;
587+
/**
588+
* Whether to filter the list of transformations by the type of transformation.
589+
*/
590+
type?: TransformationType | undefined;
585591
};
586592

587593
/**

packages/ingestion/src/ingestionClient.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import type { TransformationSearch } from '../model/transformationSearch';
6464

6565
import type { TransformationTry } from '../model/transformationTry';
6666
import type { TransformationTryResponse } from '../model/transformationTryResponse';
67+
6768
import type { TransformationUpdateResponse } from '../model/transformationUpdateResponse';
6869

6970
import type { WatchResponse } from '../model/watchResponse';
@@ -1752,10 +1753,11 @@ export function createIngestionClient({
17521753
* @param listTransformations.page - Page number of the paginated API response.
17531754
* @param listTransformations.sort - Property by which to sort the list of transformations.
17541755
* @param listTransformations.order - Sort order of the response, ascending or descending.
1756+
* @param listTransformations.type - Whether to filter the list of transformations by the type of transformation.
17551757
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
17561758
*/
17571759
listTransformations(
1758-
{ itemsPerPage, page, sort, order }: ListTransformationsProps = {},
1760+
{ itemsPerPage, page, sort, order, type }: ListTransformationsProps = {},
17591761
requestOptions: RequestOptions | undefined = undefined,
17601762
): Promise<ListTransformationsResponse> {
17611763
const requestPath = '/1/transformations';
@@ -1778,6 +1780,10 @@ export function createIngestionClient({
17781780
queryParameters['order'] = order.toString();
17791781
}
17801782

1783+
if (type !== undefined) {
1784+
queryParameters['type'] = type.toString();
1785+
}
1786+
17811787
const request: Request = {
17821788
method: 'GET',
17831789
path: requestPath,

0 commit comments

Comments
 (0)