opik 1.9.32 → 1.9.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,21 +1,21 @@
1
- 'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),Cd=require('fs'),Uf=require('ini');require('dotenv/config');var Rw=require('qs'),uuid=require('uuid'),Zb=require('fast-json-stable-stringify'),Yb=require('xxhash-wasm'),util=require('util'),ax=require('mustache'),nx=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),cx=require('fast-deep-equal'),async_hooks=require('async_hooks'),Qi=require('chalk'),Rx=require('boxen'),yx=require('ora'),ai$1=require('ai'),openai=require('@ai-sdk/openai'),anthropic=require('@ai-sdk/anthropic'),google=require('@ai-sdk/google'),zod=require('zod');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Cd__default=/*#__PURE__*/_interopDefault(Cd);var Uf__default=/*#__PURE__*/_interopDefault(Uf);var Rw__default=/*#__PURE__*/_interopDefault(Rw);var Zb__default=/*#__PURE__*/_interopDefault(Zb);var Yb__default=/*#__PURE__*/_interopDefault(Yb);var ax__default=/*#__PURE__*/_interopDefault(ax);var nx__default=/*#__PURE__*/_interopDefault(nx);var cx__default=/*#__PURE__*/_interopDefault(cx);var Qi__default=/*#__PURE__*/_interopDefault(Qi);var Rx__default=/*#__PURE__*/_interopDefault(Rx);var yx__default=/*#__PURE__*/_interopDefault(yx);var vd=Object.create;var Ze=Object.defineProperty;var zd=Object.getOwnPropertyDescriptor;var yf=Object.getOwnPropertyNames;var kf=Object.getPrototypeOf,vf=Object.prototype.hasOwnProperty;var Sd=(i,a)=>(a=Symbol[i])?a:Symbol.for("Symbol."+i),hr=i=>{throw TypeError(i)};var zf=(i,a,e)=>a in i?Ze(i,a,{enumerable:true,configurable:true,writable:true,value:e}):i[a]=e;var me=(i=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(i,{get:(a,e)=>(typeof require!="undefined"?require:a)[e]}):i)(function(i){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var pn=(i,a)=>()=>(i&&(a=i(i=0)),a);var Y=(i,a)=>()=>(a||i((a={exports:{}}).exports,a),a.exports),E=(i,a)=>{for(var e in a)Ze(i,e,{get:a[e],enumerable:true});},Sf=(i,a,e,o)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of yf(a))!vf.call(i,t)&&t!==e&&Ze(i,t,{get:()=>a[t],enumerable:!(o=zd(a,t))||o.enumerable});return i};var _f=(i,a,e)=>(e=i!=null?vd(kf(i)):{},Sf(Ze(e,"default",{value:i,enumerable:true}),i));var _d=i=>{var a;return [,,,vd((a=void 0)!=null?a:null)]},Td=["class","method","getter","setter","accessor","field","value","get","set"],fr=i=>i!==void 0&&typeof i!="function"?hr("Function expected"):i,Tf=(i,a,e,o,t)=>({kind:Td[i],name:a,metadata:o,addInitializer:n=>e._?hr("Already initialized"):t.push(fr(n||null))}),cn=(i,a)=>zf(a,Sd("metadata"),i[3]),Ad=(i,a,e,o)=>{for(var t=0,n=i[a>>1],c=n&&n.length;t<c;t++)n[t].call(e);return o},Ed=(i,a,e,o,t,n)=>{var m,u,g,R,y=a&7,v=false,z=false,S=2,O=Td[y+5],G=i[S]||(i[S]=[]),oe=((t=t.prototype),zd(t,e));for(var Ye=o.length-1;Ye>=0;Ye--)g=Tf(y,e,u={},i[3],G),(g.static=v,g.private=z,R=g.access={has:ne=>e in ne},(R.get=ne=>ne[e]),y>2),m=(0, o[Ye])(oe[O],g),u._=1,fr(m)&&(oe[O]=m);return oe&&Ze(t,e,oe),t};var su={};E(su,{Node18UniversalStreamWrapper:()=>An});var An,pu=pn(()=>{An=class i{constructor(a){this.readableStream=a,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(a,e){var o;(o=this.events[a])==null||o.push(e);}off(a,e){var o;this.events[a]=(o=this.events[a])==null?void 0:o.filter(t=>t!==e);}pipe(a){return this.on("data",async e=>{if(a instanceof i)a._write(e);else if(a instanceof WritableStream){let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}else a.write(e);}),this.on("end",async()=>{a instanceof i?a._end():a instanceof WritableStream?a.getWriter().close():a.end();}),this.on("error",async e=>{a instanceof i?a._error(e):a instanceof WritableStream?a.getWriter().abort(e):a.destroy(e);}),this._startReading(),a}pipeTo(a){return this.pipe(a)}unpipe(a){this.off("data",async e=>{if(a instanceof i)a._write(e);else if(a instanceof WritableStream){let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}else a.write(e);}),this.off("end",async()=>{a instanceof i?a._end():a instanceof WritableStream?a.getWriter().close():a.end();}),this.off("error",async e=>{a instanceof i?a._error(e):a instanceof WritableStream?a.getWriter().abort(e):a.destroy(e);});}destroy(a){this.reader.cancel(a).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(!a)return e}setEncoding(a){this.encoding=a;}async text(){let a=[];for(;;){let{done:o,value:t}=await this.reader.read();if(o)break;t&&a.push(t);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(a).arrayBuffer())}async json(){let a=await this.text();return JSON.parse(a)}_write(a){this._emit("data",a);}_end(){this._emit("end");}_error(a){this._emit("error",a);}_emit(a,e){if(this.events[a])for(let o of this.events[a]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(a){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(a){this._emit("error",a);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();return a?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var cu={};E(cu,{UndiciStreamWrapper:()=>En});var En,lu=pn(()=>{En=class i{constructor(a){this.readableStream=a,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(a,e){var o;(o=this.events[a])==null||o.push(e);}off(a,e){var o;this.events[a]=(o=this.events[a])==null?void 0:o.filter(t=>t!==e);}pipe(a){return this.on("data",e=>{if(a instanceof i)a._write(e);else {let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.on("end",()=>{a instanceof i?a._end():a.getWriter().close();}),this.on("error",e=>{a instanceof i?a._error(e):a.getWriter().abort(e);}),this._startReading(),a}pipeTo(a){return this.pipe(a)}unpipe(a){this.off("data",e=>{if(a instanceof i)a._write(e);else {let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.off("end",()=>{a instanceof i?a._end():a.getWriter().close();}),this.off("error",e=>{a instanceof i?a._error(e):a.getWriter().abort(e);});}destroy(a){this.reader.cancel(a).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(!a)return e}setEncoding(a){this.encoding=a;}async text(){let a=[];for(;;){let{done:o,value:t}=await this.reader.read();if(o)break;t&&a.push(t);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(a).arrayBuffer())}async json(){let a=await this.text();return JSON.parse(a)}_write(a){this._emit("data",a);}_end(){this._emit("end");}_error(a){this._emit("error",a);}_emit(a,e){if(this.events[a])for(let o of this.events[a]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(a){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(a){this._emit("error",a);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();return a?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var mu={};E(mu,{NodePre18StreamWrapper:()=>Pn});var Pn,du=pn(()=>{Pn=class{constructor(a){this.readableStream=a;}on(a,e){this.readableStream.on(a,e);}off(a,e){this.readableStream.off(a,e);}pipe(a){return this.readableStream.pipe(a),a}pipeTo(a){return this.pipe(a)}unpipe(a){a?this.readableStream.unpipe(a):this.readableStream.unpipe();}destroy(a){this.readableStream.destroy(a);}pause(){this.readableStream.pause();}resume(){this.readableStream.resume();}get isPaused(){return this.readableStream.isPaused()}async read(){return new Promise((a,e)=>{let o=this.readableStream.read();o?a(o):(this.readableStream.once("readable",()=>{let t=this.readableStream.read();a(t);}),this.readableStream.once("error",e));})}setEncoding(a){this.readableStream.setEncoding(a),this.encoding=a;}async text(){let a=[],e=new TextEncoder;this.readableStream.setEncoding(this.encoding||"utf-8");for await(let t of this.readableStream)a.push(e.encode(t));return new TextDecoder(this.encoding||"utf-8").decode(Buffer.concat(a))}async json(){let a=await this.text();return JSON.parse(a)}[Symbol.asyncIterator](){let e=this.readableStream[Symbol.asyncIterator]();return {async next(){let{value:o,done:t}=await e.next();return {value:o,done:t}},[Symbol.asyncIterator](){return this}}}};});var yu=Y((qj,Ru)=>{var xu=me("stream").Stream,Sw=me("util");Ru.exports=fe;function fe(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=true,this._maxDataSizeExceeded=false,this._released=false,this._bufferedEvents=[];}Sw.inherits(fe,xu);fe.create=function(i,a){var e=new this;a=a||{};for(var o in a)e[o]=a[o];e.source=i;var t=i.emit;return i.emit=function(){return e._handleEmit(arguments),t.apply(i,arguments)},i.on("error",function(){}),e.pauseStream&&i.pause(),e};Object.defineProperty(fe.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});fe.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};fe.prototype.resume=function(){this._released||this.release(),this.source.resume();};fe.prototype.pause=function(){this.source.pause();};fe.prototype.release=function(){this._released=true,this._bufferedEvents.forEach(function(i){this.emit.apply(this,i);}.bind(this)),this._bufferedEvents=[];};fe.prototype.pipe=function(){var i=xu.prototype.pipe.apply(this,arguments);return this.resume(),i};fe.prototype._handleEmit=function(i){if(this._released){this.emit.apply(this,i);return}i[0]==="data"&&(this.dataSize+=i[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(i);};fe.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=true;var i="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(i));}};});var Su=Y((eI,zu)=>{var _w=me("util"),vu=me("stream").Stream,ku=yu();zu.exports=V;function V(){this.writable=false,this.readable=true,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=true,this._released=false,this._streams=[],this._currentStream=null,this._insideLoop=false,this._pendingNext=false;}_w.inherits(V,vu);V.create=function(i){var a=new this;i=i||{};for(var e in i)a[e]=i[e];return a};V.isStreamLike=function(i){return typeof i!="function"&&typeof i!="string"&&typeof i!="boolean"&&typeof i!="number"&&!Buffer.isBuffer(i)};V.prototype.append=function(i){var a=V.isStreamLike(i);if(a){if(!(i instanceof ku)){var e=ku.create(i,{maxDataSize:1/0,pauseStream:this.pauseStreams});i.on("data",this._checkDataSize.bind(this)),i=e;}this._handleErrors(i),this.pauseStreams&&i.pause();}return this._streams.push(i),this};V.prototype.pipe=function(i,a){return vu.prototype.pipe.call(this,i,a),this.resume(),i};V.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=false;}};V.prototype._realGetNext=function(){var i=this._streams.shift();if(typeof i=="undefined"){this.end();return}if(typeof i!="function"){this._pipeNext(i);return}var a=i;a(function(e){var o=V.isStreamLike(e);o&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e);}.bind(this));};V.prototype._pipeNext=function(i){this._currentStream=i;var a=V.isStreamLike(i);if(a){i.on("end",this._getNext.bind(this)),i.pipe(this,{end:false});return}var e=i;this.write(e),this._getNext();};V.prototype._handleErrors=function(i){var a=this;i.on("error",function(e){a._emitError(e);});};V.prototype.write=function(i){this.emit("data",i);};V.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"));};V.prototype.resume=function(){this._released||(this._released=true,this.writable=true,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume");};V.prototype.end=function(){this._reset(),this.emit("end");};V.prototype.destroy=function(){this._reset(),this.emit("close");};V.prototype._reset=function(){this.writable=false,this._streams=[],this._currentStream=null;};V.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var i="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(i));}};V.prototype._updateDataSize=function(){this.dataSize=0;var i=this;this._streams.forEach(function(a){a.dataSize&&(i.dataSize+=a.dataSize);}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize);};V.prototype._emitError=function(i){this._reset(),this.emit("error",i);};});var _u=Y((rI,Tw)=>{Tw.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/3gpp-ims+xml":{source:"iana",compressible:true},"application/3gpphal+json":{source:"iana",compressible:true},"application/3gpphalforms+json":{source:"iana",compressible:true},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:true},"application/alto-costmap+json":{source:"iana",compressible:true},"application/alto-costmapfilter+json":{source:"iana",compressible:true},"application/alto-directory+json":{source:"iana",compressible:true},"application/alto-endpointcost+json":{source:"iana",compressible:true},"application/alto-endpointcostparams+json":{source:"iana",compressible:true},"application/alto-endpointprop+json":{source:"iana",compressible:true},"application/alto-endpointpropparams+json":{source:"iana",compressible:true},"application/alto-error+json":{source:"iana",compressible:true},"application/alto-networkmap+json":{source:"iana",compressible:true},"application/alto-networkmapfilter+json":{source:"iana",compressible:true},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:true},"application/alto-updatestreamparams+json":{source:"iana",compressible:true},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:true,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:true,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:true,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:true,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:true,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:true,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:true},"application/atsc-rsat+xml":{source:"iana",compressible:true,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:true},"application/bacnet-xdd+zip":{source:"iana",compressible:false},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:false,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/calendar+json":{source:"iana",compressible:true},"application/calendar+xml":{source:"iana",compressible:true,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:true},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:true},"application/ccxml+xml":{source:"iana",compressible:true,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:true,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:true},"application/cellml+xml":{source:"iana",compressible:true},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:true},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:true},"application/clue_info+xml":{source:"iana",compressible:true},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:true},"application/coap-group+json":{source:"iana",compressible:true},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:true},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:true,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:true},"application/cstadata+xml":{source:"iana",compressible:true},"application/csvm+json":{source:"iana",compressible:true},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:true},"application/dash+xml":{source:"iana",compressible:true,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:true,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:true,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:true},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:true},"application/dicom+xml":{source:"iana",compressible:true},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:true},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:true,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:true},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:true,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:true,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:false},"application/edifact":{source:"iana",compressible:false},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:true},"application/elm+xml":{source:"iana",compressible:true},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/emergencycalldata.comment+xml":{source:"iana",compressible:true},"application/emergencycalldata.control+xml":{source:"iana",compressible:true},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.veds+xml":{source:"iana",compressible:true},"application/emma+xml":{source:"iana",compressible:true,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:true,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:true},"application/epub+zip":{source:"iana",compressible:false,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:true},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:true,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:true},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/fido.trusted-apps+json":{compressible:true},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:false},"application/framework-attributes+xml":{source:"iana",compressible:true},"application/geo+json":{source:"iana",compressible:true,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:true},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:true,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:true,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:false,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:true},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:true},"application/ibe-pkg-reply+xml":{source:"iana",compressible:true},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:true,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:true,extensions:["its"]},"application/java-archive":{source:"apache",compressible:false,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:false,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:false,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:true,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:true},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:true},"application/jrd+json":{source:"iana",compressible:true},"application/jscalendar+json":{source:"iana",compressible:true},"application/json":{source:"iana",charset:"UTF-8",compressible:true,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:true},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:true,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:true},"application/jwk-set+json":{source:"iana",compressible:true},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:true},"application/kpml-response+xml":{source:"iana",compressible:true},"application/ld+json":{source:"iana",compressible:true,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:true,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:true},"application/lost+xml":{source:"iana",compressible:true,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:true},"application/lpf+zip":{source:"iana",compressible:false},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:true,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:true,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:true,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:true,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:true},"application/mathml-presentation+xml":{source:"iana",compressible:true},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:true},"application/mbms-deregister+xml":{source:"iana",compressible:true},"application/mbms-envelope+xml":{source:"iana",compressible:true},"application/mbms-msk+xml":{source:"iana",compressible:true},"application/mbms-msk-response+xml":{source:"iana",compressible:true},"application/mbms-protection-description+xml":{source:"iana",compressible:true},"application/mbms-reception-report+xml":{source:"iana",compressible:true},"application/mbms-register+xml":{source:"iana",compressible:true},"application/mbms-register-response+xml":{source:"iana",compressible:true},"application/mbms-schedule+xml":{source:"iana",compressible:true},"application/mbms-user-service-description+xml":{source:"iana",compressible:true},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:true,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:true},"application/mediaservercontrol+xml":{source:"iana",compressible:true,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:true},"application/metalink+xml":{source:"apache",compressible:true,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:true,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:true,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:true,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:true,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:true,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:true},"application/mrb-publish+xml":{source:"iana",compressible:true},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/msword":{source:"iana",compressible:false,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:true},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:true},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:false,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:true},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:true,extensions:["opf"]},"application/ogg":{source:"iana",compressible:false,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:true,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:true},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:false},"application/p2p-overlay+xml":{source:"iana",compressible:true,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:true,extensions:["xer"]},"application/pdf":{source:"iana",compressible:false,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:false,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:true,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/postscript":{source:"iana",compressible:true,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:true},"application/problem+json":{source:"iana",compressible:true},"application/problem+xml":{source:"iana",compressible:true},"application/provenance+xml":{source:"iana",compressible:true,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:false},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:true},"application/pskc+xml":{source:"iana",compressible:true,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:true},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:true,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:true},"application/rdf+xml":{source:"iana",compressible:true,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:true,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:true},"application/resource-lists+xml":{source:"iana",compressible:true,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:true,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:true},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:true},"application/rls-services+xml":{source:"iana",compressible:true,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:true,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:true,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:true,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:true,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:true,extensions:["rss"]},"application/rtf":{source:"iana",compressible:true,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:true},"application/samlmetadata+xml":{source:"iana",compressible:true},"application/sarif+json":{source:"iana",compressible:true},"application/sarif-external-properties+json":{source:"iana",compressible:true},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:true,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:true},"application/scim+json":{source:"iana",compressible:true},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:true},"application/senml+xml":{source:"iana",compressible:true,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:true},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:true},"application/sensml+xml":{source:"iana",compressible:true,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:true},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:true,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:true},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:true,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:true},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:true,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:true},"application/spirits-event+xml":{source:"iana",compressible:true},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:true,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:true,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:true,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:true,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:true},"application/swid+xml":{source:"iana",compressible:true,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:true},"application/taxii+json":{source:"iana",compressible:true},"application/td+json":{source:"iana",compressible:true},"application/tei+xml":{source:"iana",compressible:true,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:true,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:true},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:true,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:true,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:false,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:true},"application/urc-ressheet+xml":{source:"iana",compressible:true,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:true,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:true},"application/vcard+json":{source:"iana",compressible:true},"application/vcard+xml":{source:"iana",compressible:true},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:true,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:true},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:true},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:true},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:true},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:true},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:true},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:true},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:true},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:true},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:true},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:false,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:true,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:true},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:true},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:false,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:true},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:true},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:true},"application/vnd.apple.installer+xml":{source:"iana",compressible:true,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:false,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:true},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:true},"application/vnd.avistar+xml":{source:"iana",compressible:true},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:true,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:true},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:true},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:true},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:true},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:true},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:true,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:true,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:true},"application/vnd.collection.doc+json":{source:"iana",compressible:true},"application/vnd.collection.next+json":{source:"iana",compressible:true},"application/vnd.comicbook+zip":{source:"iana",compressible:false},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:true},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:true,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:true},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:true},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:true},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:true},"application/vnd.cyclonedx+xml":{source:"iana",compressible:true},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:false},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:true,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:true},"application/vnd.dataresource+json":{source:"iana",compressible:true},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:true,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:true},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:true},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:true},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:true},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:true},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:true},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:true},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:true},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:false},"application/vnd.eszigno3+xml":{source:"iana",compressible:true,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:true},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:false},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:false},"application/vnd.etsi.cug+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:true},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:true},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:true},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:true},"application/vnd.etsi.sci+xml":{source:"iana",compressible:true},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:true},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:true},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:true},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:false},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:false},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:false},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:true},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:true},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:true},"application/vnd.geo+json":{source:"iana",compressible:true},"application/vnd.geocube+xml":{source:"iana",compressible:true},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:false,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:false,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:false,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:true,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:false,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:true},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:false},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:true},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:true},"application/vnd.hal+xml":{source:"iana",compressible:true,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:true,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:true},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:true},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:true},"application/vnd.hyper-item+json":{source:"iana",compressible:true},"application/vnd.hyperdrive+json":{source:"iana",compressible:true},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:false},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:false},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:true},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:true},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:true},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:true},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:true,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:false},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:true},"application/vnd.las.las+xml":{source:"iana",compressible:true,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:true},"application/vnd.liberty-request+xml":{source:"iana",compressible:true},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:true,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:false},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:true},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:false},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:true},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:true},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:true,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:false,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:true,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:true},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:true},"application/vnd.ms-outlook":{compressible:false,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:true},"application/vnd.ms-powerpoint":{source:"iana",compressible:false,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:true},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:true},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:true},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:false,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:true},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:true},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:true},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:true},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:true},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:true},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:true,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:true},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:false,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:false,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:false,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:false,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:true},"application/vnd.oftn.l10n+json":{source:"iana",compressible:true},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:true},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:true},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:true},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:true},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:true},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:true},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:true},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:true},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:true},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:true},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:true,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:true},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:true},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:true},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:true},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:true},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:true},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:true,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:true,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:false,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:false,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:false,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:true},"application/vnd.oracle.resource+json":{source:"iana",compressible:true},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:true},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:true},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:true},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:true},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:true},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:true,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:true},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:true,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:true},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:true},"application/vnd.shopkick+json":{source:"iana",compressible:true},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:true},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:true,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:true,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:true,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:true},"application/vnd.syft+json":{source:"iana",compressible:true},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:true},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:true},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:true},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:true,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:true},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:true},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:true},"application/vnd.wv.ssp+xml":{source:"iana",compressible:true},"application/vnd.xacml+json":{source:"iana",compressible:true},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:true},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:true,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:true,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:true,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:true},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:true,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:true,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:true},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:true,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:true,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:false,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:false,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:false,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:false,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:false,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:false},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:true,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:true,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:true,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:false,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:true,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:false,extensions:["jnlp"]},"application/x-javascript":{compressible:true},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:false,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:false},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:true,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:false,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:false,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:true,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:false,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:false,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:true,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:true,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:true,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:true,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:true,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:false,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:true,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:true,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:true,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:true,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:true},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:true,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:false,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:true},"application/xaml+xml":{source:"apache",compressible:true,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:true,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:true,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:true,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:true,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:true},"application/xcap-ns+xml":{source:"iana",compressible:true,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:true},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:true},"application/xenc+xml":{source:"iana",compressible:true,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:true,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:true},"application/xliff+xml":{source:"iana",compressible:true,extensions:["xlf"]},"application/xml":{source:"iana",compressible:true,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:true,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:true},"application/xmpp+xml":{source:"iana",compressible:true},"application/xop+xml":{source:"iana",compressible:true,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:true,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:true,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:true,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:true,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:true},"application/yang-data+xml":{source:"iana",compressible:true},"application/yang-patch+json":{source:"iana",compressible:true},"application/yang-patch+xml":{source:"iana",compressible:true},"application/yin+xml":{source:"iana",compressible:true,extensions:["yin"]},"application/zip":{source:"iana",compressible:false,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:false,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:false,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:false},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:false,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:false,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:false,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:false,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:false},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:false},"audio/vorbis":{source:"iana",compressible:false},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:false,extensions:["wav"]},"audio/wave":{compressible:false,extensions:["wav"]},"audio/webm":{source:"apache",compressible:false,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:false,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:false,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:true,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:true,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:false,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:false,extensions:["avif"]},"image/bmp":{source:"iana",compressible:true,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:false,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:false,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:false,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:false,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:false,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:false},"image/png":{source:"iana",compressible:false,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:true,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:false,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:true,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:true,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:true,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:true,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:true,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:false},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:false},"message/imdn+xml":{source:"iana",compressible:true},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:false},"message/rfc822":{source:"iana",compressible:true,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:true,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:true,extensions:["glb"]},"model/iges":{source:"iana",compressible:false,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:false,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:true,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:false,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:false,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:true,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:true},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:false,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:false,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:false,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:false,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:true,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:false},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:false},"multipart/form-data":{source:"iana",compressible:false},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:false},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:false},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:true,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:true},"text/cmd":{compressible:true},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:true,extensions:["css"]},"text/csv":{source:"iana",compressible:true,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:true,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:true},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:true,extensions:["jsx"]},"text/less":{compressible:true,extensions:["less"]},"text/markdown":{source:"iana",compressible:true,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:true,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:true,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:true,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:true,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:true,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:true,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:true,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:true,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:true,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:true},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:true},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:true,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:true,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:true,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:true,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:true,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:true,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:false,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:false,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:false,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:false,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:false,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:false,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:false,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:false,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:true},"x-shader/x-vertex":{compressible:true}};});var Au=Y((oI,Tu)=>{Tu.exports=_u();});var Cu=Y(ae=>{var Qa=Au(),Aw=me("path").extname,Eu=/^\s*([^;\s]*)(?:;|\s|$)/,Ew=/^text\//i;ae.charset=Pu;ae.charsets={lookup:Pu};ae.contentType=Pw;ae.extension=Cw;ae.extensions=Object.create(null);ae.lookup=jw;ae.types=Object.create(null);Iw(ae.extensions,ae.types);function Pu(i){if(!i||typeof i!="string")return false;var a=Eu.exec(i),e=a&&Qa[a[1].toLowerCase()];return e&&e.charset?e.charset:a&&Ew.test(a[1])?"UTF-8":false}function Pw(i){if(!i||typeof i!="string")return false;var a=i.indexOf("/")===-1?ae.lookup(i):i;if(!a)return false;if(a.indexOf("charset")===-1){var e=ae.charset(a);e&&(a+="; charset="+e.toLowerCase());}return a}function Cw(i){if(!i||typeof i!="string")return false;var a=Eu.exec(i),e=a&&ae.extensions[a[1].toLowerCase()];return !e||!e.length?false:e[0]}function jw(i){if(!i||typeof i!="string")return false;var a=Aw("x."+i).toLowerCase().substr(1);return a&&ae.types[a]||false}function Iw(i,a){var e=["nginx","apache",void 0,"iana"];Object.keys(Qa).forEach(function(t){var n=Qa[t],c=n.extensions;if(!(!c||!c.length)){i[t]=c;for(var m=0;m<c.length;m++){var u=c[m];if(a[u]){var g=e.indexOf(Qa[a[u]].source),R=e.indexOf(n.source);if(a[u]!=="application/octet-stream"&&(g>R||g===R&&a[u].substr(0,12)==="application/"))continue}a[u]=t;}}});}});var Iu=Y((tI,ju)=>{ju.exports=Uw;function Uw(i){var a=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;a?a(i):setTimeout(i,0);}});var Cn=Y((iI,Du)=>{var Uu=Iu();Du.exports=Dw;function Dw(i){var a=false;return Uu(function(){a=true;}),function(o,t){a?i(o,t):Uu(function(){i(o,t);});}}});var jn=Y((nI,Nu)=>{Nu.exports=Nw;function Nw(i){Object.keys(i.jobs).forEach(Mw.bind(i)),i.jobs={};}function Mw(i){typeof this.jobs[i]=="function"&&this.jobs[i]();}});var In=Y((sI,Fu)=>{var Mu=Cn(),Fw=jn();Fu.exports=Ow;function Ow(i,a,e,o){var t=e.keyedList?e.keyedList[e.index]:e.index;e.jobs[t]=Ww(a,t,i[t],function(n,c){t in e.jobs&&(delete e.jobs[t],n?Fw(e):e.results[t]=c,o(n,e.results));});}function Ww(i,a,e,o){var t;return i.length==2?t=i(e,Mu(o)):t=i(e,a,Mu(o)),t}});var Un=Y((pI,Ou)=>{Ou.exports=Bw;function Bw(i,a){var e=!Array.isArray(i),o={index:0,keyedList:e||a?Object.keys(i):null,jobs:{},results:e?{}:[],size:e?Object.keys(i).length:i.length};return a&&o.keyedList.sort(e?a:function(t,n){return a(i[t],i[n])}),o}});var Dn=Y((cI,Wu)=>{var Lw=jn(),Vw=Cn();Wu.exports=Hw;function Hw(i){Object.keys(this.jobs).length&&(this.index=this.size,Lw(this),Vw(i)(null,this.results));}});var Lu=Y((lI,Bu)=>{var Jw=In(),Kw=Un(),Xw=Dn();Bu.exports=Gw;function Gw(i,a,e){for(var o=Kw(i);o.index<(o.keyedList||i).length;)Jw(i,a,o,function(t,n){if(t){e(t,n);return}if(Object.keys(o.jobs).length===0){e(null,o.results);return}}),o.index++;return Xw.bind(o,e)}});var Nn=Y((mI,Ya)=>{var Vu=In(),$w=Un(),Qw=Dn();Ya.exports=Yw;Ya.exports.ascending=Hu;Ya.exports.descending=Zw;function Yw(i,a,e,o){var t=$w(i,e);return Vu(i,a,t,function n(c,m){if(c){o(c,m);return}if(t.index++,t.index<(t.keyedList||i).length){Vu(i,a,t,n);return}o(null,t.results);}),Qw.bind(t,o)}function Hu(i,a){return i<a?-1:i>a?1:0}function Zw(i,a){return -1*Hu(i,a)}});var Ku=Y((dI,Ju)=>{var qw=Nn();Ju.exports=eb;function eb(i,a,e){return qw(i,a,null,e)}});var Gu=Y((uI,Xu)=>{Xu.exports={parallel:Lu(),serial:Ku(),serialOrdered:Nn()};});var Qu=Y((gI,$u)=>{$u.exports=function(i,a){return Object.keys(a).forEach(function(e){i[e]=i[e]||a[e];}),i};});var Zu=Y((fI,Yu)=>{var Wn=Su(),rb=me("util"),Mn=me("path"),ob=me("http"),ab=me("https"),tb=me("url").parse,ib=me("fs"),nb=me("stream").Stream,Fn=Cu(),sb=Gu(),On=Qu();Yu.exports=P;rb.inherits(P,Wn);function P(i){if(!(this instanceof P))return new P(i);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Wn.call(this),i=i||{};for(var a in i)this[a]=i[a];}P.LINE_BREAK=`\r
2
- `;P.DEFAULT_CONTENT_TYPE="application/octet-stream";P.prototype.append=function(i,a,e){e=e||{},typeof e=="string"&&(e={filename:e});var o=Wn.prototype.append.bind(this);if(typeof a=="number"&&(a=""+a),Array.isArray(a)){this._error(new Error("Arrays are not supported."));return}var t=this._multiPartHeader(i,a,e),n=this._multiPartFooter();o(t),o(a),o(n),this._trackLength(t,a,e);};P.prototype._trackLength=function(i,a,e){var o=0;e.knownLength!=null?o+=+e.knownLength:Buffer.isBuffer(a)?o=a.length:typeof a=="string"&&(o=Buffer.byteLength(a)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(i)+P.LINE_BREAK.length,!(!a||!a.path&&!(a.readable&&a.hasOwnProperty("httpVersion"))&&!(a instanceof nb))&&(e.knownLength||this._valuesToMeasure.push(a));};P.prototype._lengthRetriever=function(i,a){i.hasOwnProperty("fd")?i.end!=null&&i.end!=1/0&&i.start!=null?a(null,i.end+1-(i.start?i.start:0)):ib.stat(i.path,function(e,o){var t;if(e){a(e);return}t=o.size-(i.start?i.start:0),a(null,t);}):i.hasOwnProperty("httpVersion")?a(null,+i.headers["content-length"]):i.hasOwnProperty("httpModule")?(i.on("response",function(e){i.pause(),a(null,+e.headers["content-length"]);}),i.resume()):a("Unknown stream");};P.prototype._multiPartHeader=function(i,a,e){if(typeof e.header=="string")return e.header;var o=this._getContentDisposition(a,e),t=this._getContentType(a,e),n="",c={"Content-Disposition":["form-data",'name="'+i+'"'].concat(o||[]),"Content-Type":[].concat(t||[])};typeof e.header=="object"&&On(c,e.header);var m;for(var u in c)c.hasOwnProperty(u)&&(m=c[u],m!=null&&(Array.isArray(m)||(m=[m]),m.length&&(n+=u+": "+m.join("; ")+P.LINE_BREAK)));return "--"+this.getBoundary()+P.LINE_BREAK+n+P.LINE_BREAK};P.prototype._getContentDisposition=function(i,a){var e,o;return typeof a.filepath=="string"?e=Mn.normalize(a.filepath).replace(/\\/g,"/"):a.filename||i.name||i.path?e=Mn.basename(a.filename||i.name||i.path):i.readable&&i.hasOwnProperty("httpVersion")&&(e=Mn.basename(i.client._httpMessage.path||"")),e&&(o='filename="'+e+'"'),o};P.prototype._getContentType=function(i,a){var e=a.contentType;return !e&&i.name&&(e=Fn.lookup(i.name)),!e&&i.path&&(e=Fn.lookup(i.path)),!e&&i.readable&&i.hasOwnProperty("httpVersion")&&(e=i.headers["content-type"]),!e&&(a.filepath||a.filename)&&(e=Fn.lookup(a.filepath||a.filename)),!e&&typeof i=="object"&&(e=P.DEFAULT_CONTENT_TYPE),e};P.prototype._multiPartFooter=function(){return function(i){var a=P.LINE_BREAK,e=this._streams.length===0;e&&(a+=this._lastBoundary()),i(a);}.bind(this)};P.prototype._lastBoundary=function(){return "--"+this.getBoundary()+"--"+P.LINE_BREAK};P.prototype.getHeaders=function(i){var a,e={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(a in i)i.hasOwnProperty(a)&&(e[a.toLowerCase()]=i[a]);return e};P.prototype.setBoundary=function(i){this._boundary=i;};P.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};P.prototype.getBuffer=function(){for(var i=new Buffer.alloc(0),a=this.getBoundary(),e=0,o=this._streams.length;e<o;e++)typeof this._streams[e]!="function"&&(Buffer.isBuffer(this._streams[e])?i=Buffer.concat([i,this._streams[e]]):i=Buffer.concat([i,Buffer.from(this._streams[e])]),(typeof this._streams[e]!="string"||this._streams[e].substring(2,a.length+2)!==a)&&(i=Buffer.concat([i,Buffer.from(P.LINE_BREAK)])));return Buffer.concat([i,Buffer.from(this._lastBoundary())])};P.prototype._generateBoundary=function(){for(var i="--------------------------",a=0;a<24;a++)i+=Math.floor(Math.random()*10).toString(16);this._boundary=i;};P.prototype.getLengthSync=function(){var i=this._overheadLength+this._valueLength;return this._streams.length&&(i+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),i};P.prototype.hasKnownLength=function(){var i=true;return this._valuesToMeasure.length&&(i=false),i};P.prototype.getLength=function(i){var a=this._overheadLength+this._valueLength;if(this._streams.length&&(a+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(i.bind(this,null,a));return}sb.parallel(this._valuesToMeasure,this._lengthRetriever,function(e,o){if(e){i(e);return}o.forEach(function(t){a+=t;}),i(null,a);});};P.prototype.submit=function(i,a){var e,o,t={method:"post"};return typeof i=="string"?(i=tb(i),o=On({port:i.port,path:i.pathname,host:i.hostname,protocol:i.protocol},t)):(o=On(i,t),o.port||(o.port=o.protocol=="https:"?443:80)),o.headers=this.getHeaders(i.headers),o.protocol=="https:"?e=ab.request(o):e=ob.request(o),this.getLength(function(n,c){if(n&&n!=="Unknown stream"){this._error(n);return}if(c&&e.setHeader("Content-Length",c),this.pipe(e),a){var m,u=function(g,R){return e.removeListener("error",u),e.removeListener("response",m),a.call(this,g,R)};m=u.bind(this,null),e.on("error",u),e.on("response",m);}}.bind(this)),e};P.prototype._error=function(i){this.error||(this.error=i,this.pause(),this.emit("error",i));};P.prototype.toString=function(){return "[object FormData]"};});var jf={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};function Na(i,a=i){return ansiEscapes.link(a,i)}var k=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),Pd=i=>{k.settings.minLevel=jf[i];},If=()=>{k.settings.minLevel=100;};Pd(process.env.OPIK_LOG_LEVEL||"INFO");var Df="~/.opik.config",mn={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false};function jd(i){return Object.fromEntries(Object.entries(i).filter(([,a])=>a!==void 0))}function Nf(){return jd({apiKey:process.env.OPIK_API_KEY,apiUrl:process.env.OPIK_URL_OVERRIDE,projectName:process.env.OPIK_PROJECT_NAME,workspaceName:process.env.OPIK_WORKSPACE,batchDelayMs:process.env.OPIK_BATCH_DELAY_MS?Number(process.env.OPIK_BATCH_DELAY_MS):void 0,holdUntilFlush:process.env.OPIK_HOLD_UNTIL_FLUSH===void 0?void 0:["1","true","yes"].includes(String(process.env.OPIK_HOLD_UNTIL_FLUSH).toLowerCase())})}function Mf(){let i=process.env.OPIK_CONFIG_PATH||Df;if(!Cd__default.default.existsSync(i)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${i}`);return {}}try{let a=Uf__default.default.parse(Cd__default.default.readFileSync(i,"utf8"));return a.opik?jd({apiKey:a.opik.api_key,apiUrl:a.opik.url_override,projectName:a.opik.project_name,workspaceName:a.opik.workspace}):{}}catch(a){return k.error(`Error loading config file ${i}: ${a}`),{}}}function Id(i){let a=Nf(),e=Mf(),{headers:o,...t}=i||{};return Ff({...mn,...e,...a,...t})}function Ff(i){if(!i.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");let a=Of(i.apiUrl);if(a&&!i.apiKey)throw new Error("OPIK_API_KEY is not set");if(a&&!i.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return i}function Of(i){return new URL(i).hostname.endsWith("comet.com")}var K={};E(K,{AlertAlertType:()=>Wf,AlertPublicAlertType:()=>Gf,AlertTriggerConfigPublicType:()=>Kf,AlertTriggerConfigType:()=>Lf,AlertTriggerConfigWriteType:()=>Vf,AlertTriggerEventType:()=>Bf,AlertTriggerPublicEventType:()=>Xf,AlertTriggerWriteEventType:()=>Hf,AlertWriteAlertType:()=>Jf,AnnotationQueuePublicScope:()=>Zf,AnnotationQueueScope:()=>Qf,AnnotationQueueWriteScope:()=>Yf,AssistantMessageRole:()=>mh,AttachmentListRequestEntityType:()=>Dd,BadRequestError:()=>_,CheckName:()=>jh,CheckPublicName:()=>uw,CheckPublicResult:()=>gw,CheckResult:()=>Ih,ColumnCompareTypesItem:()=>Rh,ColumnPublicTypesItem:()=>Eh,ColumnTypesItem:()=>Ph,CompleteMultipartUploadRequestEntityType:()=>qf,ConflictError:()=>F,DatasetItemCompareSource:()=>yh,DatasetItemFilterOperator:()=>uh,DatasetItemPublicSource:()=>Th,DatasetItemSource:()=>hh,DatasetItemWriteSource:()=>_n,DatasetPublicStatus:()=>_h,DatasetPublicVisibility:()=>Sh,DatasetStatus:()=>fh,DatasetUpdateVisibility:()=>Wd,DatasetVisibility:()=>gh,DatasetWriteVisibility:()=>Od,DeleteAttachmentsRequestEntityType:()=>eh,DownloadAttachmentRequestEntityType:()=>Nd,ExperimentItemCompareTraceVisibilityMode:()=>kh,ExperimentItemPublicTraceVisibilityMode:()=>Ah,ExperimentItemTraceVisibilityMode:()=>wh,ExperimentPublicStatus:()=>Oh,ExperimentPublicType:()=>Fh,ExperimentStatus:()=>Ch,ExperimentType:()=>Tn,ExperimentUpdateStatus:()=>Hd,ExperimentUpdateType:()=>Vd,ExperimentWriteStatus:()=>Ld,ExperimentWriteType:()=>Bd,FeedbackScoreBatchItemSource:()=>mw,FeedbackScoreBatchItemThreadSource:()=>ww,FeedbackScoreCompareSource:()=>vh,FeedbackScoreExperimentItemBulkWriteViewSource:()=>Dh,FeedbackScorePublicSource:()=>pw,FeedbackScoreSource:()=>bh,FindFeedbackDefinitionsRequestType:()=>Jd,FindFeedbackScoreNames1RequestType:()=>eu,ForbiddenError:()=>Z,GetSpanStatsRequestType:()=>ru,GetSpansByProjectRequestType:()=>qd,GetWebhookExamplesRequestAlertType:()=>Ud,GuardrailName:()=>Wh,GuardrailResult:()=>Bh,GuardrailWriteName:()=>Lh,GuardrailWriteResult:()=>Vh,LlmAsJudgeMessagePublicRole:()=>sh,LlmAsJudgeMessageRole:()=>rh,LlmAsJudgeMessageWriteRole:()=>th,LlmAsJudgeOutputSchemaPublicType:()=>ph,LlmAsJudgeOutputSchemaType:()=>oh,LlmAsJudgeOutputSchemaWriteType:()=>ih,LogItemLevel:()=>lh,ManualEvaluationRequestEntityType:()=>Kh,NotFoundError:()=>T,NotImplementedError:()=>wr,OptimizationPublicStatus:()=>$h,OptimizationStatus:()=>Xh,OptimizationUpdateStatus:()=>Xd,OptimizationWriteStatus:()=>Gh,ProjectDetailedVisibility:()=>rw,ProjectMetricRequestPublicInterval:()=>Yd,ProjectMetricRequestPublicMetricType:()=>Qd,ProjectMetricResponsePublicInterval:()=>qh,ProjectMetricResponsePublicMetricType:()=>Zh,ProjectPublicVisibility:()=>Yh,ProjectUpdateVisibility:()=>$d,ProjectVisibility:()=>Qh,ProjectWriteVisibility:()=>Gd,PromptType:()=>ow,PromptVersionDetailType:()=>tw,PromptVersionPublicType:()=>iw,PromptVersionType:()=>aw,PromptWriteType:()=>Zd,ProviderApiKeyProvider:()=>Jh,ProviderApiKeyPublicProvider:()=>Hh,ProviderApiKeyWriteProvider:()=>Kd,ResponseFormatType:()=>dh,SpanExperimentItemBulkWriteViewType:()=>Nh,SpanFilterPublicOperator:()=>dw,SpanPublicType:()=>cw,SpanSearchStreamRequestPublicType:()=>ou,SpanType:()=>ye,SpanUpdateType:()=>nw,SpanWriteType:()=>sw,StartMultipartUploadRequestEntityType:()=>Md,TraceFilterOperator:()=>ah,TraceFilterPublicOperator:()=>ch,TraceFilterWriteOperator:()=>nh,TracePublicVisibilityMode:()=>fw,TraceThreadFilterOperator:()=>bw,TraceThreadFilterPublicOperator:()=>ew,TraceThreadStatus:()=>hw,TraceVisibilityMode:()=>Uh,UnauthorizedError:()=>$,UnprocessableEntityError:()=>B,UploadAttachmentRequestEntityType:()=>Fd,ValueEntryCompareSource:()=>zh,ValueEntryExperimentItemBulkWriteViewSource:()=>Mh,ValueEntryPublicSource:()=>lw,ValueEntrySource:()=>xh,WebhookTestResultStatus:()=>$f,alerts:()=>Ma,annotationQueues:()=>un,attachments:()=>Fa,automationRuleEvaluators:()=>fn,chatCompletions:()=>hn,check:()=>gn,dashboards:()=>wn,datasets:()=>Oa,experiments:()=>Wa,feedbackDefinitions:()=>Ba,guardrails:()=>bn,llmProviderKey:()=>La,manualEvaluation:()=>xn,openTelemetryIngestion:()=>Rn,optimizations:()=>Va,projects:()=>Ha,prompts:()=>Ja,redirect:()=>Sn,serviceToggles:()=>yn,spans:()=>Ka,systemUsage:()=>dn,traces:()=>kn,welcomeWizard:()=>vn,workspaces:()=>zn});var Ma={};E(Ma,{GetWebhookExamplesRequestAlertType:()=>Ud});var Ud={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Fa={};E(Fa,{AttachmentListRequestEntityType:()=>Dd,DownloadAttachmentRequestEntityType:()=>Nd,StartMultipartUploadRequestEntityType:()=>Md,UploadAttachmentRequestEntityType:()=>Fd});var Dd={Trace:"trace",Span:"span"};var Nd={Trace:"trace",Span:"span"};var Md={Trace:"trace",Span:"span"};var Fd={Trace:"trace",Span:"span"};var Oa={};E(Oa,{DatasetUpdateVisibility:()=>Wd,DatasetWriteVisibility:()=>Od});var Od={Private:"private",Public:"public"};var Wd={Private:"private",Public:"public"};var Wa={};E(Wa,{ExperimentUpdateStatus:()=>Hd,ExperimentUpdateType:()=>Vd,ExperimentWriteStatus:()=>Ld,ExperimentWriteType:()=>Bd});var Bd={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Ld={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Vd={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Hd={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Ba={};E(Ba,{FindFeedbackDefinitionsRequestType:()=>Jd});var Jd={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};var La={};E(La,{ProviderApiKeyWriteProvider:()=>Kd});var Kd={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Va={};E(Va,{OptimizationUpdateStatus:()=>Xd});var Xd={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Ha={};E(Ha,{ProjectMetricRequestPublicInterval:()=>Yd,ProjectMetricRequestPublicMetricType:()=>Qd,ProjectUpdateVisibility:()=>$d,ProjectWriteVisibility:()=>Gd});var Gd={Private:"private",Public:"public"};var $d={Private:"private",Public:"public"};var Qd={FeedbackScores:"FEEDBACK_SCORES",TraceCount:"TRACE_COUNT",TokenUsage:"TOKEN_USAGE",Duration:"DURATION",Cost:"COST",GuardrailsFailedCount:"GUARDRAILS_FAILED_COUNT",ThreadCount:"THREAD_COUNT",ThreadDuration:"THREAD_DURATION",ThreadFeedbackScores:"THREAD_FEEDBACK_SCORES"};var Yd={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var Ja={};E(Ja,{PromptWriteType:()=>Zd});var Zd={Mustache:"mustache",Jinja2:"jinja2"};var Ka={};E(Ka,{FindFeedbackScoreNames1RequestType:()=>eu,GetSpanStatsRequestType:()=>ru,GetSpansByProjectRequestType:()=>qd,SpanSearchStreamRequestPublicType:()=>ou});var qd={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var eu={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var ru={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var ou={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var dn={};var un={};var gn={};var fn={};var hn={};var wn={};var bn={};var xn={};var Rn={};var yn={};var kn={};var vn={};var zn={};var Sn={};var Wf={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Bf={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var Lf={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Vf={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Hf={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var Jf={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Kf={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Xf={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var Gf={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var $f={Success:"success",Failure:"failure"};var Qf={Trace:"trace",Thread:"thread"};var Yf={Trace:"trace",Thread:"thread"};var Zf={Trace:"trace",Thread:"thread"};var qf={Trace:"trace",Span:"span"};var eh={Trace:"trace",Span:"span"};var rh={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var oh={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var ah={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var th={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var ih={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var nh={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var sh={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var ph={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var ch={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var lh={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};var mh={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};var dh={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};var uh={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var gh={Private:"private",Public:"public"};var fh={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var hh={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var wh={Default:"default",Hidden:"hidden"};var bh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var xh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var _n={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Rh={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var yh={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var kh={Default:"default",Hidden:"hidden"};var vh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var zh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Sh={Private:"private",Public:"public"};var _h={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Th={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Ah={Default:"default",Hidden:"hidden"};var Eh={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Ph={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Tn={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Ch={Running:"running",Completed:"completed",Cancelled:"cancelled"};var jh={Topic:"TOPIC",Pii:"PII"};var Ih={Passed:"passed",Failed:"failed"};var ye={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Uh={Default:"default",Hidden:"hidden"};var Dh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Nh={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Mh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Fh={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Oh={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Wh={Topic:"TOPIC",Pii:"PII"};var Bh={Passed:"passed",Failed:"failed"};var Lh={Topic:"TOPIC",Pii:"PII"};var Vh={Passed:"passed",Failed:"failed"};var Hh={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Jh={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Kh={Trace:"trace",Thread:"thread"};var Xh={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Gh={Running:"running",Completed:"completed",Cancelled:"cancelled"};var $h={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Qh={Private:"private",Public:"public"};var Yh={Private:"private",Public:"public"};var Zh={FeedbackScores:"FEEDBACK_SCORES",TraceCount:"TRACE_COUNT",TokenUsage:"TOKEN_USAGE",Duration:"DURATION",Cost:"COST",GuardrailsFailedCount:"GUARDRAILS_FAILED_COUNT",ThreadCount:"THREAD_COUNT",ThreadDuration:"THREAD_DURATION",ThreadFeedbackScores:"THREAD_FEEDBACK_SCORES"};var qh={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var ew={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var rw={Private:"private",Public:"public"};var ow={Mustache:"mustache",Jinja2:"jinja2"};var aw={Mustache:"mustache",Jinja2:"jinja2"};var tw={Mustache:"mustache",Jinja2:"jinja2"};var iw={Mustache:"mustache",Jinja2:"jinja2"};var nw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var sw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var pw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var cw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var lw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var mw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var dw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var uw={Topic:"TOPIC",Pii:"PII"};var gw={Passed:"passed",Failed:"failed"};var fw={Default:"default",Hidden:"hidden"};var hw={Active:"active",Inactive:"inactive"};var ww={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var bw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Pe=(i,a,e)=>JSON.stringify(i,a,e);var p=class i extends Error{constructor({message:a,statusCode:e,body:o,rawResponse:t}){super(xw({message:a,statusCode:e,body:o})),Object.setPrototypeOf(this,i.prototype),this.statusCode=e,this.body=o,this.rawResponse=t;}};function xw({message:i,statusCode:a,body:e}){let o=[];return i!=null&&o.push(i),a!=null&&o.push(`Status code: ${a.toString()}`),e!=null&&o.push(`Body: ${Pe(e,void 0,2)}`),o.join(`
3
- `)}var f=class i extends Error{constructor(a){super(a),Object.setPrototypeOf(this,i.prototype);}};var _=class i extends p{constructor(a,e){super({message:"BadRequestError",statusCode:400,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var F=class i extends p{constructor(a,e){super({message:"ConflictError",statusCode:409,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var B=class i extends p{constructor(a,e){super({message:"UnprocessableEntityError",statusCode:422,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var T=class i extends p{constructor(a,e){super({message:"NotFoundError",statusCode:404,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var $=class i extends p{constructor(a,e){super({message:"UnauthorizedError",statusCode:401,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var Z=class i extends p{constructor(a,e){super({message:"ForbiddenError",statusCode:403,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var wr=class i extends p{constructor(a,e){super({message:"NotImplementedError",statusCode:501,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var w={Default:"http://localhost:5173/api"};var br;typeof globalThis.Headers!="undefined"?br=globalThis.Headers:br=class au{constructor(a){if(this.headers=new Map,a)if(a instanceof au)a.forEach((e,o)=>this.append(o,e));else if(Array.isArray(a))for(let[e,o]of a)if(typeof e=="string"&&typeof o=="string")this.append(e,o);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[e,o]of Object.entries(a))if(typeof o=="string")this.append(e,o);else throw new TypeError("Header values must be strings")}append(a,e){let o=a.toLowerCase(),t=this.headers.get(o)||[];this.headers.set(o,[...t,e]);}delete(a){let e=a.toLowerCase();this.headers.delete(e);}get(a){let e=a.toLowerCase(),o=this.headers.get(e);return o?o.join(", "):null}has(a){let e=a.toLowerCase();return this.headers.has(e)}set(a,e){let o=a.toLowerCase();this.headers.set(o,[e]);}forEach(a,e){let o=e?a.bind(e):a;this.headers.forEach((t,n)=>o(t.join(", "),n,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[a,e]of this.headers.entries())yield [a,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let a of this.headers.values())yield a.join(", ");}[Symbol.iterator](){return this.entries()}};var Xa={headers:new br,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},Ga={headers:new br,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};function $a(i){return {headers:i.headers,redirected:i.redirected,status:i.status,statusText:i.statusText,type:i.type,url:i.url}}function tu(i,a){return Object.keys(a!=null?a:{}).length>0?`${i}?${Rw__default.default.stringify(a,{arrayFormat:"repeat"})}`:i}var d=yw();function yw(){var u,g,R,y,v;return typeof window!="undefined"&&typeof window.document!="undefined"?{type:"browser",version:window.navigator.userAgent}:typeof globalThis!="undefined"&&((u=globalThis==null?void 0:globalThis.navigator)==null?void 0:u.userAgent)==="Cloudflare-Workers"?{type:"workerd"}:typeof EdgeRuntime=="string"?{type:"edge-runtime"}:typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((g=self.constructor)==null?void 0:g.name)==="DedicatedWorkerGlobalScope"||((R=self.constructor)==null?void 0:R.name)==="ServiceWorkerGlobalScope"||((y=self.constructor)==null?void 0:y.name)==="SharedWorkerGlobalScope")?{type:"web-worker"}:typeof Deno!="undefined"&&typeof Deno.version!="undefined"&&typeof Deno.version.deno!="undefined"?{type:"deno",version:Deno.version.deno}:typeof Bun!="undefined"&&typeof Bun.version!="undefined"?{type:"bun",version:Bun.version}:typeof process!="undefined"&&"version"in process&&!!process.version&&"versions"in process&&!!((v=process.versions)!=null&&v.node)?{type:"node",version:process.versions.node,parsedVersion:Number(process.versions.node.split(".")[0])}:typeof navigator!="undefined"&&(navigator==null?void 0:navigator.product)==="ReactNative"?{type:"react-native"}:{type:"unknown"}}async function iu(){return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?fetch:d.type==="node"?(await import('node-fetch')).default:typeof fetch=="function"?fetch:(await import('node-fetch')).default}async function nu({body:i,type:a}){return a.includes("json")?Pe(i):i}async function uu(i){return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?new(await Promise.resolve().then(()=>(pu(),su))).Node18UniversalStreamWrapper(i):d.type!=="node"&&typeof fetch=="function"?new(await Promise.resolve().then(()=>(lu(),cu))).UndiciStreamWrapper(i):new(await Promise.resolve().then(()=>(du(),mu))).NodePre18StreamWrapper(i)}async function gu(i,a){if(i.body!=null&&a==="blob")return await i.blob();if(i.body!=null&&a==="arrayBuffer")return await i.arrayBuffer();if(i.body!=null&&a==="sse")return i.body;if(i.body!=null&&a==="streaming")return uu(i.body);if(i.body!=null&&a==="text")return await i.text();{let e=await i.text();if(e.length>0)try{return JSON.parse(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:i.status,rawBody:e}}}else return}}var kw="timeout";function fu(i){let a=new AbortController,e=setTimeout(()=>a.abort(kw),i);return {signal:a.signal,abortId:e}}function hu(...i){let a=i.length===1&&Array.isArray(i[0])?i[0]:i,e=new AbortController;for(let o of a){if(o.aborted){e.abort(o==null?void 0:o.reason);break}o.addEventListener("abort",()=>e.abort(o==null?void 0:o.reason),{signal:e.signal});}return e.signal}var wu=async(i,a,e,o,t,n,c,m,u)=>{let g=[],R;if(n!=null){let{signal:z,abortId:S}=fu(n);R=S,g.push(z);}c!=null&&g.push(c);let y=hu(g),v=await i(a,{method:e,headers:o,body:t,signal:y,credentials:m?"include":void 0,duplex:u});return R!=null&&clearTimeout(R),v};function vw(i){let a=1+(Math.random()*2-1)*.2;return i*a}async function bu(i,a=2){let e=await i();for(let o=0;o<a&&([408,429].includes(e.status)||e.status>=500);++o){let t=Math.min(1e3*Math.pow(2,o),6e4),n=vw(t);await new Promise(c=>setTimeout(c,n)),e=await i();}return e}async function zw(i){let a={};if(i.body!==void 0&&i.contentType!=null&&(a["Content-Type"]=i.contentType),i.headers!=null)for(let[n,c]of Object.entries(i.headers))c!=null&&(a[n]=c);let e=tu(i.url,i.queryParameters),o=await nu({body:i.body,type:i.requestType==="json"?"json":"other"}),t=await iu();try{let n=await bu(async()=>wu(t,e,i.method,a,o,i.timeoutMs,i.abortSignal,i.withCredentials,i.duplex),i.maxRetries),c=await gu(n,i.responseType);return n.status>=200&&n.status<400?{ok:!0,body:c,headers:n.headers,rawResponse:$a(n)}:{ok:!1,error:{reason:"status-code",statusCode:n.status,body:c},rawResponse:$a(n)}}catch(n){return i.abortSignal!=null&&i.abortSignal.aborted?{ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:Xa}:n instanceof Error&&n.name==="AbortError"?{ok:false,error:{reason:"timeout"},rawResponse:Xa}:n instanceof Error?{ok:false,error:{reason:"unknown",errorMessage:n.message},rawResponse:Ga}:{ok:false,error:{reason:"unknown",errorMessage:Pe(n)},rawResponse:Ga}}}var b=zw;var s={get:async i=>typeof i=="function"?i():i};var h=class i extends Promise{constructor(a){super(e=>{e(void 0);}),this.innerPromise=a;}static fromFunction(a,...e){return new i(a(...e))}static interceptFunction(a){return (...e)=>i.fromPromise(a(...e))}static fromPromise(a){return new i(a)}static fromExecutor(a){let e=new Promise(a);return new i(e)}static fromResult(a){let e=Promise.resolve(a);return new i(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:a})=>a)),this.unwrappedPromise}then(a,e){return this.unwrap().then(a,e)}catch(a){return this.unwrap().catch(a)}finally(a){return this.unwrap().finally(a)}async withRawResponse(){return await this.innerPromise}};function Hn(i){return typeof i=="object"&&i!=null&&"name"in i}function Jn(i){return typeof i=="object"&&i!=null&&"path"in i}function Kn(i){let a=i.lastIndexOf("/"),e=i.lastIndexOf("\\"),o=Math.max(a,e);return o>=0?i.substring(o+1):i}async function qu(){let i;return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?i=new Bn:d.type==="node"?i=new Ln:i=new Vn,await i.setup(),i}var Bn=class{async setup(){this.fd=new(await import('formdata-node')).FormData;}append(a,e){var o;(o=this.fd)==null||o.append(a,e);}getFileName(a,e){if(e!=null)return e;if(Hn(a))return a.name;if(Jn(a)&&a.path)return Kn(a.path.toString())}async appendFile(a,e,o){var t,n;o=this.getFileName(e,o),e instanceof Blob?(t=this.fd)==null||t.append(a,e,o):(n=this.fd)==null||n.append(a,{type:void 0,name:o,[Symbol.toStringTag]:"File",stream(){return e}});}async getRequest(){let a=new(await import('form-data-encoder')).FormDataEncoder(this.fd);return {body:(await import('readable-stream')).Readable.from(a),headers:a.headers,duplex:"half"}}},Ln=class{async setup(){this.fd=new(await Promise.resolve().then(()=>_f(Zu()))).default;}append(a,e){var o;(o=this.fd)==null||o.append(a,e);}getFileName(a,e){if(e!=null)return e;if(Hn(a))return a.name;if(Jn(a)&&a.path)return Kn(a.path.toString())}async appendFile(a,e,o){var n,c;o=this.getFileName(e,o);let t;e instanceof Blob?t=Buffer.from(await e.arrayBuffer()):t=e,o==null?(n=this.fd)==null||n.append(a,t):(c=this.fd)==null||c.append(a,t,{filename:o});}getRequest(){return {body:this.fd,headers:this.fd?this.fd.getHeaders():{}}}},Vn=class{async setup(){this.fd=new FormData;}append(a,e){var o;(o=this.fd)==null||o.append(a,e);}getFileName(a,e){if(e!=null)return e;if(Hn(a))return a.name;if(Jn(a)&&a.path)return Kn(a.path.toString())}async appendFile(a,e,o){var t,n;if(o=this.getFileName(e,o),e instanceof Blob){(t=this.fd)==null||t.append(a,e,o);return}(n=this.fd)==null||n.append(a,new Blob([e]),o);}getRequest(){return {body:this.fd,headers:{}}}};var r={};E(r,{JsonError:()=>qe,ParseError:()=>er,any:()=>gg,bigint:()=>rg,boolean:()=>fg,booleanLiteral:()=>ug,date:()=>og,discriminant:()=>zg,enum_:()=>qa,getObjectLikeUtils:()=>he,getObjectUtils:()=>We,getSchemaUtils:()=>U,isProperty:()=>je,lazy:()=>ag,lazyObject:()=>lg,list:()=>rt,number:()=>hg,object:()=>et,objectWithoutOptionalProperties:()=>cg,optional:()=>Xn,property:()=>ig,record:()=>Rg,set:()=>yg,string:()=>wg,stringLiteral:()=>dg,transform:()=>Gn,undiscriminatedUnion:()=>vg,union:()=>_g,unknown:()=>bg,withParsedProperties:()=>Qn});var A={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"};function I(i,a){return `Expected ${a}. Received ${pb(i)}.`}function pb(i){if(Array.isArray(i))return "list";if(i===null)return "null";if(i instanceof BigInt)return "BigInt";switch(typeof i){case "string":return `"${i}"`;case "bigint":case "number":case "boolean":case "undefined":return `${i}`}return typeof i}function Q(i){return {...i,json:eg(i.json),parse:eg(i.parse)}}function eg(i){return (a,e)=>{let o=i(a,e),{skipValidation:t=false}=e!=null?e:{};return !o.ok&&t?(console.warn(["Failed to validate.",...o.errors.map(n=>" - "+(n.path.length>0?`${n.path.join(".")}: ${n.message}`:n.message))].join(`
4
- `)),{ok:true,value:a}):o}}function Za(i){return i.path.length===0?i.message:`${i.path.join(" -> ")}: ${i.message}`}var qe=class i extends Error{constructor(e){super(e.map(Za).join("; "));this.errors=e;Object.setPrototypeOf(this,i.prototype);}};var er=class i extends Error{constructor(e){super(e.map(Za).join("; "));this.errors=e;Object.setPrototypeOf(this,i.prototype);}};function U(i){return {nullable:()=>cb(i),optional:()=>Xn(i),optionalNullable:()=>lb(i),transform:a=>Gn(i,a),parseOrThrow:(a,e)=>{let o=i.parse(a,e);if(o.ok)return o.value;throw new er(o.errors)},jsonOrThrow:(a,e)=>{let o=i.json(a,e);if(o.ok)return o.value;throw new qe(o.errors)}}}function cb(i){let a={parse:(e,o)=>e==null?{ok:true,value:null}:i.parse(e,o),json:(e,o)=>e==null?{ok:true,value:null}:i.json(e,o),getType:()=>A.NULLABLE};return {...a,...U(a)}}function Xn(i){let a={parse:(e,o)=>e==null?{ok:true,value:void 0}:i.parse(e,o),json:(e,o)=>o!=null&&o.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:i.json(e,o),getType:()=>A.OPTIONAL};return {...a,...U(a)}}function lb(i){let a={parse:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:i.parse(e,o),json:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:i.json(e,o),getType:()=>A.OPTIONAL_NULLABLE};return {...a,...U(a)}}function Gn(i,a){let e={parse:(o,t)=>{let n=i.parse(o,t);return n.ok?{ok:true,value:a.transform(n.value)}:n},json:(o,t)=>{let n=a.untransform(o);return i.json(n,t)},getType:()=>i.getType()};return {...e,...U(e)}}function rg(){let i={parse:(a,{breadcrumbsPrefix:e=[]}={})=>typeof a=="bigint"?{ok:true,value:a}:typeof a=="number"?{ok:true,value:BigInt(a)}:{ok:false,errors:[{path:e,message:I(a,"bigint | number")}]},json:(a,{breadcrumbsPrefix:e=[]}={})=>typeof a!="bigint"?{ok:false,errors:[{path:e,message:I(a,"bigint")}]}:{ok:true,value:a},getType:()=>A.BIGINT};return {...Q(i),...U(i)}}var mb=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;function og(){let i={parse:(a,{breadcrumbsPrefix:e=[]}={})=>typeof a!="string"?{ok:false,errors:[{path:e,message:I(a,"string")}]}:mb.test(a)?{ok:true,value:new Date(a)}:{ok:false,errors:[{path:e,message:I(a,"ISO 8601 date string")}]},json:(a,{breadcrumbsPrefix:e=[]}={})=>a instanceof Date?{ok:true,value:a.toISOString()}:{ok:false,errors:[{path:e,message:I(a,"Date object")}]},getType:()=>A.DATE};return {...Q(i),...U(i)}}function q(i,a){return ()=>{let e={parse:a,json:a,getType:()=>i};return {...Q(e),...U(e)}}}function qa(i){let a=new Set(i);return q(A.ENUM,(o,{allowUnrecognizedEnumValues:t,breadcrumbsPrefix:n=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:n,message:I(o,"string")}]}:!a.has(o)&&!t?{ok:false,errors:[{path:n,message:I(o,"enum")}]}:{ok:true,value:o})()}function ag(i){let a=$n(i);return {...a,...U(a)}}function $n(i){return {parse:(a,e)=>rr(i).parse(a,e),json:(a,e)=>rr(i).json(a,e),getType:()=>rr(i).getType()}}function rr(i){let a=i;return a.__zurg_memoized==null&&(a.__zurg_memoized=i()),a.__zurg_memoized}function xr(i){return Object.entries(i)}function Rr(i,a){let e=new Set(a);return Object.entries(i).reduce((o,[t,n])=>(e.has(t)&&(o[t]=n),o),{})}function Ce(i){if(typeof i!="object"||i===null)return false;if(Object.getPrototypeOf(i)===null)return true;let a=i;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(i)===a}function yr(i){return Object.keys(i)}function tg(i,a){let e=[],o=[];for(let t of i)a(t)?e.push(t):o.push(t);return [e,o]}function he(i){return {withParsedProperties:a=>Qn(i,a)}}function Qn(i,a){let e={parse:(o,t)=>{let n=i.parse(o,t);if(!n.ok)return n;let c=Object.entries(a).reduce((m,[u,g])=>({...m,[u]:typeof g=="function"?g(n.value):g}),{});return {ok:true,value:{...n.value,...c}}},json:(o,t)=>{var m;if(!Ce(o))return {ok:false,errors:[{path:(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],message:I(o,"object")}]};let n=new Set(Object.keys(a)),c=Rr(o,Object.keys(o).filter(u=>!n.has(u)));return i.json(c,t)},getType:()=>i.getType()};return {...e,...U(e),...he(e)}}function ig(i,a){return {rawKey:i,valueSchema:a,isProperty:true}}function je(i){return i.isProperty}function et(i){let a={_getRawProperties:()=>Object.entries(i).map(([e,o])=>je(o)?o.rawKey:e),_getParsedProperties:()=>yr(i),parse:(e,o)=>{let t={},n=[];for(let[c,m]of xr(i)){let u=je(m)?m.rawKey:c,g=je(m)?m.valueSchema:m,R={rawKey:u,parsedKey:c,valueSchema:g};t[u]=R,pg(g)&&n.push(u);}return ng({value:e,requiredKeys:n,getProperty:c=>{let m=t[c];if(m!=null)return {transformedKey:m.parsedKey,transform:u=>{var g;return m.valueSchema.parse(u,{...o,breadcrumbsPrefix:[...(g=o==null?void 0:o.breadcrumbsPrefix)!=null?g:[],c]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},json:(e,o)=>{let t=[];for(let[n,c]of xr(i)){let m=je(c)?c.valueSchema:c;pg(m)&&t.push(n);}return ng({value:e,requiredKeys:t,getProperty:n=>{let c=i[n];if(c!=null)return je(c)?{transformedKey:c.rawKey,transform:m=>{var u;return c.valueSchema.json(m,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}:{transformedKey:n,transform:m=>{var u;return c.json(m,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},getType:()=>A.OBJECT};return {...Q(a),...U(a),...he(a),...We(a)}}function ng({value:i,requiredKeys:a,getProperty:e,unrecognizedObjectKeys:o="fail",skipValidation:t=false,breadcrumbsPrefix:n=[]}){if(!Ce(i))return {ok:false,errors:[{path:n,message:I(i,"object")}]};let c=new Set(a),m=[],u={};for(let[g,R]of Object.entries(i)){let y=e(g);if(y!=null){c.delete(g);let v=y.transform(R);v.ok?u[y.transformedKey]=v.value:(u[g]=R,m.push(...v.errors));}else switch(o){case "fail":m.push({path:[...n,g],message:`Unexpected key "${g}"`});break;case "strip":break;case "passthrough":u[g]=R;break}}return m.push(...a.filter(g=>c.has(g)).map(g=>({path:n,message:`Missing required key "${g}"`}))),m.length===0||t?{ok:true,value:u}:{ok:false,errors:m}}function We(i){return {extend:a=>{let e={_getParsedProperties:()=>[...i._getParsedProperties(),...a._getParsedProperties()],_getRawProperties:()=>[...i._getRawProperties(),...a._getRawProperties()],parse:(o,t)=>sg({extensionKeys:a._getRawProperties(),value:o,transformBase:n=>i.parse(n,t),transformExtension:n=>a.parse(n,t)}),json:(o,t)=>sg({extensionKeys:a._getParsedProperties(),value:o,transformBase:n=>i.json(n,t),transformExtension:n=>a.json(n,t)}),getType:()=>A.OBJECT};return {...e,...U(e),...he(e),...We(e)}},passthrough:()=>{let a={_getParsedProperties:()=>i._getParsedProperties(),_getRawProperties:()=>i._getRawProperties(),parse:(e,o)=>{let t=i.parse(e,{...o,unrecognizedObjectKeys:"passthrough"});return t.ok?{ok:true,value:{...e,...t.value}}:t},json:(e,o)=>{let t=i.json(e,{...o,unrecognizedObjectKeys:"passthrough"});return t.ok?{ok:true,value:{...e,...t.value}}:t},getType:()=>A.OBJECT};return {...a,...U(a),...he(a),...We(a)}}}}function sg({extensionKeys:i,value:a,transformBase:e,transformExtension:o}){let t=new Set(i),[n,c]=tg(yr(a),g=>t.has(g)),m=e(Rr(a,c)),u=o(Rr(a,n));return m.ok&&u.ok?{ok:true,value:{...m.value,...u.value}}:{ok:false,errors:[...m.ok?[]:m.errors,...u.ok?[]:u.errors]}}function pg(i){return !db(i)}function db(i){switch(i.getType()){case A.ANY:case A.UNKNOWN:case A.OPTIONAL:case A.OPTIONAL_NULLABLE:return true;default:return false}}function cg(i){return et(i)}function lg(i){let a={...$n(i),_getRawProperties:()=>rr(i)._getRawProperties(),_getParsedProperties:()=>rr(i)._getParsedProperties()};return {...a,...U(a),...he(a),...We(a)}}function rt(i){let a={parse:(e,o)=>mg(e,(t,n)=>{var c;return i.parse(t,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),json:(e,o)=>mg(e,(t,n)=>{var c;return i.json(t,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),getType:()=>A.LIST};return {...Q(a),...U(a)}}function mg(i,a){return Array.isArray(i)?i.map((o,t)=>a(o,t)).reduce((o,t)=>{if(o.ok&&t.ok)return {ok:true,value:[...o.value,t.value]};let n=[];return o.ok||n.push(...o.errors),t.ok||n.push(...t.errors),{ok:false,errors:n}},{ok:true,value:[]}):{ok:false,errors:[{message:I(i,"list"),path:[]}]}}function dg(i){return q(A.STRING_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===i?{ok:true,value:i}:{ok:false,errors:[{path:o,message:I(e,`"${i}"`)}]})()}function ug(i){return q(A.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===i?{ok:true,value:i}:{ok:false,errors:[{path:o,message:I(e,`${i.toString()}`)}]})()}var gg=q(A.ANY,i=>({ok:true,value:i}));var fg=q(A.BOOLEAN,(i,{breadcrumbsPrefix:a=[]}={})=>typeof i=="boolean"?{ok:true,value:i}:{ok:false,errors:[{path:a,message:I(i,"boolean")}]});var hg=q(A.NUMBER,(i,{breadcrumbsPrefix:a=[]}={})=>typeof i=="number"?{ok:true,value:i}:{ok:false,errors:[{path:a,message:I(i,"number")}]});var wg=q(A.STRING,(i,{breadcrumbsPrefix:a=[]}={})=>typeof i=="string"?{ok:true,value:i}:{ok:false,errors:[{path:a,message:I(i,"string")}]});var bg=q(A.UNKNOWN,i=>({ok:true,value:i}));function Rg(i,a){let e={parse:(o,t)=>xg({value:o,isKeyNumeric:i.getType()===A.NUMBER,transformKey:n=>{var c;return i.parse(n,{...t,breadcrumbsPrefix:[...(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return a.parse(n,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix}),json:(o,t)=>xg({value:o,isKeyNumeric:i.getType()===A.NUMBER,transformKey:n=>{var c;return i.json(n,{...t,breadcrumbsPrefix:[...(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return a.json(n,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix}),getType:()=>A.RECORD};return {...Q(e),...U(e)}}function xg({value:i,isKeyNumeric:a,transformKey:e,transformValue:o,breadcrumbsPrefix:t=[]}){return Ce(i)?xr(i).reduce((n,[c,m])=>{if(m===void 0)return n;let u=n,g=c;if(a){let z=c.length>0?Number(c):NaN;isNaN(z)||(g=z);}let R=e(g),y=o(m,g);if(u.ok&&R.ok&&y.ok)return {ok:true,value:{...u.value,[R.value]:y.value}};let v=[];return u.ok||v.push(...u.errors),R.ok||v.push(...R.errors),y.ok||v.push(...y.errors),{ok:false,errors:v}},{ok:true,value:{}}):{ok:false,errors:[{path:t,message:I(i,"object")}]}}function yg(i){let a=rt(i),e={parse:(o,t)=>{let n=a.parse(o,t);return n.ok?{ok:true,value:new Set(n.value)}:n},json:(o,t)=>{var c;return o instanceof Set?a.json([...o],t):{ok:false,errors:[{path:(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],message:I(o,"Set")}]}},getType:()=>A.SET};return {...Q(e),...U(e)}}function vg(i){let a={parse:(e,o)=>kg((t,n)=>t.parse(e,n),i,o),json:(e,o)=>kg((t,n)=>t.json(e,n),i,o),getType:()=>A.UNDISCRIMINATED_UNION};return {...Q(a),...U(a)}}function kg(i,a,e){let o=[];for(let[t,n]of a.entries()){let c=i(n,{...e,skipValidation:false});if(c.ok)return c;for(let m of c.errors)o.push({path:m.path,message:`[Variant ${t}] ${m.message}`});}return {ok:false,errors:o}}function zg(i,a){return {parsedDiscriminant:i,rawDiscriminant:a}}function _g(i,a){let e=typeof i=="string"?i:i.rawDiscriminant,o=typeof i=="string"?i:i.parsedDiscriminant,t=qa(yr(a)),n={parse:(c,m)=>Sg({value:c,discriminant:e,transformedDiscriminant:o,transformDiscriminantValue:u=>{var g;return t.parse(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],e]})},getAdditionalPropertiesSchema:u=>a[u],allowUnrecognizedUnionMembers:m==null?void 0:m.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.parse(u,m),breadcrumbsPrefix:m==null?void 0:m.breadcrumbsPrefix}),json:(c,m)=>Sg({value:c,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:u=>{var g;return t.json(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],o]})},getAdditionalPropertiesSchema:u=>a[u],allowUnrecognizedUnionMembers:m==null?void 0:m.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.json(u,m),breadcrumbsPrefix:m==null?void 0:m.breadcrumbsPrefix}),getType:()=>A.UNION};return {...Q(n),...U(n),...he(n)}}function Sg({value:i,discriminant:a,transformedDiscriminant:e,transformDiscriminantValue:o,getAdditionalPropertiesSchema:t,allowUnrecognizedUnionMembers:n=false,transformAdditionalProperties:c,breadcrumbsPrefix:m=[]}){if(!Ce(i))return {ok:false,errors:[{path:m,message:I(i,"object")}]};let{[a]:u,...g}=i;if(u==null)return {ok:false,errors:[{path:m,message:`Missing discriminant ("${a}")`}]};let R=o(u);if(!R.ok)return {ok:false,errors:R.errors};let y=t(R.value);if(y==null)return n?{ok:true,value:{[e]:R.value,...g}}:{ok:false,errors:[{path:[...m,a],message:"Unexpected discriminant value"}]};let v=c(g,y);return v.ok?{ok:true,value:{[e]:u,...v.value}}:v}function ub(i){var a=[];if(i.length===0)return "";if(typeof i[0]!="string")throw new TypeError("Url must be a string. Received "+i[0]);if(i[0].match(/^[^/:]+:\/*$/)&&i.length>1){var e=i.shift();i[0]=e+i[0];}i[0].match(/^file:\/\/\//)?i[0]=i[0].replace(/^([^/:]+):\/*/,"$1:///"):i[0]=i[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<i.length;o++){var t=i[o];if(typeof t!="string")throw new TypeError("Url must be a string. Received "+t);t!==""&&(o>0&&(t=t.replace(/^[\/]+/,"")),o<i.length-1?t=t.replace(/[\/]+$/,""):t=t.replace(/[\/]+$/,"/"),a.push(t));}var n=a.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");var c=n.split("?");return n=c.shift()+(c.length>0?"?":"")+c.join("&"),n}function x(){var i;return typeof arguments[0]=="object"?i=arguments[0]:i=[].slice.call(arguments),ub(i)}var C={};E(C,{AggregationData:()=>vl,Alert:()=>xb,AlertAlertType:()=>Vs,AlertPagePublic:()=>sp,AlertPublic:()=>jo,AlertPublicAlertType:()=>rp,AlertTrigger:()=>Gs,AlertTriggerConfig:()=>Xs,AlertTriggerConfigPublic:()=>ip,AlertTriggerConfigPublicType:()=>tp,AlertTriggerConfigType:()=>Ks,AlertTriggerConfigWrite:()=>Qs,AlertTriggerConfigWriteType:()=>$s,AlertTriggerEventType:()=>Js,AlertTriggerPublic:()=>np,AlertTriggerPublicEventType:()=>ap,AlertTriggerWrite:()=>Zs,AlertTriggerWriteEventType:()=>Ys,AlertWrite:()=>Co,AlertWriteAlertType:()=>qs,AnnotationQueue:()=>up,AnnotationQueueBatch:()=>yb,AnnotationQueueBatchWrite:()=>vo,AnnotationQueueItemIds:()=>Vt,AnnotationQueuePagePublic:()=>hp,AnnotationQueuePublic:()=>Io,AnnotationQueuePublicScope:()=>gp,AnnotationQueueReviewer:()=>dp,AnnotationQueueReviewerPublic:()=>fp,AnnotationQueueScope:()=>mp,AnnotationQueueUpdate:()=>zo,AnnotationQueueWrite:()=>ko,AnnotationQueueWriteScope:()=>As,AssistantMessage:()=>bc,AssistantMessageRole:()=>wc,Attachment:()=>wp,AttachmentListRequestEntityType:()=>tt,AttachmentPage:()=>bp,AuthDetailsHolder:()=>vp,AutomationRuleEvaluator:()=>vb,AutomationRuleEvaluatorLlmAsJudge:()=>Cp,AutomationRuleEvaluatorLlmAsJudgePublic:()=>Go,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>Bp,AutomationRuleEvaluatorObjectPublic:()=>nc,AutomationRuleEvaluatorPagePublic:()=>sc,AutomationRuleEvaluatorPublic:()=>pc,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>Ip,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>Qo,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>Vp,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>Up,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>Yo,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>Jp,AutomationRuleEvaluatorUpdate:()=>hc,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>dc,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>gc,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>fc,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>uc,AutomationRuleEvaluatorUserDefinedMetricPython:()=>jp,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>$o,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>Xp,AutomationRuleEvaluatorWrite:()=>Qp,AvgValueStatPublic:()=>Jc,BatchDelete:()=>L,BatchDeleteByProject:()=>Vb,BiInformation:()=>Fs,BiInformationResponse:()=>ir,BooleanFeedbackDefinition:()=>Al,BooleanFeedbackDefinitionCreate:()=>Dl,BooleanFeedbackDefinitionPublic:()=>na,BooleanFeedbackDefinitionUpdate:()=>Yl,BooleanFeedbackDetail:()=>Tl,BooleanFeedbackDetailCreate:()=>Ul,BooleanFeedbackDetailPublic:()=>Ll,BooleanFeedbackDetailUpdate:()=>Ql,CategoricalFeedbackDefinition:()=>Pl,CategoricalFeedbackDefinitionCreate:()=>Ml,CategoricalFeedbackDefinitionPublic:()=>sa,CategoricalFeedbackDefinitionUpdate:()=>ql,CategoricalFeedbackDetail:()=>El,CategoricalFeedbackDetailCreate:()=>Nl,CategoricalFeedbackDetailPublic:()=>Vl,CategoricalFeedbackDetailUpdate:()=>Zl,ChatCompletionChoice:()=>Rc,ChatCompletionRequest:()=>_o,ChatCompletionResponse:()=>zc,Check:()=>ml,CheckName:()=>cl,CheckPublic:()=>Ym,CheckPublicName:()=>$m,CheckPublicResult:()=>Qm,CheckResult:()=>ll,ChunkedOutputJsonNode:()=>Tb,ChunkedOutputJsonNodePublic:()=>Cb,ChunkedOutputJsonNodePublicType:()=>_l,ChunkedOutputJsonNodeType:()=>tl,Column:()=>ol,ColumnCompare:()=>Cc,ColumnCompareTypesItem:()=>Pc,ColumnPublic:()=>qc,ColumnPublicTypesItem:()=>Zc,ColumnTypesItem:()=>rl,Comment:()=>H,CommentCompare:()=>jc,CommentPublic:()=>Ke,CompleteMultipartUploadRequest:()=>Ht,CompleteMultipartUploadRequestEntityType:()=>xp,CompletionTokensDetails:()=>kc,CountValueStatPublic:()=>Kc,CreateDatasetItemsFromSpansRequest:()=>Tr,CreateDatasetItemsFromTracesRequest:()=>Ar,CreatePromptVersionDetail:()=>eo,DashboardPagePublic:()=>Sc,DashboardPublic:()=>He,DashboardUpdatePublic:()=>Ao,DashboardWrite:()=>To,DataPointDouble:()=>Hb,DataPointNumberPublic:()=>Rm,Dataset:()=>zb,DatasetExpansion:()=>_b,DatasetExpansionResponse:()=>Ec,DatasetExpansionWrite:()=>jr,DatasetIdentifier:()=>Pr,DatasetIdentifierPublic:()=>Ir,DatasetItem:()=>qo,DatasetItemBatch:()=>Sb,DatasetItemBatchUpdate:()=>vr,DatasetItemBatchWrite:()=>_r,DatasetItemCompare:()=>Wc,DatasetItemCompareSource:()=>Ic,DatasetItemFilter:()=>Zn,DatasetItemFilterOperator:()=>Yn,DatasetItemPageCompare:()=>Bc,DatasetItemPagePublic:()=>el,DatasetItemPublic:()=>oa,DatasetItemPublicSource:()=>Qc,DatasetItemSource:()=>Ac,DatasetItemStreamRequest:()=>Ur,DatasetItemUpdate:()=>qn,DatasetItemWrite:()=>Sr,DatasetItemWriteSource:()=>es,DatasetItemsDelete:()=>Cr,DatasetPagePublic:()=>Hc,DatasetPublic:()=>nr,DatasetPublicStatus:()=>Vc,DatasetPublicVisibility:()=>Lc,DatasetStatus:()=>Tc,DatasetUpdate:()=>Er,DatasetUpdateVisibility:()=>lt,DatasetVersionCreatePublic:()=>Nr,DatasetVersionPagePublic:()=>nl,DatasetVersionPublic:()=>il,DatasetVersionTag:()=>Dr,DatasetVisibility:()=>_c,DatasetWrite:()=>zr,DatasetWriteVisibility:()=>ct,DeleteAttachmentsRequest:()=>kb,DeleteAttachmentsRequestEntityType:()=>yp,DeleteFeedbackScore:()=>ua,DeleteIdsHolder:()=>sr,DeleteThreadFeedbackScores:()=>wo,DeleteTraceThreads:()=>bo,Delta:()=>xc,DownloadAttachmentRequestEntityType:()=>it,ErrorCountWithDeviation:()=>ma,ErrorCountWithDeviationDetailed:()=>Tm,ErrorInfo:()=>Se,ErrorInfoExperimentItemBulkWriteView:()=>Br,ErrorInfoPublic:()=>ga,ErrorInfoWrite:()=>ao,ErrorMessage:()=>te,ErrorMessageDetail:()=>Wb,ErrorMessageDetailed:()=>Fb,ErrorMessagePublic:()=>Rb,Experiment:()=>Ab,ExperimentGroupAggregationsResponse:()=>Sl,ExperimentGroupResponse:()=>kl,ExperimentItem:()=>Fr,ExperimentItemBulkRecord:()=>fl,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>gs,ExperimentItemBulkUpload:()=>Eb,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Lr,ExperimentItemCompare:()=>Oc,ExperimentItemCompareTraceVisibilityMode:()=>Fc,ExperimentItemPublic:()=>ra,ExperimentItemPublicTraceVisibilityMode:()=>Yc,ExperimentItemStreamRequest:()=>Hr,ExperimentItemTraceVisibilityMode:()=>ns,ExperimentItemsBatch:()=>Or,ExperimentItemsDelete:()=>Wr,ExperimentPagePublic:()=>bl,ExperimentPublic:()=>ia,ExperimentPublicStatus:()=>wl,ExperimentPublicType:()=>hl,ExperimentStatus:()=>pl,ExperimentStreamRequestPublic:()=>Jr,ExperimentType:()=>sl,ExperimentUpdate:()=>Vr,ExperimentUpdateStatus:()=>ft,ExperimentUpdateType:()=>gt,ExperimentWrite:()=>Mr,ExperimentWriteStatus:()=>ut,ExperimentWriteType:()=>dt,ExportTraceServiceRequest:()=>Db,Feedback:()=>jb,FeedbackCreate:()=>Bl,FeedbackDefinitionPagePublic:()=>Xl,FeedbackObjectPublic:()=>Kl,FeedbackPublic:()=>$l,FeedbackScore:()=>ee,FeedbackScoreAverage:()=>pe,FeedbackScoreAverageDetailed:()=>Am,FeedbackScoreAveragePublic:()=>Ve,FeedbackScoreBatch:()=>wa,FeedbackScoreBatchItem:()=>Gm,FeedbackScoreBatchItemSource:()=>Xm,FeedbackScoreBatchItemThread:()=>Ss,FeedbackScoreBatchItemThreadSource:()=>zs,FeedbackScoreBatchThread:()=>xo,FeedbackScoreCompare:()=>Mc,FeedbackScoreCompareSource:()=>Uc,FeedbackScoreExperimentItemBulkWriteView:()=>us,FeedbackScoreExperimentItemBulkWriteViewSource:()=>ls,FeedbackScoreNames:()=>xm,FeedbackScorePublic:()=>fa,FeedbackScorePublicSource:()=>Lm,FeedbackScoreSource:()=>as,FeedbackUpdate:()=>am,FindFeedbackDefinitionsRequestType:()=>bt,FindFeedbackScoreNames1RequestType:()=>jt,Function:()=>So,FunctionCall:()=>_e,GetSpanStatsRequestType:()=>It,GetSpansByProjectRequestType:()=>Ct,GetWebhookExamplesRequestAlertType:()=>ot,GroupContent:()=>xl,GroupContentWithAggregations:()=>zl,GroupDetail:()=>Rl,GroupDetails:()=>yl,Guardrail:()=>nm,GuardrailBatch:()=>Ib,GuardrailBatchWrite:()=>Eo,GuardrailName:()=>tm,GuardrailResult:()=>im,GuardrailWrite:()=>Ms,GuardrailWriteName:()=>Ds,GuardrailWriteResult:()=>Ns,GuardrailsValidation:()=>dl,GuardrailsValidationPublic:()=>Zm,IdsHolder:()=>Pb,ImageUrl:()=>Tp,ImageUrlPublic:()=>Zp,ImageUrlWrite:()=>Np,JsonListString:()=>D,JsonListStringCompare:()=>Qt,JsonListStringExperimentItemBulkWriteView:()=>we,JsonListStringPublic:()=>ce,JsonListStringWrite:()=>se,JsonNode:()=>N,JsonNodeDetail:()=>bs,JsonNodePublic:()=>Te,JsonNodeWrite:()=>Be,JsonSchema:()=>js,LlmAsJudgeCode:()=>Fo,LlmAsJudgeCodePublic:()=>oc,LlmAsJudgeCodeWrite:()=>Wp,LlmAsJudgeMessage:()=>No,LlmAsJudgeMessageContent:()=>Ep,LlmAsJudgeMessageContentPublic:()=>ec,LlmAsJudgeMessageContentWrite:()=>Fp,LlmAsJudgeMessagePublic:()=>Ko,LlmAsJudgeMessagePublicRole:()=>Yp,LlmAsJudgeMessageRole:()=>_p,LlmAsJudgeMessageWrite:()=>Vo,LlmAsJudgeMessageWriteRole:()=>Dp,LlmAsJudgeModelParameters:()=>Do,LlmAsJudgeModelParametersPublic:()=>Jo,LlmAsJudgeModelParametersWrite:()=>Lo,LlmAsJudgeOutputSchema:()=>Mo,LlmAsJudgeOutputSchemaPublic:()=>Xo,LlmAsJudgeOutputSchemaPublicType:()=>rc,LlmAsJudgeOutputSchemaType:()=>Pp,LlmAsJudgeOutputSchemaWrite:()=>Ho,LlmAsJudgeOutputSchemaWriteType:()=>Op,LogItem:()=>lc,LogItemLevel:()=>cc,LogPage:()=>mc,ManualEvaluationRequest:()=>ei,ManualEvaluationRequestEntityType:()=>lm,ManualEvaluationResponse:()=>qt,Message:()=>Es,MultipartUploadPart:()=>Rp,NumericalFeedbackDefinition:()=>jl,NumericalFeedbackDefinitionCreate:()=>Ol,NumericalFeedbackDefinitionPublic:()=>pa,NumericalFeedbackDefinitionUpdate:()=>rm,NumericalFeedbackDetail:()=>Cl,NumericalFeedbackDetailCreate:()=>Fl,NumericalFeedbackDetailPublic:()=>Hl,NumericalFeedbackDetailUpdate:()=>em,Optimization:()=>Nb,OptimizationPagePublic:()=>gm,OptimizationPublic:()=>la,OptimizationPublicStatus:()=>um,OptimizationStatus:()=>mm,OptimizationUpdate:()=>Gr,OptimizationUpdateStatus:()=>kt,OptimizationWrite:()=>ri,OptimizationWriteStatus:()=>dm,PageColumns:()=>al,PercentageValueStatPublic:()=>Xc,PercentageValues:()=>Ae,PercentageValuesDetailed:()=>Em,PercentageValuesPublic:()=>ea,Project:()=>Mb,ProjectDetailed:()=>Cm,ProjectDetailedVisibility:()=>Pm,ProjectMetricRequestPublic:()=>Yr,ProjectMetricRequestPublicInterval:()=>Tt,ProjectMetricRequestPublicMetricType:()=>_t,ProjectMetricResponsePublic:()=>zm,ProjectMetricResponsePublicInterval:()=>km,ProjectMetricResponsePublicMetricType:()=>ym,ProjectPagePublic:()=>wm,ProjectPublic:()=>da,ProjectPublicVisibility:()=>hm,ProjectRetrieveDetailed:()=>Zr,ProjectStatItemObjectPublic:()=>$c,ProjectStatsPublic:()=>Je,ProjectStatsSummary:()=>_m,ProjectStatsSummaryItem:()=>Sm,ProjectUpdate:()=>Qr,ProjectUpdateVisibility:()=>St,ProjectVisibility:()=>fm,ProjectWrite:()=>$r,ProjectWriteVisibility:()=>zt,Prompt:()=>Ob,PromptDetail:()=>Dm,PromptPagePublic:()=>Wm,PromptPublic:()=>Om,PromptTokensDetails:()=>yc,PromptType:()=>jm,PromptUpdatable:()=>ro,PromptVersion:()=>Um,PromptVersionDetail:()=>ke,PromptVersionDetailType:()=>xs,PromptVersionLink:()=>Yt,PromptVersionLinkPublic:()=>Zt,PromptVersionLinkWrite:()=>wt,PromptVersionPagePublic:()=>Fm,PromptVersionPublic:()=>Mm,PromptVersionPublicType:()=>Nm,PromptVersionRetrieveDetail:()=>oo,PromptVersionType:()=>Im,PromptWrite:()=>qr,PromptWriteType:()=>Et,ProviderApiKey:()=>Ub,ProviderApiKeyPagePublic:()=>pm,ProviderApiKeyProvider:()=>cm,ProviderApiKeyPublic:()=>ca,ProviderApiKeyPublicProvider:()=>sm,ProviderApiKeyUpdate:()=>Xr,ProviderApiKeyWrite:()=>Kr,ProviderApiKeyWriteProvider:()=>Rt,ResponseFormat:()=>Is,ResponseFormatType:()=>Cs,Result:()=>Xe,ResultsNumberPublic:()=>vm,ScoreName:()=>bm,ServiceTogglesConfig:()=>Bm,Span:()=>ta,SpanBatch:()=>Bb,SpanBatchUpdate:()=>so,SpanBatchWrite:()=>io,SpanEnrichmentOptions:()=>rs,SpanExperimentItemBulkWriteView:()=>cs,SpanExperimentItemBulkWriteViewType:()=>ps,SpanFilterPublic:()=>vs,SpanFilterPublicOperator:()=>ks,SpanPagePublic:()=>Km,SpanPublic:()=>ha,SpanPublicType:()=>Jm,SpanSearchStreamRequestPublic:()=>po,SpanSearchStreamRequestPublicType:()=>Ut,SpanType:()=>gl,SpanUpdate:()=>no,SpanUpdateType:()=>ys,SpanWrite:()=>to,SpanWriteType:()=>Rs,SpansCountResponse:()=>Ws,StartMultipartUploadRequest:()=>kr,StartMultipartUploadRequestEntityType:()=>nt,StartMultipartUploadResponse:()=>kp,StreamOptions:()=>Ps,Tool:()=>Us,ToolCall:()=>Zo,Trace:()=>aa,TraceBatch:()=>Lb,TraceBatchUpdate:()=>uo,TraceBatchWrite:()=>lo,TraceCountResponse:()=>Ls,TraceEnrichmentOptions:()=>os,TraceExperimentItemBulkWriteView:()=>ss,TraceFilter:()=>Uo,TraceFilterOperator:()=>Sp,TraceFilterPublic:()=>ze,TraceFilterPublicOperator:()=>fs,TraceFilterWrite:()=>$p,TraceFilterWriteOperator:()=>Gp,TracePagePublic:()=>od,TracePublic:()=>ba,TracePublicVisibilityMode:()=>qm,TraceSearchStreamRequestPublic:()=>yo,TraceThread:()=>xa,TraceThreadBatchIdentifier:()=>ho,TraceThreadBatchUpdate:()=>fo,TraceThreadFilter:()=>Ts,TraceThreadFilterOperator:()=>_s,TraceThreadFilterPublic:()=>ws,TraceThreadFilterPublicOperator:()=>hs,TraceThreadIdentifier:()=>oi,TraceThreadLlmAsJudgeCode:()=>Wo,TraceThreadLlmAsJudgeCodePublic:()=>tc,TraceThreadLlmAsJudgeCodeWrite:()=>Lp,TraceThreadPage:()=>rd,TraceThreadSearchStreamRequest:()=>Ro,TraceThreadStatus:()=>ed,TraceThreadUpdate:()=>go,TraceThreadUserDefinedMetricPythonCode:()=>Bo,TraceThreadUserDefinedMetricPythonCodePublic:()=>ic,TraceThreadUserDefinedMetricPythonCodeWrite:()=>Hp,TraceUpdate:()=>mo,TraceVisibilityMode:()=>ul,TraceWrite:()=>co,UploadAttachmentRequestEntityType:()=>st,Usage:()=>vc,UserDefinedMetricPythonCode:()=>Oo,UserDefinedMetricPythonCodePublic:()=>ac,UserDefinedMetricPythonCodeWrite:()=>Kp,ValueEntry:()=>is,ValueEntryCompare:()=>Nc,ValueEntryCompareSource:()=>Dc,ValueEntryExperimentItemBulkWriteView:()=>ds,ValueEntryExperimentItemBulkWriteViewSource:()=>ms,ValueEntryPublic:()=>Hm,ValueEntryPublicSource:()=>Vm,ValueEntrySource:()=>ts,VideoUrl:()=>Ap,VideoUrlPublic:()=>qp,VideoUrlWrite:()=>Mp,Webhook:()=>Hs,WebhookExamples:()=>pp,WebhookPublic:()=>op,WebhookTestResult:()=>lp,WebhookTestResultStatus:()=>cp,WebhookWrite:()=>ep,WelcomeWizardSubmission:()=>Po,WelcomeWizardTracking:()=>ad,WorkspaceConfiguration:()=>Ra,WorkspaceMetricRequest:()=>Jb,WorkspaceMetricResponse:()=>ai,WorkspaceMetricsSummaryRequest:()=>pr,WorkspaceMetricsSummaryResponse:()=>td,WorkspaceNameHolder:()=>zp,WorkspaceSpansCount:()=>Os,WorkspaceTraceCount:()=>Bs,alerts:()=>at,annotationQueues:()=>Ft,attachments:()=>or,chatCompletions:()=>Ot,dashboards:()=>Wt,datasets:()=>mt,experiments:()=>ar,feedbackDefinitions:()=>xt,guardrails:()=>Bt,llmProviderKey:()=>yt,optimizations:()=>vt,projects:()=>At,prompts:()=>Pt,spans:()=>tr,traces:()=>Le,welcomeWizard:()=>Lt});var at={};E(at,{GetWebhookExamplesRequestAlertType:()=>ot});var ot=r.enum_(["general","slack","pagerduty"]);var or={};E(or,{AttachmentListRequestEntityType:()=>tt,DownloadAttachmentRequestEntityType:()=>it,StartMultipartUploadRequest:()=>kr,StartMultipartUploadRequestEntityType:()=>nt,UploadAttachmentRequestEntityType:()=>st,uploadAttachment:()=>pt});var tt=r.enum_(["trace","span"]);var it=r.enum_(["trace","span"]);var nt=r.enum_(["trace","span"]);var st=r.enum_(["trace","span"]);var pt={};E(pt,{Request:()=>gb});var gb=r.record(r.string(),r.unknown());var kr=r.object({fileName:r.property("file_name",r.string()),numOfFileParts:r.property("num_of_file_parts",r.number()),mimeType:r.property("mime_type",r.string().optional()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",nt),entityId:r.property("entity_id",r.string()),path:r.string()});var mt={};E(mt,{CreateDatasetItemsFromSpansRequest:()=>Tr,CreateDatasetItemsFromTracesRequest:()=>Ar,DatasetExpansionWrite:()=>jr,DatasetIdentifier:()=>Pr,DatasetIdentifierPublic:()=>Ir,DatasetItemBatchUpdate:()=>vr,DatasetItemBatchWrite:()=>_r,DatasetItemStreamRequest:()=>Ur,DatasetItemsDelete:()=>Cr,DatasetUpdate:()=>Er,DatasetUpdateVisibility:()=>lt,DatasetVersionCreatePublic:()=>Nr,DatasetVersionTag:()=>Dr,DatasetWrite:()=>zr,DatasetWriteVisibility:()=>ct});var ct=r.enum_(["private","public"]);var lt=r.enum_(["private","public"]);var Yn=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Zn=r.object({field:r.string().optional(),operator:Yn.optional(),key:r.string().optional(),value:r.string().optional()});var N=r.record(r.string(),r.unknown());var qn=r.object({input:r.string().optional(),expectedOutput:r.property("expected_output",r.string().optional()),metadata:N.optional(),data:N.optional(),tags:r.list(r.string()).optional()});var vr=r.object({ids:r.list(r.string()).optional(),filters:r.list(Zn).optional(),update:qn,mergeTags:r.property("merge_tags",r.boolean().optional())});var zr=r.object({id:r.string().optional(),name:r.string(),visibility:ct.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});var es=r.enum_(["manual","trace","span","sdk"]);var Sr=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:es,data:N,tags:r.list(r.string()).optional()});var _r=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(Sr)});var rs=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Tr=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",rs)});var os=r.object({includeSpans:r.boolean().optional(),includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Ar=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",os)});var Er=r.object({name:r.string(),description:r.string().optional(),visibility:lt.optional(),tags:r.list(r.string()).optional()});var Pr=r.object({datasetName:r.property("dataset_name",r.string())});var Cr=r.object({itemIds:r.property("item_ids",r.list(r.string()))});var jr=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional())});var Ir=r.object({datasetName:r.property("dataset_name",r.string())});var Ur=r.object({datasetName:r.property("dataset_name",r.string()),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),steamLimit:r.property("steam_limit",r.number().optional())});var Dr=r.object({tag:r.string()});var Nr=r.object({tag:r.string().optional(),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional()});var ar={};E(ar,{ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Lr,ExperimentItemStreamRequest:()=>Hr,ExperimentItemsBatch:()=>Or,ExperimentItemsDelete:()=>Wr,ExperimentStreamRequestPublic:()=>Jr,ExperimentUpdate:()=>Vr,ExperimentUpdateStatus:()=>ft,ExperimentUpdateType:()=>gt,ExperimentWrite:()=>Mr,ExperimentWriteStatus:()=>ut,ExperimentWriteType:()=>dt,findFeedbackScoreNames:()=>ht});var dt=r.enum_(["regular","trial","mini-batch"]);var ut=r.enum_(["running","completed","cancelled"]);var gt=r.enum_(["regular","trial","mini-batch"]);var ft=r.enum_(["running","completed","cancelled"]);var ht={};E(ht,{Response:()=>fb});var fb=r.list(r.string());var se=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var wt=r.object({id:r.string()});var Mr=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),name:r.string().optional(),metadata:se.optional(),type:dt.optional(),optimizationId:r.property("optimization_id",r.string().optional()),status:ut.optional(),promptVersion:r.property("prompt_version",wt.optional()),promptVersions:r.property("prompt_versions",r.list(wt).optional())});var D=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var as=r.enum_(["ui","sdk","online_scoring"]);var ts=r.enum_(["ui","sdk","online_scoring"]);var is=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:ts.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var ee=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:as,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),is).optional())});var H=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var ns=r.enum_(["default","hidden"]);var Fr=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),input:D.optional(),output:D.optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",ns.optional())});var Or=r.object({experimentItems:r.property("experiment_items",r.list(Fr))});var Wr=r.object({ids:r.list(r.string())});var we=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var Br=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var ss=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:we.optional(),output:we.optional(),metadata:we.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Br.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var ps=r.enum_(["general","tool","llm","guardrail"]);var cs=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:ps.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:we.optional(),output:we.optional(),metadata:we.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Br.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional())});var ls=r.enum_(["ui","sdk","online_scoring"]);var ms=r.enum_(["ui","sdk","online_scoring"]);var ds=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:ms.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var us=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:ls,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),ds).optional())});var gs=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",we.optional()),trace:ss.optional(),spans:r.list(cs).optional(),feedbackScores:r.property("feedback_scores",r.list(us).optional())});var Lr=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(gs)});var Vr=r.object({name:r.string().optional(),metadata:N.optional(),type:gt.optional(),status:ft.optional()});var Hr=r.object({experimentName:r.property("experiment_name",r.string()),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional()});var Jr=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional())});var xt={};E(xt,{FindFeedbackDefinitionsRequestType:()=>bt});var bt=r.enum_(["numerical","categorical","boolean"]);var yt={};E(yt,{ProviderApiKeyUpdate:()=>Xr,ProviderApiKeyWrite:()=>Kr,ProviderApiKeyWriteProvider:()=>Rt});var Rt=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var Kr=r.object({provider:Rt,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});var Xr=r.object({apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});var vt={};E(vt,{OptimizationUpdate:()=>Gr,OptimizationUpdateStatus:()=>kt});var kt=r.enum_(["running","completed","cancelled"]);var Gr=r.object({name:r.string().optional(),status:kt.optional()});var At={};E(At,{ProjectMetricRequestPublic:()=>Yr,ProjectMetricRequestPublicInterval:()=>Tt,ProjectMetricRequestPublicMetricType:()=>_t,ProjectRetrieveDetailed:()=>Zr,ProjectUpdate:()=>Qr,ProjectUpdateVisibility:()=>St,ProjectWrite:()=>$r,ProjectWriteVisibility:()=>zt});var zt=r.enum_(["private","public"]);var St=r.enum_(["private","public"]);var _t=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Tt=r.enum_(["HOURLY","DAILY","WEEKLY"]);var $r=r.object({name:r.string(),visibility:zt.optional(),description:r.string().optional()});var Qr=r.object({name:r.string().optional(),description:r.string().optional(),visibility:St.optional()});var fs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ze=r.object({field:r.string().optional(),operator:fs.optional(),key:r.string().optional(),value:r.string().optional()});var hs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ws=r.object({field:r.string().optional(),operator:hs.optional(),key:r.string().optional(),value:r.string().optional()});var Yr=r.object({metricType:r.property("metric_type",_t.optional()),interval:Tt.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),traceFilters:r.property("trace_filters",r.list(ze).optional()),threadFilters:r.property("thread_filters",r.list(ws).optional())});var Zr=r.object({name:r.string()});var Pt={};E(Pt,{CreatePromptVersionDetail:()=>eo,PromptUpdatable:()=>ro,PromptVersionRetrieveDetail:()=>oo,PromptWrite:()=>qr,PromptWriteType:()=>Et});var Et=r.enum_(["mustache","jinja2"]);var Be=r.record(r.string(),r.unknown());var qr=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:Be.optional(),changeDescription:r.property("change_description",r.string().optional()),type:Et.optional(),tags:r.list(r.string()).optional()});var bs=r.record(r.string(),r.unknown());var xs=r.enum_(["mustache","jinja2"]);var ke=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:bs.optional(),type:xs.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var eo=r.object({name:r.string(),version:ke});var ro=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});var oo=r.object({name:r.string(),commit:r.string().optional()});var tr={};E(tr,{FindFeedbackScoreNames1RequestType:()=>jt,GetSpanStatsRequestType:()=>It,GetSpansByProjectRequestType:()=>Ct,SpanBatchUpdate:()=>so,SpanBatchWrite:()=>io,SpanSearchStreamRequestPublic:()=>po,SpanSearchStreamRequestPublicType:()=>Ut,findFeedbackScoreNames1:()=>Dt});var Ct=r.enum_(["general","tool","llm","guardrail"]);var jt=r.enum_(["general","tool","llm","guardrail"]);var It=r.enum_(["general","tool","llm","guardrail"]);var Ut=r.enum_(["general","tool","llm","guardrail"]);var Dt={};E(Dt,{Response:()=>hb});var hb=r.list(r.string());var Rs=r.enum_(["general","tool","llm","guardrail"]);var ao=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var to=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Rs.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:se.optional(),output:se.optional(),metadata:se.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",ao.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional())});var io=r.object({spans:r.list(to)});var ys=r.enum_(["general","tool","llm","guardrail"]);var Se=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var no=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:ys.optional(),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),errorInfo:r.property("error_info",Se.optional())});var so=r.object({ids:r.list(r.string()),update:no,mergeTags:r.property("merge_tags",r.boolean().optional())});var ks=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var vs=r.object({field:r.string().optional(),operator:ks.optional(),key:r.string().optional(),value:r.string().optional()});var po=r.object({traceId:r.property("trace_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),type:Ut.optional(),filters:r.list(vs).optional(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var Le={};E(Le,{DeleteThreadFeedbackScores:()=>wo,DeleteTraceThreads:()=>bo,FeedbackScoreBatchThread:()=>xo,TraceBatchUpdate:()=>uo,TraceBatchWrite:()=>lo,TraceSearchStreamRequestPublic:()=>yo,TraceThreadBatchIdentifier:()=>ho,TraceThreadBatchUpdate:()=>fo,TraceThreadSearchStreamRequest:()=>Ro,findFeedbackScoreNames2:()=>Nt,findTraceThreadsFeedbackScoreNames:()=>Mt});var Nt={};E(Nt,{Response:()=>wb});var wb=r.list(r.string());var Mt={};E(Mt,{Response:()=>bb});var bb=r.list(r.string());var co=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:se.optional(),output:se.optional(),metadata:se.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",ao.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var lo=r.object({traces:r.list(co)});var mo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Se.optional()),threadId:r.property("thread_id",r.string().optional())});var uo=r.object({ids:r.list(r.string()),update:mo,mergeTags:r.property("merge_tags",r.boolean().optional())});var go=r.object({tags:r.list(r.string()).optional()});var fo=r.object({ids:r.list(r.string()),update:go,mergeTags:r.property("merge_tags",r.boolean().optional())});var ho=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()).optional())});var wo=r.object({projectName:r.property("project_name",r.string()),threadId:r.property("thread_id",r.string()),names:r.list(r.string()),author:r.string().optional()});var bo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()))});var zs=r.enum_(["ui","sdk","online_scoring"]);var Ss=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:zs,author:r.string().optional(),threadId:r.property("thread_id",r.string())});var xo=r.object({scores:r.list(Ss)});var _s=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ts=r.object({field:r.string().optional(),operator:_s.optional(),key:r.string().optional(),value:r.string().optional()});var Ro=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Ts).optional(),lastRetrievedThreadModelId:r.property("last_retrieved_thread_model_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var yo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(ze).optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var Ft={};E(Ft,{AnnotationQueueBatchWrite:()=>vo,AnnotationQueueUpdate:()=>zo});var As=r.enum_(["trace","thread"]);var ko=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:As,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var vo=r.object({annotationQueues:r.property("annotation_queues",r.list(ko))});var zo=r.object({name:r.string().optional(),description:r.string().optional(),instructions:r.string().optional(),commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var Ot={};E(Ot,{ChatCompletionRequest:()=>_o});var Es=r.record(r.string(),r.unknown());var Ps=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});var Cs=r.enum_(["text","json_object","json_schema"]);var js=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var Is=r.object({type:Cs.optional(),jsonSchema:r.property("json_schema",js.optional())});var So=r.object({name:r.string().optional(),description:r.string().optional(),strict:r.boolean().optional(),parameters:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var Us=r.object({type:r.stringLiteral("function").optional(),function:So.optional()});var _e=r.object({name:r.string().optional(),arguments:r.string().optional()});var _o=r.object({model:r.string().optional(),messages:r.list(Es).optional(),temperature:r.number().optional(),topP:r.property("top_p",r.number().optional()),n:r.number().optional(),stream:r.boolean().optional(),streamOptions:r.property("stream_options",Ps.optional()),stop:r.list(r.string()).optional(),maxTokens:r.property("max_tokens",r.number().optional()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional()),presencePenalty:r.property("presence_penalty",r.number().optional()),frequencyPenalty:r.property("frequency_penalty",r.number().optional()),logitBias:r.property("logit_bias",r.record(r.string(),r.number()).optional()),user:r.string().optional(),responseFormat:r.property("response_format",Is.optional()),seed:r.number().optional(),tools:r.list(Us).optional(),toolChoice:r.property("tool_choice",r.record(r.string(),r.unknown()).optional()),parallelToolCalls:r.property("parallel_tool_calls",r.boolean().optional()),store:r.boolean().optional(),metadata:r.record(r.string(),r.string()).optional(),reasoningEffort:r.property("reasoning_effort",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional()),functions:r.list(So).optional(),functionCall:r.property("function_call",_e.optional())});var Wt={};E(Wt,{DashboardUpdatePublic:()=>Ao,DashboardWrite:()=>To});var To=r.object({name:r.string(),description:r.string().optional(),config:Be});var Te=r.record(r.string(),r.unknown());var Ao=r.object({name:r.string().optional(),description:r.string().optional(),config:Te.optional()});var Bt={};E(Bt,{GuardrailBatchWrite:()=>Eo});var Ds=r.enum_(["TOPIC","PII"]);var Ns=r.enum_(["passed","failed"]);var Ms=r.object({entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:Ds,result:Ns,config:N,details:N});var Eo=r.object({guardrails:r.list(Ms)});var Lt={};E(Lt,{WelcomeWizardSubmission:()=>Po});var Po=r.object({role:r.string().optional(),integrations:r.list(r.string()).optional(),email:r.string().optional(),joinBetaProgram:r.property("join_beta_program",r.boolean().optional())});var Fs=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});var ir=r.object({biInformation:r.property("bi_information",r.list(Fs).optional())});var Os=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});var Ws=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(Os).optional())});var Bs=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});var Ls=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(Bs).optional())});var te=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Vs=r.enum_(["general","slack","pagerduty"]);var Hs=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Js=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var Ks=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var Xs=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:Ks,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Gs=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",Js),triggerConfigs:r.property("trigger_configs",r.list(Xs).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var xb=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",Vs.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:Hs,triggers:r.list(Gs).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var $s=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var Qs=r.object({id:r.string().optional(),type:$s,configValue:r.property("config_value",r.record(r.string(),r.string()).optional())});var Ys=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var Zs=r.object({id:r.string().optional(),eventType:r.property("event_type",Ys),triggerConfigs:r.property("trigger_configs",r.list(Qs).optional())});var qs=r.enum_(["general","slack","pagerduty"]);var ep=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional()});var Co=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",qs.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:ep,triggers:r.list(Zs).optional()});var L=r.object({ids:r.list(r.string())});var rp=r.enum_(["general","slack","pagerduty"]);var op=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var ap=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var tp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var ip=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:tp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var np=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",ap),triggerConfigs:r.property("trigger_configs",r.list(ip).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var jo=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",rp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:op,triggers:r.list(np).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var sp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(jo).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Rb=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var pp=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});var cp=r.enum_(["success","failure"]);var lp=r.object({status:cp.optional(),statusCode:r.property("status_code",r.number().optional()),requestBody:r.property("request_body",r.string().optional()),errorMessage:r.property("error_message",r.string().optional())});var Vt=r.object({ids:r.list(r.string())});var mp=r.enum_(["trace","thread"]);var dp=r.object({username:r.string().optional(),status:r.number().optional()});var pe=r.object({name:r.string(),value:r.number()});var up=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:mp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(dp).optional(),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var yb=r.object({annotationQueues:r.property("annotation_queues",r.list(up))});var gp=r.enum_(["trace","thread"]);var fp=r.object({username:r.string().optional(),status:r.number().optional()});var Ve=r.object({name:r.string(),value:r.number()});var Io=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:gp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(fp).optional(),feedbackScores:r.property("feedback_scores",r.list(Ve).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var hp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Io).optional(),sortableBy:r.list(r.string()).optional()});var wp=r.object({link:r.string().optional(),fileName:r.property("file_name",r.string()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string())});var bp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(wp).optional(),sortableBy:r.list(r.string()).optional()});var xp=r.enum_(["trace","span"]);var Rp=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});var Ht=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",xp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string().optional()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string().optional()),uploadId:r.property("upload_id",r.string()),uploadedFileParts:r.property("uploaded_file_parts",r.list(Rp))});var yp=r.enum_(["trace","span"]);var kb=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",yp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});var kp=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});var vp=r.record(r.string(),r.unknown());var zp=r.object({workspaceName:r.property("workspace_name",r.string().optional())});var Sp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Uo=r.object({field:r.string().optional(),operator:Sp.optional(),key:r.string().optional(),value:r.string().optional()});var Do=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",N.optional())});var _p=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Tp=r.object({url:r.string(),detail:r.string().optional()});var Ap=r.object({url:r.string()});var Ep=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Tp.optional()),videoUrl:r.property("video_url",Ap.optional())});var No=r.object({role:_p,content:r.string().optional(),contentArray:r.property("content_array",r.list(Ep).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Pp=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Mo=r.object({name:r.string(),type:Pp,description:r.string()});var Fo=r.object({model:Do,messages:r.list(No),variables:r.record(r.string(),r.string()),schema:r.list(Mo)});var Cp=r.object({code:Fo.optional()});var Oo=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var jp=r.object({code:Oo.optional()});var Wo=r.object({model:Do,messages:r.list(No),schema:r.list(Mo)});var Ip=r.object({code:Wo.optional()});var Bo=r.object({metric:r.string()});var Up=r.object({code:Bo.optional()});var Jt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(Uo).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),vb=r.union("type",{llm_as_judge:Cp.extend(Jt),user_defined_metric_python:jp.extend(Jt),trace_thread_llm_as_judge:Ip.extend(Jt),trace_thread_user_defined_metric_python:Up.extend(Jt)}).transform({transform:i=>i,untransform:i=>i});var Lo=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Be.optional())});var Dp=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Np=r.object({url:r.string(),detail:r.string().optional()});var Mp=r.object({url:r.string()});var Fp=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Np.optional()),videoUrl:r.property("video_url",Mp.optional())});var Vo=r.object({role:Dp,content:r.string().optional(),contentArray:r.property("content_array",r.list(Fp).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Op=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Ho=r.object({name:r.string(),type:Op,description:r.string()});var Wp=r.object({model:Lo,messages:r.list(Vo),variables:r.record(r.string(),r.string()),schema:r.list(Ho)});var Bp=r.object({code:Wp.optional()});var Lp=r.object({model:Lo,messages:r.list(Vo),schema:r.list(Ho)});var Vp=r.object({code:Lp.optional()});var Hp=r.object({metric:r.string()});var Jp=r.object({code:Hp.optional()});var Kp=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Xp=r.object({code:Kp.optional()});var Gp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var $p=r.object({field:r.string().optional(),operator:Gp.optional(),key:r.string().optional(),value:r.string().optional()});var Kt=r.object({projectId:r.property("project_id",r.string()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list($p).optional(),action:r.stringLiteral("evaluator")}),Qp=r.union("type",{llm_as_judge:Bp.extend(Kt),user_defined_metric_python:Xp.extend(Kt),trace_thread_llm_as_judge:Vp.extend(Kt),trace_thread_user_defined_metric_python:Jp.extend(Kt)}).transform({transform:i=>i,untransform:i=>i});var Jo=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Te.optional())});var Yp=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Zp=r.object({url:r.string(),detail:r.string().optional()});var qp=r.object({url:r.string()});var ec=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Zp.optional()),videoUrl:r.property("video_url",qp.optional())});var Ko=r.object({role:Yp,content:r.string().optional(),contentArray:r.property("content_array",r.list(ec).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var rc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Xo=r.object({name:r.string(),type:rc,description:r.string()});var oc=r.object({model:Jo,messages:r.list(Ko),variables:r.record(r.string(),r.string()),schema:r.list(Xo)});var Go=r.object({code:oc.optional()});var ac=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var $o=r.object({code:ac.optional()});var tc=r.object({model:Jo,messages:r.list(Ko),schema:r.list(Xo)});var Qo=r.object({code:tc.optional()});var ic=r.object({metric:r.string()});var Yo=r.object({code:ic.optional()});var Xt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(ze).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),nc=r.union("type",{llm_as_judge:Go.extend(Xt),user_defined_metric_python:$o.extend(Xt),trace_thread_llm_as_judge:Qo.extend(Xt),trace_thread_user_defined_metric_python:Yo.extend(Xt)}).transform({transform:i=>i,untransform:i=>i});var sc=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(nc).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Gt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(ze).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),pc=r.union("type",{llm_as_judge:Go.extend(Gt),user_defined_metric_python:$o.extend(Gt),trace_thread_llm_as_judge:Qo.extend(Gt),trace_thread_user_defined_metric_python:Yo.extend(Gt)}).transform({transform:i=>i,untransform:i=>i});var cc=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);var lc=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:cc.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});var mc=r.object({content:r.list(lc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var dc=r.object({code:Fo.optional()});var uc=r.object({code:Oo.optional()});var gc=r.object({code:Wo.optional()});var fc=r.object({code:Bo.optional()});var $t=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(Uo).optional(),projectId:r.property("project_id",r.string()),action:r.stringLiteral("evaluator")}),hc=r.union("type",{llm_as_judge:dc.extend($t),user_defined_metric_python:uc.extend($t),trace_thread_llm_as_judge:gc.extend($t),trace_thread_user_defined_metric_python:fc.extend($t)}).transform({transform:i=>i,untransform:i=>i});var wc=r.enum_(["system","user","assistant","tool","function"]);var Zo=r.object({id:r.string().optional(),index:r.number().optional(),type:r.stringLiteral("function").optional(),function:_e.optional()});var bc=r.object({role:wc.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(Zo).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",_e.optional())});var xc=r.object({role:r.string().optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),toolCalls:r.property("tool_calls",r.list(Zo).optional()),functionCall:r.property("function_call",_e.optional())});var Rc=r.object({index:r.number().optional(),message:bc.optional(),delta:xc.optional(),finishReason:r.property("finish_reason",r.string().optional())});var yc=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});var kc=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});var vc=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",yc.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",kc.optional())});var zc=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(Rc).optional(),usage:vc.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});var He=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),name:r.string(),slug:r.string().optional(),description:r.string().optional(),config:Te,createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var Sc=r.object({content:r.list(He).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var _c=r.enum_(["private","public"]);var Tc=r.enum_(["unknown","processing","completed","failed"]);var zb=r.object({id:r.string().optional(),name:r.string(),visibility:_c.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:Tc.optional()});var Ac=r.enum_(["manual","trace","span","sdk"]);var qo=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Ac,data:N,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(Fr).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Sb=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(qo)});var Ec=r.object({generatedSamples:r.property("generated_samples",r.list(qo).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});var _b=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional())});var Pc=r.enum_(["string","number","object","boolean","array","null"]);var Cc=r.object({name:r.string().optional(),types:r.list(Pc).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var jc=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Ic=r.enum_(["manual","trace","span","sdk"]);var Qt=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var Uc=r.enum_(["ui","sdk","online_scoring"]);var Dc=r.enum_(["ui","sdk","online_scoring"]);var Nc=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Dc.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var Mc=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Uc,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Nc).optional())});var Fc=r.enum_(["default","hidden"]);var Oc=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),input:Qt.optional(),output:Qt.optional(),feedbackScores:r.property("feedback_scores",r.list(Mc).optional()),comments:r.list(jc).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Fc.optional())});var Wc=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Ic,data:N,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(Oc).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Bc=r.object({content:r.list(Wc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Cc).optional(),sortableBy:r.list(r.string()).optional()});var Lc=r.enum_(["private","public"]);var Vc=r.enum_(["unknown","processing","completed","failed"]);var nr=r.object({id:r.string().optional(),name:r.string(),visibility:Lc.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:Vc.optional()});var Hc=r.object({content:r.list(nr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});var Jc=r.object({value:r.number().optional()});var Kc=r.object({value:r.number().optional()});var ea=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Xc=r.object({value:ea.optional()});var Gc=r.object({name:r.string().optional()}),$c=r.union("type",{PERCENTAGE:Xc.extend(Gc),COUNT:Kc.extend(Gc),AVG:Jc.extend(Gc)}).transform({transform:i=>i,untransform:i=>i});var Je=r.object({stats:r.list($c).optional()});var Qc=r.enum_(["manual","trace","span","sdk"]);var Yc=r.enum_(["default","hidden"]);var ra=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Yc.optional())});var oa=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Qc,data:N,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(ra).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Zc=r.enum_(["string","number","object","boolean","array","null"]);var qc=r.object({name:r.string().optional(),types:r.list(Zc).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var el=r.object({content:r.list(oa).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(qc).optional(),sortableBy:r.list(r.string()).optional()});var rl=r.enum_(["string","number","object","boolean","array","null"]);var ol=r.object({name:r.string().optional(),types:r.list(rl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var al=r.object({columns:r.list(ol).optional()});var tl=r.object({typeName:r.string().optional()});var Tb=r.object({type:tl.optional(),closed:r.boolean().optional()});var il=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),versionHash:r.property("version_hash",r.string().optional()),tags:r.list(r.string()).optional(),itemsTotal:r.property("items_total",r.number().optional()),itemsAdded:r.property("items_added",r.number().optional()),itemsModified:r.property("items_modified",r.number().optional()),itemsDeleted:r.property("items_deleted",r.number().optional()),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var nl=r.object({content:r.list(il).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var sl=r.enum_(["regular","trial","mini-batch"]);var pl=r.enum_(["running","completed","cancelled"]);var Ae=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Yt=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});var Ab=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),datasetId:r.property("dataset_id",r.string().optional()),name:r.string().optional(),metadata:D.optional(),type:sl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),comments:r.list(H).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:Ae.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:pl.optional(),promptVersion:r.property("prompt_version",Yt.optional()),promptVersions:r.property("prompt_versions",r.list(Yt).optional())});var sr=r.object({ids:r.list(r.string())});var cl=r.enum_(["TOPIC","PII"]);var ll=r.enum_(["passed","failed"]);var ml=r.object({name:cl.optional(),result:ll.optional()});var dl=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(ml).optional()});var ul=r.enum_(["default","hidden"]);var aa=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Se.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(dl).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",ul.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional()});var gl=r.enum_(["general","tool","llm","guardrail"]);var ta=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:gl.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Se.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional()});var fl=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",D.optional()),trace:aa.optional(),spans:r.list(ta).optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional())});var Eb=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(fl)});var Ke=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var ce=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var hl=r.enum_(["regular","trial","mini-batch"]);var wl=r.enum_(["running","completed","cancelled"]);var Zt=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});var ia=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),datasetId:r.property("dataset_id",r.string().optional()),name:r.string().optional(),metadata:ce.optional(),type:hl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Ve).optional()),comments:r.list(Ke).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:ea.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:wl.optional(),promptVersion:r.property("prompt_version",Zt.optional()),promptVersions:r.property("prompt_versions",r.list(Zt).optional())});var bl=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ia).optional(),sortableBy:r.list(r.string()).optional()});var xl=r.object({label:r.string().optional()});var Rl=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});var yl=r.object({groupsDetails:r.property("groups_details",r.list(Rl).optional())});var kl=r.object({content:r.record(r.string(),xl).optional(),details:yl.optional()});var vl=r.object({experimentCount:r.property("experiment_count",r.number().optional()),traceCount:r.property("trace_count",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),duration:Ae.optional(),feedbackScores:r.property("feedback_scores",r.list(pe).optional())});var zl=r.object({aggregations:vl.optional()});var Sl=r.object({content:r.record(r.string(),zl).optional()});var Pb=r.object({ids:r.list(r.string())});var _l=r.object({typeName:r.string().optional()});var Cb=r.object({type:_l.optional(),closed:r.boolean().optional()});var Tl=r.object({trueLabel:r.string(),falseLabel:r.string()});var Al=r.object({details:Tl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var El=r.object({categories:r.record(r.string(),r.number())});var Pl=r.object({details:El.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Cl=r.object({max:r.number(),min:r.number()});var jl=r.object({details:Cl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Il=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),jb=r.union("type",{numerical:jl.extend(Il),categorical:Pl.extend(Il),boolean:Al.extend(Il)}).transform({transform:i=>i,untransform:i=>i});var Ul=r.object({trueLabel:r.string(),falseLabel:r.string()});var Dl=r.object({details:Ul.optional()});var Nl=r.object({categories:r.record(r.string(),r.number())});var Ml=r.object({details:Nl.optional()});var Fl=r.object({max:r.number(),min:r.number()});var Ol=r.object({details:Fl.optional()});var Wl=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Bl=r.union("type",{numerical:Ol.extend(Wl),categorical:Ml.extend(Wl),boolean:Dl.extend(Wl)}).transform({transform:i=>i,untransform:i=>i});var Ll=r.object({trueLabel:r.string(),falseLabel:r.string()});var na=r.object({details:Ll.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Vl=r.object({categories:r.record(r.string(),r.number())});var sa=r.object({details:Vl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Hl=r.object({max:r.number(),min:r.number()});var pa=r.object({details:Hl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Jl=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Kl=r.union("type",{numerical:pa.extend(Jl),categorical:sa.extend(Jl),boolean:na.extend(Jl)}).transform({transform:i=>i,untransform:i=>i});var Xl=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Kl).optional()});var Gl=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),$l=r.union("type",{numerical:pa.extend(Gl),categorical:sa.extend(Gl),boolean:na.extend(Gl)}).transform({transform:i=>i,untransform:i=>i});var Ql=r.object({trueLabel:r.string(),falseLabel:r.string()});var Yl=r.object({details:Ql.optional()});var Zl=r.object({categories:r.record(r.string(),r.number())});var ql=r.object({details:Zl.optional()});var em=r.object({max:r.number(),min:r.number()});var rm=r.object({details:em.optional()});var om=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),am=r.union("type",{numerical:rm.extend(om),categorical:ql.extend(om),boolean:Yl.extend(om)}).transform({transform:i=>i,untransform:i=>i});var tm=r.enum_(["TOPIC","PII"]);var im=r.enum_(["passed","failed"]);var nm=r.object({id:r.string().optional(),entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:tm,result:im,config:N,details:N});var Ib=r.object({guardrails:r.list(nm)});var sm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var ca=r.object({id:r.string().optional(),provider:sm,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var pm=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(ca).optional(),sortableBy:r.list(r.string()).optional()});var cm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var Ub=r.object({id:r.string().optional(),provider:cm,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var qt=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});var lm=r.enum_(["trace","thread"]);var ei=r.object({projectId:r.property("project_id",r.string()),entityIds:r.property("entity_ids",r.list(r.string())),ruleIds:r.property("rule_ids",r.list(r.string())),entityType:r.property("entity_type",lm)});var Db=N;var mm=r.enum_(["running","completed","cancelled"]);var Nb=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:mm,metadata:D.optional(),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var dm=r.enum_(["running","completed","cancelled"]);var ri=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:dm,metadata:se.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var um=r.enum_(["running","completed","cancelled"]);var la=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:um,metadata:ce.optional(),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Ve).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var gm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(la).optional(),sortableBy:r.list(r.string()).optional()});var ma=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var fm=r.enum_(["private","public"]);var Mb=r.object({id:r.string().optional(),name:r.string(),visibility:fm.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),duration:Ae.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",ma.optional())});var hm=r.enum_(["private","public"]);var da=r.object({id:r.string().optional(),name:r.string(),visibility:hm.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional())});var wm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(da).optional(),sortableBy:r.list(r.string()).optional()});var bm=r.object({name:r.string().optional()});var xm=r.object({scores:r.list(bm).optional()});var Rm=r.object({time:r.date(),value:r.number().optional()});var ym=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var km=r.enum_(["HOURLY","DAILY","WEEKLY"]);var vm=r.object({name:r.string().optional(),data:r.list(Rm).optional()});var zm=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",ym.optional()),interval:km.optional(),results:r.list(vm).optional()});var Sm=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),duration:Ae.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",ma.optional())});var _m=r.object({content:r.list(Sm).optional()});var Tm=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var Am=r.object({name:r.string(),value:r.number()});var Em=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Pm=r.enum_(["private","public"]);var Cm=r.object({id:r.string().optional(),name:r.string(),visibility:Pm.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(Am).optional()),duration:Em.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Tm.optional())});var Fb=r.object({errors:r.list(r.string()).optional()});var jm=r.enum_(["mustache","jinja2"]);var Im=r.enum_(["mustache","jinja2"]);var Um=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:N.optional(),type:Im.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Ob=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:N.optional(),changeDescription:r.property("change_description",r.string().optional()),type:jm.optional(),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Um.optional())});var Wb=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Dm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",ke.optional())});var Nm=r.enum_(["mustache","jinja2"]);var Mm=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:Te.optional(),type:Nm.optional(),changeDescription:r.property("change_description",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Fm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Mm).optional()});var Om=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional())});var Wm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Om).optional(),sortableBy:r.list(r.string()).optional()});var Bm=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),csvUploadEnabled:r.boolean(),exportEnabled:r.boolean()});var Bb=r.object({spans:r.list(ta)});var ua=r.object({name:r.string(),author:r.string().optional()});var ga=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Lm=r.enum_(["ui","sdk","online_scoring"]);var Vm=r.enum_(["ui","sdk","online_scoring"]);var Hm=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Vm.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var fa=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Lm,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Hm).optional())});var Jm=r.enum_(["general","tool","llm","guardrail"]);var ha=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Jm.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:ce.optional(),output:ce.optional(),metadata:ce.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",ga.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(fa).optional()),comments:r.list(Ke).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional()});var Km=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ha).optional(),sortableBy:r.list(r.string()).optional()});var Xm=r.enum_(["ui","sdk","online_scoring"]);var Gm=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Xm,author:r.string().optional(),id:r.string()});var wa=r.object({scores:r.list(Gm)});var Lb=r.object({traces:r.list(aa)});var Vb=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});var $m=r.enum_(["TOPIC","PII"]);var Qm=r.enum_(["passed","failed"]);var Ym=r.object({name:$m.optional(),result:Qm.optional()});var Zm=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Ym).optional()});var qm=r.enum_(["default","hidden"]);var ba=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:ce.optional(),output:ce.optional(),metadata:ce.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",ga.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(fa).optional()),comments:r.list(Ke).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(Zm).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",qm.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional()});var ed=r.enum_(["active","inactive"]);var xa=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),threadModelId:r.property("thread_model_id",r.string().optional()),startTime:r.property("start_time",r.date().optional()),endTime:r.property("end_time",r.date().optional()),duration:r.number().optional(),firstMessage:r.property("first_message",D.optional()),lastMessage:r.property("last_message",D.optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),status:ed.optional(),numberOfMessages:r.property("number_of_messages",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),comments:r.list(H).optional(),tags:r.list(r.string()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional())});var oi=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string()),truncate:r.boolean().optional()});var rd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(xa).optional(),sortableBy:r.list(r.string()).optional()});var od=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ba).optional(),sortableBy:r.list(r.string()).optional()});var ad=r.object({completed:r.boolean().optional()});var Xe=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});var pr=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});var Hb=r.object({time:r.date(),value:r.number().optional()});var ai=r.object({results:r.list(Xe).optional()});var Jb=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});var Ra=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional())});var td=r.object({results:r.list(Xe).optional()});var ti=class{constructor(a={}){this._options=a;}getDatasetBiInfo(a){return h.fromPromise(this.__getDatasetBiInfo(a))}async __getDatasetBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-datasets.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getExperimentBiInfo(a){return h.fromPromise(this.__getExperimentBiInfo(a))}async __getExperimentBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-experiments.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansBiInfo(a){return h.fromPromise(this.__getSpansBiInfo(a))}async __getSpansBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-spans.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansCountForWorkspaces(a){return h.fromPromise(this.__getSpansCountForWorkspaces(a))}async __getSpansCountForWorkspaces(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Ws.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/workspace-span-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesBiInfo(a){return h.fromPromise(this.__getTracesBiInfo(a))}async __getTracesBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesCountForWorkspaces(a){return h.fromPromise(this.__getTracesCountForWorkspaces(a))}async __getTracesCountForWorkspaces(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Ls.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/workspace-trace-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ii=class{constructor(a={}){this._options=a;}findAlerts(a={},e){return h.fromPromise(this.__findAlerts(a,e))}async __findAlerts(a={},e){var g,R;let{page:o,size:t,sorting:n,filters:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.sorting=n),c!=null&&(m.filters=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/alerts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:sp.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/alerts.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createAlert(a,e){return h.fromPromise(this.__createAlert(a,e))}async __createAlert(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/alerts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Co.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/alerts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAlertBatch(a,e){return h.fromPromise(this.__deleteAlertBatch(a,e))}async __deleteAlertBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/alerts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/alerts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAlertById(a,e){return h.fromPromise(this.__getAlertById(a,e))}async __getAlertById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/alerts/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:jo.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/alerts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAlert(a,e,o){return h.fromPromise(this.__updateAlert(a,e,o))}async __updateAlert(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/alerts/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Co.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/alerts/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getWebhookExamples(a={},e){return h.fromPromise(this.__getWebhookExamples(a,e))}async __getWebhookExamples(a={},e){var c,m;let{alertType:o}=a,t={};o!=null&&(t.alert_type=ot.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}));let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:pp.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/alerts/webhooks/examples.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}testWebhook(a,e){return h.fromPromise(this.__testWebhook(a,e))}async __testWebhook(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Co.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:lp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/alerts/webhooks/tests.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ni=class{constructor(a={}){this._options=a;}addItemsToAnnotationQueue(a,e,o){return h.fromPromise(this.__addItemsToAnnotationQueue(a,e,o))}async __addItemsToAnnotationQueue(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}/items/add`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Vt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/add.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findAnnotationQueues(a={},e){return h.fromPromise(this.__findAnnotationQueues(a,e))}async __findAnnotationQueues(a={},e){var R,y;let{page:o,size:t,name:n,filters:c,sorting:m}=a,u={};o!=null&&(u.page=o.toString()),t!=null&&(u.size=t.toString()),n!=null&&(u.name=n),c!=null&&(u.filters=c),m!=null&&(u.sorting=m);let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/annotation-queues"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:hp.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/annotation-queues.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createAnnotationQueue(a,e){return h.fromPromise(this.__createAnnotationQueue(a,e))}async __createAnnotationQueue(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/annotation-queues"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ko.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createAnnotationQueueBatch(a,e){return h.fromPromise(this.__createAnnotationQueueBatch(a,e))}async __createAnnotationQueueBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:vo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAnnotationQueueBatch(a,e){return h.fromPromise(this.__deleteAnnotationQueueBatch(a,e))}async __deleteAnnotationQueueBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAnnotationQueueById(a,e){return h.fromPromise(this.__getAnnotationQueueById(a,e))}async __getAnnotationQueueById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Io.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAnnotationQueue(a,e={},o){return h.fromPromise(this.__updateAnnotationQueue(a,e,o))}async __updateAnnotationQueue(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:zo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}removeItemsFromAnnotationQueue(a,e,o){return h.fromPromise(this.__removeItemsFromAnnotationQueue(a,e,o))}async __removeItemsFromAnnotationQueue(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}/items/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Vt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var si=class{constructor(a={}){this._options=a;}attachmentList(a,e){return h.fromPromise(this.__attachmentList(a,e))}async __attachmentList(a,e){var y,v;let{page:o,size:t,projectId:n,entityType:c,entityId:m,path:u}=a,g={};o!=null&&(g.page=o.toString()),t!=null&&(g.size=t.toString()),g.project_id=n,g.entity_type=tt.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m,g.path=u;let R=await b({url:x((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v:w.Default,"v1/private/attachment/list"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(R.ok)return {data:bp.parseOrThrow(R.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:R.rawResponse};if(R.error.reason==="status-code")switch(R.error.statusCode){case 401:throw new $(R.error.body,R.rawResponse);case 403:throw new Z(te.parseOrThrow(R.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),R.rawResponse);default:throw new p({statusCode:R.error.statusCode,body:R.error.body,rawResponse:R.rawResponse})}switch(R.error.reason){case "non-json":throw new p({statusCode:R.error.statusCode,body:R.error.rawBody,rawResponse:R.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/attachment/list.");case "unknown":throw new p({message:R.error.errorMessage,rawResponse:R.rawResponse})}}completeMultiPartUpload(a,e){return h.fromPromise(this.__completeMultiPartUpload(a,e))}async __completeMultiPartUpload(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ht.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/attachment/upload-complete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAttachments(a,e){return h.fromPromise(this.__deleteAttachments(a,e))}async __deleteAttachments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/attachment/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ht.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/attachment/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}downloadAttachment(a,e){return h.fromPromise(this.__downloadAttachment(a,e))}async __downloadAttachment(a,e){var y,v;let{workspaceName:o,containerId:t,entityType:n,entityId:c,fileName:m,mimeType:u}=a,g={};o!=null&&(g.workspace_name=o),g.container_id=t,g.entity_type=it.jsonOrThrow(n,{unrecognizedObjectKeys:"strip"}),g.entity_id=c,g.file_name=m,g.mime_type=u;let R=await b({url:x((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v:w.Default,"v1/private/attachment/download"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(R.ok)return {data:R.body,rawResponse:R.rawResponse};if(R.error.reason==="status-code")switch(R.error.statusCode){case 401:throw new $(R.error.body,R.rawResponse);case 403:throw new Z(te.parseOrThrow(R.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),R.rawResponse);default:throw new p({statusCode:R.error.statusCode,body:R.error.body,rawResponse:R.rawResponse})}switch(R.error.reason){case "non-json":throw new p({statusCode:R.error.statusCode,body:R.error.rawBody,rawResponse:R.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/attachment/download.");case "unknown":throw new p({message:R.error.errorMessage,rawResponse:R.rawResponse})}}startMultiPartUpload(a,e){return h.fromPromise(this.__startMultiPartUpload(a,e))}async __startMultiPartUpload(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/attachment/upload-start"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:kr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:kp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/attachment/upload-start.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}uploadAttachment(a,e){return h.fromPromise(this.__uploadAttachment(a,e))}async __uploadAttachment(a,e){var y,v;let{fileName:o,projectName:t,mimeType:n,entityType:c,entityId:m,body:u}=a,g={};g.file_name=o,t!=null&&(g.project_name=t),n!=null&&(g.mime_type=n),g.entity_type=st.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m;let R=await b({url:x((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v:w.Default,"v1/private/attachment/upload"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",body:or.uploadAttachment.Request.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(R.ok)return {data:void 0,rawResponse:R.rawResponse};if(R.error.reason==="status-code")switch(R.error.statusCode){case 401:throw new $(R.error.body,R.rawResponse);case 403:throw new Z(te.parseOrThrow(R.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),R.rawResponse);default:throw new p({statusCode:R.error.statusCode,body:R.error.body,rawResponse:R.rawResponse})}switch(R.error.reason){case "non-json":throw new p({statusCode:R.error.statusCode,body:R.error.rawBody,rawResponse:R.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/attachment/upload.");case "unknown":throw new p({message:R.error.errorMessage,rawResponse:R.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var pi=class{constructor(a={}){this._options=a;}access(a,e){return h.fromPromise(this.__access(a,e))}async __access(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/auth"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:vp.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/auth.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceName(a){return h.fromPromise(this.__getWorkspaceName(a))}async __getWorkspaceName(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/auth/workspace"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:zp.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 401:throw new $(e.error.body,e.rawResponse);case 403:throw new Z(te.parseOrThrow(e.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/auth/workspace.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ci=class{constructor(a={}){this._options=a;}findEvaluators(a={},e){return h.fromPromise(this.__findEvaluators(a,e))}async __findEvaluators(a={},e){var v,z;let{projectId:o,id:t,name:n,filters:c,sorting:m,page:u,size:g}=a,R={};o!=null&&(R.project_id=o),t!=null&&(R.id=t),n!=null&&(R.name=n),c!=null&&(R.filters=c),m!=null&&(R.sorting=m),u!=null&&(R.page=u.toString()),g!=null&&(R.size=g.toString());let y=await b({url:x((z=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?z:w.Default,"v1/private/automations/evaluators"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:R,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(y.ok)return {data:sc.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/automations/evaluators.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}createAutomationRuleEvaluator(a,e){return h.fromPromise(this.__createAutomationRuleEvaluator(a,e))}async __createAutomationRuleEvaluator(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/automations/evaluators"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Qp.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/automations/evaluators.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAutomationRuleEvaluatorBatch(a,e){return h.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(a,e))}async __deleteAutomationRuleEvaluatorBatch(a,e){var m,u;let{projectId:o,body:t}=a,n={};o!=null&&(n.project_id=o);let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",body:L.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/automations/evaluators/delete.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getEvaluatorById(a,e={},o){return h.fromPromise(this.__getEvaluatorById(a,e,o))}async __getEvaluatorById(a,e={},o){var m,u;let{projectId:t}=e,n={};t!=null&&(n.project_id=t);let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/automations/evaluators/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:pc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}updateAutomationRuleEvaluator(a,e,o){return h.fromPromise(this.__updateAutomationRuleEvaluator(a,e,o))}async __updateAutomationRuleEvaluator(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/automations/evaluators/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:hc.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getEvaluatorLogsById(a,e={},o){return h.fromPromise(this.__getEvaluatorLogsById(a,e,o))}async __getEvaluatorLogsById(a,e={},o){var m,u;let{size:t}=e,n={};t!=null&&(n.size=t.toString());let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/automations/evaluators/${encodeURIComponent(a)}/logs`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:mc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}/logs.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var li=class{constructor(a={}){this._options=a;}createChatCompletions(a={},e){return h.fromPromise(this.__createChatCompletions(a,e))}async __createChatCompletions(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/chat/completions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:_o.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:zc.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/chat/completions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var mi=class{constructor(a={}){this._options=a;}findDashboards(a={},e){return h.fromPromise(this.__findDashboards(a,e))}async __findDashboards(a={},e){var u,g;let{page:o,size:t,name:n}=a,c={};o!=null&&(c.page=o.toString()),t!=null&&(c.size=t.toString()),n!=null&&(c.name=n);let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,"v1/private/dashboards"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:Sc.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/dashboards.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}createDashboard(a,e){return h.fromPromise(this.__createDashboard(a,e))}async __createDashboard(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/dashboards"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:To.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:He.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/dashboards.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDashboardById(a,e){return h.fromPromise(this.__getDashboardById(a,e))}async __getDashboardById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/dashboards/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:He.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDashboard(a,e){return h.fromPromise(this.__deleteDashboard(a,e))}async __deleteDashboard(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/dashboards/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDashboard(a,e={},o){return h.fromPromise(this.__updateDashboard(a,e,o))}async __updateDashboard(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/dashboards/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Ao.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:He.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var di=class{constructor(a={}){this._options=a;}batchUpdateDatasetItems(a,e){return h.fromPromise(this.__batchUpdateDatasetItems(a,e))}async __batchUpdateDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:vr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/datasets/items/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findDatasets(a={},e){return h.fromPromise(this.__findDatasets(a,e))}async __findDatasets(a={},e){var z,S;let{page:o,size:t,withExperimentsOnly:n,withOptimizationsOnly:c,promptId:m,name:u,sorting:g,filters:R}=a,y={};o!=null&&(y.page=o.toString()),t!=null&&(y.size=t.toString()),n!=null&&(y.with_experiments_only=n.toString()),c!=null&&(y.with_optimizations_only=c.toString()),m!=null&&(y.prompt_id=m),u!=null&&(y.name=u),g!=null&&(y.sorting=g),R!=null&&(y.filters=R);let v=await b({url:x((S=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?S:w.Default,"v1/private/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(v.ok)return {data:Hc.parseOrThrow(v.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:v.rawResponse};if(v.error.reason==="status-code")throw new p({statusCode:v.error.statusCode,body:v.error.body,rawResponse:v.rawResponse});switch(v.error.reason){case "non-json":throw new p({statusCode:v.error.statusCode,body:v.error.rawBody,rawResponse:v.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets.");case "unknown":throw new p({message:v.error.errorMessage,rawResponse:v.rawResponse})}}createDataset(a,e){return h.fromPromise(this.__createDataset(a,e))}async __createDataset(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:zr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createOrUpdateDatasetItems(a,e){return h.fromPromise(this.__createOrUpdateDatasetItems(a,e))}async __createOrUpdateDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:_r.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/datasets/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createDatasetItemsFromCsv(a,e){return h.fromPromise(this.__createDatasetItemsFromCsv(a,e))}async __createDatasetItemsFromCsv(a,e){var c,m;let o=await qu();o.append("file",Pe(a.file)),o.append("dataset_id",a.datasetId);let t=await o.getRequest(),n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t.headers,...e==null?void 0:e.headers},requestType:"file",duplex:t.duplex,body:t.body,timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new T(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/items/from-csv.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}createDatasetItemsFromSpans(a,e,o){return h.fromPromise(this.__createDatasetItemsFromSpans(a,e,o))}async __createDatasetItemsFromSpans(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/from-spans`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-spans.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createDatasetItemsFromTraces(a,e,o){return h.fromPromise(this.__createDatasetItemsFromTraces(a,e,o))}async __createDatasetItemsFromTraces(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/from-traces`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Ar.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-traces.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getDatasetById(a,e){return h.fromPromise(this.__getDatasetById(a,e))}async __getDatasetById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/datasets/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDataset(a,e,o){return h.fromPromise(this.__updateDataset(a,e,o))}async __updateDataset(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Er.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/datasets/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteDataset(a,e){return h.fromPromise(this.__deleteDataset(a,e))}async __deleteDataset(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/datasets/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetByName(a,e){return h.fromPromise(this.__deleteDatasetByName(a,e))}async __deleteDatasetByName(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Pr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetItems(a,e){return h.fromPromise(this.__deleteDatasetItems(a,e))}async __deleteDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetsBatch(a,e){return h.fromPromise(this.__deleteDatasetsBatch(a,e))}async __deleteDatasetsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}expandDataset(a,e,o){return h.fromPromise(this.__expandDataset(a,e,o))}async __expandDataset(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/expansions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:jr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:Ec.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{id}/expansions.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findDatasetItemsWithExperimentItems(a,e,o){return h.fromPromise(this.__findDatasetItemsWithExperimentItems(a,e,o))}async __findDatasetItemsWithExperimentItems(a,e,o){var z,S;let{page:t,size:n,experimentIds:c,filters:m,sorting:u,search:g,truncate:R}=e,y={};t!=null&&(y.page=t.toString()),n!=null&&(y.size=n.toString()),y.experiment_ids=c,m!=null&&(y.filters=m),u!=null&&(y.sorting=u),g!=null&&(y.search=g),R!=null&&(y.truncate=R.toString());let v=await b({url:x((S=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?S:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/experiments/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(v.ok)return {data:Bc.parseOrThrow(v.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:v.rawResponse};if(v.error.reason==="status-code")throw new p({statusCode:v.error.statusCode,body:v.error.body,rawResponse:v.rawResponse});switch(v.error.reason){case "non-json":throw new p({statusCode:v.error.statusCode,body:v.error.rawBody,rawResponse:v.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items.");case "unknown":throw new p({message:v.error.errorMessage,rawResponse:v.rawResponse})}}getDatasetByIdentifier(a,e){return h.fromPromise(this.__getDatasetByIdentifier(a,e))}async __getDatasetByIdentifier(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ir.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDatasetExperimentItemsStats(a,e,o){return h.fromPromise(this.__getDatasetExperimentItemsStats(a,e,o))}async __getDatasetExperimentItemsStats(a,e,o){var u,g;let{experimentIds:t,filters:n}=e,c={};c.experiment_ids=t,n!=null&&(c.filters=n);let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/experiments/items/stats`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:Je.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/stats.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}getDatasetItemById(a,e){return h.fromPromise(this.__getDatasetItemById(a,e))}async __getDatasetItemById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/datasets/items/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:oa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}patchDatasetItem(a,e,o){return h.fromPromise(this.__patchDatasetItem(a,e,o))}async __patchDatasetItem(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/items/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Sr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getDatasetItems(a,e={},o){return h.fromPromise(this.__getDatasetItems(a,e,o))}async __getDatasetItems(a,e={},o){var R,y;let{page:t,size:n,filters:c,truncate:m}=e,u={};t!=null&&(u.page=t.toString()),n!=null&&(u.size=n.toString()),c!=null&&(u.filters=c),m!=null&&(u.truncate=m.toString());let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(g.ok)return {data:el.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getDatasetItemsOutputColumns(a,e={},o){return h.fromPromise(this.__getDatasetItemsOutputColumns(a,e,o))}async __getDatasetItemsOutputColumns(a,e={},o){var m,u;let{experimentIds:t}=e,n={};t!=null&&(n.experiment_ids=t);let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/experiments/items/output/columns`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:al.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/output/columns.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}streamDatasetItems(a,e){return h.fromPromise(this.__streamDatasetItems(a,e))}async __streamDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ur.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createVersionTag(a,e,o,t){return h.fromPromise(this.__createVersionTag(a,e,o,t))}async __createVersionTag(a,e,o,t){var c,m;let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(a)}/tags`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",body:Dr.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new T(n.error.body,n.rawResponse);case 409:throw new F(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/hash/{versionHash}/tags.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}listDatasetVersions(a,e={},o){return h.fromPromise(this.__listDatasetVersions(a,e,o))}async __listDatasetVersions(a,e={},o){var u,g;let{page:t,size:n}=e,c={};t!=null&&(c.page=t.toString()),n!=null&&(c.size=n.toString());let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:nl.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}createDatasetVersion(a,e={},o){return h.fromPromise(this.__createDatasetVersion(a,e,o))}async __createDatasetVersion(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/versions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Nr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteVersionTag(a,e,o,t){return h.fromPromise(this.__deleteVersionTag(a,e,o,t))}async __deleteVersionTag(a,e,o,t){var c,m;let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,`v1/private/datasets/${encodeURIComponent(o)}/versions/${encodeURIComponent(a)}/tags/${encodeURIComponent(e)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ui=class{constructor(a={}){this._options=a;}findExperiments(a={},e){return h.fromPromise(this.__findExperiments(a,e))}async __findExperiments(a={},e){var O,M;let{page:o,size:t,datasetId:n,optimizationId:c,types:m,name:u,datasetDeleted:g,promptId:R,sorting:y,filters:v}=a,z={};o!=null&&(z.page=o.toString()),t!=null&&(z.size=t.toString()),n!=null&&(z.datasetId=n),c!=null&&(z.optimization_id=c),m!=null&&(z.types=m),u!=null&&(z.name=u),g!=null&&(z.dataset_deleted=g.toString()),R!=null&&(z.prompt_id=R),y!=null&&(z.sorting=y),v!=null&&(z.filters=v);let S=await b({url:x((M=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?M:w.Default,"v1/private/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:z,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:bl.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")switch(S.error.statusCode){case 400:throw new _(S.error.body,S.rawResponse);default:throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse})}switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}createExperiment(a,e){return h.fromPromise(this.__createExperiment(a,e))}async __createExperiment(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Mr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createExperimentItems(a,e){return h.fromPromise(this.__createExperimentItems(a,e))}async __createExperimentItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Or.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentItems(a,e){return h.fromPromise(this.__deleteExperimentItems(a,e))}async __deleteExperimentItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Wr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentsById(a,e){return h.fromPromise(this.__deleteExperimentsById(a,e))}async __deleteExperimentsById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:sr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}experimentItemsBulk(a,e){return h.fromPromise(this.__experimentItemsBulk(a,e))}async __experimentItemsBulk(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Lr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/experiments/items/bulk.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames(a={},e){return h.fromPromise(this.__findFeedbackScoreNames(a,e))}async __findFeedbackScoreNames(a={},e){var c,m;let{experimentIds:o}=a,t={};o!=null&&(t.experiment_ids=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:ar.findFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findExperimentGroups(a={},e){return h.fromPromise(this.__findExperimentGroups(a,e))}async __findExperimentGroups(a={},e){var g,R;let{groups:o,types:t,name:n,filters:c}=a,m={};o!=null&&(m.groups=o),t!=null&&(m.types=t),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/experiments/groups"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:kl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/groups.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}findExperimentGroupsAggregations(a={},e){return h.fromPromise(this.__findExperimentGroupsAggregations(a,e))}async __findExperimentGroupsAggregations(a={},e){var g,R;let{groups:o,types:t,name:n,filters:c}=a,m={};o!=null&&(m.groups=o),t!=null&&(m.types=t),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Sl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/groups/aggregations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}finishExperiments(a,e){return h.fromPromise(this.__finishExperiments(a,e))}async __finishExperiments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/finish"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:sr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/finish.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getExperimentById(a,e){return h.fromPromise(this.__getExperimentById(a,e))}async __getExperimentById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/experiments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ia.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateExperiment(a,e={},o){return h.fromPromise(this.__updateExperiment(a,e,o))}async __updateExperiment(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/experiments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Vr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/experiments/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getExperimentItemById(a,e){return h.fromPromise(this.__getExperimentItemById(a,e))}async __getExperimentItemById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/experiments/items/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ra.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/items/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperimentItems(a,e){return h.fromPromise(this.__streamExperimentItems(a,e))}async __streamExperimentItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Hr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperiments(a,e){return h.fromPromise(this.__streamExperiments(a,e))}async __streamExperiments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Jr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var gi=class{constructor(a={}){this._options=a;}findFeedbackDefinitions(a={},e){return h.fromPromise(this.__findFeedbackDefinitions(a,e))}async __findFeedbackDefinitions(a={},e){var g,R;let{page:o,size:t,name:n,type:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.type=bt.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}));let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/feedback-definitions"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Xl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/feedback-definitions.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createFeedbackDefinition(a,e){return h.fromPromise(this.__createFeedbackDefinition(a,e))}async __createFeedbackDefinition(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/feedback-definitions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Bl.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/feedback-definitions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getFeedbackDefinitionById(a,e){return h.fromPromise(this.__getFeedbackDefinitionById(a,e))}async __getFeedbackDefinitionById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/feedback-definitions/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:$l.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateFeedbackDefinition(a,e,o){return h.fromPromise(this.__updateFeedbackDefinition(a,e,o))}async __updateFeedbackDefinition(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/feedback-definitions/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:am.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteFeedbackDefinitionById(a,e){return h.fromPromise(this.__deleteFeedbackDefinitionById(a,e))}async __deleteFeedbackDefinitionById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/feedback-definitions/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteFeedbackDefinitionsBatch(a,e){return h.fromPromise(this.__deleteFeedbackDefinitionsBatch(a,e))}async __deleteFeedbackDefinitionsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/feedback-definitions/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var fi=class{constructor(a={}){this._options=a;}createGuardrails(a,e){return h.fromPromise(this.__createGuardrails(a,e))}async __createGuardrails(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/guardrails"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Eo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/guardrails.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var hi=class{constructor(a={}){this._options=a;}deleteLlmProviderApiKeysBatch(a,e){return h.fromPromise(this.__deleteLlmProviderApiKeysBatch(a,e))}async __deleteLlmProviderApiKeysBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/llm-provider-key/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findLlmProviderKeys(a){return h.fromPromise(this.__findLlmProviderKeys(a))}async __findLlmProviderKeys(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/llm-provider-key"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:pm.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/llm-provider-key.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}storeLlmProviderApiKey(a,e){return h.fromPromise(this.__storeLlmProviderApiKey(a,e))}async __storeLlmProviderApiKey(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/llm-provider-key"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Kr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/llm-provider-key.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getLlmProviderApiKeyById(a,e){return h.fromPromise(this.__getLlmProviderApiKeyById(a,e))}async __getLlmProviderApiKeyById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/llm-provider-key/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ca.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateLlmProviderApiKey(a,e={},o){return h.fromPromise(this.__updateLlmProviderApiKey(a,e,o))}async __updateLlmProviderApiKey(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/llm-provider-key/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Xr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new $(t.error.body,t.rawResponse);case 403:throw new Z(te.parseOrThrow(t.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var wi=class{constructor(a={}){this._options=a;}evaluateThreads(a,e){return h.fromPromise(this.__evaluateThreads(a,e))}async __evaluateThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ei.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:qt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/manual-evaluation/threads.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateTraces(a,e){return h.fromPromise(this.__evaluateTraces(a,e))}async __evaluateTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ei.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:qt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/manual-evaluation/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var bi=class{constructor(a={}){this._options=a;}receiveProtobufTraces(a){return h.fromPromise(this.__receiveProtobufTraces(a))}async __receiveProtobufTraces(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/otel/v1/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/otel/v1/traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var xi=class{constructor(a={}){this._options=a;}findOptimizations(a={},e){return h.fromPromise(this.__findOptimizations(a,e))}async __findOptimizations(a={},e){var R,y;let{page:o,size:t,datasetId:n,name:c,datasetDeleted:m}=a,u={};o!=null&&(u.page=o.toString()),t!=null&&(u.size=t.toString()),n!=null&&(u.dataset_id=n),c!=null&&(u.name=c),m!=null&&(u.dataset_deleted=m.toString());let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:gm.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")switch(g.error.statusCode){case 400:throw new _(g.error.body,g.rawResponse);default:throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse})}switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/optimizations.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createOptimization(a,e){return h.fromPromise(this.__createOptimization(a,e))}async __createOptimization(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/optimizations"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ri.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}upsertOptimization(a,e){return h.fromPromise(this.__upsertOptimization(a,e))}async __upsertOptimization(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/optimizations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ri.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteOptimizationsById(a,e){return h.fromPromise(this.__deleteOptimizationsById(a,e))}async __deleteOptimizationsById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/optimizations/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:sr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/optimizations/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getOptimizationById(a,e){return h.fromPromise(this.__getOptimizationById(a,e))}async __getOptimizationById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/optimizations/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:la.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/optimizations/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateOptimizationsById(a,e={},o){return h.fromPromise(this.__updateOptimizationsById(a,e,o))}async __updateOptimizationsById(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/optimizations/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Gr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/optimizations/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ri=class{constructor(a={}){this._options=a;}findProjects(a={},e){return h.fromPromise(this.__findProjects(a,e))}async __findProjects(a={},e){var g,R;let{page:o,size:t,name:n,sorting:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/projects"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:wm.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createProject(a,e){return h.fromPromise(this.__createProject(a,e))}async __createProject(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/projects"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:$r.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getProjectById(a,e){return h.fromPromise(this.__getProjectById(a,e))}async __getProjectById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/projects/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:da.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteProjectById(a,e){return h.fromPromise(this.__deleteProjectById(a,e))}async __deleteProjectById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/projects/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateProject(a,e={},o){return h.fromPromise(this.__updateProject(a,e,o))}async __updateProject(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/projects/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Qr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/projects/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteProjectsBatch(a,e){return h.fromPromise(this.__deleteProjectsBatch(a,e))}async __deleteProjectsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/projects/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNamesByProjectIds(a={},e){return h.fromPromise(this.__findFeedbackScoreNamesByProjectIds(a,e))}async __findFeedbackScoreNamesByProjectIds(a={},e){var c,m;let{projectIds:o}=a,t={};o!=null&&(t.project_ids=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:xm.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getProjectMetrics(a,e={},o){return h.fromPromise(this.__getProjectMetrics(a,e,o))}async __getProjectMetrics(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/projects/${encodeURIComponent(a)}/metrics`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Yr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:zm.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects/{id}/metrics.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getProjectStats(a={},e){return h.fromPromise(this.__getProjectStats(a,e))}async __getProjectStats(a={},e){var g,R;let{page:o,size:t,name:n,sorting:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/projects/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:_m.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects/stats.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}retrieveProject(a,e){return h.fromPromise(this.__retrieveProject(a,e))}async __retrieveProject(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/projects/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Zr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Cm.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var yi=class{constructor(a={}){this._options=a;}getPrompts(a={},e){return h.fromPromise(this.__getPrompts(a,e))}async __getPrompts(a={},e){var R,y;let{page:o,size:t,name:n,sorting:c,filters:m}=a,u={};o!=null&&(u.page=o.toString()),t!=null&&(u.size=t.toString()),n!=null&&(u.name=n),c!=null&&(u.sorting=c),m!=null&&(u.filters=m);let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/prompts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Wm.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createPrompt(a,e){return h.fromPromise(this.__createPrompt(a,e))}async __createPrompt(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:qr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createPromptVersion(a,e){return h.fromPromise(this.__createPromptVersion(a,e))}async __createPromptVersion(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts/versions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:eo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ke.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptById(a,e){return h.fromPromise(this.__getPromptById(a,e))}async __getPromptById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/prompts/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Dm.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePrompt(a,e,o){return h.fromPromise(this.__updatePrompt(a,e,o))}async __updatePrompt(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/prompts/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ro.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/prompts/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deletePrompt(a,e){return h.fromPromise(this.__deletePrompt(a,e))}async __deletePrompt(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/prompts/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deletePromptsBatch(a,e){return h.fromPromise(this.__deletePromptsBatch(a,e))}async __deletePromptsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersionById(a,e){return h.fromPromise(this.__getPromptVersionById(a,e))}async __getPromptVersionById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/prompts/versions/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ke.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts/versions/{versionId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersions(a,e={},o){return h.fromPromise(this.__getPromptVersions(a,e,o))}async __getPromptVersions(a,e={},o){var u,g;let{page:t,size:n}=e,c={};t!=null&&(c.page=t.toString()),n!=null&&(c.size=n.toString());let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,`v1/private/prompts/${encodeURIComponent(a)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:Fm.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}restorePromptVersion(a,e,o){return h.fromPromise(this.__restorePromptVersion(a,e,o))}async __restorePromptVersion(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/prompts/${encodeURIComponent(a)}/versions/${encodeURIComponent(e)}/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:ke.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/{promptId}/versions/{versionId}/restore.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}retrievePromptVersion(a,e){return h.fromPromise(this.__retrievePromptVersion(a,e))}async __retrievePromptVersion(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:oo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ke.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/versions/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ki=class{constructor(a={}){this._options=a;}getServiceToggles(a){return h.fromPromise(this.__getServiceToggles(a))}async __getServiceToggles(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/toggles"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Bm.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/toggles.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var vi=class{constructor(a={}){this._options=a;}addSpanComment(a,e,o){return h.fromPromise(this.__addSpanComment(a,e,o))}async __addSpanComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addSpanFeedbackScore(a,e,o){return h.fromPromise(this.__addSpanFeedbackScore(a,e,o))}async __addSpanFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/spans/{id}/feedback-scores.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createSpans(a,e){return h.fromPromise(this.__createSpans(a,e))}async __createSpans(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:io.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateSpans(a,e){return h.fromPromise(this.__batchUpdateSpans(a,e))}async __batchUpdateSpans(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:so.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpansByProject(a={},e){return h.fromPromise(this.__getSpansByProject(a,e))}async __getSpansByProject(a={},e){var oe,Ye;let{page:o,size:t,projectName:n,projectId:c,traceId:m,type:u,filters:g,truncate:R,stripAttachments:y,sorting:v,exclude:z,fromTime:S,toTime:O}=a,M={};o!=null&&(M.page=o.toString()),t!=null&&(M.size=t.toString()),n!=null&&(M.project_name=n),c!=null&&(M.project_id=c),m!=null&&(M.trace_id=m),u!=null&&(M.type=Ct.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"})),g!=null&&(M.filters=g),R!=null&&(M.truncate=R.toString()),y!=null&&(M.strip_attachments=y.toString()),v!=null&&(M.sorting=v),z!=null&&(M.exclude=z),S!=null&&(M.from_time=S.toISOString()),O!=null&&(M.to_time=O.toISOString());let G=await b({url:x((Ye=(oe=await s.get(this._options.baseUrl))!=null?oe:await s.get(this._options.environment))!=null?Ye:w.Default,"v1/private/spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:M,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(G.ok)return {data:Km.parseOrThrow(G.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:G.rawResponse};if(G.error.reason==="status-code")throw new p({statusCode:G.error.statusCode,body:G.error.body,rawResponse:G.rawResponse});switch(G.error.reason){case "non-json":throw new p({statusCode:G.error.statusCode,body:G.error.rawBody,rawResponse:G.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans.");case "unknown":throw new p({message:G.error.errorMessage,rawResponse:G.rawResponse})}}createSpan(a,e){return h.fromPromise(this.__createSpan(a,e))}async __createSpan(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:to.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpanById(a,e={},o){return h.fromPromise(this.__getSpanById(a,e,o))}async __getSpanById(a,e={},o){var m,u;let{stripAttachments:t}=e,n={};t!=null&&(n.strip_attachments=t.toString());let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/spans/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:ha.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 404:throw new T(c.error.body,c.rawResponse);default:throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteSpanById(a,e){return h.fromPromise(this.__deleteSpanById(a,e))}async __deleteSpanById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/spans/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 501:throw new wr(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/spans/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpan(a,e,o){return h.fromPromise(this.__updateSpan(a,e,o))}async __updateSpan(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:no.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/spans/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteSpanComments(a,e){return h.fromPromise(this.__deleteSpanComments(a,e))}async __deleteSpanComments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteSpanFeedbackScore(a,e,o){return h.fromPromise(this.__deleteSpanFeedbackScore(a,e,o))}async __deleteSpanFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ua.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/{id}/feedback-scores/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findFeedbackScoreNames1(a={},e){return h.fromPromise(this.__findFeedbackScoreNames1(a,e))}async __findFeedbackScoreNames1(a={},e){var m,u;let{projectId:o,type:t}=a,n={};o!=null&&(n.project_id=o),t!=null&&(n.type=jt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}));let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:tr.findFeedbackScoreNames1.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/feedback-scores/names.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getSpanComment(a,e,o){return h.fromPromise(this.__getSpanComment(a,e,o))}async __getSpanComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(e)}/comments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/{spanId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getSpanStats(a={},e){return h.fromPromise(this.__getSpanStats(a,e))}async __getSpanStats(a={},e){var v,z;let{projectId:o,projectName:t,traceId:n,type:c,filters:m,fromTime:u,toTime:g}=a,R={};o!=null&&(R.project_id=o),t!=null&&(R.project_name=t),n!=null&&(R.trace_id=n),c!=null&&(R.type=It.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"})),m!=null&&(R.filters=m),u!=null&&(R.from_time=u.toISOString()),g!=null&&(R.to_time=g.toISOString());let y=await b({url:x((z=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?z:w.Default,"v1/private/spans/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:R,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(y.ok)return {data:Je.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/stats.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}scoreBatchOfSpans(a,e){return h.fromPromise(this.__scoreBatchOfSpans(a,e))}async __scoreBatchOfSpans(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wa.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/spans/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchSpans(a={},e){return h.fromPromise(this.__searchSpans(a,e))}async __searchSpans(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:po.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpanComment(a,e,o){return h.fromPromise(this.__updateSpanComment(a,e,o))}async __updateSpanComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/comments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/spans/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var zi=class{constructor(a={}){this._options=a;}addThreadComment(a,e,o){return h.fromPromise(this.__addThreadComment(a,e,o))}async __addThreadComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/${encodeURIComponent(a)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addTraceComment(a,e,o){return h.fromPromise(this.__addTraceComment(a,e,o))}async __addTraceComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addTraceFeedbackScore(a,e,o){return h.fromPromise(this.__addTraceFeedbackScore(a,e,o))}async __addTraceFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/{id}/feedback-scores.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createTraces(a,e){return h.fromPromise(this.__createTraces(a,e))}async __createTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:lo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateTraces(a,e){return h.fromPromise(this.__batchUpdateTraces(a,e))}async __batchUpdateTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:uo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateThreads(a,e){return h.fromPromise(this.__batchUpdateThreads(a,e))}async __batchUpdateThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:fo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/threads/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}closeTraceThread(a={},e){return h.fromPromise(this.__closeTraceThread(a,e))}async __closeTraceThread(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/close"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ho.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/threads/close.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTracesByProject(a={},e){return h.fromPromise(this.__getTracesByProject(a,e))}async __getTracesByProject(a={},e){var M,G;let{page:o,size:t,projectName:n,projectId:c,filters:m,truncate:u,stripAttachments:g,sorting:R,exclude:y,fromTime:v,toTime:z}=a,S={};o!=null&&(S.page=o.toString()),t!=null&&(S.size=t.toString()),n!=null&&(S.project_name=n),c!=null&&(S.project_id=c),m!=null&&(S.filters=m),u!=null&&(S.truncate=u.toString()),g!=null&&(S.strip_attachments=g.toString()),R!=null&&(S.sorting=R),y!=null&&(S.exclude=y),v!=null&&(S.from_time=v.toISOString()),z!=null&&(S.to_time=z.toISOString());let O=await b({url:x((G=(M=await s.get(this._options.baseUrl))!=null?M:await s.get(this._options.environment))!=null?G:w.Default,"v1/private/traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:S,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(O.ok)return {data:od.parseOrThrow(O.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:O.rawResponse};if(O.error.reason==="status-code")throw new p({statusCode:O.error.statusCode,body:O.error.body,rawResponse:O.rawResponse});switch(O.error.reason){case "non-json":throw new p({statusCode:O.error.statusCode,body:O.error.rawBody,rawResponse:O.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces.");case "unknown":throw new p({message:O.error.errorMessage,rawResponse:O.rawResponse})}}createTrace(a,e){return h.fromPromise(this.__createTrace(a,e))}async __createTrace(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:co.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceById(a,e={},o){return h.fromPromise(this.__getTraceById(a,e,o))}async __getTraceById(a,e={},o){var m,u;let{stripAttachments:t}=e,n={};t!=null&&(n.strip_attachments=t.toString());let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/traces/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:ba.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteTraceById(a,e){return h.fromPromise(this.__deleteTraceById(a,e))}async __deleteTraceById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/traces/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/traces/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateTrace(a,e,o){return h.fromPromise(this.__updateTrace(a,e,o))}async __updateTrace(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:mo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteThreadComments(a,e){return h.fromPromise(this.__deleteThreadComments(a,e))}async __deleteThreadComments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteThreadFeedbackScores(a,e){return h.fromPromise(this.__deleteThreadFeedbackScores(a,e))}async __deleteThreadFeedbackScores(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/feedback-scores/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceComments(a,e){return h.fromPromise(this.__deleteTraceComments(a,e))}async __deleteTraceComments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceFeedbackScore(a,e,o){return h.fromPromise(this.__deleteTraceFeedbackScore(a,e,o))}async __deleteTraceFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ua.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/{id}/feedback-scores/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteTraceThreads(a,e){return h.fromPromise(this.__deleteTraceThreads(a,e))}async __deleteTraceThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:bo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraces(a,e){return h.fromPromise(this.__deleteTraces(a,e))}async __deleteTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames2(a={},e){return h.fromPromise(this.__findFeedbackScoreNames2(a,e))}async __findFeedbackScoreNames2(a={},e){var c,m;let{projectId:o}=a,t={};o!=null&&(t.project_id=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Le.findFeedbackScoreNames2.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findTraceThreadsFeedbackScoreNames(a={},e){return h.fromPromise(this.__findTraceThreadsFeedbackScoreNames(a,e))}async __findTraceThreadsFeedbackScoreNames(a={},e){var c,m;let{projectId:o}=a,t={};o!=null&&(t.project_id=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Le.findTraceThreadsFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/threads/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getTraceStats(a={},e){return h.fromPromise(this.__getTraceStats(a,e))}async __getTraceStats(a={},e){var R,y;let{projectId:o,projectName:t,filters:n,fromTime:c,toTime:m}=a,u={};o!=null&&(u.project_id=o),t!=null&&(u.project_name=t),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),m!=null&&(u.to_time=m.toISOString());let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/traces/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Je.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getThreadComment(a,e,o){return h.fromPromise(this.__getThreadComment(a,e,o))}async __getThreadComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/${encodeURIComponent(e)}/comments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/threads/{threadId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getTraceComment(a,e,o){return h.fromPromise(this.__getTraceComment(a,e,o))}async __getTraceComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(e)}/comments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/{traceId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getTraceThread(a,e){return h.fromPromise(this.__getTraceThread(a,e))}async __getTraceThread(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:oi.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:xa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceThreads(a={},e){return h.fromPromise(this.__getTraceThreads(a,e))}async __getTraceThreads(a={},e){var O,M;let{page:o,size:t,projectName:n,projectId:c,truncate:m,stripAttachments:u,filters:g,sorting:R,fromTime:y,toTime:v}=a,z={};o!=null&&(z.page=o.toString()),t!=null&&(z.size=t.toString()),n!=null&&(z.project_name=n),c!=null&&(z.project_id=c),m!=null&&(z.truncate=m.toString()),u!=null&&(z.strip_attachments=u.toString()),g!=null&&(z.filters=g),R!=null&&(z.sorting=R),y!=null&&(z.from_time=y.toISOString()),v!=null&&(z.to_time=v.toISOString());let S=await b({url:x((M=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?M:w.Default,"v1/private/traces/threads"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:z,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:rd.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse});switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/threads.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}openTraceThread(a,e){return h.fromPromise(this.__openTraceThread(a,e))}async __openTraceThread(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/open"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:oi.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/threads/open.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfThreads(a,e){return h.fromPromise(this.__scoreBatchOfThreads(a,e))}async __scoreBatchOfThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:xo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/threads/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfTraces(a,e){return h.fromPromise(this.__scoreBatchOfTraces(a,e))}async __scoreBatchOfTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wa.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraceThreads(a={},e){return h.fromPromise(this.__searchTraceThreads(a,e))}async __searchTraceThreads(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ro.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraces(a={},e){return h.fromPromise(this.__searchTraces(a,e))}async __searchTraces(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:yo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 401:throw new $(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateThread(a,e,o){return h.fromPromise(this.__updateThread(a,e,o))}async __updateThread(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:go.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/threads/{threadModelId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}updateThreadComment(a,e,o){return h.fromPromise(this.__updateThreadComment(a,e,o))}async __updateThreadComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/comments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/threads/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}updateTraceComment(a,e,o){return h.fromPromise(this.__updateTraceComment(a,e,o))}async __updateTraceComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/comments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Si=class{constructor(a={}){this._options=a;}getWelcomeWizardStatus(a){return h.fromPromise(this.__getWelcomeWizardStatus(a))}async __getWelcomeWizardStatus(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/welcome-wizard"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ad.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/welcome-wizard.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}submitWelcomeWizard(a={},e){return h.fromPromise(this.__submitWelcomeWizard(a,e))}async __submitWelcomeWizard(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/welcome-wizard"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Po.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/welcome-wizard.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var _i=class{constructor(a={}){this._options=a;}costsSummary(a,e){return h.fromPromise(this.__costsSummary(a,e))}async __costsSummary(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:pr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Xe.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/costs/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceConfiguration(a){return h.fromPromise(this.__getWorkspaceConfiguration(a))}async __getWorkspaceConfiguration(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/workspaces/configurations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Ra.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new T(e.error.body,e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}upsertWorkspaceConfiguration(a,e){return h.fromPromise(this.__upsertWorkspaceConfiguration(a,e))}async __upsertWorkspaceConfiguration(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ra.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ra.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/workspaces/configurations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteWorkspaceConfiguration(a){return h.fromPromise(this.__deleteWorkspaceConfiguration(a))}async __deleteWorkspaceConfiguration(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:void 0,rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new T(e.error.body,e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getCost(a,e){return h.fromPromise(this.__getCost(a,e))}async __getCost(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/costs"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:pr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ai.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/costs.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getMetric(a,e){return h.fromPromise(this.__getMetric(a,e))}async __getMetric(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/metrics"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:pr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ai.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/metrics.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}metricsSummary(a,e){return h.fromPromise(this.__metricsSummary(a,e))}async __metricsSummary(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:pr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:td.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/metrics/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ti=class{constructor(a={}){this._options=a;}datasetsRedirect(a,e){return h.fromPromise(this.__datasetsRedirect(a,e))}async __datasetsRedirect(a,e){var u,g;let{datasetId:o,workspaceName:t,path:n}=a,c={};c.dataset_id=o,t!=null&&(c.workspace_name=t),c.path=n;let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,"v1/session/redirect/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);case 404:throw new T(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/datasets.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}experimentsRedirect(a,e){return h.fromPromise(this.__experimentsRedirect(a,e))}async __experimentsRedirect(a,e){var g,R;let{datasetId:o,experimentId:t,workspaceName:n,path:c}=a,m={};m.dataset_id=o,m.experiment_id=t,n!=null&&(m.workspace_name=n),m.path=c;let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/session/redirect/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:void 0,rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);case 404:throw new T(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/experiments.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}optimizationsRedirect(a,e){return h.fromPromise(this.__optimizationsRedirect(a,e))}async __optimizationsRedirect(a,e){var g,R;let{datasetId:o,optimizationId:t,workspaceName:n,path:c}=a,m={};m.dataset_id=o,m.optimization_id=t,n!=null&&(m.workspace_name=n),m.path=c;let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/session/redirect/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:void 0,rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);case 404:throw new T(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/optimizations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}projectsRedirect(a,e){return h.fromPromise(this.__projectsRedirect(a,e))}async __projectsRedirect(a,e){var u,g;let{traceId:o,workspaceName:t,path:n}=a,c={};c.trace_id=o,t!=null&&(c.workspace_name=t),c.path=n;let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,"v1/session/redirect/projects"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);case 404:throw new T(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/projects.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ya=class{constructor(a={}){this._options=a;}get systemUsage(){var a;return (a=this._systemUsage)!=null?a:this._systemUsage=new ti(this._options)}get alerts(){var a;return (a=this._alerts)!=null?a:this._alerts=new ii(this._options)}get annotationQueues(){var a;return (a=this._annotationQueues)!=null?a:this._annotationQueues=new ni(this._options)}get attachments(){var a;return (a=this._attachments)!=null?a:this._attachments=new si(this._options)}get check(){var a;return (a=this._check)!=null?a:this._check=new pi(this._options)}get automationRuleEvaluators(){var a;return (a=this._automationRuleEvaluators)!=null?a:this._automationRuleEvaluators=new ci(this._options)}get chatCompletions(){var a;return (a=this._chatCompletions)!=null?a:this._chatCompletions=new li(this._options)}get dashboards(){var a;return (a=this._dashboards)!=null?a:this._dashboards=new mi(this._options)}get datasets(){var a;return (a=this._datasets)!=null?a:this._datasets=new di(this._options)}get experiments(){var a;return (a=this._experiments)!=null?a:this._experiments=new ui(this._options)}get feedbackDefinitions(){var a;return (a=this._feedbackDefinitions)!=null?a:this._feedbackDefinitions=new gi(this._options)}get guardrails(){var a;return (a=this._guardrails)!=null?a:this._guardrails=new fi(this._options)}get llmProviderKey(){var a;return (a=this._llmProviderKey)!=null?a:this._llmProviderKey=new hi(this._options)}get manualEvaluation(){var a;return (a=this._manualEvaluation)!=null?a:this._manualEvaluation=new wi(this._options)}get openTelemetryIngestion(){var a;return (a=this._openTelemetryIngestion)!=null?a:this._openTelemetryIngestion=new bi(this._options)}get optimizations(){var a;return (a=this._optimizations)!=null?a:this._optimizations=new xi(this._options)}get projects(){var a;return (a=this._projects)!=null?a:this._projects=new Ri(this._options)}get prompts(){var a;return (a=this._prompts)!=null?a:this._prompts=new yi(this._options)}get serviceToggles(){var a;return (a=this._serviceToggles)!=null?a:this._serviceToggles=new ki(this._options)}get spans(){var a;return (a=this._spans)!=null?a:this._spans=new vi(this._options)}get traces(){var a;return (a=this._traces)!=null?a:this._traces=new zi(this._options)}get welcomeWizard(){var a;return (a=this._welcomeWizard)!=null?a:this._welcomeWizard=new Si(this._options)}get workspaces(){var a;return (a=this._workspaces)!=null?a:this._workspaces=new _i(this._options)}get redirect(){var a;return (a=this._redirect)!=null?a:this._redirect=new Ti(this._options)}isAlive(a){return h.fromPromise(this.__isAlive(a))}async __isAlive(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"is-alive/ping"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /is-alive/ping.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}version(a){return h.fromPromise(this.__version(a))}async __version(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"is-alive/ver"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /is-alive/ver.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var re=()=>uuid.v7();var Ai=class i{constructor(a,e){this.data=a;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=a=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...a,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=a=>{var o;let e={parentSpanId:this.data.parentSpanId,projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,traceId:this.data.traceId,...a};return this.opik.spanBatchQueue.update(this.data.id,e),this.data={...this.data,...a},this};this.span=a=>{var n;let e=(n=this.data.projectName)!=null?n:this.opik.config.projectName,o={id:re(),startTime:new Date,...a,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(o);let t=new i(o,this.opik);return this.childSpans.push(t),t};}};var Ei=class{constructor(a,e){this.data=a;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=a=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...a,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=a=>{var n,c;let e=(c=(n=this.data.projectName)!=null?n:a.projectName)!=null?c:this.opik.config.projectName,o={id:re(),startTime:new Date,...a,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(o);let t=new Ai(o,this.opik);return this.spans.push(t),t};this.update=a=>{var o;let e={projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,...a};return this.opik.traceBatchQueue.update(this.data.id,e),this.data={...this.data,...e},this};}};var Tg={EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECT_BY_NAME:"redirect/projects"},Pi={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",PROJECT_NAME:"name",PATH:"path"},Xb=i=>Object.entries(i).map(([a,e])=>`${a}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),Gb=i=>i.replace(/\/api$/,""),$b=i=>Buffer.from(i).toString("base64"),Ag=(i,a,e)=>{let o=Xb(e),t=`${a}?${o}`;return new URL(t,i).toString()},Eg=({datasetId:i,experimentId:a,baseUrl:e})=>Ag(e,Tg.EXPERIMENTS,{[Pi.EXPERIMENT_ID]:a,[Pi.DATASET_ID]:i,[Pi.PATH]:$b(e)});var Pg=({projectName:i,workspaceName:a,apiUrl:e})=>{let o=Gb(e),t=`${a}/${Tg.PROJECT_BY_NAME}`;return Ag(o,t,{[Pi.PROJECT_NAME]:i})};var Qb=300,Ci=100,ka=class{constructor({action:a,batchSize:e=Ci,delay:o,enableBatch:t,name:n="ActionQueue"}){this.timerId=null;this.promise=Promise.resolve();this.queue=new Map;this.debounceFlush=()=>{this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>this.flush(),this.delay);};this.add=(a,e)=>{if(this.queue.set(a,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(a,e)=>{let o=this.queue.get(a);o&&(this.queue.set(a,{...o,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let a=new Map(this.queue);this.queue.clear(),k.debug(`Adding ${a.size} items to ${this.name} promise:`,a),this.promise=this.promise.finally(()=>(k.debug(`Flushing ${this.name}:`,a),this.action(a))).catch(e=>{k.error(`Failed to flush ${this.name}:`,e,a);}),await this.promise;};this.action=a,this.batchSize=e,this.delay=o,this.enableBatch=t,this.name=n;}},de=class{constructor({delay:a=Qb,enableCreateBatch:e=true,enableUpdateBatch:o=false,enableDeleteBatch:t=true,createBatchSize:n=Ci,updateBatchSize:c=Ci,deleteBatchSize:m=Ci,name:u="BatchQueue"}={}){this.create=a=>{let e=this.getId(a);this.createQueue.add(e,a);};this.get=async a=>{let e=this.createQueue.queue.get(a);return e||this.getEntity(a)};this.update=(a,e)=>{if(this.createQueue.queue.get(a)){this.createQueue.update(a,e);return}this.updateQueue.add(a,e);};this.delete=a=>{if(this.createQueue.queue.has(a)){this.createQueue.queue.delete(a);return}this.deleteQueue.add(a);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=u,this.createQueue=new ka({action:async g=>{await this.createEntities(Array.from(g.values()));},delay:a,enableBatch:e,batchSize:n,name:`${u}:createQueue`}),this.updateQueue=new ka({action:async g=>{await this.createQueue.flush();let R=Array.from(g.entries());for(let[y,v]of R)await this.updateEntity(y,v);},delay:a,enableBatch:o,batchSize:c,name:`${u}:updateQueue`}),this.deleteQueue=new ka({action:async g=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(g.keys()));},delay:a,enableBatch:t,batchSize:m,name:`${u}:deleteQueue`});}};var ji=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.spans.createSpans({spans:e},this.api.requestOptions);}async getEntity(e){return await this.api.spans.getSpanById(e,{},this.api.requestOptions)}async updateEntity(e,o){await this.api.spans.updateSpan(e,o,this.api.requestOptions);}async deleteEntities(e){for(let o of e)await this.api.spans.deleteSpanById(o,this.api.requestOptions);}};var Ii=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.spans.scoreBatchOfSpans({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let o of e)await this.api.spans.deleteSpanFeedbackScore(o.id,{name:o.name},this.api.requestOptions);}};var Ui=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.traces.createTraces({traces:e},this.api.requestOptions);}async getEntity(e){return await this.api.traces.getTraceById(e,{},this.api.requestOptions)}async updateEntity(e,o){await this.api.traces.updateTrace(e,o,this.api.requestOptions);}async deleteEntities(e){await this.api.traces.deleteTraces({ids:e},this.api.requestOptions);}};var Di=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.traces.scoreBatchOfTraces({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let o of e)await this.api.traces.deleteTraceFeedbackScore(o.id,{name:o.name},this.api.requestOptions);}};var Ni=class extends ya{constructor(e){super(e);this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};var Mi=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=e;}getId(e){return e.id||""}async createEntities(e){for(let o of e)await this.api.datasets.createDataset(o,this.api.requestOptions);}async getEntity(e){try{return await this.api.datasets.getDatasetById(e,this.api.requestOptions)}catch{return}}async updateEntity(e,o){await this.api.datasets.updateDataset(e,{name:o.name||"",visibility:o.visibility,description:o.description},this.api.requestOptions);}async deleteEntities(e){await this.api.datasets.deleteDatasetsBatch({ids:e},this.api.requestOptions);}};var id=null;async function Cg(){return id||(id=await Yb__default.default()),id}var va=class i{constructor(a){let{id:e,traceId:o,spanId:t,source:n,...c}=a;this.id=e||re(),this.traceId=o,this.spanId=t,this.source=n||_n.Sdk,this.data={...c};}getContent(a=false){return a?{...this.data,id:this.id}:{...this.data}}async contentHash(){let a=this.getContent(),e=Zb__default.default(a);return (await Cg()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent()}}static fromApiModel(a){return new i({id:a.id,traceId:a.traceId,spanId:a.spanId,source:a.source,...a.data})}};async function Ie(i,a,e){var c;if(e===0)return [];let o=new util.TextDecoder("utf-8"),t=[],n="";try{for await(let m of i){n+=o.decode(m,{stream:!0});let u=n.split(`
5
- `);n=(c=u.pop())!=null?c:"";for(let g of u)if(!(!g.trim()||g==="{}"||g==="[]"||g==="null"))try{let R=JSON.parse(g),y=a.parse(R);if(y.ok){if(t.push(y.value),e!==void 0&&t.length>=e)return t}else k.error("Error parsing experiment item:",y.errors);}catch(R){k.error("Error parsing JSON line:",R instanceof Error?R.message:String(R));}}if(n.trim()&&n!=="{}"&&n!=="[]"&&n!=="null")try{let m=JSON.parse(n),u=a.parse(m);u.ok?t.push(u.value):k.error("Error parsing experiment item:",u.errors);}catch(m){k.error("Error parsing remaining buffer:",m instanceof Error?m.message:String(m));}}catch(m){k.error("Error processing stream:",m instanceof Error?m.message:String(m));}return t}function za(i,a){let e=[];for(let o=0;o<i.length;o+=a.maxBatchSize)e.push(i.slice(o,o+a.maxBatchSize));return e}var le=class extends Error{constructor(a){var e;super(a.message),this.name=this.constructor.name,this.code=a.code,this.statusCode=a.statusCode,this.details=a.details,this.originalError=a.originalError,k.error(this.message),(e=Error.captureStackTrace)==null||e.call(Error,this,this.constructor);}toJSON(){return {name:this.name,message:this.message,code:this.code,statusCode:this.statusCode,details:this.details,originalError:this.originalError,stack:this.stack}}};var jg={DATASET_NOT_FOUND:i=>`Dataset with name '${i}' not found`,DATASET_ITEM_NOT_FOUND:i=>`Dataset item with id '${i}' not found`,DATASET_ITEM_MISSING_ID:i=>`Item at index ${i} is missing an ID required for update`,INVALID_JSON_FORMAT:i=>`Invalid JSON format${i?": "+i:""}`,JSON_NOT_ARRAY:"JSON input must be an array of objects",ITEM_NOT_OBJECT:(i,a)=>`Item at position ${i} is not an object (${a})`,INSERTION_FAILED:i=>`Failed to insert items from JSON: ${i}`,DATASET_JSON_PARSE_ERROR:i=>`Failed to parse JSON input: ${i}`};var ex={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID"},Fi=class extends le{constructor(a){super({message:jg.DATASET_ITEM_MISSING_ID(a),code:ex.DATASET_ITEM_MISSING_ID});}};var rx={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},Oi=class extends le{constructor(a){super({message:a,code:rx.SEARCH_TIMEOUT});}};var Wi={JSON_NOT_ARRAY:i=>`JSON input must be an array of objects${i?` (${i})`:""}`,JSON_PARSE_ERROR:"Failed to parse JSON input",JSON_ITEM_NOT_OBJECT:(i,a)=>`Item at position ${i} is not an object (${a})`};var nd={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},Bi=class extends le{constructor(a){let e=a instanceof Error?a:new Error(String(a));super({message:Wi.JSON_PARSE_ERROR,code:nd.JSON_PARSE_ERROR,originalError:e});}},Li=class extends le{constructor(a){super({message:Wi.JSON_NOT_ARRAY(a),code:nd.JSON_NOT_ARRAY});}},Vi=class extends le{constructor(a,e){super({message:Wi.JSON_ITEM_NOT_OBJECT(a,e),code:nd.JSON_ITEM_NOT_OBJECT});}};var cr=class{constructor({name:a,description:e,id:o},t){this.opik=t;this.idToHash=new Map;this.hashes=new Set;this.id=o||re(),this.name=a,this.description=e;}async insert(a){if(!a||a.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let e=await this.getDeduplicatedItems(a),o=za(e,{maxBatchSize:1e3});try{let t=0;for(let n of o)await this.opik.api.datasets.createOrUpdateDatasetItems({datasetId:this.id,items:n}),t+=n.length,k.info(`Inserted ${Math.min(t,e.length)} of ${e.length} items into dataset ${this.id}`);}catch(t){throw k.error(`Error inserting items into dataset: ${t instanceof Error?t.message:String(t)}`),t}}async update(a){if(!(!a||a.length===0)){for(let e=0;e<a.length;e++)if(!a[e].id)throw new Fi(e);await this.insert(a);}}async delete(a){if(!a||a.length===0){k.info("No item IDs provided for deletion");return}let e=za(a,{maxBatchSize:100});for await(let o of e){k.debug("Deleting dataset items batch",{batchSize:o.length,datasetId:this.id}),await this.opik.api.datasets.deleteDatasetItems({itemIds:o});for(let t of o)if(this.idToHash.has(t)){let n=this.idToHash.get(t);this.hashes.delete(n),this.idToHash.delete(t);}}}async clear(){let e=(await this.getItems()).map(o=>o.id).filter(Boolean);e.length!==0&&await this.delete(e);}async getItems(a,e){return (await this.getItemsAsDataclasses(a,e)).map(t=>t.getContent(true))}async getItemsAsDataclasses(a,e){let o=a?Math.min(a,2e3):2e3,t=await this.opik.api.datasets.streamDatasetItems({datasetName:this.name,lastRetrievedId:e,steamLimit:o});return (await Ie(t,C.DatasetItemPublic,a)).map(c=>va.fromApiModel(c))}async insertFromJson(a,e={},o=[]){let t;try{t=JSON.parse(a);}catch(c){throw new Bi(c)}if(!Array.isArray(t))throw new Li(typeof t);if(t.length===0)return;for(let c=0;c<t.length;c++){let m=t[c];if(typeof m!="object"||m===null)throw new Vi(c,typeof m)}let n=t.map(c=>{let m=c,u={};for(let[g,R]of Object.entries(m)){if(o.includes(g))continue;let y=e[g]||g;u[y]=R;}return u});await this.insert(n);}async toJson(a={}){let o=(await this.getItems()).map(t=>{let n={...t};if(Object.keys(a).length>0){for(let[c,m]of Object.entries(a))if(c in n){let u=n[c];delete n[c],n[m]=u;}}return n});return Zb__default.default(o)}async getDeduplicatedItems(a){let e=[];for(let o of a){let t=new va(o),n=await t.contentHash();if(this.hashes.has(n)){k.debug("Duplicate item found - skipping",{contentHash:n,datasetId:this.id});continue}e.push(t.toApiModel()),this.hashes.add(n),this.idToHash.set(t.id,n);}return e}clearHashState(){this.idToHash.clear(),this.hashes.clear();}async syncHashes(){k.debug("Syncing dataset hashes with backend",{datasetId:this.id});try{let a=await this.getItemsAsDataclasses();this.clearHashState();for(let e of a){let o=await e.contentHash();this.idToHash.set(e.id,o),this.hashes.add(o);}k.debug("Dataset hash sync completed",{datasetId:this.id,itemCount:a.length});}catch(a){if(a instanceof p&&a.statusCode===404){k.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw a}}};var sd=class extends Error{constructor(a){super(a),this.name="DatasetError";}},Sa=class extends sd{constructor(a){super(`Dataset with name '${a}' not found`),this.name="DatasetNotFoundError";}};var Hi=class{constructor(a){if(!a.datasetItemId)throw new Error("datasetItemId is required");if(!a.traceId)throw new Error("traceId is required");this.datasetItemId=a.datasetItemId,this.traceId=a.traceId;}},Ji=class i{constructor(a){this.id=a.id,this.datasetItemId=a.datasetItemId,this.traceId=a.traceId,this.datasetItemData=a.datasetItemData,this.evaluationTaskOutput=a.evaluationTaskOutput,this.feedbackScores=[...a.feedbackScores];}static fromRestExperimentItemCompare(a){var o,t;let e=(t=(o=a.feedbackScores)==null?void 0:o.map(n=>({categoryName:n.categoryName,name:n.name,reason:n.reason,value:n.value,source:n.source})))!=null?t:[];return new i({id:a.id,traceId:a.traceId,datasetItemId:a.datasetItemId,datasetItemData:a.input,evaluationTaskOutput:a.output,feedbackScores:e})}};var Ge=class{constructor({id:a,name:e,datasetName:o,prompts:t},n){this.opik=n;this.id=a||re(),this._name=e,this.datasetName=o,this.prompts=t;}get name(){return this._name}async ensureNameLoaded(){if(this._name!==void 0)return this._name;let a=await this.opik.api.experiments.getExperimentById(this.id);if(this._name=a.name,!this._name)throw new Error("Experiment name is not loaded");return this._name}async insert(a){if(a.length===0)return;let e=a.map(t=>({id:re(),experimentId:this.id,datasetItemId:t.datasetItemId,traceId:t.traceId})),o=za(e,{maxBatchSize:50});try{for(let t of o)await this.opik.api.experiments.createExperimentItems({experimentItems:t});k.debug(`Inserted ${a.length} items into experiment ${this.id}`);}catch(t){throw k.error(`Error inserting items into experiment: ${t instanceof Error?t.message:String(t)}`),t}}async getItems(a){let e=[],{maxResults:t,truncate:n=false}=a||{},c,m=true;try{for(;m&&!(t!==void 0&&e.length>=t);){let u=t?Math.min(t-e.length,2e3):2e3,g=await this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:u,lastRetrievedId:c,truncate:n});try{let R=await Ie(g,C.ExperimentItemCompare,u);if(R.length===0){m=!1;break}for(let y of R){let v=Ji.fromRestExperimentItemCompare(y);if(e.push(v),t!==void 0&&e.length>=t){m=!1;break}}c=R[R.length-1].id;}catch(R){k.error("Error parsing experiment item: "+(R instanceof Error?R.message:String(R))),m=!1;break}}}catch(u){throw k.error("Error retrieving experiment items: "+(u instanceof Error?u.message:String(u))),u}return k.info(`Retrieved ${e.length} items${t?` (limited by maxResults=${t})`:""}`),e}async getUrl(){let a=await this.opik.getDataset(this.datasetName),e=this.opik.config.apiUrl||mn.apiUrl;return Eg({datasetId:a.id,experimentId:this.id,baseUrl:e})}};var Ki={EXPERIMENT_NOT_FOUND:i=>`Experiment with name '${i}' not found`,INVALID_CONFIG_TYPE:i=>`experimentConfig must be a plain object, but ${i} was provided. Please provide a valid configuration object like { model: 'gpt-4', temperature: 0.7 }`,CONFIG_PROMPTS_CONFLICT:()=>`Cannot specify both 'prompts' parameter and 'experimentConfig.prompts'. Choose one approach:
1
+ 'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),Cd=require('fs'),Uf=require('ini');require('dotenv/config');var Rw=require('qs'),uuid=require('uuid'),Zb=require('fast-json-stable-stringify'),Yb=require('xxhash-wasm'),util=require('util'),ax=require('mustache'),nx=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),cx=require('fast-deep-equal'),async_hooks=require('async_hooks'),Qi=require('chalk'),Rx=require('boxen'),yx=require('ora'),ai$1=require('ai'),openai=require('@ai-sdk/openai'),anthropic=require('@ai-sdk/anthropic'),google=require('@ai-sdk/google'),zod=require('zod');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Cd__default=/*#__PURE__*/_interopDefault(Cd);var Uf__default=/*#__PURE__*/_interopDefault(Uf);var Rw__default=/*#__PURE__*/_interopDefault(Rw);var Zb__default=/*#__PURE__*/_interopDefault(Zb);var Yb__default=/*#__PURE__*/_interopDefault(Yb);var ax__default=/*#__PURE__*/_interopDefault(ax);var nx__default=/*#__PURE__*/_interopDefault(nx);var cx__default=/*#__PURE__*/_interopDefault(cx);var Qi__default=/*#__PURE__*/_interopDefault(Qi);var Rx__default=/*#__PURE__*/_interopDefault(Rx);var yx__default=/*#__PURE__*/_interopDefault(yx);var vd=Object.create;var Ze=Object.defineProperty;var zd=Object.getOwnPropertyDescriptor;var yf=Object.getOwnPropertyNames;var kf=Object.getPrototypeOf,vf=Object.prototype.hasOwnProperty;var Sd=(i,a)=>(a=Symbol[i])?a:Symbol.for("Symbol."+i),wr=i=>{throw TypeError(i)};var zf=(i,a,e)=>a in i?Ze(i,a,{enumerable:true,configurable:true,writable:true,value:e}):i[a]=e;var me=(i=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(i,{get:(a,e)=>(typeof require!="undefined"?require:a)[e]}):i)(function(i){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var pn=(i,a)=>()=>(i&&(a=i(i=0)),a);var Y=(i,a)=>()=>(a||i((a={exports:{}}).exports,a),a.exports),E=(i,a)=>{for(var e in a)Ze(i,e,{get:a[e],enumerable:true});},Sf=(i,a,e,o)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of yf(a))!vf.call(i,t)&&t!==e&&Ze(i,t,{get:()=>a[t],enumerable:!(o=zd(a,t))||o.enumerable});return i};var _f=(i,a,e)=>(e=i!=null?vd(kf(i)):{},Sf(Ze(e,"default",{value:i,enumerable:true}),i));var _d=i=>{var a;return [,,,vd((a=void 0)!=null?a:null)]},Td=["class","method","getter","setter","accessor","field","value","get","set"],hr=i=>i!==void 0&&typeof i!="function"?wr("Function expected"):i,Tf=(i,a,e,o,t)=>({kind:Td[i],name:a,metadata:o,addInitializer:n=>e._?wr("Already initialized"):t.push(hr(n||null))}),cn=(i,a)=>zf(a,Sd("metadata"),i[3]),Ad=(i,a,e,o)=>{for(var t=0,n=i[a>>1],c=n&&n.length;t<c;t++)n[t].call(e);return o},Ed=(i,a,e,o,t,n)=>{var m,u,g,R,y=a&7,v=false,z=false,S=2,O=Td[y+5],G=i[S]||(i[S]=[]),oe=((t=t.prototype),zd(t,e));for(var Ye=o.length-1;Ye>=0;Ye--)g=Tf(y,e,u={},i[3],G),(g.static=v,g.private=z,R=g.access={has:ne=>e in ne},(R.get=ne=>ne[e]),y>2),m=(0, o[Ye])(oe[O],g),u._=1,hr(m)&&(oe[O]=m);return oe&&Ze(t,e,oe),t};var su={};E(su,{Node18UniversalStreamWrapper:()=>An});var An,pu=pn(()=>{An=class i{constructor(a){this.readableStream=a,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(a,e){var o;(o=this.events[a])==null||o.push(e);}off(a,e){var o;this.events[a]=(o=this.events[a])==null?void 0:o.filter(t=>t!==e);}pipe(a){return this.on("data",async e=>{if(a instanceof i)a._write(e);else if(a instanceof WritableStream){let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}else a.write(e);}),this.on("end",async()=>{a instanceof i?a._end():a instanceof WritableStream?a.getWriter().close():a.end();}),this.on("error",async e=>{a instanceof i?a._error(e):a instanceof WritableStream?a.getWriter().abort(e):a.destroy(e);}),this._startReading(),a}pipeTo(a){return this.pipe(a)}unpipe(a){this.off("data",async e=>{if(a instanceof i)a._write(e);else if(a instanceof WritableStream){let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}else a.write(e);}),this.off("end",async()=>{a instanceof i?a._end():a instanceof WritableStream?a.getWriter().close():a.end();}),this.off("error",async e=>{a instanceof i?a._error(e):a instanceof WritableStream?a.getWriter().abort(e):a.destroy(e);});}destroy(a){this.reader.cancel(a).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(!a)return e}setEncoding(a){this.encoding=a;}async text(){let a=[];for(;;){let{done:o,value:t}=await this.reader.read();if(o)break;t&&a.push(t);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(a).arrayBuffer())}async json(){let a=await this.text();return JSON.parse(a)}_write(a){this._emit("data",a);}_end(){this._emit("end");}_error(a){this._emit("error",a);}_emit(a,e){if(this.events[a])for(let o of this.events[a]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(a){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(a){this._emit("error",a);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();return a?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var cu={};E(cu,{UndiciStreamWrapper:()=>En});var En,lu=pn(()=>{En=class i{constructor(a){this.readableStream=a,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(a,e){var o;(o=this.events[a])==null||o.push(e);}off(a,e){var o;this.events[a]=(o=this.events[a])==null?void 0:o.filter(t=>t!==e);}pipe(a){return this.on("data",e=>{if(a instanceof i)a._write(e);else {let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.on("end",()=>{a instanceof i?a._end():a.getWriter().close();}),this.on("error",e=>{a instanceof i?a._error(e):a.getWriter().abort(e);}),this._startReading(),a}pipeTo(a){return this.pipe(a)}unpipe(a){this.off("data",e=>{if(a instanceof i)a._write(e);else {let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.off("end",()=>{a instanceof i?a._end():a.getWriter().close();}),this.off("error",e=>{a instanceof i?a._error(e):a.getWriter().abort(e);});}destroy(a){this.reader.cancel(a).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(!a)return e}setEncoding(a){this.encoding=a;}async text(){let a=[];for(;;){let{done:o,value:t}=await this.reader.read();if(o)break;t&&a.push(t);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(a).arrayBuffer())}async json(){let a=await this.text();return JSON.parse(a)}_write(a){this._emit("data",a);}_end(){this._emit("end");}_error(a){this._emit("error",a);}_emit(a,e){if(this.events[a])for(let o of this.events[a]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(a){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(a){this._emit("error",a);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();return a?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var mu={};E(mu,{NodePre18StreamWrapper:()=>Pn});var Pn,du=pn(()=>{Pn=class{constructor(a){this.readableStream=a;}on(a,e){this.readableStream.on(a,e);}off(a,e){this.readableStream.off(a,e);}pipe(a){return this.readableStream.pipe(a),a}pipeTo(a){return this.pipe(a)}unpipe(a){a?this.readableStream.unpipe(a):this.readableStream.unpipe();}destroy(a){this.readableStream.destroy(a);}pause(){this.readableStream.pause();}resume(){this.readableStream.resume();}get isPaused(){return this.readableStream.isPaused()}async read(){return new Promise((a,e)=>{let o=this.readableStream.read();o?a(o):(this.readableStream.once("readable",()=>{let t=this.readableStream.read();a(t);}),this.readableStream.once("error",e));})}setEncoding(a){this.readableStream.setEncoding(a),this.encoding=a;}async text(){let a=[],e=new TextEncoder;this.readableStream.setEncoding(this.encoding||"utf-8");for await(let t of this.readableStream)a.push(e.encode(t));return new TextDecoder(this.encoding||"utf-8").decode(Buffer.concat(a))}async json(){let a=await this.text();return JSON.parse(a)}[Symbol.asyncIterator](){let e=this.readableStream[Symbol.asyncIterator]();return {async next(){let{value:o,done:t}=await e.next();return {value:o,done:t}},[Symbol.asyncIterator](){return this}}}};});var yu=Y((qI,Ru)=>{var xu=me("stream").Stream,Sw=me("util");Ru.exports=fe;function fe(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=true,this._maxDataSizeExceeded=false,this._released=false,this._bufferedEvents=[];}Sw.inherits(fe,xu);fe.create=function(i,a){var e=new this;a=a||{};for(var o in a)e[o]=a[o];e.source=i;var t=i.emit;return i.emit=function(){return e._handleEmit(arguments),t.apply(i,arguments)},i.on("error",function(){}),e.pauseStream&&i.pause(),e};Object.defineProperty(fe.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});fe.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};fe.prototype.resume=function(){this._released||this.release(),this.source.resume();};fe.prototype.pause=function(){this.source.pause();};fe.prototype.release=function(){this._released=true,this._bufferedEvents.forEach(function(i){this.emit.apply(this,i);}.bind(this)),this._bufferedEvents=[];};fe.prototype.pipe=function(){var i=xu.prototype.pipe.apply(this,arguments);return this.resume(),i};fe.prototype._handleEmit=function(i){if(this._released){this.emit.apply(this,i);return}i[0]==="data"&&(this.dataSize+=i[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(i);};fe.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=true;var i="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(i));}};});var Su=Y((ej,zu)=>{var _w=me("util"),vu=me("stream").Stream,ku=yu();zu.exports=V;function V(){this.writable=false,this.readable=true,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=true,this._released=false,this._streams=[],this._currentStream=null,this._insideLoop=false,this._pendingNext=false;}_w.inherits(V,vu);V.create=function(i){var a=new this;i=i||{};for(var e in i)a[e]=i[e];return a};V.isStreamLike=function(i){return typeof i!="function"&&typeof i!="string"&&typeof i!="boolean"&&typeof i!="number"&&!Buffer.isBuffer(i)};V.prototype.append=function(i){var a=V.isStreamLike(i);if(a){if(!(i instanceof ku)){var e=ku.create(i,{maxDataSize:1/0,pauseStream:this.pauseStreams});i.on("data",this._checkDataSize.bind(this)),i=e;}this._handleErrors(i),this.pauseStreams&&i.pause();}return this._streams.push(i),this};V.prototype.pipe=function(i,a){return vu.prototype.pipe.call(this,i,a),this.resume(),i};V.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=false;}};V.prototype._realGetNext=function(){var i=this._streams.shift();if(typeof i=="undefined"){this.end();return}if(typeof i!="function"){this._pipeNext(i);return}var a=i;a(function(e){var o=V.isStreamLike(e);o&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e);}.bind(this));};V.prototype._pipeNext=function(i){this._currentStream=i;var a=V.isStreamLike(i);if(a){i.on("end",this._getNext.bind(this)),i.pipe(this,{end:false});return}var e=i;this.write(e),this._getNext();};V.prototype._handleErrors=function(i){var a=this;i.on("error",function(e){a._emitError(e);});};V.prototype.write=function(i){this.emit("data",i);};V.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"));};V.prototype.resume=function(){this._released||(this._released=true,this.writable=true,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume");};V.prototype.end=function(){this._reset(),this.emit("end");};V.prototype.destroy=function(){this._reset(),this.emit("close");};V.prototype._reset=function(){this.writable=false,this._streams=[],this._currentStream=null;};V.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var i="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(i));}};V.prototype._updateDataSize=function(){this.dataSize=0;var i=this;this._streams.forEach(function(a){a.dataSize&&(i.dataSize+=a.dataSize);}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize);};V.prototype._emitError=function(i){this._reset(),this.emit("error",i);};});var _u=Y((rj,Tw)=>{Tw.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/3gpp-ims+xml":{source:"iana",compressible:true},"application/3gpphal+json":{source:"iana",compressible:true},"application/3gpphalforms+json":{source:"iana",compressible:true},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:true},"application/alto-costmap+json":{source:"iana",compressible:true},"application/alto-costmapfilter+json":{source:"iana",compressible:true},"application/alto-directory+json":{source:"iana",compressible:true},"application/alto-endpointcost+json":{source:"iana",compressible:true},"application/alto-endpointcostparams+json":{source:"iana",compressible:true},"application/alto-endpointprop+json":{source:"iana",compressible:true},"application/alto-endpointpropparams+json":{source:"iana",compressible:true},"application/alto-error+json":{source:"iana",compressible:true},"application/alto-networkmap+json":{source:"iana",compressible:true},"application/alto-networkmapfilter+json":{source:"iana",compressible:true},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:true},"application/alto-updatestreamparams+json":{source:"iana",compressible:true},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:true,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:true,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:true,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:true,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:true,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:true,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:true},"application/atsc-rsat+xml":{source:"iana",compressible:true,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:true},"application/bacnet-xdd+zip":{source:"iana",compressible:false},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:false,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/calendar+json":{source:"iana",compressible:true},"application/calendar+xml":{source:"iana",compressible:true,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:true},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:true},"application/ccxml+xml":{source:"iana",compressible:true,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:true,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:true},"application/cellml+xml":{source:"iana",compressible:true},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:true},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:true},"application/clue_info+xml":{source:"iana",compressible:true},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:true},"application/coap-group+json":{source:"iana",compressible:true},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:true},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:true,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:true},"application/cstadata+xml":{source:"iana",compressible:true},"application/csvm+json":{source:"iana",compressible:true},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:true},"application/dash+xml":{source:"iana",compressible:true,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:true,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:true,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:true},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:true},"application/dicom+xml":{source:"iana",compressible:true},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:true},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:true,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:true},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:true,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:true,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:false},"application/edifact":{source:"iana",compressible:false},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:true},"application/elm+xml":{source:"iana",compressible:true},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/emergencycalldata.comment+xml":{source:"iana",compressible:true},"application/emergencycalldata.control+xml":{source:"iana",compressible:true},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.veds+xml":{source:"iana",compressible:true},"application/emma+xml":{source:"iana",compressible:true,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:true,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:true},"application/epub+zip":{source:"iana",compressible:false,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:true},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:true,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:true},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/fido.trusted-apps+json":{compressible:true},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:false},"application/framework-attributes+xml":{source:"iana",compressible:true},"application/geo+json":{source:"iana",compressible:true,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:true},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:true,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:true,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:false,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:true},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:true},"application/ibe-pkg-reply+xml":{source:"iana",compressible:true},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:true,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:true,extensions:["its"]},"application/java-archive":{source:"apache",compressible:false,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:false,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:false,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:true,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:true},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:true},"application/jrd+json":{source:"iana",compressible:true},"application/jscalendar+json":{source:"iana",compressible:true},"application/json":{source:"iana",charset:"UTF-8",compressible:true,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:true},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:true,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:true},"application/jwk-set+json":{source:"iana",compressible:true},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:true},"application/kpml-response+xml":{source:"iana",compressible:true},"application/ld+json":{source:"iana",compressible:true,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:true,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:true},"application/lost+xml":{source:"iana",compressible:true,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:true},"application/lpf+zip":{source:"iana",compressible:false},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:true,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:true,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:true,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:true,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:true},"application/mathml-presentation+xml":{source:"iana",compressible:true},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:true},"application/mbms-deregister+xml":{source:"iana",compressible:true},"application/mbms-envelope+xml":{source:"iana",compressible:true},"application/mbms-msk+xml":{source:"iana",compressible:true},"application/mbms-msk-response+xml":{source:"iana",compressible:true},"application/mbms-protection-description+xml":{source:"iana",compressible:true},"application/mbms-reception-report+xml":{source:"iana",compressible:true},"application/mbms-register+xml":{source:"iana",compressible:true},"application/mbms-register-response+xml":{source:"iana",compressible:true},"application/mbms-schedule+xml":{source:"iana",compressible:true},"application/mbms-user-service-description+xml":{source:"iana",compressible:true},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:true,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:true},"application/mediaservercontrol+xml":{source:"iana",compressible:true,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:true},"application/metalink+xml":{source:"apache",compressible:true,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:true,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:true,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:true,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:true,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:true,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:true},"application/mrb-publish+xml":{source:"iana",compressible:true},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/msword":{source:"iana",compressible:false,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:true},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:true},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:false,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:true},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:true,extensions:["opf"]},"application/ogg":{source:"iana",compressible:false,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:true,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:true},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:false},"application/p2p-overlay+xml":{source:"iana",compressible:true,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:true,extensions:["xer"]},"application/pdf":{source:"iana",compressible:false,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:false,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:true,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/postscript":{source:"iana",compressible:true,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:true},"application/problem+json":{source:"iana",compressible:true},"application/problem+xml":{source:"iana",compressible:true},"application/provenance+xml":{source:"iana",compressible:true,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:false},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:true},"application/pskc+xml":{source:"iana",compressible:true,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:true},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:true,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:true},"application/rdf+xml":{source:"iana",compressible:true,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:true,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:true},"application/resource-lists+xml":{source:"iana",compressible:true,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:true,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:true},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:true},"application/rls-services+xml":{source:"iana",compressible:true,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:true,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:true,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:true,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:true,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:true,extensions:["rss"]},"application/rtf":{source:"iana",compressible:true,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:true},"application/samlmetadata+xml":{source:"iana",compressible:true},"application/sarif+json":{source:"iana",compressible:true},"application/sarif-external-properties+json":{source:"iana",compressible:true},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:true,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:true},"application/scim+json":{source:"iana",compressible:true},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:true},"application/senml+xml":{source:"iana",compressible:true,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:true},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:true},"application/sensml+xml":{source:"iana",compressible:true,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:true},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:true,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:true},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:true,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:true},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:true,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:true},"application/spirits-event+xml":{source:"iana",compressible:true},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:true,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:true,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:true,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:true,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:true},"application/swid+xml":{source:"iana",compressible:true,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:true},"application/taxii+json":{source:"iana",compressible:true},"application/td+json":{source:"iana",compressible:true},"application/tei+xml":{source:"iana",compressible:true,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:true,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:true},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:true,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:true,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:false,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:true},"application/urc-ressheet+xml":{source:"iana",compressible:true,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:true,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:true},"application/vcard+json":{source:"iana",compressible:true},"application/vcard+xml":{source:"iana",compressible:true},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:true,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:true},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:true},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:true},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:true},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:true},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:true},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:true},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:true},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:true},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:true},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:false,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:true,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:true},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:true},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:false,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:true},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:true},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:true},"application/vnd.apple.installer+xml":{source:"iana",compressible:true,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:false,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:true},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:true},"application/vnd.avistar+xml":{source:"iana",compressible:true},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:true,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:true},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:true},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:true},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:true},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:true},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:true,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:true,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:true},"application/vnd.collection.doc+json":{source:"iana",compressible:true},"application/vnd.collection.next+json":{source:"iana",compressible:true},"application/vnd.comicbook+zip":{source:"iana",compressible:false},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:true},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:true,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:true},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:true},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:true},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:true},"application/vnd.cyclonedx+xml":{source:"iana",compressible:true},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:false},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:true,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:true},"application/vnd.dataresource+json":{source:"iana",compressible:true},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:true,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:true},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:true},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:true},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:true},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:true},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:true},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:true},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:true},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:false},"application/vnd.eszigno3+xml":{source:"iana",compressible:true,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:true},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:false},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:false},"application/vnd.etsi.cug+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:true},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:true},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:true},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:true},"application/vnd.etsi.sci+xml":{source:"iana",compressible:true},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:true},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:true},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:true},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:false},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:false},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:false},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:true},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:true},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:true},"application/vnd.geo+json":{source:"iana",compressible:true},"application/vnd.geocube+xml":{source:"iana",compressible:true},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:false,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:false,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:false,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:true,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:false,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:true},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:false},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:true},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:true},"application/vnd.hal+xml":{source:"iana",compressible:true,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:true,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:true},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:true},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:true},"application/vnd.hyper-item+json":{source:"iana",compressible:true},"application/vnd.hyperdrive+json":{source:"iana",compressible:true},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:false},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:false},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:true},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:true},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:true},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:true},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:true,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:false},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:true},"application/vnd.las.las+xml":{source:"iana",compressible:true,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:true},"application/vnd.liberty-request+xml":{source:"iana",compressible:true},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:true,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:false},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:true},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:false},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:true},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:true},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:true,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:false,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:true,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:true},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:true},"application/vnd.ms-outlook":{compressible:false,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:true},"application/vnd.ms-powerpoint":{source:"iana",compressible:false,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:true},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:true},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:true},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:false,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:true},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:true},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:true},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:true},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:true},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:true},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:true,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:true},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:false,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:false,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:false,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:false,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:true},"application/vnd.oftn.l10n+json":{source:"iana",compressible:true},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:true},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:true},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:true},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:true},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:true},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:true},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:true},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:true},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:true},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:true},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:true,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:true},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:true},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:true},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:true},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:true},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:true},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:true,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:true,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:false,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:false,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:false,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:true},"application/vnd.oracle.resource+json":{source:"iana",compressible:true},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:true},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:true},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:true},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:true},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:true},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:true,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:true},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:true,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:true},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:true},"application/vnd.shopkick+json":{source:"iana",compressible:true},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:true},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:true,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:true,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:true,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:true},"application/vnd.syft+json":{source:"iana",compressible:true},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:true},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:true},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:true},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:true,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:true},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:true},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:true},"application/vnd.wv.ssp+xml":{source:"iana",compressible:true},"application/vnd.xacml+json":{source:"iana",compressible:true},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:true},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:true,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:true,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:true,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:true},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:true,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:true,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:true},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:true,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:true,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:false,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:false,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:false,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:false,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:false,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:false},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:true,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:true,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:true,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:false,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:true,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:false,extensions:["jnlp"]},"application/x-javascript":{compressible:true},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:false,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:false},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:true,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:false,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:false,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:true,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:false,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:false,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:true,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:true,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:true,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:true,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:true,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:false,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:true,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:true,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:true,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:true,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:true},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:true,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:false,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:true},"application/xaml+xml":{source:"apache",compressible:true,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:true,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:true,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:true,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:true,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:true},"application/xcap-ns+xml":{source:"iana",compressible:true,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:true},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:true},"application/xenc+xml":{source:"iana",compressible:true,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:true,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:true},"application/xliff+xml":{source:"iana",compressible:true,extensions:["xlf"]},"application/xml":{source:"iana",compressible:true,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:true,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:true},"application/xmpp+xml":{source:"iana",compressible:true},"application/xop+xml":{source:"iana",compressible:true,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:true,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:true,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:true,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:true,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:true},"application/yang-data+xml":{source:"iana",compressible:true},"application/yang-patch+json":{source:"iana",compressible:true},"application/yang-patch+xml":{source:"iana",compressible:true},"application/yin+xml":{source:"iana",compressible:true,extensions:["yin"]},"application/zip":{source:"iana",compressible:false,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:false,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:false,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:false},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:false,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:false,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:false,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:false,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:false},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:false},"audio/vorbis":{source:"iana",compressible:false},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:false,extensions:["wav"]},"audio/wave":{compressible:false,extensions:["wav"]},"audio/webm":{source:"apache",compressible:false,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:false,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:false,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:true,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:true,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:false,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:false,extensions:["avif"]},"image/bmp":{source:"iana",compressible:true,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:false,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:false,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:false,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:false,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:false,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:false},"image/png":{source:"iana",compressible:false,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:true,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:false,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:true,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:true,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:true,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:true,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:true,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:false},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:false},"message/imdn+xml":{source:"iana",compressible:true},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:false},"message/rfc822":{source:"iana",compressible:true,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:true,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:true,extensions:["glb"]},"model/iges":{source:"iana",compressible:false,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:false,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:true,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:false,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:false,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:true,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:true},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:false,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:false,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:false,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:false,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:true,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:false},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:false},"multipart/form-data":{source:"iana",compressible:false},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:false},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:false},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:true,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:true},"text/cmd":{compressible:true},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:true,extensions:["css"]},"text/csv":{source:"iana",compressible:true,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:true,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:true},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:true,extensions:["jsx"]},"text/less":{compressible:true,extensions:["less"]},"text/markdown":{source:"iana",compressible:true,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:true,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:true,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:true,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:true,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:true,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:true,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:true,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:true,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:true,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:true},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:true},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:true,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:true,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:true,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:true,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:true,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:true,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:false,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:false,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:false,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:false,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:false,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:false,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:false,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:false,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:true},"x-shader/x-vertex":{compressible:true}};});var Au=Y((oj,Tu)=>{Tu.exports=_u();});var Cu=Y(ae=>{var Qa=Au(),Aw=me("path").extname,Eu=/^\s*([^;\s]*)(?:;|\s|$)/,Ew=/^text\//i;ae.charset=Pu;ae.charsets={lookup:Pu};ae.contentType=Pw;ae.extension=Cw;ae.extensions=Object.create(null);ae.lookup=Iw;ae.types=Object.create(null);jw(ae.extensions,ae.types);function Pu(i){if(!i||typeof i!="string")return false;var a=Eu.exec(i),e=a&&Qa[a[1].toLowerCase()];return e&&e.charset?e.charset:a&&Ew.test(a[1])?"UTF-8":false}function Pw(i){if(!i||typeof i!="string")return false;var a=i.indexOf("/")===-1?ae.lookup(i):i;if(!a)return false;if(a.indexOf("charset")===-1){var e=ae.charset(a);e&&(a+="; charset="+e.toLowerCase());}return a}function Cw(i){if(!i||typeof i!="string")return false;var a=Eu.exec(i),e=a&&ae.extensions[a[1].toLowerCase()];return !e||!e.length?false:e[0]}function Iw(i){if(!i||typeof i!="string")return false;var a=Aw("x."+i).toLowerCase().substr(1);return a&&ae.types[a]||false}function jw(i,a){var e=["nginx","apache",void 0,"iana"];Object.keys(Qa).forEach(function(t){var n=Qa[t],c=n.extensions;if(!(!c||!c.length)){i[t]=c;for(var m=0;m<c.length;m++){var u=c[m];if(a[u]){var g=e.indexOf(Qa[a[u]].source),R=e.indexOf(n.source);if(a[u]!=="application/octet-stream"&&(g>R||g===R&&a[u].substr(0,12)==="application/"))continue}a[u]=t;}}});}});var ju=Y((tj,Iu)=>{Iu.exports=Uw;function Uw(i){var a=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;a?a(i):setTimeout(i,0);}});var Cn=Y((ij,Du)=>{var Uu=ju();Du.exports=Dw;function Dw(i){var a=false;return Uu(function(){a=true;}),function(o,t){a?i(o,t):Uu(function(){i(o,t);});}}});var In=Y((nj,Nu)=>{Nu.exports=Nw;function Nw(i){Object.keys(i.jobs).forEach(Mw.bind(i)),i.jobs={};}function Mw(i){typeof this.jobs[i]=="function"&&this.jobs[i]();}});var jn=Y((sj,Fu)=>{var Mu=Cn(),Fw=In();Fu.exports=Ow;function Ow(i,a,e,o){var t=e.keyedList?e.keyedList[e.index]:e.index;e.jobs[t]=Ww(a,t,i[t],function(n,c){t in e.jobs&&(delete e.jobs[t],n?Fw(e):e.results[t]=c,o(n,e.results));});}function Ww(i,a,e,o){var t;return i.length==2?t=i(e,Mu(o)):t=i(e,a,Mu(o)),t}});var Un=Y((pj,Ou)=>{Ou.exports=Bw;function Bw(i,a){var e=!Array.isArray(i),o={index:0,keyedList:e||a?Object.keys(i):null,jobs:{},results:e?{}:[],size:e?Object.keys(i).length:i.length};return a&&o.keyedList.sort(e?a:function(t,n){return a(i[t],i[n])}),o}});var Dn=Y((cj,Wu)=>{var Lw=In(),Vw=Cn();Wu.exports=Hw;function Hw(i){Object.keys(this.jobs).length&&(this.index=this.size,Lw(this),Vw(i)(null,this.results));}});var Lu=Y((lj,Bu)=>{var Jw=jn(),Kw=Un(),Xw=Dn();Bu.exports=Gw;function Gw(i,a,e){for(var o=Kw(i);o.index<(o.keyedList||i).length;)Jw(i,a,o,function(t,n){if(t){e(t,n);return}if(Object.keys(o.jobs).length===0){e(null,o.results);return}}),o.index++;return Xw.bind(o,e)}});var Nn=Y((mj,Ya)=>{var Vu=jn(),$w=Un(),Qw=Dn();Ya.exports=Yw;Ya.exports.ascending=Hu;Ya.exports.descending=Zw;function Yw(i,a,e,o){var t=$w(i,e);return Vu(i,a,t,function n(c,m){if(c){o(c,m);return}if(t.index++,t.index<(t.keyedList||i).length){Vu(i,a,t,n);return}o(null,t.results);}),Qw.bind(t,o)}function Hu(i,a){return i<a?-1:i>a?1:0}function Zw(i,a){return -1*Hu(i,a)}});var Ku=Y((dj,Ju)=>{var qw=Nn();Ju.exports=eb;function eb(i,a,e){return qw(i,a,null,e)}});var Gu=Y((uj,Xu)=>{Xu.exports={parallel:Lu(),serial:Ku(),serialOrdered:Nn()};});var Qu=Y((gj,$u)=>{$u.exports=function(i,a){return Object.keys(a).forEach(function(e){i[e]=i[e]||a[e];}),i};});var Zu=Y((fj,Yu)=>{var Wn=Su(),rb=me("util"),Mn=me("path"),ob=me("http"),ab=me("https"),tb=me("url").parse,ib=me("fs"),nb=me("stream").Stream,Fn=Cu(),sb=Gu(),On=Qu();Yu.exports=P;rb.inherits(P,Wn);function P(i){if(!(this instanceof P))return new P(i);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Wn.call(this),i=i||{};for(var a in i)this[a]=i[a];}P.LINE_BREAK=`\r
2
+ `;P.DEFAULT_CONTENT_TYPE="application/octet-stream";P.prototype.append=function(i,a,e){e=e||{},typeof e=="string"&&(e={filename:e});var o=Wn.prototype.append.bind(this);if(typeof a=="number"&&(a=""+a),Array.isArray(a)){this._error(new Error("Arrays are not supported."));return}var t=this._multiPartHeader(i,a,e),n=this._multiPartFooter();o(t),o(a),o(n),this._trackLength(t,a,e);};P.prototype._trackLength=function(i,a,e){var o=0;e.knownLength!=null?o+=+e.knownLength:Buffer.isBuffer(a)?o=a.length:typeof a=="string"&&(o=Buffer.byteLength(a)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(i)+P.LINE_BREAK.length,!(!a||!a.path&&!(a.readable&&a.hasOwnProperty("httpVersion"))&&!(a instanceof nb))&&(e.knownLength||this._valuesToMeasure.push(a));};P.prototype._lengthRetriever=function(i,a){i.hasOwnProperty("fd")?i.end!=null&&i.end!=1/0&&i.start!=null?a(null,i.end+1-(i.start?i.start:0)):ib.stat(i.path,function(e,o){var t;if(e){a(e);return}t=o.size-(i.start?i.start:0),a(null,t);}):i.hasOwnProperty("httpVersion")?a(null,+i.headers["content-length"]):i.hasOwnProperty("httpModule")?(i.on("response",function(e){i.pause(),a(null,+e.headers["content-length"]);}),i.resume()):a("Unknown stream");};P.prototype._multiPartHeader=function(i,a,e){if(typeof e.header=="string")return e.header;var o=this._getContentDisposition(a,e),t=this._getContentType(a,e),n="",c={"Content-Disposition":["form-data",'name="'+i+'"'].concat(o||[]),"Content-Type":[].concat(t||[])};typeof e.header=="object"&&On(c,e.header);var m;for(var u in c)c.hasOwnProperty(u)&&(m=c[u],m!=null&&(Array.isArray(m)||(m=[m]),m.length&&(n+=u+": "+m.join("; ")+P.LINE_BREAK)));return "--"+this.getBoundary()+P.LINE_BREAK+n+P.LINE_BREAK};P.prototype._getContentDisposition=function(i,a){var e,o;return typeof a.filepath=="string"?e=Mn.normalize(a.filepath).replace(/\\/g,"/"):a.filename||i.name||i.path?e=Mn.basename(a.filename||i.name||i.path):i.readable&&i.hasOwnProperty("httpVersion")&&(e=Mn.basename(i.client._httpMessage.path||"")),e&&(o='filename="'+e+'"'),o};P.prototype._getContentType=function(i,a){var e=a.contentType;return !e&&i.name&&(e=Fn.lookup(i.name)),!e&&i.path&&(e=Fn.lookup(i.path)),!e&&i.readable&&i.hasOwnProperty("httpVersion")&&(e=i.headers["content-type"]),!e&&(a.filepath||a.filename)&&(e=Fn.lookup(a.filepath||a.filename)),!e&&typeof i=="object"&&(e=P.DEFAULT_CONTENT_TYPE),e};P.prototype._multiPartFooter=function(){return function(i){var a=P.LINE_BREAK,e=this._streams.length===0;e&&(a+=this._lastBoundary()),i(a);}.bind(this)};P.prototype._lastBoundary=function(){return "--"+this.getBoundary()+"--"+P.LINE_BREAK};P.prototype.getHeaders=function(i){var a,e={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(a in i)i.hasOwnProperty(a)&&(e[a.toLowerCase()]=i[a]);return e};P.prototype.setBoundary=function(i){this._boundary=i;};P.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};P.prototype.getBuffer=function(){for(var i=new Buffer.alloc(0),a=this.getBoundary(),e=0,o=this._streams.length;e<o;e++)typeof this._streams[e]!="function"&&(Buffer.isBuffer(this._streams[e])?i=Buffer.concat([i,this._streams[e]]):i=Buffer.concat([i,Buffer.from(this._streams[e])]),(typeof this._streams[e]!="string"||this._streams[e].substring(2,a.length+2)!==a)&&(i=Buffer.concat([i,Buffer.from(P.LINE_BREAK)])));return Buffer.concat([i,Buffer.from(this._lastBoundary())])};P.prototype._generateBoundary=function(){for(var i="--------------------------",a=0;a<24;a++)i+=Math.floor(Math.random()*10).toString(16);this._boundary=i;};P.prototype.getLengthSync=function(){var i=this._overheadLength+this._valueLength;return this._streams.length&&(i+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),i};P.prototype.hasKnownLength=function(){var i=true;return this._valuesToMeasure.length&&(i=false),i};P.prototype.getLength=function(i){var a=this._overheadLength+this._valueLength;if(this._streams.length&&(a+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(i.bind(this,null,a));return}sb.parallel(this._valuesToMeasure,this._lengthRetriever,function(e,o){if(e){i(e);return}o.forEach(function(t){a+=t;}),i(null,a);});};P.prototype.submit=function(i,a){var e,o,t={method:"post"};return typeof i=="string"?(i=tb(i),o=On({port:i.port,path:i.pathname,host:i.hostname,protocol:i.protocol},t)):(o=On(i,t),o.port||(o.port=o.protocol=="https:"?443:80)),o.headers=this.getHeaders(i.headers),o.protocol=="https:"?e=ab.request(o):e=ob.request(o),this.getLength(function(n,c){if(n&&n!=="Unknown stream"){this._error(n);return}if(c&&e.setHeader("Content-Length",c),this.pipe(e),a){var m,u=function(g,R){return e.removeListener("error",u),e.removeListener("response",m),a.call(this,g,R)};m=u.bind(this,null),e.on("error",u),e.on("response",m);}}.bind(this)),e};P.prototype._error=function(i){this.error||(this.error=i,this.pause(),this.emit("error",i));};P.prototype.toString=function(){return "[object FormData]"};});var If={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};function Na(i,a=i){return ansiEscapes.link(a,i)}var k=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),Pd=i=>{k.settings.minLevel=If[i];},jf=()=>{k.settings.minLevel=100;};Pd(process.env.OPIK_LOG_LEVEL||"INFO");var Df="~/.opik.config",mn={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false};function Id(i){return Object.fromEntries(Object.entries(i).filter(([,a])=>a!==void 0))}function Nf(){return Id({apiKey:process.env.OPIK_API_KEY,apiUrl:process.env.OPIK_URL_OVERRIDE,projectName:process.env.OPIK_PROJECT_NAME,workspaceName:process.env.OPIK_WORKSPACE,batchDelayMs:process.env.OPIK_BATCH_DELAY_MS?Number(process.env.OPIK_BATCH_DELAY_MS):void 0,holdUntilFlush:process.env.OPIK_HOLD_UNTIL_FLUSH===void 0?void 0:["1","true","yes"].includes(String(process.env.OPIK_HOLD_UNTIL_FLUSH).toLowerCase())})}function Mf(){let i=process.env.OPIK_CONFIG_PATH||Df;if(!Cd__default.default.existsSync(i)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${i}`);return {}}try{let a=Uf__default.default.parse(Cd__default.default.readFileSync(i,"utf8"));return a.opik?Id({apiKey:a.opik.api_key,apiUrl:a.opik.url_override,projectName:a.opik.project_name,workspaceName:a.opik.workspace}):{}}catch(a){return k.error(`Error loading config file ${i}: ${a}`),{}}}function jd(i){let a=Nf(),e=Mf(),{headers:o,...t}=i||{};return Ff({...mn,...e,...a,...t})}function Ff(i){if(!i.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");let a=Of(i.apiUrl);if(a&&!i.apiKey)throw new Error("OPIK_API_KEY is not set");if(a&&!i.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return i}function Of(i){return new URL(i).hostname.endsWith("comet.com")}var K={};E(K,{AlertAlertType:()=>Wf,AlertPublicAlertType:()=>Gf,AlertTriggerConfigPublicType:()=>Kf,AlertTriggerConfigType:()=>Lf,AlertTriggerConfigWriteType:()=>Vf,AlertTriggerEventType:()=>Bf,AlertTriggerPublicEventType:()=>Xf,AlertTriggerWriteEventType:()=>Hf,AlertWriteAlertType:()=>Jf,AnnotationQueuePublicScope:()=>Zf,AnnotationQueueScope:()=>Qf,AnnotationQueueWriteScope:()=>Yf,AssistantMessageRole:()=>mh,AttachmentListRequestEntityType:()=>Dd,BadRequestError:()=>_,CheckName:()=>Ih,CheckPublicName:()=>uw,CheckPublicResult:()=>gw,CheckResult:()=>jh,ColumnCompareTypesItem:()=>Rh,ColumnPublicTypesItem:()=>Eh,ColumnTypesItem:()=>Ph,CompleteMultipartUploadRequestEntityType:()=>qf,ConflictError:()=>F,DatasetItemCompareSource:()=>yh,DatasetItemFilterOperator:()=>uh,DatasetItemPublicSource:()=>Th,DatasetItemSource:()=>hh,DatasetItemWriteSource:()=>_n,DatasetPublicStatus:()=>_h,DatasetPublicVisibility:()=>Sh,DatasetStatus:()=>fh,DatasetUpdateVisibility:()=>Wd,DatasetVisibility:()=>gh,DatasetWriteVisibility:()=>Od,DeleteAttachmentsRequestEntityType:()=>eh,DownloadAttachmentRequestEntityType:()=>Nd,ExperimentItemCompareTraceVisibilityMode:()=>kh,ExperimentItemPublicTraceVisibilityMode:()=>Ah,ExperimentItemTraceVisibilityMode:()=>wh,ExperimentPublicStatus:()=>Oh,ExperimentPublicType:()=>Fh,ExperimentStatus:()=>Ch,ExperimentType:()=>Tn,ExperimentUpdateStatus:()=>Hd,ExperimentUpdateType:()=>Vd,ExperimentWriteStatus:()=>Ld,ExperimentWriteType:()=>Bd,FeedbackScoreBatchItemSource:()=>mw,FeedbackScoreBatchItemThreadSource:()=>ww,FeedbackScoreCompareSource:()=>vh,FeedbackScoreExperimentItemBulkWriteViewSource:()=>Dh,FeedbackScorePublicSource:()=>pw,FeedbackScoreSource:()=>bh,FindFeedbackDefinitionsRequestType:()=>Jd,FindFeedbackScoreNames1RequestType:()=>eu,ForbiddenError:()=>Z,GetSpanStatsRequestType:()=>ru,GetSpansByProjectRequestType:()=>qd,GetWebhookExamplesRequestAlertType:()=>Ud,GuardrailName:()=>Wh,GuardrailResult:()=>Bh,GuardrailWriteName:()=>Lh,GuardrailWriteResult:()=>Vh,LlmAsJudgeMessagePublicRole:()=>sh,LlmAsJudgeMessageRole:()=>rh,LlmAsJudgeMessageWriteRole:()=>th,LlmAsJudgeOutputSchemaPublicType:()=>ph,LlmAsJudgeOutputSchemaType:()=>oh,LlmAsJudgeOutputSchemaWriteType:()=>ih,LogItemLevel:()=>lh,ManualEvaluationRequestEntityType:()=>Kh,NotFoundError:()=>T,NotImplementedError:()=>br,OptimizationPublicStatus:()=>$h,OptimizationStatus:()=>Xh,OptimizationUpdateStatus:()=>Xd,OptimizationWriteStatus:()=>Gh,ProjectDetailedVisibility:()=>rw,ProjectMetricRequestPublicInterval:()=>Yd,ProjectMetricRequestPublicMetricType:()=>Qd,ProjectMetricResponsePublicInterval:()=>qh,ProjectMetricResponsePublicMetricType:()=>Zh,ProjectPublicVisibility:()=>Yh,ProjectUpdateVisibility:()=>$d,ProjectVisibility:()=>Qh,ProjectWriteVisibility:()=>Gd,PromptType:()=>ow,PromptVersionDetailType:()=>tw,PromptVersionPublicType:()=>iw,PromptVersionType:()=>aw,PromptWriteType:()=>Zd,ProviderApiKeyProvider:()=>Jh,ProviderApiKeyPublicProvider:()=>Hh,ProviderApiKeyWriteProvider:()=>Kd,ResponseFormatType:()=>dh,SpanExperimentItemBulkWriteViewType:()=>Nh,SpanFilterPublicOperator:()=>dw,SpanPublicType:()=>cw,SpanSearchStreamRequestPublicType:()=>ou,SpanType:()=>ye,SpanUpdateType:()=>nw,SpanWriteType:()=>sw,StartMultipartUploadRequestEntityType:()=>Md,TraceFilterOperator:()=>ah,TraceFilterPublicOperator:()=>ch,TraceFilterWriteOperator:()=>nh,TracePublicVisibilityMode:()=>fw,TraceThreadFilterOperator:()=>bw,TraceThreadFilterPublicOperator:()=>ew,TraceThreadStatus:()=>hw,TraceVisibilityMode:()=>Uh,UnauthorizedError:()=>$,UnprocessableEntityError:()=>B,UploadAttachmentRequestEntityType:()=>Fd,ValueEntryCompareSource:()=>zh,ValueEntryExperimentItemBulkWriteViewSource:()=>Mh,ValueEntryPublicSource:()=>lw,ValueEntrySource:()=>xh,WebhookTestResultStatus:()=>$f,alerts:()=>Ma,annotationQueues:()=>un,attachments:()=>Fa,automationRuleEvaluators:()=>fn,chatCompletions:()=>hn,check:()=>gn,dashboards:()=>wn,datasets:()=>Oa,experiments:()=>Wa,feedbackDefinitions:()=>Ba,guardrails:()=>bn,llmProviderKey:()=>La,manualEvaluation:()=>xn,openTelemetryIngestion:()=>Rn,optimizations:()=>Va,projects:()=>Ha,prompts:()=>Ja,redirect:()=>Sn,serviceToggles:()=>yn,spans:()=>Ka,systemUsage:()=>dn,traces:()=>kn,welcomeWizard:()=>vn,workspaces:()=>zn});var Ma={};E(Ma,{GetWebhookExamplesRequestAlertType:()=>Ud});var Ud={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Fa={};E(Fa,{AttachmentListRequestEntityType:()=>Dd,DownloadAttachmentRequestEntityType:()=>Nd,StartMultipartUploadRequestEntityType:()=>Md,UploadAttachmentRequestEntityType:()=>Fd});var Dd={Trace:"trace",Span:"span"};var Nd={Trace:"trace",Span:"span"};var Md={Trace:"trace",Span:"span"};var Fd={Trace:"trace",Span:"span"};var Oa={};E(Oa,{DatasetUpdateVisibility:()=>Wd,DatasetWriteVisibility:()=>Od});var Od={Private:"private",Public:"public"};var Wd={Private:"private",Public:"public"};var Wa={};E(Wa,{ExperimentUpdateStatus:()=>Hd,ExperimentUpdateType:()=>Vd,ExperimentWriteStatus:()=>Ld,ExperimentWriteType:()=>Bd});var Bd={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Ld={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Vd={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Hd={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Ba={};E(Ba,{FindFeedbackDefinitionsRequestType:()=>Jd});var Jd={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};var La={};E(La,{ProviderApiKeyWriteProvider:()=>Kd});var Kd={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Va={};E(Va,{OptimizationUpdateStatus:()=>Xd});var Xd={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Ha={};E(Ha,{ProjectMetricRequestPublicInterval:()=>Yd,ProjectMetricRequestPublicMetricType:()=>Qd,ProjectUpdateVisibility:()=>$d,ProjectWriteVisibility:()=>Gd});var Gd={Private:"private",Public:"public"};var $d={Private:"private",Public:"public"};var Qd={FeedbackScores:"FEEDBACK_SCORES",TraceCount:"TRACE_COUNT",TokenUsage:"TOKEN_USAGE",Duration:"DURATION",Cost:"COST",GuardrailsFailedCount:"GUARDRAILS_FAILED_COUNT",ThreadCount:"THREAD_COUNT",ThreadDuration:"THREAD_DURATION",ThreadFeedbackScores:"THREAD_FEEDBACK_SCORES"};var Yd={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var Ja={};E(Ja,{PromptWriteType:()=>Zd});var Zd={Mustache:"mustache",Jinja2:"jinja2"};var Ka={};E(Ka,{FindFeedbackScoreNames1RequestType:()=>eu,GetSpanStatsRequestType:()=>ru,GetSpansByProjectRequestType:()=>qd,SpanSearchStreamRequestPublicType:()=>ou});var qd={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var eu={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var ru={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var ou={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var dn={};var un={};var gn={};var fn={};var hn={};var wn={};var bn={};var xn={};var Rn={};var yn={};var kn={};var vn={};var zn={};var Sn={};var Wf={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Bf={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var Lf={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Vf={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Hf={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var Jf={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Kf={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Xf={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var Gf={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var $f={Success:"success",Failure:"failure"};var Qf={Trace:"trace",Thread:"thread"};var Yf={Trace:"trace",Thread:"thread"};var Zf={Trace:"trace",Thread:"thread"};var qf={Trace:"trace",Span:"span"};var eh={Trace:"trace",Span:"span"};var rh={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var oh={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var ah={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var th={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var ih={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var nh={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var sh={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var ph={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var ch={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var lh={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};var mh={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};var dh={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};var uh={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var gh={Private:"private",Public:"public"};var fh={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var hh={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var wh={Default:"default",Hidden:"hidden"};var bh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var xh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var _n={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Rh={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var yh={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var kh={Default:"default",Hidden:"hidden"};var vh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var zh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Sh={Private:"private",Public:"public"};var _h={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Th={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Ah={Default:"default",Hidden:"hidden"};var Eh={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Ph={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Tn={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Ch={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Ih={Topic:"TOPIC",Pii:"PII"};var jh={Passed:"passed",Failed:"failed"};var ye={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Uh={Default:"default",Hidden:"hidden"};var Dh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Nh={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Mh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Fh={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Oh={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Wh={Topic:"TOPIC",Pii:"PII"};var Bh={Passed:"passed",Failed:"failed"};var Lh={Topic:"TOPIC",Pii:"PII"};var Vh={Passed:"passed",Failed:"failed"};var Hh={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Jh={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Kh={Trace:"trace",Thread:"thread"};var Xh={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Gh={Running:"running",Completed:"completed",Cancelled:"cancelled"};var $h={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Qh={Private:"private",Public:"public"};var Yh={Private:"private",Public:"public"};var Zh={FeedbackScores:"FEEDBACK_SCORES",TraceCount:"TRACE_COUNT",TokenUsage:"TOKEN_USAGE",Duration:"DURATION",Cost:"COST",GuardrailsFailedCount:"GUARDRAILS_FAILED_COUNT",ThreadCount:"THREAD_COUNT",ThreadDuration:"THREAD_DURATION",ThreadFeedbackScores:"THREAD_FEEDBACK_SCORES"};var qh={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var ew={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var rw={Private:"private",Public:"public"};var ow={Mustache:"mustache",Jinja2:"jinja2"};var aw={Mustache:"mustache",Jinja2:"jinja2"};var tw={Mustache:"mustache",Jinja2:"jinja2"};var iw={Mustache:"mustache",Jinja2:"jinja2"};var nw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var sw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var pw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var cw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var lw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var mw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var dw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var uw={Topic:"TOPIC",Pii:"PII"};var gw={Passed:"passed",Failed:"failed"};var fw={Default:"default",Hidden:"hidden"};var hw={Active:"active",Inactive:"inactive"};var ww={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var bw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Pe=(i,a,e)=>JSON.stringify(i,a,e);var p=class i extends Error{constructor({message:a,statusCode:e,body:o,rawResponse:t}){super(xw({message:a,statusCode:e,body:o})),Object.setPrototypeOf(this,i.prototype),this.statusCode=e,this.body=o,this.rawResponse=t;}};function xw({message:i,statusCode:a,body:e}){let o=[];return i!=null&&o.push(i),a!=null&&o.push(`Status code: ${a.toString()}`),e!=null&&o.push(`Body: ${Pe(e,void 0,2)}`),o.join(`
3
+ `)}var f=class i extends Error{constructor(a){super(a),Object.setPrototypeOf(this,i.prototype);}};var _=class i extends p{constructor(a,e){super({message:"BadRequestError",statusCode:400,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var F=class i extends p{constructor(a,e){super({message:"ConflictError",statusCode:409,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var B=class i extends p{constructor(a,e){super({message:"UnprocessableEntityError",statusCode:422,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var T=class i extends p{constructor(a,e){super({message:"NotFoundError",statusCode:404,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var $=class i extends p{constructor(a,e){super({message:"UnauthorizedError",statusCode:401,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var Z=class i extends p{constructor(a,e){super({message:"ForbiddenError",statusCode:403,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var br=class i extends p{constructor(a,e){super({message:"NotImplementedError",statusCode:501,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var w={Default:"http://localhost:5173/api"};var xr;typeof globalThis.Headers!="undefined"?xr=globalThis.Headers:xr=class au{constructor(a){if(this.headers=new Map,a)if(a instanceof au)a.forEach((e,o)=>this.append(o,e));else if(Array.isArray(a))for(let[e,o]of a)if(typeof e=="string"&&typeof o=="string")this.append(e,o);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[e,o]of Object.entries(a))if(typeof o=="string")this.append(e,o);else throw new TypeError("Header values must be strings")}append(a,e){let o=a.toLowerCase(),t=this.headers.get(o)||[];this.headers.set(o,[...t,e]);}delete(a){let e=a.toLowerCase();this.headers.delete(e);}get(a){let e=a.toLowerCase(),o=this.headers.get(e);return o?o.join(", "):null}has(a){let e=a.toLowerCase();return this.headers.has(e)}set(a,e){let o=a.toLowerCase();this.headers.set(o,[e]);}forEach(a,e){let o=e?a.bind(e):a;this.headers.forEach((t,n)=>o(t.join(", "),n,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[a,e]of this.headers.entries())yield [a,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let a of this.headers.values())yield a.join(", ");}[Symbol.iterator](){return this.entries()}};var Xa={headers:new xr,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},Ga={headers:new xr,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};function $a(i){return {headers:i.headers,redirected:i.redirected,status:i.status,statusText:i.statusText,type:i.type,url:i.url}}function tu(i,a){return Object.keys(a!=null?a:{}).length>0?`${i}?${Rw__default.default.stringify(a,{arrayFormat:"repeat"})}`:i}var d=yw();function yw(){var u,g,R,y,v;return typeof window!="undefined"&&typeof window.document!="undefined"?{type:"browser",version:window.navigator.userAgent}:typeof globalThis!="undefined"&&((u=globalThis==null?void 0:globalThis.navigator)==null?void 0:u.userAgent)==="Cloudflare-Workers"?{type:"workerd"}:typeof EdgeRuntime=="string"?{type:"edge-runtime"}:typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((g=self.constructor)==null?void 0:g.name)==="DedicatedWorkerGlobalScope"||((R=self.constructor)==null?void 0:R.name)==="ServiceWorkerGlobalScope"||((y=self.constructor)==null?void 0:y.name)==="SharedWorkerGlobalScope")?{type:"web-worker"}:typeof Deno!="undefined"&&typeof Deno.version!="undefined"&&typeof Deno.version.deno!="undefined"?{type:"deno",version:Deno.version.deno}:typeof Bun!="undefined"&&typeof Bun.version!="undefined"?{type:"bun",version:Bun.version}:typeof process!="undefined"&&"version"in process&&!!process.version&&"versions"in process&&!!((v=process.versions)!=null&&v.node)?{type:"node",version:process.versions.node,parsedVersion:Number(process.versions.node.split(".")[0])}:typeof navigator!="undefined"&&(navigator==null?void 0:navigator.product)==="ReactNative"?{type:"react-native"}:{type:"unknown"}}async function iu(){return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?fetch:d.type==="node"?(await import('node-fetch')).default:typeof fetch=="function"?fetch:(await import('node-fetch')).default}async function nu({body:i,type:a}){return a.includes("json")?Pe(i):i}async function uu(i){return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?new(await Promise.resolve().then(()=>(pu(),su))).Node18UniversalStreamWrapper(i):d.type!=="node"&&typeof fetch=="function"?new(await Promise.resolve().then(()=>(lu(),cu))).UndiciStreamWrapper(i):new(await Promise.resolve().then(()=>(du(),mu))).NodePre18StreamWrapper(i)}async function gu(i,a){if(i.body!=null&&a==="blob")return await i.blob();if(i.body!=null&&a==="arrayBuffer")return await i.arrayBuffer();if(i.body!=null&&a==="sse")return i.body;if(i.body!=null&&a==="streaming")return uu(i.body);if(i.body!=null&&a==="text")return await i.text();{let e=await i.text();if(e.length>0)try{return JSON.parse(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:i.status,rawBody:e}}}else return}}var kw="timeout";function fu(i){let a=new AbortController,e=setTimeout(()=>a.abort(kw),i);return {signal:a.signal,abortId:e}}function hu(...i){let a=i.length===1&&Array.isArray(i[0])?i[0]:i,e=new AbortController;for(let o of a){if(o.aborted){e.abort(o==null?void 0:o.reason);break}o.addEventListener("abort",()=>e.abort(o==null?void 0:o.reason),{signal:e.signal});}return e.signal}var wu=async(i,a,e,o,t,n,c,m,u)=>{let g=[],R;if(n!=null){let{signal:z,abortId:S}=fu(n);R=S,g.push(z);}c!=null&&g.push(c);let y=hu(g),v=await i(a,{method:e,headers:o,body:t,signal:y,credentials:m?"include":void 0,duplex:u});return R!=null&&clearTimeout(R),v};function vw(i){let a=1+(Math.random()*2-1)*.2;return i*a}async function bu(i,a=2){let e=await i();for(let o=0;o<a&&([408,429].includes(e.status)||e.status>=500);++o){let t=Math.min(1e3*Math.pow(2,o),6e4),n=vw(t);await new Promise(c=>setTimeout(c,n)),e=await i();}return e}async function zw(i){let a={};if(i.body!==void 0&&i.contentType!=null&&(a["Content-Type"]=i.contentType),i.headers!=null)for(let[n,c]of Object.entries(i.headers))c!=null&&(a[n]=c);let e=tu(i.url,i.queryParameters),o=await nu({body:i.body,type:i.requestType==="json"?"json":"other"}),t=await iu();try{let n=await bu(async()=>wu(t,e,i.method,a,o,i.timeoutMs,i.abortSignal,i.withCredentials,i.duplex),i.maxRetries),c=await gu(n,i.responseType);return n.status>=200&&n.status<400?{ok:!0,body:c,headers:n.headers,rawResponse:$a(n)}:{ok:!1,error:{reason:"status-code",statusCode:n.status,body:c},rawResponse:$a(n)}}catch(n){return i.abortSignal!=null&&i.abortSignal.aborted?{ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:Xa}:n instanceof Error&&n.name==="AbortError"?{ok:false,error:{reason:"timeout"},rawResponse:Xa}:n instanceof Error?{ok:false,error:{reason:"unknown",errorMessage:n.message},rawResponse:Ga}:{ok:false,error:{reason:"unknown",errorMessage:Pe(n)},rawResponse:Ga}}}var b=zw;var s={get:async i=>typeof i=="function"?i():i};var h=class i extends Promise{constructor(a){super(e=>{e(void 0);}),this.innerPromise=a;}static fromFunction(a,...e){return new i(a(...e))}static interceptFunction(a){return (...e)=>i.fromPromise(a(...e))}static fromPromise(a){return new i(a)}static fromExecutor(a){let e=new Promise(a);return new i(e)}static fromResult(a){let e=Promise.resolve(a);return new i(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:a})=>a)),this.unwrappedPromise}then(a,e){return this.unwrap().then(a,e)}catch(a){return this.unwrap().catch(a)}finally(a){return this.unwrap().finally(a)}async withRawResponse(){return await this.innerPromise}};function Hn(i){return typeof i=="object"&&i!=null&&"name"in i}function Jn(i){return typeof i=="object"&&i!=null&&"path"in i}function Kn(i){let a=i.lastIndexOf("/"),e=i.lastIndexOf("\\"),o=Math.max(a,e);return o>=0?i.substring(o+1):i}async function qu(){let i;return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?i=new Bn:d.type==="node"?i=new Ln:i=new Vn,await i.setup(),i}var Bn=class{async setup(){this.fd=new(await import('formdata-node')).FormData;}append(a,e){var o;(o=this.fd)==null||o.append(a,e);}getFileName(a,e){if(e!=null)return e;if(Hn(a))return a.name;if(Jn(a)&&a.path)return Kn(a.path.toString())}async appendFile(a,e,o){var t,n;o=this.getFileName(e,o),e instanceof Blob?(t=this.fd)==null||t.append(a,e,o):(n=this.fd)==null||n.append(a,{type:void 0,name:o,[Symbol.toStringTag]:"File",stream(){return e}});}async getRequest(){let a=new(await import('form-data-encoder')).FormDataEncoder(this.fd);return {body:(await import('readable-stream')).Readable.from(a),headers:a.headers,duplex:"half"}}},Ln=class{async setup(){this.fd=new(await Promise.resolve().then(()=>_f(Zu()))).default;}append(a,e){var o;(o=this.fd)==null||o.append(a,e);}getFileName(a,e){if(e!=null)return e;if(Hn(a))return a.name;if(Jn(a)&&a.path)return Kn(a.path.toString())}async appendFile(a,e,o){var n,c;o=this.getFileName(e,o);let t;e instanceof Blob?t=Buffer.from(await e.arrayBuffer()):t=e,o==null?(n=this.fd)==null||n.append(a,t):(c=this.fd)==null||c.append(a,t,{filename:o});}getRequest(){return {body:this.fd,headers:this.fd?this.fd.getHeaders():{}}}},Vn=class{async setup(){this.fd=new FormData;}append(a,e){var o;(o=this.fd)==null||o.append(a,e);}getFileName(a,e){if(e!=null)return e;if(Hn(a))return a.name;if(Jn(a)&&a.path)return Kn(a.path.toString())}async appendFile(a,e,o){var t,n;if(o=this.getFileName(e,o),e instanceof Blob){(t=this.fd)==null||t.append(a,e,o);return}(n=this.fd)==null||n.append(a,new Blob([e]),o);}getRequest(){return {body:this.fd,headers:{}}}};var r={};E(r,{JsonError:()=>qe,ParseError:()=>er,any:()=>gg,bigint:()=>rg,boolean:()=>fg,booleanLiteral:()=>ug,date:()=>og,discriminant:()=>zg,enum_:()=>qa,getObjectLikeUtils:()=>he,getObjectUtils:()=>We,getSchemaUtils:()=>U,isProperty:()=>Ie,lazy:()=>ag,lazyObject:()=>lg,list:()=>rt,number:()=>hg,object:()=>et,objectWithoutOptionalProperties:()=>cg,optional:()=>Xn,property:()=>ig,record:()=>Rg,set:()=>yg,string:()=>wg,stringLiteral:()=>dg,transform:()=>Gn,undiscriminatedUnion:()=>vg,union:()=>_g,unknown:()=>bg,withParsedProperties:()=>Qn});var A={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"};function j(i,a){return `Expected ${a}. Received ${pb(i)}.`}function pb(i){if(Array.isArray(i))return "list";if(i===null)return "null";if(i instanceof BigInt)return "BigInt";switch(typeof i){case "string":return `"${i}"`;case "bigint":case "number":case "boolean":case "undefined":return `${i}`}return typeof i}function Q(i){return {...i,json:eg(i.json),parse:eg(i.parse)}}function eg(i){return (a,e)=>{let o=i(a,e),{skipValidation:t=false}=e!=null?e:{};return !o.ok&&t?(console.warn(["Failed to validate.",...o.errors.map(n=>" - "+(n.path.length>0?`${n.path.join(".")}: ${n.message}`:n.message))].join(`
4
+ `)),{ok:true,value:a}):o}}function Za(i){return i.path.length===0?i.message:`${i.path.join(" -> ")}: ${i.message}`}var qe=class i extends Error{constructor(e){super(e.map(Za).join("; "));this.errors=e;Object.setPrototypeOf(this,i.prototype);}};var er=class i extends Error{constructor(e){super(e.map(Za).join("; "));this.errors=e;Object.setPrototypeOf(this,i.prototype);}};function U(i){return {nullable:()=>cb(i),optional:()=>Xn(i),optionalNullable:()=>lb(i),transform:a=>Gn(i,a),parseOrThrow:(a,e)=>{let o=i.parse(a,e);if(o.ok)return o.value;throw new er(o.errors)},jsonOrThrow:(a,e)=>{let o=i.json(a,e);if(o.ok)return o.value;throw new qe(o.errors)}}}function cb(i){let a={parse:(e,o)=>e==null?{ok:true,value:null}:i.parse(e,o),json:(e,o)=>e==null?{ok:true,value:null}:i.json(e,o),getType:()=>A.NULLABLE};return {...a,...U(a)}}function Xn(i){let a={parse:(e,o)=>e==null?{ok:true,value:void 0}:i.parse(e,o),json:(e,o)=>o!=null&&o.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:i.json(e,o),getType:()=>A.OPTIONAL};return {...a,...U(a)}}function lb(i){let a={parse:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:i.parse(e,o),json:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:i.json(e,o),getType:()=>A.OPTIONAL_NULLABLE};return {...a,...U(a)}}function Gn(i,a){let e={parse:(o,t)=>{let n=i.parse(o,t);return n.ok?{ok:true,value:a.transform(n.value)}:n},json:(o,t)=>{let n=a.untransform(o);return i.json(n,t)},getType:()=>i.getType()};return {...e,...U(e)}}function rg(){let i={parse:(a,{breadcrumbsPrefix:e=[]}={})=>typeof a=="bigint"?{ok:true,value:a}:typeof a=="number"?{ok:true,value:BigInt(a)}:{ok:false,errors:[{path:e,message:j(a,"bigint | number")}]},json:(a,{breadcrumbsPrefix:e=[]}={})=>typeof a!="bigint"?{ok:false,errors:[{path:e,message:j(a,"bigint")}]}:{ok:true,value:a},getType:()=>A.BIGINT};return {...Q(i),...U(i)}}var mb=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;function og(){let i={parse:(a,{breadcrumbsPrefix:e=[]}={})=>typeof a!="string"?{ok:false,errors:[{path:e,message:j(a,"string")}]}:mb.test(a)?{ok:true,value:new Date(a)}:{ok:false,errors:[{path:e,message:j(a,"ISO 8601 date string")}]},json:(a,{breadcrumbsPrefix:e=[]}={})=>a instanceof Date?{ok:true,value:a.toISOString()}:{ok:false,errors:[{path:e,message:j(a,"Date object")}]},getType:()=>A.DATE};return {...Q(i),...U(i)}}function q(i,a){return ()=>{let e={parse:a,json:a,getType:()=>i};return {...Q(e),...U(e)}}}function qa(i){let a=new Set(i);return q(A.ENUM,(o,{allowUnrecognizedEnumValues:t,breadcrumbsPrefix:n=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:n,message:j(o,"string")}]}:!a.has(o)&&!t?{ok:false,errors:[{path:n,message:j(o,"enum")}]}:{ok:true,value:o})()}function ag(i){let a=$n(i);return {...a,...U(a)}}function $n(i){return {parse:(a,e)=>rr(i).parse(a,e),json:(a,e)=>rr(i).json(a,e),getType:()=>rr(i).getType()}}function rr(i){let a=i;return a.__zurg_memoized==null&&(a.__zurg_memoized=i()),a.__zurg_memoized}function Rr(i){return Object.entries(i)}function yr(i,a){let e=new Set(a);return Object.entries(i).reduce((o,[t,n])=>(e.has(t)&&(o[t]=n),o),{})}function Ce(i){if(typeof i!="object"||i===null)return false;if(Object.getPrototypeOf(i)===null)return true;let a=i;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(i)===a}function kr(i){return Object.keys(i)}function tg(i,a){let e=[],o=[];for(let t of i)a(t)?e.push(t):o.push(t);return [e,o]}function he(i){return {withParsedProperties:a=>Qn(i,a)}}function Qn(i,a){let e={parse:(o,t)=>{let n=i.parse(o,t);if(!n.ok)return n;let c=Object.entries(a).reduce((m,[u,g])=>({...m,[u]:typeof g=="function"?g(n.value):g}),{});return {ok:true,value:{...n.value,...c}}},json:(o,t)=>{var m;if(!Ce(o))return {ok:false,errors:[{path:(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],message:j(o,"object")}]};let n=new Set(Object.keys(a)),c=yr(o,Object.keys(o).filter(u=>!n.has(u)));return i.json(c,t)},getType:()=>i.getType()};return {...e,...U(e),...he(e)}}function ig(i,a){return {rawKey:i,valueSchema:a,isProperty:true}}function Ie(i){return i.isProperty}function et(i){let a={_getRawProperties:()=>Object.entries(i).map(([e,o])=>Ie(o)?o.rawKey:e),_getParsedProperties:()=>kr(i),parse:(e,o)=>{let t={},n=[];for(let[c,m]of Rr(i)){let u=Ie(m)?m.rawKey:c,g=Ie(m)?m.valueSchema:m,R={rawKey:u,parsedKey:c,valueSchema:g};t[u]=R,pg(g)&&n.push(u);}return ng({value:e,requiredKeys:n,getProperty:c=>{let m=t[c];if(m!=null)return {transformedKey:m.parsedKey,transform:u=>{var g;return m.valueSchema.parse(u,{...o,breadcrumbsPrefix:[...(g=o==null?void 0:o.breadcrumbsPrefix)!=null?g:[],c]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},json:(e,o)=>{let t=[];for(let[n,c]of Rr(i)){let m=Ie(c)?c.valueSchema:c;pg(m)&&t.push(n);}return ng({value:e,requiredKeys:t,getProperty:n=>{let c=i[n];if(c!=null)return Ie(c)?{transformedKey:c.rawKey,transform:m=>{var u;return c.valueSchema.json(m,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}:{transformedKey:n,transform:m=>{var u;return c.json(m,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},getType:()=>A.OBJECT};return {...Q(a),...U(a),...he(a),...We(a)}}function ng({value:i,requiredKeys:a,getProperty:e,unrecognizedObjectKeys:o="fail",skipValidation:t=false,breadcrumbsPrefix:n=[]}){if(!Ce(i))return {ok:false,errors:[{path:n,message:j(i,"object")}]};let c=new Set(a),m=[],u={};for(let[g,R]of Object.entries(i)){let y=e(g);if(y!=null){c.delete(g);let v=y.transform(R);v.ok?u[y.transformedKey]=v.value:(u[g]=R,m.push(...v.errors));}else switch(o){case "fail":m.push({path:[...n,g],message:`Unexpected key "${g}"`});break;case "strip":break;case "passthrough":u[g]=R;break}}return m.push(...a.filter(g=>c.has(g)).map(g=>({path:n,message:`Missing required key "${g}"`}))),m.length===0||t?{ok:true,value:u}:{ok:false,errors:m}}function We(i){return {extend:a=>{let e={_getParsedProperties:()=>[...i._getParsedProperties(),...a._getParsedProperties()],_getRawProperties:()=>[...i._getRawProperties(),...a._getRawProperties()],parse:(o,t)=>sg({extensionKeys:a._getRawProperties(),value:o,transformBase:n=>i.parse(n,t),transformExtension:n=>a.parse(n,t)}),json:(o,t)=>sg({extensionKeys:a._getParsedProperties(),value:o,transformBase:n=>i.json(n,t),transformExtension:n=>a.json(n,t)}),getType:()=>A.OBJECT};return {...e,...U(e),...he(e),...We(e)}},passthrough:()=>{let a={_getParsedProperties:()=>i._getParsedProperties(),_getRawProperties:()=>i._getRawProperties(),parse:(e,o)=>{let t=i.parse(e,{...o,unrecognizedObjectKeys:"passthrough"});return t.ok?{ok:true,value:{...e,...t.value}}:t},json:(e,o)=>{let t=i.json(e,{...o,unrecognizedObjectKeys:"passthrough"});return t.ok?{ok:true,value:{...e,...t.value}}:t},getType:()=>A.OBJECT};return {...a,...U(a),...he(a),...We(a)}}}}function sg({extensionKeys:i,value:a,transformBase:e,transformExtension:o}){let t=new Set(i),[n,c]=tg(kr(a),g=>t.has(g)),m=e(yr(a,c)),u=o(yr(a,n));return m.ok&&u.ok?{ok:true,value:{...m.value,...u.value}}:{ok:false,errors:[...m.ok?[]:m.errors,...u.ok?[]:u.errors]}}function pg(i){return !db(i)}function db(i){switch(i.getType()){case A.ANY:case A.UNKNOWN:case A.OPTIONAL:case A.OPTIONAL_NULLABLE:return true;default:return false}}function cg(i){return et(i)}function lg(i){let a={...$n(i),_getRawProperties:()=>rr(i)._getRawProperties(),_getParsedProperties:()=>rr(i)._getParsedProperties()};return {...a,...U(a),...he(a),...We(a)}}function rt(i){let a={parse:(e,o)=>mg(e,(t,n)=>{var c;return i.parse(t,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),json:(e,o)=>mg(e,(t,n)=>{var c;return i.json(t,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),getType:()=>A.LIST};return {...Q(a),...U(a)}}function mg(i,a){return Array.isArray(i)?i.map((o,t)=>a(o,t)).reduce((o,t)=>{if(o.ok&&t.ok)return {ok:true,value:[...o.value,t.value]};let n=[];return o.ok||n.push(...o.errors),t.ok||n.push(...t.errors),{ok:false,errors:n}},{ok:true,value:[]}):{ok:false,errors:[{message:j(i,"list"),path:[]}]}}function dg(i){return q(A.STRING_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===i?{ok:true,value:i}:{ok:false,errors:[{path:o,message:j(e,`"${i}"`)}]})()}function ug(i){return q(A.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===i?{ok:true,value:i}:{ok:false,errors:[{path:o,message:j(e,`${i.toString()}`)}]})()}var gg=q(A.ANY,i=>({ok:true,value:i}));var fg=q(A.BOOLEAN,(i,{breadcrumbsPrefix:a=[]}={})=>typeof i=="boolean"?{ok:true,value:i}:{ok:false,errors:[{path:a,message:j(i,"boolean")}]});var hg=q(A.NUMBER,(i,{breadcrumbsPrefix:a=[]}={})=>typeof i=="number"?{ok:true,value:i}:{ok:false,errors:[{path:a,message:j(i,"number")}]});var wg=q(A.STRING,(i,{breadcrumbsPrefix:a=[]}={})=>typeof i=="string"?{ok:true,value:i}:{ok:false,errors:[{path:a,message:j(i,"string")}]});var bg=q(A.UNKNOWN,i=>({ok:true,value:i}));function Rg(i,a){let e={parse:(o,t)=>xg({value:o,isKeyNumeric:i.getType()===A.NUMBER,transformKey:n=>{var c;return i.parse(n,{...t,breadcrumbsPrefix:[...(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return a.parse(n,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix}),json:(o,t)=>xg({value:o,isKeyNumeric:i.getType()===A.NUMBER,transformKey:n=>{var c;return i.json(n,{...t,breadcrumbsPrefix:[...(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return a.json(n,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix}),getType:()=>A.RECORD};return {...Q(e),...U(e)}}function xg({value:i,isKeyNumeric:a,transformKey:e,transformValue:o,breadcrumbsPrefix:t=[]}){return Ce(i)?Rr(i).reduce((n,[c,m])=>{if(m===void 0)return n;let u=n,g=c;if(a){let z=c.length>0?Number(c):NaN;isNaN(z)||(g=z);}let R=e(g),y=o(m,g);if(u.ok&&R.ok&&y.ok)return {ok:true,value:{...u.value,[R.value]:y.value}};let v=[];return u.ok||v.push(...u.errors),R.ok||v.push(...R.errors),y.ok||v.push(...y.errors),{ok:false,errors:v}},{ok:true,value:{}}):{ok:false,errors:[{path:t,message:j(i,"object")}]}}function yg(i){let a=rt(i),e={parse:(o,t)=>{let n=a.parse(o,t);return n.ok?{ok:true,value:new Set(n.value)}:n},json:(o,t)=>{var c;return o instanceof Set?a.json([...o],t):{ok:false,errors:[{path:(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],message:j(o,"Set")}]}},getType:()=>A.SET};return {...Q(e),...U(e)}}function vg(i){let a={parse:(e,o)=>kg((t,n)=>t.parse(e,n),i,o),json:(e,o)=>kg((t,n)=>t.json(e,n),i,o),getType:()=>A.UNDISCRIMINATED_UNION};return {...Q(a),...U(a)}}function kg(i,a,e){let o=[];for(let[t,n]of a.entries()){let c=i(n,{...e,skipValidation:false});if(c.ok)return c;for(let m of c.errors)o.push({path:m.path,message:`[Variant ${t}] ${m.message}`});}return {ok:false,errors:o}}function zg(i,a){return {parsedDiscriminant:i,rawDiscriminant:a}}function _g(i,a){let e=typeof i=="string"?i:i.rawDiscriminant,o=typeof i=="string"?i:i.parsedDiscriminant,t=qa(kr(a)),n={parse:(c,m)=>Sg({value:c,discriminant:e,transformedDiscriminant:o,transformDiscriminantValue:u=>{var g;return t.parse(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],e]})},getAdditionalPropertiesSchema:u=>a[u],allowUnrecognizedUnionMembers:m==null?void 0:m.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.parse(u,m),breadcrumbsPrefix:m==null?void 0:m.breadcrumbsPrefix}),json:(c,m)=>Sg({value:c,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:u=>{var g;return t.json(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],o]})},getAdditionalPropertiesSchema:u=>a[u],allowUnrecognizedUnionMembers:m==null?void 0:m.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.json(u,m),breadcrumbsPrefix:m==null?void 0:m.breadcrumbsPrefix}),getType:()=>A.UNION};return {...Q(n),...U(n),...he(n)}}function Sg({value:i,discriminant:a,transformedDiscriminant:e,transformDiscriminantValue:o,getAdditionalPropertiesSchema:t,allowUnrecognizedUnionMembers:n=false,transformAdditionalProperties:c,breadcrumbsPrefix:m=[]}){if(!Ce(i))return {ok:false,errors:[{path:m,message:j(i,"object")}]};let{[a]:u,...g}=i;if(u==null)return {ok:false,errors:[{path:m,message:`Missing discriminant ("${a}")`}]};let R=o(u);if(!R.ok)return {ok:false,errors:R.errors};let y=t(R.value);if(y==null)return n?{ok:true,value:{[e]:R.value,...g}}:{ok:false,errors:[{path:[...m,a],message:"Unexpected discriminant value"}]};let v=c(g,y);return v.ok?{ok:true,value:{[e]:u,...v.value}}:v}function ub(i){var a=[];if(i.length===0)return "";if(typeof i[0]!="string")throw new TypeError("Url must be a string. Received "+i[0]);if(i[0].match(/^[^/:]+:\/*$/)&&i.length>1){var e=i.shift();i[0]=e+i[0];}i[0].match(/^file:\/\/\//)?i[0]=i[0].replace(/^([^/:]+):\/*/,"$1:///"):i[0]=i[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<i.length;o++){var t=i[o];if(typeof t!="string")throw new TypeError("Url must be a string. Received "+t);t!==""&&(o>0&&(t=t.replace(/^[\/]+/,"")),o<i.length-1?t=t.replace(/[\/]+$/,""):t=t.replace(/[\/]+$/,"/"),a.push(t));}var n=a.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");var c=n.split("?");return n=c.shift()+(c.length>0?"?":"")+c.join("&"),n}function x(){var i;return typeof arguments[0]=="object"?i=arguments[0]:i=[].slice.call(arguments),ub(i)}var C={};E(C,{AggregationData:()=>vl,Alert:()=>xb,AlertAlertType:()=>Vs,AlertPagePublic:()=>sp,AlertPublic:()=>jo,AlertPublicAlertType:()=>rp,AlertTrigger:()=>Gs,AlertTriggerConfig:()=>Xs,AlertTriggerConfigPublic:()=>ip,AlertTriggerConfigPublicType:()=>tp,AlertTriggerConfigType:()=>Ks,AlertTriggerConfigWrite:()=>Qs,AlertTriggerConfigWriteType:()=>$s,AlertTriggerEventType:()=>Js,AlertTriggerPublic:()=>np,AlertTriggerPublicEventType:()=>ap,AlertTriggerWrite:()=>Zs,AlertTriggerWriteEventType:()=>Ys,AlertWrite:()=>Io,AlertWriteAlertType:()=>qs,AnnotationQueue:()=>up,AnnotationQueueBatch:()=>yb,AnnotationQueueBatchWrite:()=>zo,AnnotationQueueItemIds:()=>Vt,AnnotationQueuePagePublic:()=>hp,AnnotationQueuePublic:()=>Uo,AnnotationQueuePublicScope:()=>gp,AnnotationQueueReviewer:()=>dp,AnnotationQueueReviewerPublic:()=>fp,AnnotationQueueScope:()=>mp,AnnotationQueueUpdate:()=>So,AnnotationQueueWrite:()=>vo,AnnotationQueueWriteScope:()=>As,AssistantMessage:()=>bc,AssistantMessageRole:()=>wc,Attachment:()=>wp,AttachmentListRequestEntityType:()=>tt,AttachmentPage:()=>bp,AuthDetailsHolder:()=>vp,AutomationRuleEvaluator:()=>vb,AutomationRuleEvaluatorLlmAsJudge:()=>Cp,AutomationRuleEvaluatorLlmAsJudgePublic:()=>$o,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>Bp,AutomationRuleEvaluatorObjectPublic:()=>nc,AutomationRuleEvaluatorPagePublic:()=>sc,AutomationRuleEvaluatorPublic:()=>pc,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>jp,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>Yo,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>Vp,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>Up,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>Zo,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>Jp,AutomationRuleEvaluatorUpdate:()=>hc,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>dc,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>gc,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>fc,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>uc,AutomationRuleEvaluatorUserDefinedMetricPython:()=>Ip,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>Qo,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>Xp,AutomationRuleEvaluatorWrite:()=>Qp,AvgValueStatPublic:()=>Jc,BatchDelete:()=>L,BatchDeleteByProject:()=>Vb,BiInformation:()=>Fs,BiInformationResponse:()=>ir,BooleanFeedbackDefinition:()=>Al,BooleanFeedbackDefinitionCreate:()=>Dl,BooleanFeedbackDefinitionPublic:()=>sa,BooleanFeedbackDefinitionUpdate:()=>Yl,BooleanFeedbackDetail:()=>Tl,BooleanFeedbackDetailCreate:()=>Ul,BooleanFeedbackDetailPublic:()=>Ll,BooleanFeedbackDetailUpdate:()=>Ql,CategoricalFeedbackDefinition:()=>Pl,CategoricalFeedbackDefinitionCreate:()=>Ml,CategoricalFeedbackDefinitionPublic:()=>pa,CategoricalFeedbackDefinitionUpdate:()=>ql,CategoricalFeedbackDetail:()=>El,CategoricalFeedbackDetailCreate:()=>Nl,CategoricalFeedbackDetailPublic:()=>Vl,CategoricalFeedbackDetailUpdate:()=>Zl,ChatCompletionChoice:()=>Rc,ChatCompletionRequest:()=>To,ChatCompletionResponse:()=>zc,Check:()=>ml,CheckName:()=>cl,CheckPublic:()=>Ym,CheckPublicName:()=>$m,CheckPublicResult:()=>Qm,CheckResult:()=>ll,ChunkedOutputJsonNode:()=>Tb,ChunkedOutputJsonNodePublic:()=>Cb,ChunkedOutputJsonNodePublicType:()=>_l,ChunkedOutputJsonNodeType:()=>tl,Column:()=>ol,ColumnCompare:()=>Cc,ColumnCompareTypesItem:()=>Pc,ColumnPublic:()=>qc,ColumnPublicTypesItem:()=>Zc,ColumnTypesItem:()=>rl,Comment:()=>H,CommentCompare:()=>Ic,CommentPublic:()=>Ke,CompleteMultipartUploadRequest:()=>Ht,CompleteMultipartUploadRequestEntityType:()=>xp,CompletionTokensDetails:()=>kc,CountValueStatPublic:()=>Kc,CreateDatasetItemsFromSpansRequest:()=>Ar,CreateDatasetItemsFromTracesRequest:()=>Er,CreatePromptVersionDetail:()=>ro,DashboardPagePublic:()=>Sc,DashboardPublic:()=>He,DashboardUpdatePublic:()=>Eo,DashboardWrite:()=>Ao,DataPointDouble:()=>Hb,DataPointNumberPublic:()=>Rm,Dataset:()=>zb,DatasetExpansion:()=>_b,DatasetExpansionResponse:()=>Ec,DatasetExpansionWrite:()=>jr,DatasetIdentifier:()=>Cr,DatasetIdentifierPublic:()=>Ur,DatasetItem:()=>ea,DatasetItemBatch:()=>Sb,DatasetItemBatchUpdate:()=>zr,DatasetItemBatchWrite:()=>Tr,DatasetItemCompare:()=>Wc,DatasetItemCompareSource:()=>jc,DatasetItemFilter:()=>Zn,DatasetItemFilterOperator:()=>Yn,DatasetItemPageCompare:()=>Bc,DatasetItemPagePublic:()=>el,DatasetItemPublic:()=>aa,DatasetItemPublicSource:()=>Qc,DatasetItemSource:()=>Ac,DatasetItemStreamRequest:()=>Dr,DatasetItemUpdate:()=>qn,DatasetItemWrite:()=>_r,DatasetItemWriteSource:()=>es,DatasetItemsDelete:()=>Ir,DatasetPagePublic:()=>Hc,DatasetPublic:()=>nr,DatasetPublicStatus:()=>Vc,DatasetPublicVisibility:()=>Lc,DatasetStatus:()=>Tc,DatasetUpdate:()=>Pr,DatasetUpdateVisibility:()=>lt,DatasetVersionCreatePublic:()=>Mr,DatasetVersionPagePublic:()=>nl,DatasetVersionPublic:()=>il,DatasetVersionTag:()=>Nr,DatasetVisibility:()=>_c,DatasetWrite:()=>Sr,DatasetWriteVisibility:()=>ct,DeleteAttachmentsRequest:()=>kb,DeleteAttachmentsRequestEntityType:()=>yp,DeleteFeedbackScore:()=>ga,DeleteIdsHolder:()=>sr,DeleteThreadFeedbackScores:()=>bo,DeleteTraceThreads:()=>xo,Delta:()=>xc,DownloadAttachmentRequestEntityType:()=>it,ErrorCountWithDeviation:()=>da,ErrorCountWithDeviationDetailed:()=>Tm,ErrorInfo:()=>Se,ErrorInfoExperimentItemBulkWriteView:()=>Lr,ErrorInfoPublic:()=>fa,ErrorInfoWrite:()=>to,ErrorMessage:()=>te,ErrorMessageDetail:()=>Wb,ErrorMessageDetailed:()=>Fb,ErrorMessagePublic:()=>Rb,Experiment:()=>Ab,ExperimentGroupAggregationsResponse:()=>Sl,ExperimentGroupResponse:()=>kl,ExperimentItem:()=>Or,ExperimentItemBulkRecord:()=>fl,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>gs,ExperimentItemBulkUpload:()=>Eb,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Vr,ExperimentItemCompare:()=>Oc,ExperimentItemCompareTraceVisibilityMode:()=>Fc,ExperimentItemPublic:()=>oa,ExperimentItemPublicTraceVisibilityMode:()=>Yc,ExperimentItemStreamRequest:()=>Jr,ExperimentItemTraceVisibilityMode:()=>ns,ExperimentItemsBatch:()=>Wr,ExperimentItemsDelete:()=>Br,ExperimentPagePublic:()=>bl,ExperimentPublic:()=>na,ExperimentPublicStatus:()=>wl,ExperimentPublicType:()=>hl,ExperimentStatus:()=>pl,ExperimentStreamRequestPublic:()=>Kr,ExperimentType:()=>sl,ExperimentUpdate:()=>Hr,ExperimentUpdateStatus:()=>ft,ExperimentUpdateType:()=>gt,ExperimentWrite:()=>Fr,ExperimentWriteStatus:()=>ut,ExperimentWriteType:()=>dt,ExportTraceServiceRequest:()=>Db,Feedback:()=>Ib,FeedbackCreate:()=>Bl,FeedbackDefinitionPagePublic:()=>Xl,FeedbackObjectPublic:()=>Kl,FeedbackPublic:()=>$l,FeedbackScore:()=>ee,FeedbackScoreAverage:()=>pe,FeedbackScoreAverageDetailed:()=>Am,FeedbackScoreAveragePublic:()=>Ve,FeedbackScoreBatch:()=>wa,FeedbackScoreBatchItem:()=>Gm,FeedbackScoreBatchItemSource:()=>Xm,FeedbackScoreBatchItemThread:()=>Ss,FeedbackScoreBatchItemThreadSource:()=>zs,FeedbackScoreBatchThread:()=>Ro,FeedbackScoreCompare:()=>Mc,FeedbackScoreCompareSource:()=>Uc,FeedbackScoreExperimentItemBulkWriteView:()=>us,FeedbackScoreExperimentItemBulkWriteViewSource:()=>ls,FeedbackScoreNames:()=>xm,FeedbackScorePublic:()=>pr,FeedbackScorePublicSource:()=>Lm,FeedbackScoreSource:()=>as,FeedbackUpdate:()=>am,FindFeedbackDefinitionsRequestType:()=>bt,FindFeedbackScoreNames1RequestType:()=>It,Function:()=>_o,FunctionCall:()=>_e,GetSpanStatsRequestType:()=>jt,GetSpansByProjectRequestType:()=>Ct,GetWebhookExamplesRequestAlertType:()=>ot,GroupContent:()=>xl,GroupContentWithAggregations:()=>zl,GroupDetail:()=>Rl,GroupDetails:()=>yl,Guardrail:()=>nm,GuardrailBatch:()=>jb,GuardrailBatchWrite:()=>Po,GuardrailName:()=>tm,GuardrailResult:()=>im,GuardrailWrite:()=>Ms,GuardrailWriteName:()=>Ds,GuardrailWriteResult:()=>Ns,GuardrailsValidation:()=>dl,GuardrailsValidationPublic:()=>Zm,IdsHolder:()=>Pb,ImageUrl:()=>Tp,ImageUrlPublic:()=>Zp,ImageUrlWrite:()=>Np,JsonListString:()=>D,JsonListStringCompare:()=>Qt,JsonListStringExperimentItemBulkWriteView:()=>we,JsonListStringPublic:()=>ce,JsonListStringWrite:()=>se,JsonNode:()=>N,JsonNodeDetail:()=>bs,JsonNodePublic:()=>Te,JsonNodeWrite:()=>Be,JsonSchema:()=>Is,LlmAsJudgeCode:()=>Oo,LlmAsJudgeCodePublic:()=>oc,LlmAsJudgeCodeWrite:()=>Wp,LlmAsJudgeMessage:()=>Mo,LlmAsJudgeMessageContent:()=>Ep,LlmAsJudgeMessageContentPublic:()=>ec,LlmAsJudgeMessageContentWrite:()=>Fp,LlmAsJudgeMessagePublic:()=>Xo,LlmAsJudgeMessagePublicRole:()=>Yp,LlmAsJudgeMessageRole:()=>_p,LlmAsJudgeMessageWrite:()=>Ho,LlmAsJudgeMessageWriteRole:()=>Dp,LlmAsJudgeModelParameters:()=>No,LlmAsJudgeModelParametersPublic:()=>Ko,LlmAsJudgeModelParametersWrite:()=>Vo,LlmAsJudgeOutputSchema:()=>Fo,LlmAsJudgeOutputSchemaPublic:()=>Go,LlmAsJudgeOutputSchemaPublicType:()=>rc,LlmAsJudgeOutputSchemaType:()=>Pp,LlmAsJudgeOutputSchemaWrite:()=>Jo,LlmAsJudgeOutputSchemaWriteType:()=>Op,LogItem:()=>lc,LogItemLevel:()=>cc,LogPage:()=>mc,ManualEvaluationRequest:()=>ei,ManualEvaluationRequestEntityType:()=>lm,ManualEvaluationResponse:()=>qt,Message:()=>Es,MultipartUploadPart:()=>Rp,NumericalFeedbackDefinition:()=>Il,NumericalFeedbackDefinitionCreate:()=>Ol,NumericalFeedbackDefinitionPublic:()=>ca,NumericalFeedbackDefinitionUpdate:()=>rm,NumericalFeedbackDetail:()=>Cl,NumericalFeedbackDetailCreate:()=>Fl,NumericalFeedbackDetailPublic:()=>Hl,NumericalFeedbackDetailUpdate:()=>em,Optimization:()=>Nb,OptimizationPagePublic:()=>gm,OptimizationPublic:()=>ma,OptimizationPublicStatus:()=>um,OptimizationStatus:()=>mm,OptimizationUpdate:()=>$r,OptimizationUpdateStatus:()=>kt,OptimizationWrite:()=>ri,OptimizationWriteStatus:()=>dm,PageColumns:()=>al,PercentageValueStatPublic:()=>Xc,PercentageValues:()=>Ae,PercentageValuesDetailed:()=>Em,PercentageValuesPublic:()=>ra,Project:()=>Mb,ProjectDetailed:()=>Cm,ProjectDetailedVisibility:()=>Pm,ProjectMetricRequestPublic:()=>Zr,ProjectMetricRequestPublicInterval:()=>Tt,ProjectMetricRequestPublicMetricType:()=>_t,ProjectMetricResponsePublic:()=>zm,ProjectMetricResponsePublicInterval:()=>km,ProjectMetricResponsePublicMetricType:()=>ym,ProjectPagePublic:()=>wm,ProjectPublic:()=>ua,ProjectPublicVisibility:()=>hm,ProjectRetrieveDetailed:()=>qr,ProjectStatItemObjectPublic:()=>$c,ProjectStatsPublic:()=>Je,ProjectStatsSummary:()=>_m,ProjectStatsSummaryItem:()=>Sm,ProjectUpdate:()=>Yr,ProjectUpdateVisibility:()=>St,ProjectVisibility:()=>fm,ProjectWrite:()=>Qr,ProjectWriteVisibility:()=>zt,Prompt:()=>Ob,PromptDetail:()=>Dm,PromptPagePublic:()=>Wm,PromptPublic:()=>Om,PromptTokensDetails:()=>yc,PromptType:()=>Im,PromptUpdatable:()=>oo,PromptVersion:()=>Um,PromptVersionDetail:()=>ke,PromptVersionDetailType:()=>xs,PromptVersionLink:()=>Yt,PromptVersionLinkPublic:()=>Zt,PromptVersionLinkWrite:()=>wt,PromptVersionPagePublic:()=>Fm,PromptVersionPublic:()=>Mm,PromptVersionPublicType:()=>Nm,PromptVersionRetrieveDetail:()=>ao,PromptVersionType:()=>jm,PromptWrite:()=>eo,PromptWriteType:()=>Et,ProviderApiKey:()=>Ub,ProviderApiKeyPagePublic:()=>pm,ProviderApiKeyProvider:()=>cm,ProviderApiKeyPublic:()=>la,ProviderApiKeyPublicProvider:()=>sm,ProviderApiKeyUpdate:()=>Gr,ProviderApiKeyWrite:()=>Xr,ProviderApiKeyWriteProvider:()=>Rt,ResponseFormat:()=>js,ResponseFormatType:()=>Cs,Result:()=>Xe,ResultsNumberPublic:()=>vm,ScoreName:()=>bm,ServiceTogglesConfig:()=>Bm,Span:()=>ia,SpanBatch:()=>Bb,SpanBatchUpdate:()=>po,SpanBatchWrite:()=>no,SpanEnrichmentOptions:()=>rs,SpanExperimentItemBulkWriteView:()=>cs,SpanExperimentItemBulkWriteViewType:()=>ps,SpanFilterPublic:()=>vs,SpanFilterPublicOperator:()=>ks,SpanPagePublic:()=>Km,SpanPublic:()=>ha,SpanPublicType:()=>Jm,SpanSearchStreamRequestPublic:()=>co,SpanSearchStreamRequestPublicType:()=>Ut,SpanType:()=>gl,SpanUpdate:()=>so,SpanUpdateType:()=>ys,SpanWrite:()=>io,SpanWriteType:()=>Rs,SpansCountResponse:()=>Ws,StartMultipartUploadRequest:()=>vr,StartMultipartUploadRequestEntityType:()=>nt,StartMultipartUploadResponse:()=>kp,StreamOptions:()=>Ps,Tool:()=>Us,ToolCall:()=>qo,Trace:()=>ta,TraceBatch:()=>Lb,TraceBatchUpdate:()=>go,TraceBatchWrite:()=>mo,TraceCountResponse:()=>Ls,TraceEnrichmentOptions:()=>os,TraceExperimentItemBulkWriteView:()=>ss,TraceFilter:()=>Do,TraceFilterOperator:()=>Sp,TraceFilterPublic:()=>ze,TraceFilterPublicOperator:()=>fs,TraceFilterWrite:()=>$p,TraceFilterWriteOperator:()=>Gp,TracePagePublic:()=>od,TracePublic:()=>ba,TracePublicVisibilityMode:()=>qm,TraceSearchStreamRequestPublic:()=>ko,TraceThread:()=>xa,TraceThreadBatchIdentifier:()=>wo,TraceThreadBatchUpdate:()=>ho,TraceThreadFilter:()=>Ts,TraceThreadFilterOperator:()=>_s,TraceThreadFilterPublic:()=>ws,TraceThreadFilterPublicOperator:()=>hs,TraceThreadIdentifier:()=>oi,TraceThreadLlmAsJudgeCode:()=>Bo,TraceThreadLlmAsJudgeCodePublic:()=>tc,TraceThreadLlmAsJudgeCodeWrite:()=>Lp,TraceThreadPage:()=>rd,TraceThreadSearchStreamRequest:()=>yo,TraceThreadStatus:()=>ed,TraceThreadUpdate:()=>fo,TraceThreadUserDefinedMetricPythonCode:()=>Lo,TraceThreadUserDefinedMetricPythonCodePublic:()=>ic,TraceThreadUserDefinedMetricPythonCodeWrite:()=>Hp,TraceUpdate:()=>uo,TraceVisibilityMode:()=>ul,TraceWrite:()=>lo,UploadAttachmentRequestEntityType:()=>st,Usage:()=>vc,UserDefinedMetricPythonCode:()=>Wo,UserDefinedMetricPythonCodePublic:()=>ac,UserDefinedMetricPythonCodeWrite:()=>Kp,ValueEntry:()=>is,ValueEntryCompare:()=>Nc,ValueEntryCompareSource:()=>Dc,ValueEntryExperimentItemBulkWriteView:()=>ds,ValueEntryExperimentItemBulkWriteViewSource:()=>ms,ValueEntryPublic:()=>Hm,ValueEntryPublicSource:()=>Vm,ValueEntrySource:()=>ts,VideoUrl:()=>Ap,VideoUrlPublic:()=>qp,VideoUrlWrite:()=>Mp,Webhook:()=>Hs,WebhookExamples:()=>pp,WebhookPublic:()=>op,WebhookTestResult:()=>lp,WebhookTestResultStatus:()=>cp,WebhookWrite:()=>ep,WelcomeWizardSubmission:()=>Co,WelcomeWizardTracking:()=>ad,WorkspaceConfiguration:()=>Ra,WorkspaceMetricRequest:()=>Jb,WorkspaceMetricResponse:()=>ai,WorkspaceMetricsSummaryRequest:()=>cr,WorkspaceMetricsSummaryResponse:()=>td,WorkspaceNameHolder:()=>zp,WorkspaceSpansCount:()=>Os,WorkspaceTraceCount:()=>Bs,alerts:()=>at,annotationQueues:()=>Ft,attachments:()=>or,chatCompletions:()=>Ot,dashboards:()=>Wt,datasets:()=>mt,experiments:()=>ar,feedbackDefinitions:()=>xt,guardrails:()=>Bt,llmProviderKey:()=>yt,optimizations:()=>vt,projects:()=>At,prompts:()=>Pt,spans:()=>tr,traces:()=>Le,welcomeWizard:()=>Lt});var at={};E(at,{GetWebhookExamplesRequestAlertType:()=>ot});var ot=r.enum_(["general","slack","pagerduty"]);var or={};E(or,{AttachmentListRequestEntityType:()=>tt,DownloadAttachmentRequestEntityType:()=>it,StartMultipartUploadRequest:()=>vr,StartMultipartUploadRequestEntityType:()=>nt,UploadAttachmentRequestEntityType:()=>st,uploadAttachment:()=>pt});var tt=r.enum_(["trace","span"]);var it=r.enum_(["trace","span"]);var nt=r.enum_(["trace","span"]);var st=r.enum_(["trace","span"]);var pt={};E(pt,{Request:()=>gb});var gb=r.record(r.string(),r.unknown());var vr=r.object({fileName:r.property("file_name",r.string()),numOfFileParts:r.property("num_of_file_parts",r.number()),mimeType:r.property("mime_type",r.string().optional()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",nt),entityId:r.property("entity_id",r.string()),path:r.string()});var mt={};E(mt,{CreateDatasetItemsFromSpansRequest:()=>Ar,CreateDatasetItemsFromTracesRequest:()=>Er,DatasetExpansionWrite:()=>jr,DatasetIdentifier:()=>Cr,DatasetIdentifierPublic:()=>Ur,DatasetItemBatchUpdate:()=>zr,DatasetItemBatchWrite:()=>Tr,DatasetItemStreamRequest:()=>Dr,DatasetItemsDelete:()=>Ir,DatasetUpdate:()=>Pr,DatasetUpdateVisibility:()=>lt,DatasetVersionCreatePublic:()=>Mr,DatasetVersionTag:()=>Nr,DatasetWrite:()=>Sr,DatasetWriteVisibility:()=>ct});var ct=r.enum_(["private","public"]);var lt=r.enum_(["private","public"]);var Yn=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Zn=r.object({field:r.string().optional(),operator:Yn.optional(),key:r.string().optional(),value:r.string().optional()});var N=r.record(r.string(),r.unknown());var qn=r.object({input:r.string().optional(),expectedOutput:r.property("expected_output",r.string().optional()),metadata:N.optional(),data:N.optional(),tags:r.list(r.string()).optional()});var zr=r.object({ids:r.list(r.string()).optional(),filters:r.list(Zn).optional(),update:qn,mergeTags:r.property("merge_tags",r.boolean().optional())});var Sr=r.object({id:r.string().optional(),name:r.string(),visibility:ct.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});var es=r.enum_(["manual","trace","span","sdk"]);var _r=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:es,data:N,tags:r.list(r.string()).optional()});var Tr=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(_r)});var rs=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Ar=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",rs)});var os=r.object({includeSpans:r.boolean().optional(),includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Er=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",os)});var Pr=r.object({name:r.string(),description:r.string().optional(),visibility:lt.optional(),tags:r.list(r.string()).optional()});var Cr=r.object({datasetName:r.property("dataset_name",r.string())});var Ir=r.object({itemIds:r.property("item_ids",r.list(r.string()))});var jr=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional())});var Ur=r.object({datasetName:r.property("dataset_name",r.string())});var Dr=r.object({datasetName:r.property("dataset_name",r.string()),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),steamLimit:r.property("steam_limit",r.number().optional())});var Nr=r.object({tag:r.string()});var Mr=r.object({tag:r.string().optional(),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional()});var ar={};E(ar,{ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Vr,ExperimentItemStreamRequest:()=>Jr,ExperimentItemsBatch:()=>Wr,ExperimentItemsDelete:()=>Br,ExperimentStreamRequestPublic:()=>Kr,ExperimentUpdate:()=>Hr,ExperimentUpdateStatus:()=>ft,ExperimentUpdateType:()=>gt,ExperimentWrite:()=>Fr,ExperimentWriteStatus:()=>ut,ExperimentWriteType:()=>dt,findFeedbackScoreNames:()=>ht});var dt=r.enum_(["regular","trial","mini-batch"]);var ut=r.enum_(["running","completed","cancelled"]);var gt=r.enum_(["regular","trial","mini-batch"]);var ft=r.enum_(["running","completed","cancelled"]);var ht={};E(ht,{Response:()=>fb});var fb=r.list(r.string());var se=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var wt=r.object({id:r.string()});var Fr=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),name:r.string().optional(),metadata:se.optional(),type:dt.optional(),optimizationId:r.property("optimization_id",r.string().optional()),status:ut.optional(),promptVersion:r.property("prompt_version",wt.optional()),promptVersions:r.property("prompt_versions",r.list(wt).optional())});var D=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var as=r.enum_(["ui","sdk","online_scoring"]);var ts=r.enum_(["ui","sdk","online_scoring"]);var is=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:ts.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var ee=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:as,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),is).optional())});var H=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var ns=r.enum_(["default","hidden"]);var Or=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),input:D.optional(),output:D.optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",ns.optional())});var Wr=r.object({experimentItems:r.property("experiment_items",r.list(Or))});var Br=r.object({ids:r.list(r.string())});var we=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var Lr=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var ss=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:we.optional(),output:we.optional(),metadata:we.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Lr.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var ps=r.enum_(["general","tool","llm","guardrail"]);var cs=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:ps.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:we.optional(),output:we.optional(),metadata:we.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Lr.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional())});var ls=r.enum_(["ui","sdk","online_scoring"]);var ms=r.enum_(["ui","sdk","online_scoring"]);var ds=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:ms.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var us=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:ls,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),ds).optional())});var gs=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",we.optional()),trace:ss.optional(),spans:r.list(cs).optional(),feedbackScores:r.property("feedback_scores",r.list(us).optional())});var Vr=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(gs)});var Hr=r.object({name:r.string().optional(),metadata:N.optional(),type:gt.optional(),status:ft.optional()});var Jr=r.object({experimentName:r.property("experiment_name",r.string()),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional()});var Kr=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional())});var xt={};E(xt,{FindFeedbackDefinitionsRequestType:()=>bt});var bt=r.enum_(["numerical","categorical","boolean"]);var yt={};E(yt,{ProviderApiKeyUpdate:()=>Gr,ProviderApiKeyWrite:()=>Xr,ProviderApiKeyWriteProvider:()=>Rt});var Rt=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var Xr=r.object({provider:Rt,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});var Gr=r.object({apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});var vt={};E(vt,{OptimizationUpdate:()=>$r,OptimizationUpdateStatus:()=>kt});var kt=r.enum_(["running","completed","cancelled"]);var $r=r.object({name:r.string().optional(),status:kt.optional()});var At={};E(At,{ProjectMetricRequestPublic:()=>Zr,ProjectMetricRequestPublicInterval:()=>Tt,ProjectMetricRequestPublicMetricType:()=>_t,ProjectRetrieveDetailed:()=>qr,ProjectUpdate:()=>Yr,ProjectUpdateVisibility:()=>St,ProjectWrite:()=>Qr,ProjectWriteVisibility:()=>zt});var zt=r.enum_(["private","public"]);var St=r.enum_(["private","public"]);var _t=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Tt=r.enum_(["HOURLY","DAILY","WEEKLY"]);var Qr=r.object({name:r.string(),visibility:zt.optional(),description:r.string().optional()});var Yr=r.object({name:r.string().optional(),description:r.string().optional(),visibility:St.optional()});var fs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ze=r.object({field:r.string().optional(),operator:fs.optional(),key:r.string().optional(),value:r.string().optional()});var hs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ws=r.object({field:r.string().optional(),operator:hs.optional(),key:r.string().optional(),value:r.string().optional()});var Zr=r.object({metricType:r.property("metric_type",_t.optional()),interval:Tt.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),traceFilters:r.property("trace_filters",r.list(ze).optional()),threadFilters:r.property("thread_filters",r.list(ws).optional())});var qr=r.object({name:r.string()});var Pt={};E(Pt,{CreatePromptVersionDetail:()=>ro,PromptUpdatable:()=>oo,PromptVersionRetrieveDetail:()=>ao,PromptWrite:()=>eo,PromptWriteType:()=>Et});var Et=r.enum_(["mustache","jinja2"]);var Be=r.record(r.string(),r.unknown());var eo=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:Be.optional(),changeDescription:r.property("change_description",r.string().optional()),type:Et.optional(),tags:r.list(r.string()).optional()});var bs=r.record(r.string(),r.unknown());var xs=r.enum_(["mustache","jinja2"]);var ke=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:bs.optional(),type:xs.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var ro=r.object({name:r.string(),version:ke});var oo=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});var ao=r.object({name:r.string(),commit:r.string().optional()});var tr={};E(tr,{FindFeedbackScoreNames1RequestType:()=>It,GetSpanStatsRequestType:()=>jt,GetSpansByProjectRequestType:()=>Ct,SpanBatchUpdate:()=>po,SpanBatchWrite:()=>no,SpanSearchStreamRequestPublic:()=>co,SpanSearchStreamRequestPublicType:()=>Ut,findFeedbackScoreNames1:()=>Dt});var Ct=r.enum_(["general","tool","llm","guardrail"]);var It=r.enum_(["general","tool","llm","guardrail"]);var jt=r.enum_(["general","tool","llm","guardrail"]);var Ut=r.enum_(["general","tool","llm","guardrail"]);var Dt={};E(Dt,{Response:()=>hb});var hb=r.list(r.string());var Rs=r.enum_(["general","tool","llm","guardrail"]);var to=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var io=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Rs.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:se.optional(),output:se.optional(),metadata:se.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",to.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional())});var no=r.object({spans:r.list(io)});var ys=r.enum_(["general","tool","llm","guardrail"]);var Se=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var so=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:ys.optional(),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),errorInfo:r.property("error_info",Se.optional())});var po=r.object({ids:r.list(r.string()),update:so,mergeTags:r.property("merge_tags",r.boolean().optional())});var ks=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var vs=r.object({field:r.string().optional(),operator:ks.optional(),key:r.string().optional(),value:r.string().optional()});var co=r.object({traceId:r.property("trace_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),type:Ut.optional(),filters:r.list(vs).optional(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var Le={};E(Le,{DeleteThreadFeedbackScores:()=>bo,DeleteTraceThreads:()=>xo,FeedbackScoreBatchThread:()=>Ro,TraceBatchUpdate:()=>go,TraceBatchWrite:()=>mo,TraceSearchStreamRequestPublic:()=>ko,TraceThreadBatchIdentifier:()=>wo,TraceThreadBatchUpdate:()=>ho,TraceThreadSearchStreamRequest:()=>yo,findFeedbackScoreNames2:()=>Nt,findTraceThreadsFeedbackScoreNames:()=>Mt});var Nt={};E(Nt,{Response:()=>wb});var wb=r.list(r.string());var Mt={};E(Mt,{Response:()=>bb});var bb=r.list(r.string());var lo=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:se.optional(),output:se.optional(),metadata:se.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",to.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var mo=r.object({traces:r.list(lo)});var uo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Se.optional()),threadId:r.property("thread_id",r.string().optional())});var go=r.object({ids:r.list(r.string()),update:uo,mergeTags:r.property("merge_tags",r.boolean().optional())});var fo=r.object({tags:r.list(r.string()).optional()});var ho=r.object({ids:r.list(r.string()),update:fo,mergeTags:r.property("merge_tags",r.boolean().optional())});var wo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()).optional())});var bo=r.object({projectName:r.property("project_name",r.string()),threadId:r.property("thread_id",r.string()),names:r.list(r.string()),author:r.string().optional()});var xo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()))});var zs=r.enum_(["ui","sdk","online_scoring"]);var Ss=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:zs,author:r.string().optional(),threadId:r.property("thread_id",r.string())});var Ro=r.object({scores:r.list(Ss)});var _s=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ts=r.object({field:r.string().optional(),operator:_s.optional(),key:r.string().optional(),value:r.string().optional()});var yo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Ts).optional(),lastRetrievedThreadModelId:r.property("last_retrieved_thread_model_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var ko=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(ze).optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var Ft={};E(Ft,{AnnotationQueueBatchWrite:()=>zo,AnnotationQueueUpdate:()=>So});var As=r.enum_(["trace","thread"]);var vo=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:As,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var zo=r.object({annotationQueues:r.property("annotation_queues",r.list(vo))});var So=r.object({name:r.string().optional(),description:r.string().optional(),instructions:r.string().optional(),commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var Ot={};E(Ot,{ChatCompletionRequest:()=>To});var Es=r.record(r.string(),r.unknown());var Ps=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});var Cs=r.enum_(["text","json_object","json_schema"]);var Is=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var js=r.object({type:Cs.optional(),jsonSchema:r.property("json_schema",Is.optional())});var _o=r.object({name:r.string().optional(),description:r.string().optional(),strict:r.boolean().optional(),parameters:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var Us=r.object({type:r.stringLiteral("function").optional(),function:_o.optional()});var _e=r.object({name:r.string().optional(),arguments:r.string().optional()});var To=r.object({model:r.string().optional(),messages:r.list(Es).optional(),temperature:r.number().optional(),topP:r.property("top_p",r.number().optional()),n:r.number().optional(),stream:r.boolean().optional(),streamOptions:r.property("stream_options",Ps.optional()),stop:r.list(r.string()).optional(),maxTokens:r.property("max_tokens",r.number().optional()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional()),presencePenalty:r.property("presence_penalty",r.number().optional()),frequencyPenalty:r.property("frequency_penalty",r.number().optional()),logitBias:r.property("logit_bias",r.record(r.string(),r.number()).optional()),user:r.string().optional(),responseFormat:r.property("response_format",js.optional()),seed:r.number().optional(),tools:r.list(Us).optional(),toolChoice:r.property("tool_choice",r.record(r.string(),r.unknown()).optional()),parallelToolCalls:r.property("parallel_tool_calls",r.boolean().optional()),store:r.boolean().optional(),metadata:r.record(r.string(),r.string()).optional(),reasoningEffort:r.property("reasoning_effort",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional()),functions:r.list(_o).optional(),functionCall:r.property("function_call",_e.optional())});var Wt={};E(Wt,{DashboardUpdatePublic:()=>Eo,DashboardWrite:()=>Ao});var Ao=r.object({name:r.string(),description:r.string().optional(),config:Be});var Te=r.record(r.string(),r.unknown());var Eo=r.object({name:r.string().optional(),description:r.string().optional(),config:Te.optional()});var Bt={};E(Bt,{GuardrailBatchWrite:()=>Po});var Ds=r.enum_(["TOPIC","PII"]);var Ns=r.enum_(["passed","failed"]);var Ms=r.object({entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:Ds,result:Ns,config:N,details:N});var Po=r.object({guardrails:r.list(Ms)});var Lt={};E(Lt,{WelcomeWizardSubmission:()=>Co});var Co=r.object({role:r.string().optional(),integrations:r.list(r.string()).optional(),email:r.string().optional(),joinBetaProgram:r.property("join_beta_program",r.boolean().optional())});var Fs=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});var ir=r.object({biInformation:r.property("bi_information",r.list(Fs).optional())});var Os=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});var Ws=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(Os).optional())});var Bs=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});var Ls=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(Bs).optional())});var te=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Vs=r.enum_(["general","slack","pagerduty"]);var Hs=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Js=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var Ks=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var Xs=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:Ks,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Gs=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",Js),triggerConfigs:r.property("trigger_configs",r.list(Xs).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var xb=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",Vs.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:Hs,triggers:r.list(Gs).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var $s=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var Qs=r.object({id:r.string().optional(),type:$s,configValue:r.property("config_value",r.record(r.string(),r.string()).optional())});var Ys=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var Zs=r.object({id:r.string().optional(),eventType:r.property("event_type",Ys),triggerConfigs:r.property("trigger_configs",r.list(Qs).optional())});var qs=r.enum_(["general","slack","pagerduty"]);var ep=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional()});var Io=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",qs.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:ep,triggers:r.list(Zs).optional()});var L=r.object({ids:r.list(r.string())});var rp=r.enum_(["general","slack","pagerduty"]);var op=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var ap=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var tp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var ip=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:tp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var np=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",ap),triggerConfigs:r.property("trigger_configs",r.list(ip).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var jo=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",rp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:op,triggers:r.list(np).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var sp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(jo).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Rb=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var pp=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});var cp=r.enum_(["success","failure"]);var lp=r.object({status:cp.optional(),statusCode:r.property("status_code",r.number().optional()),requestBody:r.property("request_body",r.string().optional()),errorMessage:r.property("error_message",r.string().optional())});var Vt=r.object({ids:r.list(r.string())});var mp=r.enum_(["trace","thread"]);var dp=r.object({username:r.string().optional(),status:r.number().optional()});var pe=r.object({name:r.string(),value:r.number()});var up=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:mp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(dp).optional(),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var yb=r.object({annotationQueues:r.property("annotation_queues",r.list(up))});var gp=r.enum_(["trace","thread"]);var fp=r.object({username:r.string().optional(),status:r.number().optional()});var Ve=r.object({name:r.string(),value:r.number()});var Uo=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:gp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(fp).optional(),feedbackScores:r.property("feedback_scores",r.list(Ve).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var hp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Uo).optional(),sortableBy:r.list(r.string()).optional()});var wp=r.object({link:r.string().optional(),fileName:r.property("file_name",r.string()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string())});var bp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(wp).optional(),sortableBy:r.list(r.string()).optional()});var xp=r.enum_(["trace","span"]);var Rp=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});var Ht=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",xp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string().optional()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string().optional()),uploadId:r.property("upload_id",r.string()),uploadedFileParts:r.property("uploaded_file_parts",r.list(Rp))});var yp=r.enum_(["trace","span"]);var kb=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",yp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});var kp=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});var vp=r.record(r.string(),r.unknown());var zp=r.object({workspaceName:r.property("workspace_name",r.string().optional())});var Sp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Do=r.object({field:r.string().optional(),operator:Sp.optional(),key:r.string().optional(),value:r.string().optional()});var No=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",N.optional())});var _p=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Tp=r.object({url:r.string(),detail:r.string().optional()});var Ap=r.object({url:r.string()});var Ep=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Tp.optional()),videoUrl:r.property("video_url",Ap.optional())});var Mo=r.object({role:_p,content:r.string().optional(),contentArray:r.property("content_array",r.list(Ep).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Pp=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Fo=r.object({name:r.string(),type:Pp,description:r.string()});var Oo=r.object({model:No,messages:r.list(Mo),variables:r.record(r.string(),r.string()),schema:r.list(Fo)});var Cp=r.object({code:Oo.optional()});var Wo=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Ip=r.object({code:Wo.optional()});var Bo=r.object({model:No,messages:r.list(Mo),schema:r.list(Fo)});var jp=r.object({code:Bo.optional()});var Lo=r.object({metric:r.string()});var Up=r.object({code:Lo.optional()});var Jt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(Do).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),vb=r.union("type",{llm_as_judge:Cp.extend(Jt),user_defined_metric_python:Ip.extend(Jt),trace_thread_llm_as_judge:jp.extend(Jt),trace_thread_user_defined_metric_python:Up.extend(Jt)}).transform({transform:i=>i,untransform:i=>i});var Vo=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Be.optional())});var Dp=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Np=r.object({url:r.string(),detail:r.string().optional()});var Mp=r.object({url:r.string()});var Fp=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Np.optional()),videoUrl:r.property("video_url",Mp.optional())});var Ho=r.object({role:Dp,content:r.string().optional(),contentArray:r.property("content_array",r.list(Fp).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Op=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Jo=r.object({name:r.string(),type:Op,description:r.string()});var Wp=r.object({model:Vo,messages:r.list(Ho),variables:r.record(r.string(),r.string()),schema:r.list(Jo)});var Bp=r.object({code:Wp.optional()});var Lp=r.object({model:Vo,messages:r.list(Ho),schema:r.list(Jo)});var Vp=r.object({code:Lp.optional()});var Hp=r.object({metric:r.string()});var Jp=r.object({code:Hp.optional()});var Kp=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Xp=r.object({code:Kp.optional()});var Gp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var $p=r.object({field:r.string().optional(),operator:Gp.optional(),key:r.string().optional(),value:r.string().optional()});var Kt=r.object({projectId:r.property("project_id",r.string()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list($p).optional(),action:r.stringLiteral("evaluator")}),Qp=r.union("type",{llm_as_judge:Bp.extend(Kt),user_defined_metric_python:Xp.extend(Kt),trace_thread_llm_as_judge:Vp.extend(Kt),trace_thread_user_defined_metric_python:Jp.extend(Kt)}).transform({transform:i=>i,untransform:i=>i});var Ko=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Te.optional())});var Yp=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Zp=r.object({url:r.string(),detail:r.string().optional()});var qp=r.object({url:r.string()});var ec=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Zp.optional()),videoUrl:r.property("video_url",qp.optional())});var Xo=r.object({role:Yp,content:r.string().optional(),contentArray:r.property("content_array",r.list(ec).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var rc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Go=r.object({name:r.string(),type:rc,description:r.string()});var oc=r.object({model:Ko,messages:r.list(Xo),variables:r.record(r.string(),r.string()),schema:r.list(Go)});var $o=r.object({code:oc.optional()});var ac=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Qo=r.object({code:ac.optional()});var tc=r.object({model:Ko,messages:r.list(Xo),schema:r.list(Go)});var Yo=r.object({code:tc.optional()});var ic=r.object({metric:r.string()});var Zo=r.object({code:ic.optional()});var Xt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(ze).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),nc=r.union("type",{llm_as_judge:$o.extend(Xt),user_defined_metric_python:Qo.extend(Xt),trace_thread_llm_as_judge:Yo.extend(Xt),trace_thread_user_defined_metric_python:Zo.extend(Xt)}).transform({transform:i=>i,untransform:i=>i});var sc=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(nc).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Gt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(ze).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),pc=r.union("type",{llm_as_judge:$o.extend(Gt),user_defined_metric_python:Qo.extend(Gt),trace_thread_llm_as_judge:Yo.extend(Gt),trace_thread_user_defined_metric_python:Zo.extend(Gt)}).transform({transform:i=>i,untransform:i=>i});var cc=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);var lc=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:cc.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});var mc=r.object({content:r.list(lc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var dc=r.object({code:Oo.optional()});var uc=r.object({code:Wo.optional()});var gc=r.object({code:Bo.optional()});var fc=r.object({code:Lo.optional()});var $t=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(Do).optional(),projectId:r.property("project_id",r.string()),action:r.stringLiteral("evaluator")}),hc=r.union("type",{llm_as_judge:dc.extend($t),user_defined_metric_python:uc.extend($t),trace_thread_llm_as_judge:gc.extend($t),trace_thread_user_defined_metric_python:fc.extend($t)}).transform({transform:i=>i,untransform:i=>i});var wc=r.enum_(["system","user","assistant","tool","function"]);var qo=r.object({id:r.string().optional(),index:r.number().optional(),type:r.stringLiteral("function").optional(),function:_e.optional()});var bc=r.object({role:wc.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(qo).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",_e.optional())});var xc=r.object({role:r.string().optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),toolCalls:r.property("tool_calls",r.list(qo).optional()),functionCall:r.property("function_call",_e.optional())});var Rc=r.object({index:r.number().optional(),message:bc.optional(),delta:xc.optional(),finishReason:r.property("finish_reason",r.string().optional())});var yc=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});var kc=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});var vc=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",yc.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",kc.optional())});var zc=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(Rc).optional(),usage:vc.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});var He=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),name:r.string(),slug:r.string().optional(),description:r.string().optional(),config:Te,createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var Sc=r.object({content:r.list(He).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var _c=r.enum_(["private","public"]);var Tc=r.enum_(["unknown","processing","completed","failed"]);var zb=r.object({id:r.string().optional(),name:r.string(),visibility:_c.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:Tc.optional()});var Ac=r.enum_(["manual","trace","span","sdk"]);var ea=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Ac,data:N,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(Or).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Sb=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(ea)});var Ec=r.object({generatedSamples:r.property("generated_samples",r.list(ea).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});var _b=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional())});var Pc=r.enum_(["string","number","object","boolean","array","null"]);var Cc=r.object({name:r.string().optional(),types:r.list(Pc).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Ic=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var jc=r.enum_(["manual","trace","span","sdk"]);var Qt=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var Uc=r.enum_(["ui","sdk","online_scoring"]);var Dc=r.enum_(["ui","sdk","online_scoring"]);var Nc=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Dc.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var Mc=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Uc,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Nc).optional())});var Fc=r.enum_(["default","hidden"]);var Oc=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),input:Qt.optional(),output:Qt.optional(),feedbackScores:r.property("feedback_scores",r.list(Mc).optional()),comments:r.list(Ic).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Fc.optional())});var Wc=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:jc,data:N,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(Oc).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Bc=r.object({content:r.list(Wc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Cc).optional(),sortableBy:r.list(r.string()).optional()});var Lc=r.enum_(["private","public"]);var Vc=r.enum_(["unknown","processing","completed","failed"]);var nr=r.object({id:r.string().optional(),name:r.string(),visibility:Lc.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:Vc.optional()});var Hc=r.object({content:r.list(nr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});var Jc=r.object({value:r.number().optional()});var Kc=r.object({value:r.number().optional()});var ra=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Xc=r.object({value:ra.optional()});var Gc=r.object({name:r.string().optional()}),$c=r.union("type",{PERCENTAGE:Xc.extend(Gc),COUNT:Kc.extend(Gc),AVG:Jc.extend(Gc)}).transform({transform:i=>i,untransform:i=>i});var Je=r.object({stats:r.list($c).optional()});var Qc=r.enum_(["manual","trace","span","sdk"]);var Yc=r.enum_(["default","hidden"]);var oa=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Yc.optional())});var aa=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Qc,data:N,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(oa).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Zc=r.enum_(["string","number","object","boolean","array","null"]);var qc=r.object({name:r.string().optional(),types:r.list(Zc).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var el=r.object({content:r.list(aa).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(qc).optional(),sortableBy:r.list(r.string()).optional()});var rl=r.enum_(["string","number","object","boolean","array","null"]);var ol=r.object({name:r.string().optional(),types:r.list(rl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var al=r.object({columns:r.list(ol).optional()});var tl=r.object({typeName:r.string().optional()});var Tb=r.object({type:tl.optional(),closed:r.boolean().optional()});var il=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),versionHash:r.property("version_hash",r.string().optional()),tags:r.list(r.string()).optional(),itemsTotal:r.property("items_total",r.number().optional()),itemsAdded:r.property("items_added",r.number().optional()),itemsModified:r.property("items_modified",r.number().optional()),itemsDeleted:r.property("items_deleted",r.number().optional()),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var nl=r.object({content:r.list(il).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var sl=r.enum_(["regular","trial","mini-batch"]);var pl=r.enum_(["running","completed","cancelled"]);var Ae=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Yt=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});var Ab=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),datasetId:r.property("dataset_id",r.string().optional()),name:r.string().optional(),metadata:D.optional(),type:sl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),comments:r.list(H).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:Ae.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:pl.optional(),promptVersion:r.property("prompt_version",Yt.optional()),promptVersions:r.property("prompt_versions",r.list(Yt).optional())});var sr=r.object({ids:r.list(r.string())});var cl=r.enum_(["TOPIC","PII"]);var ll=r.enum_(["passed","failed"]);var ml=r.object({name:cl.optional(),result:ll.optional()});var dl=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(ml).optional()});var ul=r.enum_(["default","hidden"]);var ta=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Se.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(dl).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",ul.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional()});var gl=r.enum_(["general","tool","llm","guardrail"]);var ia=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:gl.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Se.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional()});var fl=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",D.optional()),trace:ta.optional(),spans:r.list(ia).optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional())});var Eb=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(fl)});var Ke=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var ce=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var hl=r.enum_(["regular","trial","mini-batch"]);var wl=r.enum_(["running","completed","cancelled"]);var Zt=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});var na=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),datasetId:r.property("dataset_id",r.string().optional()),name:r.string().optional(),metadata:ce.optional(),type:hl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Ve).optional()),comments:r.list(Ke).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:ra.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:wl.optional(),promptVersion:r.property("prompt_version",Zt.optional()),promptVersions:r.property("prompt_versions",r.list(Zt).optional())});var bl=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(na).optional(),sortableBy:r.list(r.string()).optional()});var xl=r.object({label:r.string().optional()});var Rl=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});var yl=r.object({groupsDetails:r.property("groups_details",r.list(Rl).optional())});var kl=r.object({content:r.record(r.string(),xl).optional(),details:yl.optional()});var vl=r.object({experimentCount:r.property("experiment_count",r.number().optional()),traceCount:r.property("trace_count",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),duration:Ae.optional(),feedbackScores:r.property("feedback_scores",r.list(pe).optional())});var zl=r.object({aggregations:vl.optional()});var Sl=r.object({content:r.record(r.string(),zl).optional()});var Pb=r.object({ids:r.list(r.string())});var _l=r.object({typeName:r.string().optional()});var Cb=r.object({type:_l.optional(),closed:r.boolean().optional()});var Tl=r.object({trueLabel:r.string(),falseLabel:r.string()});var Al=r.object({details:Tl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var El=r.object({categories:r.record(r.string(),r.number())});var Pl=r.object({details:El.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Cl=r.object({max:r.number(),min:r.number()});var Il=r.object({details:Cl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var jl=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Ib=r.union("type",{numerical:Il.extend(jl),categorical:Pl.extend(jl),boolean:Al.extend(jl)}).transform({transform:i=>i,untransform:i=>i});var Ul=r.object({trueLabel:r.string(),falseLabel:r.string()});var Dl=r.object({details:Ul.optional()});var Nl=r.object({categories:r.record(r.string(),r.number())});var Ml=r.object({details:Nl.optional()});var Fl=r.object({max:r.number(),min:r.number()});var Ol=r.object({details:Fl.optional()});var Wl=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Bl=r.union("type",{numerical:Ol.extend(Wl),categorical:Ml.extend(Wl),boolean:Dl.extend(Wl)}).transform({transform:i=>i,untransform:i=>i});var Ll=r.object({trueLabel:r.string(),falseLabel:r.string()});var sa=r.object({details:Ll.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Vl=r.object({categories:r.record(r.string(),r.number())});var pa=r.object({details:Vl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Hl=r.object({max:r.number(),min:r.number()});var ca=r.object({details:Hl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Jl=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Kl=r.union("type",{numerical:ca.extend(Jl),categorical:pa.extend(Jl),boolean:sa.extend(Jl)}).transform({transform:i=>i,untransform:i=>i});var Xl=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Kl).optional()});var Gl=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),$l=r.union("type",{numerical:ca.extend(Gl),categorical:pa.extend(Gl),boolean:sa.extend(Gl)}).transform({transform:i=>i,untransform:i=>i});var Ql=r.object({trueLabel:r.string(),falseLabel:r.string()});var Yl=r.object({details:Ql.optional()});var Zl=r.object({categories:r.record(r.string(),r.number())});var ql=r.object({details:Zl.optional()});var em=r.object({max:r.number(),min:r.number()});var rm=r.object({details:em.optional()});var om=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),am=r.union("type",{numerical:rm.extend(om),categorical:ql.extend(om),boolean:Yl.extend(om)}).transform({transform:i=>i,untransform:i=>i});var tm=r.enum_(["TOPIC","PII"]);var im=r.enum_(["passed","failed"]);var nm=r.object({id:r.string().optional(),entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:tm,result:im,config:N,details:N});var jb=r.object({guardrails:r.list(nm)});var sm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var la=r.object({id:r.string().optional(),provider:sm,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var pm=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(la).optional(),sortableBy:r.list(r.string()).optional()});var cm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var Ub=r.object({id:r.string().optional(),provider:cm,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var qt=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});var lm=r.enum_(["trace","thread"]);var ei=r.object({projectId:r.property("project_id",r.string()),entityIds:r.property("entity_ids",r.list(r.string())),ruleIds:r.property("rule_ids",r.list(r.string())),entityType:r.property("entity_type",lm)});var Db=N;var mm=r.enum_(["running","completed","cancelled"]);var Nb=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:mm,metadata:D.optional(),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var dm=r.enum_(["running","completed","cancelled"]);var ri=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:dm,metadata:se.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var um=r.enum_(["running","completed","cancelled"]);var ma=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:um,metadata:ce.optional(),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Ve).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var gm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ma).optional(),sortableBy:r.list(r.string()).optional()});var da=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var fm=r.enum_(["private","public"]);var Mb=r.object({id:r.string().optional(),name:r.string(),visibility:fm.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),duration:Ae.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",da.optional())});var hm=r.enum_(["private","public"]);var ua=r.object({id:r.string().optional(),name:r.string(),visibility:hm.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional())});var wm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ua).optional(),sortableBy:r.list(r.string()).optional()});var bm=r.object({name:r.string().optional()});var xm=r.object({scores:r.list(bm).optional()});var Rm=r.object({time:r.date(),value:r.number().optional()});var ym=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var km=r.enum_(["HOURLY","DAILY","WEEKLY"]);var vm=r.object({name:r.string().optional(),data:r.list(Rm).optional()});var zm=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",ym.optional()),interval:km.optional(),results:r.list(vm).optional()});var Sm=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),duration:Ae.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",da.optional())});var _m=r.object({content:r.list(Sm).optional()});var Tm=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var Am=r.object({name:r.string(),value:r.number()});var Em=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Pm=r.enum_(["private","public"]);var Cm=r.object({id:r.string().optional(),name:r.string(),visibility:Pm.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(Am).optional()),duration:Em.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Tm.optional())});var Fb=r.object({errors:r.list(r.string()).optional()});var Im=r.enum_(["mustache","jinja2"]);var jm=r.enum_(["mustache","jinja2"]);var Um=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:N.optional(),type:jm.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Ob=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:N.optional(),changeDescription:r.property("change_description",r.string().optional()),type:Im.optional(),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Um.optional())});var Wb=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Dm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",ke.optional())});var Nm=r.enum_(["mustache","jinja2"]);var Mm=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:Te.optional(),type:Nm.optional(),changeDescription:r.property("change_description",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Fm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Mm).optional()});var Om=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional())});var Wm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Om).optional(),sortableBy:r.list(r.string()).optional()});var Bm=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),csvUploadEnabled:r.boolean(),exportEnabled:r.boolean()});var Bb=r.object({spans:r.list(ia)});var ga=r.object({name:r.string(),author:r.string().optional()});var fa=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Lm=r.enum_(["ui","sdk","online_scoring"]);var Vm=r.enum_(["ui","sdk","online_scoring"]);var Hm=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Vm.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var pr=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Lm,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Hm).optional())});var Jm=r.enum_(["general","tool","llm","guardrail"]);var ha=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Jm.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:ce.optional(),output:ce.optional(),metadata:ce.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",fa.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(pr).optional()),comments:r.list(Ke).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional()});var Km=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ha).optional(),sortableBy:r.list(r.string()).optional()});var Xm=r.enum_(["ui","sdk","online_scoring"]);var Gm=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Xm,author:r.string().optional(),id:r.string()});var wa=r.object({scores:r.list(Gm)});var Lb=r.object({traces:r.list(ta)});var Vb=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});var $m=r.enum_(["TOPIC","PII"]);var Qm=r.enum_(["passed","failed"]);var Ym=r.object({name:$m.optional(),result:Qm.optional()});var Zm=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Ym).optional()});var qm=r.enum_(["default","hidden"]);var ba=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:ce.optional(),output:ce.optional(),metadata:ce.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",fa.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(pr).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(pr).optional()),comments:r.list(Ke).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(Zm).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",qm.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional()});var ed=r.enum_(["active","inactive"]);var xa=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),threadModelId:r.property("thread_model_id",r.string().optional()),startTime:r.property("start_time",r.date().optional()),endTime:r.property("end_time",r.date().optional()),duration:r.number().optional(),firstMessage:r.property("first_message",D.optional()),lastMessage:r.property("last_message",D.optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),status:ed.optional(),numberOfMessages:r.property("number_of_messages",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),comments:r.list(H).optional(),tags:r.list(r.string()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional())});var oi=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string()),truncate:r.boolean().optional()});var rd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(xa).optional(),sortableBy:r.list(r.string()).optional()});var od=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ba).optional(),sortableBy:r.list(r.string()).optional()});var ad=r.object({completed:r.boolean().optional()});var Xe=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});var cr=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});var Hb=r.object({time:r.date(),value:r.number().optional()});var ai=r.object({results:r.list(Xe).optional()});var Jb=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});var Ra=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional())});var td=r.object({results:r.list(Xe).optional()});var ti=class{constructor(a={}){this._options=a;}getDatasetBiInfo(a){return h.fromPromise(this.__getDatasetBiInfo(a))}async __getDatasetBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-datasets.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getExperimentBiInfo(a){return h.fromPromise(this.__getExperimentBiInfo(a))}async __getExperimentBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-experiments.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansBiInfo(a){return h.fromPromise(this.__getSpansBiInfo(a))}async __getSpansBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-spans.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansCountForWorkspaces(a){return h.fromPromise(this.__getSpansCountForWorkspaces(a))}async __getSpansCountForWorkspaces(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Ws.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/workspace-span-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesBiInfo(a){return h.fromPromise(this.__getTracesBiInfo(a))}async __getTracesBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesCountForWorkspaces(a){return h.fromPromise(this.__getTracesCountForWorkspaces(a))}async __getTracesCountForWorkspaces(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Ls.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/workspace-trace-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ii=class{constructor(a={}){this._options=a;}findAlerts(a={},e){return h.fromPromise(this.__findAlerts(a,e))}async __findAlerts(a={},e){var g,R;let{page:o,size:t,sorting:n,filters:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.sorting=n),c!=null&&(m.filters=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/alerts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:sp.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/alerts.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createAlert(a,e){return h.fromPromise(this.__createAlert(a,e))}async __createAlert(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/alerts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Io.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/alerts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAlertBatch(a,e){return h.fromPromise(this.__deleteAlertBatch(a,e))}async __deleteAlertBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/alerts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/alerts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAlertById(a,e){return h.fromPromise(this.__getAlertById(a,e))}async __getAlertById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/alerts/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:jo.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/alerts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAlert(a,e,o){return h.fromPromise(this.__updateAlert(a,e,o))}async __updateAlert(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/alerts/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Io.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/alerts/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getWebhookExamples(a={},e){return h.fromPromise(this.__getWebhookExamples(a,e))}async __getWebhookExamples(a={},e){var c,m;let{alertType:o}=a,t={};o!=null&&(t.alert_type=ot.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}));let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:pp.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/alerts/webhooks/examples.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}testWebhook(a,e){return h.fromPromise(this.__testWebhook(a,e))}async __testWebhook(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Io.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:lp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/alerts/webhooks/tests.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ni=class{constructor(a={}){this._options=a;}addItemsToAnnotationQueue(a,e,o){return h.fromPromise(this.__addItemsToAnnotationQueue(a,e,o))}async __addItemsToAnnotationQueue(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}/items/add`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Vt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/add.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findAnnotationQueues(a={},e){return h.fromPromise(this.__findAnnotationQueues(a,e))}async __findAnnotationQueues(a={},e){var R,y;let{page:o,size:t,name:n,filters:c,sorting:m}=a,u={};o!=null&&(u.page=o.toString()),t!=null&&(u.size=t.toString()),n!=null&&(u.name=n),c!=null&&(u.filters=c),m!=null&&(u.sorting=m);let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/annotation-queues"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:hp.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/annotation-queues.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createAnnotationQueue(a,e){return h.fromPromise(this.__createAnnotationQueue(a,e))}async __createAnnotationQueue(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/annotation-queues"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:vo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createAnnotationQueueBatch(a,e){return h.fromPromise(this.__createAnnotationQueueBatch(a,e))}async __createAnnotationQueueBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:zo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAnnotationQueueBatch(a,e){return h.fromPromise(this.__deleteAnnotationQueueBatch(a,e))}async __deleteAnnotationQueueBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAnnotationQueueById(a,e){return h.fromPromise(this.__getAnnotationQueueById(a,e))}async __getAnnotationQueueById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Uo.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAnnotationQueue(a,e={},o){return h.fromPromise(this.__updateAnnotationQueue(a,e,o))}async __updateAnnotationQueue(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:So.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}removeItemsFromAnnotationQueue(a,e,o){return h.fromPromise(this.__removeItemsFromAnnotationQueue(a,e,o))}async __removeItemsFromAnnotationQueue(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}/items/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Vt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var si=class{constructor(a={}){this._options=a;}attachmentList(a,e){return h.fromPromise(this.__attachmentList(a,e))}async __attachmentList(a,e){var y,v;let{page:o,size:t,projectId:n,entityType:c,entityId:m,path:u}=a,g={};o!=null&&(g.page=o.toString()),t!=null&&(g.size=t.toString()),g.project_id=n,g.entity_type=tt.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m,g.path=u;let R=await b({url:x((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v:w.Default,"v1/private/attachment/list"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(R.ok)return {data:bp.parseOrThrow(R.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:R.rawResponse};if(R.error.reason==="status-code")switch(R.error.statusCode){case 401:throw new $(R.error.body,R.rawResponse);case 403:throw new Z(te.parseOrThrow(R.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),R.rawResponse);default:throw new p({statusCode:R.error.statusCode,body:R.error.body,rawResponse:R.rawResponse})}switch(R.error.reason){case "non-json":throw new p({statusCode:R.error.statusCode,body:R.error.rawBody,rawResponse:R.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/attachment/list.");case "unknown":throw new p({message:R.error.errorMessage,rawResponse:R.rawResponse})}}completeMultiPartUpload(a,e){return h.fromPromise(this.__completeMultiPartUpload(a,e))}async __completeMultiPartUpload(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ht.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/attachment/upload-complete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAttachments(a,e){return h.fromPromise(this.__deleteAttachments(a,e))}async __deleteAttachments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/attachment/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ht.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/attachment/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}downloadAttachment(a,e){return h.fromPromise(this.__downloadAttachment(a,e))}async __downloadAttachment(a,e){var y,v;let{workspaceName:o,containerId:t,entityType:n,entityId:c,fileName:m,mimeType:u}=a,g={};o!=null&&(g.workspace_name=o),g.container_id=t,g.entity_type=it.jsonOrThrow(n,{unrecognizedObjectKeys:"strip"}),g.entity_id=c,g.file_name=m,g.mime_type=u;let R=await b({url:x((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v:w.Default,"v1/private/attachment/download"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(R.ok)return {data:R.body,rawResponse:R.rawResponse};if(R.error.reason==="status-code")switch(R.error.statusCode){case 401:throw new $(R.error.body,R.rawResponse);case 403:throw new Z(te.parseOrThrow(R.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),R.rawResponse);default:throw new p({statusCode:R.error.statusCode,body:R.error.body,rawResponse:R.rawResponse})}switch(R.error.reason){case "non-json":throw new p({statusCode:R.error.statusCode,body:R.error.rawBody,rawResponse:R.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/attachment/download.");case "unknown":throw new p({message:R.error.errorMessage,rawResponse:R.rawResponse})}}startMultiPartUpload(a,e){return h.fromPromise(this.__startMultiPartUpload(a,e))}async __startMultiPartUpload(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/attachment/upload-start"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:vr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:kp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/attachment/upload-start.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}uploadAttachment(a,e){return h.fromPromise(this.__uploadAttachment(a,e))}async __uploadAttachment(a,e){var y,v;let{fileName:o,projectName:t,mimeType:n,entityType:c,entityId:m,body:u}=a,g={};g.file_name=o,t!=null&&(g.project_name=t),n!=null&&(g.mime_type=n),g.entity_type=st.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m;let R=await b({url:x((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v:w.Default,"v1/private/attachment/upload"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",body:or.uploadAttachment.Request.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(R.ok)return {data:void 0,rawResponse:R.rawResponse};if(R.error.reason==="status-code")switch(R.error.statusCode){case 401:throw new $(R.error.body,R.rawResponse);case 403:throw new Z(te.parseOrThrow(R.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),R.rawResponse);default:throw new p({statusCode:R.error.statusCode,body:R.error.body,rawResponse:R.rawResponse})}switch(R.error.reason){case "non-json":throw new p({statusCode:R.error.statusCode,body:R.error.rawBody,rawResponse:R.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/attachment/upload.");case "unknown":throw new p({message:R.error.errorMessage,rawResponse:R.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var pi=class{constructor(a={}){this._options=a;}access(a,e){return h.fromPromise(this.__access(a,e))}async __access(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/auth"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:vp.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/auth.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceName(a){return h.fromPromise(this.__getWorkspaceName(a))}async __getWorkspaceName(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/auth/workspace"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:zp.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 401:throw new $(e.error.body,e.rawResponse);case 403:throw new Z(te.parseOrThrow(e.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/auth/workspace.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ci=class{constructor(a={}){this._options=a;}findEvaluators(a={},e){return h.fromPromise(this.__findEvaluators(a,e))}async __findEvaluators(a={},e){var v,z;let{projectId:o,id:t,name:n,filters:c,sorting:m,page:u,size:g}=a,R={};o!=null&&(R.project_id=o),t!=null&&(R.id=t),n!=null&&(R.name=n),c!=null&&(R.filters=c),m!=null&&(R.sorting=m),u!=null&&(R.page=u.toString()),g!=null&&(R.size=g.toString());let y=await b({url:x((z=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?z:w.Default,"v1/private/automations/evaluators"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:R,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(y.ok)return {data:sc.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/automations/evaluators.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}createAutomationRuleEvaluator(a,e){return h.fromPromise(this.__createAutomationRuleEvaluator(a,e))}async __createAutomationRuleEvaluator(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/automations/evaluators"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Qp.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/automations/evaluators.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAutomationRuleEvaluatorBatch(a,e){return h.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(a,e))}async __deleteAutomationRuleEvaluatorBatch(a,e){var m,u;let{projectId:o,body:t}=a,n={};o!=null&&(n.project_id=o);let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",body:L.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/automations/evaluators/delete.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getEvaluatorById(a,e={},o){return h.fromPromise(this.__getEvaluatorById(a,e,o))}async __getEvaluatorById(a,e={},o){var m,u;let{projectId:t}=e,n={};t!=null&&(n.project_id=t);let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/automations/evaluators/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:pc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}updateAutomationRuleEvaluator(a,e,o){return h.fromPromise(this.__updateAutomationRuleEvaluator(a,e,o))}async __updateAutomationRuleEvaluator(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/automations/evaluators/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:hc.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getEvaluatorLogsById(a,e={},o){return h.fromPromise(this.__getEvaluatorLogsById(a,e,o))}async __getEvaluatorLogsById(a,e={},o){var m,u;let{size:t}=e,n={};t!=null&&(n.size=t.toString());let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/automations/evaluators/${encodeURIComponent(a)}/logs`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:mc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}/logs.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var li=class{constructor(a={}){this._options=a;}createChatCompletions(a={},e){return h.fromPromise(this.__createChatCompletions(a,e))}async __createChatCompletions(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/chat/completions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:To.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:zc.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/chat/completions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var mi=class{constructor(a={}){this._options=a;}findDashboards(a={},e){return h.fromPromise(this.__findDashboards(a,e))}async __findDashboards(a={},e){var u,g;let{page:o,size:t,name:n}=a,c={};o!=null&&(c.page=o.toString()),t!=null&&(c.size=t.toString()),n!=null&&(c.name=n);let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,"v1/private/dashboards"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:Sc.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/dashboards.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}createDashboard(a,e){return h.fromPromise(this.__createDashboard(a,e))}async __createDashboard(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/dashboards"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ao.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:He.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/dashboards.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDashboardById(a,e){return h.fromPromise(this.__getDashboardById(a,e))}async __getDashboardById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/dashboards/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:He.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDashboard(a,e){return h.fromPromise(this.__deleteDashboard(a,e))}async __deleteDashboard(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/dashboards/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDashboard(a,e={},o){return h.fromPromise(this.__updateDashboard(a,e,o))}async __updateDashboard(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/dashboards/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Eo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:He.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var di=class{constructor(a={}){this._options=a;}batchUpdateDatasetItems(a,e){return h.fromPromise(this.__batchUpdateDatasetItems(a,e))}async __batchUpdateDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:zr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/datasets/items/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findDatasets(a={},e){return h.fromPromise(this.__findDatasets(a,e))}async __findDatasets(a={},e){var z,S;let{page:o,size:t,withExperimentsOnly:n,withOptimizationsOnly:c,promptId:m,name:u,sorting:g,filters:R}=a,y={};o!=null&&(y.page=o.toString()),t!=null&&(y.size=t.toString()),n!=null&&(y.with_experiments_only=n.toString()),c!=null&&(y.with_optimizations_only=c.toString()),m!=null&&(y.prompt_id=m),u!=null&&(y.name=u),g!=null&&(y.sorting=g),R!=null&&(y.filters=R);let v=await b({url:x((S=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?S:w.Default,"v1/private/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(v.ok)return {data:Hc.parseOrThrow(v.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:v.rawResponse};if(v.error.reason==="status-code")throw new p({statusCode:v.error.statusCode,body:v.error.body,rawResponse:v.rawResponse});switch(v.error.reason){case "non-json":throw new p({statusCode:v.error.statusCode,body:v.error.rawBody,rawResponse:v.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets.");case "unknown":throw new p({message:v.error.errorMessage,rawResponse:v.rawResponse})}}createDataset(a,e){return h.fromPromise(this.__createDataset(a,e))}async __createDataset(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Sr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createOrUpdateDatasetItems(a,e){return h.fromPromise(this.__createOrUpdateDatasetItems(a,e))}async __createOrUpdateDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/datasets/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createDatasetItemsFromCsv(a,e){return h.fromPromise(this.__createDatasetItemsFromCsv(a,e))}async __createDatasetItemsFromCsv(a,e){var c,m;let o=await qu();o.append("file",Pe(a.file)),o.append("dataset_id",a.datasetId);let t=await o.getRequest(),n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t.headers,...e==null?void 0:e.headers},requestType:"file",duplex:t.duplex,body:t.body,timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new T(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/items/from-csv.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}createDatasetItemsFromSpans(a,e,o){return h.fromPromise(this.__createDatasetItemsFromSpans(a,e,o))}async __createDatasetItemsFromSpans(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/from-spans`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Ar.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-spans.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createDatasetItemsFromTraces(a,e,o){return h.fromPromise(this.__createDatasetItemsFromTraces(a,e,o))}async __createDatasetItemsFromTraces(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/from-traces`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Er.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-traces.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getDatasetById(a,e){return h.fromPromise(this.__getDatasetById(a,e))}async __getDatasetById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/datasets/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDataset(a,e,o){return h.fromPromise(this.__updateDataset(a,e,o))}async __updateDataset(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Pr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/datasets/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteDataset(a,e){return h.fromPromise(this.__deleteDataset(a,e))}async __deleteDataset(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/datasets/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetByName(a,e){return h.fromPromise(this.__deleteDatasetByName(a,e))}async __deleteDatasetByName(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetItems(a,e){return h.fromPromise(this.__deleteDatasetItems(a,e))}async __deleteDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ir.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetsBatch(a,e){return h.fromPromise(this.__deleteDatasetsBatch(a,e))}async __deleteDatasetsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}expandDataset(a,e,o){return h.fromPromise(this.__expandDataset(a,e,o))}async __expandDataset(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/expansions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:jr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:Ec.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{id}/expansions.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findDatasetItemsWithExperimentItems(a,e,o){return h.fromPromise(this.__findDatasetItemsWithExperimentItems(a,e,o))}async __findDatasetItemsWithExperimentItems(a,e,o){var z,S;let{page:t,size:n,experimentIds:c,filters:m,sorting:u,search:g,truncate:R}=e,y={};t!=null&&(y.page=t.toString()),n!=null&&(y.size=n.toString()),y.experiment_ids=c,m!=null&&(y.filters=m),u!=null&&(y.sorting=u),g!=null&&(y.search=g),R!=null&&(y.truncate=R.toString());let v=await b({url:x((S=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?S:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/experiments/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(v.ok)return {data:Bc.parseOrThrow(v.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:v.rawResponse};if(v.error.reason==="status-code")throw new p({statusCode:v.error.statusCode,body:v.error.body,rawResponse:v.rawResponse});switch(v.error.reason){case "non-json":throw new p({statusCode:v.error.statusCode,body:v.error.rawBody,rawResponse:v.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items.");case "unknown":throw new p({message:v.error.errorMessage,rawResponse:v.rawResponse})}}getDatasetByIdentifier(a,e){return h.fromPromise(this.__getDatasetByIdentifier(a,e))}async __getDatasetByIdentifier(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ur.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDatasetExperimentItemsStats(a,e,o){return h.fromPromise(this.__getDatasetExperimentItemsStats(a,e,o))}async __getDatasetExperimentItemsStats(a,e,o){var u,g;let{experimentIds:t,filters:n}=e,c={};c.experiment_ids=t,n!=null&&(c.filters=n);let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/experiments/items/stats`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:Je.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/stats.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}getDatasetItemById(a,e){return h.fromPromise(this.__getDatasetItemById(a,e))}async __getDatasetItemById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/datasets/items/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:aa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}patchDatasetItem(a,e,o){return h.fromPromise(this.__patchDatasetItem(a,e,o))}async __patchDatasetItem(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/items/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:_r.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getDatasetItems(a,e={},o){return h.fromPromise(this.__getDatasetItems(a,e,o))}async __getDatasetItems(a,e={},o){var R,y;let{page:t,size:n,filters:c,truncate:m}=e,u={};t!=null&&(u.page=t.toString()),n!=null&&(u.size=n.toString()),c!=null&&(u.filters=c),m!=null&&(u.truncate=m.toString());let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(g.ok)return {data:el.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getDatasetItemsOutputColumns(a,e={},o){return h.fromPromise(this.__getDatasetItemsOutputColumns(a,e,o))}async __getDatasetItemsOutputColumns(a,e={},o){var m,u;let{experimentIds:t}=e,n={};t!=null&&(n.experiment_ids=t);let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/experiments/items/output/columns`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:al.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/output/columns.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}streamDatasetItems(a,e){return h.fromPromise(this.__streamDatasetItems(a,e))}async __streamDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Dr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createVersionTag(a,e,o,t){return h.fromPromise(this.__createVersionTag(a,e,o,t))}async __createVersionTag(a,e,o,t){var c,m;let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(a)}/tags`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",body:Nr.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new T(n.error.body,n.rawResponse);case 409:throw new F(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/hash/{versionHash}/tags.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}listDatasetVersions(a,e={},o){return h.fromPromise(this.__listDatasetVersions(a,e,o))}async __listDatasetVersions(a,e={},o){var u,g;let{page:t,size:n}=e,c={};t!=null&&(c.page=t.toString()),n!=null&&(c.size=n.toString());let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:nl.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}createDatasetVersion(a,e={},o){return h.fromPromise(this.__createDatasetVersion(a,e,o))}async __createDatasetVersion(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/versions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Mr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteVersionTag(a,e,o,t){return h.fromPromise(this.__deleteVersionTag(a,e,o,t))}async __deleteVersionTag(a,e,o,t){var c,m;let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,`v1/private/datasets/${encodeURIComponent(o)}/versions/${encodeURIComponent(a)}/tags/${encodeURIComponent(e)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ui=class{constructor(a={}){this._options=a;}findExperiments(a={},e){return h.fromPromise(this.__findExperiments(a,e))}async __findExperiments(a={},e){var O,M;let{page:o,size:t,datasetId:n,optimizationId:c,types:m,name:u,datasetDeleted:g,promptId:R,sorting:y,filters:v}=a,z={};o!=null&&(z.page=o.toString()),t!=null&&(z.size=t.toString()),n!=null&&(z.datasetId=n),c!=null&&(z.optimization_id=c),m!=null&&(z.types=m),u!=null&&(z.name=u),g!=null&&(z.dataset_deleted=g.toString()),R!=null&&(z.prompt_id=R),y!=null&&(z.sorting=y),v!=null&&(z.filters=v);let S=await b({url:x((M=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?M:w.Default,"v1/private/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:z,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:bl.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")switch(S.error.statusCode){case 400:throw new _(S.error.body,S.rawResponse);default:throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse})}switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}createExperiment(a,e){return h.fromPromise(this.__createExperiment(a,e))}async __createExperiment(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Fr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createExperimentItems(a,e){return h.fromPromise(this.__createExperimentItems(a,e))}async __createExperimentItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Wr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentItems(a,e){return h.fromPromise(this.__deleteExperimentItems(a,e))}async __deleteExperimentItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Br.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentsById(a,e){return h.fromPromise(this.__deleteExperimentsById(a,e))}async __deleteExperimentsById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:sr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}experimentItemsBulk(a,e){return h.fromPromise(this.__experimentItemsBulk(a,e))}async __experimentItemsBulk(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Vr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/experiments/items/bulk.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames(a={},e){return h.fromPromise(this.__findFeedbackScoreNames(a,e))}async __findFeedbackScoreNames(a={},e){var c,m;let{experimentIds:o}=a,t={};o!=null&&(t.experiment_ids=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:ar.findFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findExperimentGroups(a={},e){return h.fromPromise(this.__findExperimentGroups(a,e))}async __findExperimentGroups(a={},e){var g,R;let{groups:o,types:t,name:n,filters:c}=a,m={};o!=null&&(m.groups=o),t!=null&&(m.types=t),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/experiments/groups"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:kl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/groups.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}findExperimentGroupsAggregations(a={},e){return h.fromPromise(this.__findExperimentGroupsAggregations(a,e))}async __findExperimentGroupsAggregations(a={},e){var g,R;let{groups:o,types:t,name:n,filters:c}=a,m={};o!=null&&(m.groups=o),t!=null&&(m.types=t),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Sl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/groups/aggregations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}finishExperiments(a,e){return h.fromPromise(this.__finishExperiments(a,e))}async __finishExperiments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/finish"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:sr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/finish.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getExperimentById(a,e){return h.fromPromise(this.__getExperimentById(a,e))}async __getExperimentById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/experiments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:na.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateExperiment(a,e={},o){return h.fromPromise(this.__updateExperiment(a,e,o))}async __updateExperiment(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/experiments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Hr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/experiments/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getExperimentItemById(a,e){return h.fromPromise(this.__getExperimentItemById(a,e))}async __getExperimentItemById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/experiments/items/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:oa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/items/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperimentItems(a,e){return h.fromPromise(this.__streamExperimentItems(a,e))}async __streamExperimentItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Jr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperiments(a,e){return h.fromPromise(this.__streamExperiments(a,e))}async __streamExperiments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Kr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var gi=class{constructor(a={}){this._options=a;}findFeedbackDefinitions(a={},e){return h.fromPromise(this.__findFeedbackDefinitions(a,e))}async __findFeedbackDefinitions(a={},e){var g,R;let{page:o,size:t,name:n,type:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.type=bt.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}));let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/feedback-definitions"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Xl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/feedback-definitions.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createFeedbackDefinition(a,e){return h.fromPromise(this.__createFeedbackDefinition(a,e))}async __createFeedbackDefinition(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/feedback-definitions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Bl.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/feedback-definitions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getFeedbackDefinitionById(a,e){return h.fromPromise(this.__getFeedbackDefinitionById(a,e))}async __getFeedbackDefinitionById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/feedback-definitions/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:$l.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateFeedbackDefinition(a,e,o){return h.fromPromise(this.__updateFeedbackDefinition(a,e,o))}async __updateFeedbackDefinition(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/feedback-definitions/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:am.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteFeedbackDefinitionById(a,e){return h.fromPromise(this.__deleteFeedbackDefinitionById(a,e))}async __deleteFeedbackDefinitionById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/feedback-definitions/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteFeedbackDefinitionsBatch(a,e){return h.fromPromise(this.__deleteFeedbackDefinitionsBatch(a,e))}async __deleteFeedbackDefinitionsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/feedback-definitions/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var fi=class{constructor(a={}){this._options=a;}createGuardrails(a,e){return h.fromPromise(this.__createGuardrails(a,e))}async __createGuardrails(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/guardrails"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Po.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/guardrails.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var hi=class{constructor(a={}){this._options=a;}deleteLlmProviderApiKeysBatch(a,e){return h.fromPromise(this.__deleteLlmProviderApiKeysBatch(a,e))}async __deleteLlmProviderApiKeysBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/llm-provider-key/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findLlmProviderKeys(a){return h.fromPromise(this.__findLlmProviderKeys(a))}async __findLlmProviderKeys(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/llm-provider-key"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:pm.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/llm-provider-key.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}storeLlmProviderApiKey(a,e){return h.fromPromise(this.__storeLlmProviderApiKey(a,e))}async __storeLlmProviderApiKey(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/llm-provider-key"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Xr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/llm-provider-key.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getLlmProviderApiKeyById(a,e){return h.fromPromise(this.__getLlmProviderApiKeyById(a,e))}async __getLlmProviderApiKeyById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/llm-provider-key/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:la.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateLlmProviderApiKey(a,e={},o){return h.fromPromise(this.__updateLlmProviderApiKey(a,e,o))}async __updateLlmProviderApiKey(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/llm-provider-key/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Gr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new $(t.error.body,t.rawResponse);case 403:throw new Z(te.parseOrThrow(t.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var wi=class{constructor(a={}){this._options=a;}evaluateThreads(a,e){return h.fromPromise(this.__evaluateThreads(a,e))}async __evaluateThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ei.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:qt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/manual-evaluation/threads.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateTraces(a,e){return h.fromPromise(this.__evaluateTraces(a,e))}async __evaluateTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ei.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:qt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/manual-evaluation/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var bi=class{constructor(a={}){this._options=a;}receiveProtobufTraces(a){return h.fromPromise(this.__receiveProtobufTraces(a))}async __receiveProtobufTraces(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/otel/v1/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/otel/v1/traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var xi=class{constructor(a={}){this._options=a;}findOptimizations(a={},e){return h.fromPromise(this.__findOptimizations(a,e))}async __findOptimizations(a={},e){var R,y;let{page:o,size:t,datasetId:n,name:c,datasetDeleted:m}=a,u={};o!=null&&(u.page=o.toString()),t!=null&&(u.size=t.toString()),n!=null&&(u.dataset_id=n),c!=null&&(u.name=c),m!=null&&(u.dataset_deleted=m.toString());let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:gm.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")switch(g.error.statusCode){case 400:throw new _(g.error.body,g.rawResponse);default:throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse})}switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/optimizations.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createOptimization(a,e){return h.fromPromise(this.__createOptimization(a,e))}async __createOptimization(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/optimizations"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ri.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}upsertOptimization(a,e){return h.fromPromise(this.__upsertOptimization(a,e))}async __upsertOptimization(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/optimizations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ri.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteOptimizationsById(a,e){return h.fromPromise(this.__deleteOptimizationsById(a,e))}async __deleteOptimizationsById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/optimizations/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:sr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/optimizations/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getOptimizationById(a,e){return h.fromPromise(this.__getOptimizationById(a,e))}async __getOptimizationById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/optimizations/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ma.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/optimizations/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateOptimizationsById(a,e={},o){return h.fromPromise(this.__updateOptimizationsById(a,e,o))}async __updateOptimizationsById(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/optimizations/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:$r.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/optimizations/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ri=class{constructor(a={}){this._options=a;}findProjects(a={},e){return h.fromPromise(this.__findProjects(a,e))}async __findProjects(a={},e){var g,R;let{page:o,size:t,name:n,sorting:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/projects"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:wm.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createProject(a,e){return h.fromPromise(this.__createProject(a,e))}async __createProject(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/projects"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Qr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getProjectById(a,e){return h.fromPromise(this.__getProjectById(a,e))}async __getProjectById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/projects/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ua.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteProjectById(a,e){return h.fromPromise(this.__deleteProjectById(a,e))}async __deleteProjectById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/projects/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateProject(a,e={},o){return h.fromPromise(this.__updateProject(a,e,o))}async __updateProject(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/projects/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Yr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/projects/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteProjectsBatch(a,e){return h.fromPromise(this.__deleteProjectsBatch(a,e))}async __deleteProjectsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/projects/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNamesByProjectIds(a={},e){return h.fromPromise(this.__findFeedbackScoreNamesByProjectIds(a,e))}async __findFeedbackScoreNamesByProjectIds(a={},e){var c,m;let{projectIds:o}=a,t={};o!=null&&(t.project_ids=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:xm.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getProjectMetrics(a,e={},o){return h.fromPromise(this.__getProjectMetrics(a,e,o))}async __getProjectMetrics(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/projects/${encodeURIComponent(a)}/metrics`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Zr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:zm.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects/{id}/metrics.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getProjectStats(a={},e){return h.fromPromise(this.__getProjectStats(a,e))}async __getProjectStats(a={},e){var g,R;let{page:o,size:t,name:n,sorting:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/projects/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:_m.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects/stats.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}retrieveProject(a,e){return h.fromPromise(this.__retrieveProject(a,e))}async __retrieveProject(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/projects/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:qr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Cm.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var yi=class{constructor(a={}){this._options=a;}getPrompts(a={},e){return h.fromPromise(this.__getPrompts(a,e))}async __getPrompts(a={},e){var R,y;let{page:o,size:t,name:n,sorting:c,filters:m}=a,u={};o!=null&&(u.page=o.toString()),t!=null&&(u.size=t.toString()),n!=null&&(u.name=n),c!=null&&(u.sorting=c),m!=null&&(u.filters=m);let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/prompts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Wm.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createPrompt(a,e){return h.fromPromise(this.__createPrompt(a,e))}async __createPrompt(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:eo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createPromptVersion(a,e){return h.fromPromise(this.__createPromptVersion(a,e))}async __createPromptVersion(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts/versions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ro.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ke.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptById(a,e){return h.fromPromise(this.__getPromptById(a,e))}async __getPromptById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/prompts/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Dm.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePrompt(a,e,o){return h.fromPromise(this.__updatePrompt(a,e,o))}async __updatePrompt(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/prompts/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:oo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/prompts/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deletePrompt(a,e){return h.fromPromise(this.__deletePrompt(a,e))}async __deletePrompt(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/prompts/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deletePromptsBatch(a,e){return h.fromPromise(this.__deletePromptsBatch(a,e))}async __deletePromptsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersionById(a,e){return h.fromPromise(this.__getPromptVersionById(a,e))}async __getPromptVersionById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/prompts/versions/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ke.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts/versions/{versionId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersions(a,e={},o){return h.fromPromise(this.__getPromptVersions(a,e,o))}async __getPromptVersions(a,e={},o){var u,g;let{page:t,size:n}=e,c={};t!=null&&(c.page=t.toString()),n!=null&&(c.size=n.toString());let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,`v1/private/prompts/${encodeURIComponent(a)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:Fm.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}restorePromptVersion(a,e,o){return h.fromPromise(this.__restorePromptVersion(a,e,o))}async __restorePromptVersion(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/prompts/${encodeURIComponent(a)}/versions/${encodeURIComponent(e)}/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:ke.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/{promptId}/versions/{versionId}/restore.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}retrievePromptVersion(a,e){return h.fromPromise(this.__retrievePromptVersion(a,e))}async __retrievePromptVersion(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ao.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ke.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/versions/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ki=class{constructor(a={}){this._options=a;}getServiceToggles(a){return h.fromPromise(this.__getServiceToggles(a))}async __getServiceToggles(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/toggles"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Bm.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/toggles.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var vi=class{constructor(a={}){this._options=a;}addSpanComment(a,e,o){return h.fromPromise(this.__addSpanComment(a,e,o))}async __addSpanComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addSpanFeedbackScore(a,e,o){return h.fromPromise(this.__addSpanFeedbackScore(a,e,o))}async __addSpanFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/spans/{id}/feedback-scores.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createSpans(a,e){return h.fromPromise(this.__createSpans(a,e))}async __createSpans(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:no.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateSpans(a,e){return h.fromPromise(this.__batchUpdateSpans(a,e))}async __batchUpdateSpans(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:po.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpansByProject(a={},e){return h.fromPromise(this.__getSpansByProject(a,e))}async __getSpansByProject(a={},e){var oe,Ye;let{page:o,size:t,projectName:n,projectId:c,traceId:m,type:u,filters:g,truncate:R,stripAttachments:y,sorting:v,exclude:z,fromTime:S,toTime:O}=a,M={};o!=null&&(M.page=o.toString()),t!=null&&(M.size=t.toString()),n!=null&&(M.project_name=n),c!=null&&(M.project_id=c),m!=null&&(M.trace_id=m),u!=null&&(M.type=Ct.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"})),g!=null&&(M.filters=g),R!=null&&(M.truncate=R.toString()),y!=null&&(M.strip_attachments=y.toString()),v!=null&&(M.sorting=v),z!=null&&(M.exclude=z),S!=null&&(M.from_time=S.toISOString()),O!=null&&(M.to_time=O.toISOString());let G=await b({url:x((Ye=(oe=await s.get(this._options.baseUrl))!=null?oe:await s.get(this._options.environment))!=null?Ye:w.Default,"v1/private/spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:M,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(G.ok)return {data:Km.parseOrThrow(G.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:G.rawResponse};if(G.error.reason==="status-code")throw new p({statusCode:G.error.statusCode,body:G.error.body,rawResponse:G.rawResponse});switch(G.error.reason){case "non-json":throw new p({statusCode:G.error.statusCode,body:G.error.rawBody,rawResponse:G.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans.");case "unknown":throw new p({message:G.error.errorMessage,rawResponse:G.rawResponse})}}createSpan(a,e){return h.fromPromise(this.__createSpan(a,e))}async __createSpan(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:io.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpanById(a,e={},o){return h.fromPromise(this.__getSpanById(a,e,o))}async __getSpanById(a,e={},o){var m,u;let{stripAttachments:t}=e,n={};t!=null&&(n.strip_attachments=t.toString());let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/spans/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:ha.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 404:throw new T(c.error.body,c.rawResponse);default:throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteSpanById(a,e){return h.fromPromise(this.__deleteSpanById(a,e))}async __deleteSpanById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/spans/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 501:throw new br(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/spans/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpan(a,e,o){return h.fromPromise(this.__updateSpan(a,e,o))}async __updateSpan(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:so.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/spans/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteSpanComments(a,e){return h.fromPromise(this.__deleteSpanComments(a,e))}async __deleteSpanComments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteSpanFeedbackScore(a,e,o){return h.fromPromise(this.__deleteSpanFeedbackScore(a,e,o))}async __deleteSpanFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ga.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/{id}/feedback-scores/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findFeedbackScoreNames1(a={},e){return h.fromPromise(this.__findFeedbackScoreNames1(a,e))}async __findFeedbackScoreNames1(a={},e){var m,u;let{projectId:o,type:t}=a,n={};o!=null&&(n.project_id=o),t!=null&&(n.type=It.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}));let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:tr.findFeedbackScoreNames1.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/feedback-scores/names.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getSpanComment(a,e,o){return h.fromPromise(this.__getSpanComment(a,e,o))}async __getSpanComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(e)}/comments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/{spanId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getSpanStats(a={},e){return h.fromPromise(this.__getSpanStats(a,e))}async __getSpanStats(a={},e){var v,z;let{projectId:o,projectName:t,traceId:n,type:c,filters:m,fromTime:u,toTime:g}=a,R={};o!=null&&(R.project_id=o),t!=null&&(R.project_name=t),n!=null&&(R.trace_id=n),c!=null&&(R.type=jt.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"})),m!=null&&(R.filters=m),u!=null&&(R.from_time=u.toISOString()),g!=null&&(R.to_time=g.toISOString());let y=await b({url:x((z=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?z:w.Default,"v1/private/spans/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:R,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(y.ok)return {data:Je.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/stats.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}scoreBatchOfSpans(a,e){return h.fromPromise(this.__scoreBatchOfSpans(a,e))}async __scoreBatchOfSpans(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wa.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/spans/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchSpans(a={},e){return h.fromPromise(this.__searchSpans(a,e))}async __searchSpans(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:co.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpanComment(a,e,o){return h.fromPromise(this.__updateSpanComment(a,e,o))}async __updateSpanComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/comments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/spans/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var zi=class{constructor(a={}){this._options=a;}addThreadComment(a,e,o){return h.fromPromise(this.__addThreadComment(a,e,o))}async __addThreadComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/${encodeURIComponent(a)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addTraceComment(a,e,o){return h.fromPromise(this.__addTraceComment(a,e,o))}async __addTraceComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addTraceFeedbackScore(a,e,o){return h.fromPromise(this.__addTraceFeedbackScore(a,e,o))}async __addTraceFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/{id}/feedback-scores.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createTraces(a,e){return h.fromPromise(this.__createTraces(a,e))}async __createTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:mo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateTraces(a,e){return h.fromPromise(this.__batchUpdateTraces(a,e))}async __batchUpdateTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:go.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateThreads(a,e){return h.fromPromise(this.__batchUpdateThreads(a,e))}async __batchUpdateThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ho.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/threads/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}closeTraceThread(a={},e){return h.fromPromise(this.__closeTraceThread(a,e))}async __closeTraceThread(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/close"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/threads/close.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTracesByProject(a={},e){return h.fromPromise(this.__getTracesByProject(a,e))}async __getTracesByProject(a={},e){var M,G;let{page:o,size:t,projectName:n,projectId:c,filters:m,truncate:u,stripAttachments:g,sorting:R,exclude:y,fromTime:v,toTime:z}=a,S={};o!=null&&(S.page=o.toString()),t!=null&&(S.size=t.toString()),n!=null&&(S.project_name=n),c!=null&&(S.project_id=c),m!=null&&(S.filters=m),u!=null&&(S.truncate=u.toString()),g!=null&&(S.strip_attachments=g.toString()),R!=null&&(S.sorting=R),y!=null&&(S.exclude=y),v!=null&&(S.from_time=v.toISOString()),z!=null&&(S.to_time=z.toISOString());let O=await b({url:x((G=(M=await s.get(this._options.baseUrl))!=null?M:await s.get(this._options.environment))!=null?G:w.Default,"v1/private/traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:S,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(O.ok)return {data:od.parseOrThrow(O.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:O.rawResponse};if(O.error.reason==="status-code")throw new p({statusCode:O.error.statusCode,body:O.error.body,rawResponse:O.rawResponse});switch(O.error.reason){case "non-json":throw new p({statusCode:O.error.statusCode,body:O.error.rawBody,rawResponse:O.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces.");case "unknown":throw new p({message:O.error.errorMessage,rawResponse:O.rawResponse})}}createTrace(a,e){return h.fromPromise(this.__createTrace(a,e))}async __createTrace(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:lo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceById(a,e={},o){return h.fromPromise(this.__getTraceById(a,e,o))}async __getTraceById(a,e={},o){var m,u;let{stripAttachments:t}=e,n={};t!=null&&(n.strip_attachments=t.toString());let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/traces/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:ba.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteTraceById(a,e){return h.fromPromise(this.__deleteTraceById(a,e))}async __deleteTraceById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/traces/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/traces/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateTrace(a,e,o){return h.fromPromise(this.__updateTrace(a,e,o))}async __updateTrace(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:uo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteThreadComments(a,e){return h.fromPromise(this.__deleteThreadComments(a,e))}async __deleteThreadComments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteThreadFeedbackScores(a,e){return h.fromPromise(this.__deleteThreadFeedbackScores(a,e))}async __deleteThreadFeedbackScores(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:bo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/feedback-scores/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceComments(a,e){return h.fromPromise(this.__deleteTraceComments(a,e))}async __deleteTraceComments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceFeedbackScore(a,e,o){return h.fromPromise(this.__deleteTraceFeedbackScore(a,e,o))}async __deleteTraceFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ga.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/{id}/feedback-scores/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteTraceThreads(a,e){return h.fromPromise(this.__deleteTraceThreads(a,e))}async __deleteTraceThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:xo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraces(a,e){return h.fromPromise(this.__deleteTraces(a,e))}async __deleteTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames2(a={},e){return h.fromPromise(this.__findFeedbackScoreNames2(a,e))}async __findFeedbackScoreNames2(a={},e){var c,m;let{projectId:o}=a,t={};o!=null&&(t.project_id=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Le.findFeedbackScoreNames2.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findTraceThreadsFeedbackScoreNames(a={},e){return h.fromPromise(this.__findTraceThreadsFeedbackScoreNames(a,e))}async __findTraceThreadsFeedbackScoreNames(a={},e){var c,m;let{projectId:o}=a,t={};o!=null&&(t.project_id=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Le.findTraceThreadsFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/threads/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getTraceStats(a={},e){return h.fromPromise(this.__getTraceStats(a,e))}async __getTraceStats(a={},e){var R,y;let{projectId:o,projectName:t,filters:n,fromTime:c,toTime:m}=a,u={};o!=null&&(u.project_id=o),t!=null&&(u.project_name=t),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),m!=null&&(u.to_time=m.toISOString());let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/traces/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Je.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getThreadComment(a,e,o){return h.fromPromise(this.__getThreadComment(a,e,o))}async __getThreadComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/${encodeURIComponent(e)}/comments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/threads/{threadId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getTraceComment(a,e,o){return h.fromPromise(this.__getTraceComment(a,e,o))}async __getTraceComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(e)}/comments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/{traceId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getTraceThread(a,e){return h.fromPromise(this.__getTraceThread(a,e))}async __getTraceThread(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:oi.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:xa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceThreads(a={},e){return h.fromPromise(this.__getTraceThreads(a,e))}async __getTraceThreads(a={},e){var O,M;let{page:o,size:t,projectName:n,projectId:c,truncate:m,stripAttachments:u,filters:g,sorting:R,fromTime:y,toTime:v}=a,z={};o!=null&&(z.page=o.toString()),t!=null&&(z.size=t.toString()),n!=null&&(z.project_name=n),c!=null&&(z.project_id=c),m!=null&&(z.truncate=m.toString()),u!=null&&(z.strip_attachments=u.toString()),g!=null&&(z.filters=g),R!=null&&(z.sorting=R),y!=null&&(z.from_time=y.toISOString()),v!=null&&(z.to_time=v.toISOString());let S=await b({url:x((M=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?M:w.Default,"v1/private/traces/threads"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:z,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:rd.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse});switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/threads.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}openTraceThread(a,e){return h.fromPromise(this.__openTraceThread(a,e))}async __openTraceThread(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/open"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:oi.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/threads/open.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfThreads(a,e){return h.fromPromise(this.__scoreBatchOfThreads(a,e))}async __scoreBatchOfThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ro.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/threads/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfTraces(a,e){return h.fromPromise(this.__scoreBatchOfTraces(a,e))}async __scoreBatchOfTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wa.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraceThreads(a={},e){return h.fromPromise(this.__searchTraceThreads(a,e))}async __searchTraceThreads(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:yo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraces(a={},e){return h.fromPromise(this.__searchTraces(a,e))}async __searchTraces(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ko.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 401:throw new $(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateThread(a,e,o){return h.fromPromise(this.__updateThread(a,e,o))}async __updateThread(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:fo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/threads/{threadModelId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}updateThreadComment(a,e,o){return h.fromPromise(this.__updateThreadComment(a,e,o))}async __updateThreadComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/comments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/threads/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}updateTraceComment(a,e,o){return h.fromPromise(this.__updateTraceComment(a,e,o))}async __updateTraceComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/comments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Si=class{constructor(a={}){this._options=a;}getWelcomeWizardStatus(a){return h.fromPromise(this.__getWelcomeWizardStatus(a))}async __getWelcomeWizardStatus(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/welcome-wizard"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ad.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/welcome-wizard.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}submitWelcomeWizard(a={},e){return h.fromPromise(this.__submitWelcomeWizard(a,e))}async __submitWelcomeWizard(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/welcome-wizard"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Co.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/welcome-wizard.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var _i=class{constructor(a={}){this._options=a;}costsSummary(a,e){return h.fromPromise(this.__costsSummary(a,e))}async __costsSummary(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:cr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Xe.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/costs/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceConfiguration(a){return h.fromPromise(this.__getWorkspaceConfiguration(a))}async __getWorkspaceConfiguration(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/workspaces/configurations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Ra.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new T(e.error.body,e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}upsertWorkspaceConfiguration(a,e){return h.fromPromise(this.__upsertWorkspaceConfiguration(a,e))}async __upsertWorkspaceConfiguration(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ra.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ra.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/workspaces/configurations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteWorkspaceConfiguration(a){return h.fromPromise(this.__deleteWorkspaceConfiguration(a))}async __deleteWorkspaceConfiguration(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:void 0,rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new T(e.error.body,e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getCost(a,e){return h.fromPromise(this.__getCost(a,e))}async __getCost(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/costs"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:cr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ai.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/costs.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getMetric(a,e){return h.fromPromise(this.__getMetric(a,e))}async __getMetric(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/metrics"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:cr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ai.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/metrics.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}metricsSummary(a,e){return h.fromPromise(this.__metricsSummary(a,e))}async __metricsSummary(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:cr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:td.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/metrics/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ti=class{constructor(a={}){this._options=a;}datasetsRedirect(a,e){return h.fromPromise(this.__datasetsRedirect(a,e))}async __datasetsRedirect(a,e){var u,g;let{datasetId:o,workspaceName:t,path:n}=a,c={};c.dataset_id=o,t!=null&&(c.workspace_name=t),c.path=n;let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,"v1/session/redirect/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);case 404:throw new T(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/datasets.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}experimentsRedirect(a,e){return h.fromPromise(this.__experimentsRedirect(a,e))}async __experimentsRedirect(a,e){var g,R;let{datasetId:o,experimentId:t,workspaceName:n,path:c}=a,m={};m.dataset_id=o,m.experiment_id=t,n!=null&&(m.workspace_name=n),m.path=c;let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/session/redirect/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:void 0,rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);case 404:throw new T(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/experiments.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}optimizationsRedirect(a,e){return h.fromPromise(this.__optimizationsRedirect(a,e))}async __optimizationsRedirect(a,e){var g,R;let{datasetId:o,optimizationId:t,workspaceName:n,path:c}=a,m={};m.dataset_id=o,m.optimization_id=t,n!=null&&(m.workspace_name=n),m.path=c;let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/session/redirect/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:void 0,rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);case 404:throw new T(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/optimizations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}projectsRedirect(a,e){return h.fromPromise(this.__projectsRedirect(a,e))}async __projectsRedirect(a,e){var u,g;let{traceId:o,workspaceName:t,path:n}=a,c={};c.trace_id=o,t!=null&&(c.workspace_name=t),c.path=n;let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,"v1/session/redirect/projects"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);case 404:throw new T(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/projects.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ya=class{constructor(a={}){this._options=a;}get systemUsage(){var a;return (a=this._systemUsage)!=null?a:this._systemUsage=new ti(this._options)}get alerts(){var a;return (a=this._alerts)!=null?a:this._alerts=new ii(this._options)}get annotationQueues(){var a;return (a=this._annotationQueues)!=null?a:this._annotationQueues=new ni(this._options)}get attachments(){var a;return (a=this._attachments)!=null?a:this._attachments=new si(this._options)}get check(){var a;return (a=this._check)!=null?a:this._check=new pi(this._options)}get automationRuleEvaluators(){var a;return (a=this._automationRuleEvaluators)!=null?a:this._automationRuleEvaluators=new ci(this._options)}get chatCompletions(){var a;return (a=this._chatCompletions)!=null?a:this._chatCompletions=new li(this._options)}get dashboards(){var a;return (a=this._dashboards)!=null?a:this._dashboards=new mi(this._options)}get datasets(){var a;return (a=this._datasets)!=null?a:this._datasets=new di(this._options)}get experiments(){var a;return (a=this._experiments)!=null?a:this._experiments=new ui(this._options)}get feedbackDefinitions(){var a;return (a=this._feedbackDefinitions)!=null?a:this._feedbackDefinitions=new gi(this._options)}get guardrails(){var a;return (a=this._guardrails)!=null?a:this._guardrails=new fi(this._options)}get llmProviderKey(){var a;return (a=this._llmProviderKey)!=null?a:this._llmProviderKey=new hi(this._options)}get manualEvaluation(){var a;return (a=this._manualEvaluation)!=null?a:this._manualEvaluation=new wi(this._options)}get openTelemetryIngestion(){var a;return (a=this._openTelemetryIngestion)!=null?a:this._openTelemetryIngestion=new bi(this._options)}get optimizations(){var a;return (a=this._optimizations)!=null?a:this._optimizations=new xi(this._options)}get projects(){var a;return (a=this._projects)!=null?a:this._projects=new Ri(this._options)}get prompts(){var a;return (a=this._prompts)!=null?a:this._prompts=new yi(this._options)}get serviceToggles(){var a;return (a=this._serviceToggles)!=null?a:this._serviceToggles=new ki(this._options)}get spans(){var a;return (a=this._spans)!=null?a:this._spans=new vi(this._options)}get traces(){var a;return (a=this._traces)!=null?a:this._traces=new zi(this._options)}get welcomeWizard(){var a;return (a=this._welcomeWizard)!=null?a:this._welcomeWizard=new Si(this._options)}get workspaces(){var a;return (a=this._workspaces)!=null?a:this._workspaces=new _i(this._options)}get redirect(){var a;return (a=this._redirect)!=null?a:this._redirect=new Ti(this._options)}isAlive(a){return h.fromPromise(this.__isAlive(a))}async __isAlive(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"is-alive/ping"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /is-alive/ping.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}version(a){return h.fromPromise(this.__version(a))}async __version(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"is-alive/ver"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /is-alive/ver.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var re=()=>uuid.v7();var Ai=class i{constructor(a,e){this.data=a;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=a=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...a,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=a=>{var o;let e={parentSpanId:this.data.parentSpanId,projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,traceId:this.data.traceId,...a};return this.opik.spanBatchQueue.update(this.data.id,e),this.data={...this.data,...a},this};this.span=a=>{var n;let e=(n=this.data.projectName)!=null?n:this.opik.config.projectName,o={id:re(),startTime:new Date,...a,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(o);let t=new i(o,this.opik);return this.childSpans.push(t),t};}};var Ei=class{constructor(a,e){this.data=a;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=a=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...a,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=a=>{var n,c;let e=(c=(n=this.data.projectName)!=null?n:a.projectName)!=null?c:this.opik.config.projectName,o={id:re(),startTime:new Date,...a,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(o);let t=new Ai(o,this.opik);return this.spans.push(t),t};this.update=a=>{var o;let e={projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,...a};return this.opik.traceBatchQueue.update(this.data.id,e),this.data={...this.data,...e},this};}};var Tg={EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECT_BY_NAME:"redirect/projects"},Pi={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",PROJECT_NAME:"name",PATH:"path"},Xb=i=>Object.entries(i).map(([a,e])=>`${a}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),Gb=i=>i.replace(/\/api$/,""),$b=i=>Buffer.from(i).toString("base64"),Ag=(i,a,e)=>{let o=Xb(e),t=`${a}?${o}`;return new URL(t,i).toString()},Eg=({datasetId:i,experimentId:a,baseUrl:e})=>Ag(e,Tg.EXPERIMENTS,{[Pi.EXPERIMENT_ID]:a,[Pi.DATASET_ID]:i,[Pi.PATH]:$b(e)});var Pg=({projectName:i,workspaceName:a,apiUrl:e})=>{let o=Gb(e),t=`${a}/${Tg.PROJECT_BY_NAME}`;return Ag(o,t,{[Pi.PROJECT_NAME]:i})};var Qb=300,Ci=100,ka=class{constructor({action:a,batchSize:e=Ci,delay:o,enableBatch:t,name:n="ActionQueue"}){this.timerId=null;this.promise=Promise.resolve();this.queue=new Map;this.debounceFlush=()=>{this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>this.flush(),this.delay);};this.add=(a,e)=>{if(this.queue.set(a,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(a,e)=>{let o=this.queue.get(a);o&&(this.queue.set(a,{...o,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let a=new Map(this.queue);this.queue.clear(),k.debug(`Adding ${a.size} items to ${this.name} promise:`,a),this.promise=this.promise.finally(()=>(k.debug(`Flushing ${this.name}:`,a),this.action(a))).catch(e=>{k.error(`Failed to flush ${this.name}:`,e,a);}),await this.promise;};this.action=a,this.batchSize=e,this.delay=o,this.enableBatch=t,this.name=n;}},de=class{constructor({delay:a=Qb,enableCreateBatch:e=true,enableUpdateBatch:o=false,enableDeleteBatch:t=true,createBatchSize:n=Ci,updateBatchSize:c=Ci,deleteBatchSize:m=Ci,name:u="BatchQueue"}={}){this.create=a=>{let e=this.getId(a);this.createQueue.add(e,a);};this.get=async a=>{let e=this.createQueue.queue.get(a);return e||this.getEntity(a)};this.update=(a,e)=>{if(this.createQueue.queue.get(a)){this.createQueue.update(a,e);return}this.updateQueue.add(a,e);};this.delete=a=>{if(this.createQueue.queue.has(a)){this.createQueue.queue.delete(a);return}this.deleteQueue.add(a);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=u,this.createQueue=new ka({action:async g=>{await this.createEntities(Array.from(g.values()));},delay:a,enableBatch:e,batchSize:n,name:`${u}:createQueue`}),this.updateQueue=new ka({action:async g=>{await this.createQueue.flush();let R=Array.from(g.entries());for(let[y,v]of R)await this.updateEntity(y,v);},delay:a,enableBatch:o,batchSize:c,name:`${u}:updateQueue`}),this.deleteQueue=new ka({action:async g=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(g.keys()));},delay:a,enableBatch:t,batchSize:m,name:`${u}:deleteQueue`});}};var Ii=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.spans.createSpans({spans:e},this.api.requestOptions);}async getEntity(e){return await this.api.spans.getSpanById(e,{},this.api.requestOptions)}async updateEntity(e,o){await this.api.spans.updateSpan(e,o,this.api.requestOptions);}async deleteEntities(e){for(let o of e)await this.api.spans.deleteSpanById(o,this.api.requestOptions);}};var ji=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.spans.scoreBatchOfSpans({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let o of e)await this.api.spans.deleteSpanFeedbackScore(o.id,{name:o.name},this.api.requestOptions);}};var Ui=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.traces.createTraces({traces:e},this.api.requestOptions);}async getEntity(e){return await this.api.traces.getTraceById(e,{},this.api.requestOptions)}async updateEntity(e,o){await this.api.traces.updateTrace(e,o,this.api.requestOptions);}async deleteEntities(e){await this.api.traces.deleteTraces({ids:e},this.api.requestOptions);}};var Di=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.traces.scoreBatchOfTraces({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let o of e)await this.api.traces.deleteTraceFeedbackScore(o.id,{name:o.name},this.api.requestOptions);}};var Ni=class extends ya{constructor(e){super(e);this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};var Mi=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=e;}getId(e){return e.id||""}async createEntities(e){for(let o of e)await this.api.datasets.createDataset(o,this.api.requestOptions);}async getEntity(e){try{return await this.api.datasets.getDatasetById(e,this.api.requestOptions)}catch{return}}async updateEntity(e,o){await this.api.datasets.updateDataset(e,{name:o.name||"",visibility:o.visibility,description:o.description},this.api.requestOptions);}async deleteEntities(e){await this.api.datasets.deleteDatasetsBatch({ids:e},this.api.requestOptions);}};var id=null;async function Cg(){return id||(id=await Yb__default.default()),id}var va=class i{constructor(a){let{id:e,traceId:o,spanId:t,source:n,...c}=a;this.id=e||re(),this.traceId=o,this.spanId=t,this.source=n||_n.Sdk,this.data={...c};}getContent(a=false){return a?{...this.data,id:this.id}:{...this.data}}async contentHash(){let a=this.getContent(),e=Zb__default.default(a);return (await Cg()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent()}}static fromApiModel(a){return new i({id:a.id,traceId:a.traceId,spanId:a.spanId,source:a.source,...a.data})}};async function je(i,a,e){var c;if(e===0)return [];let o=new util.TextDecoder("utf-8"),t=[],n="";try{for await(let m of i){n+=o.decode(m,{stream:!0});let u=n.split(`
5
+ `);n=(c=u.pop())!=null?c:"";for(let g of u)if(!(!g.trim()||g==="{}"||g==="[]"||g==="null"))try{let R=JSON.parse(g),y=a.parse(R);if(y.ok){if(t.push(y.value),e!==void 0&&t.length>=e)return t}else k.error("Error parsing experiment item:",y.errors);}catch(R){k.error("Error parsing JSON line:",R instanceof Error?R.message:String(R));}}if(n.trim()&&n!=="{}"&&n!=="[]"&&n!=="null")try{let m=JSON.parse(n),u=a.parse(m);u.ok?t.push(u.value):k.error("Error parsing experiment item:",u.errors);}catch(m){k.error("Error parsing remaining buffer:",m instanceof Error?m.message:String(m));}}catch(m){k.error("Error processing stream:",m instanceof Error?m.message:String(m));}return t}function za(i,a){let e=[];for(let o=0;o<i.length;o+=a.maxBatchSize)e.push(i.slice(o,o+a.maxBatchSize));return e}var le=class extends Error{constructor(a){var e;super(a.message),this.name=this.constructor.name,this.code=a.code,this.statusCode=a.statusCode,this.details=a.details,this.originalError=a.originalError,k.error(this.message),(e=Error.captureStackTrace)==null||e.call(Error,this,this.constructor);}toJSON(){return {name:this.name,message:this.message,code:this.code,statusCode:this.statusCode,details:this.details,originalError:this.originalError,stack:this.stack}}};var Ig={DATASET_NOT_FOUND:i=>`Dataset with name '${i}' not found`,DATASET_ITEM_NOT_FOUND:i=>`Dataset item with id '${i}' not found`,DATASET_ITEM_MISSING_ID:i=>`Item at index ${i} is missing an ID required for update`,INVALID_JSON_FORMAT:i=>`Invalid JSON format${i?": "+i:""}`,JSON_NOT_ARRAY:"JSON input must be an array of objects",ITEM_NOT_OBJECT:(i,a)=>`Item at position ${i} is not an object (${a})`,INSERTION_FAILED:i=>`Failed to insert items from JSON: ${i}`,DATASET_JSON_PARSE_ERROR:i=>`Failed to parse JSON input: ${i}`};var ex={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID"},Fi=class extends le{constructor(a){super({message:Ig.DATASET_ITEM_MISSING_ID(a),code:ex.DATASET_ITEM_MISSING_ID});}};var rx={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},Oi=class extends le{constructor(a){super({message:a,code:rx.SEARCH_TIMEOUT});}};var Wi={JSON_NOT_ARRAY:i=>`JSON input must be an array of objects${i?` (${i})`:""}`,JSON_PARSE_ERROR:"Failed to parse JSON input",JSON_ITEM_NOT_OBJECT:(i,a)=>`Item at position ${i} is not an object (${a})`};var nd={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},Bi=class extends le{constructor(a){let e=a instanceof Error?a:new Error(String(a));super({message:Wi.JSON_PARSE_ERROR,code:nd.JSON_PARSE_ERROR,originalError:e});}},Li=class extends le{constructor(a){super({message:Wi.JSON_NOT_ARRAY(a),code:nd.JSON_NOT_ARRAY});}},Vi=class extends le{constructor(a,e){super({message:Wi.JSON_ITEM_NOT_OBJECT(a,e),code:nd.JSON_ITEM_NOT_OBJECT});}};var lr=class{constructor({name:a,description:e,id:o},t){this.opik=t;this.idToHash=new Map;this.hashes=new Set;this.id=o||re(),this.name=a,this.description=e;}async insert(a){if(!a||a.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let e=await this.getDeduplicatedItems(a),o=za(e,{maxBatchSize:1e3});try{let t=0;for(let n of o)await this.opik.api.datasets.createOrUpdateDatasetItems({datasetId:this.id,items:n}),t+=n.length,k.info(`Inserted ${Math.min(t,e.length)} of ${e.length} items into dataset ${this.id}`);}catch(t){throw k.error(`Error inserting items into dataset: ${t instanceof Error?t.message:String(t)}`),t}}async update(a){if(!(!a||a.length===0)){for(let e=0;e<a.length;e++)if(!a[e].id)throw new Fi(e);await this.insert(a);}}async delete(a){if(!a||a.length===0){k.info("No item IDs provided for deletion");return}let e=za(a,{maxBatchSize:100});for await(let o of e){k.debug("Deleting dataset items batch",{batchSize:o.length,datasetId:this.id}),await this.opik.api.datasets.deleteDatasetItems({itemIds:o});for(let t of o)if(this.idToHash.has(t)){let n=this.idToHash.get(t);this.hashes.delete(n),this.idToHash.delete(t);}}}async clear(){let e=(await this.getItems()).map(o=>o.id).filter(Boolean);e.length!==0&&await this.delete(e);}async getItems(a,e){return (await this.getItemsAsDataclasses(a,e)).map(t=>t.getContent(true))}async getItemsAsDataclasses(a,e){let o=a?Math.min(a,2e3):2e3,t=await this.opik.api.datasets.streamDatasetItems({datasetName:this.name,lastRetrievedId:e,steamLimit:o});return (await je(t,C.DatasetItemPublic,a)).map(c=>va.fromApiModel(c))}async insertFromJson(a,e={},o=[]){let t;try{t=JSON.parse(a);}catch(c){throw new Bi(c)}if(!Array.isArray(t))throw new Li(typeof t);if(t.length===0)return;for(let c=0;c<t.length;c++){let m=t[c];if(typeof m!="object"||m===null)throw new Vi(c,typeof m)}let n=t.map(c=>{let m=c,u={};for(let[g,R]of Object.entries(m)){if(o.includes(g))continue;let y=e[g]||g;u[y]=R;}return u});await this.insert(n);}async toJson(a={}){let o=(await this.getItems()).map(t=>{let n={...t};if(Object.keys(a).length>0){for(let[c,m]of Object.entries(a))if(c in n){let u=n[c];delete n[c],n[m]=u;}}return n});return Zb__default.default(o)}async getDeduplicatedItems(a){let e=[];for(let o of a){let t=new va(o),n=await t.contentHash();if(this.hashes.has(n)){k.debug("Duplicate item found - skipping",{contentHash:n,datasetId:this.id});continue}e.push(t.toApiModel()),this.hashes.add(n),this.idToHash.set(t.id,n);}return e}clearHashState(){this.idToHash.clear(),this.hashes.clear();}async syncHashes(){k.debug("Syncing dataset hashes with backend",{datasetId:this.id});try{let a=await this.getItemsAsDataclasses();this.clearHashState();for(let e of a){let o=await e.contentHash();this.idToHash.set(e.id,o),this.hashes.add(o);}k.debug("Dataset hash sync completed",{datasetId:this.id,itemCount:a.length});}catch(a){if(a instanceof p&&a.statusCode===404){k.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw a}}};var sd=class extends Error{constructor(a){super(a),this.name="DatasetError";}},Sa=class extends sd{constructor(a){super(`Dataset with name '${a}' not found`),this.name="DatasetNotFoundError";}};var Hi=class{constructor(a){if(!a.datasetItemId)throw new Error("datasetItemId is required");if(!a.traceId)throw new Error("traceId is required");this.datasetItemId=a.datasetItemId,this.traceId=a.traceId;}},Ji=class i{constructor(a){this.id=a.id,this.datasetItemId=a.datasetItemId,this.traceId=a.traceId,this.datasetItemData=a.datasetItemData,this.evaluationTaskOutput=a.evaluationTaskOutput,this.feedbackScores=[...a.feedbackScores];}static fromRestExperimentItemCompare(a){var o,t;let e=(t=(o=a.feedbackScores)==null?void 0:o.map(n=>({categoryName:n.categoryName,name:n.name,reason:n.reason,value:n.value,source:n.source})))!=null?t:[];return new i({id:a.id,traceId:a.traceId,datasetItemId:a.datasetItemId,datasetItemData:a.input,evaluationTaskOutput:a.output,feedbackScores:e})}};var Ge=class{constructor({id:a,name:e,datasetName:o,prompts:t},n){this.opik=n;this.id=a||re(),this._name=e,this.datasetName=o,this.prompts=t;}get name(){return this._name}async ensureNameLoaded(){if(this._name!==void 0)return this._name;let a=await this.opik.api.experiments.getExperimentById(this.id);if(this._name=a.name,!this._name)throw new Error("Experiment name is not loaded");return this._name}async insert(a){if(a.length===0)return;let e=a.map(t=>({id:re(),experimentId:this.id,datasetItemId:t.datasetItemId,traceId:t.traceId})),o=za(e,{maxBatchSize:50});try{for(let t of o)await this.opik.api.experiments.createExperimentItems({experimentItems:t});k.debug(`Inserted ${a.length} items into experiment ${this.id}`);}catch(t){throw k.error(`Error inserting items into experiment: ${t instanceof Error?t.message:String(t)}`),t}}async getItems(a){let e=[],{maxResults:t,truncate:n=false}=a||{},c,m=true;try{for(;m&&!(t!==void 0&&e.length>=t);){let u=t?Math.min(t-e.length,2e3):2e3,g=await this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:u,lastRetrievedId:c,truncate:n});try{let R=await je(g,C.ExperimentItemCompare,u);if(R.length===0){m=!1;break}for(let y of R){let v=Ji.fromRestExperimentItemCompare(y);if(e.push(v),t!==void 0&&e.length>=t){m=!1;break}}c=R[R.length-1].id;}catch(R){k.error("Error parsing experiment item: "+(R instanceof Error?R.message:String(R))),m=!1;break}}}catch(u){throw k.error("Error retrieving experiment items: "+(u instanceof Error?u.message:String(u))),u}return k.info(`Retrieved ${e.length} items${t?` (limited by maxResults=${t})`:""}`),e}async getUrl(){let a=await this.opik.getDataset(this.datasetName),e=this.opik.config.apiUrl||mn.apiUrl;return Eg({datasetId:a.id,experimentId:this.id,baseUrl:e})}};var Ki={EXPERIMENT_NOT_FOUND:i=>`Experiment with name '${i}' not found`,INVALID_CONFIG_TYPE:i=>`experimentConfig must be a plain object, but ${i} was provided. Please provide a valid configuration object like { model: 'gpt-4', temperature: 0.7 }`,CONFIG_PROMPTS_CONFLICT:()=>`Cannot specify both 'prompts' parameter and 'experimentConfig.prompts'. Choose one approach:
6
6
  1. Use prompts parameter: buildMetadataAndPromptVersions(config, [prompt1, prompt2])
7
7
  2. Use config only: buildMetadataAndPromptVersions({ ...config, prompts: {...} })
8
8
 
9
- The prompts parameter is recommended for prompt version tracking.`};var pd={EXPERIMENT_NOT_FOUND:"EXPERIMENT_NOT_FOUND",INVALID_CONFIG_TYPE:"INVALID_CONFIG_TYPE",CONFIG_PROMPTS_CONFLICT:"CONFIG_PROMPTS_CONFLICT"},_a=class extends le{constructor(a){super({message:Ki.EXPERIMENT_NOT_FOUND(a),code:pd.EXPERIMENT_NOT_FOUND});}},Ta=class i extends le{constructor(a,e){super({message:a,code:e});}static invalidConfigType(a){return new i(Ki.INVALID_CONFIG_TYPE(a),pd.INVALID_CONFIG_TYPE)}static promptsConflict(){return new i(Ki.CONFIG_PROMPTS_CONFLICT(),pd.CONFIG_PROMPTS_CONFLICT)}};function Ig(i,a){if(i!==void 0&&(typeof i!="object"||i===null||Array.isArray(i)))throw Ta.invalidConfigType(typeof i);if(a&&a.length>0&&(i!=null&&i.prompts))throw Ta.promptsConflict();if(!i&&(!a||a.length===0))return [void 0,void 0];let e=i?structuredClone(i):{},o;if(a&&a.length>0){o=[];let t={};for(let n of a)o.push({id:n.versionId}),t[n.name]=n.prompt;e.prompts=t;}return Object.keys(e).length===0?[void 0,void 0]:[e,o]}var be={MUSTACHE:"mustache",JINJA2:"jinja2"};var X=class i extends Error{constructor(a){super(a),this.name="PromptValidationError",Object.setPrototypeOf(this,i.prototype);}};function tx(i){try{let e=ax__default.default.parse(i).filter(o=>{let t=o[0];return t==="name"||t==="#"||t==="&"||t==="^"}).map(o=>o[1].split(".")[0]);return new Set(e)}catch(a){throw new X(`Invalid Mustache template syntax: ${a instanceof Error?a.message:String(a)}`)}}function Ug(i,a,e){if(e!=="mustache")return;let o=tx(i),t=new Set(Object.keys(a)),n=new Set([...o].filter(c=>!t.has(c)));if(n.size>0){let c=[];throw c.push(`Missing required variables: ${[...n].join(", ")}`),c.push(`Template placeholders: {${[...o].join(", ")}}`),c.push(`Provided variables: {${[...t].join(", ")}}`),new X(`Template variables validation failed:
9
+ The prompts parameter is recommended for prompt version tracking.`};var pd={EXPERIMENT_NOT_FOUND:"EXPERIMENT_NOT_FOUND",INVALID_CONFIG_TYPE:"INVALID_CONFIG_TYPE",CONFIG_PROMPTS_CONFLICT:"CONFIG_PROMPTS_CONFLICT"},_a=class extends le{constructor(a){super({message:Ki.EXPERIMENT_NOT_FOUND(a),code:pd.EXPERIMENT_NOT_FOUND});}},Ta=class i extends le{constructor(a,e){super({message:a,code:e});}static invalidConfigType(a){return new i(Ki.INVALID_CONFIG_TYPE(a),pd.INVALID_CONFIG_TYPE)}static promptsConflict(){return new i(Ki.CONFIG_PROMPTS_CONFLICT(),pd.CONFIG_PROMPTS_CONFLICT)}};function jg(i,a){if(i!==void 0&&(typeof i!="object"||i===null||Array.isArray(i)))throw Ta.invalidConfigType(typeof i);if(a&&a.length>0&&(i!=null&&i.prompts))throw Ta.promptsConflict();if(!i&&(!a||a.length===0))return [void 0,void 0];let e=i?structuredClone(i):{},o;if(a&&a.length>0){o=[];let t={};for(let n of a)o.push({id:n.versionId}),t[n.name]=n.prompt;e.prompts=t;}return Object.keys(e).length===0?[void 0,void 0]:[e,o]}var be={MUSTACHE:"mustache",JINJA2:"jinja2"};var X=class i extends Error{constructor(a){super(a),this.name="PromptValidationError",Object.setPrototypeOf(this,i.prototype);}};function tx(i){try{let e=ax__default.default.parse(i).filter(o=>{let t=o[0];return t==="name"||t==="#"||t==="&"||t==="^"}).map(o=>o[1].split(".")[0]);return new Set(e)}catch(a){throw new X(`Invalid Mustache template syntax: ${a instanceof Error?a.message:String(a)}`)}}function Ug(i,a,e){if(e!=="mustache")return;let o=tx(i),t=new Set(Object.keys(a)),n=new Set([...o].filter(c=>!t.has(c)));if(n.size>0){let c=[];throw c.push(`Missing required variables: ${[...n].join(", ")}`),c.push(`Template placeholders: {${[...o].join(", ")}}`),c.push(`Provided variables: {${[...t].join(", ")}}`),new X(`Template variables validation failed:
10
10
  ${c.join(`
11
11
  `)}`)}}function ve(i,a,e){try{switch(Ug(i,a,e),e){case "mustache":return ax__default.default.render(i,a,{},{escape:o=>o});case "jinja2":return nx__default.default.renderString(i,a);default:return i}}catch(o){if(o instanceof X)throw o;let t=o instanceof Error?o.message:String(o);throw new X(`Failed to format prompt template: ${t}`)}}var Aa=class i{constructor(a){this.id=a.versionId,this.name=a.name,this.prompt=a.prompt,this.commit=a.commit,this.type=a.type,this.metadata=a.metadata,this.changeDescription=a.changeDescription,this.createdAt=a.createdAt,this.createdBy=a.createdBy;}format(a){return ve(this.prompt,a,this.type)}getVersionAge(){return this.createdAt?dateFns.formatDistanceToNow(new Date(this.createdAt),{addSuffix:true}):"Unknown"}getVersionInfo(){let a=[`[${this.commit}]`];if(this.createdAt){let e=new Date(this.createdAt);a.push(e.toISOString().split("T")[0]);}return this.createdBy&&a.push(`by ${this.createdBy}`),this.changeDescription&&a.push(`- ${this.changeDescription}`),a.join(" ")}compareTo(a){let e=`Current version [${this.commit}]`,o=`Other version [${a.commit}]`,t=jestDiff.diffStringsUnified(a.prompt,this.prompt,{aAnnotation:o,bAnnotation:e,includeChangeCounts:true,contextLines:3,expand:false});return k.info(`
12
12
  Prompt version comparison:
13
- ${t}`),t}static fromApiResponse(a,e){var o;if(!e.template)throw new X("Invalid API response: missing required field 'template'");if(!e.commit)throw new X("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new X("Invalid API response: missing required field 'promptId'");if(!e.id)throw new X("Invalid API response: missing required field 'id'");return new i({name:a,prompt:e.template,commit:e.commit,promptId:e.promptId,versionId:e.id,type:(o=e.type)!=null?o:be.MUSTACHE,metadata:e.metadata,changeDescription:e.changeDescription,createdAt:e.createdAt?new Date(e.createdAt):void 0,createdBy:e.createdBy})}};var Ue=class i{constructor({promptId:a,versionId:e,name:o,prompt:t,commit:n,metadata:c,type:m,changeDescription:u,description:g,tags:R=[]},y){this.opik=y;this.id=a,this.versionId=e,this.prompt=t,this.commit=n,this.type=m!=null?m:be.MUSTACHE,this.changeDescription=u,this._name=o,this._description=g,this._tags=[...R],this._metadata=c;}get name(){return this._name}get description(){return this._description}get tags(){return Object.freeze([...this._tags])}get metadata(){if(this._metadata)return structuredClone(this._metadata)}format(a){return ve(this.prompt,a,this.type)}static fromApiResponse(a,e,o){var n;if(!e.template)throw new X("Invalid API response: missing required field 'template'");if(!e.commit)throw new X("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new X("Invalid API response: missing required field 'promptId'");if(!e.id)throw new X("Invalid API response: missing required field 'id' (version ID)");let t=(n=e.type)!=null?n:be.MUSTACHE;if(t!=="mustache"&&t!=="jinja2")throw new X(`Invalid API response: unknown prompt type '${t}'`);return new i({promptId:e.promptId,versionId:e.id,name:a.name,prompt:e.template,commit:e.commit,metadata:e.metadata,type:t,changeDescription:e.changeDescription,description:a.description,tags:a.tags},o)}async updateProperties(a){var e,o,t,n;return await this.opik.api.prompts.updatePrompt(this.id,{name:(e=a.name)!=null?e:this._name,description:a.description,tags:a.tags},this.opik.api.requestOptions),this._name=(o=a.name)!=null?o:this._name,this._description=(t=a.description)!=null?t:this._description,this._tags=(n=a.tags)!=null?n:this._tags,this}async delete(){await this.opik.deletePrompts([this.id]);}async getVersions(){var a;k.debug("Getting versions for prompt",{promptId:this.id,name:this.name});try{let e=[],o=1,t=100;for(;;){let c=(a=(await this.opik.api.prompts.getPromptVersions(this.id,{page:o,size:t},this.opik.api.requestOptions)).content)!=null?a:[];if(e.push(...c),c.length<t)break;o++;}return k.debug("Successfully retrieved prompt versions",{promptId:this.id,name:this.name,totalVersions:e.length}),e.map(n=>Aa.fromApiResponse(this.name,n))}catch(e){throw k.error("Failed to get prompt versions",{promptId:this.id,name:this.name,error:e}),e}}async useVersion(a){k.debug("Restoring prompt version",{promptId:this.id,name:this.name,versionId:a.id,versionCommit:a.commit});try{let e=await this.opik.api.prompts.restorePromptVersion(this.id,a.id,this.opik.api.requestOptions);return k.debug("Successfully restored prompt version",{promptId:this.id,name:this.name,restoredVersionId:e.id,restoredCommit:e.commit}),i.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){throw k.error("Failed to restore prompt version",{promptId:this.id,name:this.name,versionId:a.id,versionCommit:a.commit,error:e}),e}}async getVersion(a){try{let e=await this.opik.api.prompts.retrievePromptVersion({name:this.name,commit:a},this.opik.api.requestOptions);return i.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){if(e&&typeof e=="object"&&"statusCode"in e&&e.statusCode===404)return null;throw k.error("Failed to retrieve prompt version",{promptName:this.name,commit:a,error:e}),e}}};async function Dg(i,a,e){try{return await i.retrievePromptVersion({name:a},e)}catch(o){if(mx(o))return null;throw o}}function Ng(i,a,e){return a?a.template!==i.prompt||!lx(a.metadata,i.metadata)||a.type!==e:true}function lx(i,a){let e=i!=null?i:{},o=a!=null?a:{};return cx__default.default(e,o)}function mx(i){return typeof i=="object"&&i!==null&&"statusCode"in i&&i.statusCode===404}var ie=class{constructor(a){this.input=a;this.cursor=0;}getPosition(){return this.cursor}getRemainingInput(){return this.input.slice(this.cursor)}getFullInput(){return this.input}isAtEnd(){return this.cursor>=this.input.length}peekChar(){return this.input[this.cursor]}peekCharAt(a){return this.input[this.cursor+a]}consumeChar(){return this.input[this.cursor++]}advance(a=1){this.cursor+=a;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(a){let e=this.cursor;for(;this.cursor<this.input.length&&a(this.input[this.cursor]);)this.cursor++;return this.input.slice(e,this.cursor)}sliceFrom(a){return this.input.slice(a,this.cursor)}static isFieldChar(a){return /[a-zA-Z0-9_]/.test(a)}static isLetterChar(a){return /[a-zA-Z]/.test(a)}static isDigitChar(a){return /\d/.test(a)}static isWhitespaceChar(a){return /\s/.test(a)}static isQuoteChar(a){return a==='"'||a==="'"}};var J={STRING_OPS:["=","contains","not_contains","starts_with","ends_with","!=",">","<"],NUMERIC_OPS:["=","!=",">","<",">=","<="],DATETIME_OPS:["=",">","<",">=","<="],LIST_OPS:["contains"],DICT_OPS:["=","contains",">","<"],LIMITED_STRING_OPS:["=","contains","not_contains"]},De={id:"string",name:"string",status:"string",start_time:"date_time",end_time:"date_time",input:"string",output:"string",metadata:"dictionary",feedback_scores:"feedback_scores_number",tags:"list","usage.total_tokens":"number","usage.prompt_tokens":"number","usage.completion_tokens":"number",duration:"number",number_of_messages:"number",created_by:"string",thread_id:"string",total_estimated_cost:"number",type:"string",model:"string",provider:"string"},Mg={id:J.STRING_OPS,name:J.STRING_OPS,status:J.LIMITED_STRING_OPS,start_time:J.DATETIME_OPS,end_time:J.DATETIME_OPS,input:J.LIMITED_STRING_OPS,output:J.LIMITED_STRING_OPS,metadata:J.DICT_OPS,feedback_scores:J.NUMERIC_OPS,tags:J.LIST_OPS,"usage.total_tokens":J.NUMERIC_OPS,"usage.prompt_tokens":J.NUMERIC_OPS,"usage.completion_tokens":J.NUMERIC_OPS,duration:J.NUMERIC_OPS,number_of_messages:J.NUMERIC_OPS,created_by:J.STRING_OPS,thread_id:J.STRING_OPS,total_estimated_cost:J.NUMERIC_OPS,type:J.STRING_OPS,model:J.STRING_OPS,provider:J.STRING_OPS},Xi={SPECIAL_FIELDS:["usage","metadata","feedback_scores"],USAGE_KEYS:["total_tokens","prompt_tokens","completion_tokens"]};function Fg(i){let a=Xi.SPECIAL_FIELDS.includes(i),e=Object.keys(De).includes(i);if(!a&&!e){let o=Object.keys(De).join(", ");throw new Error(`Field ${i} is not supported, only the fields ${o} are supported.`)}}function Og(i,a){if(!Xi.SPECIAL_FIELDS.includes(i)){let e=Object.keys(De).join(", ");throw new Error(`Field ${i}.${a} is not supported, only the fields ${e} are supported.`)}if(i==="usage"&&!Xi.USAGE_KEYS.includes(a))throw new Error(`When querying usage, ${a} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function cd(i,a){let e=Mg[i];if(!(e!=null&&e.includes(a))){let o=(e==null?void 0:e.join(", "))||"none";throw new Error(`Operator ${a} is not supported for field ${i}, only the operators ${o} are supported.`)}}function Wg(i){let a=i.toLowerCase();if(a==="and")return true;throw a==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${i}`)}function Gi(i,a,e){if(!i)throw new Error(`Missing closing quote for: ${e}`)}var Ea=class{static parse(a){a.skipWhitespace();let e=this.parseFieldName(a);return Fg(e),a.peekChar()==="."?this.parseFieldWithKey(a,e):{type:"simple",field:e,columnType:De[e]}}static parseFieldName(a){return a.consumeWhile(e=>ie.isFieldChar(e))}static parseFieldWithKey(a,e){a.advance();let o=this.parseKey(a);if(Og(e,o),e==="usage"){let t=`usage.${o}`;return {type:"simple",field:t,columnType:De[t]}}return {type:"nested",field:e,key:o,columnType:De[e]}}static parseKey(a){let e=a.peekChar();return ie.isQuoteChar(e)?this.parseQuotedKey(a,e):this.parseUnquotedKey(a)}static parseUnquotedKey(a){return a.consumeWhile(e=>ie.isFieldChar(e))}static parseQuotedKey(a,e){let o=a.getPosition();a.advance();let t="",n=false;for(;!a.isAtEnd();){let m=a.peekChar();if(m===e){if(a.peekCharAt(1)===e){t+=e,a.advance(2);continue}n=true,a.advance();break}t+=m,a.advance();}let c=a.getFullInput().slice(o);return Gi(n,o,c),t}};var Pa=class{static parse(a,e){a.skipWhitespace();let o=a.peekChar(),t=this.tryParseSymbolicOperator(a,o);if(t)return cd(e,t),{operator:t};let n=this.parseWordOperator(a);return cd(e,n),{operator:n}}static tryParseSymbolicOperator(a,e){if(e==="=")return a.advance(),"=";if(e==="<"||e===">"){let o=e;return a.advance(),a.peekChar()==="="?(a.advance(),o+"="):o}return e==="!"&&a.peekCharAt(1)==="="?(a.advance(2),"!="):null}static parseWordOperator(a){return a.consumeWhile(e=>!ie.isWhitespaceChar(e))}};var Ca=class{static parse(a){a.skipWhitespace();let e=a.getPosition(),o=a.peekChar();if(o==='"')return this.parseQuotedString(a,e);if(ie.isDigitChar(o)||o==="-")return this.parseNumber(a);let t=a.getRemainingInput();throw new Error(`Invalid value ${t.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(a,e){a.advance();let o=a.getPosition(),t=false;for(;!a.isAtEnd();){if(a.peekChar()==='"'){t=true;break}a.advance();}Gi(t,e,`value starting at position ${e}`);let n=a.sliceFrom(o);return a.advance(),{value:n}}static parseNumber(a){let e="";return a.peekChar()==="-"&&(e+=a.consumeChar()),e+=this.parseDigits(a),a.peekChar()==="."&&(e+=a.consumeChar(),e+=this.parseDigits(a)),{value:e}}static parseDigits(a){return a.consumeWhile(e=>ie.isDigitChar(e))}};var Ne=class{constructor(a){let e=a||"";this.filterExpressions=e?this.parse(e):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}getFilterExpressions(){return this.filterExpressions}parse(a){let e=new ie(a),o=[];for(;!e.isAtEnd();){let t=this.parseExpression(e);if(o.push(t),e.skipWhitespace(),!e.isAtEnd()&&!this.parseConnector(e))break}return o}parseExpression(a){let e=Ea.parse(a),o=Pa.parse(a,this.getFieldName(e)),t=Ca.parse(a);return this.buildExpression(e,o,t)}getFieldName(a){return a.field}buildExpression(a,e,o){let t={field:a.field,operator:e.operator,value:o.value,type:a.columnType};return a.type==="nested"&&(t.key=a.key),t}parseConnector(a){let e=a.getPosition(),o=a.consumeWhile(t=>ie.isLetterChar(t));try{return Wg(o)}catch(t){if(t instanceof Error&&t.message.includes("trailing characters")){let n=a.getFullInput().slice(e);throw new Error(`Invalid filter string, trailing characters ${n}`)}throw t}}};async function Bg(i,a,e,o,t){let n=await i.traces.searchTraces({projectName:a,filters:e!=null?e:void 0,limit:o,truncate:t});return await Ie(n,C.TracePublic,o)}async function Lg(i,a,e,o){let t=Date.now(),n=[];for(;;){if(n=await i(),n.length>=a||Date.now()-t>=e)return n;await new Promise(m=>setTimeout(m,o));}}function Vg(i){if(!i)return null;let e=new Ne(i).getFilterExpressions();return e?e.map(o=>{let t={field:o.field,operator:o.operator,value:o.value};return o.key&&(t.key=o.key),t}):null}var ld=[],$e=class{constructor(a){this.displayTraceLog=a=>{if(a===this.lastProjectNameLogged||!this.config.apiUrl)return;let e=Pg({apiUrl:this.config.apiUrl,projectName:a,workspaceName:this.config.workspaceName});k.info(`Started logging traces to the "${a}" project at ${Na(e)}`),this.lastProjectNameLogged=a;};this.trace=a=>{var t;k.debug("Creating new trace with data:",a);let e=(t=a.projectName)!=null?t:this.config.projectName,o=new Ei({id:re(),startTime:new Date,...a,projectName:e},this);return this.traceBatchQueue.create(o.data),k.debug("Trace added to the queue with ID:",o.data.id),this.displayTraceLog(e),o};this.getDataset=async a=>{k.debug(`Getting dataset with name "${a}"`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.getDatasetByIdentifier({datasetName:a});return new cr(e,this)}catch(e){throw e instanceof p&&e.statusCode===404?new Sa(a):e}};this.createDataset=async(a,e)=>{k.debug(`Creating dataset with name "${a}"`);let o=new cr({name:a,description:e},this);try{return this.datasetBatchQueue.create({name:o.name,description:o.description,id:o.id}),k.debug("Dataset added to the queue with name:",o.name),o}catch(t){throw k.error(`Failed to create dataset "${a}"`,{error:t}),new Error(`Error creating dataset "${a}": ${t}`)}};this.getOrCreateDataset=async(a,e)=>{k.debug(`Attempting to retrieve or create dataset with name: "${a}"`);try{return await this.getDataset(a)}catch(o){if(o instanceof Sa)return k.info(`Dataset "${a}" not found. Proceeding to create a new one.`),this.createDataset(a,e);throw k.error(`Error retrieving dataset "${a}":`,o),o}};this.getDatasets=async(a=100)=>{k.debug(`Getting all datasets (limit: ${a})`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.findDatasets({size:a}),o=[];for(let t of e.content||[])o.push(new cr(t,this));return k.info(`Retrieved ${o.length} datasets`),o}catch(e){throw k.error("Failed to retrieve datasets",{error:e}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async a=>{k.debug(`Deleting dataset with name "${a}"`);try{let e=await this.getDataset(a);if(!e.id)throw new Error(`Cannot delete dataset "${a}": ID not available`);this.datasetBatchQueue.delete(e.id);}catch(e){throw k.error(`Failed to delete dataset "${a}"`,{error:e}),new Error(`Failed to delete dataset "${a}": ${e}`)}};this.createExperiment=async({datasetName:a,name:e,experimentConfig:o,prompts:t,type:n=Tn.Regular,optimizationId:c})=>{if(k.debug(`Creating experiment for dataset "${a}"`),!a)throw new Error("Dataset name is required to create an experiment");let[m,u]=Ig(o,t),g=re(),R=new Ge({id:g,name:e,datasetName:a,prompts:t},this);try{return this.api.experiments.createExperiment({id:g,datasetName:a,name:e,metadata:m,promptVersions:u,type:n,optimizationId:c}),k.debug("Experiment added to the queue with id:",g),R}catch(y){throw k.error(`Failed to create experiment for dataset "${a}"`,{error:y}),new Error(`Error creating experiment: ${y}`)}};this.updateExperiment=async(a,e)=>{if(!a)throw new Error("id is required to update an experiment");let{name:o,experimentConfig:t}=e;if(!o&&!t)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");k.debug(`Updating experiment with ID "${a}"`);let n={};o!==void 0&&(n.name=o),t!==void 0&&(n.metadata=t);try{await this.api.experiments.updateExperiment(a,n);}catch(c){throw k.error(`Failed to update experiment with ID "${a}"`,{error:c}),c}};this.getExperimentById=async a=>{k.debug(`Getting experiment with ID "${a}"`);try{let e=await this.api.experiments.getExperimentById(a);return new Ge({id:e.id,name:e.name,datasetName:e.datasetName},this)}catch(e){throw e instanceof p&&e.statusCode===404?new _a(`No experiment found with ID '${a}'`):(k.error(`Failed to get experiment with ID "${a}"`,{error:e}),e)}};this.getExperimentsByName=async a=>{k.debug(`Getting experiments with name "${a}"`);try{let e=await this.api.experiments.streamExperiments({name:a});return (await Ie(e,C.ExperimentPublic)).map(t=>new Ge({id:t.id,name:t.name,datasetName:t.datasetName},this))}catch(e){throw k.error(`Failed to get experiments with name "${a}"`,{error:e}),e}};this.getExperiment=async a=>{k.debug(`Getting experiment with name "${a}"`);let e=await this.getExperimentsByName(a);if(e.length===0)throw new _a(a);return e[0]};this.getDatasetExperiments=async(a,e=100)=>{var c;k.debug(`Getting experiments for dataset "${a}"`);let o=await this.getDataset(a),t=Math.min(100,e),n=[];try{let m=1;for(;n.length<e;){let u=await this.api.experiments.findExperiments({page:m,size:t,datasetId:o.id}),g=(c=u==null?void 0:u.content)!=null?c:[];if(g.length===0)break;let R=e-n.length,y=Math.min(g.length,R);for(let v=0;v<y;v++){let z=g[v];n.push(new Ge({id:z.id,name:z.name,datasetName:z.datasetName},this));}if(y<g.length)break;m+=1;}return n}catch(m){throw k.error(`Failed to get experiments for dataset "${a}"`,{error:m}),m}};this.deleteExperiment=async a=>{k.debug(`Deleting experiment with ID "${a}"`);try{await this.api.experiments.deleteExperimentsById({ids:[a]});}catch(e){throw k.error(`Failed to delete experiment with ID "${a}"`,{error:e}),e}};this.createPrompt=async a=>{var e;k.debug("Creating prompt",{name:a.name});try{let o=await Dg(this.api.prompts,a.name,this.api.requestOptions),t=(e=a.type)!=null?e:be.MUSTACHE,n=Ng(a,o,t),c;if(n?(k.debug("Creating new prompt version",{name:a.name}),c=await this.api.prompts.createPromptVersion({name:a.name,version:{template:a.prompt,metadata:a.metadata,type:t}},this.api.requestOptions)):(k.debug("Returning existing prompt version",{name:a.name}),c=o),!c.promptId)throw new Error("Invalid API response: missing promptId");let m=await this.api.prompts.getPromptById(c.promptId,this.api.requestOptions),u=Ue.fromApiResponse(m,c,this);return k.debug("Prompt created",{name:a.name}),a.description||a.tags?await u.updateProperties({description:a.description,tags:a.tags}):u}catch(o){throw k.error("Failed to create prompt",{name:a.name,error:o}),o}};this.getPrompt=async a=>{var e;k.debug("Getting prompt",a);try{let t=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:a.name}]),size:1},this.api.requestOptions)).content)==null?void 0:e[0];if(!t)return k.debug("Prompt not found",{name:a.name}),null;let n=await this.api.prompts.retrievePromptVersion(a,this.api.requestOptions);return Ue.fromApiResponse(t,n,this)}catch(o){if(o instanceof p&&o.statusCode===404)return null;throw k.error("Failed to get prompt",{name:a.name,error:o}),o}};this.searchPrompts=async a=>{var e;k.debug("Searching prompts",{filterString:a});try{let o;if(a){let u=new Ne(a).getFilterExpressions();o=u?JSON.stringify(u):void 0;}let n=(e=(await this.api.prompts.getPrompts({filters:o,size:1e3},this.api.requestOptions)).content)!=null?e:[];return (await Promise.all(n.map(async m=>{if(!m.name)return null;try{let u=await this.api.prompts.retrievePromptVersion({name:m.name},this.api.requestOptions);return Ue.fromApiResponse(m,u,this)}catch(u){return k.debug("Failed to get version for prompt",{name:m.name,error:u}),null}}))).filter(m=>m!==null)}catch(o){throw k.error("Failed to search prompts",{error:o}),o}};this.deletePrompts=async a=>{k.debug("Deleting prompts in batch",{count:a.length});try{await this.api.prompts.deletePromptsBatch({ids:a},this.api.requestOptions),k.info("Successfully deleted prompts",{count:a.length});}catch(e){throw k.error("Failed to delete prompts",{count:a.length,error:e}),e}};this.searchTraces=async a=>{let{projectName:e,filterString:o,maxResults:t=1e3,truncate:n=true,waitForAtLeast:c,waitForTimeout:m=60}=a!=null?a:{};k.debug("Searching traces",{projectName:e,filterString:o,maxResults:t,truncate:n,waitForAtLeast:c,waitForTimeout:m});let u=Vg(o),g=e!=null?e:this.config.projectName,R=()=>Bg(this.api,g,u,t,n);if(c===void 0)return await R();let y=await Lg(R,c,m*1e3,5e3);if(y.length<c)throw new Oi(`Timeout after ${m} seconds: expected ${c} traces, but only ${y.length} were found.`);return y};this.flush=async()=>{k.debug("Starting flush operation");try{await this.traceBatchQueue.flush(),await this.spanBatchQueue.flush(),await this.traceFeedbackScoresBatchQueue.flush(),await this.spanFeedbackScoresBatchQueue.flush(),await this.datasetBatchQueue.flush(),k.info("Successfully flushed all data to Opik");}catch(a){k.error("Error during flush operation:",{error:a instanceof Error?a.message:a});}};k.debug("Initializing OpikClient with config:",a),this.config=Id(a);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};a!=null&&a.headers&&(k.debug("Initializing OpikClient with additional headers:",a==null?void 0:a.headers),e.requestOptions={headers:a==null?void 0:a.headers}),this.api=new Ni(e);let o=this.config.holdUntilFlush?24*60*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new ji(this.api,o),this.traceBatchQueue=new Ui(this.api,o),this.spanFeedbackScoresBatchQueue=new Ii(this.api,o),this.traceFeedbackScoresBatchQueue=new Di(this.api,o),this.datasetBatchQueue=new Mi(this.api,o),ld.push(this);}};var ux="track.decorator",ja=new async_hooks.AsyncLocalStorage,gx=()=>{let{span:i,trace:a}=ja.getStore()||{};if(!(!i||!a))return {span:i,trace:a}};function fx(i){return !!i&&(typeof i=="object"||typeof i=="function")&&typeof i.then=="function"}function hx({name:i,parentSpan:a,projectName:e,trace:o,type:t="llm"}){k.debug("Creating new span:",{name:i,parentSpan:a==null?void 0:a.data.id,projectName:e,type:t});let n=o;n||(n=dd().trace({name:i,projectName:e}));let c=n.span({name:i,parentSpanId:a==null?void 0:a.data.id,projectName:e,type:t});return k.debug("Span created with ID:",c.data.id),{span:c,trace:n}}function wx({args:i,span:a,trace:e}){if(k.debug("Starting span execution:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id}),i.length===0)return;let o={arguments:i};k.debug("Recording span input"),a.update({input:o}),e&&(k.debug("Recording trace input"),e.update({input:o}));}function Hg({result:i,span:a,trace:e,enrichSpan:o}){k.debug("Recording successful execution:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id});let t=typeof i=="object"?i:{result:i},n=new Date,c={endTime:n,output:t};if(o){let m=o(i);Object.assign(c,m);}a.update(c),e&&e.update({endTime:n,output:t});}function Jg({span:i,error:a,trace:e}){var o,t;k.error("Recording execution error:",{spanId:i.data.id,traceId:e==null?void 0:e.data.id,error:a instanceof Error?{name:a.name,message:a.message,stack:a.stack}:a}),a instanceof Error&&i.update({errorInfo:{message:a.message,exceptionType:a.name,traceback:(o=a.stack)!=null?o:""}}),i.end(),e&&(e.update({errorInfo:{message:a.message,exceptionType:a.name,traceback:(t=a.stack)!=null?t:""}}),e.end());}function $i({name:i,projectName:a,type:e,enrichSpan:o}={},t){return function(...c){let m=ja.getStore(),{span:u,trace:g}=hx({name:i!=null?i:t.name||ux,parentSpan:m==null?void 0:m.span,projectName:a,trace:m==null?void 0:m.trace,type:e}),R=!m,y=this;return ja.run({span:u,trace:g},()=>{let v=R?g:void 0;try{wx({args:c,span:u,trace:v});let z=t.apply(y,c);return fx(z)?z.then(S=>(Hg({span:u,result:S,trace:v,enrichSpan:o}),S),S=>{throw Jg({span:u,error:S,trace:v}),S}):(Hg({span:u,result:z,trace:v,enrichSpan:o}),z)}catch(z){throw Jg({span:u,error:z,trace:v}),z}})}}function Ee(i,a){if(typeof i=="function")return $i({},i);let e=i;return a?$i(e,a):function(...o){if(o.length===2&&typeof o[1]=="object"&&o[1]!==null&&"kind"in o[1]){let[c,m]=o;if(m.kind!=="method")throw new Error("track decorator is only applicable to methods");return $i(e,c)}let[,,t]=o;if(!t||typeof t.value!="function")throw new Error("track decorator can only be applied to methods");let n=t.value;return t.value=$i(e,n),t}}var md=null;function dd(){return md===null&&(md=new $e),md}var bx=async()=>{k.debug("Starting flushAll operation");try{await Promise.all([dd().flush(),...ld.map(i=>i.flush())]),k.debug("flushAll operation completed successfully");}catch(i){throw k.error("Error during flushAll operation:",{error:i instanceof Error?i.message:i,stack:i instanceof Error?i.stack:void 0}),i}};function Kg(i,a){if(!a||typeof a!="object")throw new Error("Arguments must be an object");let e=i.validationSchema,t=e.extend(Object.fromEntries(Object.entries(e.shape).map(([n,c])=>[n,c.refine(m=>m!==void 0,{message:`${n} cannot be undefined`,path:[n]})]))).safeParse(a);if(!t.success){let n=t.error.issues.map(m=>m.path[0]).filter(Boolean),c=[...new Set(n)];throw new Error(xx(i,a,c))}}function xx(i,a,e){let o=Object.keys(a),t=e.filter(n=>!(n in a));return `Metric '${i.name}' is skipped, missing required arguments: ${t.join(", ")}. Available arguments: ${o.join(", ")}.`}var Yi=class{static calculateAverageScores(a){if(!a||a.length===0)return new Map;let e=new Map;for(let t of a)if(!(!t||!t.scoreResults||t.scoreResults.length===0))for(let n of t.scoreResults){if(!n||n.scoringFailed||typeof n.value!="number")continue;let c=e.get(n.name)||{sum:0,count:0};c.sum+=n.value,c.count+=1,e.set(n.name,c);}let o=new Map;return e.forEach((t,n)=>{o.set(n,t.count>0?t.sum/t.count:0);}),o}static formatScore(a){return a.toFixed(4)}static formatTime(a){let e=Math.floor(a/3600),o=Math.floor(a%3600/60),t=Math.floor(a%60);return `${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`}static async generateResultTable(a,e,o,t){if(a.length===0){k.info(`
13
+ ${t}`),t}static fromApiResponse(a,e){var o;if(!e.template)throw new X("Invalid API response: missing required field 'template'");if(!e.commit)throw new X("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new X("Invalid API response: missing required field 'promptId'");if(!e.id)throw new X("Invalid API response: missing required field 'id'");return new i({name:a,prompt:e.template,commit:e.commit,promptId:e.promptId,versionId:e.id,type:(o=e.type)!=null?o:be.MUSTACHE,metadata:e.metadata,changeDescription:e.changeDescription,createdAt:e.createdAt?new Date(e.createdAt):void 0,createdBy:e.createdBy})}};var Ue=class i{constructor({promptId:a,versionId:e,name:o,prompt:t,commit:n,metadata:c,type:m,changeDescription:u,description:g,tags:R=[]},y){this.opik=y;this.id=a,this.versionId=e,this.prompt=t,this.commit=n,this.type=m!=null?m:be.MUSTACHE,this.changeDescription=u,this._name=o,this._description=g,this._tags=[...R],this._metadata=c;}get name(){return this._name}get description(){return this._description}get tags(){return Object.freeze([...this._tags])}get metadata(){if(this._metadata)return structuredClone(this._metadata)}format(a){return ve(this.prompt,a,this.type)}static fromApiResponse(a,e,o){var n;if(!e.template)throw new X("Invalid API response: missing required field 'template'");if(!e.commit)throw new X("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new X("Invalid API response: missing required field 'promptId'");if(!e.id)throw new X("Invalid API response: missing required field 'id' (version ID)");let t=(n=e.type)!=null?n:be.MUSTACHE;if(t!=="mustache"&&t!=="jinja2")throw new X(`Invalid API response: unknown prompt type '${t}'`);return new i({promptId:e.promptId,versionId:e.id,name:a.name,prompt:e.template,commit:e.commit,metadata:e.metadata,type:t,changeDescription:e.changeDescription,description:a.description,tags:a.tags},o)}async updateProperties(a){var e,o,t,n;return await this.opik.api.prompts.updatePrompt(this.id,{name:(e=a.name)!=null?e:this._name,description:a.description,tags:a.tags},this.opik.api.requestOptions),this._name=(o=a.name)!=null?o:this._name,this._description=(t=a.description)!=null?t:this._description,this._tags=(n=a.tags)!=null?n:this._tags,this}async delete(){await this.opik.deletePrompts([this.id]);}async getVersions(){var a;k.debug("Getting versions for prompt",{promptId:this.id,name:this.name});try{let e=[],o=1,t=100;for(;;){let c=(a=(await this.opik.api.prompts.getPromptVersions(this.id,{page:o,size:t},this.opik.api.requestOptions)).content)!=null?a:[];if(e.push(...c),c.length<t)break;o++;}return k.debug("Successfully retrieved prompt versions",{promptId:this.id,name:this.name,totalVersions:e.length}),e.map(n=>Aa.fromApiResponse(this.name,n))}catch(e){throw k.error("Failed to get prompt versions",{promptId:this.id,name:this.name,error:e}),e}}async useVersion(a){k.debug("Restoring prompt version",{promptId:this.id,name:this.name,versionId:a.id,versionCommit:a.commit});try{let e=await this.opik.api.prompts.restorePromptVersion(this.id,a.id,this.opik.api.requestOptions);return k.debug("Successfully restored prompt version",{promptId:this.id,name:this.name,restoredVersionId:e.id,restoredCommit:e.commit}),i.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){throw k.error("Failed to restore prompt version",{promptId:this.id,name:this.name,versionId:a.id,versionCommit:a.commit,error:e}),e}}async getVersion(a){try{let e=await this.opik.api.prompts.retrievePromptVersion({name:this.name,commit:a},this.opik.api.requestOptions);return i.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){if(e&&typeof e=="object"&&"statusCode"in e&&e.statusCode===404)return null;throw k.error("Failed to retrieve prompt version",{promptName:this.name,commit:a,error:e}),e}}};async function Dg(i,a,e){try{return await i.retrievePromptVersion({name:a},e)}catch(o){if(mx(o))return null;throw o}}function Ng(i,a,e){return a?a.template!==i.prompt||!lx(a.metadata,i.metadata)||a.type!==e:true}function lx(i,a){let e=i!=null?i:{},o=a!=null?a:{};return cx__default.default(e,o)}function mx(i){return typeof i=="object"&&i!==null&&"statusCode"in i&&i.statusCode===404}var ie=class{constructor(a){this.input=a;this.cursor=0;}getPosition(){return this.cursor}getRemainingInput(){return this.input.slice(this.cursor)}getFullInput(){return this.input}isAtEnd(){return this.cursor>=this.input.length}peekChar(){return this.input[this.cursor]}peekCharAt(a){return this.input[this.cursor+a]}consumeChar(){return this.input[this.cursor++]}advance(a=1){this.cursor+=a;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(a){let e=this.cursor;for(;this.cursor<this.input.length&&a(this.input[this.cursor]);)this.cursor++;return this.input.slice(e,this.cursor)}sliceFrom(a){return this.input.slice(a,this.cursor)}static isFieldChar(a){return /[a-zA-Z0-9_]/.test(a)}static isLetterChar(a){return /[a-zA-Z]/.test(a)}static isDigitChar(a){return /\d/.test(a)}static isWhitespaceChar(a){return /\s/.test(a)}static isQuoteChar(a){return a==='"'||a==="'"}};var J={STRING_OPS:["=","contains","not_contains","starts_with","ends_with","!=",">","<"],NUMERIC_OPS:["=","!=",">","<",">=","<="],DATETIME_OPS:["=",">","<",">=","<="],LIST_OPS:["contains"],DICT_OPS:["=","contains",">","<"],LIMITED_STRING_OPS:["=","contains","not_contains"]},De={id:"string",name:"string",status:"string",start_time:"date_time",end_time:"date_time",input:"string",output:"string",metadata:"dictionary",feedback_scores:"feedback_scores_number",tags:"list","usage.total_tokens":"number","usage.prompt_tokens":"number","usage.completion_tokens":"number",duration:"number",number_of_messages:"number",created_by:"string",thread_id:"string",total_estimated_cost:"number",type:"string",model:"string",provider:"string"},Mg={id:J.STRING_OPS,name:J.STRING_OPS,status:J.LIMITED_STRING_OPS,start_time:J.DATETIME_OPS,end_time:J.DATETIME_OPS,input:J.LIMITED_STRING_OPS,output:J.LIMITED_STRING_OPS,metadata:J.DICT_OPS,feedback_scores:J.NUMERIC_OPS,tags:J.LIST_OPS,"usage.total_tokens":J.NUMERIC_OPS,"usage.prompt_tokens":J.NUMERIC_OPS,"usage.completion_tokens":J.NUMERIC_OPS,duration:J.NUMERIC_OPS,number_of_messages:J.NUMERIC_OPS,created_by:J.STRING_OPS,thread_id:J.STRING_OPS,total_estimated_cost:J.NUMERIC_OPS,type:J.STRING_OPS,model:J.STRING_OPS,provider:J.STRING_OPS},Xi={SPECIAL_FIELDS:["usage","metadata","feedback_scores"],USAGE_KEYS:["total_tokens","prompt_tokens","completion_tokens"]};function Fg(i){let a=Xi.SPECIAL_FIELDS.includes(i),e=Object.keys(De).includes(i);if(!a&&!e){let o=Object.keys(De).join(", ");throw new Error(`Field ${i} is not supported, only the fields ${o} are supported.`)}}function Og(i,a){if(!Xi.SPECIAL_FIELDS.includes(i)){let e=Object.keys(De).join(", ");throw new Error(`Field ${i}.${a} is not supported, only the fields ${e} are supported.`)}if(i==="usage"&&!Xi.USAGE_KEYS.includes(a))throw new Error(`When querying usage, ${a} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function cd(i,a){let e=Mg[i];if(!(e!=null&&e.includes(a))){let o=(e==null?void 0:e.join(", "))||"none";throw new Error(`Operator ${a} is not supported for field ${i}, only the operators ${o} are supported.`)}}function Wg(i){let a=i.toLowerCase();if(a==="and")return true;throw a==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${i}`)}function Gi(i,a,e){if(!i)throw new Error(`Missing closing quote for: ${e}`)}var Ea=class{static parse(a){a.skipWhitespace();let e=this.parseFieldName(a);return Fg(e),a.peekChar()==="."?this.parseFieldWithKey(a,e):{type:"simple",field:e,columnType:De[e]}}static parseFieldName(a){return a.consumeWhile(e=>ie.isFieldChar(e))}static parseFieldWithKey(a,e){a.advance();let o=this.parseKey(a);if(Og(e,o),e==="usage"){let t=`usage.${o}`;return {type:"simple",field:t,columnType:De[t]}}return {type:"nested",field:e,key:o,columnType:De[e]}}static parseKey(a){let e=a.peekChar();return ie.isQuoteChar(e)?this.parseQuotedKey(a,e):this.parseUnquotedKey(a)}static parseUnquotedKey(a){return a.consumeWhile(e=>ie.isFieldChar(e))}static parseQuotedKey(a,e){let o=a.getPosition();a.advance();let t="",n=false;for(;!a.isAtEnd();){let m=a.peekChar();if(m===e){if(a.peekCharAt(1)===e){t+=e,a.advance(2);continue}n=true,a.advance();break}t+=m,a.advance();}let c=a.getFullInput().slice(o);return Gi(n,o,c),t}};var Pa=class{static parse(a,e){a.skipWhitespace();let o=a.peekChar(),t=this.tryParseSymbolicOperator(a,o);if(t)return cd(e,t),{operator:t};let n=this.parseWordOperator(a);return cd(e,n),{operator:n}}static tryParseSymbolicOperator(a,e){if(e==="=")return a.advance(),"=";if(e==="<"||e===">"){let o=e;return a.advance(),a.peekChar()==="="?(a.advance(),o+"="):o}return e==="!"&&a.peekCharAt(1)==="="?(a.advance(2),"!="):null}static parseWordOperator(a){return a.consumeWhile(e=>!ie.isWhitespaceChar(e))}};var Ca=class{static parse(a){a.skipWhitespace();let e=a.getPosition(),o=a.peekChar();if(o==='"')return this.parseQuotedString(a,e);if(ie.isDigitChar(o)||o==="-")return this.parseNumber(a);let t=a.getRemainingInput();throw new Error(`Invalid value ${t.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(a,e){a.advance();let o=a.getPosition(),t=false;for(;!a.isAtEnd();){if(a.peekChar()==='"'){t=true;break}a.advance();}Gi(t,e,`value starting at position ${e}`);let n=a.sliceFrom(o);return a.advance(),{value:n}}static parseNumber(a){let e="";return a.peekChar()==="-"&&(e+=a.consumeChar()),e+=this.parseDigits(a),a.peekChar()==="."&&(e+=a.consumeChar(),e+=this.parseDigits(a)),{value:e}}static parseDigits(a){return a.consumeWhile(e=>ie.isDigitChar(e))}};var Ne=class{constructor(a){let e=a||"";this.filterExpressions=e?this.parse(e):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}getFilterExpressions(){return this.filterExpressions}parse(a){let e=new ie(a),o=[];for(;!e.isAtEnd();){let t=this.parseExpression(e);if(o.push(t),e.skipWhitespace(),!e.isAtEnd()&&!this.parseConnector(e))break}return o}parseExpression(a){let e=Ea.parse(a),o=Pa.parse(a,this.getFieldName(e)),t=Ca.parse(a);return this.buildExpression(e,o,t)}getFieldName(a){return a.field}buildExpression(a,e,o){let t={field:a.field,operator:e.operator,value:o.value,type:a.columnType};return a.type==="nested"&&(t.key=a.key),t}parseConnector(a){let e=a.getPosition(),o=a.consumeWhile(t=>ie.isLetterChar(t));try{return Wg(o)}catch(t){if(t instanceof Error&&t.message.includes("trailing characters")){let n=a.getFullInput().slice(e);throw new Error(`Invalid filter string, trailing characters ${n}`)}throw t}}};async function Bg(i,a,e,o,t){let n=await i.traces.searchTraces({projectName:a,filters:e!=null?e:void 0,limit:o,truncate:t});return await je(n,C.TracePublic,o)}async function Lg(i,a,e,o){let t=Date.now(),n=[];for(;;){if(n=await i(),n.length>=a||Date.now()-t>=e)return n;await new Promise(m=>setTimeout(m,o));}}function Vg(i){if(!i)return null;let e=new Ne(i).getFilterExpressions();return e?e.map(o=>{let t={field:o.field,operator:o.operator,value:o.value};return o.key&&(t.key=o.key),t}):null}var ld=[],$e=class{constructor(a){this.displayTraceLog=a=>{if(a===this.lastProjectNameLogged||!this.config.apiUrl)return;let e=Pg({apiUrl:this.config.apiUrl,projectName:a,workspaceName:this.config.workspaceName});k.info(`Started logging traces to the "${a}" project at ${Na(e)}`),this.lastProjectNameLogged=a;};this.trace=a=>{var t;k.debug("Creating new trace with data:",a);let e=(t=a.projectName)!=null?t:this.config.projectName,o=new Ei({id:re(),startTime:new Date,...a,projectName:e},this);return this.traceBatchQueue.create(o.data),k.debug("Trace added to the queue with ID:",o.data.id),this.displayTraceLog(e),o};this.getDataset=async a=>{k.debug(`Getting dataset with name "${a}"`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.getDatasetByIdentifier({datasetName:a});return new lr(e,this)}catch(e){throw e instanceof p&&e.statusCode===404?new Sa(a):e}};this.createDataset=async(a,e)=>{k.debug(`Creating dataset with name "${a}"`);let o=new lr({name:a,description:e},this);try{return this.datasetBatchQueue.create({name:o.name,description:o.description,id:o.id}),k.debug("Dataset added to the queue with name:",o.name),o}catch(t){throw k.error(`Failed to create dataset "${a}"`,{error:t}),new Error(`Error creating dataset "${a}": ${t}`)}};this.getOrCreateDataset=async(a,e)=>{k.debug(`Attempting to retrieve or create dataset with name: "${a}"`);try{return await this.getDataset(a)}catch(o){if(o instanceof Sa)return k.info(`Dataset "${a}" not found. Proceeding to create a new one.`),this.createDataset(a,e);throw k.error(`Error retrieving dataset "${a}":`,o),o}};this.getDatasets=async(a=100)=>{k.debug(`Getting all datasets (limit: ${a})`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.findDatasets({size:a}),o=[];for(let t of e.content||[])o.push(new lr(t,this));return k.info(`Retrieved ${o.length} datasets`),o}catch(e){throw k.error("Failed to retrieve datasets",{error:e}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async a=>{k.debug(`Deleting dataset with name "${a}"`);try{let e=await this.getDataset(a);if(!e.id)throw new Error(`Cannot delete dataset "${a}": ID not available`);this.datasetBatchQueue.delete(e.id);}catch(e){throw k.error(`Failed to delete dataset "${a}"`,{error:e}),new Error(`Failed to delete dataset "${a}": ${e}`)}};this.createExperiment=async({datasetName:a,name:e,experimentConfig:o,prompts:t,type:n=Tn.Regular,optimizationId:c})=>{if(k.debug(`Creating experiment for dataset "${a}"`),!a)throw new Error("Dataset name is required to create an experiment");let[m,u]=jg(o,t),g=re(),R=new Ge({id:g,name:e,datasetName:a,prompts:t},this);try{return this.api.experiments.createExperiment({id:g,datasetName:a,name:e,metadata:m,promptVersions:u,type:n,optimizationId:c}),k.debug("Experiment added to the queue with id:",g),R}catch(y){throw k.error(`Failed to create experiment for dataset "${a}"`,{error:y}),new Error(`Error creating experiment: ${y}`)}};this.updateExperiment=async(a,e)=>{if(!a)throw new Error("id is required to update an experiment");let{name:o,experimentConfig:t}=e;if(!o&&!t)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");k.debug(`Updating experiment with ID "${a}"`);let n={};o!==void 0&&(n.name=o),t!==void 0&&(n.metadata=t);try{await this.api.experiments.updateExperiment(a,n);}catch(c){throw k.error(`Failed to update experiment with ID "${a}"`,{error:c}),c}};this.getExperimentById=async a=>{k.debug(`Getting experiment with ID "${a}"`);try{let e=await this.api.experiments.getExperimentById(a);return new Ge({id:e.id,name:e.name,datasetName:e.datasetName},this)}catch(e){throw e instanceof p&&e.statusCode===404?new _a(`No experiment found with ID '${a}'`):(k.error(`Failed to get experiment with ID "${a}"`,{error:e}),e)}};this.getExperimentsByName=async a=>{k.debug(`Getting experiments with name "${a}"`);try{let e=await this.api.experiments.streamExperiments({name:a});return (await je(e,C.ExperimentPublic)).map(t=>new Ge({id:t.id,name:t.name,datasetName:t.datasetName},this))}catch(e){throw k.error(`Failed to get experiments with name "${a}"`,{error:e}),e}};this.getExperiment=async a=>{k.debug(`Getting experiment with name "${a}"`);let e=await this.getExperimentsByName(a);if(e.length===0)throw new _a(a);return e[0]};this.getDatasetExperiments=async(a,e=100)=>{var c;k.debug(`Getting experiments for dataset "${a}"`);let o=await this.getDataset(a),t=Math.min(100,e),n=[];try{let m=1;for(;n.length<e;){let u=await this.api.experiments.findExperiments({page:m,size:t,datasetId:o.id}),g=(c=u==null?void 0:u.content)!=null?c:[];if(g.length===0)break;let R=e-n.length,y=Math.min(g.length,R);for(let v=0;v<y;v++){let z=g[v];n.push(new Ge({id:z.id,name:z.name,datasetName:z.datasetName},this));}if(y<g.length)break;m+=1;}return n}catch(m){throw k.error(`Failed to get experiments for dataset "${a}"`,{error:m}),m}};this.deleteExperiment=async a=>{k.debug(`Deleting experiment with ID "${a}"`);try{await this.api.experiments.deleteExperimentsById({ids:[a]});}catch(e){throw k.error(`Failed to delete experiment with ID "${a}"`,{error:e}),e}};this.createPrompt=async a=>{var e;k.debug("Creating prompt",{name:a.name});try{let o=await Dg(this.api.prompts,a.name,this.api.requestOptions),t=(e=a.type)!=null?e:be.MUSTACHE,n=Ng(a,o,t),c;if(n?(k.debug("Creating new prompt version",{name:a.name}),c=await this.api.prompts.createPromptVersion({name:a.name,version:{template:a.prompt,metadata:a.metadata,type:t}},this.api.requestOptions)):(k.debug("Returning existing prompt version",{name:a.name}),c=o),!c.promptId)throw new Error("Invalid API response: missing promptId");let m=await this.api.prompts.getPromptById(c.promptId,this.api.requestOptions),u=Ue.fromApiResponse(m,c,this);return k.debug("Prompt created",{name:a.name}),a.description||a.tags?await u.updateProperties({description:a.description,tags:a.tags}):u}catch(o){throw k.error("Failed to create prompt",{name:a.name,error:o}),o}};this.getPrompt=async a=>{var e;k.debug("Getting prompt",a);try{let t=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:a.name}]),size:1},this.api.requestOptions)).content)==null?void 0:e[0];if(!t)return k.debug("Prompt not found",{name:a.name}),null;let n=await this.api.prompts.retrievePromptVersion(a,this.api.requestOptions);return Ue.fromApiResponse(t,n,this)}catch(o){if(o instanceof p&&o.statusCode===404)return null;throw k.error("Failed to get prompt",{name:a.name,error:o}),o}};this.searchPrompts=async a=>{var e;k.debug("Searching prompts",{filterString:a});try{let o;if(a){let u=new Ne(a).getFilterExpressions();o=u?JSON.stringify(u):void 0;}let n=(e=(await this.api.prompts.getPrompts({filters:o,size:1e3},this.api.requestOptions)).content)!=null?e:[];return (await Promise.all(n.map(async m=>{if(!m.name)return null;try{let u=await this.api.prompts.retrievePromptVersion({name:m.name},this.api.requestOptions);return Ue.fromApiResponse(m,u,this)}catch(u){return k.debug("Failed to get version for prompt",{name:m.name,error:u}),null}}))).filter(m=>m!==null)}catch(o){throw k.error("Failed to search prompts",{error:o}),o}};this.deletePrompts=async a=>{k.debug("Deleting prompts in batch",{count:a.length});try{await this.api.prompts.deletePromptsBatch({ids:a},this.api.requestOptions),k.info("Successfully deleted prompts",{count:a.length});}catch(e){throw k.error("Failed to delete prompts",{count:a.length,error:e}),e}};this.searchTraces=async a=>{let{projectName:e,filterString:o,maxResults:t=1e3,truncate:n=true,waitForAtLeast:c,waitForTimeout:m=60}=a!=null?a:{};k.debug("Searching traces",{projectName:e,filterString:o,maxResults:t,truncate:n,waitForAtLeast:c,waitForTimeout:m});let u=Vg(o),g=e!=null?e:this.config.projectName,R=()=>Bg(this.api,g,u,t,n);if(c===void 0)return await R();let y=await Lg(R,c,m*1e3,5e3);if(y.length<c)throw new Oi(`Timeout after ${m} seconds: expected ${c} traces, but only ${y.length} were found.`);return y};this.flush=async()=>{k.debug("Starting flush operation");try{await this.traceBatchQueue.flush(),await this.spanBatchQueue.flush(),await this.traceFeedbackScoresBatchQueue.flush(),await this.spanFeedbackScoresBatchQueue.flush(),await this.datasetBatchQueue.flush(),k.info("Successfully flushed all data to Opik");}catch(a){k.error("Error during flush operation:",{error:a instanceof Error?a.message:a});}};k.debug("Initializing OpikClient with config:",a),this.config=jd(a);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};a!=null&&a.headers&&(k.debug("Initializing OpikClient with additional headers:",a==null?void 0:a.headers),e.requestOptions={headers:a==null?void 0:a.headers}),this.api=new Ni(e);let o=this.config.holdUntilFlush?24*60*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new Ii(this.api,o),this.traceBatchQueue=new Ui(this.api,o),this.spanFeedbackScoresBatchQueue=new ji(this.api,o),this.traceFeedbackScoresBatchQueue=new Di(this.api,o),this.datasetBatchQueue=new Mi(this.api,o),ld.push(this);}};var ux="track.decorator",Ia=new async_hooks.AsyncLocalStorage,gx=()=>{let{span:i,trace:a}=Ia.getStore()||{};if(!(!i||!a))return {span:i,trace:a}};function fx(i){return !!i&&(typeof i=="object"||typeof i=="function")&&typeof i.then=="function"}function hx({name:i,parentSpan:a,projectName:e,trace:o,type:t="llm"}){k.debug("Creating new span:",{name:i,parentSpan:a==null?void 0:a.data.id,projectName:e,type:t});let n=o;n||(n=dd().trace({name:i,projectName:e}));let c=n.span({name:i,parentSpanId:a==null?void 0:a.data.id,projectName:e,type:t});return k.debug("Span created with ID:",c.data.id),{span:c,trace:n}}function wx({args:i,span:a,trace:e}){if(k.debug("Starting span execution:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id}),i.length===0)return;let o={arguments:i};k.debug("Recording span input"),a.update({input:o}),e&&(k.debug("Recording trace input"),e.update({input:o}));}function Hg({result:i,span:a,trace:e,enrichSpan:o}){k.debug("Recording successful execution:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id});let t=typeof i=="object"?i:{result:i},n=new Date,c={endTime:n,output:t};if(o){let m=o(i);Object.assign(c,m);}a.update(c),e&&e.update({endTime:n,output:t});}function Jg({span:i,error:a,trace:e}){var o,t;k.error("Recording execution error:",{spanId:i.data.id,traceId:e==null?void 0:e.data.id,error:a instanceof Error?{name:a.name,message:a.message,stack:a.stack}:a}),a instanceof Error&&i.update({errorInfo:{message:a.message,exceptionType:a.name,traceback:(o=a.stack)!=null?o:""}}),i.end(),e&&(e.update({errorInfo:{message:a.message,exceptionType:a.name,traceback:(t=a.stack)!=null?t:""}}),e.end());}function $i({name:i,projectName:a,type:e,enrichSpan:o}={},t){return function(...c){let m=Ia.getStore(),{span:u,trace:g}=hx({name:i!=null?i:t.name||ux,parentSpan:m==null?void 0:m.span,projectName:a,trace:m==null?void 0:m.trace,type:e}),R=!m,y=this;return Ia.run({span:u,trace:g},()=>{let v=R?g:void 0;try{wx({args:c,span:u,trace:v});let z=t.apply(y,c);return fx(z)?z.then(S=>(Hg({span:u,result:S,trace:v,enrichSpan:o}),S),S=>{throw Jg({span:u,error:S,trace:v}),S}):(Hg({span:u,result:z,trace:v,enrichSpan:o}),z)}catch(z){throw Jg({span:u,error:z,trace:v}),z}})}}function Ee(i,a){if(typeof i=="function")return $i({},i);let e=i;return a?$i(e,a):function(...o){if(o.length===2&&typeof o[1]=="object"&&o[1]!==null&&"kind"in o[1]){let[c,m]=o;if(m.kind!=="method")throw new Error("track decorator is only applicable to methods");return $i(e,c)}let[,,t]=o;if(!t||typeof t.value!="function")throw new Error("track decorator can only be applied to methods");let n=t.value;return t.value=$i(e,n),t}}var md=null;function dd(){return md===null&&(md=new $e),md}var bx=async()=>{k.debug("Starting flushAll operation");try{await Promise.all([dd().flush(),...ld.map(i=>i.flush())]),k.debug("flushAll operation completed successfully");}catch(i){throw k.error("Error during flushAll operation:",{error:i instanceof Error?i.message:i,stack:i instanceof Error?i.stack:void 0}),i}};function Kg(i,a){if(!a||typeof a!="object")throw new Error("Arguments must be an object");let e=i.validationSchema,t=e.extend(Object.fromEntries(Object.entries(e.shape).map(([n,c])=>[n,c.refine(m=>m!==void 0,{message:`${n} cannot be undefined`,path:[n]})]))).safeParse(a);if(!t.success){let n=t.error.issues.map(m=>m.path[0]).filter(Boolean),c=[...new Set(n)];throw new Error(xx(i,a,c))}}function xx(i,a,e){let o=Object.keys(a),t=e.filter(n=>!(n in a));return `Metric '${i.name}' is skipped, missing required arguments: ${t.join(", ")}. Available arguments: ${o.join(", ")}.`}var Yi=class{static calculateAverageScores(a){if(!a||a.length===0)return new Map;let e=new Map;for(let t of a)if(!(!t||!t.scoreResults||t.scoreResults.length===0))for(let n of t.scoreResults){if(!n||n.scoringFailed||typeof n.value!="number")continue;let c=e.get(n.name)||{sum:0,count:0};c.sum+=n.value,c.count+=1,e.set(n.name,c);}let o=new Map;return e.forEach((t,n)=>{o.set(n,t.count>0?t.sum/t.count:0);}),o}static formatScore(a){return a.toFixed(4)}static formatTime(a){let e=Math.floor(a/3600),o=Math.floor(a%3600/60),t=Math.floor(a%60);return `${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`}static async generateResultTable(a,e,o,t){if(a.length===0){k.info(`
14
14
  No test results available to display.`);return}if(o.size===0){k.info(`
15
15
  No metrics available to display.`);return}let n=[...o.keys()].sort(),c=this.formatTime(t),m=[Qi__default.default.bold(`Total time: ${c}`),Qi__default.default.bold(`Number of samples: ${a.length}`),"",...n.map(R=>{let y=this.formatScore(o.get(R)||0);return Qi__default.default.green(`${R}: ${y} (avg)`)})].join(`
16
16
  `),u=await e.ensureNameLoaded(),g=Rx__default.default(m,{title:`${u} (${a.length} samples)`,titleAlignment:"left",padding:1,margin:0,borderColor:"cyan",borderStyle:"round"});k.info(`
17
17
  `+g+`
18
- `),k.info(Qi__default.default.blue("Uploading results to Opik ... "));}static async displayExperimentLink(a){let e=await a.getUrl();k.info(`View the results ${Na(e,"in your Opik dashboard")}`);}static async processResults(a,e,o=0){let t=this.calculateAverageScores(a);await this.generateResultTable(a,e,t,o),await this.displayExperimentLink(e);let n=await e.ensureNameLoaded();return {experimentId:e.id,experimentName:n,testResults:a}}};function Xg(i,a,e){if(!i||typeof a!="string"||a.trim()==="")return e;let o=a.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),t=i;for(let n of o)if(typeof t=="object"&&t!==null&&n in t)t=t[n];else return e;return t===void 0?e:t}var Gg,ud;Gg=[Ee({name:"metrics_calculation",type:ye.General})];var lr=class{constructor(a,e,o){Ad(ud,5,this);this.client=void 0;this.dataset=void 0;this.task=void 0;this.scoringMetrics=void 0;this.projectName=void 0;this.nbSamples=void 0;this.scoringKeyMapping=void 0;this.experiment=void 0;this.rootTrace=void 0;this.client=e,this.dataset=a.dataset,this.experiment=o,this.task=a.task,this.scoringMetrics=a.scoringMetrics||[],this.projectName=a.projectName,this.nbSamples=a.nbSamples,this.scoringKeyMapping=a.scoringKeyMapping;}async execute(){var R;let a=performance.now(),e=[],o=await this.dataset.getItems(this.nbSamples),t=o.length,n=k.settings.minLevel;k.settings.minLevel=6;let c=yx__default.default({text:`Evaluating dataset (0/${t} items)`}).start(),m=[];for(let y=0;y<o.length;y++){let v=o[y];try{this.rootTrace=this.client.trace({projectName:this.projectName,name:"evaluation_task",createdBy:"evaluation",input:v}),ja.enterWith({trace:this.rootTrace});let z=await this.executeTask(v);m.push(z),this.rootTrace.update({output:z.testCase.taskOutput,endTime:new Date});}catch(z){let S=z instanceof Error?z.message:String(z);k.error(`Error processing dataset item: ${v.id} - ${S}`),z instanceof Error&&this.rootTrace.update({errorInfo:{message:z.message,exceptionType:z.name,traceback:(R=z.stack)!=null?R:""},endTime:new Date});}e.push(new Hi({datasetItemId:v.id,traceId:this.rootTrace.data.id})),c.text=`Evaluating dataset (${y+1}/${t} items, ${Math.round((y+1)/t*100)}%)`;}let g=(performance.now()-a)/1e3;return c.succeed(`Evaluation complete: ${t} items processed in ${g.toFixed(2)}s`),k.settings.minLevel=n,this.experiment.insert(e),await this.client.flush(),Yi.processResults(m,this.experiment,g)}async executeTask(a){let e={},o=[];k.debug(`Starting evaluation task on dataset item ${a.id}`),e=await Ee({name:"llm_task",type:ye.General},this.task)(a),k.debug(`Finished evaluation task on dataset item ${a.id}`);let t=this.prepareScoringInputs(a,e),n={traceId:this.rootTrace.data.id,datasetItemId:a.id,scoringInputs:t,taskOutput:e};return this.scoringMetrics.length>0?this.calculateScores(n):{testCase:n,scoreResults:o}}async calculateScores(a){let e=[],{scoringInputs:o}=a;for(let t of this.scoringMetrics){k.debug(`Calculating score for metric ${t.name}`);try{Kg(t,o);let n=await t.score(o),c=Array.isArray(n)?n:[n];e.push(...c);}catch(n){let c=n instanceof Error?n.message:String(n);k.error(`Metric ${t.name} failed: ${c}`);}k.debug(`Finished calculating score for metric ${t.name}`);}return e.forEach(t=>{var n;return (n=this.rootTrace)==null?void 0:n.score({name:t.name,value:t.value,reason:t.reason})}),{testCase:a,scoreResults:e}}prepareScoringInputs(a,e){let o={...a,...e};if(!this.scoringKeyMapping)return o;let t={...o};for(let[n,c]of Object.entries(this.scoringKeyMapping)){let m=Xg(o,c);m!==void 0&&(t[n]=m);}return t}};ud=_d(),Ed(ud,1,"calculateScores",Gg,lr),cn(ud,lr);var mr=class mr{static getInstance(a){return mr.instance||(mr.instance=new $e(a)),mr.instance}};mr.instance=null;var Zi=mr;async function $g(i){var o;if(!i.dataset)throw new Error("Dataset is required for evaluation");if(!i.task)throw new Error("Task function is required for evaluation");let a=(o=i.client)!=null?o:Zi.getInstance(),e=await a.createExperiment({name:i.experimentName,datasetName:i.dataset.name,experimentConfig:i.experimentConfig,prompts:i.prompts});try{let t=new lr(i,a,e);return k.info("Starting evaluation"),t.execute()}catch(t){throw k.error(`Error during evaluation: ${t}`),t}}var Qe=class{constructor(a){this.modelName=a;}};var Ia=class i extends Error{constructor(a){super(a),this.name="ModelError",Error.captureStackTrace&&Error.captureStackTrace(this,i);}},dr=class i extends Ia{constructor(e,o){super(e);this.cause=o;this.name="ModelGenerationError",Error.captureStackTrace&&Error.captureStackTrace(this,i);}},Me=class i extends Ia{constructor(a){super(a),this.name="ModelConfigurationError",Error.captureStackTrace&&Error.captureStackTrace(this,i);}};function Sx(i,a){return i.startsWith("gpt-")||i.startsWith("o1")||i.startsWith("o3")||i.startsWith("chatgpt-")}function _x(i,a){return i.startsWith("claude-")}function Tx(i,a){return i.startsWith("gemini-")||i.startsWith("gemma-")}function gd(i,a,e){if(!a)throw new Me(`API key for ${i} is not configured. Please provide it via the 'apiKey' option or set the ${e} environment variable.`)}function fd(i,a){if(Sx(i)){let e=(a==null?void 0:a.apiKey)||process.env.OPENAI_API_KEY;return gd("OpenAI",e,"OPENAI_API_KEY"),openai.createOpenAI({apiKey:e,...a})(i)}if(_x(i)){let e=(a==null?void 0:a.apiKey)||process.env.ANTHROPIC_API_KEY;return gd("Anthropic",e,"ANTHROPIC_API_KEY"),anthropic.createAnthropic({apiKey:e,...a})(i)}if(Tx(i)){let e=(a==null?void 0:a.apiKey)||process.env.GOOGLE_API_KEY;return gd("Google Gemini",e,"GOOGLE_API_KEY"),google.createGoogleGenerativeAI({apiKey:e,...a})(i)}throw new Me(`Unable to detect provider for model ID: ${i}. Supported providers are OpenAI (gpt-*, o1*, o3*, chatgpt-*), Anthropic (claude-*), and Google Gemini (gemini-*, gemma-*).`)}var Ax={inputTokens:"prompt_tokens",outputTokens:"completion_tokens",totalTokens:"total_tokens",reasoningTokens:"reasoning_tokens",cachedInputTokens:"cached_input_tokens"};function Ex(i){if(!i||typeof i!="object")return false;let a=i,e="usage"in a,o="response"in a,t="text"in a,n="object"in a;return e||o||t||n}function hd(i,a){if(!Ex(i))return {model:a};let e={model:Px(i,a)},o=Cx(i.usage);o&&(e.usage=o);let t=jx(i);t&&(e.provider=t);let n=Ux(i);n&&(e.metadata=n);let c=Dx(i);return c&&(e.output=c),e}function Px(i,a){var e,o;return (o=(e=i.response)==null?void 0:e.modelId)!=null?o:a}function Cx(i){if(!i)return;let a={};for(let[e,o]of Object.entries(Ax)){let t=i[e];t!==void 0&&(a[o]=t);}return Object.keys(a).length>0?a:void 0}function jx(i){if(!i.providerMetadata)return;let a=Object.keys(i.providerMetadata);return a.length>0?a[0]:void 0}function Ix(i){if(!i)return;let a={};return i.id&&(a.id=i.id),i.timestamp&&(a.timestamp=i.timestamp.toISOString()),Object.keys(a).length>0?a:void 0}function Ux(i){let a={};i.usage&&(a.usage=i.usage),i.warnings&&i.warnings.length>0&&(a.warnings=i.warnings);let e=Ix(i.response);return e&&(a.response=e),i.providerMetadata&&(a.providerMetadata=i.providerMetadata),i.finishReason&&(a.finishReason=i.finishReason),Object.keys(a).length>0?a:void 0}function Dx(i){let a={};return "text"in i&&i.text&&(a.text=i.text),"object"in i&&i.object!==void 0&&(a.object=i.object),"toolCalls"in i&&Array.isArray(i.toolCalls)&&(a.toolCalls=i.toolCalls),"toolResults"in i&&Array.isArray(i.toolResults)&&(a.toolResults=i.toolResults),"sources"in i&&Array.isArray(i.sources)&&(a.sources=i.sources),Object.keys(a).length>0?a:void 0}var ur=class extends Qe{constructor(a,e={trackGenerations:true}){let o=typeof a=="string"?a:a.modelId;super(o);let{trackGenerations:t,...n}=e;try{typeof a!="string"?(this.model=a,k.debug("Initialized VercelAIChatModel with custom LanguageModel")):(this.model=fd(a,n),k.debug(`Initialized VercelAIChatModel with model ID: ${a}`)),t?(this._generateText=Ee({name:"model.generateText",type:ye.Llm,enrichSpan:c=>hd(c,this.modelName)},ai$1.generateText),this._generateObject=Ee({name:"model.generateObject",type:ye.Llm,enrichSpan:c=>hd(c,this.modelName)},ai$1.generateObject)):(this._generateText=ai$1.generateText,this._generateObject=ai$1.generateObject);}catch(c){throw new Me(`Failed to initialize model ${o}: ${c instanceof Error?c.message:String(c)}`)}}async generateString(a,e,o){try{let t;if(e){k.debug(`Generating structured output with model ${this.modelName}, input length: ${a.length}`);let n=await this._generateObject({model:this.model,prompt:a,schema:e,...o});k.debug(`Generated structured output with model ${this.modelName}`),t=JSON.stringify(n.object);}else {k.debug(`Generating text with model ${this.modelName}, input length: ${a.length}`);let n=await this._generateText({model:this.model,prompt:a,...o});k.debug(`Generated text with model ${this.modelName}, output length: ${n.text.length}`),t=n.text;}return t}catch(t){let n=e?`Failed to generate structured output with model ${this.modelName}`:`Failed to generate text with model ${this.modelName}`;throw k.error(n,{error:t}),new dr(n,t instanceof Error?t:new Error(String(t)))}}async generateProviderResponse(a,e){try{k.debug(`Generating provider response with model ${this.modelName}, messages count: ${a.length}`);let o=await this._generateText({model:this.model,messages:a,...e});return k.debug(`Generated provider response with model ${this.modelName}`),o}catch(o){let t=`Failed to generate provider response with model ${this.modelName}`;throw k.error(t,{error:o}),new dr(t,o instanceof Error?o:new Error(String(o)))}}};var Zg="gpt-4o";function wd(i,a){return new ur(i,a)}function qg(i,a){return new ur(i,a)}function Nx(i){return i instanceof Qe}function Mx(i){return typeof i=="object"&&i!==null&&"modelId"in i&&typeof i.modelId=="string"}function Fx(i){return typeof i=="string"&&i.length>0}function Ox(i){let a=typeof i,e=a==="object"?JSON.stringify(i):String(i);return new Error(`Invalid model type. Expected one of:
18
+ `),k.info(Qi__default.default.blue("Uploading results to Opik ... "));}static async displayExperimentLink(a){let e=await a.getUrl();k.info(`View the results ${Na(e,"in your Opik dashboard")}`);}static async processResults(a,e,o=0){let t=this.calculateAverageScores(a);await this.generateResultTable(a,e,t,o),await this.displayExperimentLink(e);let n=await e.ensureNameLoaded();return {experimentId:e.id,experimentName:n,testResults:a}}};function Xg(i,a,e){if(!i||typeof a!="string"||a.trim()==="")return e;let o=a.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),t=i;for(let n of o)if(typeof t=="object"&&t!==null&&n in t)t=t[n];else return e;return t===void 0?e:t}var Gg,ud;Gg=[Ee({name:"metrics_calculation",type:ye.General})];var mr=class{constructor(a,e,o){Ad(ud,5,this);this.client=void 0;this.dataset=void 0;this.task=void 0;this.scoringMetrics=void 0;this.projectName=void 0;this.nbSamples=void 0;this.scoringKeyMapping=void 0;this.experiment=void 0;this.rootTrace=void 0;this.client=e,this.dataset=a.dataset,this.experiment=o,this.task=a.task,this.scoringMetrics=a.scoringMetrics||[],this.projectName=a.projectName,this.nbSamples=a.nbSamples,this.scoringKeyMapping=a.scoringKeyMapping;}async execute(){var R;let a=performance.now(),e=[],o=await this.dataset.getItems(this.nbSamples),t=o.length,n=k.settings.minLevel;k.settings.minLevel=6;let c=yx__default.default({text:`Evaluating dataset (0/${t} items)`}).start(),m=[];for(let y=0;y<o.length;y++){let v=o[y];try{this.rootTrace=this.client.trace({projectName:this.projectName,name:"evaluation_task",createdBy:"evaluation",input:v}),Ia.enterWith({trace:this.rootTrace});let z=await this.executeTask(v);m.push(z),this.rootTrace.update({output:z.testCase.taskOutput,endTime:new Date});}catch(z){let S=z instanceof Error?z.message:String(z);k.error(`Error processing dataset item: ${v.id} - ${S}`),z instanceof Error&&this.rootTrace.update({errorInfo:{message:z.message,exceptionType:z.name,traceback:(R=z.stack)!=null?R:""},endTime:new Date});}e.push(new Hi({datasetItemId:v.id,traceId:this.rootTrace.data.id})),c.text=`Evaluating dataset (${y+1}/${t} items, ${Math.round((y+1)/t*100)}%)`;}let g=(performance.now()-a)/1e3;return c.succeed(`Evaluation complete: ${t} items processed in ${g.toFixed(2)}s`),k.settings.minLevel=n,this.experiment.insert(e),await this.client.flush(),Yi.processResults(m,this.experiment,g)}async executeTask(a){let e={},o=[];k.debug(`Starting evaluation task on dataset item ${a.id}`),e=await Ee({name:"llm_task",type:ye.General},this.task)(a),k.debug(`Finished evaluation task on dataset item ${a.id}`);let t=this.prepareScoringInputs(a,e),n={traceId:this.rootTrace.data.id,datasetItemId:a.id,scoringInputs:t,taskOutput:e};return this.scoringMetrics.length>0?this.calculateScores(n):{testCase:n,scoreResults:o}}async calculateScores(a){let e=[],{scoringInputs:o}=a;for(let t of this.scoringMetrics){k.debug(`Calculating score for metric ${t.name}`);try{Kg(t,o);let n=await t.score(o),c=Array.isArray(n)?n:[n];e.push(...c);}catch(n){let c=n instanceof Error?n.message:String(n);k.error(`Metric ${t.name} failed: ${c}`);}k.debug(`Finished calculating score for metric ${t.name}`);}return e.forEach(t=>{var n;return (n=this.rootTrace)==null?void 0:n.score({name:t.name,value:t.value,reason:t.reason})}),{testCase:a,scoreResults:e}}prepareScoringInputs(a,e){let o={...a,...e};if(!this.scoringKeyMapping)return o;let t={...o};for(let[n,c]of Object.entries(this.scoringKeyMapping)){let m=Xg(o,c);m!==void 0&&(t[n]=m);}return t}};ud=_d(),Ed(ud,1,"calculateScores",Gg,mr),cn(ud,mr);var dr=class dr{static getInstance(a){return dr.instance||(dr.instance=new $e(a)),dr.instance}};dr.instance=null;var Zi=dr;async function $g(i){var o;if(!i.dataset)throw new Error("Dataset is required for evaluation");if(!i.task)throw new Error("Task function is required for evaluation");let a=(o=i.client)!=null?o:Zi.getInstance(),e=await a.createExperiment({name:i.experimentName,datasetName:i.dataset.name,experimentConfig:i.experimentConfig,prompts:i.prompts});try{let t=new mr(i,a,e);return k.info("Starting evaluation"),t.execute()}catch(t){throw k.error(`Error during evaluation: ${t}`),t}}var Qe=class{constructor(a){this.modelName=a;}};var ja=class i extends Error{constructor(a){super(a),this.name="ModelError",Error.captureStackTrace&&Error.captureStackTrace(this,i);}},ur=class i extends ja{constructor(e,o){super(e);this.cause=o;this.name="ModelGenerationError",Error.captureStackTrace&&Error.captureStackTrace(this,i);}},Me=class i extends ja{constructor(a){super(a),this.name="ModelConfigurationError",Error.captureStackTrace&&Error.captureStackTrace(this,i);}};function Sx(i,a){return i.startsWith("gpt-")||i.startsWith("o1")||i.startsWith("o3")||i.startsWith("chatgpt-")}function _x(i,a){return i.startsWith("claude-")}function Tx(i,a){return i.startsWith("gemini-")||i.startsWith("gemma-")}function gd(i,a,e){if(!a)throw new Me(`API key for ${i} is not configured. Please provide it via the 'apiKey' option or set the ${e} environment variable.`)}function fd(i,a){if(Sx(i)){let e=(a==null?void 0:a.apiKey)||process.env.OPENAI_API_KEY;return gd("OpenAI",e,"OPENAI_API_KEY"),openai.createOpenAI({apiKey:e,...a})(i)}if(_x(i)){let e=(a==null?void 0:a.apiKey)||process.env.ANTHROPIC_API_KEY;return gd("Anthropic",e,"ANTHROPIC_API_KEY"),anthropic.createAnthropic({apiKey:e,...a})(i)}if(Tx(i)){let e=(a==null?void 0:a.apiKey)||process.env.GOOGLE_API_KEY;return gd("Google Gemini",e,"GOOGLE_API_KEY"),google.createGoogleGenerativeAI({apiKey:e,...a})(i)}throw new Me(`Unable to detect provider for model ID: ${i}. Supported providers are OpenAI (gpt-*, o1*, o3*, chatgpt-*), Anthropic (claude-*), and Google Gemini (gemini-*, gemma-*).`)}var Ax={inputTokens:"prompt_tokens",outputTokens:"completion_tokens",totalTokens:"total_tokens",reasoningTokens:"reasoning_tokens",cachedInputTokens:"cached_input_tokens"};function Ex(i){if(!i||typeof i!="object")return false;let a=i,e="usage"in a,o="response"in a,t="text"in a,n="object"in a;return e||o||t||n}function hd(i,a){if(!Ex(i))return {model:a};let e={model:Px(i,a)},o=Cx(i.usage);o&&(e.usage=o);let t=Ix(i);t&&(e.provider=t);let n=Ux(i);n&&(e.metadata=n);let c=Dx(i);return c&&(e.output=c),e}function Px(i,a){var e,o;return (o=(e=i.response)==null?void 0:e.modelId)!=null?o:a}function Cx(i){if(!i)return;let a={};for(let[e,o]of Object.entries(Ax)){let t=i[e];t!==void 0&&(a[o]=t);}return Object.keys(a).length>0?a:void 0}function Ix(i){if(!i.providerMetadata)return;let a=Object.keys(i.providerMetadata);return a.length>0?a[0]:void 0}function jx(i){if(!i)return;let a={};return i.id&&(a.id=i.id),i.timestamp&&(a.timestamp=i.timestamp.toISOString()),Object.keys(a).length>0?a:void 0}function Ux(i){let a={};i.usage&&(a.usage=i.usage),i.warnings&&i.warnings.length>0&&(a.warnings=i.warnings);let e=jx(i.response);return e&&(a.response=e),i.providerMetadata&&(a.providerMetadata=i.providerMetadata),i.finishReason&&(a.finishReason=i.finishReason),Object.keys(a).length>0?a:void 0}function Dx(i){let a={};return "text"in i&&i.text&&(a.text=i.text),"object"in i&&i.object!==void 0&&(a.object=i.object),"toolCalls"in i&&Array.isArray(i.toolCalls)&&(a.toolCalls=i.toolCalls),"toolResults"in i&&Array.isArray(i.toolResults)&&(a.toolResults=i.toolResults),"sources"in i&&Array.isArray(i.sources)&&(a.sources=i.sources),Object.keys(a).length>0?a:void 0}var gr=class extends Qe{constructor(a,e={trackGenerations:true}){let o=typeof a=="string"?a:a.modelId;super(o);let{trackGenerations:t,...n}=e;try{typeof a!="string"?(this.model=a,k.debug("Initialized VercelAIChatModel with custom LanguageModel")):(this.model=fd(a,n),k.debug(`Initialized VercelAIChatModel with model ID: ${a}`)),t?(this._generateText=Ee({name:"model.generateText",type:ye.Llm,enrichSpan:c=>hd(c,this.modelName)},ai$1.generateText),this._generateObject=Ee({name:"model.generateObject",type:ye.Llm,enrichSpan:c=>hd(c,this.modelName)},ai$1.generateObject)):(this._generateText=ai$1.generateText,this._generateObject=ai$1.generateObject);}catch(c){throw new Me(`Failed to initialize model ${o}: ${c instanceof Error?c.message:String(c)}`)}}async generateString(a,e,o){try{let t;if(e){k.debug(`Generating structured output with model ${this.modelName}, input length: ${a.length}`);let n=await this._generateObject({model:this.model,prompt:a,schema:e,...o});k.debug(`Generated structured output with model ${this.modelName}`),t=JSON.stringify(n.object);}else {k.debug(`Generating text with model ${this.modelName}, input length: ${a.length}`);let n=await this._generateText({model:this.model,prompt:a,...o});k.debug(`Generated text with model ${this.modelName}, output length: ${n.text.length}`),t=n.text;}return t}catch(t){let n=e?`Failed to generate structured output with model ${this.modelName}`:`Failed to generate text with model ${this.modelName}`;throw k.error(n,{error:t}),new ur(n,t instanceof Error?t:new Error(String(t)))}}async generateProviderResponse(a,e){try{k.debug(`Generating provider response with model ${this.modelName}, messages count: ${a.length}`);let o=await this._generateText({model:this.model,messages:a,...e});return k.debug(`Generated provider response with model ${this.modelName}`),o}catch(o){let t=`Failed to generate provider response with model ${this.modelName}`;throw k.error(t,{error:o}),new ur(t,o instanceof Error?o:new Error(String(o)))}}};var Zg="gpt-4o";function wd(i,a){return new gr(i,a)}function qg(i,a){return new gr(i,a)}function Nx(i){return i instanceof Qe}function Mx(i){return typeof i=="object"&&i!==null&&"modelId"in i&&typeof i.modelId=="string"}function Fx(i){return typeof i=="string"&&i.length>0}function Ox(i){let a=typeof i,e=a==="object"?JSON.stringify(i):String(i);return new Error(`Invalid model type. Expected one of:
19
19
  - string (model ID like 'gpt-4o', 'claude-3-5-sonnet-latest')
20
20
  - LanguageModel instance from Vercel AI SDK
21
21
  - OpikBaseModel instance
@@ -355,4 +355,4 @@ mime-types/index.js:
355
355
  * Copyright(c) 2015 Douglas Christopher Wilson
356
356
  * MIT Licensed
357
357
  *)
358
- */Object.defineProperty(exports,"z",{enumerable:true,get:function(){return zod.z}});exports.AnswerRelevance=nn;exports.BaseLLMJudgeMetric=xe;exports.BaseMetric=ue;exports.Contains=af;exports.ExactMatch=of;exports.Hallucination=tn;exports.IsJson=sf;exports.ModelConfigurationError=Me;exports.ModelError=Ia;exports.ModelGenerationError=dr;exports.Moderation=on;exports.Opik=$e;exports.OpikBaseModel=Qe;exports.OpikQueryLanguage=Ne;exports.OpikSpanType=ye;exports.Prompt=Ue;exports.PromptType=be;exports.RegexMatch=tf;exports.Usefulness=an;exports.VercelAIChatModel=ur;exports.createModel=wd;exports.createModelFromInstance=qg;exports.detectProvider=fd;exports.disableLogger=If;exports.evaluate=$g;exports.evaluatePrompt=fne;exports.flushAll=bx;exports.generateId=re;exports.getTrackContext=gx;exports.logger=k;exports.resolveModel=Ua;exports.setLoggerLevel=Pd;exports.track=Ee;
358
+ */Object.defineProperty(exports,"z",{enumerable:true,get:function(){return zod.z}});exports.AnswerRelevance=nn;exports.BaseLLMJudgeMetric=xe;exports.BaseMetric=ue;exports.Contains=af;exports.ExactMatch=of;exports.Hallucination=tn;exports.IsJson=sf;exports.ModelConfigurationError=Me;exports.ModelError=ja;exports.ModelGenerationError=ur;exports.Moderation=on;exports.Opik=$e;exports.OpikBaseModel=Qe;exports.OpikQueryLanguage=Ne;exports.OpikSpanType=ye;exports.Prompt=Ue;exports.PromptType=be;exports.RegexMatch=tf;exports.Usefulness=an;exports.VercelAIChatModel=gr;exports.createModel=wd;exports.createModelFromInstance=qg;exports.detectProvider=fd;exports.disableLogger=jf;exports.evaluate=$g;exports.evaluatePrompt=fne;exports.flushAll=bx;exports.generateId=re;exports.getTrackContext=gx;exports.logger=k;exports.resolveModel=Ua;exports.setLoggerLevel=Pd;exports.track=Ee;