Skip to content

Commit f379fe6

Browse files
feat(specs): document runMetadata parameter (generated)
algolia/api-clients-automation#5087 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Devin Beeuwkes <[email protected]>
1 parent e78cc8d commit f379fe6

File tree

5 files changed

+29
-2
lines changed

5 files changed

+29
-2
lines changed

packages/ingestion/model/clientMethodProps.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import type { RunSortKeys } from '../model/runSortKeys';
2323
import type { RunSourcePayload } from '../model/runSourcePayload';
2424

2525
import type { RunStatus } from '../model/runStatus';
26+
import type { RunTaskPayload } from '../model/runTaskPayload';
2627
import type { RunType } from '../model/runType';
2728

2829
import type { SourceSortKeys } from '../model/sourceSortKeys';
@@ -637,6 +638,10 @@ export type RunTaskProps = {
637638
* Unique identifier of a task.
638639
*/
639640
taskID: string;
641+
/**
642+
*
643+
*/
644+
runTaskPayload?: RunTaskPayload | undefined;
640645
};
641646

642647
/**
@@ -647,6 +652,10 @@ export type RunTaskV1Props = {
647652
* Unique identifier of a task.
648653
*/
649654
taskID: string;
655+
/**
656+
*
657+
*/
658+
runTaskPayload?: RunTaskPayload | undefined;
650659
};
651660

652661
/**

packages/ingestion/model/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export * from './runSortKeys';
8585
export * from './runSourcePayload';
8686
export * from './runSourceResponse';
8787
export * from './runStatus';
88+
export * from './runTaskPayload';
8889
export * from './runType';
8990
export * from './scheduleTrigger';
9091
export * from './scheduleTriggerInput';

packages/ingestion/model/runSourcePayload.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ export type RunSourcePayload = {
1919
entityIDs?: Array<string> | undefined;
2020

2121
entityType?: EntityType | undefined;
22+
23+
/**
24+
* Additional information that will be passed to the created runs.
25+
*/
26+
runMetadata?: { [key: string]: any } | undefined;
2227
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
export type RunTaskPayload = {
4+
/**
5+
* Additional information that will be passed to the created run.
6+
*/
7+
runMetadata?: { [key: string]: any } | undefined;
8+
};

packages/ingestion/src/ingestionClient.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,9 +1949,10 @@ export function createIngestionClient({
19491949
* - editSettings
19501950
* @param runTask - The runTask object.
19511951
* @param runTask.taskID - Unique identifier of a task.
1952+
* @param runTask.runTaskPayload -
19521953
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
19531954
*/
1954-
runTask({ taskID }: RunTaskProps, requestOptions?: RequestOptions): Promise<RunResponse> {
1955+
runTask({ taskID, runTaskPayload }: RunTaskProps, requestOptions?: RequestOptions): Promise<RunResponse> {
19551956
if (!taskID) {
19561957
throw new Error('Parameter `taskID` is required when calling `runTask`.');
19571958
}
@@ -1965,6 +1966,7 @@ export function createIngestionClient({
19651966
path: requestPath,
19661967
queryParameters,
19671968
headers,
1969+
data: runTaskPayload ? runTaskPayload : {},
19681970
};
19691971

19701972
return transporter.request(request, requestOptions);
@@ -1981,9 +1983,10 @@ export function createIngestionClient({
19811983
* @deprecated
19821984
* @param runTaskV1 - The runTaskV1 object.
19831985
* @param runTaskV1.taskID - Unique identifier of a task.
1986+
* @param runTaskV1.runTaskPayload -
19841987
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
19851988
*/
1986-
runTaskV1({ taskID }: RunTaskV1Props, requestOptions?: RequestOptions): Promise<RunResponse> {
1989+
runTaskV1({ taskID, runTaskPayload }: RunTaskV1Props, requestOptions?: RequestOptions): Promise<RunResponse> {
19871990
if (!taskID) {
19881991
throw new Error('Parameter `taskID` is required when calling `runTaskV1`.');
19891992
}
@@ -1997,6 +2000,7 @@ export function createIngestionClient({
19972000
path: requestPath,
19982001
queryParameters,
19992002
headers,
2003+
data: runTaskPayload ? runTaskPayload : {},
20002004
};
20012005

20022006
return transporter.request(request, requestOptions);

0 commit comments

Comments
 (0)