@bereasoftware/nexa 0.0.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.
- package/LICENSE +9 -0
- package/README.en.md +1288 -0
- package/README.md +1304 -0
- package/dist/nexa.cjs.js +1 -0
- package/dist/nexa.es.js +934 -0
- package/dist/nexa.iife.js +1 -0
- package/dist/nexa.umd.js +1 -0
- package/dist/types/http-client/http-client.d.ts +109 -0
- package/dist/types/http-client/index.d.ts +7 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/types/index.d.ts +142 -0
- package/dist/types/utils/index.d.ts +392 -0
- package/package.json +98 -0
package/dist/nexa.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=e=>({ok:!0,value:e}),t=e=>({ok:!1,error:e});function n(n){return{validate(r){let i=r;for(let[e,r]of Object.entries(n))if(!r(i[e]))return t({message:`Validation failed: field "${e}" is invalid`,code:`VALIDATION_ERROR`});return e(r)}}}function r(n){return{validate(r){let i=r,a=n.filter(e=>!(e in i));return a.length>0?t({message:`Validation failed: missing fields: ${a.join(`, `)}`,code:`VALIDATION_ERROR`}):e(r)}}}var i={validate(n){return Array.isArray(n)?e(n):t({message:`Expected array response`,code:`VALIDATION_ERROR`})}},a={validate(n){return n&&typeof n==`object`&&!Array.isArray(n)?e(n):t({message:`Expected object response`,code:`VALIDATION_ERROR`})}},o={transform(e){return g(e,m)}},s={transform(e){return g(e,h)}},c={transform(e){return _(e)}};function l(e){return{transform(t){return Array.isArray(t)?t.map(t=>v(t,e)):v(t,e)}}}function u(e){return{transform(t){return{[e]:t}}}}var d=class{maxAttempts;constructor(e=5){this.maxAttempts=e}shouldRetry(e){return e<this.maxAttempts}delayMs(e){return e*50}},f=class{retryableStatuses=[408,429,500,502,503,504];maxAttempts;constructor(e=3){this.maxAttempts=e}shouldRetry(e,t){return e>=this.maxAttempts?!1:this.retryableStatuses.includes(t.status??0)||t.code===`TIMEOUT`}delayMs(e){return Math.min(1e3*2**(e-1),1e4)}},p=class{failureCount=0;lastFailureTime=0;maxAttempts;failureThreshold;resetTimeMs;constructor(e=3,t=5,n=6e4){this.maxAttempts=e,this.failureThreshold=t,this.resetTimeMs=n}shouldRetry(e){return e>=this.maxAttempts||(Date.now()-this.lastFailureTime>this.resetTimeMs&&(this.failureCount=0),this.failureCount>=this.failureThreshold)?!1:(this.failureCount++,this.lastFailureTime=Date.now(),!0)}delayMs(e){return 100*2**(e-1)}reset(){this.failureCount=0,this.lastFailureTime=0}};function m(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function h(e){return e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)}function g(e,t){if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(e=>g(e,t));let n={};for(let[r,i]of Object.entries(e))n[t(r)]=g(i,t);return n}function _(e,t=``){let n={};if(Array.isArray(e))e.forEach((e,r)=>{let i=t?`${t}[${r}]`:`[${r}]`;Object.assign(n,_(e,i))});else if(e&&typeof e==`object`)for(let[r,i]of Object.entries(e)){let e=t?`${t}.${r}`:r;i&&typeof i==`object`&&!Array.isArray(i)?Object.assign(n,_(i,e)):n[e]=i}return n}function v(e,t){if(!e||typeof e!=`object`)return{};let n=e,r={};for(let e of t)e in n&&(r[e]=n[e]);return r}function y(e){let t=new AbortController,n=setTimeout(()=>t.abort(),e);return t.signal.addEventListener(`abort`,()=>clearTimeout(n),{once:!0}),t}async function b(e,t=3){try{return await e()}catch(n){if(t<=0)throw n;return b(e,t-1)}}var x=class{cache=new Map;get(e){let t=this.cache.get(e);return t?Date.now()-t.timestamp>t.ttlMs?(this.cache.delete(e),null):t.data:null}set(e,t,n=6e4){this.cache.set(e,{data:t,timestamp:Date.now(),ttlMs:n})}clear(){this.cache.clear()}has(e){let t=this.cache.get(e);return t?Date.now()-t.timestamp>t.ttlMs?(this.cache.delete(e),!1):!0:!1}delete(e){this.cache.delete(e)}};function S(e={}){let t=e.cache||new x,n=e.ttlMs||6e4,r=e.cacheableStatuses||[200,304];return async(e,i)=>{let a=(e.request.method||`GET`).toUpperCase(),o=a===`GET`,s=`${a}:${e.request.url}`;if(o&&t.has(s)){let n=t.get(s);if(n){e.response=n,e.state.cacheHit=!0;return}}await i(),o&&e.response&&r.includes(e.response.status)&&(t.set(s,e.response,n),e.state.cacheMiss=!0)}}var C=S(),w=class{pending=new Map;async execute(e,t){if(this.pending.has(e))return this.pending.get(e);let n=t().finally(()=>{this.pending.delete(e)});return this.pending.set(e,n),n}clear(){this.pending.clear()}};function T(e={}){let t=e.deduplicator||new w,n=e.includeBody??!1,r=e.methods||[`GET`];return async(e,i)=>{let a=(e.request.method||`GET`).toUpperCase();if(!r.includes(a)){await i();return}let o=`${a}:${e.request.url}`;n&&e.request.body&&(o+=`:${JSON.stringify(e.request.body)}`);try{e.response=await t.execute(o,async()=>(await i(),e.response)),e.state.deduped=!0}catch(t){throw e.error=t,t}}}var E=T();function D(e){return async t=>{let n=-1;async function r(i){if(i<=n)throw Error(`next() called multiple times`);n=i;let a=e[i];a&&await a(t,()=>r(i+1))}await r(0)}}var O=class{middlewares=[];use(e){return this.middlewares.push(e),this}async execute(e){if(e&&typeof e==`object`&&`request`in e&&`response`in e){let t=e;return await D(this.middlewares.map(e=>typeof e==`function`&&e.length===2?e:async(t,n)=>{let r=e;t.response.body=await r(t.response.body),await n()}))(t),t.response.body}let t=e;for(let e of this.middlewares)t=await e(t);return t}clear(){this.middlewares=[]}};function k(e,t,n,r={}){return{ok:e>=200&&e<300,data:t,error:n,status:e,headers:r}}function A(e){return async(t,n)=>{let r=e.path,i;switch(e.method){case`GET`:i=await t.get(r);break;case`POST`:i=await t.post(r,n);break;case`PUT`:i=await t.put(r,n);break;case`PATCH`:i=await t.patch(r,n);break;case`DELETE`:i=await t.delete(r);break;default:throw Error(`Unsupported method: ${e.method}`)}return i}}function j(e){return{request:async(t,n,r)=>{let i=e[n];return await A(i)(t,r)}}}var M=class e{subscribers=[];errorSubscribers=[];completeSubscribers=[];subscribe(e,t,n){return e&&this.subscribers.push(e),t&&this.errorSubscribers.push(t),n&&this.completeSubscribers.push(n),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e),this.errorSubscribers=this.errorSubscribers.filter(e=>e!==t),this.completeSubscribers=this.completeSubscribers.filter(e=>e!==n)}}}next(e){this.subscribers.forEach(t=>t(e))}error(e){this.errorSubscribers.forEach(t=>t(e))}complete(){this.completeSubscribers.forEach(e=>e())}map(t){let n=new e;return this.subscribe(e=>n.next(t(e)),e=>n.error(e),()=>n.complete()),n}filter(t){let n=new e;return this.subscribe(e=>{t(e)&&n.next(e)},e=>n.error(e),()=>n.complete()),n}};function N(e){return t=>{if(!e(t))throw TypeError(`Value does not match expected type`);return t}}function P(e){return e}function F(e){return P(e)}var I=class{_promise;resolveFunc;rejectFunc;constructor(){this._promise=new Promise((e,t)=>{this.resolveFunc=e,this.rejectFunc=t})}resolve(e){this.resolveFunc(e)}reject(e){this.rejectFunc(e)}get promise(){return this._promise}promise_(){return this._promise}};async function L(e,t={}){let n=e.body?.getReader();if(!n)throw Error(`Response body is not readable`);let r=[],i=0,a=parseInt(e.headers.get(`content-length`)||`0`,10);for(;;){let{done:e,value:o}=await n.read();if(e)break;r.push(o),i+=o.length,t.onChunk&&await t.onChunk(o),t.onProgress&&a>0&&t.onProgress(i,a)}return R(r,i)}function R(e,t){let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}async function z(e,t){let n=await L(e);if(typeof window>`u`)await(await import(`fs`).then(e=>e.promises)).writeFile(t,n);else{let e=new Blob([n.buffer],{type:`application/octet-stream`}),r=URL.createObjectURL(e),i=document.createElement(`a`);i.href=r,i.download=t,i.click(),URL.revokeObjectURL(r)}}function B(e={}){return async(t,n)=>{if(await n(),t.response&&t.response.body&&typeof t.response.body==`object`&&`getReader`in t.response.body){let n=t.response.body.getReader(),r=[],i=0,a=parseInt(t.response.headers?.[`content-length`]||`0`,10);try{for(;;){let{done:o,value:s}=await n.read();if(o)break;r.push(s),i+=s.length,e.onChunk&&await e.onChunk(s),e.onProgress&&a>0&&e.onProgress(i,a),t.state.streamedChunks=t.state.streamedChunks||[],t.state.streamedChunks.push(s)}let o=R(r,i);t.response.body=o,t.state.streaming=!0,t.state.streamedBytes=i}finally{n.releaseLock()}}}}var V=B({onProgress:(e,t)=>{if(t>0){let n=Math.round(e/t*100);console.log(`⬇️ Streaming: ${n}% (${e}/${t} bytes)`)}}}),H=class{plugins=[];cache=new x;deduplicator=new w;middlewares=[];listeners=new Map;register(e){return this.plugins.push(e),e.setup(this),this.emit(`plugin:registered`,e.name),this}addMiddleware(e){return this.middlewares.push(e),this}getCache(){return this.cache}getDeduplicator(){return this.deduplicator}getPipeline(){return D(this.middlewares)}async executePipeline(e){await this.getPipeline()(e)}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e)?.add(t),this}emit(e,...t){let n=this.listeners.get(e);if(n)for(let e of n)e(...t)}off(e,t){return this.listeners.get(e)?.delete(t),this}getPlugins(){return[...this.plugins]}clear(){this.plugins=[],this.middlewares=[],this.listeners.clear(),this.cache.clear(),this.deduplicator.clear()}},U={name:`logger`,setup(e){e.on(`request:start`,(...e)=>{let t=e[0];console.log(`📤 Request started: ${t}`)}),e.on(`request:success`,(...e)=>{let t=e[0],n=e[1];console.log(`✅ Request succeeded: ${t} (${n})`)}),e.on(`request:error`,(...e)=>{let t=e[0],n=e[1];console.error(`❌ Request failed: ${t}`,n)})}},W=class{name=`metrics`;metrics={requests:0,errors:0,totalTime:0,avgTime:0};setup(e){e.on(`request:complete`,(...e)=>{let t=e[0],n=e[1];this.metrics.requests++,this.metrics.totalTime+=t,this.metrics.avgTime=this.metrics.totalTime/this.metrics.requests,n||this.metrics.errors++})}getMetrics(){return{...this.metrics}}},G=class{name=`cache`;ttlMs;constructor(e=6e4){this.ttlMs=e}setup(e){e.addMiddleware(S({ttlMs:this.ttlMs}))}},K=class{name=`dedupe`;setup(e){e.addMiddleware(T())}},q=class{store=new x;get(e){return this.store.get(e)}set(e,t,n=6e4){this.store.set(e,t,n)}has(e){return this.store.has(e)}clear(){this.store.clear()}},J=class{maxAttempts;baseDelayMs;constructor(e=3,t=100){this.maxAttempts=e,this.baseDelayMs=t}shouldRetry(e,t){let n=t.status!==void 0&&t.status>=500,r=t.code===`NETWORK_ERROR`;return e<this.maxAttempts&&(n||r||t.code===`TIMEOUT`)}delayMs(e){let t=this.baseDelayMs*2**(e-1),n=Math.random()*t*.1;return Math.min(t+n,3e4)}},Y=class{running=0;queue=[];maxConcurrent;constructor(e){this.maxConcurrent=e}async acquire(){if(this.running<this.maxConcurrent){this.running++;return}return new Promise(e=>{this.queue.push(()=>{this.running++,e()})})}release(){this.running--;let e=this.queue.shift();e&&e()}get pending(){return this.queue.length}get active(){return this.running}};function X(e){return e==null?{serialized:void 0,contentType:null}:typeof FormData<`u`&&e instanceof FormData?{serialized:e,contentType:null}:typeof URLSearchParams<`u`&&e instanceof URLSearchParams?{serialized:e,contentType:`application/x-www-form-urlencoded`}:typeof Blob<`u`&&e instanceof Blob?{serialized:e,contentType:e.type||`application/octet-stream`}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof ReadableStream<`u`&&e instanceof ReadableStream?{serialized:e,contentType:`application/octet-stream`}:typeof e==`string`?{serialized:e,contentType:`text/plain`}:{serialized:JSON.stringify(e),contentType:`application/json`}}function Z(e,t){return t?e.replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g,(e,n)=>{let r=t[n];if(r===void 0)throw Error(`Missing path parameter: :${n}`);return encodeURIComponent(String(r))}):e}var Q=class n{requestInterceptors=[];responseInterceptors=[];cache;config;requestQueue;pendingRequests=new Map;constructor(e={}){this.config={baseURL:e.baseURL??``,defaultHeaders:e.defaultHeaders??{"Content-Type":`application/json`},defaultTimeout:e.defaultTimeout??3e4,validateStatus:e.validateStatus??(e=>e>=200&&e<300),cacheStrategy:e.cacheStrategy??new q,maxConcurrent:e.maxConcurrent??0,defaultResponseType:e.defaultResponseType??`auto`,defaultHooks:e.defaultHooks??{}},this.cache=this.config.cacheStrategy,this.requestQueue=this.config.maxConcurrent>0?new Y(this.config.maxConcurrent):null}async request(n){let r={...this.config.defaultHooks,...n.hooks},i=this.getMaxAttempts(n.retry),a=this.getRetryStrategy(n.retry),o=Symbol(`request`);r.onStart?.(this.buildRequest(n)),this.requestQueue&&await this.requestQueue.acquire();try{for(let s=1;s<=i;s++)try{if((n.method===`GET`||!n.method)&&n.cache?.enabled){let t=this.getCacheKey(n),i=this.cache.get(t);if(i){let t=i;return r.onSuccess?.(t),r.onFinally?.(),e(t)}}let t=this.buildRequest(n);for(let e of this.requestInterceptors)t=await e.onRequest(t);let i=new AbortController;this.pendingRequests.set(o,i),n.signal&&n.signal.addEventListener(`abort`,()=>i.abort(),{once:!0});let a=performance.now(),s=await this.fetchWithTimeout(t,n.timeout??this.config.defaultTimeout,i),c=performance.now()-a,l=s;n.onDownloadProgress&&s.body&&(l=this.trackDownloadProgress(s,n.onDownloadProgress));let u=n.responseType??this.config.defaultResponseType,d=await this.parseResponse(l,t,c,u);if(!this.config.validateStatus(d.status))throw{message:`Request failed with status ${d.status}`,status:d.status,statusText:d.statusText,code:`HTTP_ERROR`};if(n.validate){let e=n.validate.validate(d.data);if(!e.ok)return e}n.transform&&(d.data=n.transform.transform(d.data));let f=d;for(let e of this.responseInterceptors)f=await e.onResponse(f);if((n.method===`GET`||!n.method)&&n.cache?.enabled){let e=this.getCacheKey(n);this.cache.set(e,f,n.cache.ttlMs)}return r.onSuccess?.(f),this.pendingRequests.delete(o),e(f)}catch(e){let n=this.isHttpErrorDetails(e)?e:this.normalizeError(e);if(s<i&&a.shouldRetry(s,n)){r.onRetry?.(s,n);let e=a.delayMs(s);await this.delay(e);continue}let c=n;for(let e of this.responseInterceptors)e.onError&&(c=await e.onError(c));return r.onError?.(c),this.pendingRequests.delete(o),t(c)}let s={message:`Max retries exceeded`,code:`MAX_RETRIES`};return r.onError?.(s),t(s)}finally{r.onFinally?.(),this.requestQueue&&this.requestQueue.release()}}get(e,t){return this.request({...t,url:e,method:`GET`})}post(e,t,n){return this.request({...n,url:e,method:`POST`,body:t})}put(e,t,n){return this.request({...n,url:e,method:`PUT`,body:t})}patch(e,t,n){return this.request({...n,url:e,method:`PATCH`,body:t})}delete(e,t){return this.request({...t,url:e,method:`DELETE`})}head(e,t){return this.request({...t,url:e,method:`HEAD`})}options(e,t){return this.request({...t,url:e,method:`OPTIONS`})}addRequestInterceptor(e){return this.requestInterceptors.push(e),()=>{let t=this.requestInterceptors.indexOf(e);t!==-1&&this.requestInterceptors.splice(t,1)}}addResponseInterceptor(e){return this.responseInterceptors.push(e),()=>{let t=this.responseInterceptors.indexOf(e);t!==-1&&this.responseInterceptors.splice(t,1)}}clearInterceptors(){this.requestInterceptors=[],this.responseInterceptors=[]}clearCache(){this.cache.clear()}cancelAll(){for(let e of this.pendingRequests.values())e.abort();this.pendingRequests.clear()}get activeRequests(){return this.pendingRequests.size}get queueStats(){return{active:this.requestQueue?.active??this.pendingRequests.size,pending:this.requestQueue?.pending??0}}extend(e={}){let t=new n({baseURL:e.baseURL??this.config.baseURL,defaultHeaders:{...this.config.defaultHeaders,...e.defaultHeaders},defaultTimeout:e.defaultTimeout??this.config.defaultTimeout,validateStatus:e.validateStatus??this.config.validateStatus,cacheStrategy:e.cacheStrategy??this.cache,maxConcurrent:e.maxConcurrent??this.config.maxConcurrent,defaultResponseType:e.defaultResponseType??this.config.defaultResponseType,defaultHooks:{...this.config.defaultHooks,...e.defaultHooks}});for(let e of this.requestInterceptors)t.addRequestInterceptor(e);for(let e of this.responseInterceptors)t.addResponseInterceptor(e);return t}async*paginate(e,t,n={}){let r={...n};for(;;){let n=await this.get(e,r);if(!n.ok)break;yield t.getItems(n.value.data);let i=t.getNextPage(n.value.data,r);if(!i)break;r=i}}async poll(e,n,r={}){let i=n.maxAttempts??0;for(let t=1;i===0||t<=i;t++){let a=await this.get(e,r);if(!a.ok||(n.onPoll?.(a.value.data,t),n.until(a.value.data)))return a;if(i>0&&t>=i)break;await this.delay(n.intervalMs)}return t({message:`Polling exhausted after ${i} attempts`,code:`POLL_EXHAUSTED`})}buildRequest(e){let t=Z(e.url,e.params);return{url:this.buildUrl(t,e.query),method:e.method??`GET`,headers:{...this.config.defaultHeaders,...e.headers},body:e.body,params:e.params}}buildUrl(e,t){let n=this.config.baseURL+e;if(t&&Object.keys(t).length>0){let e=new URLSearchParams;Object.entries(t).forEach(([t,n])=>{e.append(t,String(n))}),n+=`?${e.toString()}`}return n}getCacheKey(e){let t=Z(e.url,e.params),n=e.query?JSON.stringify(e.query):``;return`${e.method??`GET`}:${t}${n?`:`+n:``}`}fetchWithTimeout(e,t,n){let{serialized:r,contentType:i}=X(e.body),a={...e.headers};return i?a[`Content-Type`]=i:i===null&&r instanceof FormData&&delete a[`Content-Type`],new Promise((i,o)=>{let s=setTimeout(()=>{n.abort();let e=Error(`Request timed out`);e.name=`TimeoutError`,o(e)},t);fetch(e.url,{method:e.method,headers:a,body:r,signal:n.signal}).then(e=>{clearTimeout(s),i(e)},e=>{clearTimeout(s),o(e)})})}trackDownloadProgress(e,t){let n=parseInt(e.headers.get(`content-length`)||`0`,10),r=e.body?.getReader();if(!r)return e;let i=0,a=new ReadableStream({async pull(e){let{done:a,value:o}=await r.read();if(a){e.close();return}i+=o.byteLength,t({loaded:i,total:n,percent:n>0?Math.round(i/n*100):0}),e.enqueue(o)}});return new Response(a,{headers:e.headers,status:e.status,statusText:e.statusText})}async parseResponse(e,t,n,r){let i=await this.parseBody(e,r);return{status:e.status,statusText:e.statusText,headers:e.headers,data:i,request:t,duration:n}}async parseBody(e,t){switch(t){case`json`:return await e.json();case`text`:return await e.text();case`blob`:return await e.blob();case`arrayBuffer`:return await e.arrayBuffer();case`formData`:return await e.formData();case`stream`:return e.body;default:{let t=e.headers.get(`content-type`)??``;if(t.includes(`application/json`))return await e.json();if(t.includes(`text/`))return await e.text();if(t.includes(`multipart/form-data`))return await e.formData();if(t.includes(`application/octet-stream`)||t.includes(`image/`)||t.includes(`audio/`)||t.includes(`video/`))return await e.blob();try{return await e.json()}catch{return await e.text()}}}}normalizeError(e){return e instanceof Error&&e.name===`TimeoutError`?{message:`Request timed out`,code:`TIMEOUT`}:e instanceof DOMException&&e.name===`AbortError`?{message:`Request aborted`,code:`ABORTED`}:e instanceof Error?e.name===`AbortError`||e.message.includes(`abort`)?{message:`Request aborted`,code:`ABORTED`}:{message:e.message,code:e.name===`TypeError`?`NETWORK_ERROR`:`UNKNOWN_ERROR`,originalError:e}:{message:String(e),code:`UNKNOWN_ERROR`,originalError:e}}isHttpErrorDetails(e){return typeof e==`object`&&!!e&&`message`in e&&`code`in e}getMaxAttempts(e){return e?`maxAttempts`in e?e.maxAttempts:100:1}getRetryStrategy(e){return e?`shouldRetry`in e?e:new J(e.maxAttempts,e.backoffMs):{shouldRetry:()=>!1,delayMs:()=>0}}delay(e){return new Promise(t=>setTimeout(t,e))}},$=class extends Error{status;code;response;constructor(e,t,n,r){super(e),this.name=`HttpError`,this.status=t,this.code=n,this.response=r}};function ee(e){return e instanceof $}function te(e){return new Q(e)}exports.AggressiveRetry=d,exports.CachePlugin=G,exports.CacheStore=x,exports.CircuitBreakerRetry=p,exports.ConservativeRetry=f,exports.DedupePlugin=K,exports.Defer=I,exports.Err=t,exports.HttpClient=Q,exports.HttpError=$,exports.LoggerPlugin=U,exports.MetricsPlugin=W,exports.MiddlewarePipeline=O,exports.Ok=e,exports.PluginManager=H,exports.RequestDeduplicator=w,exports.TypedObservable=M,exports.cacheMiddleware=C,exports.createApiUrl=F,exports.createCacheMiddleware=S,exports.createDedupeMiddleware=T,exports.createHttpClient=te,exports.createPipeline=D,exports.createProjectionTransformer=l,exports.createRequiredFieldsValidator=r,exports.createSchemaValidator=n,exports.createStreamingMiddleware=B,exports.createTypeGuard=N,exports.createTypedApiClient=j,exports.createTypedRequest=A,exports.createTypedResponse=k,exports.createUrl=P,exports.createWrapperTransformer=u,exports.dedupeMiddleware=E,exports.handleStream=L,exports.isHttpError=ee,exports.retry=b,exports.streamToFile=z,exports.streamingMiddleware=V,exports.transformCamelToSnake=s,exports.transformFlatten=c,exports.transformSnakeToCamel=o,exports.validatorIsArray=i,exports.validatorIsObject=a,exports.withTimeout=y;
|