Skip to content

Commit

Permalink
fix(specs): add sourceType to listTasks [skip-bc] (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4193

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Pierre Millot <millotpierre3@gmail.com>
  • Loading branch information
algolia-bot and millotp committed Dec 3, 2024
1 parent e21db1c commit 3505be0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/ingestion/model/clientMethodProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,10 @@ export type ListTasksProps = {
* Source IDs for filtering the list of tasks.
*/
sourceID?: Array<string>;
/**
* Filters the tasks with the specified source type.
*/
sourceType?: Array<SourceType>;
/**
* Destination IDs for filtering the list of tasks.
*/
Expand Down
18 changes: 17 additions & 1 deletion packages/ingestion/src/ingestionClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1484,14 +1484,26 @@ export function createIngestionClient({
* @param listTasks.action - Actions for filtering the list of tasks.
* @param listTasks.enabled - Whether to filter the list of tasks by the `enabled` status.
* @param listTasks.sourceID - Source IDs for filtering the list of tasks.
* @param listTasks.sourceType - Filters the tasks with the specified source type.
* @param listTasks.destinationID - Destination IDs for filtering the list of tasks.
* @param listTasks.triggerType - Type of task trigger for filtering the list of tasks.
* @param listTasks.sort - Property by which to sort the list of tasks.
* @param listTasks.order - Sort order of the response, ascending or descending.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
listTasks(
{ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order }: ListTasksProps = {},
{
itemsPerPage,
page,
action,
enabled,
sourceID,
sourceType,
destinationID,
triggerType,
sort,
order,
}: ListTasksProps = {},
requestOptions: RequestOptions | undefined = undefined,
): Promise<ListTasksResponse> {
const requestPath = '/2/tasks';
Expand All @@ -1518,6 +1530,10 @@ export function createIngestionClient({
queryParameters['sourceID'] = sourceID.toString();
}

if (sourceType !== undefined) {
queryParameters['sourceType'] = sourceType.toString();
}

if (destinationID !== undefined) {
queryParameters['destinationID'] = destinationID.toString();
}
Expand Down

0 comments on commit 3505be0

Please sign in to comment.