@algolia/ingestion 1.25.0 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse
41
41
  ### With a package manager
42
42
 
43
43
  ```bash
44
- yarn add @algolia/ingestion@1.25.0
44
+ yarn add @algolia/ingestion@1.26.0
45
45
  # or
46
- npm install @algolia/ingestion@1.25.0
46
+ npm install @algolia/ingestion@1.26.0
47
47
  # or
48
- pnpm add @algolia/ingestion@1.25.0
48
+ pnpm add @algolia/ingestion@1.26.0
49
49
  ```
50
50
 
51
51
  ### Without a package manager
@@ -53,7 +53,7 @@ pnpm add @algolia/ingestion@1.25.0
53
53
  Add the following JavaScript snippet to the <head> of your website:
54
54
 
55
55
  ```html
56
- <script src="https://cdn.jsdelivr.net/npm/@algolia/ingestion@1.25.0/dist/builds/browser.umd.js"></script>
56
+ <script src="https://cdn.jsdelivr.net/npm/@algolia/ingestion@1.26.0/dist/builds/browser.umd.js"></script>
57
57
  ```
58
58
 
59
59
  ### Usage
package/dist/browser.d.ts CHANGED
@@ -1028,6 +1028,33 @@ type ListTasksResponseV1 = {
1028
1028
  pagination: Pagination;
1029
1029
  };
1030
1030
 
1031
+ /**
1032
+ * Input for a transformation that contains the source code of the transformation.
1033
+ */
1034
+ type TransformationCode = {
1035
+ /**
1036
+ * The source code of the transformation.
1037
+ */
1038
+ code: string;
1039
+ };
1040
+
1041
+ /**
1042
+ * Input for a no-code transformation that contains a series of steps.
1043
+ */
1044
+ type TransformationNoCode = {
1045
+ steps: Array<Record<string, unknown>>;
1046
+ };
1047
+
1048
+ /**
1049
+ * The input for the transformation, which can be either code or a no-code configuration.
1050
+ */
1051
+ type TransformationInput = TransformationCode | TransformationNoCode;
1052
+
1053
+ /**
1054
+ * The type of transformation, which can be either \'code\' or \'noCode\'.
1055
+ */
1056
+ type TransformationType = 'code' | 'noCode';
1057
+
1031
1058
  type Transformation = {
1032
1059
  /**
1033
1060
  * Universally unique identifier (UUID) of a transformation.
@@ -1038,9 +1065,11 @@ type Transformation = {
1038
1065
  */
1039
1066
  authenticationIDs?: Array<string>;
1040
1067
  /**
1041
- * The source code of the transformation.
1068
+ * It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code.
1042
1069
  */
1043
1070
  code: string;
1071
+ type?: TransformationType;
1072
+ input?: TransformationInput;
1044
1073
  /**
1045
1074
  * The uniquely identified name of your transformation.
1046
1075
  */
@@ -1334,13 +1363,15 @@ type TaskUpdateResponse = {
1334
1363
  */
1335
1364
  type TransformationCreate = {
1336
1365
  /**
1337
- * The source code of the transformation.
1366
+ * It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code.
1338
1367
  */
1339
- code: string;
1368
+ code?: string;
1340
1369
  /**
1341
1370
  * The uniquely identified name of your transformation.
1342
1371
  */
1343
1372
  name: string;
1373
+ type: TransformationType;
1374
+ input: TransformationInput;
1344
1375
  /**
1345
1376
  * A descriptive name for your transformation of what it does.
1346
1377
  */
@@ -1371,7 +1402,7 @@ type TransformationSearch = {
1371
1402
 
1372
1403
  type TransformationTry = {
1373
1404
  /**
1374
- * The source code of the transformation.
1405
+ * It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code.
1375
1406
  */
1376
1407
  code: string;
1377
1408
  /**
@@ -1422,6 +1453,10 @@ type WatchResponse = {
1422
1453
  * Universally unique identifier (UUID) of a task run.
1423
1454
  */
1424
1455
  runID: string;
1456
+ /**
1457
+ * Universally unique identifier (UUID) of an event.
1458
+ */
1459
+ eventID?: string;
1425
1460
  /**
1426
1461
  * when used with discovering or validating sources, the sampled data of your source is returned.
1427
1462
  */
@@ -1434,6 +1469,10 @@ type WatchResponse = {
1434
1469
  * a message describing the outcome of a validate run.
1435
1470
  */
1436
1471
  message?: string;
1472
+ /**
1473
+ * Date of creation in RFC 3339 format.
1474
+ */
1475
+ createdAt?: string;
1437
1476
  };
1438
1477
 
1439
1478
  /**
@@ -2169,6 +2208,20 @@ type ListTransformationsProps = {
2169
2208
  */
2170
2209
  order?: OrderKeys;
2171
2210
  };
2211
+ /**
2212
+ * Properties for the `push` method.
2213
+ */
2214
+ type PushProps = {
2215
+ /**
2216
+ * Name of the index on which to perform the operation.
2217
+ */
2218
+ indexName: string;
2219
+ pushTaskPayload: PushTaskPayload;
2220
+ /**
2221
+ * When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
2222
+ */
2223
+ watch?: boolean;
2224
+ };
2172
2225
  /**
2173
2226
  * Properties for the `pushTask` method.
2174
2227
  */
@@ -2177,9 +2230,6 @@ type PushTaskProps = {
2177
2230
  * Unique identifier of a task.
2178
2231
  */
2179
2232
  taskID: string;
2180
- /**
2181
- * Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
2182
- */
2183
2233
  pushTaskPayload: PushTaskPayload;
2184
2234
  /**
2185
2235
  * When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
@@ -2307,7 +2357,7 @@ type ValidateSourceBeforeUpdateProps = {
2307
2357
  sourceUpdate: SourceUpdate;
2308
2358
  };
2309
2359
 
2310
- declare const apiClientVersion = "1.25.0";
2360
+ declare const apiClientVersion = "1.26.0";
2311
2361
  declare const REGIONS: readonly ["eu", "us"];
2312
2362
  type Region = (typeof REGIONS)[number];
2313
2363
  type RegionOptions = {
@@ -2817,7 +2867,21 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2817
2867
  */
2818
2868
  listTransformations({ itemsPerPage, page, sort, order }?: ListTransformationsProps, requestOptions?: RequestOptions | undefined): Promise<ListTransformationsResponse>;
2819
2869
  /**
2820
- * Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
2870
+ * Pushes records through the Pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints and/or debugger dashboard to see the status of your task. If you want to leverage the [pre-indexing data transformation](https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/how-to/transform-your-data/), this is the recommended way of ingesting your records. This method is similar to `pushTask`, but requires an `indexName` instead of a `taskID`. If zero or many tasks are found, an error will be returned.
2871
+ *
2872
+ * Required API Key ACLs:
2873
+ * - addObject
2874
+ * - deleteIndex
2875
+ * - editSettings
2876
+ * @param push - The push object.
2877
+ * @param push.indexName - Name of the index on which to perform the operation.
2878
+ * @param push.pushTaskPayload - The pushTaskPayload object.
2879
+ * @param push.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
2880
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2881
+ */
2882
+ push({ indexName, pushTaskPayload, watch }: PushProps, requestOptions?: RequestOptions): Promise<WatchResponse>;
2883
+ /**
2884
+ * Pushes records through the Pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints and/or debugger dashboard to see the status of your task. If you want to leverage the [pre-indexing data transformation](https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/how-to/transform-your-data/), this is the recommended way of ingesting your records. This method is similar to `push`, but requires a `taskID` instead of a `indexName`, which is useful when many `destinations` target the same `indexName`.
2821
2885
  *
2822
2886
  * Required API Key ACLs:
2823
2887
  * - addObject
@@ -2825,7 +2889,7 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2825
2889
  * - editSettings
2826
2890
  * @param pushTask - The pushTask object.
2827
2891
  * @param pushTask.taskID - Unique identifier of a task.
2828
- * @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
2892
+ * @param pushTask.pushTaskPayload - The pushTaskPayload object.
2829
2893
  * @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
2830
2894
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2831
2895
  */
@@ -3074,4 +3138,4 @@ type ErrorBase = Record<string, any> & {
3074
3138
  declare function ingestionClient(appId: string, apiKey: string, region: Region, options?: ClientOptions): IngestionClient;
3075
3139
  type IngestionClient = ReturnType<typeof createIngestionClient>;
3076
3140
 
3077
- export { type Action, type ActionType, type AuthAPIKey, type AuthAPIKeyPartial, type AuthAlgolia, type AuthAlgoliaInsights, type AuthAlgoliaInsightsPartial, type AuthAlgoliaPartial, type AuthBasic, type AuthBasicPartial, type AuthGoogleServiceAccount, type AuthGoogleServiceAccountPartial, type AuthInput, type AuthInputPartial, type AuthOAuth, type AuthOAuthPartial, type Authentication, type AuthenticationCreate, type AuthenticationCreateResponse, type AuthenticationSearch, type AuthenticationSortKeys, type AuthenticationType, type AuthenticationUpdate, type AuthenticationUpdateResponse, type BigCommerceChannel, type BigCommerceMetafield, type BigQueryDataType, type CommercetoolsCustomFields, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteAuthenticationProps, type DeleteDestinationProps, type DeleteResponse, type DeleteSourceProps, type DeleteTaskProps, type DeleteTaskV1Props, type DeleteTransformationProps, type Destination, type DestinationCreate, type DestinationCreateResponse, type DestinationInput, type DestinationSearch, type DestinationSortKeys, type DestinationType, type DestinationUpdate, type DestinationUpdateResponse, type DisableTaskProps, type DisableTaskV1Props, type DockerStreams, type DockerStreamsInput, type DockerStreamsSyncMode, type EmailNotifications, type EnableTaskProps, type EnableTaskV1Props, type EntityType, type ErrorBase, type Event, type EventSortKeys, type EventStatus, type EventType, type GetAuthenticationProps, type GetDestinationProps, type GetEventProps, type GetRunProps, type GetSourceProps, type GetTaskProps, type GetTaskV1Props, type GetTransformationProps, type IngestionClient, type ListAuthenticationsProps, type ListAuthenticationsResponse, type ListDestinationsProps, type ListDestinationsResponse, type ListEventsProps, type ListEventsResponse, type ListRunsProps, type ListSourcesProps, type ListSourcesResponse, type ListTasksProps, type ListTasksResponse, type ListTasksResponseV1, type ListTasksV1Props, type ListTransformationsProps, type ListTransformationsResponse, type MappingFieldDirective, type MappingFormatSchema, type MappingInput, type MappingKitAction, type MappingTypeCSV, type MethodType, type Notifications, type OnDemandTrigger, type OnDemandTriggerInput, type OnDemandTriggerType, type OrderKeys, type Pagination, type Platform, type PlatformNone, type PlatformWithNone, type Policies, type PushTaskPayload, type PushTaskProps, type PushTaskRecords, type RecordType, type Region, type RegionOptions, type Run, type RunListResponse, type RunOutcome, type RunProgress, type RunReasonCode, type RunResponse, type RunSortKeys, type RunSourcePayload, type RunSourceProps, type RunSourceResponse, type RunStatus, type RunTaskProps, type RunTaskV1Props, type RunType, type ScheduleTrigger, type ScheduleTriggerInput, type ScheduleTriggerType, type ShopifyInput, type ShopifyMarket, type ShopifyMetafield, type Source, type SourceBigCommerce, type SourceBigQuery, type SourceCSV, type SourceCommercetools, type SourceCreate, type SourceCreateResponse, type SourceDocker, type SourceGA4BigQueryExport, type SourceInput, type SourceJSON, type SourceSearch, type SourceShopify, type SourceShopifyBase, type SourceSortKeys, type SourceType, type SourceUpdate, type SourceUpdateCommercetools, type SourceUpdateDocker, type SourceUpdateInput, type SourceUpdateResponse, type SourceUpdateShopify, type StreamingInput, type StreamingTrigger, type StreamingTriggerType, type SubscriptionTrigger, type SubscriptionTriggerType, type Task, type TaskCreate, type TaskCreateResponse, type TaskCreateTrigger, type TaskCreateV1, type TaskInput, type TaskSearch, type TaskSortKeys, type TaskUpdate, type TaskUpdateResponse, type TaskUpdateV1, type TaskV1, type Transformation, type TransformationCreate, type TransformationCreateResponse, type TransformationError, type TransformationSearch, type TransformationSortKeys, type TransformationTry, type TransformationTryResponse, type TransformationUpdateResponse, type Trigger, type TriggerDockerSourceDiscoverProps, type TriggerType, type TriggerUpdateInput, type TryTransformationBeforeUpdateProps, type UpdateAuthenticationProps, type UpdateDestinationProps, type UpdateSourceProps, type UpdateTaskProps, type UpdateTaskV1Props, type UpdateTransformationProps, type ValidateSourceBeforeUpdateProps, type WatchResponse, type Window, apiClientVersion, ingestionClient, isOnDemandTrigger, isScheduleTrigger, isSubscriptionTrigger };
3141
+ export { type Action, type ActionType, type AuthAPIKey, type AuthAPIKeyPartial, type AuthAlgolia, type AuthAlgoliaInsights, type AuthAlgoliaInsightsPartial, type AuthAlgoliaPartial, type AuthBasic, type AuthBasicPartial, type AuthGoogleServiceAccount, type AuthGoogleServiceAccountPartial, type AuthInput, type AuthInputPartial, type AuthOAuth, type AuthOAuthPartial, type Authentication, type AuthenticationCreate, type AuthenticationCreateResponse, type AuthenticationSearch, type AuthenticationSortKeys, type AuthenticationType, type AuthenticationUpdate, type AuthenticationUpdateResponse, type BigCommerceChannel, type BigCommerceMetafield, type BigQueryDataType, type CommercetoolsCustomFields, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteAuthenticationProps, type DeleteDestinationProps, type DeleteResponse, type DeleteSourceProps, type DeleteTaskProps, type DeleteTaskV1Props, type DeleteTransformationProps, type Destination, type DestinationCreate, type DestinationCreateResponse, type DestinationInput, type DestinationSearch, type DestinationSortKeys, type DestinationType, type DestinationUpdate, type DestinationUpdateResponse, type DisableTaskProps, type DisableTaskV1Props, type DockerStreams, type DockerStreamsInput, type DockerStreamsSyncMode, type EmailNotifications, type EnableTaskProps, type EnableTaskV1Props, type EntityType, type ErrorBase, type Event, type EventSortKeys, type EventStatus, type EventType, type GetAuthenticationProps, type GetDestinationProps, type GetEventProps, type GetRunProps, type GetSourceProps, type GetTaskProps, type GetTaskV1Props, type GetTransformationProps, type IngestionClient, type ListAuthenticationsProps, type ListAuthenticationsResponse, type ListDestinationsProps, type ListDestinationsResponse, type ListEventsProps, type ListEventsResponse, type ListRunsProps, type ListSourcesProps, type ListSourcesResponse, type ListTasksProps, type ListTasksResponse, type ListTasksResponseV1, type ListTasksV1Props, type ListTransformationsProps, type ListTransformationsResponse, type MappingFieldDirective, type MappingFormatSchema, type MappingInput, type MappingKitAction, type MappingTypeCSV, type MethodType, type Notifications, type OnDemandTrigger, type OnDemandTriggerInput, type OnDemandTriggerType, type OrderKeys, type Pagination, type Platform, type PlatformNone, type PlatformWithNone, type Policies, type PushProps, type PushTaskPayload, type PushTaskProps, type PushTaskRecords, type RecordType, type Region, type RegionOptions, type Run, type RunListResponse, type RunOutcome, type RunProgress, type RunReasonCode, type RunResponse, type RunSortKeys, type RunSourcePayload, type RunSourceProps, type RunSourceResponse, type RunStatus, type RunTaskProps, type RunTaskV1Props, type RunType, type ScheduleTrigger, type ScheduleTriggerInput, type ScheduleTriggerType, type ShopifyInput, type ShopifyMarket, type ShopifyMetafield, type Source, type SourceBigCommerce, type SourceBigQuery, type SourceCSV, type SourceCommercetools, type SourceCreate, type SourceCreateResponse, type SourceDocker, type SourceGA4BigQueryExport, type SourceInput, type SourceJSON, type SourceSearch, type SourceShopify, type SourceShopifyBase, type SourceSortKeys, type SourceType, type SourceUpdate, type SourceUpdateCommercetools, type SourceUpdateDocker, type SourceUpdateInput, type SourceUpdateResponse, type SourceUpdateShopify, type StreamingInput, type StreamingTrigger, type StreamingTriggerType, type SubscriptionTrigger, type SubscriptionTriggerType, type Task, type TaskCreate, type TaskCreateResponse, type TaskCreateTrigger, type TaskCreateV1, type TaskInput, type TaskSearch, type TaskSortKeys, type TaskUpdate, type TaskUpdateResponse, type TaskUpdateV1, type TaskV1, type Transformation, type TransformationCode, type TransformationCreate, type TransformationCreateResponse, type TransformationError, type TransformationInput, type TransformationNoCode, type TransformationSearch, type TransformationSortKeys, type TransformationTry, type TransformationTryResponse, type TransformationType, type TransformationUpdateResponse, type Trigger, type TriggerDockerSourceDiscoverProps, type TriggerType, type TriggerUpdateInput, type TryTransformationBeforeUpdateProps, type UpdateAuthenticationProps, type UpdateDestinationProps, type UpdateSourceProps, type UpdateTaskProps, type UpdateTaskV1Props, type UpdateTransformationProps, type ValidateSourceBeforeUpdateProps, type WatchResponse, type Window, apiClientVersion, ingestionClient, isOnDemandTrigger, isScheduleTrigger, isSubscriptionTrigger };
@@ -9,7 +9,7 @@ import {
9
9
 
10
10
  // src/ingestionClient.ts
11
11
  import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
12
- var apiClientVersion = "1.25.0";
12
+ var apiClientVersion = "1.26.0";
13
13
  var REGIONS = ["eu", "us"];
14
14
  function getDefaultHosts(region) {
15
15
  const url = "data.{region}.algolia.com".replace("{region}", region);
@@ -271,12 +271,15 @@ function createIngestionClient({
271
271
  if (!transformationCreate) {
272
272
  throw new Error("Parameter `transformationCreate` is required when calling `createTransformation`.");
273
273
  }
274
- if (!transformationCreate.code) {
275
- throw new Error("Parameter `transformationCreate.code` is required when calling `createTransformation`.");
276
- }
277
274
  if (!transformationCreate.name) {
278
275
  throw new Error("Parameter `transformationCreate.name` is required when calling `createTransformation`.");
279
276
  }
277
+ if (!transformationCreate.type) {
278
+ throw new Error("Parameter `transformationCreate.type` is required when calling `createTransformation`.");
279
+ }
280
+ if (!transformationCreate.input) {
281
+ throw new Error("Parameter `transformationCreate.input` is required when calling `createTransformation`.");
282
+ }
280
283
  const requestPath = "/1/transformations";
281
284
  const headers = {};
282
285
  const queryParameters = {};
@@ -1299,7 +1302,56 @@ function createIngestionClient({
1299
1302
  return transporter.request(request, requestOptions);
1300
1303
  },
1301
1304
  /**
1302
- * Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
1305
+ * Pushes records through the Pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints and/or debugger dashboard to see the status of your task. If you want to leverage the [pre-indexing data transformation](https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/how-to/transform-your-data/), this is the recommended way of ingesting your records. This method is similar to `pushTask`, but requires an `indexName` instead of a `taskID`. If zero or many tasks are found, an error will be returned.
1306
+ *
1307
+ * Required API Key ACLs:
1308
+ * - addObject
1309
+ * - deleteIndex
1310
+ * - editSettings
1311
+ * @param push - The push object.
1312
+ * @param push.indexName - Name of the index on which to perform the operation.
1313
+ * @param push.pushTaskPayload - The pushTaskPayload object.
1314
+ * @param push.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
1315
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1316
+ */
1317
+ push({ indexName, pushTaskPayload, watch }, requestOptions) {
1318
+ if (!indexName) {
1319
+ throw new Error("Parameter `indexName` is required when calling `push`.");
1320
+ }
1321
+ if (!pushTaskPayload) {
1322
+ throw new Error("Parameter `pushTaskPayload` is required when calling `push`.");
1323
+ }
1324
+ if (!pushTaskPayload.action) {
1325
+ throw new Error("Parameter `pushTaskPayload.action` is required when calling `push`.");
1326
+ }
1327
+ if (!pushTaskPayload.records) {
1328
+ throw new Error("Parameter `pushTaskPayload.records` is required when calling `push`.");
1329
+ }
1330
+ const requestPath = "/1/push/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
1331
+ const headers = {};
1332
+ const queryParameters = {};
1333
+ if (watch !== void 0) {
1334
+ queryParameters["watch"] = watch.toString();
1335
+ }
1336
+ const request = {
1337
+ method: "POST",
1338
+ path: requestPath,
1339
+ queryParameters,
1340
+ headers,
1341
+ data: pushTaskPayload
1342
+ };
1343
+ requestOptions = {
1344
+ timeouts: {
1345
+ connect: 18e4,
1346
+ read: 18e4,
1347
+ write: 18e4,
1348
+ ...requestOptions?.timeouts
1349
+ }
1350
+ };
1351
+ return transporter.request(request, requestOptions);
1352
+ },
1353
+ /**
1354
+ * Pushes records through the Pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints and/or debugger dashboard to see the status of your task. If you want to leverage the [pre-indexing data transformation](https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/how-to/transform-your-data/), this is the recommended way of ingesting your records. This method is similar to `push`, but requires a `taskID` instead of a `indexName`, which is useful when many `destinations` target the same `indexName`.
1303
1355
  *
1304
1356
  * Required API Key ACLs:
1305
1357
  * - addObject
@@ -1307,7 +1359,7 @@ function createIngestionClient({
1307
1359
  * - editSettings
1308
1360
  * @param pushTask - The pushTask object.
1309
1361
  * @param pushTask.taskID - Unique identifier of a task.
1310
- * @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
1362
+ * @param pushTask.pushTaskPayload - The pushTaskPayload object.
1311
1363
  * @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
1312
1364
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1313
1365
  */
@@ -1884,12 +1936,15 @@ function createIngestionClient({
1884
1936
  if (!transformationCreate) {
1885
1937
  throw new Error("Parameter `transformationCreate` is required when calling `updateTransformation`.");
1886
1938
  }
1887
- if (!transformationCreate.code) {
1888
- throw new Error("Parameter `transformationCreate.code` is required when calling `updateTransformation`.");
1889
- }
1890
1939
  if (!transformationCreate.name) {
1891
1940
  throw new Error("Parameter `transformationCreate.name` is required when calling `updateTransformation`.");
1892
1941
  }
1942
+ if (!transformationCreate.type) {
1943
+ throw new Error("Parameter `transformationCreate.type` is required when calling `updateTransformation`.");
1944
+ }
1945
+ if (!transformationCreate.input) {
1946
+ throw new Error("Parameter `transformationCreate.input` is required when calling `updateTransformation`.");
1947
+ }
1893
1948
  const requestPath = "/1/transformations/{transformationID}".replace(
1894
1949
  "{transformationID}",
1895
1950
  encodeURIComponent(transformationID)