Skip to content

Commit 47b97d9

Browse files
fix(specs): enable watcher for push [skip-bc] (generated)
algolia/api-clients-automation#4229 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 4f1e74e commit 47b97d9

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

packages/ingestion/model/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ export * from './sourceUpdateDocker';
114114
export * from './sourceUpdateInput';
115115
export * from './sourceUpdateResponse';
116116
export * from './sourceUpdateShopify';
117-
export * from './sourceWatchResponse';
118117
export * from './streamingInput';
119118
export * from './streamingTrigger';
120119
export * from './streamingTriggerType';
@@ -144,4 +143,5 @@ export * from './transformationUpdateResponse';
144143
export * from './trigger';
145144
export * from './triggerType';
146145
export * from './triggerUpdateInput';
146+
export * from './watchResponse';
147147
export * from './window';

packages/ingestion/model/sourceWatchResponse.ts renamed to packages/ingestion/model/watchResponse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
import type { Event } from './event';
44

5-
export type SourceWatchResponse = {
5+
export type WatchResponse = {
66
/**
77
* Universally unique identifier (UUID) of a task run.
88
*/
99
runID?: string;
1010

1111
/**
12-
* depending on the source type, the validation returns sampling data of your source (JSON, CSV, BigQuery).
12+
* when used with discovering or validating sources, the sampled data of your source is returned.
1313
*/
1414
data?: Array<Record<string, unknown>>;
1515

packages/ingestion/src/ingestionClient.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ import type { SourceCreateResponse } from '../model/sourceCreateResponse';
4646
import type { SourceSearch } from '../model/sourceSearch';
4747

4848
import type { SourceUpdateResponse } from '../model/sourceUpdateResponse';
49-
import type { SourceWatchResponse } from '../model/sourceWatchResponse';
5049
import type { Task } from '../model/task';
5150
import type { TaskCreate } from '../model/taskCreate';
5251
import type { TaskCreateResponse } from '../model/taskCreateResponse';
@@ -65,6 +64,8 @@ import type { TransformationTry } from '../model/transformationTry';
6564
import type { TransformationTryResponse } from '../model/transformationTryResponse';
6665
import type { TransformationUpdateResponse } from '../model/transformationUpdateResponse';
6766

67+
import type { WatchResponse } from '../model/watchResponse';
68+
6869
import type {
6970
CustomDeleteProps,
7071
CustomGetProps,
@@ -1694,7 +1695,10 @@ export function createIngestionClient({
16941695
* @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
16951696
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
16961697
*/
1697-
pushTask({ taskID, pushTaskPayload, watch }: PushTaskProps, requestOptions?: RequestOptions): Promise<RunResponse> {
1698+
pushTask(
1699+
{ taskID, pushTaskPayload, watch }: PushTaskProps,
1700+
requestOptions?: RequestOptions,
1701+
): Promise<WatchResponse> {
16981702
if (!taskID) {
16991703
throw new Error('Parameter `taskID` is required when calling `pushTask`.');
17001704
}
@@ -2055,7 +2059,7 @@ export function createIngestionClient({
20552059
triggerDockerSourceDiscover(
20562060
{ sourceID }: TriggerDockerSourceDiscoverProps,
20572061
requestOptions?: RequestOptions,
2058-
): Promise<SourceWatchResponse> {
2062+
): Promise<WatchResponse> {
20592063
if (!sourceID) {
20602064
throw new Error('Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.');
20612065
}
@@ -2410,7 +2414,7 @@ export function createIngestionClient({
24102414
validateSource(
24112415
sourceCreate: SourceCreate,
24122416
requestOptions: RequestOptions | undefined = undefined,
2413-
): Promise<SourceWatchResponse> {
2417+
): Promise<WatchResponse> {
24142418
const requestPath = '/1/sources/validate';
24152419
const headers: Headers = {};
24162420
const queryParameters: QueryParameters = {};
@@ -2441,7 +2445,7 @@ export function createIngestionClient({
24412445
validateSourceBeforeUpdate(
24422446
{ sourceID, sourceUpdate }: ValidateSourceBeforeUpdateProps,
24432447
requestOptions?: RequestOptions,
2444-
): Promise<SourceWatchResponse> {
2448+
): Promise<WatchResponse> {
24452449
if (!sourceID) {
24462450
throw new Error('Parameter `sourceID` is required when calling `validateSourceBeforeUpdate`.');
24472451
}

0 commit comments

Comments
 (0)