@algolia/ingestion 1.52.0 → 1.53.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 +4 -4
- package/dist/browser.d.ts +19 -7
- package/dist/builds/browser.js +6 -4
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +4 -4
- package/dist/builds/fetch.js +6 -4
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +6 -4
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +6 -4
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +6 -4
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +19 -7
- package/dist/node.d.cts +19 -7
- package/dist/node.d.ts +19 -7
- package/dist/src/ingestionClient.cjs +6 -4
- package/dist/src/ingestionClient.cjs.map +1 -1
- package/dist/src/ingestionClient.js +11 -9
- package/dist/src/ingestionClient.js.map +1 -1
- package/dist/worker.d.ts +19 -7
- package/package.json +9 -9
package/dist/fetch.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _algolia_client_common from '@algolia/client-common';
|
|
2
|
-
import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
2
|
+
import { ChunkedHelperOptions, CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Credentials for authenticating with an API key.
|
|
@@ -1553,16 +1553,27 @@ type AuthenticationUpdate = {
|
|
|
1553
1553
|
*/
|
|
1554
1554
|
type DestinationSortKeys = 'name' | 'type' | 'updatedAt' | 'createdAt';
|
|
1555
1555
|
|
|
1556
|
+
type DestinationUpdateInput = {
|
|
1557
|
+
/**
|
|
1558
|
+
* Algolia index name (case-sensitive).
|
|
1559
|
+
*/
|
|
1560
|
+
indexName?: string | undefined;
|
|
1561
|
+
recordType?: RecordType | undefined;
|
|
1562
|
+
/**
|
|
1563
|
+
* Attributes from your source to exclude from Algolia records. Not all your data attributes will be useful for searching. Keeping your Algolia records small increases indexing and search performance. - Exclude nested attributes with `.` notation. For example, `foo.bar` indexes the `foo` attribute and all its children **except** the `bar` attribute. - Exclude attributes from arrays with `[i]`, where `i` is the index of the array element. For example, `foo.[0].bar` only excludes the `bar` attribute from the first element of the `foo` array, but indexes the complete `foo` attribute for all other elements. Use `*` as wildcard: `foo.[*].bar` excludes `bar` from all elements of the `foo` array.
|
|
1564
|
+
*/
|
|
1565
|
+
attributesToExclude?: Array<string> | undefined;
|
|
1566
|
+
};
|
|
1567
|
+
|
|
1556
1568
|
/**
|
|
1557
1569
|
* API request body for updating a destination.
|
|
1558
1570
|
*/
|
|
1559
1571
|
type DestinationUpdate = {
|
|
1560
|
-
type?: DestinationType | undefined;
|
|
1561
1572
|
/**
|
|
1562
1573
|
* Descriptive name for the resource.
|
|
1563
1574
|
*/
|
|
1564
1575
|
name?: string | undefined;
|
|
1565
|
-
input?:
|
|
1576
|
+
input?: DestinationUpdateInput | undefined;
|
|
1566
1577
|
/**
|
|
1567
1578
|
* Universally unique identifier (UUID) of an authentication resource.
|
|
1568
1579
|
*/
|
|
@@ -2502,7 +2513,7 @@ type ValidateSourceBeforeUpdateProps = {
|
|
|
2502
2513
|
sourceID: string;
|
|
2503
2514
|
sourceUpdate: SourceUpdate;
|
|
2504
2515
|
};
|
|
2505
|
-
type ChunkedPushOptions = {
|
|
2516
|
+
type ChunkedPushOptions = ChunkedHelperOptions & {
|
|
2506
2517
|
/**
|
|
2507
2518
|
* The `indexName` to replace `objects` in.
|
|
2508
2519
|
*/
|
|
@@ -2529,7 +2540,7 @@ type ChunkedPushOptions = {
|
|
|
2529
2540
|
objects: Array<Record<string, unknown>>;
|
|
2530
2541
|
};
|
|
2531
2542
|
|
|
2532
|
-
declare const apiClientVersion = "1.
|
|
2543
|
+
declare const apiClientVersion = "1.53.0";
|
|
2533
2544
|
declare const REGIONS: readonly ["eu", "us"];
|
|
2534
2545
|
type Region = (typeof REGIONS)[number];
|
|
2535
2546
|
type RegionOptions = {
|
|
@@ -2601,9 +2612,10 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
2601
2612
|
* @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
2602
2613
|
* @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
2603
2614
|
* @param chunkedPush.referenceIndexName - This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source index name).
|
|
2615
|
+
* @param chunkedPush.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
2604
2616
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions.
|
|
2605
2617
|
*/
|
|
2606
|
-
chunkedPush({ indexName, objects, action, waitForTasks, batchSize, referenceIndexName, }: ChunkedPushOptions, requestOptions?: RequestOptions): Promise<Array<WatchResponse>>;
|
|
2618
|
+
chunkedPush({ indexName, objects, action, waitForTasks, batchSize, referenceIndexName, maxRetries, }: ChunkedPushOptions, requestOptions?: RequestOptions): Promise<Array<WatchResponse>>;
|
|
2607
2619
|
/**
|
|
2608
2620
|
* Creates a new authentication resource.
|
|
2609
2621
|
*
|
|
@@ -3387,4 +3399,4 @@ type IngestionClient = ReturnType<typeof createIngestionClient>;
|
|
|
3387
3399
|
|
|
3388
3400
|
declare function ingestionClient(appId: string, apiKey: string, region: Region, options?: ClientOptions | undefined): IngestionClient;
|
|
3389
3401
|
|
|
3390
|
-
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 SourceAlgoliaIndex, 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 SourceUpdateAlgoliaIndex, 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 };
|
|
3402
|
+
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 DestinationUpdateInput, 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 SourceAlgoliaIndex, 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 SourceUpdateAlgoliaIndex, 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _algolia_client_common from '@algolia/client-common';
|
|
2
|
-
import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
2
|
+
import { ChunkedHelperOptions, CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Credentials for authenticating with an API key.
|
|
@@ -1553,16 +1553,27 @@ type AuthenticationUpdate = {
|
|
|
1553
1553
|
*/
|
|
1554
1554
|
type DestinationSortKeys = 'name' | 'type' | 'updatedAt' | 'createdAt';
|
|
1555
1555
|
|
|
1556
|
+
type DestinationUpdateInput = {
|
|
1557
|
+
/**
|
|
1558
|
+
* Algolia index name (case-sensitive).
|
|
1559
|
+
*/
|
|
1560
|
+
indexName?: string | undefined;
|
|
1561
|
+
recordType?: RecordType | undefined;
|
|
1562
|
+
/**
|
|
1563
|
+
* Attributes from your source to exclude from Algolia records. Not all your data attributes will be useful for searching. Keeping your Algolia records small increases indexing and search performance. - Exclude nested attributes with `.` notation. For example, `foo.bar` indexes the `foo` attribute and all its children **except** the `bar` attribute. - Exclude attributes from arrays with `[i]`, where `i` is the index of the array element. For example, `foo.[0].bar` only excludes the `bar` attribute from the first element of the `foo` array, but indexes the complete `foo` attribute for all other elements. Use `*` as wildcard: `foo.[*].bar` excludes `bar` from all elements of the `foo` array.
|
|
1564
|
+
*/
|
|
1565
|
+
attributesToExclude?: Array<string> | undefined;
|
|
1566
|
+
};
|
|
1567
|
+
|
|
1556
1568
|
/**
|
|
1557
1569
|
* API request body for updating a destination.
|
|
1558
1570
|
*/
|
|
1559
1571
|
type DestinationUpdate = {
|
|
1560
|
-
type?: DestinationType | undefined;
|
|
1561
1572
|
/**
|
|
1562
1573
|
* Descriptive name for the resource.
|
|
1563
1574
|
*/
|
|
1564
1575
|
name?: string | undefined;
|
|
1565
|
-
input?:
|
|
1576
|
+
input?: DestinationUpdateInput | undefined;
|
|
1566
1577
|
/**
|
|
1567
1578
|
* Universally unique identifier (UUID) of an authentication resource.
|
|
1568
1579
|
*/
|
|
@@ -2502,7 +2513,7 @@ type ValidateSourceBeforeUpdateProps = {
|
|
|
2502
2513
|
sourceID: string;
|
|
2503
2514
|
sourceUpdate: SourceUpdate;
|
|
2504
2515
|
};
|
|
2505
|
-
type ChunkedPushOptions = {
|
|
2516
|
+
type ChunkedPushOptions = ChunkedHelperOptions & {
|
|
2506
2517
|
/**
|
|
2507
2518
|
* The `indexName` to replace `objects` in.
|
|
2508
2519
|
*/
|
|
@@ -2529,7 +2540,7 @@ type ChunkedPushOptions = {
|
|
|
2529
2540
|
objects: Array<Record<string, unknown>>;
|
|
2530
2541
|
};
|
|
2531
2542
|
|
|
2532
|
-
declare const apiClientVersion = "1.
|
|
2543
|
+
declare const apiClientVersion = "1.53.0";
|
|
2533
2544
|
declare const REGIONS: readonly ["eu", "us"];
|
|
2534
2545
|
type Region = (typeof REGIONS)[number];
|
|
2535
2546
|
type RegionOptions = {
|
|
@@ -2601,9 +2612,10 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
2601
2612
|
* @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
2602
2613
|
* @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
2603
2614
|
* @param chunkedPush.referenceIndexName - This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source index name).
|
|
2615
|
+
* @param chunkedPush.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
2604
2616
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions.
|
|
2605
2617
|
*/
|
|
2606
|
-
chunkedPush({ indexName, objects, action, waitForTasks, batchSize, referenceIndexName, }: ChunkedPushOptions, requestOptions?: RequestOptions): Promise<Array<WatchResponse>>;
|
|
2618
|
+
chunkedPush({ indexName, objects, action, waitForTasks, batchSize, referenceIndexName, maxRetries, }: ChunkedPushOptions, requestOptions?: RequestOptions): Promise<Array<WatchResponse>>;
|
|
2607
2619
|
/**
|
|
2608
2620
|
* Creates a new authentication resource.
|
|
2609
2621
|
*
|
|
@@ -3387,4 +3399,4 @@ type IngestionClient = ReturnType<typeof createIngestionClient>;
|
|
|
3387
3399
|
|
|
3388
3400
|
declare function ingestionClient(appId: string, apiKey: string, region: Region, options?: ClientOptions | undefined): IngestionClient;
|
|
3389
3401
|
|
|
3390
|
-
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 SourceAlgoliaIndex, 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 SourceUpdateAlgoliaIndex, 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 };
|
|
3402
|
+
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 DestinationUpdateInput, 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 SourceAlgoliaIndex, 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 SourceUpdateAlgoliaIndex, 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _algolia_client_common from '@algolia/client-common';
|
|
2
|
-
import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
2
|
+
import { ChunkedHelperOptions, CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Credentials for authenticating with an API key.
|
|
@@ -1553,16 +1553,27 @@ type AuthenticationUpdate = {
|
|
|
1553
1553
|
*/
|
|
1554
1554
|
type DestinationSortKeys = 'name' | 'type' | 'updatedAt' | 'createdAt';
|
|
1555
1555
|
|
|
1556
|
+
type DestinationUpdateInput = {
|
|
1557
|
+
/**
|
|
1558
|
+
* Algolia index name (case-sensitive).
|
|
1559
|
+
*/
|
|
1560
|
+
indexName?: string | undefined;
|
|
1561
|
+
recordType?: RecordType | undefined;
|
|
1562
|
+
/**
|
|
1563
|
+
* Attributes from your source to exclude from Algolia records. Not all your data attributes will be useful for searching. Keeping your Algolia records small increases indexing and search performance. - Exclude nested attributes with `.` notation. For example, `foo.bar` indexes the `foo` attribute and all its children **except** the `bar` attribute. - Exclude attributes from arrays with `[i]`, where `i` is the index of the array element. For example, `foo.[0].bar` only excludes the `bar` attribute from the first element of the `foo` array, but indexes the complete `foo` attribute for all other elements. Use `*` as wildcard: `foo.[*].bar` excludes `bar` from all elements of the `foo` array.
|
|
1564
|
+
*/
|
|
1565
|
+
attributesToExclude?: Array<string> | undefined;
|
|
1566
|
+
};
|
|
1567
|
+
|
|
1556
1568
|
/**
|
|
1557
1569
|
* API request body for updating a destination.
|
|
1558
1570
|
*/
|
|
1559
1571
|
type DestinationUpdate = {
|
|
1560
|
-
type?: DestinationType | undefined;
|
|
1561
1572
|
/**
|
|
1562
1573
|
* Descriptive name for the resource.
|
|
1563
1574
|
*/
|
|
1564
1575
|
name?: string | undefined;
|
|
1565
|
-
input?:
|
|
1576
|
+
input?: DestinationUpdateInput | undefined;
|
|
1566
1577
|
/**
|
|
1567
1578
|
* Universally unique identifier (UUID) of an authentication resource.
|
|
1568
1579
|
*/
|
|
@@ -2502,7 +2513,7 @@ type ValidateSourceBeforeUpdateProps = {
|
|
|
2502
2513
|
sourceID: string;
|
|
2503
2514
|
sourceUpdate: SourceUpdate;
|
|
2504
2515
|
};
|
|
2505
|
-
type ChunkedPushOptions = {
|
|
2516
|
+
type ChunkedPushOptions = ChunkedHelperOptions & {
|
|
2506
2517
|
/**
|
|
2507
2518
|
* The `indexName` to replace `objects` in.
|
|
2508
2519
|
*/
|
|
@@ -2529,7 +2540,7 @@ type ChunkedPushOptions = {
|
|
|
2529
2540
|
objects: Array<Record<string, unknown>>;
|
|
2530
2541
|
};
|
|
2531
2542
|
|
|
2532
|
-
declare const apiClientVersion = "1.
|
|
2543
|
+
declare const apiClientVersion = "1.53.0";
|
|
2533
2544
|
declare const REGIONS: readonly ["eu", "us"];
|
|
2534
2545
|
type Region = (typeof REGIONS)[number];
|
|
2535
2546
|
type RegionOptions = {
|
|
@@ -2601,9 +2612,10 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
2601
2612
|
* @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
2602
2613
|
* @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
2603
2614
|
* @param chunkedPush.referenceIndexName - This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source index name).
|
|
2615
|
+
* @param chunkedPush.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
2604
2616
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions.
|
|
2605
2617
|
*/
|
|
2606
|
-
chunkedPush({ indexName, objects, action, waitForTasks, batchSize, referenceIndexName, }: ChunkedPushOptions, requestOptions?: RequestOptions): Promise<Array<WatchResponse>>;
|
|
2618
|
+
chunkedPush({ indexName, objects, action, waitForTasks, batchSize, referenceIndexName, maxRetries, }: ChunkedPushOptions, requestOptions?: RequestOptions): Promise<Array<WatchResponse>>;
|
|
2607
2619
|
/**
|
|
2608
2620
|
* Creates a new authentication resource.
|
|
2609
2621
|
*
|
|
@@ -3387,4 +3399,4 @@ type IngestionClient = ReturnType<typeof createIngestionClient>;
|
|
|
3387
3399
|
|
|
3388
3400
|
declare function ingestionClient(appId: string, apiKey: string, region: Region, options?: ClientOptions | undefined): IngestionClient;
|
|
3389
3401
|
|
|
3390
|
-
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 SourceAlgoliaIndex, 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 SourceUpdateAlgoliaIndex, 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 };
|
|
3402
|
+
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 DestinationUpdateInput, 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 SourceAlgoliaIndex, 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 SourceUpdateAlgoliaIndex, 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.
|
|
32
|
+
var apiClientVersion = "1.53.0";
|
|
33
33
|
var REGIONS = ["eu", "us"];
|
|
34
34
|
function getDefaultHosts(region) {
|
|
35
35
|
const url = "data.{region}.algolia.com".replace("{region}", region);
|
|
@@ -126,6 +126,7 @@ function createIngestionClient({
|
|
|
126
126
|
* @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
127
127
|
* @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
128
128
|
* @param chunkedPush.referenceIndexName - This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source index name).
|
|
129
|
+
* @param chunkedPush.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
129
130
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions.
|
|
130
131
|
*/
|
|
131
132
|
async chunkedPush({
|
|
@@ -134,7 +135,8 @@ function createIngestionClient({
|
|
|
134
135
|
action = "addObject",
|
|
135
136
|
waitForTasks,
|
|
136
137
|
batchSize = 1e3,
|
|
137
|
-
referenceIndexName
|
|
138
|
+
referenceIndexName,
|
|
139
|
+
maxRetries = 100
|
|
138
140
|
}, requestOptions) {
|
|
139
141
|
let records = [];
|
|
140
142
|
let offset = 0;
|
|
@@ -170,8 +172,8 @@ function createIngestionClient({
|
|
|
170
172
|
validate: (response) => response !== void 0,
|
|
171
173
|
aggregator: () => retryCount += 1,
|
|
172
174
|
error: {
|
|
173
|
-
validate: () => retryCount >=
|
|
174
|
-
message: () => `
|
|
175
|
+
validate: () => retryCount >= maxRetries,
|
|
176
|
+
message: () => `Stopped waiting for the task after ${maxRetries} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`
|
|
175
177
|
},
|
|
176
178
|
timeout: () => Math.min(retryCount * 1500, 5e3)
|
|
177
179
|
});
|