@algolia/ingestion 1.0.0-alpha.6 → 1.0.0-alpha.8

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.
@@ -6,7 +6,7 @@ var clientCommon = require('@algolia/client-common');
6
6
  var requesterNodeHttp = require('@algolia/requester-node-http');
7
7
 
8
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.6';
9
+ const apiClientVersion = '1.0.0-alpha.8';
10
10
  const REGIONS = ['us'];
11
11
  function getDefaultHosts(region) {
12
12
  const url = 'data.{region}.algolia.com'.replace('{region}', region);
@@ -623,9 +623,13 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
623
623
  * @param getTasks - The getTasks object.
624
624
  * @param getTasks.itemsPerPage - The number of items per page to return.
625
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.
626
630
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
627
631
  */
628
- getTasks({ itemsPerPage, page } = {}, requestOptions = undefined) {
632
+ getTasks({ itemsPerPage, page, action, enabled, destinationID, triggerType, } = {}, requestOptions = undefined) {
629
633
  const requestPath = '/1/tasks';
630
634
  const headers = {};
631
635
  const queryParameters = {};
@@ -635,6 +639,18 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
635
639
  if (page !== undefined) {
636
640
  queryParameters.page = page.toString();
637
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
+ }
638
654
  const request = {
639
655
  method: 'GET',
640
656
  path: requestPath,
@@ -172,6 +172,7 @@ function createStatefulHost(host, status = 'up') {
172
172
  }
173
173
 
174
174
  function _defineProperty(obj, key, value) {
175
+ key = _toPropertyKey(key);
175
176
  if (key in obj) {
176
177
  Object.defineProperty(obj, key, {
177
178
  value: value,
@@ -184,6 +185,20 @@ function _defineProperty(obj, key, value) {
184
185
  }
185
186
  return obj;
186
187
  }
188
+ function _toPrimitive(input, hint) {
189
+ if (typeof input !== "object" || input === null) return input;
190
+ var prim = input[Symbol.toPrimitive];
191
+ if (prim !== undefined) {
192
+ var res = prim.call(input, hint || "default");
193
+ if (typeof res !== "object") return res;
194
+ throw new TypeError("@@toPrimitive must return a primitive value.");
195
+ }
196
+ return (hint === "string" ? String : Number)(input);
197
+ }
198
+ function _toPropertyKey(arg) {
199
+ var key = _toPrimitive(arg, "string");
200
+ return typeof key === "symbol" ? key : String(key);
201
+ }
187
202
 
188
203
  class AlgoliaError extends Error {
189
204
  constructor(message, name) {
@@ -208,8 +223,8 @@ class RetryError extends ErrorWithStackTrace {
208
223
  }
209
224
  }
210
225
  class ApiError extends ErrorWithStackTrace {
211
- constructor(message, status, stackTrace) {
212
- super(message, stackTrace, 'ApiError');
226
+ constructor(message, status, stackTrace, name = 'ApiError') {
227
+ super(message, stackTrace, name);
213
228
  _defineProperty(this, "status", void 0);
214
229
  this.status = status;
215
230
  }
@@ -221,6 +236,14 @@ class DeserializationError extends AlgoliaError {
221
236
  this.response = response;
222
237
  }
223
238
  }
239
+ // DetailedApiError is only used by the ingestion client to return more informative error, other clients will use ApiClient.
240
+ class DetailedApiError extends ApiError {
241
+ constructor(message, status, error, stackTrace) {
242
+ super(message, status, stackTrace, 'DetailedApiError');
243
+ _defineProperty(this, "error", void 0);
244
+ this.error = error;
245
+ }
246
+ }
224
247
  function serializeUrl(host, path, queryParameters) {
225
248
  const queryParametersAsString = serializeQueryParameters(queryParameters);
226
249
  let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.substr(1) : path}`;
@@ -268,13 +291,16 @@ function deserializeFailure({
268
291
  content,
269
292
  status
270
293
  }, stackFrame) {
271
- let message = content;
272
294
  try {
273
- message = JSON.parse(content).message;
295
+ const parsed = JSON.parse(content);
296
+ if ('error' in parsed) {
297
+ return new DetailedApiError(parsed.message, status, parsed.error, stackFrame);
298
+ }
299
+ return new ApiError(parsed.message, status, stackFrame);
274
300
  } catch (e) {
275
301
  // ..
276
302
  }
277
- return new ApiError(message, status, stackFrame);
303
+ return new ApiError(content, status, stackFrame);
278
304
  }
279
305
 
280
306
  function isNetworkError({
@@ -636,7 +662,7 @@ function createXhrRequester() {
636
662
  }
637
663
 
638
664
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
639
- const apiClientVersion = '1.0.0-alpha.6';
665
+ const apiClientVersion = '1.0.0-alpha.8';
640
666
  const REGIONS = ['us'];
641
667
  function getDefaultHosts(region) {
642
668
  const url = 'data.{region}.algolia.com'.replace('{region}', region);
@@ -1253,9 +1279,13 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1253
1279
  * @param getTasks - The getTasks object.
1254
1280
  * @param getTasks.itemsPerPage - The number of items per page to return.
1255
1281
  * @param getTasks.page - The page number to fetch, starting at 1.
1282
+ * @param getTasks.action - Which action the returned task should have. Can be a list of string separated with commas.
1283
+ * @param getTasks.enabled - If the returned task should have its \'enabled\' property set to true.
1284
+ * @param getTasks.destinationID - Which destinationID the returned task should have. Can be a list of string separated with commas.
1285
+ * @param getTasks.triggerType - Which trigger type the returned task should have. Can be a list of string separated with commas.
1256
1286
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1257
1287
  */
1258
- getTasks({ itemsPerPage, page } = {}, requestOptions = undefined) {
1288
+ getTasks({ itemsPerPage, page, action, enabled, destinationID, triggerType, } = {}, requestOptions = undefined) {
1259
1289
  const requestPath = '/1/tasks';
1260
1290
  const headers = {};
1261
1291
  const queryParameters = {};
@@ -1265,6 +1295,18 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1265
1295
  if (page !== undefined) {
1266
1296
  queryParameters.page = page.toString();
1267
1297
  }
1298
+ if (action !== undefined) {
1299
+ queryParameters.action = action.toString();
1300
+ }
1301
+ if (enabled !== undefined) {
1302
+ queryParameters.enabled = enabled.toString();
1303
+ }
1304
+ if (destinationID !== undefined) {
1305
+ queryParameters.destinationID = destinationID.toString();
1306
+ }
1307
+ if (triggerType !== undefined) {
1308
+ queryParameters.triggerType = triggerType.toString();
1309
+ }
1268
1310
  const request = {
1269
1311
  method: 'GET',
1270
1312
  path: requestPath,
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT
2
2
  import { createHttpRequester } from '@algolia/requester-node-http';
3
3
 
4
4
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
5
- const apiClientVersion = '1.0.0-alpha.6';
5
+ const apiClientVersion = '1.0.0-alpha.8';
6
6
  const REGIONS = ['us'];
7
7
  function getDefaultHosts(region) {
8
8
  const url = 'data.{region}.algolia.com'.replace('{region}', region);
@@ -619,9 +619,13 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
619
619
  * @param getTasks - The getTasks object.
620
620
  * @param getTasks.itemsPerPage - The number of items per page to return.
621
621
  * @param getTasks.page - The page number to fetch, starting at 1.
622
+ * @param getTasks.action - Which action the returned task should have. Can be a list of string separated with commas.
623
+ * @param getTasks.enabled - If the returned task should have its \'enabled\' property set to true.
624
+ * @param getTasks.destinationID - Which destinationID the returned task should have. Can be a list of string separated with commas.
625
+ * @param getTasks.triggerType - Which trigger type the returned task should have. Can be a list of string separated with commas.
622
626
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
623
627
  */
624
- getTasks({ itemsPerPage, page } = {}, requestOptions = undefined) {
628
+ getTasks({ itemsPerPage, page, action, enabled, destinationID, triggerType, } = {}, requestOptions = undefined) {
625
629
  const requestPath = '/1/tasks';
626
630
  const headers = {};
627
631
  const queryParameters = {};
@@ -631,6 +635,18 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
631
635
  if (page !== undefined) {
632
636
  queryParameters.page = page.toString();
633
637
  }
638
+ if (action !== undefined) {
639
+ queryParameters.action = action.toString();
640
+ }
641
+ if (enabled !== undefined) {
642
+ queryParameters.enabled = enabled.toString();
643
+ }
644
+ if (destinationID !== undefined) {
645
+ queryParameters.destinationID = destinationID.toString();
646
+ }
647
+ if (triggerType !== undefined) {
648
+ queryParameters.triggerType = triggerType.toString();
649
+ }
634
650
  const request = {
635
651
  method: 'GET',
636
652
  path: requestPath,
@@ -1,2 +1,2 @@
1
- /*! ingestion.umd.js | 1.0.0-alpha.6 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/ingestion"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function n(){return JSON.parse(a().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),a=n()[r];return Promise.all([a||t(),void 0!==a])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=n();return s[JSON.stringify(e)]=t,a().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=n();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function r(e){const t=[...e.caches],a=t.shift();return void 0===a?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,s={miss:()=>Promise.resolve()})=>a.get(e,n,s).catch((()=>r({caches:t}).get(e,n,s))),set:(e,n)=>a.set(e,n).catch((()=>r({caches:t}).set(e,n))),delete:e=>a.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>a.clear().catch((()=>r({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,a,n={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const o=a();return o.then((e=>n.miss(e))).then((()=>o))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const n=12e4;function s(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>n},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=n}}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class c extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class d extends u{constructor(e,t,r){super(e,r,"ApiError"),o(this,"status",void 0),this.status=t}}class h extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}function l(e,t,r){const a=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let n=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return a.length&&(n+=`?${a}`),n}function m(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function p({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:n,timeouts:o,requester:i,requestsCache:u,responsesCache:p}){async function g(u,p,g=!0){const P=[],w=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(u,p),f=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},n={};return Object.keys(a).forEach((e=>{const t=a[e];n[e.toLowerCase()]=t})),n}(r,u.headers,p.headers),q="GET"===u.method?{...u.data,...p.data}:{},I={...a,...u.queryParameters,...q};if(n.value&&(I["x-algolia-agent"]=n.value),p&&p.queryParameters)for(const e of Object.keys(p.queryParameters))p.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(p.queryParameters[e])?I[e]=p.queryParameters[e].toString():I[e]=p.queryParameters[e];let D=0;const y=async(e,r)=>{const a=e.pop();if(void 0===a)throw new c(function(e){return e.map((e=>m(e)))}(P));let n=p.timeout;void 0===n&&(n=g?o.read:o.write);const q={data:w,headers:f,method:u.method,url:l(a,u.path,I),connectTimeout:r(D,o.connect),responseTimeout:r(D,n)},T=t=>{const r={request:q,response:t,host:a,triesLeft:e.length};return P.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const n=T(E);return E.isTimedOut&&D++,console.log("Retryable failure",m(n)),await t.set(a,s(a,E.isTimedOut?"timed out":"down")),y(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(E);throw T(E),function({content:e,status:t},r){let a=e;try{a=JSON.parse(e).message}catch(e){}return new d(a,t,r)}(E,P)},T=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),a=r.filter((e=>e.isUp())),n=r.filter((e=>e.isTimedOut())),o=[...a,...n];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t}}(T);return y([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:n,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return g(e,t,n);const s=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const o={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return p.get(o,(()=>u.get(o,(()=>u.set(o,s()).then((e=>Promise.all([u.delete(o),e])),(e=>Promise.all([u.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>p.set(o,e)})},requestsCache:u,responsesCache:p}}function g({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}const P="1.0.0-alpha.6",w=["us"];e.apiClientVersion=P,e.ingestionClient=function(e,n,s,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!n||"string"!=typeof n)throw new Error("`apiKey` is missing.");if(!s||s&&("string"!=typeof s||!w.includes(s)))throw new Error(`\`region\` is required and must be one of the following: ${w.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:a,region:n,...s}){const o=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(e,t,r),i=p({hosts:(u=n,[{url:"data.{region}.algolia.com".replace("{region}",u),accept:"readWrite",protocol:"https"}]),...s,algoliaAgent:{...g({algoliaAgents:a,client:"Ingestion",version:P}),value:""},baseHeaders:{"content-type":"text/plain",...o.headers(),...s.baseHeaders},baseQueryParameters:{...o.queryParameters(),...s.baseQueryParameters}});var u;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.algoliaAgent.add({segment:e,version:t})},createAuthentication(e,t){if(!e)throw new Error("Parameter `authenticationCreate` is required when calling `createAuthentication`.");const r={method:"POST",path:"/1/authentications",queryParameters:{},headers:{},data:e};return i.request(r,t)},createDestination(e,t){if(!e)throw new Error("Parameter `destinationCreate` is required when calling `createDestination`.");const r={method:"POST",path:"/1/destinations",queryParameters:{},headers:{},data:e};return i.request(r,t)},createSource(e,t){if(!e)throw new Error("Parameter `sourceCreate` is required when calling `createSource`.");const r={method:"POST",path:"/1/sources",queryParameters:{},headers:{},data:e};return i.request(r,t)},createTask(e,t){if(!e)throw new Error("Parameter `taskCreate` is required when calling `createTask`.");if(!e.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTask`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTask`.");const r={method:"POST",path:"/1/tasks",queryParameters:{},headers:{},data:e};return i.request(r,t)},deleteAuthentication({authenticationID:e},t){if(!e)throw new Error("Parameter `authenticationID` is required when calling `deleteAuthentication`.");const r={method:"DELETE",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteDestination({destinationID:e},t){if(!e)throw new Error("Parameter `destinationID` is required when calling `deleteDestination`.");const r={method:"DELETE",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteSource({sourceID:e},t){if(!e)throw new Error("Parameter `sourceID` is required when calling `deleteSource`.");const r={method:"DELETE",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTask`.");const r={method:"DELETE",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},disableTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},enableTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getAuthentication({authenticationID:e},t){if(!e)throw new Error("Parameter `authenticationID` is required when calling `getAuthentication`.");const r={method:"GET",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getAuthentications({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/authentications",queryParameters:a,headers:{}};return i.request(n,r)},getDestination({destinationID:e},t){if(!e)throw new Error("Parameter `destinationID` is required when calling `getDestination`.");const r={method:"GET",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getDestinations({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/destinations",queryParameters:a,headers:{}};return i.request(n,r)},getEvent({runID:e,eventID:t},r){if(!e)throw new Error("Parameter `runID` is required when calling `getEvent`.");if(!t)throw new Error("Parameter `eventID` is required when calling `getEvent`.");const a={method:"GET",path:"/1/runs/{runID}/events/{eventID}".replace("{runID}",encodeURIComponent(e)).replace("{eventID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return i.request(a,r)},getEvents({runID:e,itemsPerPage:t,page:r},a){if(!e)throw new Error("Parameter `runID` is required when calling `getEvents`.");const n="/1/runs/{runID}/events".replace("{runID}",encodeURIComponent(e)),s={};void 0!==t&&(s.itemsPerPage=t.toString()),void 0!==r&&(s.page=r.toString());const o={method:"GET",path:n,queryParameters:s,headers:{}};return i.request(o,a)},getRun({runID:e},t){if(!e)throw new Error("Parameter `runID` is required when calling `getRun`.");const r={method:"GET",path:"/1/runs/{runID}".replace("{runID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getRuns({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/runs",queryParameters:a,headers:{}};return i.request(n,r)},getRunsByTaskID({taskID:e,itemsPerPage:t,page:r},a){if(!e)throw new Error("Parameter `taskID` is required when calling `getRunsByTaskID`.");const n="/1/runs/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),s={};void 0!==t&&(s.itemsPerPage=t.toString()),void 0!==r&&(s.page=r.toString());const o={method:"GET",path:n,queryParameters:s,headers:{}};return i.request(o,a)},getSource({sourceID:e},t){if(!e)throw new Error("Parameter `sourceID` is required when calling `getSource`.");const r={method:"GET",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getSources({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/sources",queryParameters:a,headers:{}};return i.request(n,r)},getTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `getTask`.");const r={method:"GET",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getTasks({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/tasks",queryParameters:a,headers:{}};return i.request(n,r)},runTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `runTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},updateAuthentication({authenticationID:e,authenticationUpdate:t},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `updateAuthentication`.");if(!t)throw new Error("Parameter `authenticationUpdate` is required when calling `updateAuthentication`.");const a={method:"PUT",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateDestination({destinationID:e,destinationUpdate:t},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `updateDestination`.");if(!t)throw new Error("Parameter `destinationUpdate` is required when calling `updateDestination`.");const a={method:"PUT",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateSource({sourceID:e,sourceUpdate:t},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `updateSource`.");if(!t)throw new Error("Parameter `sourceUpdate` is required when calling `updateSource`.");const a={method:"POST",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateTask({taskID:e,taskUpdate:t},r){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTask`.");if(!t)throw new Error("Parameter `taskUpdate` is required when calling `updateTask`.");const a={method:"PUT",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)}}}({appId:e,apiKey:n,region:s,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),n=a(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(n),s=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(n),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(n),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:r({caches:[t({key:`1.0.0-alpha.6-${e}`}),a()]}),...o})}}));
1
+ /*! ingestion.umd.js | 1.0.0-alpha.8 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/ingestion"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function n(){return JSON.parse(a().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),a=n()[r];return Promise.all([a||t(),void 0!==a])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=n();return s[JSON.stringify(e)]=t,a().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=n();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function r(e){const t=[...e.caches],a=t.shift();return void 0===a?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,s={miss:()=>Promise.resolve()})=>a.get(e,n,s).catch((()=>r({caches:t}).get(e,n,s))),set:(e,n)=>a.set(e,n).catch((()=>r({caches:t}).set(e,n))),delete:e=>a.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>a.clear().catch((()=>r({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,a,n={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const o=a();return o.then((e=>n.miss(e))).then((()=>o))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const n=12e4;function s(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>n},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=n}}}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class c extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class d extends u{constructor(e,t,r,a="ApiError"){super(e,r,a),o(this,"status",void 0),this.status=t}}class l extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}class h extends d{constructor(e,t,r,a){super(e,t,a,"DetailedApiError"),o(this,"error",void 0),this.error=r}}function m(e,t,r){const a=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let n=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return a.length&&(n+=`?${a}`),n}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function g({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:n,timeouts:o,requester:i,requestsCache:u,responsesCache:g}){async function P(u,g,P=!0){const f=[],w=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(u,g),I=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},n={};return Object.keys(a).forEach((e=>{const t=a[e];n[e.toLowerCase()]=t})),n}(r,u.headers,g.headers),q="GET"===u.method?{...u.data,...g.data}:{},D={...a,...u.queryParameters,...q};if(n.value&&(D["x-algolia-agent"]=n.value),g&&g.queryParameters)for(const e of Object.keys(g.queryParameters))g.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(g.queryParameters[e])?D[e]=g.queryParameters[e].toString():D[e]=g.queryParameters[e];let y=0;const v=async(e,r)=>{const a=e.pop();if(void 0===a)throw new c(function(e){return e.map((e=>p(e)))}(f));let n=g.timeout;void 0===n&&(n=P?o.read:o.write);const q={data:w,headers:I,method:u.method,url:m(a,u.path,D),connectTimeout:r(y,o.connect),responseTimeout:r(y,n)},T=t=>{const r={request:q,response:t,host:a,triesLeft:e.length};return f.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const n=T(E);return E.isTimedOut&&y++,console.log("Retryable failure",p(n)),await t.set(a,s(a,E.isTimedOut?"timed out":"down")),v(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new l(t.message,e)}}(E);throw T(E),function({content:e,status:t},r){try{const a=JSON.parse(e);return"error"in a?new h(a.message,t,a.error,r):new d(a.message,t,r)}catch(e){}return new d(e,t,r)}(E,f)},T=e.filter((e=>"readWrite"===e.accept||(P?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),a=r.filter((e=>e.isUp())),n=r.filter((e=>e.isTimedOut())),o=[...a,...n];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t}}(T);return v([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:n,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return P(e,t,n);const s=()=>P(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const o={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return g.get(o,(()=>u.get(o,(()=>u.set(o,s()).then((e=>Promise.all([u.delete(o),e])),(e=>Promise.all([u.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>g.set(o,e)})},requestsCache:u,responsesCache:g}}function P({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}const f="1.0.0-alpha.8",w=["us"];e.apiClientVersion=f,e.ingestionClient=function(e,n,s,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!n||"string"!=typeof n)throw new Error("`apiKey` is missing.");if(!s||s&&("string"!=typeof s||!w.includes(s)))throw new Error(`\`region\` is required and must be one of the following: ${w.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:a,region:n,...s}){const o=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(e,t,r),i=g({hosts:(u=n,[{url:"data.{region}.algolia.com".replace("{region}",u),accept:"readWrite",protocol:"https"}]),...s,algoliaAgent:{...P({algoliaAgents:a,client:"Ingestion",version:f}),value:""},baseHeaders:{"content-type":"text/plain",...o.headers(),...s.baseHeaders},baseQueryParameters:{...o.queryParameters(),...s.baseQueryParameters}});var u;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.algoliaAgent.add({segment:e,version:t})},createAuthentication(e,t){if(!e)throw new Error("Parameter `authenticationCreate` is required when calling `createAuthentication`.");const r={method:"POST",path:"/1/authentications",queryParameters:{},headers:{},data:e};return i.request(r,t)},createDestination(e,t){if(!e)throw new Error("Parameter `destinationCreate` is required when calling `createDestination`.");const r={method:"POST",path:"/1/destinations",queryParameters:{},headers:{},data:e};return i.request(r,t)},createSource(e,t){if(!e)throw new Error("Parameter `sourceCreate` is required when calling `createSource`.");const r={method:"POST",path:"/1/sources",queryParameters:{},headers:{},data:e};return i.request(r,t)},createTask(e,t){if(!e)throw new Error("Parameter `taskCreate` is required when calling `createTask`.");if(!e.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTask`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTask`.");const r={method:"POST",path:"/1/tasks",queryParameters:{},headers:{},data:e};return i.request(r,t)},deleteAuthentication({authenticationID:e},t){if(!e)throw new Error("Parameter `authenticationID` is required when calling `deleteAuthentication`.");const r={method:"DELETE",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteDestination({destinationID:e},t){if(!e)throw new Error("Parameter `destinationID` is required when calling `deleteDestination`.");const r={method:"DELETE",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteSource({sourceID:e},t){if(!e)throw new Error("Parameter `sourceID` is required when calling `deleteSource`.");const r={method:"DELETE",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTask`.");const r={method:"DELETE",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},disableTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},enableTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getAuthentication({authenticationID:e},t){if(!e)throw new Error("Parameter `authenticationID` is required when calling `getAuthentication`.");const r={method:"GET",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getAuthentications({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/authentications",queryParameters:a,headers:{}};return i.request(n,r)},getDestination({destinationID:e},t){if(!e)throw new Error("Parameter `destinationID` is required when calling `getDestination`.");const r={method:"GET",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getDestinations({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/destinations",queryParameters:a,headers:{}};return i.request(n,r)},getEvent({runID:e,eventID:t},r){if(!e)throw new Error("Parameter `runID` is required when calling `getEvent`.");if(!t)throw new Error("Parameter `eventID` is required when calling `getEvent`.");const a={method:"GET",path:"/1/runs/{runID}/events/{eventID}".replace("{runID}",encodeURIComponent(e)).replace("{eventID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return i.request(a,r)},getEvents({runID:e,itemsPerPage:t,page:r},a){if(!e)throw new Error("Parameter `runID` is required when calling `getEvents`.");const n="/1/runs/{runID}/events".replace("{runID}",encodeURIComponent(e)),s={};void 0!==t&&(s.itemsPerPage=t.toString()),void 0!==r&&(s.page=r.toString());const o={method:"GET",path:n,queryParameters:s,headers:{}};return i.request(o,a)},getRun({runID:e},t){if(!e)throw new Error("Parameter `runID` is required when calling `getRun`.");const r={method:"GET",path:"/1/runs/{runID}".replace("{runID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getRuns({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/runs",queryParameters:a,headers:{}};return i.request(n,r)},getRunsByTaskID({taskID:e,itemsPerPage:t,page:r},a){if(!e)throw new Error("Parameter `taskID` is required when calling `getRunsByTaskID`.");const n="/1/runs/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),s={};void 0!==t&&(s.itemsPerPage=t.toString()),void 0!==r&&(s.page=r.toString());const o={method:"GET",path:n,queryParameters:s,headers:{}};return i.request(o,a)},getSource({sourceID:e},t){if(!e)throw new Error("Parameter `sourceID` is required when calling `getSource`.");const r={method:"GET",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getSources({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/sources",queryParameters:a,headers:{}};return i.request(n,r)},getTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `getTask`.");const r={method:"GET",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getTasks({itemsPerPage:e,page:t,action:r,enabled:a,destinationID:n,triggerType:s}={},o){const u={};void 0!==e&&(u.itemsPerPage=e.toString()),void 0!==t&&(u.page=t.toString()),void 0!==r&&(u.action=r.toString()),void 0!==a&&(u.enabled=a.toString()),void 0!==n&&(u.destinationID=n.toString()),void 0!==s&&(u.triggerType=s.toString());const c={method:"GET",path:"/1/tasks",queryParameters:u,headers:{}};return i.request(c,o)},runTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `runTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},updateAuthentication({authenticationID:e,authenticationUpdate:t},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `updateAuthentication`.");if(!t)throw new Error("Parameter `authenticationUpdate` is required when calling `updateAuthentication`.");const a={method:"PUT",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateDestination({destinationID:e,destinationUpdate:t},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `updateDestination`.");if(!t)throw new Error("Parameter `destinationUpdate` is required when calling `updateDestination`.");const a={method:"PUT",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateSource({sourceID:e,sourceUpdate:t},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `updateSource`.");if(!t)throw new Error("Parameter `sourceUpdate` is required when calling `updateSource`.");const a={method:"POST",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateTask({taskID:e,taskUpdate:t},r){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTask`.");if(!t)throw new Error("Parameter `taskUpdate` is required when calling `updateTask`.");const a={method:"PUT",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)}}}({appId:e,apiKey:n,region:s,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),n=a(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(n),s=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(n),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(n),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:r({caches:[t({key:`1.0.0-alpha.8-${e}`}),a()]}),...o})}}));
@@ -1,7 +1,9 @@
1
+ import type { ActionType } from './actionType';
1
2
  import type { AuthenticationUpdate } from './authenticationUpdate';
2
3
  import type { DestinationUpdate } from './destinationUpdate';
3
4
  import type { SourceUpdate } from './sourceUpdate';
4
5
  import type { TaskUpdate } from './taskUpdate';
6
+ import type { TriggerType } from './triggerType';
5
7
  /**
6
8
  * Properties for the `deleteAuthentication` method.
7
9
  */
@@ -212,6 +214,22 @@ export declare type GetTasksProps = {
212
214
  * The page number to fetch, starting at 1.
213
215
  */
214
216
  page?: number;
217
+ /**
218
+ * Which action the returned task should have. Can be a list of string separated with commas.
219
+ */
220
+ action?: ActionType[];
221
+ /**
222
+ * If the returned task should have its \'enabled\' property set to true.
223
+ */
224
+ enabled?: boolean;
225
+ /**
226
+ * Which destinationID the returned task should have. Can be a list of string separated with commas.
227
+ */
228
+ destinationID?: string[];
229
+ /**
230
+ * Which trigger type the returned task should have. Can be a list of string separated with commas.
231
+ */
232
+ triggerType?: TriggerType[];
215
233
  };
216
234
  /**
217
235
  * Properties for the `runTask` method.
@@ -1 +1 @@
1
- {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,oBAAY,yBAAyB,GAAG;IACtC;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,oBAAY,sBAAsB,GAAG;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,oBAAY,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,oBAAY,eAAe,GAAG;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,oBAAY,gBAAgB,GAAG;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,oBAAY,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AC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,oBAAY,cAAc,GAAG;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,oBAAY,eAAe,GAAG;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,oBAAY,aAAa,GAAG;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,oBAAY,yBAAyB,GAAG;IACtC;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,oBAAoB,CAAC;CAC5C,CAAC;AAEF;;GAEG;AACH,oBAAY,sBAAsB,GAAG;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,CAAC;AAEF;;GAEG;AACH,oBAAY,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,eAAe,GAAG;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC"}
1
+ {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OA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;;GAEG;AACH,oBAAY,aAAa,GAAG;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,oBAAY,yBAAyB,GAAG;IACtC;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,oBAAoB,CAAC;CAC5C,CAAC;AAEF;;GAEG;AACH,oBAAY,sBAAsB,GAAG;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,CAAC;AAEF;;GAEG;AACH,oBAAY,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,eAAe,GAAG;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC"}
@@ -26,7 +26,7 @@ import type { Task } from '../model/task';
26
26
  import type { TaskCreate } from '../model/taskCreate';
27
27
  import type { TaskCreateResponse } from '../model/taskCreateResponse';
28
28
  import type { TaskUpdateResponse } from '../model/taskUpdateResponse';
29
- export declare const apiClientVersion = "1.0.0-alpha.6";
29
+ export declare const apiClientVersion = "1.0.0-alpha.8";
30
30
  export declare const REGIONS: readonly ["us"];
31
31
  export declare type Region = typeof REGIONS[number];
32
32
  export declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
@@ -262,9 +262,13 @@ export declare function createIngestionClient({ appId: appIdOption, apiKey: apiK
262
262
  * @param getTasks - The getTasks object.
263
263
  * @param getTasks.itemsPerPage - The number of items per page to return.
264
264
  * @param getTasks.page - The page number to fetch, starting at 1.
265
+ * @param getTasks.action - Which action the returned task should have. Can be a list of string separated with commas.
266
+ * @param getTasks.enabled - If the returned task should have its \'enabled\' property set to true.
267
+ * @param getTasks.destinationID - Which destinationID the returned task should have. Can be a list of string separated with commas.
268
+ * @param getTasks.triggerType - Which trigger type the returned task should have. Can be a list of string separated with commas.
265
269
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
266
270
  */
267
- getTasks({ itemsPerPage, page }?: GetTasksProps, requestOptions?: RequestOptions | undefined): Promise<ListTasksResponse>;
271
+ getTasks({ itemsPerPage, page, action, enabled, destinationID, triggerType, }?: GetTasksProps, requestOptions?: RequestOptions | undefined): Promise<ListTasksResponse>;
268
272
  /**
269
273
  * Run a task.
270
274
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ingestionClient.d.ts","sourceRoot":"","sources":["../../src/ingestionClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,uBA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iBAAiB,CAAC;IAuC7B;;;;;;;OAOG;wBAEW,YAAY,mBACP,cAAc,GAC9B,QAAQ,WAAW,CAAC;IAwBvB;;;;;;;;OAQG;qEAE2C,yBAAyB,mBACpD,cAAc,GAC9B,QAAQ,4BAA4B,CAAC;IA+BxC;;;;;;;;OAQG;4DAEqC,sBAAsB,mBAC3C,cAAc,GAC9B,QAAQ,yBAAyB,CAAC;IA+BrC;;;;;;;;OAQG;6CAE2B,iBAAiB,mBAC5B,cAAc,GAC9B,QAAQ,oBAAoB,CAAC;IA+BhC;;;;;;;;OAQG;uCAEuB,eAAe,mBACtB,cAAc,GAC9B,QAAQ,kBAAkB,CAAC;EA+BjC;AAED;;GAEG;AACH,oBAAY,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -1,9 +1,11 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
+ import type { ActionType } from './actionType';
3
4
  import type { AuthenticationUpdate } from './authenticationUpdate';
4
5
  import type { DestinationUpdate } from './destinationUpdate';
5
6
  import type { SourceUpdate } from './sourceUpdate';
6
7
  import type { TaskUpdate } from './taskUpdate';
8
+ import type { TriggerType } from './triggerType';
7
9
 
8
10
  /**
9
11
  * Properties for the `deleteAuthentication` method.
@@ -233,6 +235,22 @@ export type GetTasksProps = {
233
235
  * The page number to fetch, starting at 1.
234
236
  */
235
237
  page?: number;
238
+ /**
239
+ * Which action the returned task should have. Can be a list of string separated with commas.
240
+ */
241
+ action?: ActionType[];
242
+ /**
243
+ * If the returned task should have its \'enabled\' property set to true.
244
+ */
245
+ enabled?: boolean;
246
+ /**
247
+ * Which destinationID the returned task should have. Can be a list of string separated with commas.
248
+ */
249
+ destinationID?: string[];
250
+ /**
251
+ * Which trigger type the returned task should have. Can be a list of string separated with commas.
252
+ */
253
+ triggerType?: TriggerType[];
236
254
  };
237
255
 
238
256
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/ingestion",
3
- "version": "1.0.0-alpha.6",
3
+ "version": "1.0.0-alpha.8",
4
4
  "description": "JavaScript client for ingestion",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -38,9 +38,9 @@
38
38
  "clean": "rm -rf ./dist || true"
39
39
  },
40
40
  "dependencies": {
41
- "@algolia/client-common": "5.0.0-alpha.32",
42
- "@algolia/requester-browser-xhr": "5.0.0-alpha.32",
43
- "@algolia/requester-node-http": "5.0.0-alpha.32"
41
+ "@algolia/client-common": "5.0.0-alpha.34",
42
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.34",
43
+ "@algolia/requester-node-http": "5.0.0-alpha.34"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "16.11.59",