Skip to content

Commit 573f054

Browse files
algolia-botmillotp
andcommitted
chore: generated code for commit fd5a312f. [skip ci]
algolia/api-clients-automation@fd5a312 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 758fdfa commit 573f054

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

packages/client-search/model/clientMethodProps.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,16 @@ export type GetApiKeyProps = {
305305
key: string;
306306
};
307307

308+
/**
309+
* Properties for the `getAppTask` method.
310+
*/
311+
export type GetAppTaskProps = {
312+
/**
313+
* Unique task identifier.
314+
*/
315+
taskID: number;
316+
};
317+
308318
/**
309319
* Properties for the `getLogs` method.
310320
*/

packages/client-search/src/searchClient.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import type {
5151
DeleteSourceProps,
5252
DeleteSynonymProps,
5353
GetApiKeyProps,
54+
GetAppTaskProps,
5455
GetLogsProps,
5556
GetObjectProps,
5657
GetRuleProps,
@@ -1555,6 +1556,43 @@ export function createSearchClient({
15551556
return transporter.request(request, requestOptions);
15561557
},
15571558

1559+
/**
1560+
* Checks the status of a given application task.
1561+
*
1562+
* Required API Key ACLs:
1563+
* - editSettings.
1564+
*
1565+
* @param getAppTask - The getAppTask object.
1566+
* @param getAppTask.taskID - Unique task identifier.
1567+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1568+
*/
1569+
getAppTask(
1570+
{ taskID }: GetAppTaskProps,
1571+
requestOptions?: RequestOptions
1572+
): Promise<GetTaskResponse> {
1573+
if (!taskID) {
1574+
throw new Error(
1575+
'Parameter `taskID` is required when calling `getAppTask`.'
1576+
);
1577+
}
1578+
1579+
const requestPath = '/1/task/{taskID}'.replace(
1580+
'{taskID}',
1581+
encodeURIComponent(taskID)
1582+
);
1583+
const headers: Headers = {};
1584+
const queryParameters: QueryParameters = {};
1585+
1586+
const request: Request = {
1587+
method: 'GET',
1588+
path: requestPath,
1589+
queryParameters,
1590+
headers,
1591+
};
1592+
1593+
return transporter.request(request, requestOptions);
1594+
},
1595+
15581596
/**
15591597
* Lists supported languages with their supported dictionary types and number of custom entries.
15601598
*

0 commit comments

Comments
 (0)