@algolia/ingestion 1.35.0 → 1.37.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/dist/fetch.d.ts CHANGED
@@ -1478,7 +1478,7 @@ type WatchResponse = {
1478
1478
  };
1479
1479
 
1480
1480
  /**
1481
- * Type of indexing operation.
1481
+ * Which indexing operation to perform: - `addObject`: adds records to an index. Equivalent to the \"Add a new record (with auto-generated object ID)\" operation. - `updateObject`: adds or replaces records in an index. Equivalent to the \"Add or replace a record\" operation. - `partialUpdateObject`: adds or updates attributes within records. Equivalent to the \"Add or update attributes\" operation with the `createIfNoExists` parameter set to true. (If a record with the specified `objectID` doesn\'t exist in the specified index, this action creates adds the record to the index) - `partialUpdateObjectNoCreate`: same as `partialUpdateObject`, but with `createIfNoExists` set to false. (A record isn\'t added to the index if its `objectID` doesn\'t exist) - `deleteObject`: delete records from an index. Equivalent to the \"Delete a record\" operation. - `delete`. Delete an index. Equivalent to the \"Delete an index\" operation. - `clear`: delete all records from an index. Equivalent to the \"Delete all records from an index operation\".
1482
1482
  */
1483
1483
  type Action = 'addObject' | 'updateObject' | 'partialUpdateObject' | 'partialUpdateObjectNoCreate' | 'deleteObject' | 'delete' | 'clear';
1484
1484
 
@@ -1636,13 +1636,44 @@ type SourceUpdate = {
1636
1636
  authenticationID?: string | undefined;
1637
1637
  };
1638
1638
 
1639
+ /**
1640
+ * API request body for updating a task.
1641
+ */
1642
+ type TaskReplace = {
1643
+ /**
1644
+ * Universally unique identifier (UUID) of a destination resource.
1645
+ */
1646
+ destinationID: string;
1647
+ action: ActionType;
1648
+ subscriptionAction?: ActionType | undefined;
1649
+ /**
1650
+ * Cron expression for the task\'s schedule.
1651
+ */
1652
+ cron?: string | undefined;
1653
+ /**
1654
+ * Whether the task is enabled.
1655
+ */
1656
+ enabled?: boolean | undefined;
1657
+ /**
1658
+ * Maximum accepted percentage of failures for a task run to finish successfully.
1659
+ */
1660
+ failureThreshold?: number | undefined;
1661
+ input?: TaskInput | undefined;
1662
+ /**
1663
+ * Date of the last cursor in RFC 3339 format.
1664
+ */
1665
+ cursor?: string | undefined;
1666
+ notifications?: Notifications | undefined;
1667
+ policies?: Policies | undefined;
1668
+ };
1669
+
1639
1670
  /**
1640
1671
  * Property by which to sort the list of tasks.
1641
1672
  */
1642
1673
  type TaskSortKeys = 'enabled' | 'triggerType' | 'action' | 'updatedAt' | 'createdAt';
1643
1674
 
1644
1675
  /**
1645
- * API request body for updating a task.
1676
+ * API request body for partially updating a task.
1646
1677
  */
1647
1678
  type TaskUpdate = {
1648
1679
  /**
@@ -2257,6 +2288,16 @@ type PushTaskProps = {
2257
2288
  */
2258
2289
  watch?: boolean | undefined;
2259
2290
  };
2291
+ /**
2292
+ * Properties for the `replaceTask` method.
2293
+ */
2294
+ type ReplaceTaskProps = {
2295
+ /**
2296
+ * Unique identifier of a task.
2297
+ */
2298
+ taskID: string;
2299
+ taskReplace: TaskReplace;
2300
+ };
2260
2301
  /**
2261
2302
  * Properties for the `runSource` method.
2262
2303
  */
@@ -2412,7 +2453,7 @@ type ChunkedPushOptions = {
2412
2453
  objects: Array<Record<string, unknown>>;
2413
2454
  };
2414
2455
 
2415
- declare const apiClientVersion = "1.35.0";
2456
+ declare const apiClientVersion = "1.37.0";
2416
2457
  declare const REGIONS: readonly ["eu", "us"];
2417
2458
  type Region = (typeof REGIONS)[number];
2418
2459
  type RegionOptions = {
@@ -2964,6 +3005,14 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2964
3005
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2965
3006
  */
2966
3007
  pushTask({ taskID, pushTaskPayload, watch }: PushTaskProps, requestOptions?: RequestOptions): Promise<WatchResponse>;
3008
+ /**
3009
+ * Fully updates a task by its ID, use partialUpdateTask if you only want to update a subset of fields.
3010
+ * @param replaceTask - The replaceTask object.
3011
+ * @param replaceTask.taskID - Unique identifier of a task.
3012
+ * @param replaceTask.taskReplace - The taskReplace object.
3013
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3014
+ */
3015
+ replaceTask({ taskID, taskReplace }: ReplaceTaskProps, requestOptions?: RequestOptions): Promise<TaskUpdateResponse>;
2967
3016
  /**
2968
3017
  * Runs all tasks linked to a source, only available for Shopify, BigCommerce and commercetools sources. Creates one run per task.
2969
3018
  *
@@ -3149,7 +3198,7 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
3149
3198
  */
3150
3199
  updateSource({ sourceID, sourceUpdate }: UpdateSourceProps, requestOptions?: RequestOptions): Promise<SourceUpdateResponse>;
3151
3200
  /**
3152
- * Updates a task by its ID.
3201
+ * Partially updates a task by its ID.
3153
3202
  * @param updateTask - The updateTask object.
3154
3203
  * @param updateTask.taskID - Unique identifier of a task.
3155
3204
  * @param updateTask.taskUpdate - The taskUpdate object.
@@ -3211,4 +3260,4 @@ type IngestionClient = ReturnType<typeof createIngestionClient>;
3211
3260
 
3212
3261
  declare function ingestionClient(appId: string, apiKey: string, region: Region, options?: ClientOptions | undefined): IngestionClient;
3213
3262
 
3214
- 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 ChunkedPushOptions, 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 RunTaskPayload, 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 };
3263
+ 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 ChunkedPushOptions, 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 ReplaceTaskProps, type Run, type RunListResponse, type RunOutcome, type RunProgress, type RunReasonCode, type RunResponse, type RunSortKeys, type RunSourcePayload, type RunSourceProps, type RunSourceResponse, type RunStatus, type RunTaskPayload, 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 TaskReplace, 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 };
package/dist/node.d.cts CHANGED
@@ -1478,7 +1478,7 @@ type WatchResponse = {
1478
1478
  };
1479
1479
 
1480
1480
  /**
1481
- * Type of indexing operation.
1481
+ * Which indexing operation to perform: - `addObject`: adds records to an index. Equivalent to the \"Add a new record (with auto-generated object ID)\" operation. - `updateObject`: adds or replaces records in an index. Equivalent to the \"Add or replace a record\" operation. - `partialUpdateObject`: adds or updates attributes within records. Equivalent to the \"Add or update attributes\" operation with the `createIfNoExists` parameter set to true. (If a record with the specified `objectID` doesn\'t exist in the specified index, this action creates adds the record to the index) - `partialUpdateObjectNoCreate`: same as `partialUpdateObject`, but with `createIfNoExists` set to false. (A record isn\'t added to the index if its `objectID` doesn\'t exist) - `deleteObject`: delete records from an index. Equivalent to the \"Delete a record\" operation. - `delete`. Delete an index. Equivalent to the \"Delete an index\" operation. - `clear`: delete all records from an index. Equivalent to the \"Delete all records from an index operation\".
1482
1482
  */
1483
1483
  type Action = 'addObject' | 'updateObject' | 'partialUpdateObject' | 'partialUpdateObjectNoCreate' | 'deleteObject' | 'delete' | 'clear';
1484
1484
 
@@ -1636,13 +1636,44 @@ type SourceUpdate = {
1636
1636
  authenticationID?: string | undefined;
1637
1637
  };
1638
1638
 
1639
+ /**
1640
+ * API request body for updating a task.
1641
+ */
1642
+ type TaskReplace = {
1643
+ /**
1644
+ * Universally unique identifier (UUID) of a destination resource.
1645
+ */
1646
+ destinationID: string;
1647
+ action: ActionType;
1648
+ subscriptionAction?: ActionType | undefined;
1649
+ /**
1650
+ * Cron expression for the task\'s schedule.
1651
+ */
1652
+ cron?: string | undefined;
1653
+ /**
1654
+ * Whether the task is enabled.
1655
+ */
1656
+ enabled?: boolean | undefined;
1657
+ /**
1658
+ * Maximum accepted percentage of failures for a task run to finish successfully.
1659
+ */
1660
+ failureThreshold?: number | undefined;
1661
+ input?: TaskInput | undefined;
1662
+ /**
1663
+ * Date of the last cursor in RFC 3339 format.
1664
+ */
1665
+ cursor?: string | undefined;
1666
+ notifications?: Notifications | undefined;
1667
+ policies?: Policies | undefined;
1668
+ };
1669
+
1639
1670
  /**
1640
1671
  * Property by which to sort the list of tasks.
1641
1672
  */
1642
1673
  type TaskSortKeys = 'enabled' | 'triggerType' | 'action' | 'updatedAt' | 'createdAt';
1643
1674
 
1644
1675
  /**
1645
- * API request body for updating a task.
1676
+ * API request body for partially updating a task.
1646
1677
  */
1647
1678
  type TaskUpdate = {
1648
1679
  /**
@@ -2257,6 +2288,16 @@ type PushTaskProps = {
2257
2288
  */
2258
2289
  watch?: boolean | undefined;
2259
2290
  };
2291
+ /**
2292
+ * Properties for the `replaceTask` method.
2293
+ */
2294
+ type ReplaceTaskProps = {
2295
+ /**
2296
+ * Unique identifier of a task.
2297
+ */
2298
+ taskID: string;
2299
+ taskReplace: TaskReplace;
2300
+ };
2260
2301
  /**
2261
2302
  * Properties for the `runSource` method.
2262
2303
  */
@@ -2412,7 +2453,7 @@ type ChunkedPushOptions = {
2412
2453
  objects: Array<Record<string, unknown>>;
2413
2454
  };
2414
2455
 
2415
- declare const apiClientVersion = "1.35.0";
2456
+ declare const apiClientVersion = "1.37.0";
2416
2457
  declare const REGIONS: readonly ["eu", "us"];
2417
2458
  type Region = (typeof REGIONS)[number];
2418
2459
  type RegionOptions = {
@@ -2964,6 +3005,14 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2964
3005
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2965
3006
  */
2966
3007
  pushTask({ taskID, pushTaskPayload, watch }: PushTaskProps, requestOptions?: RequestOptions): Promise<WatchResponse>;
3008
+ /**
3009
+ * Fully updates a task by its ID, use partialUpdateTask if you only want to update a subset of fields.
3010
+ * @param replaceTask - The replaceTask object.
3011
+ * @param replaceTask.taskID - Unique identifier of a task.
3012
+ * @param replaceTask.taskReplace - The taskReplace object.
3013
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3014
+ */
3015
+ replaceTask({ taskID, taskReplace }: ReplaceTaskProps, requestOptions?: RequestOptions): Promise<TaskUpdateResponse>;
2967
3016
  /**
2968
3017
  * Runs all tasks linked to a source, only available for Shopify, BigCommerce and commercetools sources. Creates one run per task.
2969
3018
  *
@@ -3149,7 +3198,7 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
3149
3198
  */
3150
3199
  updateSource({ sourceID, sourceUpdate }: UpdateSourceProps, requestOptions?: RequestOptions): Promise<SourceUpdateResponse>;
3151
3200
  /**
3152
- * Updates a task by its ID.
3201
+ * Partially updates a task by its ID.
3153
3202
  * @param updateTask - The updateTask object.
3154
3203
  * @param updateTask.taskID - Unique identifier of a task.
3155
3204
  * @param updateTask.taskUpdate - The taskUpdate object.
@@ -3211,4 +3260,4 @@ type IngestionClient = ReturnType<typeof createIngestionClient>;
3211
3260
 
3212
3261
  declare function ingestionClient(appId: string, apiKey: string, region: Region, options?: ClientOptions | undefined): IngestionClient;
3213
3262
 
3214
- 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 ChunkedPushOptions, 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 RunTaskPayload, 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 };
3263
+ 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 ChunkedPushOptions, 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 ReplaceTaskProps, type Run, type RunListResponse, type RunOutcome, type RunProgress, type RunReasonCode, type RunResponse, type RunSortKeys, type RunSourcePayload, type RunSourceProps, type RunSourceResponse, type RunStatus, type RunTaskPayload, 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 TaskReplace, 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 };
package/dist/node.d.ts CHANGED
@@ -1478,7 +1478,7 @@ type WatchResponse = {
1478
1478
  };
1479
1479
 
1480
1480
  /**
1481
- * Type of indexing operation.
1481
+ * Which indexing operation to perform: - `addObject`: adds records to an index. Equivalent to the \"Add a new record (with auto-generated object ID)\" operation. - `updateObject`: adds or replaces records in an index. Equivalent to the \"Add or replace a record\" operation. - `partialUpdateObject`: adds or updates attributes within records. Equivalent to the \"Add or update attributes\" operation with the `createIfNoExists` parameter set to true. (If a record with the specified `objectID` doesn\'t exist in the specified index, this action creates adds the record to the index) - `partialUpdateObjectNoCreate`: same as `partialUpdateObject`, but with `createIfNoExists` set to false. (A record isn\'t added to the index if its `objectID` doesn\'t exist) - `deleteObject`: delete records from an index. Equivalent to the \"Delete a record\" operation. - `delete`. Delete an index. Equivalent to the \"Delete an index\" operation. - `clear`: delete all records from an index. Equivalent to the \"Delete all records from an index operation\".
1482
1482
  */
1483
1483
  type Action = 'addObject' | 'updateObject' | 'partialUpdateObject' | 'partialUpdateObjectNoCreate' | 'deleteObject' | 'delete' | 'clear';
1484
1484
 
@@ -1636,13 +1636,44 @@ type SourceUpdate = {
1636
1636
  authenticationID?: string | undefined;
1637
1637
  };
1638
1638
 
1639
+ /**
1640
+ * API request body for updating a task.
1641
+ */
1642
+ type TaskReplace = {
1643
+ /**
1644
+ * Universally unique identifier (UUID) of a destination resource.
1645
+ */
1646
+ destinationID: string;
1647
+ action: ActionType;
1648
+ subscriptionAction?: ActionType | undefined;
1649
+ /**
1650
+ * Cron expression for the task\'s schedule.
1651
+ */
1652
+ cron?: string | undefined;
1653
+ /**
1654
+ * Whether the task is enabled.
1655
+ */
1656
+ enabled?: boolean | undefined;
1657
+ /**
1658
+ * Maximum accepted percentage of failures for a task run to finish successfully.
1659
+ */
1660
+ failureThreshold?: number | undefined;
1661
+ input?: TaskInput | undefined;
1662
+ /**
1663
+ * Date of the last cursor in RFC 3339 format.
1664
+ */
1665
+ cursor?: string | undefined;
1666
+ notifications?: Notifications | undefined;
1667
+ policies?: Policies | undefined;
1668
+ };
1669
+
1639
1670
  /**
1640
1671
  * Property by which to sort the list of tasks.
1641
1672
  */
1642
1673
  type TaskSortKeys = 'enabled' | 'triggerType' | 'action' | 'updatedAt' | 'createdAt';
1643
1674
 
1644
1675
  /**
1645
- * API request body for updating a task.
1676
+ * API request body for partially updating a task.
1646
1677
  */
1647
1678
  type TaskUpdate = {
1648
1679
  /**
@@ -2257,6 +2288,16 @@ type PushTaskProps = {
2257
2288
  */
2258
2289
  watch?: boolean | undefined;
2259
2290
  };
2291
+ /**
2292
+ * Properties for the `replaceTask` method.
2293
+ */
2294
+ type ReplaceTaskProps = {
2295
+ /**
2296
+ * Unique identifier of a task.
2297
+ */
2298
+ taskID: string;
2299
+ taskReplace: TaskReplace;
2300
+ };
2260
2301
  /**
2261
2302
  * Properties for the `runSource` method.
2262
2303
  */
@@ -2412,7 +2453,7 @@ type ChunkedPushOptions = {
2412
2453
  objects: Array<Record<string, unknown>>;
2413
2454
  };
2414
2455
 
2415
- declare const apiClientVersion = "1.35.0";
2456
+ declare const apiClientVersion = "1.37.0";
2416
2457
  declare const REGIONS: readonly ["eu", "us"];
2417
2458
  type Region = (typeof REGIONS)[number];
2418
2459
  type RegionOptions = {
@@ -2964,6 +3005,14 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2964
3005
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2965
3006
  */
2966
3007
  pushTask({ taskID, pushTaskPayload, watch }: PushTaskProps, requestOptions?: RequestOptions): Promise<WatchResponse>;
3008
+ /**
3009
+ * Fully updates a task by its ID, use partialUpdateTask if you only want to update a subset of fields.
3010
+ * @param replaceTask - The replaceTask object.
3011
+ * @param replaceTask.taskID - Unique identifier of a task.
3012
+ * @param replaceTask.taskReplace - The taskReplace object.
3013
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3014
+ */
3015
+ replaceTask({ taskID, taskReplace }: ReplaceTaskProps, requestOptions?: RequestOptions): Promise<TaskUpdateResponse>;
2967
3016
  /**
2968
3017
  * Runs all tasks linked to a source, only available for Shopify, BigCommerce and commercetools sources. Creates one run per task.
2969
3018
  *
@@ -3149,7 +3198,7 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
3149
3198
  */
3150
3199
  updateSource({ sourceID, sourceUpdate }: UpdateSourceProps, requestOptions?: RequestOptions): Promise<SourceUpdateResponse>;
3151
3200
  /**
3152
- * Updates a task by its ID.
3201
+ * Partially updates a task by its ID.
3153
3202
  * @param updateTask - The updateTask object.
3154
3203
  * @param updateTask.taskID - Unique identifier of a task.
3155
3204
  * @param updateTask.taskUpdate - The taskUpdate object.
@@ -3211,4 +3260,4 @@ type IngestionClient = ReturnType<typeof createIngestionClient>;
3211
3260
 
3212
3261
  declare function ingestionClient(appId: string, apiKey: string, region: Region, options?: ClientOptions | undefined): IngestionClient;
3213
3262
 
3214
- 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 ChunkedPushOptions, 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 RunTaskPayload, 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 };
3263
+ 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 ChunkedPushOptions, 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 ReplaceTaskProps, type Run, type RunListResponse, type RunOutcome, type RunProgress, type RunReasonCode, type RunResponse, type RunSortKeys, type RunSourcePayload, type RunSourceProps, type RunSourceResponse, type RunStatus, type RunTaskPayload, 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 TaskReplace, 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 };
@@ -29,7 +29,7 @@ __export(ingestionClient_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(ingestionClient_exports);
31
31
  var import_client_common = require("@algolia/client-common");
32
- var apiClientVersion = "1.35.0";
32
+ var apiClientVersion = "1.37.0";
33
33
  var REGIONS = ["eu", "us"];
34
34
  function getDefaultHosts(region) {
35
35
  const url = "data.{region}.algolia.com".replace("{region}", region);
@@ -1483,6 +1483,38 @@ function createIngestionClient({
1483
1483
  };
1484
1484
  return transporter.request(request, requestOptions);
1485
1485
  },
1486
+ /**
1487
+ * Fully updates a task by its ID, use partialUpdateTask if you only want to update a subset of fields.
1488
+ * @param replaceTask - The replaceTask object.
1489
+ * @param replaceTask.taskID - Unique identifier of a task.
1490
+ * @param replaceTask.taskReplace - The taskReplace object.
1491
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1492
+ */
1493
+ replaceTask({ taskID, taskReplace }, requestOptions) {
1494
+ if (!taskID) {
1495
+ throw new Error("Parameter `taskID` is required when calling `replaceTask`.");
1496
+ }
1497
+ if (!taskReplace) {
1498
+ throw new Error("Parameter `taskReplace` is required when calling `replaceTask`.");
1499
+ }
1500
+ if (!taskReplace.destinationID) {
1501
+ throw new Error("Parameter `taskReplace.destinationID` is required when calling `replaceTask`.");
1502
+ }
1503
+ if (!taskReplace.action) {
1504
+ throw new Error("Parameter `taskReplace.action` is required when calling `replaceTask`.");
1505
+ }
1506
+ const requestPath = "/2/tasks/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
1507
+ const headers = {};
1508
+ const queryParameters = {};
1509
+ const request = {
1510
+ method: "PUT",
1511
+ path: requestPath,
1512
+ queryParameters,
1513
+ headers,
1514
+ data: taskReplace
1515
+ };
1516
+ return transporter.request(request, requestOptions);
1517
+ },
1486
1518
  /**
1487
1519
  * Runs all tasks linked to a source, only available for Shopify, BigCommerce and commercetools sources. Creates one run per task.
1488
1520
  *
@@ -1951,7 +1983,7 @@ function createIngestionClient({
1951
1983
  return transporter.request(request, requestOptions);
1952
1984
  },
1953
1985
  /**
1954
- * Updates a task by its ID.
1986
+ * Partially updates a task by its ID.
1955
1987
  * @param updateTask - The updateTask object.
1956
1988
  * @param updateTask.taskID - Unique identifier of a task.
1957
1989
  * @param updateTask.taskUpdate - The taskUpdate object.