@algolia/ingestion 1.5.3 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,12 +4,12 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@algolia/ingestion"] = {}));
5
5
  })(this, (function (exports) { 'use strict';
6
6
 
7
- function G(a,o,c="WithinHeaders"){let m={"x-algolia-api-key":o,"x-algolia-application-id":a};return {headers(){return c==="WithinHeaders"?m:{}},queryParameters(){return c==="WithinQueryParameters"?m:{}}}}function N(a){let o,c=`algolia-client-js-${a.key}`;function m(){return o===void 0&&(o=a.localStorage||window.localStorage),o}function l(){return JSON.parse(m().getItem(c)||"{}")}function g(i){m().setItem(c,JSON.stringify(i));}function T(){let i=a.timeToLive?a.timeToLive*1e3:null,e=l(),r=Object.fromEntries(Object.entries(e).filter(([,u])=>u.timestamp!==void 0));if(g(r),!i)return;let s=Object.fromEntries(Object.entries(r).filter(([,u])=>{let n=new Date().getTime();return !(u.timestamp+i<n)}));g(s);}return {get(i,e,r={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(T(),l()[JSON.stringify(i)])).then(s=>Promise.all([s?s.value:e(),s!==void 0])).then(([s,u])=>Promise.all([s,u||r.miss(s)])).then(([s])=>s)},set(i,e){return Promise.resolve().then(()=>{let r=l();return r[JSON.stringify(i)]={timestamp:new Date().getTime(),value:e},m().setItem(c,JSON.stringify(r)),e})},delete(i){return Promise.resolve().then(()=>{let e=l();delete e[JSON.stringify(i)],m().setItem(c,JSON.stringify(e));})},clear(){return Promise.resolve().then(()=>{m().removeItem(c);})}}}function Y(){return {get(a,o,c={miss:()=>Promise.resolve()}){return o().then(l=>Promise.all([l,c.miss(l)])).then(([l])=>l)},set(a,o){return Promise.resolve(o)},delete(a){return Promise.resolve()},clear(){return Promise.resolve()}}}function S(a){let o=[...a.caches],c=o.shift();return c===void 0?Y():{get(m,l,g={miss:()=>Promise.resolve()}){return c.get(m,l,g).catch(()=>S({caches:o}).get(m,l,g))},set(m,l){return c.set(m,l).catch(()=>S({caches:o}).set(m,l))},delete(m){return c.delete(m).catch(()=>S({caches:o}).delete(m))},clear(){return c.clear().catch(()=>S({caches:o}).clear())}}}function k(a={serializable:!0}){let o={};return {get(c,m,l={miss:()=>Promise.resolve()}){let g=JSON.stringify(c);if(g in o)return Promise.resolve(a.serializable?JSON.parse(o[g]):o[g]);let T=m();return T.then(i=>l.miss(i)).then(()=>T)},set(c,m){return o[JSON.stringify(c)]=a.serializable?JSON.stringify(m):m,Promise.resolve(m)},delete(c){return delete o[JSON.stringify(c)],Promise.resolve()},clear(){return o={},Promise.resolve()}}}var L=2*60*1e3;function V(a,o="up"){let c=Date.now();function m(){return o==="up"||Date.now()-c>L}function l(){return o==="timed out"&&Date.now()-c<=L}return {...a,status:o,lastUpdate:c,isUp:m,isTimedOut:l}}var _=class extends Error{name="AlgoliaError";constructor(a,o){super(a),o&&(this.name=o);}},W=class extends _{stackTrace;constructor(a,o,c){super(a,c),this.stackTrace=o;}},Z=class extends W{constructor(a){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",a,"RetryError");}},U=class extends W{status;constructor(a,o,c,m="ApiError"){super(a,c,m),this.status=o;}},ee=class extends _{response;constructor(a,o){super(a,"DeserializationError"),this.response=o;}},re=class extends U{error;constructor(a,o,c,m){super(a,o,m,"DetailedApiError"),this.error=c;}};function te(a,o,c){let m=se(c),l=`${a.protocol}://${a.url}${a.port?`:${a.port}`:""}/${o.charAt(0)==="/"?o.substring(1):o}`;return m.length&&(l+=`?${m}`),l}function se(a){return Object.keys(a).filter(o=>a[o]!==void 0).sort().map(o=>`${o}=${encodeURIComponent(Object.prototype.toString.call(a[o])==="[object Array]"?a[o].join(","):a[o]).replaceAll("+","%20")}`).join("&")}function oe(a,o){if(a.method==="GET"||a.data===void 0&&o.data===void 0)return;let c=Array.isArray(a.data)?a.data:{...a.data,...o.data};return JSON.stringify(c)}function ae(a,o,c){let m={Accept:"application/json",...a,...o,...c},l={};return Object.keys(m).forEach(g=>{let T=m[g];l[g.toLowerCase()]=T;}),l}function ne(a){try{return JSON.parse(a.content)}catch(o){throw new ee(o.message,a)}}function ie({content:a,status:o},c){try{let m=JSON.parse(a);return "error"in m?new re(m.message,o,m.error,c):new U(m.message,o,c)}catch{}return new U(a,o,c)}function ue({isTimedOut:a,status:o}){return !a&&~~o===0}function me({isTimedOut:a,status:o}){return a||ue({isTimedOut:a,status:o})||~~(o/100)!==2&&~~(o/100)!==4}function ce({status:a}){return ~~(a/100)===2}function de(a){return a.map(o=>B(o))}function B(a){let o=a.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...a,request:{...a.request,headers:{...a.request.headers,...o}}}}function $({hosts:a,hostsCache:o,baseHeaders:c,baseQueryParameters:m,algoliaAgent:l,timeouts:g,requester:T,requestsCache:i,responsesCache:e}){async function r(n){let t=await Promise.all(n.map(P=>o.get(P,()=>Promise.resolve(V(P))))),d=t.filter(P=>P.isUp()),f=t.filter(P=>P.isTimedOut()),q=[...d,...f];return {hosts:q.length>0?q:n,getTimeout(P,w){return (f.length===0&&P===0?1:f.length+3+P)*w}}}async function s(n,t,d=!0){let f=[],q=oe(n,t),h=ae(c,n.headers,t.headers),P=n.method==="GET"?{...n.data,...t.data}:{},w={...m,...n.queryParameters,...P};if(l.value&&(w["x-algolia-agent"]=l.value),t&&t.queryParameters)for(let y of Object.keys(t.queryParameters))!t.queryParameters[y]||Object.prototype.toString.call(t.queryParameters[y])==="[object Object]"?w[y]=t.queryParameters[y]:w[y]=t.queryParameters[y].toString();let p=0,R=async(y,I)=>{let D=y.pop();if(D===void 0)throw new Z(de(f));let O={...g,...t.timeouts},H={data:q,headers:h,method:n.method,url:te(D,n.path,w),connectTimeout:I(p,O.connect),responseTimeout:I(p,d?O.read:O.write)},b=C=>{let Q={request:H,response:C,host:D,triesLeft:y.length};return f.push(Q),Q},E=await T.send(H);if(me(E)){let C=b(E);return E.isTimedOut&&p++,console.log("Retryable failure",B(C)),await o.set(D,V(D,E.isTimedOut?"timed out":"down")),R(y,I)}if(ce(E))return ne(E);throw b(E),ie(E,f)},K=a.filter(y=>y.accept==="readWrite"||(d?y.accept==="read":y.accept==="write")),v=await r(K);return R([...v.hosts].reverse(),v.getTimeout)}function u(n,t={}){let d=n.useReadTransporter||n.method==="GET";if(!d)return s(n,t,d);let f=()=>s(n,t);if((t.cacheable||n.cacheable)!==!0)return f();let h={request:n,requestOptions:t,transporter:{queryParameters:m,headers:c}};return e.get(h,()=>i.get(h,()=>i.set(h,f()).then(P=>Promise.all([i.delete(h),P]),P=>Promise.all([i.delete(h),Promise.reject(P)])).then(([P,w])=>w)),{miss:P=>e.set(h,P)})}return {hostsCache:o,requester:T,timeouts:g,algoliaAgent:l,baseHeaders:c,baseQueryParameters:m,hosts:a,request:u,requestsCache:i,responsesCache:e}}function pe(a){let o={value:`Algolia for JavaScript (${a})`,add(c){let m=`; ${c.segment}${c.version!==void 0?` (${c.version})`:""}`;return o.value.indexOf(m)===-1&&(o.value=`${o.value}${m}`),o}};return o}function j({algoliaAgents:a,client:o,version:c}){let m=pe(c).add({segment:o,version:c});return a.forEach(l=>m.add(l)),m}var J=1e3,M=2e3,z=3e4;function F(){function a(o){return new Promise(c=>{let m=new XMLHttpRequest;m.open(o.method,o.url,!0),Object.keys(o.headers).forEach(i=>m.setRequestHeader(i,o.headers[i]));let l=(i,e)=>setTimeout(()=>{m.abort(),c({status:0,content:e,isTimedOut:!0});},i),g=l(o.connectTimeout,"Connection timeout"),T;m.onreadystatechange=()=>{m.readyState>m.OPENED&&T===void 0&&(clearTimeout(g),T=l(o.responseTimeout,"Socket timeout"));},m.onerror=()=>{m.status===0&&(clearTimeout(g),clearTimeout(T),c({content:m.responseText||"Network request failed",status:m.status,isTimedOut:!1}));},m.onload=()=>{clearTimeout(g),clearTimeout(T),c({content:m.responseText,status:m.status,isTimedOut:!1});},m.send(o.data);})}return {send:a}}var x="1.5.3",A=["eu","us"];function he(a){return [{url:"data.{region}.algolia.com".replace("{region}",a),accept:"readWrite",protocol:"https"}]}function fe(a){return a.type==="onDemand"}function le(a){return a.type==="schedule"}function Pe(a){return a.type==="subscription"}function X({appId:a,apiKey:o,authMode:c,algoliaAgents:m,region:l,...g}){let T=G(a,o,c),i=$({hosts:he(l),...g,algoliaAgent:j({algoliaAgents:m,client:"Ingestion",version:x}),baseHeaders:{"content-type":"text/plain",...T.headers(),...g.baseHeaders},baseQueryParameters:{...T.queryParameters(),...g.baseQueryParameters}});return {transporter:i,appId:a,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,r){i.algoliaAgent.add({segment:e,version:r});},setClientApiKey({apiKey:e}){!c||c==="WithinHeaders"?i.baseHeaders["x-algolia-api-key"]=e:i.baseQueryParameters["x-algolia-api-key"]=e;},createAuthentication(e,r){if(!e)throw new Error("Parameter `authenticationCreate` is required when calling `createAuthentication`.");if(!e.type)throw new Error("Parameter `authenticationCreate.type` is required when calling `createAuthentication`.");if(!e.name)throw new Error("Parameter `authenticationCreate.name` is required when calling `createAuthentication`.");if(!e.input)throw new Error("Parameter `authenticationCreate.input` is required when calling `createAuthentication`.");let t={method:"POST",path:"/1/authentications",queryParameters:{},headers:{},data:e};return i.request(t,r)},createDestination(e,r){if(!e)throw new Error("Parameter `destinationCreate` is required when calling `createDestination`.");if(!e.type)throw new Error("Parameter `destinationCreate.type` is required when calling `createDestination`.");if(!e.name)throw new Error("Parameter `destinationCreate.name` is required when calling `createDestination`.");if(!e.input)throw new Error("Parameter `destinationCreate.input` is required when calling `createDestination`.");let t={method:"POST",path:"/1/destinations",queryParameters:{},headers:{},data:e};return i.request(t,r)},createSource(e,r){if(!e)throw new Error("Parameter `sourceCreate` is required when calling `createSource`.");if(!e.type)throw new Error("Parameter `sourceCreate.type` is required when calling `createSource`.");if(!e.name)throw new Error("Parameter `sourceCreate.name` is required when calling `createSource`.");let t={method:"POST",path:"/1/sources",queryParameters:{},headers:{},data:e};return i.request(t,r)},createTask(e,r){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.destinationID)throw new Error("Parameter `taskCreate.destinationID` is required when calling `createTask`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTask`.");let t={method:"POST",path:"/2/tasks",queryParameters:{},headers:{},data:e};return i.request(t,r)},createTaskV1(e,r){if(!e)throw new Error("Parameter `taskCreate` is required when calling `createTaskV1`.");if(!e.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTaskV1`.");if(!e.destinationID)throw new Error("Parameter `taskCreate.destinationID` is required when calling `createTaskV1`.");if(!e.trigger)throw new Error("Parameter `taskCreate.trigger` is required when calling `createTaskV1`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTaskV1`.");let t={method:"POST",path:"/1/tasks",queryParameters:{},headers:{},data:e};return i.request(t,r)},createTransformation(e,r){if(!e)throw new Error("Parameter `transformationCreate` is required when calling `createTransformation`.");if(!e.code)throw new Error("Parameter `transformationCreate.code` is required when calling `createTransformation`.");if(!e.name)throw new Error("Parameter `transformationCreate.name` is required when calling `createTransformation`.");let t={method:"POST",path:"/1/transformations",queryParameters:{},headers:{},data:e};return i.request(t,r)},customDelete({path:e,parameters:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let d={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(d,s)},customGet({path:e,parameters:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let d={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(d,s)},customPost({path:e,parameters:r,body:s},u){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");let f={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:s||{}};return i.request(f,u)},customPut({path:e,parameters:r,body:s},u){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");let f={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:s||{}};return i.request(f,u)},deleteAuthentication({authenticationID:e},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `deleteAuthentication`.");let t={method:"DELETE",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},deleteDestination({destinationID:e},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `deleteDestination`.");let t={method:"DELETE",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},deleteSource({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `deleteSource`.");let t={method:"DELETE",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},deleteTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTask`.");let t={method:"DELETE",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},deleteTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTaskV1`.");let t={method:"DELETE",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},deleteTransformation({transformationID:e},r){if(!e)throw new Error("Parameter `transformationID` is required when calling `deleteTransformation`.");let t={method:"DELETE",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},disableTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTask`.");let t={method:"PUT",path:"/2/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},disableTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTaskV1`.");let t={method:"PUT",path:"/1/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},enableTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTask`.");let t={method:"PUT",path:"/2/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},enableTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTaskV1`.");let t={method:"PUT",path:"/1/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},getAuthentication({authenticationID:e},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `getAuthentication`.");let t={method:"GET",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},getDestination({destinationID:e},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `getDestination`.");let t={method:"GET",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},getEvent({runID:e,eventID:r},s){if(!e)throw new Error("Parameter `runID` is required when calling `getEvent`.");if(!r)throw new Error("Parameter `eventID` is required when calling `getEvent`.");let d={method:"GET",path:"/1/runs/{runID}/events/{eventID}".replace("{runID}",encodeURIComponent(e)).replace("{eventID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return i.request(d,s)},getRun({runID:e},r){if(!e)throw new Error("Parameter `runID` is required when calling `getRun`.");let t={method:"GET",path:"/1/runs/{runID}".replace("{runID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},getSource({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `getSource`.");let t={method:"GET",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},getTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getTask`.");let t={method:"GET",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},getTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getTaskV1`.");let t={method:"GET",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},getTransformation({transformationID:e},r){if(!e)throw new Error("Parameter `transformationID` is required when calling `getTransformation`.");let t={method:"GET",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},listAuthentications({itemsPerPage:e,page:r,type:s,platform:u,sort:n,order:t}={},d=void 0){let f="/1/authentications",q={},h={};e!==void 0&&(h.itemsPerPage=e.toString()),r!==void 0&&(h.page=r.toString()),s!==void 0&&(h.type=s.toString()),u!==void 0&&(h.platform=u.toString()),n!==void 0&&(h.sort=n.toString()),t!==void 0&&(h.order=t.toString());let P={method:"GET",path:f,queryParameters:h,headers:q};return i.request(P,d)},listDestinations({itemsPerPage:e,page:r,type:s,authenticationID:u,sort:n,order:t}={},d=void 0){let f="/1/destinations",q={},h={};e!==void 0&&(h.itemsPerPage=e.toString()),r!==void 0&&(h.page=r.toString()),s!==void 0&&(h.type=s.toString()),u!==void 0&&(h.authenticationID=u.toString()),n!==void 0&&(h.sort=n.toString()),t!==void 0&&(h.order=t.toString());let P={method:"GET",path:f,queryParameters:h,headers:q};return i.request(P,d)},listEvents({runID:e,itemsPerPage:r,page:s,status:u,type:n,sort:t,order:d,startDate:f,endDate:q},h){if(!e)throw new Error("Parameter `runID` is required when calling `listEvents`.");let P="/1/runs/{runID}/events".replace("{runID}",encodeURIComponent(e)),w={},p={};r!==void 0&&(p.itemsPerPage=r.toString()),s!==void 0&&(p.page=s.toString()),u!==void 0&&(p.status=u.toString()),n!==void 0&&(p.type=n.toString()),t!==void 0&&(p.sort=t.toString()),d!==void 0&&(p.order=d.toString()),f!==void 0&&(p.startDate=f.toString()),q!==void 0&&(p.endDate=q.toString());let R={method:"GET",path:P,queryParameters:p,headers:w};return i.request(R,h)},listRuns({itemsPerPage:e,page:r,status:s,type:u,taskID:n,sort:t,order:d,startDate:f,endDate:q}={},h=void 0){let P="/1/runs",w={},p={};e!==void 0&&(p.itemsPerPage=e.toString()),r!==void 0&&(p.page=r.toString()),s!==void 0&&(p.status=s.toString()),u!==void 0&&(p.type=u.toString()),n!==void 0&&(p.taskID=n.toString()),t!==void 0&&(p.sort=t.toString()),d!==void 0&&(p.order=d.toString()),f!==void 0&&(p.startDate=f.toString()),q!==void 0&&(p.endDate=q.toString());let R={method:"GET",path:P,queryParameters:p,headers:w};return i.request(R,h)},listSources({itemsPerPage:e,page:r,type:s,authenticationID:u,sort:n,order:t}={},d=void 0){let f="/1/sources",q={},h={};e!==void 0&&(h.itemsPerPage=e.toString()),r!==void 0&&(h.page=r.toString()),s!==void 0&&(h.type=s.toString()),u!==void 0&&(h.authenticationID=u.toString()),n!==void 0&&(h.sort=n.toString()),t!==void 0&&(h.order=t.toString());let P={method:"GET",path:f,queryParameters:h,headers:q};return i.request(P,d)},listTasks({itemsPerPage:e,page:r,action:s,enabled:u,sourceID:n,destinationID:t,triggerType:d,sort:f,order:q}={},h=void 0){let P="/2/tasks",w={},p={};e!==void 0&&(p.itemsPerPage=e.toString()),r!==void 0&&(p.page=r.toString()),s!==void 0&&(p.action=s.toString()),u!==void 0&&(p.enabled=u.toString()),n!==void 0&&(p.sourceID=n.toString()),t!==void 0&&(p.destinationID=t.toString()),d!==void 0&&(p.triggerType=d.toString()),f!==void 0&&(p.sort=f.toString()),q!==void 0&&(p.order=q.toString());let R={method:"GET",path:P,queryParameters:p,headers:w};return i.request(R,h)},listTasksV1({itemsPerPage:e,page:r,action:s,enabled:u,sourceID:n,destinationID:t,triggerType:d,sort:f,order:q}={},h=void 0){let P="/1/tasks",w={},p={};e!==void 0&&(p.itemsPerPage=e.toString()),r!==void 0&&(p.page=r.toString()),s!==void 0&&(p.action=s.toString()),u!==void 0&&(p.enabled=u.toString()),n!==void 0&&(p.sourceID=n.toString()),t!==void 0&&(p.destinationID=t.toString()),d!==void 0&&(p.triggerType=d.toString()),f!==void 0&&(p.sort=f.toString()),q!==void 0&&(p.order=q.toString());let R={method:"GET",path:P,queryParameters:p,headers:w};return i.request(R,h)},listTransformations({itemsPerPage:e,page:r,sort:s,order:u}={},n=void 0){let t="/1/transformations",d={},f={};e!==void 0&&(f.itemsPerPage=e.toString()),r!==void 0&&(f.page=r.toString()),s!==void 0&&(f.sort=s.toString()),u!==void 0&&(f.order=u.toString());let q={method:"GET",path:t,queryParameters:f,headers:d};return i.request(q,n)},pushTask({taskID:e,pushTaskPayload:r},s){if(!e)throw new Error("Parameter `taskID` is required when calling `pushTask`.");if(!r)throw new Error("Parameter `pushTaskPayload` is required when calling `pushTask`.");if(!r.action)throw new Error("Parameter `pushTaskPayload.action` is required when calling `pushTask`.");if(!r.records)throw new Error("Parameter `pushTaskPayload.records` is required when calling `pushTask`.");let d={method:"POST",path:"/2/tasks/{taskID}/push".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return i.request(d,s)},runSource({sourceID:e,runSourcePayload:r},s){if(!e)throw new Error("Parameter `sourceID` is required when calling `runSource`.");let d={method:"POST",path:"/1/sources/{sourceID}/run".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return i.request(d,s)},runTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `runTask`.");let t={method:"POST",path:"/2/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},runTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `runTaskV1`.");let t={method:"POST",path:"/1/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},searchAuthentications(e,r){if(!e)throw new Error("Parameter `authenticationSearch` is required when calling `searchAuthentications`.");if(!e.authenticationIDs)throw new Error("Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.");let t={method:"POST",path:"/1/authentications/search",queryParameters:{},headers:{},data:e};return i.request(t,r)},searchDestinations(e,r){if(!e)throw new Error("Parameter `destinationSearch` is required when calling `searchDestinations`.");if(!e.destinationIDs)throw new Error("Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.");let t={method:"POST",path:"/1/destinations/search",queryParameters:{},headers:{},data:e};return i.request(t,r)},searchSources(e,r){if(!e)throw new Error("Parameter `sourceSearch` is required when calling `searchSources`.");if(!e.sourceIDs)throw new Error("Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.");let t={method:"POST",path:"/1/sources/search",queryParameters:{},headers:{},data:e};return i.request(t,r)},searchTasks(e,r){if(!e)throw new Error("Parameter `taskSearch` is required when calling `searchTasks`.");if(!e.taskIDs)throw new Error("Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.");let t={method:"POST",path:"/2/tasks/search",queryParameters:{},headers:{},data:e};return i.request(t,r)},searchTasksV1(e,r){if(!e)throw new Error("Parameter `taskSearch` is required when calling `searchTasksV1`.");if(!e.taskIDs)throw new Error("Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.");let t={method:"POST",path:"/1/tasks/search",queryParameters:{},headers:{},data:e};return i.request(t,r)},searchTransformations(e,r){if(!e)throw new Error("Parameter `transformationSearch` is required when calling `searchTransformations`.");if(!e.transformationIDs)throw new Error("Parameter `transformationSearch.transformationIDs` is required when calling `searchTransformations`.");let t={method:"POST",path:"/1/transformations/search",queryParameters:{},headers:{},data:e};return i.request(t,r)},triggerDockerSourceDiscover({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.");let t={method:"POST",path:"/1/sources/{sourceID}/discover".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(t,r)},tryTransformation(e,r){if(!e)throw new Error("Parameter `transformationTry` is required when calling `tryTransformation`.");if(!e.code)throw new Error("Parameter `transformationTry.code` is required when calling `tryTransformation`.");if(!e.sampleRecord)throw new Error("Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.");let t={method:"POST",path:"/1/transformations/try",queryParameters:{},headers:{},data:e};return i.request(t,r)},tryTransformationBeforeUpdate({transformationID:e,transformationTry:r},s){if(!e)throw new Error("Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`.");if(!r)throw new Error("Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.");if(!r.code)throw new Error("Parameter `transformationTry.code` is required when calling `tryTransformationBeforeUpdate`.");if(!r.sampleRecord)throw new Error("Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.");let d={method:"POST",path:"/1/transformations/{transformationID}/try".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return i.request(d,s)},updateAuthentication({authenticationID:e,authenticationUpdate:r},s){if(!e)throw new Error("Parameter `authenticationID` is required when calling `updateAuthentication`.");if(!r)throw new Error("Parameter `authenticationUpdate` is required when calling `updateAuthentication`.");let d={method:"PATCH",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return i.request(d,s)},updateDestination({destinationID:e,destinationUpdate:r},s){if(!e)throw new Error("Parameter `destinationID` is required when calling `updateDestination`.");if(!r)throw new Error("Parameter `destinationUpdate` is required when calling `updateDestination`.");let d={method:"PATCH",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return i.request(d,s)},updateSource({sourceID:e,sourceUpdate:r},s){if(!e)throw new Error("Parameter `sourceID` is required when calling `updateSource`.");if(!r)throw new Error("Parameter `sourceUpdate` is required when calling `updateSource`.");let d={method:"PATCH",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return i.request(d,s)},updateTask({taskID:e,taskUpdate:r},s){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTask`.");if(!r)throw new Error("Parameter `taskUpdate` is required when calling `updateTask`.");let d={method:"PATCH",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return i.request(d,s)},updateTaskV1({taskID:e,taskUpdate:r},s){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTaskV1`.");if(!r)throw new Error("Parameter `taskUpdate` is required when calling `updateTaskV1`.");let d={method:"PATCH",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return i.request(d,s)},updateTransformation({transformationID:e,transformationCreate:r},s){if(!e)throw new Error("Parameter `transformationID` is required when calling `updateTransformation`.");if(!r)throw new Error("Parameter `transformationCreate` is required when calling `updateTransformation`.");if(!r.code)throw new Error("Parameter `transformationCreate.code` is required when calling `updateTransformation`.");if(!r.name)throw new Error("Parameter `transformationCreate.name` is required when calling `updateTransformation`.");let d={method:"PUT",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return i.request(d,s)},validateSource(e,r=void 0){let t={method:"POST",path:"/1/sources/validate",queryParameters:{},headers:{},data:e||{}};return i.request(t,r)},validateSourceBeforeUpdate({sourceID:e,sourceUpdate:r},s){if(!e)throw new Error("Parameter `sourceID` is required when calling `validateSourceBeforeUpdate`.");if(!r)throw new Error("Parameter `sourceUpdate` is required when calling `validateSourceBeforeUpdate`.");let d={method:"POST",path:"/1/sources/{sourceID}/validate".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return i.request(d,s)}}}function hs(a,o,c,m){if(!a||typeof a!="string")throw new Error("`appId` is missing.");if(!o||typeof o!="string")throw new Error("`apiKey` is missing.");if(!c||c&&(typeof c!="string"||!A.includes(c)))throw new Error(`\`region\` is required and must be one of the following: ${A.join(", ")}`);return X({appId:a,apiKey:o,region:c,timeouts:{connect:J,read:M,write:z},requester:F(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:k(),requestsCache:k({serializable:!1}),hostsCache:S({caches:[N({key:`${x}-${a}`}),k()]}),...m})}
7
+ function _(a){let o,d=`algolia-client-js-${a.key}`;function m(){return o===void 0&&(o=a.localStorage||window.localStorage),o}function h(){return JSON.parse(m().getItem(d)||"{}")}function T(n){m().setItem(d,JSON.stringify(n));}function w(){let n=a.timeToLive?a.timeToLive*1e3:null,e=h(),r=Object.fromEntries(Object.entries(e).filter(([,i])=>i.timestamp!==void 0));if(T(r),!n)return;let s=Object.fromEntries(Object.entries(r).filter(([,i])=>{let u=new Date().getTime();return !(i.timestamp+n<u)}));T(s);}return {get(n,e,r={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(w(),h()[JSON.stringify(n)])).then(s=>Promise.all([s?s.value:e(),s!==void 0])).then(([s,i])=>Promise.all([s,i||r.miss(s)])).then(([s])=>s)},set(n,e){return Promise.resolve().then(()=>{let r=h();return r[JSON.stringify(n)]={timestamp:new Date().getTime(),value:e},m().setItem(d,JSON.stringify(r)),e})},delete(n){return Promise.resolve().then(()=>{let e=h();delete e[JSON.stringify(n)],m().setItem(d,JSON.stringify(e));})},clear(){return Promise.resolve().then(()=>{m().removeItem(d);})}}}function ee(){return {get(a,o,d={miss:()=>Promise.resolve()}){return o().then(h=>Promise.all([h,d.miss(h)])).then(([h])=>h)},set(a,o){return Promise.resolve(o)},delete(a){return Promise.resolve()},clear(){return Promise.resolve()}}}function S(a){let o=[...a.caches],d=o.shift();return d===void 0?ee():{get(m,h,T={miss:()=>Promise.resolve()}){return d.get(m,h,T).catch(()=>S({caches:o}).get(m,h,T))},set(m,h){return d.set(m,h).catch(()=>S({caches:o}).set(m,h))},delete(m){return d.delete(m).catch(()=>S({caches:o}).delete(m))},clear(){return d.clear().catch(()=>S({caches:o}).clear())}}}function k(a={serializable:!0}){let o={};return {get(d,m,h={miss:()=>Promise.resolve()}){let T=JSON.stringify(d);if(T in o)return Promise.resolve(a.serializable?JSON.parse(o[T]):o[T]);let w=m();return w.then(n=>h.miss(n)).then(()=>w)},set(d,m){return o[JSON.stringify(d)]=a.serializable?JSON.stringify(m):m,Promise.resolve(m)},delete(d){return delete o[JSON.stringify(d)],Promise.resolve()},clear(){return o={},Promise.resolve()}}}var N=1e3,W=2e3,B=3e4;function re(a){let o={value:`Algolia for JavaScript (${a})`,add(d){let m=`; ${d.segment}${d.version!==void 0?` (${d.version})`:""}`;return o.value.indexOf(m)===-1&&(o.value=`${o.value}${m}`),o}};return o}function $(a,o,d="WithinHeaders"){let m={"x-algolia-api-key":o,"x-algolia-application-id":a};return {headers(){return d==="WithinHeaders"?m:{}},queryParameters(){return d==="WithinQueryParameters"?m:{}}}}function j({algoliaAgents:a,client:o,version:d}){let m=re(d).add({segment:o,version:d});return a.forEach(h=>m.add(h)),m}function J(){return {debug(a,o){return Promise.resolve()},info(a,o){return Promise.resolve()},error(a,o){return Promise.resolve()}}}var V=2*60*1e3;function G(a,o="up"){let d=Date.now();function m(){return o==="up"||Date.now()-d>V}function h(){return o==="timed out"&&Date.now()-d<=V}return {...a,status:o,lastUpdate:d,isUp:m,isTimedOut:h}}var M=class extends Error{name="AlgoliaError";constructor(a,o){super(a),o&&(this.name=o);}},z=class extends M{stackTrace;constructor(a,o,d){super(a,d),this.stackTrace=o;}},te=class extends z{constructor(a){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",a,"RetryError");}},U=class extends z{status;constructor(a,o,d,m="ApiError"){super(a,d,m),this.status=o;}},se=class extends M{response;constructor(a,o){super(a,"DeserializationError"),this.response=o;}},oe=class extends U{error;constructor(a,o,d,m){super(a,o,m,"DetailedApiError"),this.error=d;}};function ae(a,o,d){let m=ne(d),h=`${a.protocol}://${a.url}${a.port?`:${a.port}`:""}/${o.charAt(0)==="/"?o.substring(1):o}`;return m.length&&(h+=`?${m}`),h}function ne(a){return Object.keys(a).filter(o=>a[o]!==void 0).sort().map(o=>`${o}=${encodeURIComponent(Object.prototype.toString.call(a[o])==="[object Array]"?a[o].join(","):a[o]).replaceAll("+","%20")}`).join("&")}function ie(a,o){if(a.method==="GET"||a.data===void 0&&o.data===void 0)return;let d=Array.isArray(a.data)?a.data:{...a.data,...o.data};return JSON.stringify(d)}function ue(a,o,d){let m={Accept:"application/json",...a,...o,...d},h={};return Object.keys(m).forEach(T=>{let w=m[T];h[T.toLowerCase()]=w;}),h}function me(a){try{return JSON.parse(a.content)}catch(o){throw new se(o.message,a)}}function ce({content:a,status:o},d){try{let m=JSON.parse(a);return "error"in m?new oe(m.message,o,m.error,d):new U(m.message,o,d)}catch{}return new U(a,o,d)}function de({isTimedOut:a,status:o}){return !a&&~~o===0}function pe({isTimedOut:a,status:o}){return a||de({isTimedOut:a,status:o})||~~(o/100)!==2&&~~(o/100)!==4}function he({status:a}){return ~~(a/100)===2}function fe(a){return a.map(o=>F(o))}function F(a){let o=a.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...a,request:{...a.request,headers:{...a.request.headers,...o}}}}function X({hosts:a,hostsCache:o,baseHeaders:d,logger:m,baseQueryParameters:h,algoliaAgent:T,timeouts:w,requester:n,requestsCache:e,responsesCache:r}){async function s(t){let c=await Promise.all(t.map(g=>o.get(g,()=>Promise.resolve(G(g))))),f=c.filter(g=>g.isUp()),P=c.filter(g=>g.isTimedOut()),l=[...f,...P];return {hosts:l.length>0?l:t,getTimeout(g,p){return (P.length===0&&g===0?1:P.length+3+g)*p}}}async function i(t,c,f=!0){let P=[],l=ie(t,c),q=ue(d,t.headers,c.headers),g=t.method==="GET"?{...t.data,...c.data}:{},p={...h,...t.queryParameters,...g};if(T.value&&(p["x-algolia-agent"]=T.value),c&&c.queryParameters)for(let y of Object.keys(c.queryParameters))!c.queryParameters[y]||Object.prototype.toString.call(c.queryParameters[y])==="[object Object]"?p[y]=c.queryParameters[y]:p[y]=c.queryParameters[y].toString();let R=0,v=async(y,I)=>{let D=y.pop();if(D===void 0)throw new te(fe(P));let O={...w,...c.timeouts},b={data:l,headers:q,method:t.method,url:ae(D,t.path,p),connectTimeout:I(R,O.connect),responseTimeout:I(R,f?O.read:O.write)},Q=C=>{let L={request:b,response:C,host:D,triesLeft:y.length};return P.push(L),L},E=await n.send(b);if(pe(E)){let C=Q(E);return E.isTimedOut&&R++,m.info("Retryable failure",F(C)),await o.set(D,G(D,E.isTimedOut?"timed out":"down")),v(y,I)}if(he(E))return me(E);throw Q(E),ce(E,P)},Z=a.filter(y=>y.accept==="readWrite"||(f?y.accept==="read":y.accept==="write")),H=await s(Z);return v([...H.hosts].reverse(),H.getTimeout)}function u(t,c={}){let f=t.useReadTransporter||t.method==="GET";if(!f)return i(t,c,f);let P=()=>i(t,c);if((c.cacheable||t.cacheable)!==!0)return P();let q={request:t,requestOptions:c,transporter:{queryParameters:h,headers:d}};return r.get(q,()=>e.get(q,()=>e.set(q,P()).then(g=>Promise.all([e.delete(q),g]),g=>Promise.all([e.delete(q),Promise.reject(g)])).then(([g,p])=>p)),{miss:g=>r.set(q,g)})}return {hostsCache:o,requester:n,timeouts:w,logger:m,algoliaAgent:T,baseHeaders:d,baseQueryParameters:h,hosts:a,request:u,requestsCache:e,responsesCache:r}}function K(){function a(o){return new Promise(d=>{let m=new XMLHttpRequest;m.open(o.method,o.url,!0),Object.keys(o.headers).forEach(n=>m.setRequestHeader(n,o.headers[n]));let h=(n,e)=>setTimeout(()=>{m.abort(),d({status:0,content:e,isTimedOut:!0});},n),T=h(o.connectTimeout,"Connection timeout"),w;m.onreadystatechange=()=>{m.readyState>m.OPENED&&w===void 0&&(clearTimeout(T),w=h(o.responseTimeout,"Socket timeout"));},m.onerror=()=>{m.status===0&&(clearTimeout(T),clearTimeout(w),d({content:m.responseText||"Network request failed",status:m.status,isTimedOut:!1}));},m.onload=()=>{clearTimeout(T),clearTimeout(w),d({content:m.responseText,status:m.status,isTimedOut:!1});},m.send(o.data);})}return {send:a}}var x="1.6.1",A=["eu","us"];function le(a){return [{url:"data.{region}.algolia.com".replace("{region}",a),accept:"readWrite",protocol:"https"}]}function Pe(a){return a.type==="onDemand"}function qe(a){return a.type==="schedule"}function ge(a){return a.type==="subscription"}function Y({appId:a,apiKey:o,authMode:d,algoliaAgents:m,region:h,...T}){let w=$(a,o,d),n=X({hosts:le(h),...T,algoliaAgent:j({algoliaAgents:m,client:"Ingestion",version:x}),baseHeaders:{"content-type":"text/plain",...w.headers(),...T.baseHeaders},baseQueryParameters:{...w.queryParameters(),...T.baseQueryParameters}});return {transporter:n,appId:a,clearCache(){return Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then(()=>{})},get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,r){n.algoliaAgent.add({segment:e,version:r});},setClientApiKey({apiKey:e}){!d||d==="WithinHeaders"?n.baseHeaders["x-algolia-api-key"]=e:n.baseQueryParameters["x-algolia-api-key"]=e;},createAuthentication(e,r){if(!e)throw new Error("Parameter `authenticationCreate` is required when calling `createAuthentication`.");if(!e.type)throw new Error("Parameter `authenticationCreate.type` is required when calling `createAuthentication`.");if(!e.name)throw new Error("Parameter `authenticationCreate.name` is required when calling `createAuthentication`.");if(!e.input)throw new Error("Parameter `authenticationCreate.input` is required when calling `createAuthentication`.");let t={method:"POST",path:"/1/authentications",queryParameters:{},headers:{},data:e};return n.request(t,r)},createDestination(e,r){if(!e)throw new Error("Parameter `destinationCreate` is required when calling `createDestination`.");if(!e.type)throw new Error("Parameter `destinationCreate.type` is required when calling `createDestination`.");if(!e.name)throw new Error("Parameter `destinationCreate.name` is required when calling `createDestination`.");if(!e.input)throw new Error("Parameter `destinationCreate.input` is required when calling `createDestination`.");let t={method:"POST",path:"/1/destinations",queryParameters:{},headers:{},data:e};return n.request(t,r)},createSource(e,r){if(!e)throw new Error("Parameter `sourceCreate` is required when calling `createSource`.");if(!e.type)throw new Error("Parameter `sourceCreate.type` is required when calling `createSource`.");if(!e.name)throw new Error("Parameter `sourceCreate.name` is required when calling `createSource`.");let t={method:"POST",path:"/1/sources",queryParameters:{},headers:{},data:e};return n.request(t,r)},createTask(e,r){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.destinationID)throw new Error("Parameter `taskCreate.destinationID` is required when calling `createTask`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTask`.");let t={method:"POST",path:"/2/tasks",queryParameters:{},headers:{},data:e};return n.request(t,r)},createTaskV1(e,r){if(!e)throw new Error("Parameter `taskCreate` is required when calling `createTaskV1`.");if(!e.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTaskV1`.");if(!e.destinationID)throw new Error("Parameter `taskCreate.destinationID` is required when calling `createTaskV1`.");if(!e.trigger)throw new Error("Parameter `taskCreate.trigger` is required when calling `createTaskV1`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTaskV1`.");let t={method:"POST",path:"/1/tasks",queryParameters:{},headers:{},data:e};return n.request(t,r)},createTransformation(e,r){if(!e)throw new Error("Parameter `transformationCreate` is required when calling `createTransformation`.");if(!e.code)throw new Error("Parameter `transformationCreate.code` is required when calling `createTransformation`.");if(!e.name)throw new Error("Parameter `transformationCreate.name` is required when calling `createTransformation`.");let t={method:"POST",path:"/1/transformations",queryParameters:{},headers:{},data:e};return n.request(t,r)},customDelete({path:e,parameters:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let c={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return n.request(c,s)},customGet({path:e,parameters:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let c={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return n.request(c,s)},customPost({path:e,parameters:r,body:s},i){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");let f={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:s||{}};return n.request(f,i)},customPut({path:e,parameters:r,body:s},i){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");let f={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:s||{}};return n.request(f,i)},deleteAuthentication({authenticationID:e},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `deleteAuthentication`.");let t={method:"DELETE",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},deleteDestination({destinationID:e},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `deleteDestination`.");let t={method:"DELETE",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},deleteSource({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `deleteSource`.");let t={method:"DELETE",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},deleteTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTask`.");let t={method:"DELETE",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},deleteTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTaskV1`.");let t={method:"DELETE",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},deleteTransformation({transformationID:e},r){if(!e)throw new Error("Parameter `transformationID` is required when calling `deleteTransformation`.");let t={method:"DELETE",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},disableTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTask`.");let t={method:"PUT",path:"/2/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},disableTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTaskV1`.");let t={method:"PUT",path:"/1/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},enableTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTask`.");let t={method:"PUT",path:"/2/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},enableTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTaskV1`.");let t={method:"PUT",path:"/1/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},getAuthentication({authenticationID:e},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `getAuthentication`.");let t={method:"GET",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},getDestination({destinationID:e},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `getDestination`.");let t={method:"GET",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},getEvent({runID:e,eventID:r},s){if(!e)throw new Error("Parameter `runID` is required when calling `getEvent`.");if(!r)throw new Error("Parameter `eventID` is required when calling `getEvent`.");let c={method:"GET",path:"/1/runs/{runID}/events/{eventID}".replace("{runID}",encodeURIComponent(e)).replace("{eventID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(c,s)},getRun({runID:e},r){if(!e)throw new Error("Parameter `runID` is required when calling `getRun`.");let t={method:"GET",path:"/1/runs/{runID}".replace("{runID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},getSource({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `getSource`.");let t={method:"GET",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},getTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getTask`.");let t={method:"GET",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},getTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getTaskV1`.");let t={method:"GET",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},getTransformation({transformationID:e},r){if(!e)throw new Error("Parameter `transformationID` is required when calling `getTransformation`.");let t={method:"GET",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},listAuthentications({itemsPerPage:e,page:r,type:s,platform:i,sort:u,order:t}={},c=void 0){let f="/1/authentications",P={},l={};e!==void 0&&(l.itemsPerPage=e.toString()),r!==void 0&&(l.page=r.toString()),s!==void 0&&(l.type=s.toString()),i!==void 0&&(l.platform=i.toString()),u!==void 0&&(l.sort=u.toString()),t!==void 0&&(l.order=t.toString());let q={method:"GET",path:f,queryParameters:l,headers:P};return n.request(q,c)},listDestinations({itemsPerPage:e,page:r,type:s,authenticationID:i,transformationID:u,sort:t,order:c}={},f=void 0){let P="/1/destinations",l={},q={};e!==void 0&&(q.itemsPerPage=e.toString()),r!==void 0&&(q.page=r.toString()),s!==void 0&&(q.type=s.toString()),i!==void 0&&(q.authenticationID=i.toString()),u!==void 0&&(q.transformationID=u.toString()),t!==void 0&&(q.sort=t.toString()),c!==void 0&&(q.order=c.toString());let g={method:"GET",path:P,queryParameters:q,headers:l};return n.request(g,f)},listEvents({runID:e,itemsPerPage:r,page:s,status:i,type:u,sort:t,order:c,startDate:f,endDate:P},l){if(!e)throw new Error("Parameter `runID` is required when calling `listEvents`.");let q="/1/runs/{runID}/events".replace("{runID}",encodeURIComponent(e)),g={},p={};r!==void 0&&(p.itemsPerPage=r.toString()),s!==void 0&&(p.page=s.toString()),i!==void 0&&(p.status=i.toString()),u!==void 0&&(p.type=u.toString()),t!==void 0&&(p.sort=t.toString()),c!==void 0&&(p.order=c.toString()),f!==void 0&&(p.startDate=f.toString()),P!==void 0&&(p.endDate=P.toString());let R={method:"GET",path:q,queryParameters:p,headers:g};return n.request(R,l)},listRuns({itemsPerPage:e,page:r,status:s,type:i,taskID:u,sort:t,order:c,startDate:f,endDate:P}={},l=void 0){let q="/1/runs",g={},p={};e!==void 0&&(p.itemsPerPage=e.toString()),r!==void 0&&(p.page=r.toString()),s!==void 0&&(p.status=s.toString()),i!==void 0&&(p.type=i.toString()),u!==void 0&&(p.taskID=u.toString()),t!==void 0&&(p.sort=t.toString()),c!==void 0&&(p.order=c.toString()),f!==void 0&&(p.startDate=f.toString()),P!==void 0&&(p.endDate=P.toString());let R={method:"GET",path:q,queryParameters:p,headers:g};return n.request(R,l)},listSources({itemsPerPage:e,page:r,type:s,authenticationID:i,sort:u,order:t}={},c=void 0){let f="/1/sources",P={},l={};e!==void 0&&(l.itemsPerPage=e.toString()),r!==void 0&&(l.page=r.toString()),s!==void 0&&(l.type=s.toString()),i!==void 0&&(l.authenticationID=i.toString()),u!==void 0&&(l.sort=u.toString()),t!==void 0&&(l.order=t.toString());let q={method:"GET",path:f,queryParameters:l,headers:P};return n.request(q,c)},listTasks({itemsPerPage:e,page:r,action:s,enabled:i,sourceID:u,destinationID:t,triggerType:c,sort:f,order:P}={},l=void 0){let q="/2/tasks",g={},p={};e!==void 0&&(p.itemsPerPage=e.toString()),r!==void 0&&(p.page=r.toString()),s!==void 0&&(p.action=s.toString()),i!==void 0&&(p.enabled=i.toString()),u!==void 0&&(p.sourceID=u.toString()),t!==void 0&&(p.destinationID=t.toString()),c!==void 0&&(p.triggerType=c.toString()),f!==void 0&&(p.sort=f.toString()),P!==void 0&&(p.order=P.toString());let R={method:"GET",path:q,queryParameters:p,headers:g};return n.request(R,l)},listTasksV1({itemsPerPage:e,page:r,action:s,enabled:i,sourceID:u,destinationID:t,triggerType:c,sort:f,order:P}={},l=void 0){let q="/1/tasks",g={},p={};e!==void 0&&(p.itemsPerPage=e.toString()),r!==void 0&&(p.page=r.toString()),s!==void 0&&(p.action=s.toString()),i!==void 0&&(p.enabled=i.toString()),u!==void 0&&(p.sourceID=u.toString()),t!==void 0&&(p.destinationID=t.toString()),c!==void 0&&(p.triggerType=c.toString()),f!==void 0&&(p.sort=f.toString()),P!==void 0&&(p.order=P.toString());let R={method:"GET",path:q,queryParameters:p,headers:g};return n.request(R,l)},listTransformations({itemsPerPage:e,page:r,sort:s,order:i}={},u=void 0){let t="/1/transformations",c={},f={};e!==void 0&&(f.itemsPerPage=e.toString()),r!==void 0&&(f.page=r.toString()),s!==void 0&&(f.sort=s.toString()),i!==void 0&&(f.order=i.toString());let P={method:"GET",path:t,queryParameters:f,headers:c};return n.request(P,u)},pushTask({taskID:e,pushTaskPayload:r},s){if(!e)throw new Error("Parameter `taskID` is required when calling `pushTask`.");if(!r)throw new Error("Parameter `pushTaskPayload` is required when calling `pushTask`.");if(!r.action)throw new Error("Parameter `pushTaskPayload.action` is required when calling `pushTask`.");if(!r.records)throw new Error("Parameter `pushTaskPayload.records` is required when calling `pushTask`.");let c={method:"POST",path:"/2/tasks/{taskID}/push".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return n.request(c,s)},runSource({sourceID:e,runSourcePayload:r},s){if(!e)throw new Error("Parameter `sourceID` is required when calling `runSource`.");let c={method:"POST",path:"/1/sources/{sourceID}/run".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return n.request(c,s)},runTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `runTask`.");let t={method:"POST",path:"/2/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},runTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `runTaskV1`.");let t={method:"POST",path:"/1/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},searchAuthentications(e,r){if(!e)throw new Error("Parameter `authenticationSearch` is required when calling `searchAuthentications`.");if(!e.authenticationIDs)throw new Error("Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.");let t={method:"POST",path:"/1/authentications/search",queryParameters:{},headers:{},data:e};return n.request(t,r)},searchDestinations(e,r){if(!e)throw new Error("Parameter `destinationSearch` is required when calling `searchDestinations`.");if(!e.destinationIDs)throw new Error("Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.");let t={method:"POST",path:"/1/destinations/search",queryParameters:{},headers:{},data:e};return n.request(t,r)},searchSources(e,r){if(!e)throw new Error("Parameter `sourceSearch` is required when calling `searchSources`.");if(!e.sourceIDs)throw new Error("Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.");let t={method:"POST",path:"/1/sources/search",queryParameters:{},headers:{},data:e};return n.request(t,r)},searchTasks(e,r){if(!e)throw new Error("Parameter `taskSearch` is required when calling `searchTasks`.");if(!e.taskIDs)throw new Error("Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.");let t={method:"POST",path:"/2/tasks/search",queryParameters:{},headers:{},data:e};return n.request(t,r)},searchTasksV1(e,r){if(!e)throw new Error("Parameter `taskSearch` is required when calling `searchTasksV1`.");if(!e.taskIDs)throw new Error("Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.");let t={method:"POST",path:"/1/tasks/search",queryParameters:{},headers:{},data:e};return n.request(t,r)},searchTransformations(e,r){if(!e)throw new Error("Parameter `transformationSearch` is required when calling `searchTransformations`.");if(!e.transformationIDs)throw new Error("Parameter `transformationSearch.transformationIDs` is required when calling `searchTransformations`.");let t={method:"POST",path:"/1/transformations/search",queryParameters:{},headers:{},data:e};return n.request(t,r)},triggerDockerSourceDiscover({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.");let t={method:"POST",path:"/1/sources/{sourceID}/discover".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(t,r)},tryTransformation(e,r){if(!e)throw new Error("Parameter `transformationTry` is required when calling `tryTransformation`.");if(!e.code)throw new Error("Parameter `transformationTry.code` is required when calling `tryTransformation`.");if(!e.sampleRecord)throw new Error("Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.");let t={method:"POST",path:"/1/transformations/try",queryParameters:{},headers:{},data:e};return n.request(t,r)},tryTransformationBeforeUpdate({transformationID:e,transformationTry:r},s){if(!e)throw new Error("Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`.");if(!r)throw new Error("Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.");if(!r.code)throw new Error("Parameter `transformationTry.code` is required when calling `tryTransformationBeforeUpdate`.");if(!r.sampleRecord)throw new Error("Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.");let c={method:"POST",path:"/1/transformations/{transformationID}/try".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return n.request(c,s)},updateAuthentication({authenticationID:e,authenticationUpdate:r},s){if(!e)throw new Error("Parameter `authenticationID` is required when calling `updateAuthentication`.");if(!r)throw new Error("Parameter `authenticationUpdate` is required when calling `updateAuthentication`.");let c={method:"PATCH",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return n.request(c,s)},updateDestination({destinationID:e,destinationUpdate:r},s){if(!e)throw new Error("Parameter `destinationID` is required when calling `updateDestination`.");if(!r)throw new Error("Parameter `destinationUpdate` is required when calling `updateDestination`.");let c={method:"PATCH",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return n.request(c,s)},updateSource({sourceID:e,sourceUpdate:r},s){if(!e)throw new Error("Parameter `sourceID` is required when calling `updateSource`.");if(!r)throw new Error("Parameter `sourceUpdate` is required when calling `updateSource`.");let c={method:"PATCH",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return n.request(c,s)},updateTask({taskID:e,taskUpdate:r},s){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTask`.");if(!r)throw new Error("Parameter `taskUpdate` is required when calling `updateTask`.");let c={method:"PATCH",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return n.request(c,s)},updateTaskV1({taskID:e,taskUpdate:r},s){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTaskV1`.");if(!r)throw new Error("Parameter `taskUpdate` is required when calling `updateTaskV1`.");let c={method:"PATCH",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return n.request(c,s)},updateTransformation({transformationID:e,transformationCreate:r},s){if(!e)throw new Error("Parameter `transformationID` is required when calling `updateTransformation`.");if(!r)throw new Error("Parameter `transformationCreate` is required when calling `updateTransformation`.");if(!r.code)throw new Error("Parameter `transformationCreate.code` is required when calling `updateTransformation`.");if(!r.name)throw new Error("Parameter `transformationCreate.name` is required when calling `updateTransformation`.");let c={method:"PUT",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return n.request(c,s)},validateSource(e,r=void 0){let t={method:"POST",path:"/1/sources/validate",queryParameters:{},headers:{},data:e||{}};return n.request(t,r)},validateSourceBeforeUpdate({sourceID:e,sourceUpdate:r},s){if(!e)throw new Error("Parameter `sourceID` is required when calling `validateSourceBeforeUpdate`.");if(!r)throw new Error("Parameter `sourceUpdate` is required when calling `validateSourceBeforeUpdate`.");let c={method:"POST",path:"/1/sources/{sourceID}/validate".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return n.request(c,s)}}}function ls(a,o,d,m){if(!a||typeof a!="string")throw new Error("`appId` is missing.");if(!o||typeof o!="string")throw new Error("`apiKey` is missing.");if(!d||d&&(typeof d!="string"||!A.includes(d)))throw new Error(`\`region\` is required and must be one of the following: ${A.join(", ")}`);return Y({appId:a,apiKey:o,region:d,timeouts:{connect:N,read:W,write:B},logger:J(),requester:K(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:k(),requestsCache:k({serializable:!1}),hostsCache:S({caches:[_({key:`${x}-${a}`}),k()]}),...m})}
8
8
 
9
9
  exports.apiClientVersion = x;
10
- exports.ingestionClient = hs;
11
- exports.isOnDemandTrigger = fe;
12
- exports.isScheduleTrigger = le;
13
- exports.isSubscriptionTrigger = Pe;
10
+ exports.ingestionClient = ls;
11
+ exports.isOnDemandTrigger = Pe;
12
+ exports.isScheduleTrigger = qe;
13
+ exports.isSubscriptionTrigger = ge;
14
14
 
15
15
  }));
@@ -1,5 +1,6 @@
1
1
  // builds/fetch.ts
2
2
  import {
3
+ createNullLogger,
3
4
  createMemoryCache,
4
5
  createNullCache,
5
6
  DEFAULT_CONNECT_TIMEOUT_NODE,
@@ -10,7 +11,7 @@ import { createFetchRequester } from "@algolia/requester-fetch";
10
11
 
11
12
  // src/ingestionClient.ts
12
13
  import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
13
- var apiClientVersion = "1.5.3";
14
+ var apiClientVersion = "1.6.1";
14
15
  var REGIONS = ["eu", "us"];
15
16
  function getDefaultHosts(region) {
16
17
  const url = "data.{region}.algolia.com".replace("{region}", region);
@@ -891,8 +892,8 @@ function createIngestionClient({
891
892
  * @param listAuthentications.itemsPerPage - Number of items per page.
892
893
  * @param listAuthentications.page - Page number of the paginated API response.
893
894
  * @param listAuthentications.type - Type of authentication resource to retrieve.
894
- * @param listAuthentications.platform - Ecommerce platform for which to retrieve authentication resources.
895
- * @param listAuthentications.sort - Property by which to sort the list of authentication resources.
895
+ * @param listAuthentications.platform - Ecommerce platform for which to retrieve authentications.
896
+ * @param listAuthentications.sort - Property by which to sort the list of authentications.
896
897
  * @param listAuthentications.order - Sort order of the response, ascending or descending.
897
898
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
898
899
  */
@@ -939,11 +940,12 @@ function createIngestionClient({
939
940
  * @param listDestinations.page - Page number of the paginated API response.
940
941
  * @param listDestinations.type - Destination type.
941
942
  * @param listDestinations.authenticationID - Authentication ID used by destinations.
943
+ * @param listDestinations.transformationID - Get the list of destinations used by a transformation.
942
944
  * @param listDestinations.sort - Property by which to sort the destinations.
943
945
  * @param listDestinations.order - Sort order of the response, ascending or descending.
944
946
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
945
947
  */
946
- listDestinations({ itemsPerPage, page, type, authenticationID, sort, order } = {}, requestOptions = void 0) {
948
+ listDestinations({ itemsPerPage, page, type, authenticationID, transformationID, sort, order } = {}, requestOptions = void 0) {
947
949
  const requestPath = "/1/destinations";
948
950
  const headers = {};
949
951
  const queryParameters = {};
@@ -959,6 +961,9 @@ function createIngestionClient({
959
961
  if (authenticationID !== void 0) {
960
962
  queryParameters.authenticationID = authenticationID.toString();
961
963
  }
964
+ if (transformationID !== void 0) {
965
+ queryParameters.transformationID = transformationID.toString();
966
+ }
962
967
  if (sort !== void 0) {
963
968
  queryParameters.sort = sort.toString();
964
969
  }
@@ -1103,7 +1108,7 @@ function createIngestionClient({
1103
1108
  * @param listSources.itemsPerPage - Number of items per page.
1104
1109
  * @param listSources.page - Page number of the paginated API response.
1105
1110
  * @param listSources.type - Source type. Some sources require authentication.
1106
- * @param listSources.authenticationID - Authentication IDs of the sources to retrieve. \'none\' returns sources that doesn\'t have an authentication resource.
1111
+ * @param listSources.authenticationID - Authentication IDs of the sources to retrieve. \'none\' returns sources that doesn\'t have an authentication.
1107
1112
  * @param listSources.sort - Property by which to sort the list of sources.
1108
1113
  * @param listSources.order - Sort order of the response, ascending or descending.
1109
1114
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -1267,7 +1272,7 @@ function createIngestionClient({
1267
1272
  * @param listTransformations - The listTransformations object.
1268
1273
  * @param listTransformations.itemsPerPage - Number of items per page.
1269
1274
  * @param listTransformations.page - Page number of the paginated API response.
1270
- * @param listTransformations.sort - Property by which to sort the list.
1275
+ * @param listTransformations.sort - Property by which to sort the list of transformations.
1271
1276
  * @param listTransformations.order - Sort order of the response, ascending or descending.
1272
1277
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1273
1278
  */
@@ -1975,6 +1980,7 @@ function ingestionClient(appId, apiKey, region, options) {
1975
1980
  read: DEFAULT_READ_TIMEOUT_NODE,
1976
1981
  write: DEFAULT_WRITE_TIMEOUT_NODE
1977
1982
  },
1983
+ logger: createNullLogger(),
1978
1984
  algoliaAgents: [{ segment: "Fetch" }],
1979
1985
  requester: createFetchRequester(),
1980
1986
  responsesCache: createNullCache(),