@algolia/ingestion 1.0.0-alpha.9 → 1.0.0-beta.10

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 (434) hide show
  1. package/LICENSE +21 -0
  2. package/dist/builds/browser.d.ts +60 -5
  3. package/dist/builds/browser.d.ts.map +1 -1
  4. package/dist/builds/node.d.ts +60 -5
  5. package/dist/builds/node.d.ts.map +1 -1
  6. package/dist/ingestion.cjs +1565 -0
  7. package/dist/ingestion.esm.browser.js +1724 -979
  8. package/dist/ingestion.esm.node.js +1552 -819
  9. package/dist/ingestion.umd.js +2 -2
  10. package/dist/model/actionType.d.ts +4 -1
  11. package/dist/model/actionType.d.ts.map +1 -1
  12. package/dist/model/authAPIKey.d.ts +9 -3
  13. package/dist/model/authAPIKey.d.ts.map +1 -1
  14. package/dist/model/authAPIKeyPartial.d.ts +10 -0
  15. package/dist/model/authAPIKeyPartial.d.ts.map +1 -0
  16. package/dist/model/authAlgolia.d.ts +13 -4
  17. package/dist/model/authAlgolia.d.ts.map +1 -1
  18. package/dist/model/authAlgoliaInsights.d.ts +14 -0
  19. package/dist/model/authAlgoliaInsights.d.ts.map +1 -0
  20. package/dist/model/authAlgoliaInsightsPartial.d.ts +14 -0
  21. package/dist/model/authAlgoliaInsightsPartial.d.ts.map +1 -0
  22. package/dist/model/authAlgoliaPartial.d.ts +14 -0
  23. package/dist/model/authAlgoliaPartial.d.ts.map +1 -0
  24. package/dist/model/authBasic.d.ts +13 -4
  25. package/dist/model/authBasic.d.ts.map +1 -1
  26. package/dist/model/authBasicPartial.d.ts +14 -0
  27. package/dist/model/authBasicPartial.d.ts.map +1 -0
  28. package/dist/model/authGoogleServiceAccount.d.ts +13 -4
  29. package/dist/model/authGoogleServiceAccount.d.ts.map +1 -1
  30. package/dist/model/authGoogleServiceAccountPartial.d.ts +14 -0
  31. package/dist/model/authGoogleServiceAccountPartial.d.ts.map +1 -0
  32. package/dist/model/authInput.d.ts +7 -6
  33. package/dist/model/authInput.d.ts.map +1 -1
  34. package/dist/model/authInputPartial.d.ts +8 -0
  35. package/dist/model/authInputPartial.d.ts.map +1 -0
  36. package/dist/model/authOAuth.d.ts +21 -6
  37. package/dist/model/authOAuth.d.ts.map +1 -1
  38. package/dist/model/authOAuthPartial.d.ts +22 -0
  39. package/dist/model/authOAuthPartial.d.ts.map +1 -0
  40. package/dist/model/authentication.d.ts +27 -16
  41. package/dist/model/authentication.d.ts.map +1 -1
  42. package/dist/model/authenticationCreate.d.ts +15 -9
  43. package/dist/model/authenticationCreate.d.ts.map +1 -1
  44. package/dist/model/authenticationCreateResponse.d.ts +17 -8
  45. package/dist/model/authenticationCreateResponse.d.ts.map +1 -1
  46. package/dist/model/authenticationSearch.d.ts +7 -0
  47. package/dist/model/authenticationSearch.d.ts.map +1 -0
  48. package/dist/model/authenticationSortKeys.d.ts +5 -0
  49. package/dist/model/authenticationSortKeys.d.ts.map +1 -0
  50. package/dist/model/authenticationType.d.ts +4 -1
  51. package/dist/model/authenticationType.d.ts.map +1 -1
  52. package/dist/model/authenticationUpdate.d.ts +15 -9
  53. package/dist/model/authenticationUpdate.d.ts.map +1 -1
  54. package/dist/model/authenticationUpdateResponse.d.ts +17 -8
  55. package/dist/model/authenticationUpdateResponse.d.ts.map +1 -1
  56. package/dist/model/bigCommerceChannel.d.ts +11 -0
  57. package/dist/model/bigCommerceChannel.d.ts.map +1 -0
  58. package/dist/model/bigCommerceMetafield.d.ts +11 -0
  59. package/dist/model/bigCommerceMetafield.d.ts.map +1 -0
  60. package/dist/model/bigQueryDataType.d.ts +2 -0
  61. package/dist/model/bigQueryDataType.d.ts.map +1 -0
  62. package/dist/model/clientMethodProps.d.ts +509 -282
  63. package/dist/model/clientMethodProps.d.ts.map +1 -1
  64. package/dist/model/commercetoolsCustomFields.d.ts +18 -0
  65. package/dist/model/commercetoolsCustomFields.d.ts.map +1 -0
  66. package/dist/model/deleteResponse.d.ts +6 -6
  67. package/dist/model/deleteResponse.d.ts.map +1 -1
  68. package/dist/model/destination.d.ts +29 -17
  69. package/dist/model/destination.d.ts.map +1 -1
  70. package/dist/model/destinationCreate.d.ts +17 -8
  71. package/dist/model/destinationCreate.d.ts.map +1 -1
  72. package/dist/model/destinationCreateResponse.d.ts +17 -8
  73. package/dist/model/destinationCreateResponse.d.ts.map +1 -1
  74. package/dist/model/destinationIndexName.d.ts +12 -3
  75. package/dist/model/destinationIndexName.d.ts.map +1 -1
  76. package/dist/model/destinationIndexPrefix.d.ts +6 -3
  77. package/dist/model/destinationIndexPrefix.d.ts.map +1 -1
  78. package/dist/model/destinationInput.d.ts +3 -3
  79. package/dist/model/destinationInput.d.ts.map +1 -1
  80. package/dist/model/destinationSearch.d.ts +7 -0
  81. package/dist/model/destinationSearch.d.ts.map +1 -0
  82. package/dist/model/destinationSortKeys.d.ts +5 -0
  83. package/dist/model/destinationSortKeys.d.ts.map +1 -0
  84. package/dist/model/destinationType.d.ts +4 -1
  85. package/dist/model/destinationType.d.ts.map +1 -1
  86. package/dist/model/destinationUpdate.d.ts +17 -8
  87. package/dist/model/destinationUpdate.d.ts.map +1 -1
  88. package/dist/model/destinationUpdateResponse.d.ts +17 -8
  89. package/dist/model/destinationUpdateResponse.d.ts.map +1 -1
  90. package/dist/model/dockerImageType.d.ts +5 -0
  91. package/dist/model/dockerImageType.d.ts.map +1 -0
  92. package/dist/model/dockerRegistry.d.ts +5 -0
  93. package/dist/model/dockerRegistry.d.ts.map +1 -0
  94. package/dist/model/dockerStreamsInput.d.ts +4 -0
  95. package/dist/model/dockerStreamsInput.d.ts.map +1 -0
  96. package/dist/model/errorBase.d.ts +6 -6
  97. package/dist/model/errorBase.d.ts.map +1 -1
  98. package/dist/model/event.d.ts +30 -14
  99. package/dist/model/event.d.ts.map +1 -1
  100. package/dist/model/eventSortKeys.d.ts +5 -0
  101. package/dist/model/eventSortKeys.d.ts.map +1 -0
  102. package/dist/model/eventStatus.d.ts +1 -1
  103. package/dist/model/eventStatus.d.ts.map +1 -1
  104. package/dist/model/eventType.d.ts +1 -1
  105. package/dist/model/eventType.d.ts.map +1 -1
  106. package/dist/model/index.d.ts +134 -63
  107. package/dist/model/index.d.ts.map +1 -1
  108. package/dist/model/listAuthenticationsResponse.d.ts +6 -6
  109. package/dist/model/listAuthenticationsResponse.d.ts.map +1 -1
  110. package/dist/model/listDestinationsResponse.d.ts +6 -6
  111. package/dist/model/listDestinationsResponse.d.ts.map +1 -1
  112. package/dist/model/listEventsResponse.d.ts +8 -6
  113. package/dist/model/listEventsResponse.d.ts.map +1 -1
  114. package/dist/model/listSourcesResponse.d.ts +6 -6
  115. package/dist/model/listSourcesResponse.d.ts.map +1 -1
  116. package/dist/model/listTasksResponse.d.ts +9 -6
  117. package/dist/model/listTasksResponse.d.ts.map +1 -1
  118. package/dist/model/listTransformationsResponse.d.ts +10 -0
  119. package/dist/model/listTransformationsResponse.d.ts.map +1 -0
  120. package/dist/model/mappingFieldDirective.d.ts +14 -0
  121. package/dist/model/mappingFieldDirective.d.ts.map +1 -0
  122. package/dist/model/mappingFormatSchema.d.ts +5 -0
  123. package/dist/model/mappingFormatSchema.d.ts.map +1 -0
  124. package/dist/model/mappingInput.d.ts +10 -0
  125. package/dist/model/mappingInput.d.ts.map +1 -0
  126. package/dist/model/mappingKitAction.d.ts +20 -0
  127. package/dist/model/mappingKitAction.d.ts.map +1 -0
  128. package/dist/model/mappingTypeCSV.d.ts +2 -0
  129. package/dist/model/mappingTypeCSV.d.ts.map +1 -0
  130. package/dist/model/methodType.d.ts +4 -1
  131. package/dist/model/methodType.d.ts.map +1 -1
  132. package/dist/model/onDemandTrigger.d.ts +12 -0
  133. package/dist/model/onDemandTrigger.d.ts.map +1 -0
  134. package/dist/model/onDemandTriggerInput.d.ts +8 -0
  135. package/dist/model/onDemandTriggerInput.d.ts.map +1 -0
  136. package/dist/model/onDemandTriggerType.d.ts +5 -0
  137. package/dist/model/onDemandTriggerType.d.ts.map +1 -0
  138. package/dist/model/orderKeys.d.ts +5 -0
  139. package/dist/model/orderKeys.d.ts.map +1 -0
  140. package/dist/model/pagination.d.ts +21 -6
  141. package/dist/model/pagination.d.ts.map +1 -1
  142. package/dist/model/platform.d.ts +5 -0
  143. package/dist/model/platform.d.ts.map +1 -0
  144. package/dist/model/platformNone.d.ts +5 -0
  145. package/dist/model/platformNone.d.ts.map +1 -0
  146. package/dist/model/platformWithNone.d.ts +4 -0
  147. package/dist/model/platformWithNone.d.ts.map +1 -0
  148. package/dist/model/recordType.d.ts +5 -0
  149. package/dist/model/recordType.d.ts.map +1 -0
  150. package/dist/model/run.d.ts +41 -29
  151. package/dist/model/run.d.ts.map +1 -1
  152. package/dist/model/runListResponse.d.ts +8 -6
  153. package/dist/model/runListResponse.d.ts.map +1 -1
  154. package/dist/model/runOutcome.d.ts +4 -1
  155. package/dist/model/runOutcome.d.ts.map +1 -1
  156. package/dist/model/runProgress.d.ts +4 -4
  157. package/dist/model/runProgress.d.ts.map +1 -1
  158. package/dist/model/runReasonCode.d.ts +5 -0
  159. package/dist/model/runReasonCode.d.ts.map +1 -0
  160. package/dist/model/runResponse.d.ts +13 -7
  161. package/dist/model/runResponse.d.ts.map +1 -1
  162. package/dist/model/runSortKeys.d.ts +5 -0
  163. package/dist/model/runSortKeys.d.ts.map +1 -0
  164. package/dist/model/runStatus.d.ts +4 -1
  165. package/dist/model/runStatus.d.ts.map +1 -1
  166. package/dist/model/runType.d.ts +4 -1
  167. package/dist/model/runType.d.ts.map +1 -1
  168. package/dist/model/scheduleTrigger.d.ts +20 -0
  169. package/dist/model/scheduleTrigger.d.ts.map +1 -0
  170. package/dist/model/scheduleTriggerInput.d.ts +12 -0
  171. package/dist/model/scheduleTriggerInput.d.ts.map +1 -0
  172. package/dist/model/scheduleTriggerType.d.ts +5 -0
  173. package/dist/model/scheduleTriggerType.d.ts.map +1 -0
  174. package/dist/model/shopifyInput.d.ts +10 -0
  175. package/dist/model/shopifyInput.d.ts.map +1 -0
  176. package/dist/model/shopifyMarket.d.ts +9 -0
  177. package/dist/model/shopifyMarket.d.ts.map +1 -0
  178. package/dist/model/shopifyMetafield.d.ts +9 -0
  179. package/dist/model/shopifyMetafield.d.ts.map +1 -0
  180. package/dist/model/sortKeys.d.ts +5 -0
  181. package/dist/model/sortKeys.d.ts.map +1 -0
  182. package/dist/model/source.d.ts +23 -17
  183. package/dist/model/source.d.ts.map +1 -1
  184. package/dist/model/sourceBigCommerce.d.ts +12 -3
  185. package/dist/model/sourceBigCommerce.d.ts.map +1 -1
  186. package/dist/model/sourceBigQuery.d.ts +29 -0
  187. package/dist/model/sourceBigQuery.d.ts.map +1 -0
  188. package/dist/model/sourceCSV.d.ts +22 -0
  189. package/dist/model/sourceCSV.d.ts.map +1 -0
  190. package/dist/model/sourceCommercetools.d.ts +15 -9
  191. package/dist/model/sourceCommercetools.d.ts.map +1 -1
  192. package/dist/model/sourceCreate.d.ts +14 -8
  193. package/dist/model/sourceCreate.d.ts.map +1 -1
  194. package/dist/model/sourceCreateResponse.d.ts +14 -8
  195. package/dist/model/sourceCreateResponse.d.ts.map +1 -1
  196. package/dist/model/sourceDocker.d.ts +19 -0
  197. package/dist/model/sourceDocker.d.ts.map +1 -0
  198. package/dist/model/sourceGA4BigQueryExport.d.ts +15 -0
  199. package/dist/model/sourceGA4BigQueryExport.d.ts.map +1 -0
  200. package/dist/model/sourceInput.d.ts +9 -4
  201. package/dist/model/sourceInput.d.ts.map +1 -1
  202. package/dist/model/sourceJSON.d.ts +13 -0
  203. package/dist/model/sourceJSON.d.ts.map +1 -0
  204. package/dist/model/sourceSearch.d.ts +4 -0
  205. package/dist/model/sourceSearch.d.ts.map +1 -0
  206. package/dist/model/sourceShopify.d.ts +4 -0
  207. package/dist/model/sourceShopify.d.ts.map +1 -0
  208. package/dist/model/sourceShopifyBase.d.ts +7 -0
  209. package/dist/model/sourceShopifyBase.d.ts.map +1 -0
  210. package/dist/model/sourceSortKeys.d.ts +5 -0
  211. package/dist/model/sourceSortKeys.d.ts.map +1 -0
  212. package/dist/model/sourceType.d.ts +1 -1
  213. package/dist/model/sourceType.d.ts.map +1 -1
  214. package/dist/model/sourceUpdate.d.ts +12 -8
  215. package/dist/model/sourceUpdate.d.ts.map +1 -1
  216. package/dist/model/sourceUpdateCommercetools.d.ts +15 -0
  217. package/dist/model/sourceUpdateCommercetools.d.ts.map +1 -0
  218. package/dist/model/sourceUpdateDocker.d.ts +17 -0
  219. package/dist/model/sourceUpdateDocker.d.ts.map +1 -0
  220. package/dist/model/sourceUpdateInput.d.ts +9 -0
  221. package/dist/model/sourceUpdateInput.d.ts.map +1 -0
  222. package/dist/model/sourceUpdateResponse.d.ts +14 -8
  223. package/dist/model/sourceUpdateResponse.d.ts.map +1 -1
  224. package/dist/model/sourceUpdateShopify.d.ts +31 -0
  225. package/dist/model/sourceUpdateShopify.d.ts.map +1 -0
  226. package/dist/model/sourceWatchResponse.d.ts +20 -0
  227. package/dist/model/sourceWatchResponse.d.ts.map +1 -0
  228. package/dist/model/streamingInput.d.ts +8 -0
  229. package/dist/model/streamingInput.d.ts.map +1 -0
  230. package/dist/model/streamingTrigger.d.ts +8 -0
  231. package/dist/model/streamingTrigger.d.ts.map +1 -0
  232. package/dist/model/streamingTriggerType.d.ts +5 -0
  233. package/dist/model/streamingTriggerType.d.ts.map +1 -0
  234. package/dist/model/subscriptionTrigger.d.ts +8 -0
  235. package/dist/model/subscriptionTrigger.d.ts.map +1 -0
  236. package/dist/model/subscriptionTriggerType.d.ts +5 -0
  237. package/dist/model/subscriptionTriggerType.d.ts.map +1 -0
  238. package/dist/model/task.d.ts +40 -18
  239. package/dist/model/task.d.ts.map +1 -1
  240. package/dist/model/taskCreate.d.ts +31 -9
  241. package/dist/model/taskCreate.d.ts.map +1 -1
  242. package/dist/model/taskCreateResponse.d.ts +13 -7
  243. package/dist/model/taskCreateResponse.d.ts.map +1 -1
  244. package/dist/model/taskCreateTrigger.d.ts +6 -0
  245. package/dist/model/taskCreateTrigger.d.ts.map +1 -0
  246. package/dist/model/taskInput.d.ts +8 -0
  247. package/dist/model/taskInput.d.ts.map +1 -0
  248. package/dist/model/taskSearch.d.ts +4 -0
  249. package/dist/model/taskSearch.d.ts.map +1 -0
  250. package/dist/model/taskSortKeys.d.ts +5 -0
  251. package/dist/model/taskSortKeys.d.ts.map +1 -0
  252. package/dist/model/taskUpdate.d.ts +21 -6
  253. package/dist/model/taskUpdate.d.ts.map +1 -1
  254. package/dist/model/taskUpdateResponse.d.ts +13 -7
  255. package/dist/model/taskUpdateResponse.d.ts.map +1 -1
  256. package/dist/model/transformation.d.ts +27 -0
  257. package/dist/model/transformation.d.ts.map +1 -0
  258. package/dist/model/transformationCreate.d.ts +18 -0
  259. package/dist/model/transformationCreate.d.ts.map +1 -0
  260. package/dist/model/transformationCreateResponse.d.ts +14 -0
  261. package/dist/model/transformationCreateResponse.d.ts.map +1 -0
  262. package/dist/model/transformationSearch.d.ts +4 -0
  263. package/dist/model/transformationSearch.d.ts.map +1 -0
  264. package/dist/model/transformationTry.d.ts +11 -0
  265. package/dist/model/transformationTry.d.ts.map +1 -0
  266. package/dist/model/transformationTryResponse.d.ts +9 -0
  267. package/dist/model/transformationTryResponse.d.ts.map +1 -0
  268. package/dist/model/transformationTryResponseError.d.ts +14 -0
  269. package/dist/model/transformationTryResponseError.d.ts.map +1 -0
  270. package/dist/model/transformationUpdateResponse.d.ts +14 -0
  271. package/dist/model/transformationUpdateResponse.d.ts.map +1 -0
  272. package/dist/model/trigger.d.ts +8 -13
  273. package/dist/model/trigger.d.ts.map +1 -1
  274. package/dist/model/triggerType.d.ts +4 -1
  275. package/dist/model/triggerType.d.ts.map +1 -1
  276. package/dist/model/triggerUpdateInput.d.ts +10 -0
  277. package/dist/model/triggerUpdateInput.d.ts.map +1 -0
  278. package/dist/model/window.d.ts +14 -0
  279. package/dist/model/window.d.ts.map +1 -0
  280. package/dist/src/ingestionClient.d.ts +669 -325
  281. package/dist/src/ingestionClient.d.ts.map +1 -1
  282. package/index.js +1 -1
  283. package/model/actionType.ts +5 -2
  284. package/model/authAPIKey.ts +7 -1
  285. package/model/authAPIKeyPartial.ts +11 -0
  286. package/model/authAlgolia.ts +10 -1
  287. package/model/authAlgoliaInsights.ts +16 -0
  288. package/model/authAlgoliaInsightsPartial.ts +16 -0
  289. package/model/authAlgoliaPartial.ts +16 -0
  290. package/model/authBasic.ts +10 -1
  291. package/model/authBasicPartial.ts +16 -0
  292. package/model/authGoogleServiceAccount.ts +10 -1
  293. package/model/authGoogleServiceAccountPartial.ts +16 -0
  294. package/model/authInput.ts +3 -1
  295. package/model/authInputPartial.ts +16 -0
  296. package/model/authOAuth.ts +16 -1
  297. package/model/authOAuthPartial.ts +26 -0
  298. package/model/authentication.ts +17 -5
  299. package/model/authenticationCreate.ts +9 -3
  300. package/model/authenticationCreateResponse.ts +11 -2
  301. package/model/authenticationSearch.ts +8 -0
  302. package/model/authenticationSortKeys.ts +11 -0
  303. package/model/authenticationType.ts +5 -1
  304. package/model/authenticationUpdate.ts +11 -5
  305. package/model/authenticationUpdateResponse.ts +11 -2
  306. package/model/bigCommerceChannel.ts +13 -0
  307. package/model/bigCommerceMetafield.ts +13 -0
  308. package/model/bigQueryDataType.ts +3 -0
  309. package/model/clientMethodProps.ts +284 -48
  310. package/model/commercetoolsCustomFields.ts +21 -0
  311. package/model/deleteResponse.ts +2 -2
  312. package/model/destination.ts +15 -3
  313. package/model/destinationCreate.ts +11 -2
  314. package/model/destinationCreateResponse.ts +11 -2
  315. package/model/destinationIndexName.ts +13 -1
  316. package/model/destinationIndexPrefix.ts +4 -1
  317. package/model/destinationInput.ts +1 -1
  318. package/model/destinationSearch.ts +8 -0
  319. package/model/destinationSortKeys.ts +6 -0
  320. package/model/destinationType.ts +5 -2
  321. package/model/destinationUpdate.ts +10 -1
  322. package/model/destinationUpdateResponse.ts +11 -2
  323. package/model/dockerImageType.ts +6 -0
  324. package/model/dockerRegistry.ts +6 -0
  325. package/model/dockerStreamsInput.ts +5 -0
  326. package/model/errorBase.ts +1 -1
  327. package/model/event.ts +19 -2
  328. package/model/eventSortKeys.ts +6 -0
  329. package/model/eventStatus.ts +2 -1
  330. package/model/eventType.ts +2 -2
  331. package/model/index.ts +77 -6
  332. package/model/listAuthenticationsResponse.ts +1 -1
  333. package/model/listDestinationsResponse.ts +1 -1
  334. package/model/listEventsResponse.ts +4 -1
  335. package/model/listSourcesResponse.ts +1 -1
  336. package/model/listTasksResponse.ts +4 -1
  337. package/model/listTransformationsResponse.ts +13 -0
  338. package/model/mappingFieldDirective.ts +16 -0
  339. package/model/mappingFormatSchema.ts +6 -0
  340. package/model/mappingInput.ts +13 -0
  341. package/model/mappingKitAction.ts +25 -0
  342. package/model/mappingTypeCSV.ts +8 -0
  343. package/model/methodType.ts +4 -1
  344. package/model/onDemandTrigger.ts +15 -0
  345. package/model/onDemandTriggerInput.ts +10 -0
  346. package/model/onDemandTriggerType.ts +6 -0
  347. package/model/orderKeys.ts +6 -0
  348. package/model/pagination.ts +16 -1
  349. package/model/platform.ts +6 -0
  350. package/model/platformNone.ts +6 -0
  351. package/model/platformWithNone.ts +6 -0
  352. package/model/recordType.ts +6 -0
  353. package/model/run.ts +22 -8
  354. package/model/runListResponse.ts +4 -1
  355. package/model/runOutcome.ts +5 -2
  356. package/model/runProgress.ts +1 -1
  357. package/model/runReasonCode.ts +13 -0
  358. package/model/runResponse.ts +8 -2
  359. package/model/runSortKeys.ts +6 -0
  360. package/model/runStatus.ts +10 -2
  361. package/model/runType.ts +5 -2
  362. package/model/scheduleTrigger.ts +25 -0
  363. package/model/scheduleTriggerInput.ts +15 -0
  364. package/model/scheduleTriggerType.ts +6 -0
  365. package/model/shopifyInput.ts +13 -0
  366. package/model/shopifyMarket.ts +12 -0
  367. package/model/shopifyMetafield.ts +12 -0
  368. package/model/sortKeys.ts +6 -0
  369. package/model/source.ts +9 -3
  370. package/model/sourceBigCommerce.ts +16 -2
  371. package/model/sourceBigQuery.ts +37 -0
  372. package/model/sourceCSV.ts +28 -0
  373. package/model/sourceCommercetools.ts +11 -2
  374. package/model/sourceCreate.ts +8 -2
  375. package/model/sourceCreateResponse.ts +8 -2
  376. package/model/sourceDocker.ts +25 -0
  377. package/model/sourceGA4BigQueryExport.ts +18 -0
  378. package/model/sourceInput.ts +16 -3
  379. package/model/sourceJSON.ts +17 -0
  380. package/model/sourceSearch.ts +5 -0
  381. package/model/sourceShopify.ts +6 -0
  382. package/model/sourceShopifyBase.ts +8 -0
  383. package/model/sourceSortKeys.ts +6 -0
  384. package/model/sourceType.ts +11 -2
  385. package/model/sourceUpdate.ts +9 -6
  386. package/model/sourceUpdateCommercetools.ts +21 -0
  387. package/model/sourceUpdateDocker.ts +22 -0
  388. package/model/sourceUpdateInput.ts +18 -0
  389. package/model/sourceUpdateResponse.ts +8 -2
  390. package/model/sourceUpdateShopify.ts +38 -0
  391. package/model/sourceWatchResponse.ts +25 -0
  392. package/model/streamingInput.ts +10 -0
  393. package/model/streamingTrigger.ts +10 -0
  394. package/model/streamingTriggerType.ts +6 -0
  395. package/model/subscriptionTrigger.ts +10 -0
  396. package/model/subscriptionTriggerType.ts +6 -0
  397. package/model/task.ts +29 -4
  398. package/model/taskCreate.ts +28 -3
  399. package/model/taskCreateResponse.ts +8 -2
  400. package/model/taskCreateTrigger.ts +12 -0
  401. package/model/taskInput.ts +10 -0
  402. package/model/taskSearch.ts +5 -0
  403. package/model/taskSortKeys.ts +11 -0
  404. package/model/taskUpdate.ts +20 -3
  405. package/model/taskUpdateResponse.ts +8 -2
  406. package/model/transformation.ts +33 -0
  407. package/model/transformationCreate.ts +21 -0
  408. package/model/transformationCreateResponse.ts +16 -0
  409. package/model/transformationSearch.ts +5 -0
  410. package/model/transformationTry.ts +13 -0
  411. package/model/transformationTryResponse.ts +12 -0
  412. package/model/transformationTryResponseError.ts +16 -0
  413. package/model/transformationUpdateResponse.ts +16 -0
  414. package/model/trigger.ts +15 -19
  415. package/model/triggerType.ts +9 -2
  416. package/model/triggerUpdateInput.ts +11 -0
  417. package/model/window.ts +16 -0
  418. package/package.json +14 -10
  419. package/dist/ingestion.cjs.js +0 -831
  420. package/dist/model/authenticationInput.d.ts +0 -5
  421. package/dist/model/authenticationInput.d.ts.map +0 -1
  422. package/dist/model/authenticationWithInput.d.ts +0 -4
  423. package/dist/model/authenticationWithInput.d.ts.map +0 -1
  424. package/dist/model/platformType.d.ts +0 -2
  425. package/dist/model/platformType.d.ts.map +0 -1
  426. package/dist/model/sourceJson.d.ts +0 -6
  427. package/dist/model/sourceJson.d.ts.map +0 -1
  428. package/dist/model/triggerInput.d.ts +0 -6
  429. package/dist/model/triggerInput.d.ts.map +0 -1
  430. package/model/authenticationInput.ts +0 -7
  431. package/model/authenticationWithInput.ts +0 -6
  432. package/model/platformType.ts +0 -3
  433. package/model/sourceJson.ts +0 -9
  434. package/model/triggerInput.ts +0 -9
@@ -1,831 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var clientCommon = require('@algolia/client-common');
6
- var requesterNodeHttp = require('@algolia/requester-node-http');
7
-
8
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
9
- const apiClientVersion = '1.0.0-alpha.9';
10
- const REGIONS = ['us'];
11
- function getDefaultHosts(region) {
12
- const url = 'data.{region}.algolia.com'.replace('{region}', region);
13
- return [{ url, accept: 'readWrite', protocol: 'https' }];
14
- }
15
- // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
16
- function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
17
- const auth = clientCommon.createAuth(appIdOption, apiKeyOption, authMode);
18
- const transporter = clientCommon.createTransporter({
19
- hosts: getDefaultHosts(regionOption),
20
- ...options,
21
- algoliaAgent: {
22
- ...clientCommon.getAlgoliaAgent({
23
- algoliaAgents,
24
- client: 'Ingestion',
25
- version: apiClientVersion,
26
- }),
27
- value: '',
28
- },
29
- baseHeaders: {
30
- 'content-type': 'text/plain',
31
- ...auth.headers(),
32
- ...options.baseHeaders,
33
- },
34
- baseQueryParameters: {
35
- ...auth.queryParameters(),
36
- ...options.baseQueryParameters,
37
- },
38
- });
39
- return {
40
- transporter,
41
- /**
42
- * The `appId` currently in use.
43
- */
44
- appId: appIdOption,
45
- /**
46
- * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
47
- */
48
- clearCache() {
49
- return Promise.all([
50
- transporter.requestsCache.clear(),
51
- transporter.responsesCache.clear(),
52
- ]).then(() => undefined);
53
- },
54
- /**
55
- * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
56
- */
57
- get _ua() {
58
- return transporter.algoliaAgent.value;
59
- },
60
- /**
61
- * Adds a `segment` to the `x-algolia-agent` sent with every requests.
62
- *
63
- * @param segment - The algolia agent (user-agent) segment to add.
64
- * @param version - The version of the agent.
65
- */
66
- addAlgoliaAgent(segment, version) {
67
- transporter.algoliaAgent.add({ segment, version });
68
- },
69
- /**
70
- * Create a authentication.
71
- *
72
- * @summary Create a authentication.
73
- * @param authenticationCreate -.
74
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
75
- */
76
- createAuthentication(authenticationCreate, requestOptions) {
77
- if (!authenticationCreate) {
78
- throw new Error('Parameter `authenticationCreate` is required when calling `createAuthentication`.');
79
- }
80
- const requestPath = '/1/authentications';
81
- const headers = {};
82
- const queryParameters = {};
83
- const request = {
84
- method: 'POST',
85
- path: requestPath,
86
- queryParameters,
87
- headers,
88
- data: authenticationCreate,
89
- };
90
- return transporter.request(request, requestOptions);
91
- },
92
- /**
93
- * Create a destination.
94
- *
95
- * @summary Create a destination.
96
- * @param destinationCreate -.
97
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
98
- */
99
- createDestination(destinationCreate, requestOptions) {
100
- if (!destinationCreate) {
101
- throw new Error('Parameter `destinationCreate` is required when calling `createDestination`.');
102
- }
103
- const requestPath = '/1/destinations';
104
- const headers = {};
105
- const queryParameters = {};
106
- const request = {
107
- method: 'POST',
108
- path: requestPath,
109
- queryParameters,
110
- headers,
111
- data: destinationCreate,
112
- };
113
- return transporter.request(request, requestOptions);
114
- },
115
- /**
116
- * Create a source.
117
- *
118
- * @summary Create a source.
119
- * @param sourceCreate -.
120
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
121
- */
122
- createSource(sourceCreate, requestOptions) {
123
- if (!sourceCreate) {
124
- throw new Error('Parameter `sourceCreate` is required when calling `createSource`.');
125
- }
126
- const requestPath = '/1/sources';
127
- const headers = {};
128
- const queryParameters = {};
129
- const request = {
130
- method: 'POST',
131
- path: requestPath,
132
- queryParameters,
133
- headers,
134
- data: sourceCreate,
135
- };
136
- return transporter.request(request, requestOptions);
137
- },
138
- /**
139
- * Create a task.
140
- *
141
- * @summary Create a task.
142
- * @param taskCreate -.
143
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
144
- */
145
- createTask(taskCreate, requestOptions) {
146
- if (!taskCreate) {
147
- throw new Error('Parameter `taskCreate` is required when calling `createTask`.');
148
- }
149
- if (!taskCreate.sourceID) {
150
- throw new Error('Parameter `taskCreate.sourceID` is required when calling `createTask`.');
151
- }
152
- if (!taskCreate.action) {
153
- throw new Error('Parameter `taskCreate.action` is required when calling `createTask`.');
154
- }
155
- const requestPath = '/1/tasks';
156
- const headers = {};
157
- const queryParameters = {};
158
- const request = {
159
- method: 'POST',
160
- path: requestPath,
161
- queryParameters,
162
- headers,
163
- data: taskCreate,
164
- };
165
- return transporter.request(request, requestOptions);
166
- },
167
- /**
168
- * Soft delete a authentication.
169
- *
170
- * @summary Delete a authentication.
171
- * @param deleteAuthentication - The deleteAuthentication object.
172
- * @param deleteAuthentication.authenticationID - The authentication uuid.
173
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
174
- */
175
- deleteAuthentication({ authenticationID }, requestOptions) {
176
- if (!authenticationID) {
177
- throw new Error('Parameter `authenticationID` is required when calling `deleteAuthentication`.');
178
- }
179
- const requestPath = '/1/authentications/{authenticationID}'.replace('{authenticationID}', encodeURIComponent(authenticationID));
180
- const headers = {};
181
- const queryParameters = {};
182
- const request = {
183
- method: 'DELETE',
184
- path: requestPath,
185
- queryParameters,
186
- headers,
187
- };
188
- return transporter.request(request, requestOptions);
189
- },
190
- /**
191
- * Soft delete a destination.
192
- *
193
- * @summary Delete a destination.
194
- * @param deleteDestination - The deleteDestination object.
195
- * @param deleteDestination.destinationID - The destination uuid.
196
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
197
- */
198
- deleteDestination({ destinationID }, requestOptions) {
199
- if (!destinationID) {
200
- throw new Error('Parameter `destinationID` is required when calling `deleteDestination`.');
201
- }
202
- const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
203
- const headers = {};
204
- const queryParameters = {};
205
- const request = {
206
- method: 'DELETE',
207
- path: requestPath,
208
- queryParameters,
209
- headers,
210
- };
211
- return transporter.request(request, requestOptions);
212
- },
213
- /**
214
- * Soft delete a source.
215
- *
216
- * @summary Delete a source.
217
- * @param deleteSource - The deleteSource object.
218
- * @param deleteSource.sourceID - The source uuid.
219
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
220
- */
221
- deleteSource({ sourceID }, requestOptions) {
222
- if (!sourceID) {
223
- throw new Error('Parameter `sourceID` is required when calling `deleteSource`.');
224
- }
225
- const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
226
- const headers = {};
227
- const queryParameters = {};
228
- const request = {
229
- method: 'DELETE',
230
- path: requestPath,
231
- queryParameters,
232
- headers,
233
- };
234
- return transporter.request(request, requestOptions);
235
- },
236
- /**
237
- * Soft delete a task.
238
- *
239
- * @summary Delete a task.
240
- * @param deleteTask - The deleteTask object.
241
- * @param deleteTask.taskID - The task uuid.
242
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
243
- */
244
- deleteTask({ taskID }, requestOptions) {
245
- if (!taskID) {
246
- throw new Error('Parameter `taskID` is required when calling `deleteTask`.');
247
- }
248
- const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
249
- const headers = {};
250
- const queryParameters = {};
251
- const request = {
252
- method: 'DELETE',
253
- path: requestPath,
254
- queryParameters,
255
- headers,
256
- };
257
- return transporter.request(request, requestOptions);
258
- },
259
- /**
260
- * Disable a task.
261
- *
262
- * @summary Disable a task.
263
- * @param disableTask - The disableTask object.
264
- * @param disableTask.taskID - The task uuid.
265
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
266
- */
267
- disableTask({ taskID }, requestOptions) {
268
- if (!taskID) {
269
- throw new Error('Parameter `taskID` is required when calling `disableTask`.');
270
- }
271
- const requestPath = '/1/tasks/{taskID}/disable'.replace('{taskID}', encodeURIComponent(taskID));
272
- const headers = {};
273
- const queryParameters = {};
274
- const request = {
275
- method: 'PUT',
276
- path: requestPath,
277
- queryParameters,
278
- headers,
279
- };
280
- return transporter.request(request, requestOptions);
281
- },
282
- /**
283
- * Enable a task.
284
- *
285
- * @summary Enable a task.
286
- * @param enableTask - The enableTask object.
287
- * @param enableTask.taskID - The task uuid.
288
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
289
- */
290
- enableTask({ taskID }, requestOptions) {
291
- if (!taskID) {
292
- throw new Error('Parameter `taskID` is required when calling `enableTask`.');
293
- }
294
- const requestPath = '/1/tasks/{taskID}/enable'.replace('{taskID}', encodeURIComponent(taskID));
295
- const headers = {};
296
- const queryParameters = {};
297
- const request = {
298
- method: 'PUT',
299
- path: requestPath,
300
- queryParameters,
301
- headers,
302
- };
303
- return transporter.request(request, requestOptions);
304
- },
305
- /**
306
- * Get a authentication.
307
- *
308
- * @summary Get a authentication.
309
- * @param getAuthentication - The getAuthentication object.
310
- * @param getAuthentication.authenticationID - The authentication uuid.
311
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
312
- */
313
- getAuthentication({ authenticationID }, requestOptions) {
314
- if (!authenticationID) {
315
- throw new Error('Parameter `authenticationID` is required when calling `getAuthentication`.');
316
- }
317
- const requestPath = '/1/authentications/{authenticationID}'.replace('{authenticationID}', encodeURIComponent(authenticationID));
318
- const headers = {};
319
- const queryParameters = {};
320
- const request = {
321
- method: 'GET',
322
- path: requestPath,
323
- queryParameters,
324
- headers,
325
- };
326
- return transporter.request(request, requestOptions);
327
- },
328
- /**
329
- * Get a list of authentications.
330
- *
331
- * @summary Get a list of authentications.
332
- * @param getAuthentications - The getAuthentications object.
333
- * @param getAuthentications.itemsPerPage - The number of items per page to return.
334
- * @param getAuthentications.page - The page number to fetch, starting at 1.
335
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
336
- */
337
- getAuthentications({ itemsPerPage, page } = {}, requestOptions = undefined) {
338
- const requestPath = '/1/authentications';
339
- const headers = {};
340
- const queryParameters = {};
341
- if (itemsPerPage !== undefined) {
342
- queryParameters.itemsPerPage = itemsPerPage.toString();
343
- }
344
- if (page !== undefined) {
345
- queryParameters.page = page.toString();
346
- }
347
- const request = {
348
- method: 'GET',
349
- path: requestPath,
350
- queryParameters,
351
- headers,
352
- };
353
- return transporter.request(request, requestOptions);
354
- },
355
- /**
356
- * Get a destination.
357
- *
358
- * @summary Get a destination.
359
- * @param getDestination - The getDestination object.
360
- * @param getDestination.destinationID - The destination uuid.
361
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
362
- */
363
- getDestination({ destinationID }, requestOptions) {
364
- if (!destinationID) {
365
- throw new Error('Parameter `destinationID` is required when calling `getDestination`.');
366
- }
367
- const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
368
- const headers = {};
369
- const queryParameters = {};
370
- const request = {
371
- method: 'GET',
372
- path: requestPath,
373
- queryParameters,
374
- headers,
375
- };
376
- return transporter.request(request, requestOptions);
377
- },
378
- /**
379
- * Get a list of destinations.
380
- *
381
- * @summary Get a list of destinations.
382
- * @param getDestinations - The getDestinations object.
383
- * @param getDestinations.itemsPerPage - The number of items per page to return.
384
- * @param getDestinations.page - The page number to fetch, starting at 1.
385
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
386
- */
387
- getDestinations({ itemsPerPage, page } = {}, requestOptions = undefined) {
388
- const requestPath = '/1/destinations';
389
- const headers = {};
390
- const queryParameters = {};
391
- if (itemsPerPage !== undefined) {
392
- queryParameters.itemsPerPage = itemsPerPage.toString();
393
- }
394
- if (page !== undefined) {
395
- queryParameters.page = page.toString();
396
- }
397
- const request = {
398
- method: 'GET',
399
- path: requestPath,
400
- queryParameters,
401
- headers,
402
- };
403
- return transporter.request(request, requestOptions);
404
- },
405
- /**
406
- * Get an event in a specific run.
407
- *
408
- * @summary Get an event in a specific run.
409
- * @param getEvent - The getEvent object.
410
- * @param getEvent.runID - The run uuid.
411
- * @param getEvent.eventID - The event uuid.
412
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
413
- */
414
- getEvent({ runID, eventID }, requestOptions) {
415
- if (!runID) {
416
- throw new Error('Parameter `runID` is required when calling `getEvent`.');
417
- }
418
- if (!eventID) {
419
- throw new Error('Parameter `eventID` is required when calling `getEvent`.');
420
- }
421
- const requestPath = '/1/runs/{runID}/events/{eventID}'
422
- .replace('{runID}', encodeURIComponent(runID))
423
- .replace('{eventID}', encodeURIComponent(eventID));
424
- const headers = {};
425
- const queryParameters = {};
426
- const request = {
427
- method: 'GET',
428
- path: requestPath,
429
- queryParameters,
430
- headers,
431
- };
432
- return transporter.request(request, requestOptions);
433
- },
434
- /**
435
- * Get a list of events for a specific run.
436
- *
437
- * @summary Get a list of events for a specific run.
438
- * @param getEvents - The getEvents object.
439
- * @param getEvents.runID - The run uuid.
440
- * @param getEvents.itemsPerPage - The number of items per page to return.
441
- * @param getEvents.page - The page number to fetch, starting at 1.
442
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
443
- */
444
- getEvents({ runID, itemsPerPage, page }, requestOptions) {
445
- if (!runID) {
446
- throw new Error('Parameter `runID` is required when calling `getEvents`.');
447
- }
448
- const requestPath = '/1/runs/{runID}/events'.replace('{runID}', encodeURIComponent(runID));
449
- const headers = {};
450
- const queryParameters = {};
451
- if (itemsPerPage !== undefined) {
452
- queryParameters.itemsPerPage = itemsPerPage.toString();
453
- }
454
- if (page !== undefined) {
455
- queryParameters.page = page.toString();
456
- }
457
- const request = {
458
- method: 'GET',
459
- path: requestPath,
460
- queryParameters,
461
- headers,
462
- };
463
- return transporter.request(request, requestOptions);
464
- },
465
- /**
466
- * Get a run.
467
- *
468
- * @summary Get a run.
469
- * @param getRun - The getRun object.
470
- * @param getRun.runID - The run uuid.
471
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
472
- */
473
- getRun({ runID }, requestOptions) {
474
- if (!runID) {
475
- throw new Error('Parameter `runID` is required when calling `getRun`.');
476
- }
477
- const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID));
478
- const headers = {};
479
- const queryParameters = {};
480
- const request = {
481
- method: 'GET',
482
- path: requestPath,
483
- queryParameters,
484
- headers,
485
- };
486
- return transporter.request(request, requestOptions);
487
- },
488
- /**
489
- * Get a list of runs.
490
- *
491
- * @summary Get a list of runs.
492
- * @param getRuns - The getRuns object.
493
- * @param getRuns.itemsPerPage - The number of items per page to return.
494
- * @param getRuns.page - The page number to fetch, starting at 1.
495
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
496
- */
497
- getRuns({ itemsPerPage, page } = {}, requestOptions = undefined) {
498
- const requestPath = '/1/runs';
499
- const headers = {};
500
- const queryParameters = {};
501
- if (itemsPerPage !== undefined) {
502
- queryParameters.itemsPerPage = itemsPerPage.toString();
503
- }
504
- if (page !== undefined) {
505
- queryParameters.page = page.toString();
506
- }
507
- const request = {
508
- method: 'GET',
509
- path: requestPath,
510
- queryParameters,
511
- headers,
512
- };
513
- return transporter.request(request, requestOptions);
514
- },
515
- /**
516
- * Get a list of runs associated with a taskID.
517
- *
518
- * @summary Get a list of runs associated with a taskID.
519
- * @param getRunsByTaskID - The getRunsByTaskID object.
520
- * @param getRunsByTaskID.taskID - The task uuid.
521
- * @param getRunsByTaskID.itemsPerPage - The number of items per page to return.
522
- * @param getRunsByTaskID.page - The page number to fetch, starting at 1.
523
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
524
- */
525
- getRunsByTaskID({ taskID, itemsPerPage, page }, requestOptions) {
526
- if (!taskID) {
527
- throw new Error('Parameter `taskID` is required when calling `getRunsByTaskID`.');
528
- }
529
- const requestPath = '/1/runs/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
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
- const request = {
539
- method: 'GET',
540
- path: requestPath,
541
- queryParameters,
542
- headers,
543
- };
544
- return transporter.request(request, requestOptions);
545
- },
546
- /**
547
- * Get a source.
548
- *
549
- * @summary Get a source.
550
- * @param getSource - The getSource object.
551
- * @param getSource.sourceID - The source uuid.
552
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
553
- */
554
- getSource({ sourceID }, requestOptions) {
555
- if (!sourceID) {
556
- throw new Error('Parameter `sourceID` is required when calling `getSource`.');
557
- }
558
- const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
559
- const headers = {};
560
- const queryParameters = {};
561
- const request = {
562
- method: 'GET',
563
- path: requestPath,
564
- queryParameters,
565
- headers,
566
- };
567
- return transporter.request(request, requestOptions);
568
- },
569
- /**
570
- * Get a list of sources.
571
- *
572
- * @summary Get a list of sources.
573
- * @param getSources - The getSources object.
574
- * @param getSources.itemsPerPage - The number of items per page to return.
575
- * @param getSources.page - The page number to fetch, starting at 1.
576
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
577
- */
578
- getSources({ itemsPerPage, page } = {}, requestOptions = undefined) {
579
- const requestPath = '/1/sources';
580
- const headers = {};
581
- const queryParameters = {};
582
- if (itemsPerPage !== undefined) {
583
- queryParameters.itemsPerPage = itemsPerPage.toString();
584
- }
585
- if (page !== undefined) {
586
- queryParameters.page = page.toString();
587
- }
588
- const request = {
589
- method: 'GET',
590
- path: requestPath,
591
- queryParameters,
592
- headers,
593
- };
594
- return transporter.request(request, requestOptions);
595
- },
596
- /**
597
- * Get a task.
598
- *
599
- * @summary Get a task.
600
- * @param getTask - The getTask object.
601
- * @param getTask.taskID - The task uuid.
602
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
603
- */
604
- getTask({ taskID }, requestOptions) {
605
- if (!taskID) {
606
- throw new Error('Parameter `taskID` is required when calling `getTask`.');
607
- }
608
- const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
609
- const headers = {};
610
- const queryParameters = {};
611
- const request = {
612
- method: 'GET',
613
- path: requestPath,
614
- queryParameters,
615
- headers,
616
- };
617
- return transporter.request(request, requestOptions);
618
- },
619
- /**
620
- * Get a list of tasks.
621
- *
622
- * @summary Get a list of tasks.
623
- * @param getTasks - The getTasks object.
624
- * @param getTasks.itemsPerPage - The number of items per page to return.
625
- * @param getTasks.page - The page number to fetch, starting at 1.
626
- * @param getTasks.action - Which action the returned task should have. Can be a list of string separated with commas.
627
- * @param getTasks.enabled - If the returned task should have its \'enabled\' property set to true.
628
- * @param getTasks.destinationID - Which destinationID the returned task should have. Can be a list of string separated with commas.
629
- * @param getTasks.triggerType - Which trigger type the returned task should have. Can be a list of string separated with commas.
630
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
631
- */
632
- getTasks({ itemsPerPage, page, action, enabled, destinationID, triggerType, } = {}, requestOptions = undefined) {
633
- const requestPath = '/1/tasks';
634
- const headers = {};
635
- const queryParameters = {};
636
- if (itemsPerPage !== undefined) {
637
- queryParameters.itemsPerPage = itemsPerPage.toString();
638
- }
639
- if (page !== undefined) {
640
- queryParameters.page = page.toString();
641
- }
642
- if (action !== undefined) {
643
- queryParameters.action = action.toString();
644
- }
645
- if (enabled !== undefined) {
646
- queryParameters.enabled = enabled.toString();
647
- }
648
- if (destinationID !== undefined) {
649
- queryParameters.destinationID = destinationID.toString();
650
- }
651
- if (triggerType !== undefined) {
652
- queryParameters.triggerType = triggerType.toString();
653
- }
654
- const request = {
655
- method: 'GET',
656
- path: requestPath,
657
- queryParameters,
658
- headers,
659
- };
660
- return transporter.request(request, requestOptions);
661
- },
662
- /**
663
- * Run a task.
664
- *
665
- * @summary Run a task.
666
- * @param runTask - The runTask object.
667
- * @param runTask.taskID - The task uuid.
668
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
669
- */
670
- runTask({ taskID }, requestOptions) {
671
- if (!taskID) {
672
- throw new Error('Parameter `taskID` is required when calling `runTask`.');
673
- }
674
- const requestPath = '/1/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID));
675
- const headers = {};
676
- const queryParameters = {};
677
- const request = {
678
- method: 'POST',
679
- path: requestPath,
680
- queryParameters,
681
- headers,
682
- };
683
- return transporter.request(request, requestOptions);
684
- },
685
- /**
686
- * Update a authentication.
687
- *
688
- * @summary Update a authentication.
689
- * @param updateAuthentication - The updateAuthentication object.
690
- * @param updateAuthentication.authenticationID - The authentication uuid.
691
- * @param updateAuthentication.authenticationUpdate - The authenticationUpdate object.
692
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
693
- */
694
- updateAuthentication({ authenticationID, authenticationUpdate }, requestOptions) {
695
- if (!authenticationID) {
696
- throw new Error('Parameter `authenticationID` is required when calling `updateAuthentication`.');
697
- }
698
- if (!authenticationUpdate) {
699
- throw new Error('Parameter `authenticationUpdate` is required when calling `updateAuthentication`.');
700
- }
701
- const requestPath = '/1/authentications/{authenticationID}'.replace('{authenticationID}', encodeURIComponent(authenticationID));
702
- const headers = {};
703
- const queryParameters = {};
704
- const request = {
705
- method: 'PUT',
706
- path: requestPath,
707
- queryParameters,
708
- headers,
709
- data: authenticationUpdate,
710
- };
711
- return transporter.request(request, requestOptions);
712
- },
713
- /**
714
- * Update a destination.
715
- *
716
- * @summary Update a destination.
717
- * @param updateDestination - The updateDestination object.
718
- * @param updateDestination.destinationID - The destination uuid.
719
- * @param updateDestination.destinationUpdate - The destinationUpdate object.
720
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
721
- */
722
- updateDestination({ destinationID, destinationUpdate }, requestOptions) {
723
- if (!destinationID) {
724
- throw new Error('Parameter `destinationID` is required when calling `updateDestination`.');
725
- }
726
- if (!destinationUpdate) {
727
- throw new Error('Parameter `destinationUpdate` is required when calling `updateDestination`.');
728
- }
729
- const requestPath = '/1/destinations/{destinationID}'.replace('{destinationID}', encodeURIComponent(destinationID));
730
- const headers = {};
731
- const queryParameters = {};
732
- const request = {
733
- method: 'PUT',
734
- path: requestPath,
735
- queryParameters,
736
- headers,
737
- data: destinationUpdate,
738
- };
739
- return transporter.request(request, requestOptions);
740
- },
741
- /**
742
- * Update a source.
743
- *
744
- * @summary Update a source.
745
- * @param updateSource - The updateSource object.
746
- * @param updateSource.sourceID - The source uuid.
747
- * @param updateSource.sourceUpdate - The sourceUpdate object.
748
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
749
- */
750
- updateSource({ sourceID, sourceUpdate }, requestOptions) {
751
- if (!sourceID) {
752
- throw new Error('Parameter `sourceID` is required when calling `updateSource`.');
753
- }
754
- if (!sourceUpdate) {
755
- throw new Error('Parameter `sourceUpdate` is required when calling `updateSource`.');
756
- }
757
- const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID));
758
- const headers = {};
759
- const queryParameters = {};
760
- const request = {
761
- method: 'POST',
762
- path: requestPath,
763
- queryParameters,
764
- headers,
765
- data: sourceUpdate,
766
- };
767
- return transporter.request(request, requestOptions);
768
- },
769
- /**
770
- * Update a task.
771
- *
772
- * @summary Update a task.
773
- * @param updateTask - The updateTask object.
774
- * @param updateTask.taskID - The task uuid.
775
- * @param updateTask.taskUpdate - The taskUpdate object.
776
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
777
- */
778
- updateTask({ taskID, taskUpdate }, requestOptions) {
779
- if (!taskID) {
780
- throw new Error('Parameter `taskID` is required when calling `updateTask`.');
781
- }
782
- if (!taskUpdate) {
783
- throw new Error('Parameter `taskUpdate` is required when calling `updateTask`.');
784
- }
785
- const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
786
- const headers = {};
787
- const queryParameters = {};
788
- const request = {
789
- method: 'PUT',
790
- path: requestPath,
791
- queryParameters,
792
- headers,
793
- data: taskUpdate,
794
- };
795
- return transporter.request(request, requestOptions);
796
- },
797
- };
798
- }
799
-
800
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
801
- function ingestionClient(appId, apiKey, region, options) {
802
- if (!appId || typeof appId !== 'string') {
803
- throw new Error('`appId` is missing.');
804
- }
805
- if (!apiKey || typeof apiKey !== 'string') {
806
- throw new Error('`apiKey` is missing.');
807
- }
808
- if (!region ||
809
- (region && (typeof region !== 'string' || !REGIONS.includes(region)))) {
810
- throw new Error(`\`region\` is required and must be one of the following: ${REGIONS.join(', ')}`);
811
- }
812
- return createIngestionClient({
813
- appId,
814
- apiKey,
815
- region,
816
- timeouts: {
817
- connect: clientCommon.DEFAULT_CONNECT_TIMEOUT_NODE,
818
- read: clientCommon.DEFAULT_READ_TIMEOUT_NODE,
819
- write: clientCommon.DEFAULT_WRITE_TIMEOUT_NODE,
820
- },
821
- requester: requesterNodeHttp.createHttpRequester(),
822
- algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
823
- responsesCache: clientCommon.createNullCache(),
824
- requestsCache: clientCommon.createNullCache(),
825
- hostsCache: clientCommon.createMemoryCache(),
826
- ...options,
827
- });
828
- }
829
-
830
- exports.apiClientVersion = apiClientVersion;
831
- exports.ingestionClient = ingestionClient;