File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,16 @@ export type GetApiKeyProps = {
305
305
key : string ;
306
306
} ;
307
307
308
+ /**
309
+ * Properties for the `getAppTask` method.
310
+ */
311
+ export type GetAppTaskProps = {
312
+ /**
313
+ * Unique task identifier.
314
+ */
315
+ taskID : number ;
316
+ } ;
317
+
308
318
/**
309
319
* Properties for the `getLogs` method.
310
320
*/
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ import type {
51
51
DeleteSourceProps ,
52
52
DeleteSynonymProps ,
53
53
GetApiKeyProps ,
54
+ GetAppTaskProps ,
54
55
GetLogsProps ,
55
56
GetObjectProps ,
56
57
GetRuleProps ,
@@ -1555,6 +1556,43 @@ export function createSearchClient({
1555
1556
return transporter . request ( request , requestOptions ) ;
1556
1557
} ,
1557
1558
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
+
1558
1596
/**
1559
1597
* Lists supported languages with their supported dictionary types and number of custom entries.
1560
1598
*
You can’t perform that action at this time.
0 commit comments