@algolia/ingestion 1.0.0-alpha.8 → 1.0.0-alpha.81
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/builds/browser.d.ts +52 -5
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +52 -5
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/{ingestion.cjs.js → ingestion.cjs} +1321 -820
- package/dist/ingestion.esm.browser.js +1486 -964
- package/dist/ingestion.esm.node.js +1319 -819
- package/dist/ingestion.umd.js +2 -2
- package/dist/model/actionType.d.ts +4 -1
- package/dist/model/actionType.d.ts.map +1 -1
- package/dist/model/authAPIKey.d.ts +6 -3
- package/dist/model/authAPIKey.d.ts.map +1 -1
- package/dist/model/authAPIKeyPartial.d.ts +7 -0
- package/dist/model/authAPIKeyPartial.d.ts.map +1 -0
- package/dist/model/authAlgolia.d.ts +10 -4
- package/dist/model/authAlgolia.d.ts.map +1 -1
- package/dist/model/authAlgoliaPartial.d.ts +11 -0
- package/dist/model/authAlgoliaPartial.d.ts.map +1 -0
- package/dist/model/authBasic.d.ts +7 -4
- package/dist/model/authBasic.d.ts.map +1 -1
- package/dist/model/authBasicPartial.d.ts +8 -0
- package/dist/model/authBasicPartial.d.ts.map +1 -0
- package/dist/model/authGoogleServiceAccount.d.ts +13 -4
- package/dist/model/authGoogleServiceAccount.d.ts.map +1 -1
- package/dist/model/authGoogleServiceAccountPartial.d.ts +14 -0
- package/dist/model/authGoogleServiceAccountPartial.d.ts.map +1 -0
- package/dist/model/authInput.d.ts +6 -6
- package/dist/model/authInput.d.ts.map +1 -1
- package/dist/model/authInputPartial.d.ts +7 -0
- package/dist/model/authInputPartial.d.ts.map +1 -0
- package/dist/model/authOAuth.d.ts +17 -6
- package/dist/model/authOAuth.d.ts.map +1 -1
- package/dist/model/authOAuthPartial.d.ts +18 -0
- package/dist/model/authOAuthPartial.d.ts.map +1 -0
- package/dist/model/authentication.d.ts +27 -16
- package/dist/model/authentication.d.ts.map +1 -1
- package/dist/model/authenticationCreate.d.ts +15 -9
- package/dist/model/authenticationCreate.d.ts.map +1 -1
- package/dist/model/authenticationCreateResponse.d.ts +17 -8
- package/dist/model/authenticationCreateResponse.d.ts.map +1 -1
- package/dist/model/authenticationSearch.d.ts +7 -0
- package/dist/model/authenticationSearch.d.ts.map +1 -0
- package/dist/model/authenticationSortKeys.d.ts +5 -0
- package/dist/model/authenticationSortKeys.d.ts.map +1 -0
- package/dist/model/authenticationType.d.ts +4 -1
- package/dist/model/authenticationType.d.ts.map +1 -1
- package/dist/model/authenticationUpdate.d.ts +15 -9
- package/dist/model/authenticationUpdate.d.ts.map +1 -1
- package/dist/model/authenticationUpdateResponse.d.ts +17 -8
- package/dist/model/authenticationUpdateResponse.d.ts.map +1 -1
- package/dist/model/bigCommerceChannel.d.ts +11 -0
- package/dist/model/bigCommerceChannel.d.ts.map +1 -0
- package/dist/model/bigCommerceMetafield.d.ts +11 -0
- package/dist/model/bigCommerceMetafield.d.ts.map +1 -0
- package/dist/model/bigQueryDataType.d.ts +2 -0
- package/dist/model/bigQueryDataType.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +465 -282
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/commercetoolsCustomFields.d.ts +18 -0
- package/dist/model/commercetoolsCustomFields.d.ts.map +1 -0
- package/dist/model/deleteResponse.d.ts +6 -6
- package/dist/model/deleteResponse.d.ts.map +1 -1
- package/dist/model/destination.d.ts +29 -17
- package/dist/model/destination.d.ts.map +1 -1
- package/dist/model/destinationCreate.d.ts +17 -8
- package/dist/model/destinationCreate.d.ts.map +1 -1
- package/dist/model/destinationCreateResponse.d.ts +17 -8
- package/dist/model/destinationCreateResponse.d.ts.map +1 -1
- package/dist/model/destinationIndexName.d.ts +12 -3
- package/dist/model/destinationIndexName.d.ts.map +1 -1
- package/dist/model/destinationIndexPrefix.d.ts +6 -3
- package/dist/model/destinationIndexPrefix.d.ts.map +1 -1
- package/dist/model/destinationInput.d.ts +3 -3
- package/dist/model/destinationInput.d.ts.map +1 -1
- package/dist/model/destinationSearch.d.ts +7 -0
- package/dist/model/destinationSearch.d.ts.map +1 -0
- package/dist/model/destinationSortKeys.d.ts +5 -0
- package/dist/model/destinationSortKeys.d.ts.map +1 -0
- package/dist/model/destinationType.d.ts +4 -1
- package/dist/model/destinationType.d.ts.map +1 -1
- package/dist/model/destinationUpdate.d.ts +17 -8
- package/dist/model/destinationUpdate.d.ts.map +1 -1
- package/dist/model/destinationUpdateResponse.d.ts +17 -8
- package/dist/model/destinationUpdateResponse.d.ts.map +1 -1
- package/dist/model/dockerImageType.d.ts +5 -0
- package/dist/model/dockerImageType.d.ts.map +1 -0
- package/dist/model/dockerRegistry.d.ts +5 -0
- package/dist/model/dockerRegistry.d.ts.map +1 -0
- package/dist/model/dockerSourceDiscover.d.ts +11 -0
- package/dist/model/dockerSourceDiscover.d.ts.map +1 -0
- package/dist/model/dockerSourceStreams.d.ts +4 -0
- package/dist/model/dockerSourceStreams.d.ts.map +1 -0
- package/dist/model/errorBase.d.ts +6 -6
- package/dist/model/errorBase.d.ts.map +1 -1
- package/dist/model/event.d.ts +30 -14
- package/dist/model/event.d.ts.map +1 -1
- package/dist/model/eventSortKeys.d.ts +5 -0
- package/dist/model/eventSortKeys.d.ts.map +1 -0
- package/dist/model/eventStatus.d.ts +1 -1
- package/dist/model/eventStatus.d.ts.map +1 -1
- package/dist/model/eventType.d.ts +1 -1
- package/dist/model/eventType.d.ts.map +1 -1
- package/dist/model/index.d.ts +117 -63
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/listAuthenticationsResponse.d.ts +6 -6
- package/dist/model/listAuthenticationsResponse.d.ts.map +1 -1
- package/dist/model/listDestinationsResponse.d.ts +6 -6
- package/dist/model/listDestinationsResponse.d.ts.map +1 -1
- package/dist/model/listEventsResponse.d.ts +8 -6
- package/dist/model/listEventsResponse.d.ts.map +1 -1
- package/dist/model/listSourcesResponse.d.ts +6 -6
- package/dist/model/listSourcesResponse.d.ts.map +1 -1
- package/dist/model/listTasksResponse.d.ts +9 -6
- package/dist/model/listTasksResponse.d.ts.map +1 -1
- package/dist/model/mappingFieldDirective.d.ts +14 -0
- package/dist/model/mappingFieldDirective.d.ts.map +1 -0
- package/dist/model/mappingInput.d.ts +12 -0
- package/dist/model/mappingInput.d.ts.map +1 -0
- package/dist/model/mappingKitAction.d.ts +20 -0
- package/dist/model/mappingKitAction.d.ts.map +1 -0
- package/dist/model/mappingTypeCSV.d.ts +2 -0
- package/dist/model/mappingTypeCSV.d.ts.map +1 -0
- package/dist/model/methodType.d.ts +1 -1
- package/dist/model/methodType.d.ts.map +1 -1
- package/dist/model/onDemandDateUtilsInput.d.ts +16 -0
- package/dist/model/onDemandDateUtilsInput.d.ts.map +1 -0
- package/dist/model/onDemandTrigger.d.ts +12 -0
- package/dist/model/onDemandTrigger.d.ts.map +1 -0
- package/dist/model/onDemandTriggerInput.d.ts +8 -0
- package/dist/model/onDemandTriggerInput.d.ts.map +1 -0
- package/dist/model/onDemandTriggerType.d.ts +5 -0
- package/dist/model/onDemandTriggerType.d.ts.map +1 -0
- package/dist/model/orderKeys.d.ts +5 -0
- package/dist/model/orderKeys.d.ts.map +1 -0
- package/dist/model/pagination.d.ts +6 -6
- package/dist/model/pagination.d.ts.map +1 -1
- package/dist/model/platform.d.ts +5 -0
- package/dist/model/platform.d.ts.map +1 -0
- package/dist/model/platformNone.d.ts +5 -0
- package/dist/model/platformNone.d.ts.map +1 -0
- package/dist/model/platformWithNone.d.ts +4 -0
- package/dist/model/platformWithNone.d.ts.map +1 -0
- package/dist/model/recordType.d.ts +5 -0
- package/dist/model/recordType.d.ts.map +1 -0
- package/dist/model/run.d.ts +41 -29
- package/dist/model/run.d.ts.map +1 -1
- package/dist/model/runListResponse.d.ts +8 -6
- package/dist/model/runListResponse.d.ts.map +1 -1
- package/dist/model/runOutcome.d.ts +1 -1
- package/dist/model/runOutcome.d.ts.map +1 -1
- package/dist/model/runProgress.d.ts +4 -4
- package/dist/model/runProgress.d.ts.map +1 -1
- package/dist/model/runReasonCode.d.ts +5 -0
- package/dist/model/runReasonCode.d.ts.map +1 -0
- package/dist/model/runResponse.d.ts +13 -7
- package/dist/model/runResponse.d.ts.map +1 -1
- package/dist/model/runSortKeys.d.ts +5 -0
- package/dist/model/runSortKeys.d.ts.map +1 -0
- package/dist/model/runStatus.d.ts +1 -1
- package/dist/model/runStatus.d.ts.map +1 -1
- package/dist/model/runType.d.ts +1 -1
- package/dist/model/runType.d.ts.map +1 -1
- package/dist/model/scheduleDateUtilsInput.d.ts +12 -0
- package/dist/model/scheduleDateUtilsInput.d.ts.map +1 -0
- package/dist/model/scheduleTrigger.d.ts +20 -0
- package/dist/model/scheduleTrigger.d.ts.map +1 -0
- package/dist/model/scheduleTriggerInput.d.ts +12 -0
- package/dist/model/scheduleTriggerInput.d.ts.map +1 -0
- package/dist/model/scheduleTriggerType.d.ts +5 -0
- package/dist/model/scheduleTriggerType.d.ts.map +1 -0
- package/dist/model/source.d.ts +23 -17
- package/dist/model/source.d.ts.map +1 -1
- package/dist/model/sourceBigCommerce.d.ts +12 -3
- package/dist/model/sourceBigCommerce.d.ts.map +1 -1
- package/dist/model/sourceBigQuery.d.ts +29 -0
- package/dist/model/sourceBigQuery.d.ts.map +1 -0
- package/dist/model/sourceCSV.d.ts +22 -0
- package/dist/model/sourceCSV.d.ts.map +1 -0
- package/dist/model/sourceCommercetools.d.ts +15 -9
- package/dist/model/sourceCommercetools.d.ts.map +1 -1
- package/dist/model/sourceCreate.d.ts +11 -8
- package/dist/model/sourceCreate.d.ts.map +1 -1
- package/dist/model/sourceCreateResponse.d.ts +11 -8
- package/dist/model/sourceCreateResponse.d.ts.map +1 -1
- package/dist/model/sourceDocker.d.ts +19 -0
- package/dist/model/sourceDocker.d.ts.map +1 -0
- package/dist/model/sourceGA4BigQueryExport.d.ts +15 -0
- package/dist/model/sourceGA4BigQueryExport.d.ts.map +1 -0
- package/dist/model/sourceInput.d.ts +8 -4
- package/dist/model/sourceInput.d.ts.map +1 -1
- package/dist/model/sourceJSON.d.ts +13 -0
- package/dist/model/sourceJSON.d.ts.map +1 -0
- package/dist/model/sourceSearch.d.ts +4 -0
- package/dist/model/sourceSearch.d.ts.map +1 -0
- package/dist/model/sourceSortKeys.d.ts +5 -0
- package/dist/model/sourceSortKeys.d.ts.map +1 -0
- package/dist/model/sourceType.d.ts +1 -1
- package/dist/model/sourceType.d.ts.map +1 -1
- package/dist/model/sourceUpdate.d.ts +9 -8
- package/dist/model/sourceUpdate.d.ts.map +1 -1
- package/dist/model/sourceUpdateCommercetools.d.ts +18 -0
- package/dist/model/sourceUpdateCommercetools.d.ts.map +1 -0
- package/dist/model/sourceUpdateDocker.d.ts +17 -0
- package/dist/model/sourceUpdateDocker.d.ts.map +1 -0
- package/dist/model/sourceUpdateInput.d.ts +8 -0
- package/dist/model/sourceUpdateInput.d.ts.map +1 -0
- package/dist/model/sourceUpdateResponse.d.ts +11 -8
- package/dist/model/sourceUpdateResponse.d.ts.map +1 -1
- package/dist/model/streamingTrigger.d.ts +8 -0
- package/dist/model/streamingTrigger.d.ts.map +1 -0
- package/dist/model/streamingTriggerType.d.ts +5 -0
- package/dist/model/streamingTriggerType.d.ts.map +1 -0
- package/dist/model/streamingUtilsInput.d.ts +8 -0
- package/dist/model/streamingUtilsInput.d.ts.map +1 -0
- package/dist/model/subscriptionTrigger.d.ts +8 -0
- package/dist/model/subscriptionTrigger.d.ts.map +1 -0
- package/dist/model/subscriptionTriggerType.d.ts +5 -0
- package/dist/model/subscriptionTriggerType.d.ts.map +1 -0
- package/dist/model/task.d.ts +36 -18
- package/dist/model/task.d.ts.map +1 -1
- package/dist/model/taskCreate.d.ts +27 -9
- package/dist/model/taskCreate.d.ts.map +1 -1
- package/dist/model/taskCreateResponse.d.ts +13 -7
- package/dist/model/taskCreateResponse.d.ts.map +1 -1
- package/dist/model/taskCreateTrigger.d.ts +6 -0
- package/dist/model/taskCreateTrigger.d.ts.map +1 -0
- package/dist/model/taskInput.d.ts +5 -0
- package/dist/model/taskInput.d.ts.map +1 -0
- package/dist/model/taskSearch.d.ts +4 -0
- package/dist/model/taskSearch.d.ts.map +1 -0
- package/dist/model/taskSortKeys.d.ts +5 -0
- package/dist/model/taskSortKeys.d.ts.map +1 -0
- package/dist/model/taskUpdate.d.ts +21 -6
- package/dist/model/taskUpdate.d.ts.map +1 -1
- package/dist/model/taskUpdateResponse.d.ts +13 -7
- package/dist/model/taskUpdateResponse.d.ts.map +1 -1
- package/dist/model/trigger.d.ts +5 -13
- package/dist/model/trigger.d.ts.map +1 -1
- package/dist/model/triggerType.d.ts +4 -1
- package/dist/model/triggerType.d.ts.map +1 -1
- package/dist/model/triggerUpdateInput.d.ts +10 -0
- package/dist/model/triggerUpdateInput.d.ts.map +1 -0
- package/dist/model/window.d.ts +14 -0
- package/dist/model/window.d.ts.map +1 -0
- package/dist/src/ingestionClient.d.ts +574 -325
- package/dist/src/ingestionClient.d.ts.map +1 -1
- package/index.js +1 -1
- package/model/actionType.ts +5 -2
- package/model/authAPIKey.ts +4 -1
- package/model/authAPIKeyPartial.ts +8 -0
- package/model/authAlgolia.ts +7 -1
- package/model/authAlgoliaPartial.ts +13 -0
- package/model/authBasic.ts +4 -1
- package/model/authBasicPartial.ts +10 -0
- package/model/authGoogleServiceAccount.ts +10 -1
- package/model/authGoogleServiceAccountPartial.ts +16 -0
- package/model/authInput.ts +1 -1
- package/model/authInputPartial.ts +14 -0
- package/model/authOAuth.ts +13 -3
- package/model/authOAuthPartial.ts +21 -0
- package/model/authentication.ts +15 -3
- package/model/authenticationCreate.ts +9 -3
- package/model/authenticationCreateResponse.ts +10 -1
- package/model/authenticationSearch.ts +8 -0
- package/model/authenticationSortKeys.ts +11 -0
- package/model/authenticationType.ts +4 -1
- package/model/authenticationUpdate.ts +11 -5
- package/model/authenticationUpdateResponse.ts +10 -1
- package/model/bigCommerceChannel.ts +13 -0
- package/model/bigCommerceMetafield.ts +13 -0
- package/model/bigQueryDataType.ts +3 -0
- package/model/clientMethodProps.ts +224 -36
- package/model/commercetoolsCustomFields.ts +21 -0
- package/model/deleteResponse.ts +1 -1
- package/model/destination.ts +13 -1
- package/model/destinationCreate.ts +11 -2
- package/model/destinationCreateResponse.ts +10 -1
- package/model/destinationIndexName.ts +13 -1
- package/model/destinationIndexPrefix.ts +4 -1
- package/model/destinationInput.ts +1 -1
- package/model/destinationSearch.ts +8 -0
- package/model/destinationSortKeys.ts +6 -0
- package/model/destinationType.ts +5 -2
- package/model/destinationUpdate.ts +10 -1
- package/model/destinationUpdateResponse.ts +10 -1
- package/model/dockerImageType.ts +6 -0
- package/model/dockerRegistry.ts +6 -0
- package/model/dockerSourceDiscover.ts +13 -0
- package/model/dockerSourceStreams.ts +5 -0
- package/model/errorBase.ts +1 -1
- package/model/event.ts +18 -1
- package/model/eventSortKeys.ts +6 -0
- package/model/eventStatus.ts +2 -1
- package/model/eventType.ts +2 -2
- package/model/index.ts +60 -6
- package/model/listAuthenticationsResponse.ts +1 -1
- package/model/listDestinationsResponse.ts +1 -1
- package/model/listEventsResponse.ts +4 -1
- package/model/listSourcesResponse.ts +1 -1
- package/model/listTasksResponse.ts +4 -1
- package/model/mappingFieldDirective.ts +16 -0
- package/model/mappingInput.ts +15 -0
- package/model/mappingKitAction.ts +25 -0
- package/model/mappingTypeCSV.ts +8 -0
- package/model/methodType.ts +1 -1
- package/model/onDemandDateUtilsInput.ts +20 -0
- package/model/onDemandTrigger.ts +15 -0
- package/model/onDemandTriggerInput.ts +10 -0
- package/model/onDemandTriggerType.ts +6 -0
- package/model/orderKeys.ts +6 -0
- package/model/pagination.ts +1 -1
- package/model/platform.ts +6 -0
- package/model/platformNone.ts +6 -0
- package/model/platformWithNone.ts +6 -0
- package/model/recordType.ts +6 -0
- package/model/run.ts +20 -6
- package/model/runListResponse.ts +4 -1
- package/model/runOutcome.ts +2 -2
- package/model/runProgress.ts +1 -1
- package/model/runReasonCode.ts +13 -0
- package/model/runResponse.ts +7 -1
- package/model/runSortKeys.ts +6 -0
- package/model/runStatus.ts +7 -2
- package/model/runType.ts +2 -2
- package/model/scheduleDateUtilsInput.ts +15 -0
- package/model/scheduleTrigger.ts +25 -0
- package/model/scheduleTriggerInput.ts +15 -0
- package/model/scheduleTriggerType.ts +6 -0
- package/model/source.ts +7 -1
- package/model/sourceBigCommerce.ts +16 -2
- package/model/sourceBigQuery.ts +37 -0
- package/model/sourceCSV.ts +28 -0
- package/model/sourceCommercetools.ts +10 -1
- package/model/sourceCreate.ts +5 -2
- package/model/sourceCreateResponse.ts +4 -1
- package/model/sourceDocker.ts +25 -0
- package/model/sourceGA4BigQueryExport.ts +18 -0
- package/model/sourceInput.ts +14 -3
- package/model/sourceJSON.ts +17 -0
- package/model/sourceSearch.ts +5 -0
- package/model/sourceSortKeys.ts +6 -0
- package/model/sourceType.ts +9 -2
- package/model/sourceUpdate.ts +6 -6
- package/model/sourceUpdateCommercetools.ts +24 -0
- package/model/sourceUpdateDocker.ts +22 -0
- package/model/sourceUpdateInput.ts +16 -0
- package/model/sourceUpdateResponse.ts +4 -1
- package/model/streamingTrigger.ts +10 -0
- package/model/streamingTriggerType.ts +6 -0
- package/model/streamingUtilsInput.ts +10 -0
- package/model/subscriptionTrigger.ts +10 -0
- package/model/subscriptionTriggerType.ts +6 -0
- package/model/task.ts +22 -2
- package/model/taskCreate.ts +23 -3
- package/model/taskCreateResponse.ts +7 -1
- package/model/taskCreateTrigger.ts +12 -0
- package/model/taskInput.ts +10 -0
- package/model/taskSearch.ts +5 -0
- package/model/taskSortKeys.ts +11 -0
- package/model/taskUpdate.ts +20 -3
- package/model/taskUpdateResponse.ts +7 -1
- package/model/trigger.ts +12 -19
- package/model/triggerType.ts +9 -2
- package/model/triggerUpdateInput.ts +11 -0
- package/model/window.ts +16 -0
- package/package.json +10 -9
- package/dist/model/authenticationInput.d.ts +0 -5
- package/dist/model/authenticationInput.d.ts.map +0 -1
- package/dist/model/authenticationWithInput.d.ts +0 -4
- package/dist/model/authenticationWithInput.d.ts.map +0 -1
- package/dist/model/platformType.d.ts +0 -2
- package/dist/model/platformType.d.ts.map +0 -1
- package/dist/model/sourceJson.d.ts +0 -6
- package/dist/model/sourceJson.d.ts.map +0 -1
- package/dist/model/triggerInput.d.ts +0 -6
- package/dist/model/triggerInput.d.ts.map +0 -1
- package/model/authenticationInput.ts +0 -7
- package/model/authenticationWithInput.ts +0 -6
- package/model/platformType.ts +0 -3
- package/model/sourceJson.ts +0 -9
- package/model/triggerInput.ts +0 -9
|
@@ -1,826 +1,1326 @@
|
|
|
1
1
|
import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache } from '@algolia/client-common';
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
|
-
//
|
|
5
|
-
const apiClientVersion = '1.0.0-alpha.
|
|
6
|
-
const REGIONS = ['us'];
|
|
7
|
-
function getDefaultHosts(region) {
|
|
8
|
-
const url = 'data.{region}.algolia.com'.replace('{region}', region);
|
|
9
|
-
return [{ url, accept: 'readWrite', protocol: 'https' }];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
const
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* @param
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
const
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
* @
|
|
236
|
-
* @param
|
|
237
|
-
* @param
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
const
|
|
245
|
-
const
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
* @
|
|
259
|
-
* @param
|
|
260
|
-
* @param
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
const
|
|
268
|
-
const
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
* @
|
|
282
|
-
* @param
|
|
283
|
-
* @param
|
|
284
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
285
|
-
*/
|
|
286
|
-
|
|
287
|
-
if (!
|
|
288
|
-
throw new Error('Parameter `
|
|
289
|
-
}
|
|
290
|
-
const requestPath = '/1
|
|
291
|
-
const headers = {};
|
|
292
|
-
const queryParameters = {};
|
|
293
|
-
const request = {
|
|
294
|
-
method: 'POST',
|
|
295
|
-
path: requestPath,
|
|
296
|
-
queryParameters,
|
|
297
|
-
headers,
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
* @param
|
|
306
|
-
* @param
|
|
307
|
-
* @param
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
const
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
if (
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
const
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
const headers = {};
|
|
421
|
-
const queryParameters = {};
|
|
422
|
-
const request = {
|
|
423
|
-
method: '
|
|
424
|
-
path: requestPath,
|
|
425
|
-
queryParameters,
|
|
426
|
-
headers,
|
|
427
|
-
};
|
|
428
|
-
return transporter.request(request, requestOptions);
|
|
429
|
-
},
|
|
430
|
-
/**
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
* @param
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
* @param
|
|
466
|
-
* @param
|
|
467
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
468
|
-
*/
|
|
469
|
-
|
|
470
|
-
if (!
|
|
471
|
-
throw new Error('Parameter `
|
|
472
|
-
}
|
|
473
|
-
const requestPath = '/1/
|
|
474
|
-
const headers = {};
|
|
475
|
-
const queryParameters = {};
|
|
476
|
-
const request = {
|
|
477
|
-
method: '
|
|
478
|
-
path: requestPath,
|
|
479
|
-
queryParameters,
|
|
480
|
-
headers,
|
|
481
|
-
};
|
|
482
|
-
return transporter.request(request, requestOptions);
|
|
483
|
-
},
|
|
484
|
-
/**
|
|
485
|
-
* Get
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
if (
|
|
498
|
-
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
const request = {
|
|
504
|
-
method: 'GET',
|
|
505
|
-
path: requestPath,
|
|
506
|
-
queryParameters,
|
|
507
|
-
headers,
|
|
508
|
-
};
|
|
509
|
-
return transporter.request(request, requestOptions);
|
|
510
|
-
},
|
|
511
|
-
/**
|
|
512
|
-
* Get a list of
|
|
513
|
-
*
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
* @param
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
* @
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
const
|
|
576
|
-
const
|
|
577
|
-
const
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
* @
|
|
596
|
-
* @param
|
|
597
|
-
* @param
|
|
598
|
-
* @param
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
const
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
queryParameters
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
}
|
|
650
|
-
const
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
*
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
*
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
if (
|
|
720
|
-
|
|
721
|
-
}
|
|
722
|
-
if (
|
|
723
|
-
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
4
|
+
// 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.
|
|
5
|
+
const apiClientVersion = '1.0.0-alpha.81';
|
|
6
|
+
const REGIONS = ['eu', 'us'];
|
|
7
|
+
function getDefaultHosts(region) {
|
|
8
|
+
const url = 'data.{region}.algolia.com'.replace('{region}', region);
|
|
9
|
+
return [{ url, accept: 'readWrite', protocol: 'https' }];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Guard: Return strongly typed specific OnDemandTrigger for a given Trigger.
|
|
13
|
+
*
|
|
14
|
+
* @summary Guard method that returns a strongly typed specific OnDemandTrigger for a given Trigger.
|
|
15
|
+
* @param trigger - The given Task Trigger.
|
|
16
|
+
*/
|
|
17
|
+
function isOnDemandTrigger(trigger) {
|
|
18
|
+
return trigger.type === 'onDemand';
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Guard: Return strongly typed specific ScheduleTrigger for a given Trigger.
|
|
22
|
+
*
|
|
23
|
+
* @summary Guard method that returns a strongly typed specific ScheduleTrigger for a given Trigger.
|
|
24
|
+
* @param trigger - The given Task Trigger.
|
|
25
|
+
*/
|
|
26
|
+
function isScheduleTrigger(trigger) {
|
|
27
|
+
return trigger.type === 'schedule';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Guard: Return strongly typed specific SubscriptionTrigger for a given Trigger.
|
|
31
|
+
*
|
|
32
|
+
* @summary Guard method that returns a strongly typed specific SubscriptionTrigger for a given Trigger.
|
|
33
|
+
* @param trigger - The given Task Trigger.
|
|
34
|
+
*/
|
|
35
|
+
function isSubscriptionTrigger(trigger) {
|
|
36
|
+
return trigger.type === 'subscription';
|
|
37
|
+
}
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
39
|
+
function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
40
|
+
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
41
|
+
const transporter = createTransporter({
|
|
42
|
+
hosts: getDefaultHosts(regionOption),
|
|
43
|
+
...options,
|
|
44
|
+
algoliaAgent: getAlgoliaAgent({
|
|
45
|
+
algoliaAgents,
|
|
46
|
+
client: 'Ingestion',
|
|
47
|
+
version: apiClientVersion,
|
|
48
|
+
}),
|
|
49
|
+
baseHeaders: {
|
|
50
|
+
'content-type': 'text/plain',
|
|
51
|
+
...auth.headers(),
|
|
52
|
+
...options.baseHeaders,
|
|
53
|
+
},
|
|
54
|
+
baseQueryParameters: {
|
|
55
|
+
...auth.queryParameters(),
|
|
56
|
+
...options.baseQueryParameters,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
transporter,
|
|
61
|
+
/**
|
|
62
|
+
* The `appId` currently in use.
|
|
63
|
+
*/
|
|
64
|
+
appId: appIdOption,
|
|
65
|
+
/**
|
|
66
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
67
|
+
*/
|
|
68
|
+
clearCache() {
|
|
69
|
+
return Promise.all([
|
|
70
|
+
transporter.requestsCache.clear(),
|
|
71
|
+
transporter.responsesCache.clear(),
|
|
72
|
+
]).then(() => undefined);
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
76
|
+
*/
|
|
77
|
+
get _ua() {
|
|
78
|
+
return transporter.algoliaAgent.value;
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
82
|
+
*
|
|
83
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
84
|
+
* @param version - The version of the agent.
|
|
85
|
+
*/
|
|
86
|
+
addAlgoliaAgent(segment, version) {
|
|
87
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
88
|
+
},
|
|
89
|
+
/**
|
|
90
|
+
* Create a authentication.
|
|
91
|
+
*
|
|
92
|
+
* Required API Key ACLs:
|
|
93
|
+
* - addObject
|
|
94
|
+
* - deleteIndex
|
|
95
|
+
* - editSettings.
|
|
96
|
+
*
|
|
97
|
+
* @param authenticationCreate -.
|
|
98
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
99
|
+
*/
|
|
100
|
+
createAuthentication(authenticationCreate, requestOptions) {
|
|
101
|
+
if (!authenticationCreate) {
|
|
102
|
+
throw new Error('Parameter `authenticationCreate` is required when calling `createAuthentication`.');
|
|
103
|
+
}
|
|
104
|
+
if (!authenticationCreate.type) {
|
|
105
|
+
throw new Error('Parameter `authenticationCreate.type` is required when calling `createAuthentication`.');
|
|
106
|
+
}
|
|
107
|
+
if (!authenticationCreate.name) {
|
|
108
|
+
throw new Error('Parameter `authenticationCreate.name` is required when calling `createAuthentication`.');
|
|
109
|
+
}
|
|
110
|
+
if (!authenticationCreate.input) {
|
|
111
|
+
throw new Error('Parameter `authenticationCreate.input` is required when calling `createAuthentication`.');
|
|
112
|
+
}
|
|
113
|
+
const requestPath = '/1/authentications';
|
|
114
|
+
const headers = {};
|
|
115
|
+
const queryParameters = {};
|
|
116
|
+
const request = {
|
|
117
|
+
method: 'POST',
|
|
118
|
+
path: requestPath,
|
|
119
|
+
queryParameters,
|
|
120
|
+
headers,
|
|
121
|
+
data: authenticationCreate,
|
|
122
|
+
};
|
|
123
|
+
return transporter.request(request, requestOptions);
|
|
124
|
+
},
|
|
125
|
+
/**
|
|
126
|
+
* Create a destination.
|
|
127
|
+
*
|
|
128
|
+
* Required API Key ACLs:
|
|
129
|
+
* - addObject
|
|
130
|
+
* - deleteIndex
|
|
131
|
+
* - editSettings.
|
|
132
|
+
*
|
|
133
|
+
* @param destinationCreate -.
|
|
134
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
135
|
+
*/
|
|
136
|
+
createDestination(destinationCreate, requestOptions) {
|
|
137
|
+
if (!destinationCreate) {
|
|
138
|
+
throw new Error('Parameter `destinationCreate` is required when calling `createDestination`.');
|
|
139
|
+
}
|
|
140
|
+
if (!destinationCreate.type) {
|
|
141
|
+
throw new Error('Parameter `destinationCreate.type` is required when calling `createDestination`.');
|
|
142
|
+
}
|
|
143
|
+
if (!destinationCreate.name) {
|
|
144
|
+
throw new Error('Parameter `destinationCreate.name` is required when calling `createDestination`.');
|
|
145
|
+
}
|
|
146
|
+
if (!destinationCreate.input) {
|
|
147
|
+
throw new Error('Parameter `destinationCreate.input` is required when calling `createDestination`.');
|
|
148
|
+
}
|
|
149
|
+
const requestPath = '/1/destinations';
|
|
150
|
+
const headers = {};
|
|
151
|
+
const queryParameters = {};
|
|
152
|
+
const request = {
|
|
153
|
+
method: 'POST',
|
|
154
|
+
path: requestPath,
|
|
155
|
+
queryParameters,
|
|
156
|
+
headers,
|
|
157
|
+
data: destinationCreate,
|
|
158
|
+
};
|
|
159
|
+
return transporter.request(request, requestOptions);
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* Create a source.
|
|
163
|
+
*
|
|
164
|
+
* Required API Key ACLs:
|
|
165
|
+
* - addObject
|
|
166
|
+
* - deleteIndex
|
|
167
|
+
* - editSettings.
|
|
168
|
+
*
|
|
169
|
+
* @param sourceCreate -.
|
|
170
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
171
|
+
*/
|
|
172
|
+
createSource(sourceCreate, requestOptions) {
|
|
173
|
+
if (!sourceCreate) {
|
|
174
|
+
throw new Error('Parameter `sourceCreate` is required when calling `createSource`.');
|
|
175
|
+
}
|
|
176
|
+
if (!sourceCreate.type) {
|
|
177
|
+
throw new Error('Parameter `sourceCreate.type` is required when calling `createSource`.');
|
|
178
|
+
}
|
|
179
|
+
if (!sourceCreate.name) {
|
|
180
|
+
throw new Error('Parameter `sourceCreate.name` is required when calling `createSource`.');
|
|
181
|
+
}
|
|
182
|
+
if (!sourceCreate.input) {
|
|
183
|
+
throw new Error('Parameter `sourceCreate.input` is required when calling `createSource`.');
|
|
184
|
+
}
|
|
185
|
+
const requestPath = '/1/sources';
|
|
186
|
+
const headers = {};
|
|
187
|
+
const queryParameters = {};
|
|
188
|
+
const request = {
|
|
189
|
+
method: 'POST',
|
|
190
|
+
path: requestPath,
|
|
191
|
+
queryParameters,
|
|
192
|
+
headers,
|
|
193
|
+
data: sourceCreate,
|
|
194
|
+
};
|
|
195
|
+
return transporter.request(request, requestOptions);
|
|
196
|
+
},
|
|
197
|
+
/**
|
|
198
|
+
* Create a task.
|
|
199
|
+
*
|
|
200
|
+
* @param taskCreate -.
|
|
201
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
202
|
+
*/
|
|
203
|
+
createTask(taskCreate, requestOptions) {
|
|
204
|
+
if (!taskCreate) {
|
|
205
|
+
throw new Error('Parameter `taskCreate` is required when calling `createTask`.');
|
|
206
|
+
}
|
|
207
|
+
if (!taskCreate.sourceID) {
|
|
208
|
+
throw new Error('Parameter `taskCreate.sourceID` is required when calling `createTask`.');
|
|
209
|
+
}
|
|
210
|
+
if (!taskCreate.destinationID) {
|
|
211
|
+
throw new Error('Parameter `taskCreate.destinationID` is required when calling `createTask`.');
|
|
212
|
+
}
|
|
213
|
+
if (!taskCreate.trigger) {
|
|
214
|
+
throw new Error('Parameter `taskCreate.trigger` is required when calling `createTask`.');
|
|
215
|
+
}
|
|
216
|
+
if (!taskCreate.action) {
|
|
217
|
+
throw new Error('Parameter `taskCreate.action` is required when calling `createTask`.');
|
|
218
|
+
}
|
|
219
|
+
const requestPath = '/1/tasks';
|
|
220
|
+
const headers = {};
|
|
221
|
+
const queryParameters = {};
|
|
222
|
+
const request = {
|
|
223
|
+
method: 'POST',
|
|
224
|
+
path: requestPath,
|
|
225
|
+
queryParameters,
|
|
226
|
+
headers,
|
|
227
|
+
data: taskCreate,
|
|
228
|
+
};
|
|
229
|
+
return transporter.request(request, requestOptions);
|
|
230
|
+
},
|
|
231
|
+
/**
|
|
232
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
233
|
+
*
|
|
234
|
+
* @param customDelete - The customDelete object.
|
|
235
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
236
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
237
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
238
|
+
*/
|
|
239
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
240
|
+
if (!path) {
|
|
241
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
242
|
+
}
|
|
243
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
244
|
+
const headers = {};
|
|
245
|
+
const queryParameters = parameters ? parameters : {};
|
|
246
|
+
const request = {
|
|
247
|
+
method: 'DELETE',
|
|
248
|
+
path: requestPath,
|
|
249
|
+
queryParameters,
|
|
250
|
+
headers,
|
|
251
|
+
};
|
|
252
|
+
return transporter.request(request, requestOptions);
|
|
253
|
+
},
|
|
254
|
+
/**
|
|
255
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
256
|
+
*
|
|
257
|
+
* @param customGet - The customGet object.
|
|
258
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
259
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
260
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
261
|
+
*/
|
|
262
|
+
customGet({ path, parameters }, requestOptions) {
|
|
263
|
+
if (!path) {
|
|
264
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
265
|
+
}
|
|
266
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
267
|
+
const headers = {};
|
|
268
|
+
const queryParameters = parameters ? parameters : {};
|
|
269
|
+
const request = {
|
|
270
|
+
method: 'GET',
|
|
271
|
+
path: requestPath,
|
|
272
|
+
queryParameters,
|
|
273
|
+
headers,
|
|
274
|
+
};
|
|
275
|
+
return transporter.request(request, requestOptions);
|
|
276
|
+
},
|
|
277
|
+
/**
|
|
278
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
279
|
+
*
|
|
280
|
+
* @param customPost - The customPost object.
|
|
281
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
282
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
283
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
284
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
285
|
+
*/
|
|
286
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
287
|
+
if (!path) {
|
|
288
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
289
|
+
}
|
|
290
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
291
|
+
const headers = {};
|
|
292
|
+
const queryParameters = parameters ? parameters : {};
|
|
293
|
+
const request = {
|
|
294
|
+
method: 'POST',
|
|
295
|
+
path: requestPath,
|
|
296
|
+
queryParameters,
|
|
297
|
+
headers,
|
|
298
|
+
data: body ? body : {},
|
|
299
|
+
};
|
|
300
|
+
return transporter.request(request, requestOptions);
|
|
301
|
+
},
|
|
302
|
+
/**
|
|
303
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
304
|
+
*
|
|
305
|
+
* @param customPut - The customPut object.
|
|
306
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
307
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
308
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
309
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
310
|
+
*/
|
|
311
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
312
|
+
if (!path) {
|
|
313
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
314
|
+
}
|
|
315
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
316
|
+
const headers = {};
|
|
317
|
+
const queryParameters = parameters ? parameters : {};
|
|
318
|
+
const request = {
|
|
319
|
+
method: 'PUT',
|
|
320
|
+
path: requestPath,
|
|
321
|
+
queryParameters,
|
|
322
|
+
headers,
|
|
323
|
+
data: body ? body : {},
|
|
324
|
+
};
|
|
325
|
+
return transporter.request(request, requestOptions);
|
|
326
|
+
},
|
|
327
|
+
/**
|
|
328
|
+
* Soft delete the authentication of the given authenticationID.
|
|
329
|
+
*
|
|
330
|
+
* Required API Key ACLs:
|
|
331
|
+
* - addObject
|
|
332
|
+
* - deleteIndex
|
|
333
|
+
* - editSettings.
|
|
334
|
+
*
|
|
335
|
+
* @param deleteAuthentication - The deleteAuthentication object.
|
|
336
|
+
* @param deleteAuthentication.authenticationID - The authentication UUID.
|
|
337
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
338
|
+
*/
|
|
339
|
+
deleteAuthentication({ authenticationID }, requestOptions) {
|
|
340
|
+
if (!authenticationID) {
|
|
341
|
+
throw new Error('Parameter `authenticationID` is required when calling `deleteAuthentication`.');
|
|
342
|
+
}
|
|
343
|
+
const requestPath = '/1/authentications/{authenticationID}'.replace('{authenticationID}', encodeURIComponent(authenticationID));
|
|
344
|
+
const headers = {};
|
|
345
|
+
const queryParameters = {};
|
|
346
|
+
const request = {
|
|
347
|
+
method: 'DELETE',
|
|
348
|
+
path: requestPath,
|
|
349
|
+
queryParameters,
|
|
350
|
+
headers,
|
|
351
|
+
};
|
|
352
|
+
return transporter.request(request, requestOptions);
|
|
353
|
+
},
|
|
354
|
+
/**
|
|
355
|
+
* Soft delete the destination of the given destinationID.
|
|
356
|
+
*
|
|
357
|
+
* Required API Key ACLs:
|
|
358
|
+
* - addObject
|
|
359
|
+
* - deleteIndex
|
|
360
|
+
* - editSettings.
|
|
361
|
+
*
|
|
362
|
+
* @param deleteDestination - The deleteDestination object.
|
|
363
|
+
* @param deleteDestination.destinationID - The destination UUID.
|
|
364
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
365
|
+
*/
|
|
366
|
+
deleteDestination({ destinationID }, requestOptions) {
|
|
367
|
+
if (!destinationID) {
|
|
368
|
+
throw new Error('Parameter `destinationID` is required when calling `deleteDestination`.');
|
|
369
|
+
}
|
|
370
|
+
const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
|
|
371
|
+
const headers = {};
|
|
372
|
+
const queryParameters = {};
|
|
373
|
+
const request = {
|
|
374
|
+
method: 'DELETE',
|
|
375
|
+
path: requestPath,
|
|
376
|
+
queryParameters,
|
|
377
|
+
headers,
|
|
378
|
+
};
|
|
379
|
+
return transporter.request(request, requestOptions);
|
|
380
|
+
},
|
|
381
|
+
/**
|
|
382
|
+
* Soft delete the source of the given sourceID.
|
|
383
|
+
*
|
|
384
|
+
* Required API Key ACLs:
|
|
385
|
+
* - addObject
|
|
386
|
+
* - deleteIndex
|
|
387
|
+
* - editSettings.
|
|
388
|
+
*
|
|
389
|
+
* @param deleteSource - The deleteSource object.
|
|
390
|
+
* @param deleteSource.sourceID - The source UUID.
|
|
391
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
392
|
+
*/
|
|
393
|
+
deleteSource({ sourceID }, requestOptions) {
|
|
394
|
+
if (!sourceID) {
|
|
395
|
+
throw new Error('Parameter `sourceID` is required when calling `deleteSource`.');
|
|
396
|
+
}
|
|
397
|
+
const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
398
|
+
const headers = {};
|
|
399
|
+
const queryParameters = {};
|
|
400
|
+
const request = {
|
|
401
|
+
method: 'DELETE',
|
|
402
|
+
path: requestPath,
|
|
403
|
+
queryParameters,
|
|
404
|
+
headers,
|
|
405
|
+
};
|
|
406
|
+
return transporter.request(request, requestOptions);
|
|
407
|
+
},
|
|
408
|
+
/**
|
|
409
|
+
* Soft delete the task of the given taskID.
|
|
410
|
+
*
|
|
411
|
+
* @param deleteTask - The deleteTask object.
|
|
412
|
+
* @param deleteTask.taskID - The task UUID.
|
|
413
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
414
|
+
*/
|
|
415
|
+
deleteTask({ taskID }, requestOptions) {
|
|
416
|
+
if (!taskID) {
|
|
417
|
+
throw new Error('Parameter `taskID` is required when calling `deleteTask`.');
|
|
418
|
+
}
|
|
419
|
+
const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
420
|
+
const headers = {};
|
|
421
|
+
const queryParameters = {};
|
|
422
|
+
const request = {
|
|
423
|
+
method: 'DELETE',
|
|
424
|
+
path: requestPath,
|
|
425
|
+
queryParameters,
|
|
426
|
+
headers,
|
|
427
|
+
};
|
|
428
|
+
return transporter.request(request, requestOptions);
|
|
429
|
+
},
|
|
430
|
+
/**
|
|
431
|
+
* Disable the task of the given taskID.
|
|
432
|
+
*
|
|
433
|
+
* Required API Key ACLs:
|
|
434
|
+
* - addObject
|
|
435
|
+
* - deleteIndex
|
|
436
|
+
* - editSettings.
|
|
437
|
+
*
|
|
438
|
+
* @param disableTask - The disableTask object.
|
|
439
|
+
* @param disableTask.taskID - The task UUID.
|
|
440
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
441
|
+
*/
|
|
442
|
+
disableTask({ taskID }, requestOptions) {
|
|
443
|
+
if (!taskID) {
|
|
444
|
+
throw new Error('Parameter `taskID` is required when calling `disableTask`.');
|
|
445
|
+
}
|
|
446
|
+
const requestPath = '/1/tasks/{taskID}/disable'.replace('{taskID}', encodeURIComponent(taskID));
|
|
447
|
+
const headers = {};
|
|
448
|
+
const queryParameters = {};
|
|
449
|
+
const request = {
|
|
450
|
+
method: 'PUT',
|
|
451
|
+
path: requestPath,
|
|
452
|
+
queryParameters,
|
|
453
|
+
headers,
|
|
454
|
+
};
|
|
455
|
+
return transporter.request(request, requestOptions);
|
|
456
|
+
},
|
|
457
|
+
/**
|
|
458
|
+
* Enable the task of the given taskID.
|
|
459
|
+
*
|
|
460
|
+
* Required API Key ACLs:
|
|
461
|
+
* - addObject
|
|
462
|
+
* - deleteIndex
|
|
463
|
+
* - editSettings.
|
|
464
|
+
*
|
|
465
|
+
* @param enableTask - The enableTask object.
|
|
466
|
+
* @param enableTask.taskID - The task UUID.
|
|
467
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
468
|
+
*/
|
|
469
|
+
enableTask({ taskID }, requestOptions) {
|
|
470
|
+
if (!taskID) {
|
|
471
|
+
throw new Error('Parameter `taskID` is required when calling `enableTask`.');
|
|
472
|
+
}
|
|
473
|
+
const requestPath = '/1/tasks/{taskID}/enable'.replace('{taskID}', encodeURIComponent(taskID));
|
|
474
|
+
const headers = {};
|
|
475
|
+
const queryParameters = {};
|
|
476
|
+
const request = {
|
|
477
|
+
method: 'PUT',
|
|
478
|
+
path: requestPath,
|
|
479
|
+
queryParameters,
|
|
480
|
+
headers,
|
|
481
|
+
};
|
|
482
|
+
return transporter.request(request, requestOptions);
|
|
483
|
+
},
|
|
484
|
+
/**
|
|
485
|
+
* Get the authentication of the given authenticationID.
|
|
486
|
+
*
|
|
487
|
+
* Required API Key ACLs:
|
|
488
|
+
* - addObject
|
|
489
|
+
* - deleteIndex
|
|
490
|
+
* - editSettings.
|
|
491
|
+
*
|
|
492
|
+
* @param getAuthentication - The getAuthentication object.
|
|
493
|
+
* @param getAuthentication.authenticationID - The authentication UUID.
|
|
494
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
495
|
+
*/
|
|
496
|
+
getAuthentication({ authenticationID }, requestOptions) {
|
|
497
|
+
if (!authenticationID) {
|
|
498
|
+
throw new Error('Parameter `authenticationID` is required when calling `getAuthentication`.');
|
|
499
|
+
}
|
|
500
|
+
const requestPath = '/1/authentications/{authenticationID}'.replace('{authenticationID}', encodeURIComponent(authenticationID));
|
|
501
|
+
const headers = {};
|
|
502
|
+
const queryParameters = {};
|
|
503
|
+
const request = {
|
|
504
|
+
method: 'GET',
|
|
505
|
+
path: requestPath,
|
|
506
|
+
queryParameters,
|
|
507
|
+
headers,
|
|
508
|
+
};
|
|
509
|
+
return transporter.request(request, requestOptions);
|
|
510
|
+
},
|
|
511
|
+
/**
|
|
512
|
+
* Get a list of authentications for the given query parameters, with pagination details.
|
|
513
|
+
*
|
|
514
|
+
* Required API Key ACLs:
|
|
515
|
+
* - addObject
|
|
516
|
+
* - deleteIndex
|
|
517
|
+
* - editSettings.
|
|
518
|
+
*
|
|
519
|
+
* @param getAuthentications - The getAuthentications object.
|
|
520
|
+
* @param getAuthentications.itemsPerPage - The number of items per page to return.
|
|
521
|
+
* @param getAuthentications.page - The page number to fetch, starting at 1.
|
|
522
|
+
* @param getAuthentications.type - The type of the authentications to retrieve.
|
|
523
|
+
* @param getAuthentications.platform - The platform of the authentications to retrieve.
|
|
524
|
+
* @param getAuthentications.sort - The key by which the list should be sorted.
|
|
525
|
+
* @param getAuthentications.order - The order of the returned list.
|
|
526
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
527
|
+
*/
|
|
528
|
+
getAuthentications({ itemsPerPage, page, type, platform, sort, order, } = {}, requestOptions = undefined) {
|
|
529
|
+
const requestPath = '/1/authentications';
|
|
530
|
+
const headers = {};
|
|
531
|
+
const queryParameters = {};
|
|
532
|
+
if (itemsPerPage !== undefined) {
|
|
533
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
534
|
+
}
|
|
535
|
+
if (page !== undefined) {
|
|
536
|
+
queryParameters.page = page.toString();
|
|
537
|
+
}
|
|
538
|
+
if (type !== undefined) {
|
|
539
|
+
queryParameters.type = type.toString();
|
|
540
|
+
}
|
|
541
|
+
if (platform !== undefined) {
|
|
542
|
+
queryParameters.platform = platform.toString();
|
|
543
|
+
}
|
|
544
|
+
if (sort !== undefined) {
|
|
545
|
+
queryParameters.sort = sort.toString();
|
|
546
|
+
}
|
|
547
|
+
if (order !== undefined) {
|
|
548
|
+
queryParameters.order = order.toString();
|
|
549
|
+
}
|
|
550
|
+
const request = {
|
|
551
|
+
method: 'GET',
|
|
552
|
+
path: requestPath,
|
|
553
|
+
queryParameters,
|
|
554
|
+
headers,
|
|
555
|
+
};
|
|
556
|
+
return transporter.request(request, requestOptions);
|
|
557
|
+
},
|
|
558
|
+
/**
|
|
559
|
+
* Get the destination of the given destinationID.
|
|
560
|
+
*
|
|
561
|
+
* Required API Key ACLs:
|
|
562
|
+
* - addObject
|
|
563
|
+
* - deleteIndex
|
|
564
|
+
* - editSettings.
|
|
565
|
+
*
|
|
566
|
+
* @param getDestination - The getDestination object.
|
|
567
|
+
* @param getDestination.destinationID - The destination UUID.
|
|
568
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
569
|
+
*/
|
|
570
|
+
getDestination({ destinationID }, requestOptions) {
|
|
571
|
+
if (!destinationID) {
|
|
572
|
+
throw new Error('Parameter `destinationID` is required when calling `getDestination`.');
|
|
573
|
+
}
|
|
574
|
+
const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
|
|
575
|
+
const headers = {};
|
|
576
|
+
const queryParameters = {};
|
|
577
|
+
const request = {
|
|
578
|
+
method: 'GET',
|
|
579
|
+
path: requestPath,
|
|
580
|
+
queryParameters,
|
|
581
|
+
headers,
|
|
582
|
+
};
|
|
583
|
+
return transporter.request(request, requestOptions);
|
|
584
|
+
},
|
|
585
|
+
/**
|
|
586
|
+
* Get a list of destinations for the given query parameters, with pagination details.
|
|
587
|
+
*
|
|
588
|
+
* Required API Key ACLs:
|
|
589
|
+
* - addObject
|
|
590
|
+
* - deleteIndex
|
|
591
|
+
* - editSettings.
|
|
592
|
+
*
|
|
593
|
+
* @param getDestinations - The getDestinations object.
|
|
594
|
+
* @param getDestinations.itemsPerPage - The number of items per page to return.
|
|
595
|
+
* @param getDestinations.page - The page number to fetch, starting at 1.
|
|
596
|
+
* @param getDestinations.type - The type of the destinations to retrive.
|
|
597
|
+
* @param getDestinations.authenticationID - The authenticationIDs of the destinations to retrive.
|
|
598
|
+
* @param getDestinations.sort - The key by which the list should be sorted.
|
|
599
|
+
* @param getDestinations.order - The order of the returned list.
|
|
600
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
601
|
+
*/
|
|
602
|
+
getDestinations({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
|
|
603
|
+
const requestPath = '/1/destinations';
|
|
604
|
+
const headers = {};
|
|
605
|
+
const queryParameters = {};
|
|
606
|
+
if (itemsPerPage !== undefined) {
|
|
607
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
608
|
+
}
|
|
609
|
+
if (page !== undefined) {
|
|
610
|
+
queryParameters.page = page.toString();
|
|
611
|
+
}
|
|
612
|
+
if (type !== undefined) {
|
|
613
|
+
queryParameters.type = type.toString();
|
|
614
|
+
}
|
|
615
|
+
if (authenticationID !== undefined) {
|
|
616
|
+
queryParameters.authenticationID = authenticationID.toString();
|
|
617
|
+
}
|
|
618
|
+
if (sort !== undefined) {
|
|
619
|
+
queryParameters.sort = sort.toString();
|
|
620
|
+
}
|
|
621
|
+
if (order !== undefined) {
|
|
622
|
+
queryParameters.order = order.toString();
|
|
623
|
+
}
|
|
624
|
+
const request = {
|
|
625
|
+
method: 'GET',
|
|
626
|
+
path: requestPath,
|
|
627
|
+
queryParameters,
|
|
628
|
+
headers,
|
|
629
|
+
};
|
|
630
|
+
return transporter.request(request, requestOptions);
|
|
631
|
+
},
|
|
632
|
+
/**
|
|
633
|
+
* Retrieve a stream listing for a given Singer specification compatible docker type source ID.
|
|
634
|
+
*
|
|
635
|
+
* Required API Key ACLs:
|
|
636
|
+
* - addObject
|
|
637
|
+
* - deleteIndex
|
|
638
|
+
* - editSettings.
|
|
639
|
+
*
|
|
640
|
+
* @param getDockerSourceStreams - The getDockerSourceStreams object.
|
|
641
|
+
* @param getDockerSourceStreams.sourceID - The source UUID.
|
|
642
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
643
|
+
*/
|
|
644
|
+
getDockerSourceStreams({ sourceID }, requestOptions) {
|
|
645
|
+
if (!sourceID) {
|
|
646
|
+
throw new Error('Parameter `sourceID` is required when calling `getDockerSourceStreams`.');
|
|
647
|
+
}
|
|
648
|
+
const requestPath = '/1/sources/{sourceID}/discover'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
649
|
+
const headers = {};
|
|
650
|
+
const queryParameters = {};
|
|
651
|
+
const request = {
|
|
652
|
+
method: 'GET',
|
|
653
|
+
path: requestPath,
|
|
654
|
+
queryParameters,
|
|
655
|
+
headers,
|
|
656
|
+
};
|
|
657
|
+
return transporter.request(request, requestOptions);
|
|
658
|
+
},
|
|
659
|
+
/**
|
|
660
|
+
* Get a single event for a specific runID.
|
|
661
|
+
*
|
|
662
|
+
* Required API Key ACLs:
|
|
663
|
+
* - addObject
|
|
664
|
+
* - deleteIndex
|
|
665
|
+
* - editSettings.
|
|
666
|
+
*
|
|
667
|
+
* @param getEvent - The getEvent object.
|
|
668
|
+
* @param getEvent.runID - The run UUID.
|
|
669
|
+
* @param getEvent.eventID - The event UUID.
|
|
670
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
671
|
+
*/
|
|
672
|
+
getEvent({ runID, eventID }, requestOptions) {
|
|
673
|
+
if (!runID) {
|
|
674
|
+
throw new Error('Parameter `runID` is required when calling `getEvent`.');
|
|
675
|
+
}
|
|
676
|
+
if (!eventID) {
|
|
677
|
+
throw new Error('Parameter `eventID` is required when calling `getEvent`.');
|
|
678
|
+
}
|
|
679
|
+
const requestPath = '/1/runs/{runID}/events/{eventID}'
|
|
680
|
+
.replace('{runID}', encodeURIComponent(runID))
|
|
681
|
+
.replace('{eventID}', encodeURIComponent(eventID));
|
|
682
|
+
const headers = {};
|
|
683
|
+
const queryParameters = {};
|
|
684
|
+
const request = {
|
|
685
|
+
method: 'GET',
|
|
686
|
+
path: requestPath,
|
|
687
|
+
queryParameters,
|
|
688
|
+
headers,
|
|
689
|
+
};
|
|
690
|
+
return transporter.request(request, requestOptions);
|
|
691
|
+
},
|
|
692
|
+
/**
|
|
693
|
+
* Get a list of events associated to the given runID, for the given query parameters.
|
|
694
|
+
*
|
|
695
|
+
* Required API Key ACLs:
|
|
696
|
+
* - addObject
|
|
697
|
+
* - deleteIndex
|
|
698
|
+
* - editSettings.
|
|
699
|
+
*
|
|
700
|
+
* @param getEvents - The getEvents object.
|
|
701
|
+
* @param getEvents.runID - The run UUID.
|
|
702
|
+
* @param getEvents.itemsPerPage - The number of items per page to return.
|
|
703
|
+
* @param getEvents.page - The page number to fetch, starting at 1.
|
|
704
|
+
* @param getEvents.status - Filter the status of the events.
|
|
705
|
+
* @param getEvents.type - Filter the type of the events.
|
|
706
|
+
* @param getEvents.sort - The key by which the list should be sorted.
|
|
707
|
+
* @param getEvents.order - The order of the returned list.
|
|
708
|
+
* @param getEvents.startDate - The start date (in RFC3339 format) of the events fetching window. Defaults to \'now\'-3 hours if omitted.
|
|
709
|
+
* @param getEvents.endDate - The end date (in RFC3339 format) of the events fetching window. Defaults to \'now\' days if omitted.
|
|
710
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
711
|
+
*/
|
|
712
|
+
getEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate, }, requestOptions) {
|
|
713
|
+
if (!runID) {
|
|
714
|
+
throw new Error('Parameter `runID` is required when calling `getEvents`.');
|
|
715
|
+
}
|
|
716
|
+
const requestPath = '/1/runs/{runID}/events'.replace('{runID}', encodeURIComponent(runID));
|
|
717
|
+
const headers = {};
|
|
718
|
+
const queryParameters = {};
|
|
719
|
+
if (itemsPerPage !== undefined) {
|
|
720
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
721
|
+
}
|
|
722
|
+
if (page !== undefined) {
|
|
723
|
+
queryParameters.page = page.toString();
|
|
724
|
+
}
|
|
725
|
+
if (status !== undefined) {
|
|
726
|
+
queryParameters.status = status.toString();
|
|
727
|
+
}
|
|
728
|
+
if (type !== undefined) {
|
|
729
|
+
queryParameters.type = type.toString();
|
|
730
|
+
}
|
|
731
|
+
if (sort !== undefined) {
|
|
732
|
+
queryParameters.sort = sort.toString();
|
|
733
|
+
}
|
|
734
|
+
if (order !== undefined) {
|
|
735
|
+
queryParameters.order = order.toString();
|
|
736
|
+
}
|
|
737
|
+
if (startDate !== undefined) {
|
|
738
|
+
queryParameters.startDate = startDate.toString();
|
|
739
|
+
}
|
|
740
|
+
if (endDate !== undefined) {
|
|
741
|
+
queryParameters.endDate = endDate.toString();
|
|
742
|
+
}
|
|
743
|
+
const request = {
|
|
744
|
+
method: 'GET',
|
|
745
|
+
path: requestPath,
|
|
746
|
+
queryParameters,
|
|
747
|
+
headers,
|
|
748
|
+
};
|
|
749
|
+
return transporter.request(request, requestOptions);
|
|
750
|
+
},
|
|
751
|
+
/**
|
|
752
|
+
* Get a single run for the given ID.
|
|
753
|
+
*
|
|
754
|
+
* Required API Key ACLs:
|
|
755
|
+
* - addObject
|
|
756
|
+
* - deleteIndex
|
|
757
|
+
* - editSettings.
|
|
758
|
+
*
|
|
759
|
+
* @param getRun - The getRun object.
|
|
760
|
+
* @param getRun.runID - The run UUID.
|
|
761
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
762
|
+
*/
|
|
763
|
+
getRun({ runID }, requestOptions) {
|
|
764
|
+
if (!runID) {
|
|
765
|
+
throw new Error('Parameter `runID` is required when calling `getRun`.');
|
|
766
|
+
}
|
|
767
|
+
const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID));
|
|
768
|
+
const headers = {};
|
|
769
|
+
const queryParameters = {};
|
|
770
|
+
const request = {
|
|
771
|
+
method: 'GET',
|
|
772
|
+
path: requestPath,
|
|
773
|
+
queryParameters,
|
|
774
|
+
headers,
|
|
775
|
+
};
|
|
776
|
+
return transporter.request(request, requestOptions);
|
|
777
|
+
},
|
|
778
|
+
/**
|
|
779
|
+
* Get a list of runs for the given query parameters, with pagination details.
|
|
780
|
+
*
|
|
781
|
+
* Required API Key ACLs:
|
|
782
|
+
* - addObject
|
|
783
|
+
* - deleteIndex
|
|
784
|
+
* - editSettings.
|
|
785
|
+
*
|
|
786
|
+
* @param getRuns - The getRuns object.
|
|
787
|
+
* @param getRuns.itemsPerPage - The number of items per page to return.
|
|
788
|
+
* @param getRuns.page - The page number to fetch, starting at 1.
|
|
789
|
+
* @param getRuns.status - Filter the status of the runs.
|
|
790
|
+
* @param getRuns.taskID - Filter by taskID.
|
|
791
|
+
* @param getRuns.sort - The key by which the list should be sorted.
|
|
792
|
+
* @param getRuns.order - The order of the returned list.
|
|
793
|
+
* @param getRuns.startDate - The start date (in RFC3339 format) of the runs fetching window. Defaults to \'now\'-7 days if omitted.
|
|
794
|
+
* @param getRuns.endDate - The end date (in RFC3339 format) of the runs fetching window. Defaults to \'now\' days if omitted.
|
|
795
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
796
|
+
*/
|
|
797
|
+
getRuns({ itemsPerPage, page, status, taskID, sort, order, startDate, endDate, } = {}, requestOptions = undefined) {
|
|
798
|
+
const requestPath = '/1/runs';
|
|
799
|
+
const headers = {};
|
|
800
|
+
const queryParameters = {};
|
|
801
|
+
if (itemsPerPage !== undefined) {
|
|
802
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
803
|
+
}
|
|
804
|
+
if (page !== undefined) {
|
|
805
|
+
queryParameters.page = page.toString();
|
|
806
|
+
}
|
|
807
|
+
if (status !== undefined) {
|
|
808
|
+
queryParameters.status = status.toString();
|
|
809
|
+
}
|
|
810
|
+
if (taskID !== undefined) {
|
|
811
|
+
queryParameters.taskID = taskID.toString();
|
|
812
|
+
}
|
|
813
|
+
if (sort !== undefined) {
|
|
814
|
+
queryParameters.sort = sort.toString();
|
|
815
|
+
}
|
|
816
|
+
if (order !== undefined) {
|
|
817
|
+
queryParameters.order = order.toString();
|
|
818
|
+
}
|
|
819
|
+
if (startDate !== undefined) {
|
|
820
|
+
queryParameters.startDate = startDate.toString();
|
|
821
|
+
}
|
|
822
|
+
if (endDate !== undefined) {
|
|
823
|
+
queryParameters.endDate = endDate.toString();
|
|
824
|
+
}
|
|
825
|
+
const request = {
|
|
826
|
+
method: 'GET',
|
|
827
|
+
path: requestPath,
|
|
828
|
+
queryParameters,
|
|
829
|
+
headers,
|
|
830
|
+
};
|
|
831
|
+
return transporter.request(request, requestOptions);
|
|
832
|
+
},
|
|
833
|
+
/**
|
|
834
|
+
* Get the source of the given sourceID.
|
|
835
|
+
*
|
|
836
|
+
* Required API Key ACLs:
|
|
837
|
+
* - addObject
|
|
838
|
+
* - deleteIndex
|
|
839
|
+
* - editSettings.
|
|
840
|
+
*
|
|
841
|
+
* @param getSource - The getSource object.
|
|
842
|
+
* @param getSource.sourceID - The source UUID.
|
|
843
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
844
|
+
*/
|
|
845
|
+
getSource({ sourceID }, requestOptions) {
|
|
846
|
+
if (!sourceID) {
|
|
847
|
+
throw new Error('Parameter `sourceID` is required when calling `getSource`.');
|
|
848
|
+
}
|
|
849
|
+
const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
850
|
+
const headers = {};
|
|
851
|
+
const queryParameters = {};
|
|
852
|
+
const request = {
|
|
853
|
+
method: 'GET',
|
|
854
|
+
path: requestPath,
|
|
855
|
+
queryParameters,
|
|
856
|
+
headers,
|
|
857
|
+
};
|
|
858
|
+
return transporter.request(request, requestOptions);
|
|
859
|
+
},
|
|
860
|
+
/**
|
|
861
|
+
* Get a list of sources for the given query parameters, with pagination details.
|
|
862
|
+
*
|
|
863
|
+
* Required API Key ACLs:
|
|
864
|
+
* - addObject
|
|
865
|
+
* - deleteIndex
|
|
866
|
+
* - editSettings.
|
|
867
|
+
*
|
|
868
|
+
* @param getSources - The getSources object.
|
|
869
|
+
* @param getSources.itemsPerPage - The number of items per page to return.
|
|
870
|
+
* @param getSources.page - The page number to fetch, starting at 1.
|
|
871
|
+
* @param getSources.type - The type of the sources to retrieve.
|
|
872
|
+
* @param getSources.authenticationID - The authenticationIDs of the sources to retrieve. \'none\' returns sources that doesn\'t have an authentication.
|
|
873
|
+
* @param getSources.sort - The key by which the list should be sorted.
|
|
874
|
+
* @param getSources.order - The order of the returned list.
|
|
875
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
876
|
+
*/
|
|
877
|
+
getSources({ itemsPerPage, page, type, authenticationID, sort, order, } = {}, requestOptions = undefined) {
|
|
878
|
+
const requestPath = '/1/sources';
|
|
879
|
+
const headers = {};
|
|
880
|
+
const queryParameters = {};
|
|
881
|
+
if (itemsPerPage !== undefined) {
|
|
882
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
883
|
+
}
|
|
884
|
+
if (page !== undefined) {
|
|
885
|
+
queryParameters.page = page.toString();
|
|
886
|
+
}
|
|
887
|
+
if (type !== undefined) {
|
|
888
|
+
queryParameters.type = type.toString();
|
|
889
|
+
}
|
|
890
|
+
if (authenticationID !== undefined) {
|
|
891
|
+
queryParameters.authenticationID = authenticationID.toString();
|
|
892
|
+
}
|
|
893
|
+
if (sort !== undefined) {
|
|
894
|
+
queryParameters.sort = sort.toString();
|
|
895
|
+
}
|
|
896
|
+
if (order !== undefined) {
|
|
897
|
+
queryParameters.order = order.toString();
|
|
898
|
+
}
|
|
899
|
+
const request = {
|
|
900
|
+
method: 'GET',
|
|
901
|
+
path: requestPath,
|
|
902
|
+
queryParameters,
|
|
903
|
+
headers,
|
|
904
|
+
};
|
|
905
|
+
return transporter.request(request, requestOptions);
|
|
906
|
+
},
|
|
907
|
+
/**
|
|
908
|
+
* Get the task of the given taskID.
|
|
909
|
+
*
|
|
910
|
+
* Required API Key ACLs:
|
|
911
|
+
* - addObject
|
|
912
|
+
* - deleteIndex
|
|
913
|
+
* - editSettings.
|
|
914
|
+
*
|
|
915
|
+
* @param getTask - The getTask object.
|
|
916
|
+
* @param getTask.taskID - The task UUID.
|
|
917
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
918
|
+
*/
|
|
919
|
+
getTask({ taskID }, requestOptions) {
|
|
920
|
+
if (!taskID) {
|
|
921
|
+
throw new Error('Parameter `taskID` is required when calling `getTask`.');
|
|
922
|
+
}
|
|
923
|
+
const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
924
|
+
const headers = {};
|
|
925
|
+
const queryParameters = {};
|
|
926
|
+
const request = {
|
|
927
|
+
method: 'GET',
|
|
928
|
+
path: requestPath,
|
|
929
|
+
queryParameters,
|
|
930
|
+
headers,
|
|
931
|
+
};
|
|
932
|
+
return transporter.request(request, requestOptions);
|
|
933
|
+
},
|
|
934
|
+
/**
|
|
935
|
+
* Get a list of tasks for the given query parameters, with pagination details.
|
|
936
|
+
*
|
|
937
|
+
* Required API Key ACLs:
|
|
938
|
+
* - addObject
|
|
939
|
+
* - deleteIndex
|
|
940
|
+
* - editSettings.
|
|
941
|
+
*
|
|
942
|
+
* @param getTasks - The getTasks object.
|
|
943
|
+
* @param getTasks.itemsPerPage - The number of items per page to return.
|
|
944
|
+
* @param getTasks.page - The page number to fetch, starting at 1.
|
|
945
|
+
* @param getTasks.action - The action of the tasks to retrieve.
|
|
946
|
+
* @param getTasks.enabled - Whether the task is enabled or not.
|
|
947
|
+
* @param getTasks.sourceID - The sourceIDs of the tasks to retrieve.
|
|
948
|
+
* @param getTasks.destinationID - The destinationIDs of the tasks to retrieve.
|
|
949
|
+
* @param getTasks.triggerType - The trigger type of the task.
|
|
950
|
+
* @param getTasks.sort - The key by which the list should be sorted.
|
|
951
|
+
* @param getTasks.order - The order of the returned list.
|
|
952
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
953
|
+
*/
|
|
954
|
+
getTasks({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, } = {}, requestOptions = undefined) {
|
|
955
|
+
const requestPath = '/1/tasks';
|
|
956
|
+
const headers = {};
|
|
957
|
+
const queryParameters = {};
|
|
958
|
+
if (itemsPerPage !== undefined) {
|
|
959
|
+
queryParameters.itemsPerPage = itemsPerPage.toString();
|
|
960
|
+
}
|
|
961
|
+
if (page !== undefined) {
|
|
962
|
+
queryParameters.page = page.toString();
|
|
963
|
+
}
|
|
964
|
+
if (action !== undefined) {
|
|
965
|
+
queryParameters.action = action.toString();
|
|
966
|
+
}
|
|
967
|
+
if (enabled !== undefined) {
|
|
968
|
+
queryParameters.enabled = enabled.toString();
|
|
969
|
+
}
|
|
970
|
+
if (sourceID !== undefined) {
|
|
971
|
+
queryParameters.sourceID = sourceID.toString();
|
|
972
|
+
}
|
|
973
|
+
if (destinationID !== undefined) {
|
|
974
|
+
queryParameters.destinationID = destinationID.toString();
|
|
975
|
+
}
|
|
976
|
+
if (triggerType !== undefined) {
|
|
977
|
+
queryParameters.triggerType = triggerType.toString();
|
|
978
|
+
}
|
|
979
|
+
if (sort !== undefined) {
|
|
980
|
+
queryParameters.sort = sort.toString();
|
|
981
|
+
}
|
|
982
|
+
if (order !== undefined) {
|
|
983
|
+
queryParameters.order = order.toString();
|
|
984
|
+
}
|
|
985
|
+
const request = {
|
|
986
|
+
method: 'GET',
|
|
987
|
+
path: requestPath,
|
|
988
|
+
queryParameters,
|
|
989
|
+
headers,
|
|
990
|
+
};
|
|
991
|
+
return transporter.request(request, requestOptions);
|
|
992
|
+
},
|
|
993
|
+
/**
|
|
994
|
+
* Run the task of the given taskID.
|
|
995
|
+
*
|
|
996
|
+
* Required API Key ACLs:
|
|
997
|
+
* - addObject
|
|
998
|
+
* - deleteIndex
|
|
999
|
+
* - editSettings.
|
|
1000
|
+
*
|
|
1001
|
+
* @param runTask - The runTask object.
|
|
1002
|
+
* @param runTask.taskID - The task UUID.
|
|
1003
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1004
|
+
*/
|
|
1005
|
+
runTask({ taskID }, requestOptions) {
|
|
1006
|
+
if (!taskID) {
|
|
1007
|
+
throw new Error('Parameter `taskID` is required when calling `runTask`.');
|
|
1008
|
+
}
|
|
1009
|
+
const requestPath = '/1/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1010
|
+
const headers = {};
|
|
1011
|
+
const queryParameters = {};
|
|
1012
|
+
const request = {
|
|
1013
|
+
method: 'POST',
|
|
1014
|
+
path: requestPath,
|
|
1015
|
+
queryParameters,
|
|
1016
|
+
headers,
|
|
1017
|
+
};
|
|
1018
|
+
return transporter.request(request, requestOptions);
|
|
1019
|
+
},
|
|
1020
|
+
/**
|
|
1021
|
+
* Search among authentications with a defined set of parameters.
|
|
1022
|
+
*
|
|
1023
|
+
* Required API Key ACLs:
|
|
1024
|
+
* - addObject
|
|
1025
|
+
* - deleteIndex
|
|
1026
|
+
* - editSettings.
|
|
1027
|
+
*
|
|
1028
|
+
* @param authenticationSearch - The authenticationSearch object.
|
|
1029
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1030
|
+
*/
|
|
1031
|
+
searchAuthentications(authenticationSearch, requestOptions) {
|
|
1032
|
+
if (!authenticationSearch) {
|
|
1033
|
+
throw new Error('Parameter `authenticationSearch` is required when calling `searchAuthentications`.');
|
|
1034
|
+
}
|
|
1035
|
+
if (!authenticationSearch.authenticationIDs) {
|
|
1036
|
+
throw new Error('Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.');
|
|
1037
|
+
}
|
|
1038
|
+
const requestPath = '/1/authentications/search';
|
|
1039
|
+
const headers = {};
|
|
1040
|
+
const queryParameters = {};
|
|
1041
|
+
const request = {
|
|
1042
|
+
method: 'POST',
|
|
1043
|
+
path: requestPath,
|
|
1044
|
+
queryParameters,
|
|
1045
|
+
headers,
|
|
1046
|
+
data: authenticationSearch,
|
|
1047
|
+
};
|
|
1048
|
+
return transporter.request(request, requestOptions);
|
|
1049
|
+
},
|
|
1050
|
+
/**
|
|
1051
|
+
* Search among destinations with a defined set of parameters.
|
|
1052
|
+
*
|
|
1053
|
+
* Required API Key ACLs:
|
|
1054
|
+
* - addObject
|
|
1055
|
+
* - deleteIndex
|
|
1056
|
+
* - editSettings.
|
|
1057
|
+
*
|
|
1058
|
+
* @param destinationSearch - The destinationSearch object.
|
|
1059
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1060
|
+
*/
|
|
1061
|
+
searchDestinations(destinationSearch, requestOptions) {
|
|
1062
|
+
if (!destinationSearch) {
|
|
1063
|
+
throw new Error('Parameter `destinationSearch` is required when calling `searchDestinations`.');
|
|
1064
|
+
}
|
|
1065
|
+
if (!destinationSearch.destinationIDs) {
|
|
1066
|
+
throw new Error('Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.');
|
|
1067
|
+
}
|
|
1068
|
+
const requestPath = '/1/destinations/search';
|
|
1069
|
+
const headers = {};
|
|
1070
|
+
const queryParameters = {};
|
|
1071
|
+
const request = {
|
|
1072
|
+
method: 'POST',
|
|
1073
|
+
path: requestPath,
|
|
1074
|
+
queryParameters,
|
|
1075
|
+
headers,
|
|
1076
|
+
data: destinationSearch,
|
|
1077
|
+
};
|
|
1078
|
+
return transporter.request(request, requestOptions);
|
|
1079
|
+
},
|
|
1080
|
+
/**
|
|
1081
|
+
* Search among sources with a defined set of parameters.
|
|
1082
|
+
*
|
|
1083
|
+
* Required API Key ACLs:
|
|
1084
|
+
* - addObject
|
|
1085
|
+
* - deleteIndex
|
|
1086
|
+
* - editSettings.
|
|
1087
|
+
*
|
|
1088
|
+
* @param sourceSearch - The sourceSearch object.
|
|
1089
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1090
|
+
*/
|
|
1091
|
+
searchSources(sourceSearch, requestOptions) {
|
|
1092
|
+
if (!sourceSearch) {
|
|
1093
|
+
throw new Error('Parameter `sourceSearch` is required when calling `searchSources`.');
|
|
1094
|
+
}
|
|
1095
|
+
if (!sourceSearch.sourceIDs) {
|
|
1096
|
+
throw new Error('Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.');
|
|
1097
|
+
}
|
|
1098
|
+
const requestPath = '/1/sources/search';
|
|
1099
|
+
const headers = {};
|
|
1100
|
+
const queryParameters = {};
|
|
1101
|
+
const request = {
|
|
1102
|
+
method: 'POST',
|
|
1103
|
+
path: requestPath,
|
|
1104
|
+
queryParameters,
|
|
1105
|
+
headers,
|
|
1106
|
+
data: sourceSearch,
|
|
1107
|
+
};
|
|
1108
|
+
return transporter.request(request, requestOptions);
|
|
1109
|
+
},
|
|
1110
|
+
/**
|
|
1111
|
+
* Search among tasks with a defined set of parameters.
|
|
1112
|
+
*
|
|
1113
|
+
* Required API Key ACLs:
|
|
1114
|
+
* - addObject
|
|
1115
|
+
* - deleteIndex
|
|
1116
|
+
* - editSettings.
|
|
1117
|
+
*
|
|
1118
|
+
* @param taskSearch - The taskSearch object.
|
|
1119
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1120
|
+
*/
|
|
1121
|
+
searchTasks(taskSearch, requestOptions) {
|
|
1122
|
+
if (!taskSearch) {
|
|
1123
|
+
throw new Error('Parameter `taskSearch` is required when calling `searchTasks`.');
|
|
1124
|
+
}
|
|
1125
|
+
if (!taskSearch.taskIDs) {
|
|
1126
|
+
throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.');
|
|
1127
|
+
}
|
|
1128
|
+
const requestPath = '/1/tasks/search';
|
|
1129
|
+
const headers = {};
|
|
1130
|
+
const queryParameters = {};
|
|
1131
|
+
const request = {
|
|
1132
|
+
method: 'POST',
|
|
1133
|
+
path: requestPath,
|
|
1134
|
+
queryParameters,
|
|
1135
|
+
headers,
|
|
1136
|
+
data: taskSearch,
|
|
1137
|
+
};
|
|
1138
|
+
return transporter.request(request, requestOptions);
|
|
1139
|
+
},
|
|
1140
|
+
/**
|
|
1141
|
+
* Trigger a stream listing request for a Singer specification compatible docker type source.
|
|
1142
|
+
*
|
|
1143
|
+
* Required API Key ACLs:
|
|
1144
|
+
* - addObject
|
|
1145
|
+
* - deleteIndex
|
|
1146
|
+
* - editSettings.
|
|
1147
|
+
*
|
|
1148
|
+
* @param triggerDockerSourceDiscover - The triggerDockerSourceDiscover object.
|
|
1149
|
+
* @param triggerDockerSourceDiscover.sourceID - The source UUID.
|
|
1150
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1151
|
+
*/
|
|
1152
|
+
triggerDockerSourceDiscover({ sourceID }, requestOptions) {
|
|
1153
|
+
if (!sourceID) {
|
|
1154
|
+
throw new Error('Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.');
|
|
1155
|
+
}
|
|
1156
|
+
const requestPath = '/1/sources/{sourceID}/discover'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
1157
|
+
const headers = {};
|
|
1158
|
+
const queryParameters = {};
|
|
1159
|
+
const request = {
|
|
1160
|
+
method: 'POST',
|
|
1161
|
+
path: requestPath,
|
|
1162
|
+
queryParameters,
|
|
1163
|
+
headers,
|
|
1164
|
+
};
|
|
1165
|
+
return transporter.request(request, requestOptions);
|
|
1166
|
+
},
|
|
1167
|
+
/**
|
|
1168
|
+
* Update the authentication of the given authenticationID.
|
|
1169
|
+
*
|
|
1170
|
+
* Required API Key ACLs:
|
|
1171
|
+
* - addObject
|
|
1172
|
+
* - deleteIndex
|
|
1173
|
+
* - editSettings.
|
|
1174
|
+
*
|
|
1175
|
+
* @param updateAuthentication - The updateAuthentication object.
|
|
1176
|
+
* @param updateAuthentication.authenticationID - The authentication UUID.
|
|
1177
|
+
* @param updateAuthentication.authenticationUpdate - The authenticationUpdate object.
|
|
1178
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1179
|
+
*/
|
|
1180
|
+
updateAuthentication({ authenticationID, authenticationUpdate }, requestOptions) {
|
|
1181
|
+
if (!authenticationID) {
|
|
1182
|
+
throw new Error('Parameter `authenticationID` is required when calling `updateAuthentication`.');
|
|
1183
|
+
}
|
|
1184
|
+
if (!authenticationUpdate) {
|
|
1185
|
+
throw new Error('Parameter `authenticationUpdate` is required when calling `updateAuthentication`.');
|
|
1186
|
+
}
|
|
1187
|
+
const requestPath = '/1/authentications/{authenticationID}'.replace('{authenticationID}', encodeURIComponent(authenticationID));
|
|
1188
|
+
const headers = {};
|
|
1189
|
+
const queryParameters = {};
|
|
1190
|
+
const request = {
|
|
1191
|
+
method: 'PATCH',
|
|
1192
|
+
path: requestPath,
|
|
1193
|
+
queryParameters,
|
|
1194
|
+
headers,
|
|
1195
|
+
data: authenticationUpdate,
|
|
1196
|
+
};
|
|
1197
|
+
return transporter.request(request, requestOptions);
|
|
1198
|
+
},
|
|
1199
|
+
/**
|
|
1200
|
+
* Update the destination of the given destinationID.
|
|
1201
|
+
*
|
|
1202
|
+
* Required API Key ACLs:
|
|
1203
|
+
* - addObject
|
|
1204
|
+
* - deleteIndex
|
|
1205
|
+
* - editSettings.
|
|
1206
|
+
*
|
|
1207
|
+
* @param updateDestination - The updateDestination object.
|
|
1208
|
+
* @param updateDestination.destinationID - The destination UUID.
|
|
1209
|
+
* @param updateDestination.destinationUpdate - The destinationUpdate object.
|
|
1210
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1211
|
+
*/
|
|
1212
|
+
updateDestination({ destinationID, destinationUpdate }, requestOptions) {
|
|
1213
|
+
if (!destinationID) {
|
|
1214
|
+
throw new Error('Parameter `destinationID` is required when calling `updateDestination`.');
|
|
1215
|
+
}
|
|
1216
|
+
if (!destinationUpdate) {
|
|
1217
|
+
throw new Error('Parameter `destinationUpdate` is required when calling `updateDestination`.');
|
|
1218
|
+
}
|
|
1219
|
+
const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
|
|
1220
|
+
const headers = {};
|
|
1221
|
+
const queryParameters = {};
|
|
1222
|
+
const request = {
|
|
1223
|
+
method: 'PATCH',
|
|
1224
|
+
path: requestPath,
|
|
1225
|
+
queryParameters,
|
|
1226
|
+
headers,
|
|
1227
|
+
data: destinationUpdate,
|
|
1228
|
+
};
|
|
1229
|
+
return transporter.request(request, requestOptions);
|
|
1230
|
+
},
|
|
1231
|
+
/**
|
|
1232
|
+
* Update the source of the given sourceID.
|
|
1233
|
+
*
|
|
1234
|
+
* Required API Key ACLs:
|
|
1235
|
+
* - addObject
|
|
1236
|
+
* - deleteIndex
|
|
1237
|
+
* - editSettings.
|
|
1238
|
+
*
|
|
1239
|
+
* @param updateSource - The updateSource object.
|
|
1240
|
+
* @param updateSource.sourceID - The source UUID.
|
|
1241
|
+
* @param updateSource.sourceUpdate - The sourceUpdate object.
|
|
1242
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1243
|
+
*/
|
|
1244
|
+
updateSource({ sourceID, sourceUpdate }, requestOptions) {
|
|
1245
|
+
if (!sourceID) {
|
|
1246
|
+
throw new Error('Parameter `sourceID` is required when calling `updateSource`.');
|
|
1247
|
+
}
|
|
1248
|
+
if (!sourceUpdate) {
|
|
1249
|
+
throw new Error('Parameter `sourceUpdate` is required when calling `updateSource`.');
|
|
1250
|
+
}
|
|
1251
|
+
const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
|
|
1252
|
+
const headers = {};
|
|
1253
|
+
const queryParameters = {};
|
|
1254
|
+
const request = {
|
|
1255
|
+
method: 'PATCH',
|
|
1256
|
+
path: requestPath,
|
|
1257
|
+
queryParameters,
|
|
1258
|
+
headers,
|
|
1259
|
+
data: sourceUpdate,
|
|
1260
|
+
};
|
|
1261
|
+
return transporter.request(request, requestOptions);
|
|
1262
|
+
},
|
|
1263
|
+
/**
|
|
1264
|
+
* Update the task of the given taskID.
|
|
1265
|
+
*
|
|
1266
|
+
* @param updateTask - The updateTask object.
|
|
1267
|
+
* @param updateTask.taskID - The task UUID.
|
|
1268
|
+
* @param updateTask.taskUpdate - The taskUpdate object.
|
|
1269
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1270
|
+
*/
|
|
1271
|
+
updateTask({ taskID, taskUpdate }, requestOptions) {
|
|
1272
|
+
if (!taskID) {
|
|
1273
|
+
throw new Error('Parameter `taskID` is required when calling `updateTask`.');
|
|
1274
|
+
}
|
|
1275
|
+
if (!taskUpdate) {
|
|
1276
|
+
throw new Error('Parameter `taskUpdate` is required when calling `updateTask`.');
|
|
1277
|
+
}
|
|
1278
|
+
const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
1279
|
+
const headers = {};
|
|
1280
|
+
const queryParameters = {};
|
|
1281
|
+
const request = {
|
|
1282
|
+
method: 'PATCH',
|
|
1283
|
+
path: requestPath,
|
|
1284
|
+
queryParameters,
|
|
1285
|
+
headers,
|
|
1286
|
+
data: taskUpdate,
|
|
1287
|
+
};
|
|
1288
|
+
return transporter.request(request, requestOptions);
|
|
1289
|
+
},
|
|
1290
|
+
};
|
|
794
1291
|
}
|
|
795
1292
|
|
|
796
|
-
//
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
1293
|
+
// 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.
|
|
1294
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
1295
|
+
function ingestionClient(appId, apiKey, region, options) {
|
|
1296
|
+
if (!appId || typeof appId !== 'string') {
|
|
1297
|
+
throw new Error('`appId` is missing.');
|
|
1298
|
+
}
|
|
1299
|
+
if (!apiKey || typeof apiKey !== 'string') {
|
|
1300
|
+
throw new Error('`apiKey` is missing.');
|
|
1301
|
+
}
|
|
1302
|
+
if (!region ||
|
|
1303
|
+
(region && (typeof region !== 'string' || !REGIONS.includes(region)))) {
|
|
1304
|
+
throw new Error(`\`region\` is required and must be one of the following: ${REGIONS.join(', ')}`);
|
|
1305
|
+
}
|
|
1306
|
+
return {
|
|
1307
|
+
...createIngestionClient({
|
|
1308
|
+
appId,
|
|
1309
|
+
apiKey,
|
|
1310
|
+
region,
|
|
1311
|
+
timeouts: {
|
|
1312
|
+
connect: DEFAULT_CONNECT_TIMEOUT_NODE,
|
|
1313
|
+
read: DEFAULT_READ_TIMEOUT_NODE,
|
|
1314
|
+
write: DEFAULT_WRITE_TIMEOUT_NODE,
|
|
1315
|
+
},
|
|
1316
|
+
requester: createHttpRequester(),
|
|
1317
|
+
algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
|
|
1318
|
+
responsesCache: createNullCache(),
|
|
1319
|
+
requestsCache: createNullCache(),
|
|
1320
|
+
hostsCache: createMemoryCache(),
|
|
1321
|
+
...options,
|
|
1322
|
+
}),
|
|
1323
|
+
};
|
|
824
1324
|
}
|
|
825
1325
|
|
|
826
|
-
export { apiClientVersion, ingestionClient };
|
|
1326
|
+
export { apiClientVersion, ingestionClient, isOnDemandTrigger, isScheduleTrigger, isSubscriptionTrigger };
|