@algolia/ingestion 1.32.0 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse
41
41
  ### With a package manager
42
42
 
43
43
  ```bash
44
- yarn add @algolia/ingestion@1.32.0
44
+ yarn add @algolia/ingestion@1.34.0
45
45
  # or
46
- npm install @algolia/ingestion@1.32.0
46
+ npm install @algolia/ingestion@1.34.0
47
47
  # or
48
- pnpm add @algolia/ingestion@1.32.0
48
+ pnpm add @algolia/ingestion@1.34.0
49
49
  ```
50
50
 
51
51
  ### Without a package manager
@@ -53,7 +53,7 @@ pnpm add @algolia/ingestion@1.32.0
53
53
  Add the following JavaScript snippet to the <head> of your website:
54
54
 
55
55
  ```html
56
- <script src="https://cdn.jsdelivr.net/npm/@algolia/ingestion@1.32.0/dist/builds/browser.umd.js"></script>
56
+ <script src="https://cdn.jsdelivr.net/npm/@algolia/ingestion@1.34.0/dist/builds/browser.umd.js"></script>
57
57
  ```
58
58
 
59
59
  ### Usage
package/dist/browser.d.ts CHANGED
@@ -1575,6 +1575,21 @@ type RunSourcePayload = {
1575
1575
  */
1576
1576
  entityIDs?: Array<string> | undefined;
1577
1577
  entityType?: EntityType | undefined;
1578
+ /**
1579
+ * Additional information that will be passed to the created runs.
1580
+ */
1581
+ runMetadata?: {
1582
+ [key: string]: any;
1583
+ } | undefined;
1584
+ };
1585
+
1586
+ type RunTaskPayload = {
1587
+ /**
1588
+ * Additional information that will be passed to the created run.
1589
+ */
1590
+ runMetadata?: {
1591
+ [key: string]: any;
1592
+ } | undefined;
1578
1593
  };
1579
1594
 
1580
1595
  /**
@@ -2263,6 +2278,10 @@ type RunTaskProps = {
2263
2278
  * Unique identifier of a task.
2264
2279
  */
2265
2280
  taskID: string;
2281
+ /**
2282
+ *
2283
+ */
2284
+ runTaskPayload?: RunTaskPayload | undefined;
2266
2285
  };
2267
2286
  /**
2268
2287
  * Properties for the `runTaskV1` method.
@@ -2272,6 +2291,10 @@ type RunTaskV1Props = {
2272
2291
  * Unique identifier of a task.
2273
2292
  */
2274
2293
  taskID: string;
2294
+ /**
2295
+ *
2296
+ */
2297
+ runTaskPayload?: RunTaskPayload | undefined;
2275
2298
  };
2276
2299
  /**
2277
2300
  * Properties for the `triggerDockerSourceDiscover` method.
@@ -2389,7 +2412,7 @@ type ChunkedPushOptions = {
2389
2412
  objects: Array<Record<string, unknown>>;
2390
2413
  };
2391
2414
 
2392
- declare const apiClientVersion = "1.32.0";
2415
+ declare const apiClientVersion = "1.34.0";
2393
2416
  declare const REGIONS: readonly ["eu", "us"];
2394
2417
  type Region = (typeof REGIONS)[number];
2395
2418
  type RegionOptions = {
@@ -2963,9 +2986,10 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2963
2986
  * - editSettings
2964
2987
  * @param runTask - The runTask object.
2965
2988
  * @param runTask.taskID - Unique identifier of a task.
2989
+ * @param runTask.runTaskPayload -
2966
2990
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2967
2991
  */
2968
- runTask({ taskID }: RunTaskProps, requestOptions?: RequestOptions): Promise<RunResponse>;
2992
+ runTask({ taskID, runTaskPayload }: RunTaskProps, requestOptions?: RequestOptions): Promise<RunResponse>;
2969
2993
  /**
2970
2994
  * Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints.
2971
2995
  *
@@ -2977,9 +3001,10 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2977
3001
  * @deprecated
2978
3002
  * @param runTaskV1 - The runTaskV1 object.
2979
3003
  * @param runTaskV1.taskID - Unique identifier of a task.
3004
+ * @param runTaskV1.runTaskPayload -
2980
3005
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2981
3006
  */
2982
- runTaskV1({ taskID }: RunTaskV1Props, requestOptions?: RequestOptions): Promise<RunResponse>;
3007
+ runTaskV1({ taskID, runTaskPayload }: RunTaskV1Props, requestOptions?: RequestOptions): Promise<RunResponse>;
2983
3008
  /**
2984
3009
  * Searches for authentication resources.
2985
3010
  *
@@ -3185,4 +3210,4 @@ type ErrorBase = Record<string, any> & {
3185
3210
  declare function ingestionClient(appId: string, apiKey: string, region: Region, options?: ClientOptions | undefined): IngestionClient;
3186
3211
  type IngestionClient = ReturnType<typeof createIngestionClient>;
3187
3212
 
3188
- 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 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 };
3213
+ 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 };
@@ -9,7 +9,7 @@ import {
9
9
 
10
10
  // src/ingestionClient.ts
11
11
  import { createAuth, createIterablePromise, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
12
- var apiClientVersion = "1.32.0";
12
+ var apiClientVersion = "1.34.0";
13
13
  var REGIONS = ["eu", "us"];
14
14
  function getDefaultHosts(region) {
15
15
  const url = "data.{region}.algolia.com".replace("{region}", region);
@@ -1497,9 +1497,10 @@ function createIngestionClient({
1497
1497
  * - editSettings
1498
1498
  * @param runTask - The runTask object.
1499
1499
  * @param runTask.taskID - Unique identifier of a task.
1500
+ * @param runTask.runTaskPayload -
1500
1501
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1501
1502
  */
1502
- runTask({ taskID }, requestOptions) {
1503
+ runTask({ taskID, runTaskPayload }, requestOptions) {
1503
1504
  if (!taskID) {
1504
1505
  throw new Error("Parameter `taskID` is required when calling `runTask`.");
1505
1506
  }
@@ -1510,7 +1511,8 @@ function createIngestionClient({
1510
1511
  method: "POST",
1511
1512
  path: requestPath,
1512
1513
  queryParameters,
1513
- headers
1514
+ headers,
1515
+ data: runTaskPayload ? runTaskPayload : {}
1514
1516
  };
1515
1517
  return transporter.request(request, requestOptions);
1516
1518
  },
@@ -1525,9 +1527,10 @@ function createIngestionClient({
1525
1527
  * @deprecated
1526
1528
  * @param runTaskV1 - The runTaskV1 object.
1527
1529
  * @param runTaskV1.taskID - Unique identifier of a task.
1530
+ * @param runTaskV1.runTaskPayload -
1528
1531
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1529
1532
  */
1530
- runTaskV1({ taskID }, requestOptions) {
1533
+ runTaskV1({ taskID, runTaskPayload }, requestOptions) {
1531
1534
  if (!taskID) {
1532
1535
  throw new Error("Parameter `taskID` is required when calling `runTaskV1`.");
1533
1536
  }
@@ -1538,7 +1541,8 @@ function createIngestionClient({
1538
1541
  method: "POST",
1539
1542
  path: requestPath,
1540
1543
  queryParameters,
1541
- headers
1544
+ headers,
1545
+ data: runTaskPayload ? runTaskPayload : {}
1542
1546
  };
1543
1547
  return transporter.request(request, requestOptions);
1544
1548
  },