@algolia/ingestion 1.7.0 → 1.8.1

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.
Files changed (95) hide show
  1. package/README.md +5 -7
  2. package/dist/browser.d.ts +1295 -1335
  3. package/dist/builds/browser.js +201 -258
  4. package/dist/builds/browser.js.map +1 -1
  5. package/dist/builds/browser.min.js +1 -1
  6. package/dist/builds/browser.min.js.map +1 -1
  7. package/dist/builds/browser.umd.js +2 -2
  8. package/dist/builds/fetch.js +198 -255
  9. package/dist/builds/fetch.js.map +1 -1
  10. package/dist/builds/node.cjs +198 -255
  11. package/dist/builds/node.cjs.map +1 -1
  12. package/dist/builds/node.js +199 -256
  13. package/dist/builds/node.js.map +1 -1
  14. package/dist/fetch.d.ts +1294 -1333
  15. package/dist/node.d.cts +1294 -1333
  16. package/dist/node.d.ts +1294 -1333
  17. package/dist/src/ingestionClient.cjs +197 -254
  18. package/dist/src/ingestionClient.cjs.map +1 -1
  19. package/dist/src/ingestionClient.js +197 -254
  20. package/dist/src/ingestionClient.js.map +1 -1
  21. package/index.d.ts +0 -1
  22. package/index.js +1 -2
  23. package/model/action.ts +4 -4
  24. package/model/actionType.ts +1 -1
  25. package/model/authInput.ts +5 -5
  26. package/model/authInputPartial.ts +5 -5
  27. package/model/authenticationSearch.ts +1 -1
  28. package/model/authenticationSortKeys.ts +1 -1
  29. package/model/authenticationType.ts +1 -1
  30. package/model/bigCommerceChannel.ts +1 -1
  31. package/model/clientMethodProps.ts +61 -49
  32. package/model/commercetoolsCustomFields.ts +3 -3
  33. package/model/destination.ts +1 -1
  34. package/model/destinationCreate.ts +1 -1
  35. package/model/destinationIndexName.ts +1 -1
  36. package/model/destinationSearch.ts +1 -1
  37. package/model/destinationSortKeys.ts +1 -1
  38. package/model/destinationType.ts +1 -1
  39. package/model/destinationUpdate.ts +1 -1
  40. package/model/dockerImageType.ts +1 -1
  41. package/model/dockerStreams.ts +3 -3
  42. package/model/dockerStreamsInput.ts +1 -1
  43. package/model/dockerStreamsSyncMode.ts +1 -1
  44. package/model/entityType.ts +1 -1
  45. package/model/event.ts +1 -1
  46. package/model/eventSortKeys.ts +1 -1
  47. package/model/eventStatus.ts +1 -1
  48. package/model/eventType.ts +1 -1
  49. package/model/index.ts +10 -10
  50. package/model/listAuthenticationsResponse.ts +1 -1
  51. package/model/listDestinationsResponse.ts +1 -1
  52. package/model/listEventsResponse.ts +1 -1
  53. package/model/listSourcesResponse.ts +1 -1
  54. package/model/listTasksResponse.ts +1 -1
  55. package/model/listTasksResponseV1.ts +1 -1
  56. package/model/listTransformationsResponse.ts +1 -1
  57. package/model/mappingFieldDirective.ts +1 -1
  58. package/model/mappingInput.ts +1 -1
  59. package/model/mappingKitAction.ts +1 -1
  60. package/model/mappingTypeCSV.ts +1 -1
  61. package/model/pushTaskPayload.ts +1 -1
  62. package/model/runListResponse.ts +1 -1
  63. package/model/runOutcome.ts +1 -1
  64. package/model/runReasonCode.ts +1 -1
  65. package/model/runSortKeys.ts +1 -1
  66. package/model/runSourcePayload.ts +3 -3
  67. package/model/runSourceResponse.ts +1 -1
  68. package/model/runStatus.ts +1 -1
  69. package/model/runType.ts +1 -1
  70. package/model/shopifyInput.ts +1 -1
  71. package/model/shopifyMarket.ts +3 -3
  72. package/model/sourceBigCommerce.ts +3 -3
  73. package/model/sourceCSV.ts +1 -1
  74. package/model/sourceCommercetools.ts +2 -2
  75. package/model/sourceInput.ts +4 -4
  76. package/model/sourceSearch.ts +1 -1
  77. package/model/sourceShopify.ts +1 -1
  78. package/model/sourceSortKeys.ts +1 -1
  79. package/model/sourceType.ts +2 -2
  80. package/model/sourceUpdateCommercetools.ts +2 -2
  81. package/model/sourceUpdateInput.ts +3 -3
  82. package/model/sourceUpdateShopify.ts +1 -1
  83. package/model/sourceWatchResponse.ts +4 -4
  84. package/model/taskCreateTrigger.ts +2 -1
  85. package/model/taskInput.ts +3 -1
  86. package/model/taskSearch.ts +1 -1
  87. package/model/taskSortKeys.ts +1 -1
  88. package/model/transformation.ts +2 -2
  89. package/model/transformationCreate.ts +2 -2
  90. package/model/transformationSearch.ts +1 -1
  91. package/model/transformationSortKeys.ts +1 -1
  92. package/model/transformationTry.ts +1 -1
  93. package/model/trigger.ts +2 -1
  94. package/model/triggerType.ts +1 -1
  95. package/package.json +6 -6
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * A code for the task run\'s outcome. A readable description of the code is included in the `reason` response property.
5
5
  */
6
- export type RunReasonCode = 'blocking' | 'critical' | 'discarded' | 'internal' | 'no_events' | 'ok' | 'too_many_errors';
6
+ export type RunReasonCode = 'internal' | 'critical' | 'no_events' | 'too_many_errors' | 'ok' | 'discarded' | 'blocking';
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Property by which to sort the list of task runs.
5
5
  */
6
- export type RunSortKeys = 'createdAt' | 'status' | 'updatedAt';
6
+ export type RunSortKeys = 'status' | 'updatedAt' | 'createdAt';
@@ -6,17 +6,17 @@ export type RunSourcePayload = {
6
6
  /**
7
7
  * List of index names to include in reidexing/update.
8
8
  */
9
- indexToInclude?: string[];
9
+ indexToInclude?: Array<string>;
10
10
 
11
11
  /**
12
12
  * List of index names to exclude in reidexing/update.
13
13
  */
14
- indexToExclude?: string[];
14
+ indexToExclude?: Array<string>;
15
15
 
16
16
  /**
17
17
  * List of entityID to update.
18
18
  */
19
- entityIDs?: string[];
19
+ entityIDs?: Array<string>;
20
20
 
21
21
  entityType?: EntityType;
22
22
  };
@@ -4,7 +4,7 @@ export type RunSourceResponse = {
4
4
  /**
5
5
  * Map of taskID sent for reindex with the corresponding runID.
6
6
  */
7
- taskWithRunID: Record<string, string>;
7
+ taskWithRunID: { [key: string]: string };
8
8
 
9
9
  /**
10
10
  * Date of creation in RFC 3339 format.
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Task run status.
5
5
  */
6
- export type RunStatus = 'created' | 'finished' | 'idled' | 'skipped' | 'started';
6
+ export type RunStatus = 'created' | 'started' | 'idled' | 'finished' | 'skipped';
package/model/runType.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Task run type.
5
5
  */
6
- export type RunType = 'discover' | 'push' | 'reindex' | 'update' | 'validate';
6
+ export type RunType = 'reindex' | 'update' | 'discover' | 'validate' | 'push';
@@ -7,7 +7,7 @@ import type { ShopifyMetafield } from './shopifyMetafield';
7
7
  * Represents the required elements of the task input when using a `shopify` source.
8
8
  */
9
9
  export type ShopifyInput = {
10
- metafields: ShopifyMetafield[];
10
+ metafields: Array<ShopifyMetafield>;
11
11
 
12
12
  market: ShopifyMarket;
13
13
  };
@@ -4,9 +4,9 @@
4
4
  * Represents a market in Shopify.
5
5
  */
6
6
  export type ShopifyMarket = {
7
- countries: string[];
7
+ countries: Array<string>;
8
8
 
9
- currencies: string[];
9
+ currencies: Array<string>;
10
10
 
11
- locales: string[];
11
+ locales: Array<string>;
12
12
  };
@@ -11,9 +11,9 @@ export type SourceBigCommerce = {
11
11
 
12
12
  channel?: BigCommerceChannel;
13
13
 
14
- customFields?: string[];
14
+ customFields?: Array<string>;
15
15
 
16
- productMetafields?: BigCommerceMetafield[];
16
+ productMetafields?: Array<BigCommerceMetafield>;
17
17
 
18
- variantMetafields?: BigCommerceMetafield[];
18
+ variantMetafields?: Array<BigCommerceMetafield>;
19
19
  };
@@ -17,7 +17,7 @@ export type SourceCSV = {
17
17
  /**
18
18
  * Key-value pairs of column names and their expected types.
19
19
  */
20
- mapping?: Record<string, MappingTypeCSV>;
20
+ mapping?: { [key: string]: MappingTypeCSV };
21
21
 
22
22
  method?: MethodType;
23
23
 
@@ -3,12 +3,12 @@
3
3
  import type { CommercetoolsCustomFields } from './commercetoolsCustomFields';
4
4
 
5
5
  export type SourceCommercetools = {
6
- storeKeys?: string[];
6
+ storeKeys?: Array<string>;
7
7
 
8
8
  /**
9
9
  * Locales for your commercetools stores.
10
10
  */
11
- locales?: string[];
11
+ locales?: Array<string>;
12
12
 
13
13
  url: string;
14
14
 
@@ -10,11 +10,11 @@ import type { SourceJSON } from './sourceJSON';
10
10
  import type { SourceShopify } from './sourceShopify';
11
11
 
12
12
  export type SourceInput =
13
- | SourceBigCommerce
14
- | SourceBigQuery
15
13
  | SourceCommercetools
14
+ | SourceBigCommerce
15
+ | SourceJSON
16
16
  | SourceCSV
17
- | SourceDocker
17
+ | SourceBigQuery
18
18
  | SourceGA4BigQueryExport
19
- | SourceJSON
19
+ | SourceDocker
20
20
  | SourceShopify;
@@ -1,5 +1,5 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  export type SourceSearch = {
4
- sourceIDs: string[];
4
+ sourceIDs: Array<string>;
5
5
  };
@@ -3,4 +3,4 @@
3
3
  import type { SourceShopifyBase } from './sourceShopifyBase';
4
4
  import type { SourceUpdateShopify } from './sourceUpdateShopify';
5
5
 
6
- export type SourceShopify = SourceShopifyBase & SourceUpdateShopify;
6
+ export type SourceShopify = SourceUpdateShopify & SourceShopifyBase;
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Property by which to sort the list of sources.
5
5
  */
6
- export type SourceSortKeys = 'createdAt' | 'name' | 'type' | 'updatedAt';
6
+ export type SourceSortKeys = 'name' | 'type' | 'updatedAt' | 'createdAt';
@@ -8,6 +8,6 @@ export type SourceType =
8
8
  | 'docker'
9
9
  | 'ga4BigqueryExport'
10
10
  | 'json'
11
- | 'push'
11
+ | 'shopify'
12
12
  | 'sfcc'
13
- | 'shopify';
13
+ | 'push';
@@ -3,12 +3,12 @@
3
3
  import type { CommercetoolsCustomFields } from './commercetoolsCustomFields';
4
4
 
5
5
  export type SourceUpdateCommercetools = {
6
- storeKeys?: string[];
6
+ storeKeys?: Array<string>;
7
7
 
8
8
  /**
9
9
  * Locales for your commercetools stores.
10
10
  */
11
- locales?: string[];
11
+ locales?: Array<string>;
12
12
 
13
13
  url?: string;
14
14
 
@@ -9,10 +9,10 @@ import type { SourceUpdateDocker } from './sourceUpdateDocker';
9
9
  import type { SourceUpdateShopify } from './sourceUpdateShopify';
10
10
 
11
11
  export type SourceUpdateInput =
12
- | SourceBigQuery
12
+ | SourceUpdateCommercetools
13
+ | SourceJSON
13
14
  | SourceCSV
15
+ | SourceBigQuery
14
16
  | SourceGA4BigQueryExport
15
- | SourceJSON
16
- | SourceUpdateCommercetools
17
17
  | SourceUpdateDocker
18
18
  | SourceUpdateShopify;
@@ -4,5 +4,5 @@ export type SourceUpdateShopify = {
4
4
  /**
5
5
  * Feature flags for the Shopify source.
6
6
  */
7
- featureFlags?: Record<string, any>;
7
+ featureFlags?: { [key: string]: any };
8
8
  };
@@ -9,17 +9,17 @@ export type SourceWatchResponse = {
9
9
  runID?: string;
10
10
 
11
11
  /**
12
- * Depending on the source type, the validation returns sampling data of your source (JSON, CSV, BigQuery).
12
+ * depending on the source type, the validation returns sampling data of your source (JSON, CSV, BigQuery).
13
13
  */
14
14
  data?: Array<Record<string, unknown>>;
15
15
 
16
16
  /**
17
- * In case of error, observability events will be added to the response, if any.
17
+ * in case of error, observability events will be added to the response, if any.
18
18
  */
19
- events?: Event[];
19
+ events?: Array<Event>;
20
20
 
21
21
  /**
22
- * A message describing the outcome of a validate run.
22
+ * a message describing the outcome of a validate run.
23
23
  */
24
24
  message: string;
25
25
  };
@@ -3,6 +3,7 @@
3
3
  import type { OnDemandTriggerInput } from './onDemandTriggerInput';
4
4
  import type { ScheduleTriggerInput } from './scheduleTriggerInput';
5
5
  import type { StreamingTrigger } from './streamingTrigger';
6
+
6
7
  import type { SubscriptionTrigger } from './subscriptionTrigger';
7
8
 
8
- export type TaskCreateTrigger = OnDemandTriggerInput | ScheduleTriggerInput | StreamingTrigger | SubscriptionTrigger;
9
+ export type TaskCreateTrigger = OnDemandTriggerInput | ScheduleTriggerInput | SubscriptionTrigger | StreamingTrigger;
@@ -1,10 +1,12 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  import type { DockerStreamsInput } from './dockerStreamsInput';
4
+
4
5
  import type { ShopifyInput } from './shopifyInput';
6
+
5
7
  import type { StreamingInput } from './streamingInput';
6
8
 
7
9
  /**
8
10
  * Configuration of the task, depending on its type.
9
11
  */
10
- export type TaskInput = DockerStreamsInput | ShopifyInput | StreamingInput;
12
+ export type TaskInput = StreamingInput | DockerStreamsInput | ShopifyInput;
@@ -1,5 +1,5 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  export type TaskSearch = {
4
- taskIDs: string[];
4
+ taskIDs: Array<string>;
5
5
  };
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Property by which to sort the list of tasks.
5
5
  */
6
- export type TaskSortKeys = 'action' | 'createdAt' | 'enabled' | 'triggerType' | 'updatedAt';
6
+ export type TaskSortKeys = 'enabled' | 'triggerType' | 'action' | 'updatedAt' | 'createdAt';
@@ -7,9 +7,9 @@ export type Transformation = {
7
7
  transformationID: string;
8
8
 
9
9
  /**
10
- * The authentications associated for the current transformation.
10
+ * The authentications associated with the current transformation.
11
11
  */
12
- authenticationIDs?: string[];
12
+ authenticationIDs?: Array<string>;
13
13
 
14
14
  /**
15
15
  * The source code of the transformation.
@@ -20,7 +20,7 @@ export type TransformationCreate = {
20
20
  description?: string;
21
21
 
22
22
  /**
23
- * The authentications associated for the current transformation.
23
+ * The authentications associated with the current transformation.
24
24
  */
25
- authenticationIDs?: string[];
25
+ authenticationIDs?: Array<string>;
26
26
  };
@@ -1,5 +1,5 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  export type TransformationSearch = {
4
- transformationIDs: string[];
4
+ transformationIDs: Array<string>;
5
5
  };
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Property by which to sort the list of transformations.
5
5
  */
6
- export type TransformationSortKeys = 'createdAt' | 'name' | 'updatedAt';
6
+ export type TransformationSortKeys = 'name' | 'updatedAt' | 'createdAt';
@@ -13,5 +13,5 @@ export type TransformationTry = {
13
13
  */
14
14
  sampleRecord: Record<string, unknown>;
15
15
 
16
- authentications?: AuthenticationCreate[];
16
+ authentications?: Array<AuthenticationCreate>;
17
17
  };
package/model/trigger.ts CHANGED
@@ -3,9 +3,10 @@
3
3
  import type { OnDemandTrigger } from './onDemandTrigger';
4
4
  import type { ScheduleTrigger } from './scheduleTrigger';
5
5
  import type { StreamingTrigger } from './streamingTrigger';
6
+
6
7
  import type { SubscriptionTrigger } from './subscriptionTrigger';
7
8
 
8
9
  /**
9
10
  * Trigger that runs the task.
10
11
  */
11
- export type Trigger = OnDemandTrigger | ScheduleTrigger | StreamingTrigger | SubscriptionTrigger;
12
+ export type Trigger = OnDemandTrigger | ScheduleTrigger | SubscriptionTrigger | StreamingTrigger;
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Task trigger, describing when a task should run. - `onDemand`. Manually trigger the task with the `/run` endpoint. - `schedule`. Regularly trigger the task on a `cron` schedule. - `subscription`. Trigger the task after an event is received, such as, a webhook. - `streaming`. Run the task continuously.
5
5
  */
6
- export type TriggerType = 'onDemand' | 'schedule' | 'streaming' | 'subscription';
6
+ export type TriggerType = 'onDemand' | 'schedule' | 'subscription' | 'streaming';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.7.0",
2
+ "version": "1.8.1",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
@@ -49,16 +49,16 @@
49
49
  "index.d.ts"
50
50
  ],
51
51
  "dependencies": {
52
- "@algolia/client-common": "5.7.0",
53
- "@algolia/requester-browser-xhr": "5.7.0",
54
- "@algolia/requester-fetch": "5.7.0",
55
- "@algolia/requester-node-http": "5.7.0"
52
+ "@algolia/client-common": "5.8.1",
53
+ "@algolia/requester-browser-xhr": "5.8.1",
54
+ "@algolia/requester-fetch": "5.8.1",
55
+ "@algolia/requester-node-http": "5.8.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@arethetypeswrong/cli": "0.16.4",
59
59
  "@types/node": "22.7.4",
60
60
  "publint": "0.2.11",
61
- "rollup": "4.22.5",
61
+ "rollup": "4.24.0",
62
62
  "tsup": "8.3.0",
63
63
  "typescript": "5.6.2"
64
64
  },