opik 1.9.40 → 1.9.42
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 +27 -27
- package/dist/index.d.cts +54 -2
- package/dist/index.d.ts +54 -2
- package/dist/index.js +25 -25
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),_u=require('fs'),Ch=require('ini');require('dotenv/config');var _b=require('qs'),uuid=require('uuid'),iR=require('fast-json-stable-stringify'),tR=require('xxhash-wasm'),util=require('util'),cR=require('mustache'),dR=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),fR=require('fast-deep-equal'),async_hooks=require('async_hooks'),mn=require('chalk'),_R=require('boxen'),TR=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 _u__default=/*#__PURE__*/_interopDefault(_u);var Ch__default=/*#__PURE__*/_interopDefault(Ch);var _b__default=/*#__PURE__*/_interopDefault(_b);var iR__default=/*#__PURE__*/_interopDefault(iR);var tR__default=/*#__PURE__*/_interopDefault(tR);var cR__default=/*#__PURE__*/_interopDefault(cR);var dR__default=/*#__PURE__*/_interopDefault(dR);var fR__default=/*#__PURE__*/_interopDefault(fR);var mn__default=/*#__PURE__*/_interopDefault(mn);var _R__default=/*#__PURE__*/_interopDefault(_R);var TR__default=/*#__PURE__*/_interopDefault(TR);var bu=Object.create;var mr=Object.defineProperty;var xu=Object.getOwnPropertyDescriptor;var bh=Object.getOwnPropertyNames;var xh=Object.getPrototypeOf,Rh=Object.prototype.hasOwnProperty;var Ru=(a,t)=>(t=Symbol[a])?t:Symbol.for("Symbol."+a),Cr=a=>{throw TypeError(a)};var yh=(a,t,e)=>t in a?mr(a,t,{enumerable:true,configurable:true,writable:true,value:e}):a[t]=e;var ue=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(t,e)=>(typeof require!="undefined"?require:t)[e]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var kn=(a,t)=>()=>(a&&(t=a(a=0)),t);var Y=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),E=(a,t)=>{for(var e in t)mr(a,e,{get:t[e],enumerable:true});},kh=(a,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of bh(t))!Rh.call(a,i)&&i!==e&&mr(a,i,{get:()=>t[i],enumerable:!(o=xu(t,i))||o.enumerable});return a};var zh=(a,t,e)=>(e=a!=null?bu(xh(a)):{},kh(mr(e,"default",{value:a,enumerable:true}),a));var yu=a=>{var t;return [,,,bu((t=void 0)!=null?t:null)]},ku=["class","method","getter","setter","accessor","field","value","get","set"],Pr=a=>a!==void 0&&typeof a!="function"?Cr("Function expected"):a,vh=(a,t,e,o,i)=>({kind:ku[a],name:t,metadata:o,addInitializer:n=>e._?Cr("Already initialized"):i.push(Pr(n||null))}),zn=(a,t)=>yh(t,Ru("metadata"),a[3]),zu=(a,t,e,o)=>{for(var i=0,n=a[t>>1],c=n&&n.length;i<c;i++)n[i].call(e);return o},vu=(a,t,e,o,i,n)=>{var m,u,g,f,y=t&7,z=false,v=false,S=2,O=ku[y+5],G=a[S]||(a[S]=[]),te=((i=i.prototype),xu(i,e));for(var lr=o.length-1;lr>=0;lr--)g=vh(y,e,u={},a[3],G),(g.static=z,g.private=v,f=g.access={has:pe=>e in pe},(f.get=pe=>pe[e]),y>2),m=(0, o[lr])(te[O],g),u._=1,Pr(m)&&(te[O]=m);return te&&mr(i,e,te),i};var ig={};E(ig,{Node18UniversalStreamWrapper:()=>Ln});var Ln,ag=kn(()=>{Ln=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.on("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.on("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.off("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.off("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);});}destroy(t){this.reader.cancel(t).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:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var ng={};E(ng,{UndiciStreamWrapper:()=>Vn});var Vn,sg=kn(()=>{Vn=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.on("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.on("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.off("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.off("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);});}destroy(t){this.reader.cancel(t).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:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var pg={};E(pg,{NodePre18StreamWrapper:()=>Hn});var Hn,cg=kn(()=>{Hn=class{constructor(t){this.readableStream=t;}on(t,e){this.readableStream.on(t,e);}off(t,e){this.readableStream.off(t,e);}pipe(t){return this.readableStream.pipe(t),t}pipeTo(t){return this.pipe(t)}unpipe(t){t?this.readableStream.unpipe(t):this.readableStream.unpipe();}destroy(t){this.readableStream.destroy(t);}pause(){this.readableStream.pause();}resume(){this.readableStream.resume();}get isPaused(){return this.readableStream.isPaused()}async read(){return new Promise((t,e)=>{let o=this.readableStream.read();o?t(o):(this.readableStream.once("readable",()=>{let i=this.readableStream.read();t(i);}),this.readableStream.once("error",e));})}setEncoding(t){this.readableStream.setEncoding(t),this.encoding=t;}async text(){let t=[],e=new TextEncoder;this.readableStream.setEncoding(this.encoding||"utf-8");for await(let i of this.readableStream)t.push(e.encode(i));return new TextDecoder(this.encoding||"utf-8").decode(Buffer.concat(t))}async json(){let t=await this.text();return JSON.parse(t)}[Symbol.asyncIterator](){let e=this.readableStream[Symbol.asyncIterator]();return {async next(){let{value:o,done:i}=await e.next();return {value:o,done:i}},[Symbol.asyncIterator](){return this}}}};});var bg=Y((lD,wg)=>{var hg=ue("stream").Stream,Cb=ue("util");wg.exports=we;function we(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=true,this._maxDataSizeExceeded=false,this._released=false,this._bufferedEvents=[];}Cb.inherits(we,hg);we.create=function(a,t){var e=new this;t=t||{};for(var o in t)e[o]=t[o];e.source=a;var i=a.emit;return a.emit=function(){return e._handleEmit(arguments),i.apply(a,arguments)},a.on("error",function(){}),e.pauseStream&&a.pause(),e};Object.defineProperty(we.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});we.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};we.prototype.resume=function(){this._released||this.release(),this.source.resume();};we.prototype.pause=function(){this.source.pause();};we.prototype.release=function(){this._released=true,this._bufferedEvents.forEach(function(a){this.emit.apply(this,a);}.bind(this)),this._bufferedEvents=[];};we.prototype.pipe=function(){var a=hg.prototype.pipe.apply(this,arguments);return this.resume(),a};we.prototype._handleEmit=function(a){if(this._released){this.emit.apply(this,a);return}a[0]==="data"&&(this.dataSize+=a[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(a);};we.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=true;var a="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(a));}};});var kg=Y((mD,yg)=>{var jb=ue("util"),Rg=ue("stream").Stream,xg=bg();yg.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;}jb.inherits(V,Rg);V.create=function(a){var t=new this;a=a||{};for(var e in a)t[e]=a[e];return t};V.isStreamLike=function(a){return typeof a!="function"&&typeof a!="string"&&typeof a!="boolean"&&typeof a!="number"&&!Buffer.isBuffer(a)};V.prototype.append=function(a){var t=V.isStreamLike(a);if(t){if(!(a instanceof xg)){var e=xg.create(a,{maxDataSize:1/0,pauseStream:this.pauseStreams});a.on("data",this._checkDataSize.bind(this)),a=e;}this._handleErrors(a),this.pauseStreams&&a.pause();}return this._streams.push(a),this};V.prototype.pipe=function(a,t){return Rg.prototype.pipe.call(this,a,t),this.resume(),a};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 a=this._streams.shift();if(typeof a=="undefined"){this.end();return}if(typeof a!="function"){this._pipeNext(a);return}var t=a;t(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(a){this._currentStream=a;var t=V.isStreamLike(a);if(t){a.on("end",this._getNext.bind(this)),a.pipe(this,{end:false});return}var e=a;this.write(e),this._getNext();};V.prototype._handleErrors=function(a){var t=this;a.on("error",function(e){t._emitError(e);});};V.prototype.write=function(a){this.emit("data",a);};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 a="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(a));}};V.prototype._updateDataSize=function(){this.dataSize=0;var a=this;this._streams.forEach(function(t){t.dataSize&&(a.dataSize+=t.dataSize);}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize);};V.prototype._emitError=function(a){this._reset(),this.emit("error",a);};});var zg=Y((dD,Ib)=>{Ib.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 Sg=Y((uD,vg)=>{vg.exports=zg();});var Ag=Y(ie=>{var di=Sg(),Ub=ue("path").extname,_g=/^\s*([^;\s]*)(?:;|\s|$)/,Db=/^text\//i;ie.charset=Tg;ie.charsets={lookup:Tg};ie.contentType=Nb;ie.extension=Mb;ie.extensions=Object.create(null);ie.lookup=Fb;ie.types=Object.create(null);Ob(ie.extensions,ie.types);function Tg(a){if(!a||typeof a!="string")return false;var t=_g.exec(a),e=t&&di[t[1].toLowerCase()];return e&&e.charset?e.charset:t&&Db.test(t[1])?"UTF-8":false}function Nb(a){if(!a||typeof a!="string")return false;var t=a.indexOf("/")===-1?ie.lookup(a):a;if(!t)return false;if(t.indexOf("charset")===-1){var e=ie.charset(t);e&&(t+="; charset="+e.toLowerCase());}return t}function Mb(a){if(!a||typeof a!="string")return false;var t=_g.exec(a),e=t&&ie.extensions[t[1].toLowerCase()];return !e||!e.length?false:e[0]}function Fb(a){if(!a||typeof a!="string")return false;var t=Ub("x."+a).toLowerCase().substr(1);return t&&ie.types[t]||false}function Ob(a,t){var e=["nginx","apache",void 0,"iana"];Object.keys(di).forEach(function(i){var n=di[i],c=n.extensions;if(!(!c||!c.length)){a[i]=c;for(var m=0;m<c.length;m++){var u=c[m];if(t[u]){var g=e.indexOf(di[t[u]].source),f=e.indexOf(n.source);if(t[u]!=="application/octet-stream"&&(g>f||g===f&&t[u].substr(0,12)==="application/"))continue}t[u]=i;}}});}});var Pg=Y((fD,Eg)=>{Eg.exports=Wb;function Wb(a){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(a):setTimeout(a,0);}});var Jn=Y((hD,jg)=>{var Cg=Pg();jg.exports=Bb;function Bb(a){var t=false;return Cg(function(){t=true;}),function(o,i){t?a(o,i):Cg(function(){a(o,i);});}}});var Xn=Y((wD,Ig)=>{Ig.exports=Lb;function Lb(a){Object.keys(a.jobs).forEach(Vb.bind(a)),a.jobs={};}function Vb(a){typeof this.jobs[a]=="function"&&this.jobs[a]();}});var Kn=Y((bD,Dg)=>{var Ug=Jn(),Hb=Xn();Dg.exports=Jb;function Jb(a,t,e,o){var i=e.keyedList?e.keyedList[e.index]:e.index;e.jobs[i]=Xb(t,i,a[i],function(n,c){i in e.jobs&&(delete e.jobs[i],n?Hb(e):e.results[i]=c,o(n,e.results));});}function Xb(a,t,e,o){var i;return a.length==2?i=a(e,Ug(o)):i=a(e,t,Ug(o)),i}});var Gn=Y((xD,Ng)=>{Ng.exports=Kb;function Kb(a,t){var e=!Array.isArray(a),o={index:0,keyedList:e||t?Object.keys(a):null,jobs:{},results:e?{}:[],size:e?Object.keys(a).length:a.length};return t&&o.keyedList.sort(e?t:function(i,n){return t(a[i],a[n])}),o}});var $n=Y((RD,Mg)=>{var Gb=Xn(),$b=Jn();Mg.exports=Qb;function Qb(a){Object.keys(this.jobs).length&&(this.index=this.size,Gb(this),$b(a)(null,this.results));}});var Og=Y((yD,Fg)=>{var Yb=Kn(),Zb=Gn(),qb=$n();Fg.exports=ex;function ex(a,t,e){for(var o=Zb(a);o.index<(o.keyedList||a).length;)Yb(a,t,o,function(i,n){if(i){e(i,n);return}if(Object.keys(o.jobs).length===0){e(null,o.results);return}}),o.index++;return qb.bind(o,e)}});var Qn=Y((kD,ui)=>{var Wg=Kn(),rx=Gn(),ox=$n();ui.exports=tx;ui.exports.ascending=Bg;ui.exports.descending=ix;function tx(a,t,e,o){var i=rx(a,e);return Wg(a,t,i,function n(c,m){if(c){o(c,m);return}if(i.index++,i.index<(i.keyedList||a).length){Wg(a,t,i,n);return}o(null,i.results);}),ox.bind(i,o)}function Bg(a,t){return a<t?-1:a>t?1:0}function ix(a,t){return -1*Bg(a,t)}});var Vg=Y((zD,Lg)=>{var ax=Qn();Lg.exports=nx;function nx(a,t,e){return ax(a,t,null,e)}});var Jg=Y((vD,Hg)=>{Hg.exports={parallel:Og(),serial:Vg(),serialOrdered:Qn()};});var Kg=Y((SD,Xg)=>{Xg.exports=function(a,t){return Object.keys(t).forEach(function(e){a[e]=a[e]||t[e];}),a};});var $g=Y((_D,Gg)=>{var es=kg(),sx=ue("util"),Yn=ue("path"),px=ue("http"),cx=ue("https"),lx=ue("url").parse,mx=ue("fs"),dx=ue("stream").Stream,Zn=Ag(),ux=Jg(),qn=Kg();Gg.exports=C;sx.inherits(C,es);function C(a){if(!(this instanceof C))return new C(a);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],es.call(this),a=a||{};for(var t in a)this[t]=a[t];}C.LINE_BREAK=`\r
|
|
2
|
-
`;C.DEFAULT_CONTENT_TYPE="application/octet-stream";C.prototype.append=function(a,t,e){e=e||{},typeof e=="string"&&(e={filename:e});var o=es.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(a,t,e),n=this._multiPartFooter();o(i),o(t),o(n),this._trackLength(i,t,e);};C.prototype._trackLength=function(a,t,e){var o=0;e.knownLength!=null?o+=+e.knownLength:Buffer.isBuffer(t)?o=t.length:typeof t=="string"&&(o=Buffer.byteLength(t)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(a)+C.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof dx))&&(e.knownLength||this._valuesToMeasure.push(t));};C.prototype._lengthRetriever=function(a,t){a.hasOwnProperty("fd")?a.end!=null&&a.end!=1/0&&a.start!=null?t(null,a.end+1-(a.start?a.start:0)):mx.stat(a.path,function(e,o){var i;if(e){t(e);return}i=o.size-(a.start?a.start:0),t(null,i);}):a.hasOwnProperty("httpVersion")?t(null,+a.headers["content-length"]):a.hasOwnProperty("httpModule")?(a.on("response",function(e){a.pause(),t(null,+e.headers["content-length"]);}),a.resume()):t("Unknown stream");};C.prototype._multiPartHeader=function(a,t,e){if(typeof e.header=="string")return e.header;var o=this._getContentDisposition(t,e),i=this._getContentType(t,e),n="",c={"Content-Disposition":["form-data",'name="'+a+'"'].concat(o||[]),"Content-Type":[].concat(i||[])};typeof e.header=="object"&&qn(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("; ")+C.LINE_BREAK)));return "--"+this.getBoundary()+C.LINE_BREAK+n+C.LINE_BREAK};C.prototype._getContentDisposition=function(a,t){var e,o;return typeof t.filepath=="string"?e=Yn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||a.name||a.path?e=Yn.basename(t.filename||a.name||a.path):a.readable&&a.hasOwnProperty("httpVersion")&&(e=Yn.basename(a.client._httpMessage.path||"")),e&&(o='filename="'+e+'"'),o};C.prototype._getContentType=function(a,t){var e=t.contentType;return !e&&a.name&&(e=Zn.lookup(a.name)),!e&&a.path&&(e=Zn.lookup(a.path)),!e&&a.readable&&a.hasOwnProperty("httpVersion")&&(e=a.headers["content-type"]),!e&&(t.filepath||t.filename)&&(e=Zn.lookup(t.filepath||t.filename)),!e&&typeof a=="object"&&(e=C.DEFAULT_CONTENT_TYPE),e};C.prototype._multiPartFooter=function(){return function(a){var t=C.LINE_BREAK,e=this._streams.length===0;e&&(t+=this._lastBoundary()),a(t);}.bind(this)};C.prototype._lastBoundary=function(){return "--"+this.getBoundary()+"--"+C.LINE_BREAK};C.prototype.getHeaders=function(a){var t,e={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in a)a.hasOwnProperty(t)&&(e[t.toLowerCase()]=a[t]);return e};C.prototype.setBoundary=function(a){this._boundary=a;};C.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};C.prototype.getBuffer=function(){for(var a=new Buffer.alloc(0),t=this.getBoundary(),e=0,o=this._streams.length;e<o;e++)typeof this._streams[e]!="function"&&(Buffer.isBuffer(this._streams[e])?a=Buffer.concat([a,this._streams[e]]):a=Buffer.concat([a,Buffer.from(this._streams[e])]),(typeof this._streams[e]!="string"||this._streams[e].substring(2,t.length+2)!==t)&&(a=Buffer.concat([a,Buffer.from(C.LINE_BREAK)])));return Buffer.concat([a,Buffer.from(this._lastBoundary())])};C.prototype._generateBoundary=function(){for(var a="--------------------------",t=0;t<24;t++)a+=Math.floor(Math.random()*10).toString(16);this._boundary=a;};C.prototype.getLengthSync=function(){var a=this._overheadLength+this._valueLength;return this._streams.length&&(a+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),a};C.prototype.hasKnownLength=function(){var a=true;return this._valuesToMeasure.length&&(a=false),a};C.prototype.getLength=function(a){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(a.bind(this,null,t));return}ux.parallel(this._valuesToMeasure,this._lengthRetriever,function(e,o){if(e){a(e);return}o.forEach(function(i){t+=i;}),a(null,t);});};C.prototype.submit=function(a,t){var e,o,i={method:"post"};return typeof a=="string"?(a=lx(a),o=qn({port:a.port,path:a.pathname,host:a.hostname,protocol:a.protocol},i)):(o=qn(a,i),o.port||(o.port=o.protocol=="https:"?443:80)),o.headers=this.getHeaders(a.headers),o.protocol=="https:"?e=cx.request(o):e=px.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),t){var m,u=function(g,f){return e.removeListener("error",u),e.removeListener("response",m),t.call(this,g,f)};m=u.bind(this,null),e.on("error",u),e.on("response",m);}}.bind(this)),e};C.prototype._error=function(a){this.error||(this.error=a,this.pause(),this.emit("error",a));};C.prototype.toString=function(){return "[object FormData]"};});var Eh={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};function Zt(a,t=a){return ansiEscapes.link(t,a)}var k=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),Su=a=>{k.settings.minLevel=Eh[a];},Ph=()=>{k.settings.minLevel=100;};Su(process.env.OPIK_LOG_LEVEL||"INFO");var jh="~/.opik.config",Sn={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false};function Tu(a){return Object.fromEntries(Object.entries(a).filter(([,t])=>t!==void 0))}function Ih(){return Tu({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 Uh(){let a=process.env.OPIK_CONFIG_PATH||jh;if(!_u__default.default.existsSync(a)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${a}`);return {}}try{let t=Ch__default.default.parse(_u__default.default.readFileSync(a,"utf8"));return t.opik?Tu({apiKey:t.opik.api_key,apiUrl:t.opik.url_override,projectName:t.opik.project_name,workspaceName:t.opik.workspace}):{}}catch(t){return k.error(`Error loading config file ${a}: ${t}`),{}}}function Au(a){let t=Ih(),e=Uh(),{headers:o,...i}=a||{};return Dh({...Sn,...e,...t,...i})}function Dh(a){if(!a.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");let t=Nh(a.apiUrl);if(t&&!a.apiKey)throw new Error("OPIK_API_KEY is not set");if(t&&!a.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return a}function Nh(a){return new URL(a).hostname.endsWith("comet.com")}var X={};E(X,{AlertAlertType:()=>Mh,AlertPublicAlertType:()=>Jh,AlertTriggerConfigPublicType:()=>Vh,AlertTriggerConfigType:()=>Oh,AlertTriggerConfigWriteType:()=>Wh,AlertTriggerEventType:()=>Fh,AlertTriggerPublicEventType:()=>Hh,AlertTriggerWriteEventType:()=>Bh,AlertWriteAlertType:()=>Lh,AnnotationQueuePublicScope:()=>$h,AnnotationQueueScope:()=>Kh,AnnotationQueueWriteScope:()=>Gh,AssistantMessageRole:()=>gw,AttachmentListRequestEntityType:()=>Pu,BadRequestError:()=>T,CheckName:()=>Dw,CheckPublicName:()=>Rb,CheckPublicResult:()=>yb,CheckResult:()=>Nw,ColumnCompareTypesItem:()=>zw,ColumnPublicTypesItem:()=>jw,ColumnTypesItem:()=>Iw,CompleteMultipartUploadRequestEntityType:()=>Qh,ConflictError:()=>F,CreatePromptVersionDetailTemplateStructure:()=>$u,DatasetItemCompareSource:()=>vw,DatasetItemFilterOperator:()=>hw,DatasetItemPublicSource:()=>Pw,DatasetItemSource:()=>xw,DatasetItemWriteSource:()=>Wn,DatasetPublicStatus:()=>Ew,DatasetPublicVisibility:()=>Aw,DatasetStatus:()=>bw,DatasetUpdateVisibility:()=>Du,DatasetVisibility:()=>ww,DatasetWriteVisibility:()=>Uu,DeleteAttachmentsRequestEntityType:()=>Yh,DownloadAttachmentRequestEntityType:()=>Cu,ExperimentItemCompareTraceVisibilityMode:()=>Sw,ExperimentItemPublicTraceVisibilityMode:()=>Cw,ExperimentItemTraceVisibilityMode:()=>Rw,ExperimentPublicStatus:()=>Lw,ExperimentPublicType:()=>Bw,ExperimentStatus:()=>Uw,ExperimentType:()=>Bn,ExperimentUpdateStatus:()=>Ou,ExperimentUpdateType:()=>Fu,ExperimentWriteStatus:()=>Mu,ExperimentWriteType:()=>Nu,FeedbackScoreBatchItemSource:()=>xb,FeedbackScoreBatchItemThreadSource:()=>vb,FeedbackScoreCompareSource:()=>_w,FeedbackScoreExperimentItemBulkWriteViewSource:()=>Fw,FeedbackScorePublicSource:()=>hb,FeedbackScoreSource:()=>yw,FindFeedbackDefinitionsRequestType:()=>Wu,FindFeedbackScoreNames1RequestType:()=>Yu,ForbiddenError:()=>Z,GetSpanStatsRequestType:()=>Zu,GetSpansByProjectRequestType:()=>Qu,GetWebhookExamplesRequestAlertType:()=>Eu,GuardrailName:()=>Vw,GuardrailResult:()=>Hw,GuardrailWriteName:()=>Jw,GuardrailWriteResult:()=>Xw,LlmAsJudgeMessagePublicRole:()=>pw,LlmAsJudgeMessageRole:()=>Zh,LlmAsJudgeMessageWriteRole:()=>tw,LlmAsJudgeOutputSchemaPublicType:()=>cw,LlmAsJudgeOutputSchemaType:()=>qh,LlmAsJudgeOutputSchemaWriteType:()=>iw,LogItemLevel:()=>uw,ManualEvaluationRequestEntityType:()=>$w,NotFoundError:()=>_,NotImplementedError:()=>Ve,OptimizationPublicStatus:()=>Zw,OptimizationStatus:()=>Qw,OptimizationUpdateStatus:()=>Lu,OptimizationWriteStatus:()=>Yw,ProjectDetailedVisibility:()=>tb,ProjectMetricRequestPublicInterval:()=>Xu,ProjectMetricRequestPublicMetricType:()=>Ju,ProjectMetricResponsePublicInterval:()=>ob,ProjectMetricResponsePublicMetricType:()=>rb,ProjectPublicVisibility:()=>eb,ProjectUpdateVisibility:()=>Hu,ProjectVisibility:()=>qw,ProjectWriteVisibility:()=>Vu,PromptDetailTemplateStructure:()=>lb,PromptPublicTemplateStructure:()=>ub,PromptTemplateStructure:()=>ab,PromptType:()=>ib,PromptVersionDetailTemplateStructure:()=>cb,PromptVersionDetailType:()=>pb,PromptVersionPublicTemplateStructure:()=>db,PromptVersionPublicType:()=>mb,PromptVersionTemplateStructure:()=>sb,PromptVersionType:()=>nb,PromptWriteTemplateStructure:()=>Gu,PromptWriteType:()=>Ku,ProviderApiKeyProvider:()=>Gw,ProviderApiKeyPublicProvider:()=>Kw,ProviderApiKeyWriteProvider:()=>Bu,ResponseFormatType:()=>fw,SpanExperimentItemBulkWriteViewType:()=>Ow,SpanFilterOperator:()=>ew,SpanFilterPublicOperator:()=>lw,SpanFilterWriteOperator:()=>aw,SpanPublicType:()=>wb,SpanSearchStreamRequestPublicType:()=>qu,SpanType:()=>ve,SpanUpdateType:()=>gb,SpanWriteType:()=>fb,StartMultipartUploadRequestEntityType:()=>ju,TraceFilterOperator:()=>rw,TraceFilterPublicOperator:()=>mw,TraceFilterWriteOperator:()=>nw,TracePublicVisibilityMode:()=>kb,TraceThreadFilterOperator:()=>ow,TraceThreadFilterPublicOperator:()=>dw,TraceThreadFilterWriteOperator:()=>sw,TraceThreadStatus:()=>zb,TraceVisibilityMode:()=>Mw,UnauthorizedError:()=>$,UnprocessableEntityError:()=>L,UploadAttachmentRequestEntityType:()=>Iu,ValueEntryCompareSource:()=>Tw,ValueEntryExperimentItemBulkWriteViewSource:()=>Ww,ValueEntryPublicSource:()=>bb,ValueEntrySource:()=>kw,WebhookTestResultStatus:()=>Xh,alerts:()=>qt,annotationQueues:()=>Tn,attachments:()=>ei,automationRuleEvaluators:()=>En,chatCompletions:()=>Pn,check:()=>An,dashboards:()=>Cn,datasets:()=>ri,experiments:()=>oi,feedbackDefinitions:()=>ti,guardrails:()=>jn,llmProviderKey:()=>ii,manualEvaluation:()=>In,openTelemetryIngestion:()=>Un,optimizations:()=>ai,projects:()=>ni,prompts:()=>si,redirect:()=>On,serviceToggles:()=>Dn,spans:()=>pi,systemUsage:()=>_n,traces:()=>Nn,welcomeWizard:()=>Mn,workspaces:()=>Fn});var qt={};E(qt,{GetWebhookExamplesRequestAlertType:()=>Eu});var Eu={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var ei={};E(ei,{AttachmentListRequestEntityType:()=>Pu,DownloadAttachmentRequestEntityType:()=>Cu,StartMultipartUploadRequestEntityType:()=>ju,UploadAttachmentRequestEntityType:()=>Iu});var Pu={Trace:"trace",Span:"span"};var Cu={Trace:"trace",Span:"span"};var ju={Trace:"trace",Span:"span"};var Iu={Trace:"trace",Span:"span"};var ri={};E(ri,{DatasetUpdateVisibility:()=>Du,DatasetWriteVisibility:()=>Uu});var Uu={Private:"private",Public:"public"};var Du={Private:"private",Public:"public"};var oi={};E(oi,{ExperimentUpdateStatus:()=>Ou,ExperimentUpdateType:()=>Fu,ExperimentWriteStatus:()=>Mu,ExperimentWriteType:()=>Nu});var Nu={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Mu={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Fu={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Ou={Running:"running",Completed:"completed",Cancelled:"cancelled"};var ti={};E(ti,{FindFeedbackDefinitionsRequestType:()=>Wu});var Wu={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};var ii={};E(ii,{ProviderApiKeyWriteProvider:()=>Bu});var Bu={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var ai={};E(ai,{OptimizationUpdateStatus:()=>Lu});var Lu={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var ni={};E(ni,{ProjectMetricRequestPublicInterval:()=>Xu,ProjectMetricRequestPublicMetricType:()=>Ju,ProjectUpdateVisibility:()=>Hu,ProjectWriteVisibility:()=>Vu});var Vu={Private:"private",Public:"public"};var Hu={Private:"private",Public:"public"};var Ju={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 Xu={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var si={};E(si,{CreatePromptVersionDetailTemplateStructure:()=>$u,PromptWriteTemplateStructure:()=>Gu,PromptWriteType:()=>Ku});var Ku={Mustache:"mustache",Jinja2:"jinja2"};var Gu={Text:"text",Chat:"chat"};var $u={Text:"text",Chat:"chat"};var pi={};E(pi,{FindFeedbackScoreNames1RequestType:()=>Yu,GetSpanStatsRequestType:()=>Zu,GetSpansByProjectRequestType:()=>Qu,SpanSearchStreamRequestPublicType:()=>qu});var Qu={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Yu={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Zu={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var qu={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var _n={};var Tn={};var An={};var En={};var Pn={};var Cn={};var jn={};var In={};var Un={};var Dn={};var Nn={};var Mn={};var Fn={};var On={};var Mh={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Fh={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 Oh={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Wh={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Bh={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 Lh={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Vh={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Hh={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 Jh={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Xh={Success:"success",Failure:"failure"};var Kh={Trace:"trace",Thread:"thread"};var Gh={Trace:"trace",Thread:"thread"};var $h={Trace:"trace",Thread:"thread"};var Qh={Trace:"trace",Span:"span"};var Yh={Trace:"trace",Span:"span"};var Zh={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var qh={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};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={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 ow={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 tw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var iw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var aw={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 nw={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 sw={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 pw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var cw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var lw={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 mw={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 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={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};var gw={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};var fw={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};var hw={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 ww={Private:"private",Public:"public"};var bw={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var xw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Rw={Default:"default",Hidden:"hidden"};var yw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var kw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Wn={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var zw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var vw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Sw={Default:"default",Hidden:"hidden"};var _w={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Tw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Aw={Private:"private",Public:"public"};var Ew={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Pw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Cw={Default:"default",Hidden:"hidden"};var jw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Iw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Bn={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Uw={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Dw={Topic:"TOPIC",Pii:"PII"};var Nw={Passed:"passed",Failed:"failed"};var ve={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Mw={Default:"default",Hidden:"hidden"};var Fw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ow={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Ww={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Bw={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Lw={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Vw={Topic:"TOPIC",Pii:"PII"};var Hw={Passed:"passed",Failed:"failed"};var Jw={Topic:"TOPIC",Pii:"PII"};var Xw={Passed:"passed",Failed:"failed"};var Kw={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Gw={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var $w={Trace:"trace",Thread:"thread"};var Qw={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var Yw={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var Zw={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var qw={Private:"private",Public:"public"};var eb={Private:"private",Public:"public"};var rb={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 ob={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var tb={Private:"private",Public:"public"};var ib={Mustache:"mustache",Jinja2:"jinja2"};var ab={Text:"text",Chat:"chat"};var nb={Mustache:"mustache",Jinja2:"jinja2"};var sb={Text:"text",Chat:"chat"};var pb={Mustache:"mustache",Jinja2:"jinja2"};var cb={Text:"text",Chat:"chat"};var lb={Text:"text",Chat:"chat"};var mb={Mustache:"mustache",Jinja2:"jinja2"};var db={Text:"text",Chat:"chat"};var ub={Text:"text",Chat:"chat"};var gb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var fb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var hb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var wb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var bb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var xb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Rb={Topic:"TOPIC",Pii:"PII"};var yb={Passed:"passed",Failed:"failed"};var kb={Default:"default",Hidden:"hidden"};var zb={Active:"active",Inactive:"inactive"};var vb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ie=(a,t,e)=>JSON.stringify(a,t,e);var p=class a extends Error{constructor({message:t,statusCode:e,body:o,rawResponse:i}){super(Sb({message:t,statusCode:e,body:o})),Object.setPrototypeOf(this,a.prototype),this.statusCode=e,this.body=o,this.rawResponse=i;}};function Sb({message:a,statusCode:t,body:e}){let o=[];return a!=null&&o.push(a),t!=null&&o.push(`Status code: ${t.toString()}`),e!=null&&o.push(`Body: ${Ie(e,void 0,2)}`),o.join(`
|
|
3
|
-
`)}var h=class a extends Error{constructor(t){super(t),Object.setPrototypeOf(this,a.prototype);}};var T=class a extends p{constructor(t,e){super({message:"BadRequestError",statusCode:400,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var F=class a extends p{constructor(t,e){super({message:"ConflictError",statusCode:409,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var L=class a extends p{constructor(t,e){super({message:"UnprocessableEntityError",statusCode:422,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var _=class a extends p{constructor(t,e){super({message:"NotFoundError",statusCode:404,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var $=class a extends p{constructor(t,e){super({message:"UnauthorizedError",statusCode:401,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Z=class a extends p{constructor(t,e){super({message:"ForbiddenError",statusCode:403,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Ve=class a extends p{constructor(t,e){super({message:"NotImplementedError",statusCode:501,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var b={Default:"http://localhost:5173/api"};var jr;typeof globalThis.Headers!="undefined"?jr=globalThis.Headers:jr=class eg{constructor(t){if(this.headers=new Map,t)if(t instanceof eg)t.forEach((e,o)=>this.append(o,e));else if(Array.isArray(t))for(let[e,o]of t)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(t))if(typeof o=="string")this.append(e,o);else throw new TypeError("Header values must be strings")}append(t,e){let o=t.toLowerCase(),i=this.headers.get(o)||[];this.headers.set(o,[...i,e]);}delete(t){let e=t.toLowerCase();this.headers.delete(e);}get(t){let e=t.toLowerCase(),o=this.headers.get(e);return o?o.join(", "):null}has(t){let e=t.toLowerCase();return this.headers.has(e)}set(t,e){let o=t.toLowerCase();this.headers.set(o,[e]);}forEach(t,e){let o=e?t.bind(e):t;this.headers.forEach((i,n)=>o(i.join(", "),n,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[t,e]of this.headers.entries())yield [t,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let t of this.headers.values())yield t.join(", ");}[Symbol.iterator](){return this.entries()}};var ci={headers:new jr,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},li={headers:new jr,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};function mi(a){return {headers:a.headers,redirected:a.redirected,status:a.status,statusText:a.statusText,type:a.type,url:a.url}}function rg(a,t){return Object.keys(t!=null?t:{}).length>0?`${a}?${_b__default.default.stringify(t,{arrayFormat:"repeat"})}`:a}var d=Tb();function Tb(){var u,g,f,y,z;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"||((f=self.constructor)==null?void 0:f.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&&!!((z=process.versions)!=null&&z.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 og(){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 tg({body:a,type:t}){return t.includes("json")?Ie(a):a}async function lg(a){return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?new(await Promise.resolve().then(()=>(ag(),ig))).Node18UniversalStreamWrapper(a):d.type!=="node"&&typeof fetch=="function"?new(await Promise.resolve().then(()=>(sg(),ng))).UndiciStreamWrapper(a):new(await Promise.resolve().then(()=>(cg(),pg))).NodePre18StreamWrapper(a)}async function mg(a,t){if(a.body!=null&&t==="blob")return await a.blob();if(a.body!=null&&t==="arrayBuffer")return await a.arrayBuffer();if(a.body!=null&&t==="sse")return a.body;if(a.body!=null&&t==="streaming")return lg(a.body);if(a.body!=null&&t==="text")return await a.text();{let e=await a.text();if(e.length>0)try{return JSON.parse(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:a.status,rawBody:e}}}else return}}var Ab="timeout";function dg(a){let t=new AbortController,e=setTimeout(()=>t.abort(Ab),a);return {signal:t.signal,abortId:e}}function ug(...a){let t=a.length===1&&Array.isArray(a[0])?a[0]:a,e=new AbortController;for(let o of t){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 gg=async(a,t,e,o,i,n,c,m,u)=>{let g=[],f;if(n!=null){let{signal:v,abortId:S}=dg(n);f=S,g.push(v);}c!=null&&g.push(c);let y=ug(g),z=await a(t,{method:e,headers:o,body:i,signal:y,credentials:m?"include":void 0,duplex:u});return f!=null&&clearTimeout(f),z};function Eb(a){let t=1+(Math.random()*2-1)*.2;return a*t}async function fg(a,t=2){let e=await a();for(let o=0;o<t&&([408,429].includes(e.status)||e.status>=500);++o){let i=Math.min(1e3*Math.pow(2,o),6e4),n=Eb(i);await new Promise(c=>setTimeout(c,n)),e=await a();}return e}async function Pb(a){let t={};if(a.body!==void 0&&a.contentType!=null&&(t["Content-Type"]=a.contentType),a.headers!=null)for(let[n,c]of Object.entries(a.headers))c!=null&&(t[n]=c);let e=rg(a.url,a.queryParameters),o=await tg({body:a.body,type:a.requestType==="json"?"json":"other"}),i=await og();try{let n=await fg(async()=>gg(i,e,a.method,t,o,a.timeoutMs,a.abortSignal,a.withCredentials,a.duplex),a.maxRetries),c=await mg(n,a.responseType);return n.status>=200&&n.status<400?{ok:!0,body:c,headers:n.headers,rawResponse:mi(n)}:{ok:!1,error:{reason:"status-code",statusCode:n.status,body:c},rawResponse:mi(n)}}catch(n){return a.abortSignal!=null&&a.abortSignal.aborted?{ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:ci}:n instanceof Error&&n.name==="AbortError"?{ok:false,error:{reason:"timeout"},rawResponse:ci}:n instanceof Error?{ok:false,error:{reason:"unknown",errorMessage:n.message},rawResponse:li}:{ok:false,error:{reason:"unknown",errorMessage:Ie(n)},rawResponse:li}}}var x=Pb;var s={get:async a=>typeof a=="function"?a():a};var w=class a extends Promise{constructor(t){super(e=>{e(void 0);}),this.innerPromise=t;}static fromFunction(t,...e){return new a(t(...e))}static interceptFunction(t){return (...e)=>a.fromPromise(t(...e))}static fromPromise(t){return new a(t)}static fromExecutor(t){let e=new Promise(t);return new a(e)}static fromResult(t){let e=Promise.resolve(t);return new a(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:t})=>t)),this.unwrappedPromise}then(t,e){return this.unwrap().then(t,e)}catch(t){return this.unwrap().catch(t)}finally(t){return this.unwrap().finally(t)}async withRawResponse(){return await this.innerPromise}};function is(a){return typeof a=="object"&&a!=null&&"name"in a}function as(a){return typeof a=="object"&&a!=null&&"path"in a}function ns(a){let t=a.lastIndexOf("/"),e=a.lastIndexOf("\\"),o=Math.max(t,e);return o>=0?a.substring(o+1):a}async function Qg(){let a;return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?a=new rs:d.type==="node"?a=new os:a=new ts,await a.setup(),a}var rs=class{async setup(){this.fd=new(await import('formdata-node')).FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(is(t))return t.name;if(as(t)&&t.path)return ns(t.path.toString())}async appendFile(t,e,o){var i,n;o=this.getFileName(e,o),e instanceof Blob?(i=this.fd)==null||i.append(t,e,o):(n=this.fd)==null||n.append(t,{type:void 0,name:o,[Symbol.toStringTag]:"File",stream(){return e}});}async getRequest(){let t=new(await import('form-data-encoder')).FormDataEncoder(this.fd);return {body:(await import('readable-stream')).Readable.from(t),headers:t.headers,duplex:"half"}}},os=class{async setup(){this.fd=new(await Promise.resolve().then(()=>zh($g()))).default;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(is(t))return t.name;if(as(t)&&t.path)return ns(t.path.toString())}async appendFile(t,e,o){var n,c;o=this.getFileName(e,o);let i;e instanceof Blob?i=Buffer.from(await e.arrayBuffer()):i=e,o==null?(n=this.fd)==null||n.append(t,i):(c=this.fd)==null||c.append(t,i,{filename:o});}getRequest(){return {body:this.fd,headers:this.fd?this.fd.getHeaders():{}}}},ts=class{async setup(){this.fd=new FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(is(t))return t.name;if(as(t)&&t.path)return ns(t.path.toString())}async appendFile(t,e,o){var i,n;if(o=this.getFileName(e,o),e instanceof Blob){(i=this.fd)==null||i.append(t,e,o);return}(n=this.fd)==null||n.append(t,new Blob([e]),o);}getRequest(){return {body:this.fd,headers:{}}}};var r={};E(r,{JsonError:()=>dr,ParseError:()=>ur,any:()=>df,bigint:()=>Zg,boolean:()=>uf,booleanLiteral:()=>mf,date:()=>qg,discriminant:()=>kf,enum_:()=>fi,getObjectLikeUtils:()=>be,getObjectUtils:()=>He,getSchemaUtils:()=>D,isProperty:()=>De,lazy:()=>ef,lazyObject:()=>pf,list:()=>wi,number:()=>gf,object:()=>hi,objectWithoutOptionalProperties:()=>sf,optional:()=>ss,property:()=>of,record:()=>bf,set:()=>xf,string:()=>ff,stringLiteral:()=>lf,transform:()=>ps,undiscriminatedUnion:()=>yf,union:()=>vf,unknown:()=>hf,withParsedProperties:()=>ls});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 U(a,t){return `Expected ${t}. Received ${gx(a)}.`}function gx(a){if(Array.isArray(a))return "list";if(a===null)return "null";if(a instanceof BigInt)return "BigInt";switch(typeof a){case "string":return `"${a}"`;case "bigint":case "number":case "boolean":case "undefined":return `${a}`}return typeof a}function Q(a){return {...a,json:Yg(a.json),parse:Yg(a.parse)}}function Yg(a){return (t,e)=>{let o=a(t,e),{skipValidation:i=false}=e!=null?e:{};return !o.ok&&i?(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:t}):o}}function gi(a){return a.path.length===0?a.message:`${a.path.join(" -> ")}: ${a.message}`}var dr=class a extends Error{constructor(e){super(e.map(gi).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};var ur=class a extends Error{constructor(e){super(e.map(gi).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};function D(a){return {nullable:()=>fx(a),optional:()=>ss(a),optionalNullable:()=>hx(a),transform:t=>ps(a,t),parseOrThrow:(t,e)=>{let o=a.parse(t,e);if(o.ok)return o.value;throw new ur(o.errors)},jsonOrThrow:(t,e)=>{let o=a.json(t,e);if(o.ok)return o.value;throw new dr(o.errors)}}}function fx(a){let t={parse:(e,o)=>e==null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e==null?{ok:true,value:null}:a.json(e,o),getType:()=>A.NULLABLE};return {...t,...D(t)}}function ss(a){let t={parse:(e,o)=>e==null?{ok:true,value:void 0}:a.parse(e,o),json:(e,o)=>o!=null&&o.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:a.json(e,o),getType:()=>A.OPTIONAL};return {...t,...D(t)}}function hx(a){let t={parse:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.json(e,o),getType:()=>A.OPTIONAL_NULLABLE};return {...t,...D(t)}}function ps(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);return n.ok?{ok:true,value:t.transform(n.value)}:n},json:(o,i)=>{let n=t.untransform(o);return a.json(n,i)},getType:()=>a.getType()};return {...e,...D(e)}}function Zg(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t=="bigint"?{ok:true,value:t}:typeof t=="number"?{ok:true,value:BigInt(t)}:{ok:false,errors:[{path:e,message:U(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="bigint"?{ok:false,errors:[{path:e,message:U(t,"bigint")}]}:{ok:true,value:t},getType:()=>A.BIGINT};return {...Q(a),...D(a)}}var wx=/^([+-]?\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 qg(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:e,message:U(t,"string")}]}:wx.test(t)?{ok:true,value:new Date(t)}:{ok:false,errors:[{path:e,message:U(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>t instanceof Date?{ok:true,value:t.toISOString()}:{ok:false,errors:[{path:e,message:U(t,"Date object")}]},getType:()=>A.DATE};return {...Q(a),...D(a)}}function q(a,t){return ()=>{let e={parse:t,json:t,getType:()=>a};return {...Q(e),...D(e)}}}function fi(a){let t=new Set(a);return q(A.ENUM,(o,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:n=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:n,message:U(o,"string")}]}:!t.has(o)&&!i?{ok:false,errors:[{path:n,message:U(o,"enum")}]}:{ok:true,value:o})()}function ef(a){let t=cs(a);return {...t,...D(t)}}function cs(a){return {parse:(t,e)=>gr(a).parse(t,e),json:(t,e)=>gr(a).json(t,e),getType:()=>gr(a).getType()}}function gr(a){let t=a;return t.__zurg_memoized==null&&(t.__zurg_memoized=a()),t.__zurg_memoized}function Ir(a){return Object.entries(a)}function Ur(a,t){let e=new Set(t);return Object.entries(a).reduce((o,[i,n])=>(e.has(i)&&(o[i]=n),o),{})}function Ue(a){if(typeof a!="object"||a===null)return false;if(Object.getPrototypeOf(a)===null)return true;let t=a;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(a)===t}function Dr(a){return Object.keys(a)}function rf(a,t){let e=[],o=[];for(let i of a)t(i)?e.push(i):o.push(i);return [e,o]}function be(a){return {withParsedProperties:t=>ls(a,t)}}function ls(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);if(!n.ok)return n;let c=Object.entries(t).reduce((m,[u,g])=>({...m,[u]:typeof g=="function"?g(n.value):g}),{});return {ok:true,value:{...n.value,...c}}},json:(o,i)=>{var m;if(!Ue(o))return {ok:false,errors:[{path:(m=i==null?void 0:i.breadcrumbsPrefix)!=null?m:[],message:U(o,"object")}]};let n=new Set(Object.keys(t)),c=Ur(o,Object.keys(o).filter(u=>!n.has(u)));return a.json(c,i)},getType:()=>a.getType()};return {...e,...D(e),...be(e)}}function of(a,t){return {rawKey:a,valueSchema:t,isProperty:true}}function De(a){return a.isProperty}function hi(a){let t={_getRawProperties:()=>Object.entries(a).map(([e,o])=>De(o)?o.rawKey:e),_getParsedProperties:()=>Dr(a),parse:(e,o)=>{let i={},n=[];for(let[c,m]of Ir(a)){let u=De(m)?m.rawKey:c,g=De(m)?m.valueSchema:m,f={rawKey:u,parsedKey:c,valueSchema:g};i[u]=f,nf(g)&&n.push(u);}return tf({value:e,requiredKeys:n,getProperty:c=>{let m=i[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 i=[];for(let[n,c]of Ir(a)){let m=De(c)?c.valueSchema:c;nf(m)&&i.push(n);}return tf({value:e,requiredKeys:i,getProperty:n=>{let c=a[n];if(c!=null)return De(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(t),...D(t),...be(t),...He(t)}}function tf({value:a,requiredKeys:t,getProperty:e,unrecognizedObjectKeys:o="fail",skipValidation:i=false,breadcrumbsPrefix:n=[]}){if(!Ue(a))return {ok:false,errors:[{path:n,message:U(a,"object")}]};let c=new Set(t),m=[],u={};for(let[g,f]of Object.entries(a)){let y=e(g);if(y!=null){c.delete(g);let z=y.transform(f);z.ok?u[y.transformedKey]=z.value:(u[g]=f,m.push(...z.errors));}else switch(o){case "fail":m.push({path:[...n,g],message:`Unexpected key "${g}"`});break;case "strip":break;case "passthrough":u[g]=f;break}}return m.push(...t.filter(g=>c.has(g)).map(g=>({path:n,message:`Missing required key "${g}"`}))),m.length===0||i?{ok:true,value:u}:{ok:false,errors:m}}function He(a){return {extend:t=>{let e={_getParsedProperties:()=>[...a._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...a._getRawProperties(),...t._getRawProperties()],parse:(o,i)=>af({extensionKeys:t._getRawProperties(),value:o,transformBase:n=>a.parse(n,i),transformExtension:n=>t.parse(n,i)}),json:(o,i)=>af({extensionKeys:t._getParsedProperties(),value:o,transformBase:n=>a.json(n,i),transformExtension:n=>t.json(n,i)}),getType:()=>A.OBJECT};return {...e,...D(e),...be(e),...He(e)}},passthrough:()=>{let t={_getParsedProperties:()=>a._getParsedProperties(),_getRawProperties:()=>a._getRawProperties(),parse:(e,o)=>{let i=a.parse(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},json:(e,o)=>{let i=a.json(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},getType:()=>A.OBJECT};return {...t,...D(t),...be(t),...He(t)}}}}function af({extensionKeys:a,value:t,transformBase:e,transformExtension:o}){let i=new Set(a),[n,c]=rf(Dr(t),g=>i.has(g)),m=e(Ur(t,c)),u=o(Ur(t,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 nf(a){return !bx(a)}function bx(a){switch(a.getType()){case A.ANY:case A.UNKNOWN:case A.OPTIONAL:case A.OPTIONAL_NULLABLE:return true;default:return false}}function sf(a){return hi(a)}function pf(a){let t={...cs(a),_getRawProperties:()=>gr(a)._getRawProperties(),_getParsedProperties:()=>gr(a)._getParsedProperties()};return {...t,...D(t),...be(t),...He(t)}}function wi(a){let t={parse:(e,o)=>cf(e,(i,n)=>{var c;return a.parse(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),json:(e,o)=>cf(e,(i,n)=>{var c;return a.json(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),getType:()=>A.LIST};return {...Q(t),...D(t)}}function cf(a,t){return Array.isArray(a)?a.map((o,i)=>t(o,i)).reduce((o,i)=>{if(o.ok&&i.ok)return {ok:true,value:[...o.value,i.value]};let n=[];return o.ok||n.push(...o.errors),i.ok||n.push(...i.errors),{ok:false,errors:n}},{ok:true,value:[]}):{ok:false,errors:[{message:U(a,"list"),path:[]}]}}function lf(a){return q(A.STRING_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===a?{ok:true,value:a}:{ok:false,errors:[{path:o,message:U(e,`"${a}"`)}]})()}function mf(a){return q(A.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===a?{ok:true,value:a}:{ok:false,errors:[{path:o,message:U(e,`${a.toString()}`)}]})()}var df=q(A.ANY,a=>({ok:true,value:a}));var uf=q(A.BOOLEAN,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="boolean"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"boolean")}]});var gf=q(A.NUMBER,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="number"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"number")}]});var ff=q(A.STRING,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="string"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"string")}]});var hf=q(A.UNKNOWN,a=>({ok:true,value:a}));function bf(a,t){let e={parse:(o,i)=>wf({value:o,isKeyNumeric:a.getType()===A.NUMBER,transformKey:n=>{var c;return a.parse(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return t.parse(n,{...i,breadcrumbsPrefix:[...(m=i==null?void 0:i.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(o,i)=>wf({value:o,isKeyNumeric:a.getType()===A.NUMBER,transformKey:n=>{var c;return a.json(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return t.json(n,{...i,breadcrumbsPrefix:[...(m=i==null?void 0:i.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>A.RECORD};return {...Q(e),...D(e)}}function wf({value:a,isKeyNumeric:t,transformKey:e,transformValue:o,breadcrumbsPrefix:i=[]}){return Ue(a)?Ir(a).reduce((n,[c,m])=>{if(m===void 0)return n;let u=n,g=c;if(t){let v=c.length>0?Number(c):NaN;isNaN(v)||(g=v);}let f=e(g),y=o(m,g);if(u.ok&&f.ok&&y.ok)return {ok:true,value:{...u.value,[f.value]:y.value}};let z=[];return u.ok||z.push(...u.errors),f.ok||z.push(...f.errors),y.ok||z.push(...y.errors),{ok:false,errors:z}},{ok:true,value:{}}):{ok:false,errors:[{path:i,message:U(a,"object")}]}}function xf(a){let t=wi(a),e={parse:(o,i)=>{let n=t.parse(o,i);return n.ok?{ok:true,value:new Set(n.value)}:n},json:(o,i)=>{var c;return o instanceof Set?t.json([...o],i):{ok:false,errors:[{path:(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],message:U(o,"Set")}]}},getType:()=>A.SET};return {...Q(e),...D(e)}}function yf(a){let t={parse:(e,o)=>Rf((i,n)=>i.parse(e,n),a,o),json:(e,o)=>Rf((i,n)=>i.json(e,n),a,o),getType:()=>A.UNDISCRIMINATED_UNION};return {...Q(t),...D(t)}}function Rf(a,t,e){let o=[];for(let[i,n]of t.entries()){let c=a(n,{...e,skipValidation:false});if(c.ok)return c;for(let m of c.errors)o.push({path:m.path,message:`[Variant ${i}] ${m.message}`});}return {ok:false,errors:o}}function kf(a,t){return {parsedDiscriminant:a,rawDiscriminant:t}}function vf(a,t){let e=typeof a=="string"?a:a.rawDiscriminant,o=typeof a=="string"?a:a.parsedDiscriminant,i=fi(Dr(t)),n={parse:(c,m)=>zf({value:c,discriminant:e,transformedDiscriminant:o,transformDiscriminantValue:u=>{var g;return i.parse(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],e]})},getAdditionalPropertiesSchema:u=>t[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)=>zf({value:c,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:u=>{var g;return i.json(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],o]})},getAdditionalPropertiesSchema:u=>t[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),...D(n),...be(n)}}function zf({value:a,discriminant:t,transformedDiscriminant:e,transformDiscriminantValue:o,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:n=false,transformAdditionalProperties:c,breadcrumbsPrefix:m=[]}){if(!Ue(a))return {ok:false,errors:[{path:m,message:U(a,"object")}]};let{[t]:u,...g}=a;if(u==null)return {ok:false,errors:[{path:m,message:`Missing discriminant ("${t}")`}]};let f=o(u);if(!f.ok)return {ok:false,errors:f.errors};let y=i(f.value);if(y==null)return n?{ok:true,value:{[e]:f.value,...g}}:{ok:false,errors:[{path:[...m,t],message:"Unexpected discriminant value"}]};let z=c(g,y);return z.ok?{ok:true,value:{[e]:u,...z.value}}:z}function xx(a){var t=[];if(a.length===0)return "";if(typeof a[0]!="string")throw new TypeError("Url must be a string. Received "+a[0]);if(a[0].match(/^[^/:]+:\/*$/)&&a.length>1){var e=a.shift();a[0]=e+a[0];}a[0].match(/^file:\/\/\//)?a[0]=a[0].replace(/^([^/:]+):\/*/,"$1:///"):a[0]=a[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<a.length;o++){var i=a[o];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(o>0&&(i=i.replace(/^[\/]+/,"")),o<a.length-1?i=i.replace(/[\/]+$/,""):i=i.replace(/[\/]+$/,"/"),t.push(i));}var n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");var c=n.split("?");return n=c.shift()+(c.length>0?"?":"")+c.join("&"),n}function R(){var a;return typeof arguments[0]=="object"?a=arguments[0]:a=[].slice.call(arguments),xx(a)}var j={};E(j,{AggregationData:()=>Xl,Alert:()=>Sx,AlertAlertType:()=>op,AlertPagePublic:()=>Rp,AlertPublic:()=>$o,AlertPublicAlertType:()=>gp,AlertTrigger:()=>sp,AlertTriggerConfig:()=>np,AlertTriggerConfigPublic:()=>bp,AlertTriggerConfigPublicType:()=>wp,AlertTriggerConfigType:()=>ap,AlertTriggerConfigWrite:()=>cp,AlertTriggerConfigWriteType:()=>pp,AlertTriggerEventType:()=>ip,AlertTriggerPublic:()=>xp,AlertTriggerPublicEventType:()=>hp,AlertTriggerWrite:()=>mp,AlertTriggerWriteEventType:()=>lp,AlertWrite:()=>Go,AlertWriteAlertType:()=>dp,AnnotationQueue:()=>_p,AnnotationQueueBatch:()=>Tx,AnnotationQueueBatchWrite:()=>Wo,AnnotationQueueItemIds:()=>sa,AnnotationQueuePagePublic:()=>Ep,AnnotationQueuePublic:()=>Qo,AnnotationQueuePublicScope:()=>Tp,AnnotationQueueReviewer:()=>Sp,AnnotationQueueReviewerPublic:()=>Ap,AnnotationQueueScope:()=>vp,AnnotationQueueUpdate:()=>Bo,AnnotationQueueWrite:()=>Oo,AnnotationQueueWriteScope:()=>Bs,AssistantMessage:()=>Oc,AssistantMessageRole:()=>Fc,Attachment:()=>Pp,AttachmentListRequestEntityType:()=>Ri,AttachmentPage:()=>Cp,AuthDetailsHolder:()=>Np,AutomationRuleEvaluator:()=>Ex,AutomationRuleEvaluatorLlmAsJudge:()=>Hp,AutomationRuleEvaluatorLlmAsJudgePublic:()=>st,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>tc,AutomationRuleEvaluatorObjectObjectPublic:()=>_c,AutomationRuleEvaluatorPagePublic:()=>Tc,AutomationRuleEvaluatorPublic:()=>Ac,AutomationRuleEvaluatorSpanLlmAsJudge:()=>$p,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>mt,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>sc,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>Xp,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>ct,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>lc,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>Kp,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>lt,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>dc,AutomationRuleEvaluatorUpdate:()=>Mc,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>jc,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>Nc,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>Uc,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>Dc,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>Ic,AutomationRuleEvaluatorUserDefinedMetricPython:()=>Jp,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>pt,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>gc,AutomationRuleEvaluatorWrite:()=>fc,AvgValueStatPublic:()=>dl,BatchDelete:()=>B,BatchDeleteByProject:()=>$x,BiInformation:()=>Ys,BiInformationResponse:()=>br,BooleanFeedbackDefinition:()=>Yl,BooleanFeedbackDefinitionCreate:()=>im,BooleanFeedbackDefinitionPublic:()=>vt,BooleanFeedbackDefinitionUpdate:()=>Rm,BooleanFeedbackDetail:()=>Ql,BooleanFeedbackDetailCreate:()=>tm,BooleanFeedbackDetailPublic:()=>mm,BooleanFeedbackDetailUpdate:()=>xm,CategoricalFeedbackDefinition:()=>ql,CategoricalFeedbackDefinitionCreate:()=>nm,CategoricalFeedbackDefinitionPublic:()=>St,CategoricalFeedbackDefinitionUpdate:()=>km,CategoricalFeedbackDetail:()=>Zl,CategoricalFeedbackDetailCreate:()=>am,CategoricalFeedbackDetailPublic:()=>dm,CategoricalFeedbackDetailUpdate:()=>ym,ChatCompletionChoice:()=>Bc,ChatCompletionRequest:()=>Vo,ChatCompletionResponse:()=>Jc,Check:()=>Il,CheckName:()=>Cl,CheckPublic:()=>Xd,CheckPublicName:()=>Hd,CheckPublicResult:()=>Jd,CheckResult:()=>jl,ChunkedOutputJsonNode:()=>Ix,ChunkedOutputJsonNodePublic:()=>Mx,ChunkedOutputJsonNodePublicType:()=>$l,ChunkedOutputJsonNodeType:()=>Sl,Column:()=>zl,ColumnCompare:()=>Zc,ColumnCompareTypesItem:()=>Yc,ColumnPublic:()=>Rl,ColumnPublicTypesItem:()=>xl,ColumnTypesItem:()=>kl,Comment:()=>H,CommentCompare:()=>qc,CommentPublic:()=>ar,CompleteMultipartUploadRequest:()=>pa,CompleteMultipartUploadRequestEntityType:()=>jp,CompletionTokensDetails:()=>Vc,CountValueStatPublic:()=>ul,CreateDatasetItemsFromSpansRequest:()=>Br,CreateDatasetItemsFromTracesRequest:()=>Lr,CreatePromptVersionDetail:()=>wo,CreatePromptVersionDetailTemplateStructure:()=>Ki,DashboardPagePublic:()=>Xc,DashboardPublic:()=>tr,DashboardUpdatePublic:()=>Jo,DashboardWrite:()=>Ho,DataPointDouble:()=>Qx,DataPointNumberPublic:()=>ld,Dataset:()=>Px,DatasetExpansion:()=>jx,DatasetExpansionResponse:()=>Qc,DatasetExpansionWrite:()=>Xr,DatasetIdentifier:()=>Hr,DatasetIdentifierPublic:()=>Kr,DatasetItem:()=>ht,DatasetItemBatch:()=>Cx,DatasetItemBatchUpdate:()=>Mr,DatasetItemBatchWrite:()=>Wr,DatasetItemCompare:()=>sl,DatasetItemCompareSource:()=>el,DatasetItemFilter:()=>ds,DatasetItemFilterOperator:()=>ms,DatasetItemPageCompare:()=>pl,DatasetItemPagePublic:()=>yl,DatasetItemPublic:()=>xt,DatasetItemPublicSource:()=>wl,DatasetItemSource:()=>$c,DatasetItemStreamRequest:()=>Gr,DatasetItemUpdate:()=>us,DatasetItemWrite:()=>Or,DatasetItemWriteSource:()=>gs,DatasetItemsDelete:()=>Jr,DatasetPagePublic:()=>ml,DatasetPublic:()=>xr,DatasetPublicStatus:()=>ll,DatasetPublicVisibility:()=>cl,DatasetStatus:()=>Gc,DatasetUpdate:()=>Vr,DatasetUpdateVisibility:()=>_i,DatasetVersionCreatePublic:()=>Qr,DatasetVersionDiff:()=>Tl,DatasetVersionDiffStats:()=>_l,DatasetVersionPagePublic:()=>Al,DatasetVersionPublic:()=>Rt,DatasetVersionRestorePublic:()=>Yr,DatasetVersionTag:()=>$r,DatasetVisibility:()=>Kc,DatasetWrite:()=>Fr,DatasetWriteVisibility:()=>Si,DeleteAttachmentsRequest:()=>Ax,DeleteAttachmentsRequestEntityType:()=>Up,DeleteFeedbackScore:()=>Pt,DeleteIdsHolder:()=>Rr,DeleteThreadFeedbackScores:()=>Uo,DeleteTraceThreads:()=>Do,Delta:()=>Wc,DownloadAttachmentRequestEntityType:()=>yi,ErrorCountWithDeviation:()=>At,ErrorCountWithDeviationDetailed:()=>wd,ErrorInfo:()=>Ae,ErrorInfoExperimentItemBulkWriteView:()=>oo,ErrorInfoPublic:()=>Ct,ErrorInfoWrite:()=>Ro,ErrorMessage:()=>ae,ErrorMessageDetail:()=>Xx,ErrorMessageDetailed:()=>Hx,ErrorMessagePublic:()=>_x,Experiment:()=>Ux,ExperimentGroupAggregationsResponse:()=>Gl,ExperimentGroupResponse:()=>Jl,ExperimentItem:()=>qr,ExperimentItemBulkRecord:()=>Ml,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>Es,ExperimentItemBulkUpload:()=>Dx,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>to,ExperimentItemCompare:()=>nl,ExperimentItemCompareTraceVisibilityMode:()=>al,ExperimentItemPublic:()=>bt,ExperimentItemPublicTraceVisibilityMode:()=>bl,ExperimentItemStreamRequest:()=>no,ExperimentItemTraceVisibilityMode:()=>ys,ExperimentItemsBatch:()=>eo,ExperimentItemsDelete:()=>ro,ExperimentPagePublic:()=>Bl,ExperimentPublic:()=>zt,ExperimentPublicStatus:()=>Ol,ExperimentPublicType:()=>Fl,ExperimentScore:()=>io,ExperimentScorePublic:()=>Wl,ExperimentScoreWrite:()=>ws,ExperimentStatus:()=>Pl,ExperimentStreamRequestPublic:()=>so,ExperimentType:()=>El,ExperimentUpdate:()=>ao,ExperimentUpdateStatus:()=>Ci,ExperimentUpdateType:()=>Pi,ExperimentWrite:()=>Zr,ExperimentWriteStatus:()=>Ei,ExperimentWriteType:()=>Ai,ExportTraceServiceRequest:()=>Bx,Feedback:()=>Fx,FeedbackCreate:()=>lm,FeedbackDefinitionPagePublic:()=>hm,FeedbackObjectPublic:()=>fm,FeedbackPublic:()=>bm,FeedbackScore:()=>ee,FeedbackScoreAverage:()=>ne,FeedbackScoreAverageDetailed:()=>bd,FeedbackScoreAveragePublic:()=>Ke,FeedbackScoreBatch:()=>It,FeedbackScoreBatchItem:()=>Vd,FeedbackScoreBatchItemSource:()=>Ld,FeedbackScoreBatchItemThread:()=>Os,FeedbackScoreBatchItemThreadSource:()=>Fs,FeedbackScoreBatchThread:()=>No,FeedbackScoreCompare:()=>il,FeedbackScoreCompareSource:()=>rl,FeedbackScoreExperimentItemBulkWriteView:()=>As,FeedbackScoreExperimentItemBulkWriteViewSource:()=>Ss,FeedbackScoreNames:()=>cd,FeedbackScorePublic:()=>kr,FeedbackScorePublicSource:()=>Md,FeedbackScoreSource:()=>bs,FeedbackUpdate:()=>_m,FindFeedbackDefinitionsRequestType:()=>Ui,FindFeedbackScoreNames1RequestType:()=>Qi,Function:()=>Lo,FunctionCall:()=>Ee,GetSpanStatsRequestType:()=>Yi,GetSpansByProjectRequestType:()=>$i,GetWebhookExamplesRequestAlertType:()=>bi,GroupContent:()=>Ll,GroupContentWithAggregations:()=>Kl,GroupDetail:()=>Vl,GroupDetails:()=>Hl,Guardrail:()=>Em,GuardrailBatch:()=>Ox,GuardrailBatchWrite:()=>Xo,GuardrailName:()=>Tm,GuardrailResult:()=>Am,GuardrailWrite:()=>Qs,GuardrailWriteName:()=>Gs,GuardrailWriteResult:()=>$s,GuardrailsValidation:()=>Ul,GuardrailsValidationPublic:()=>Kd,IdsHolder:()=>Nx,ImageUrl:()=>Wp,ImageUrlPublic:()=>wc,ImageUrlWrite:()=>Zp,JsonListString:()=>N,JsonListStringCompare:()=>ca,JsonListStringExperimentItemBulkWriteView:()=>xe,JsonListStringPublic:()=>me,JsonListStringWrite:()=>ce,JsonNode:()=>P,JsonNodeDetail:()=>js,JsonNodePublic:()=>re,JsonNodeWrite:()=>le,JsonSchema:()=>Js,LlmAsJudgeCode:()=>Yo,LlmAsJudgeCodePublic:()=>yc,LlmAsJudgeCodeWrite:()=>oc,LlmAsJudgeMessage:()=>$e,LlmAsJudgeMessageContent:()=>Lp,LlmAsJudgeMessageContentPublic:()=>xc,LlmAsJudgeMessageContentWrite:()=>ec,LlmAsJudgeMessagePublic:()=>rr,LlmAsJudgeMessagePublicRole:()=>hc,LlmAsJudgeMessageRole:()=>Op,LlmAsJudgeMessageWrite:()=>Ze,LlmAsJudgeMessageWriteRole:()=>Yp,LlmAsJudgeModelParameters:()=>Ge,LlmAsJudgeModelParametersPublic:()=>er,LlmAsJudgeModelParametersWrite:()=>Ye,LlmAsJudgeOutputSchema:()=>Qe,LlmAsJudgeOutputSchemaPublic:()=>or,LlmAsJudgeOutputSchemaPublicType:()=>Rc,LlmAsJudgeOutputSchemaType:()=>Vp,LlmAsJudgeOutputSchemaWrite:()=>qe,LlmAsJudgeOutputSchemaWriteType:()=>rc,LogItem:()=>Pc,LogItemLevel:()=>Ec,LogPage:()=>Cc,ManualEvaluationRequest:()=>ua,ManualEvaluationRequestEntityType:()=>Im,ManualEvaluationResponse:()=>da,Message:()=>Ls,MultipartUploadPart:()=>Ip,NumericalFeedbackDefinition:()=>rm,NumericalFeedbackDefinitionCreate:()=>pm,NumericalFeedbackDefinitionPublic:()=>_t,NumericalFeedbackDefinitionUpdate:()=>vm,NumericalFeedbackDetail:()=>em,NumericalFeedbackDetailCreate:()=>sm,NumericalFeedbackDetailPublic:()=>um,NumericalFeedbackDetailUpdate:()=>zm,Optimization:()=>Lx,OptimizationPagePublic:()=>fa,OptimizationPublic:()=>yr,OptimizationPublicStatus:()=>Qm,OptimizationStatus:()=>Um,OptimizationStudioConfig:()=>Bm,OptimizationStudioConfigPublic:()=>td,OptimizationStudioConfigWrite:()=>Gm,OptimizationStudioLog:()=>id,OptimizationUpdate:()=>lo,OptimizationUpdateStatus:()=>Fi,OptimizationWrite:()=>ga,OptimizationWriteStatus:()=>$m,PageColumns:()=>vl,PercentageValueStatPublic:()=>gl,PercentageValues:()=>Ce,PercentageValuesDetailed:()=>xd,PercentageValuesPublic:()=>wt,Project:()=>Vx,ProjectDetailed:()=>yd,ProjectDetailedVisibility:()=>Rd,ProjectMetricRequestPublic:()=>go,ProjectMetricRequestPublicInterval:()=>Vi,ProjectMetricRequestPublicMetricType:()=>Li,ProjectMetricResponsePublic:()=>gd,ProjectMetricResponsePublicInterval:()=>dd,ProjectMetricResponsePublicMetricType:()=>md,ProjectPagePublic:()=>sd,ProjectPublic:()=>Et,ProjectPublicVisibility:()=>nd,ProjectRetrieveDetailed:()=>fo,ProjectStatItemObjectPublic:()=>hl,ProjectStatsPublic:()=>ir,ProjectStatsSummary:()=>hd,ProjectStatsSummaryItem:()=>fd,ProjectUpdate:()=>uo,ProjectUpdateVisibility:()=>Bi,ProjectVisibility:()=>ad,ProjectWrite:()=>mo,ProjectWriteVisibility:()=>Wi,Prompt:()=>Jx,PromptDetail:()=>Ad,PromptDetailTemplateStructure:()=>Td,PromptPagePublic:()=>Dd,PromptPublic:()=>Ud,PromptPublicTemplateStructure:()=>Id,PromptTemplateStructure:()=>zd,PromptTokensDetails:()=>Lc,PromptType:()=>kd,PromptUpdatable:()=>bo,PromptVersion:()=>_d,PromptVersionDetail:()=>Se,PromptVersionDetailTemplateStructure:()=>Us,PromptVersionDetailType:()=>Is,PromptVersionLink:()=>la,PromptVersionLinkPublic:()=>ma,PromptVersionLinkWrite:()=>Ii,PromptVersionPagePublic:()=>jd,PromptVersionPublic:()=>Cd,PromptVersionPublicTemplateStructure:()=>Pd,PromptVersionPublicType:()=>Ed,PromptVersionRetrieveDetail:()=>xo,PromptVersionTemplateStructure:()=>Sd,PromptVersionType:()=>vd,PromptWrite:()=>ho,PromptWriteTemplateStructure:()=>Xi,PromptWriteType:()=>Ji,ProviderApiKey:()=>Wx,ProviderApiKeyPagePublic:()=>Cm,ProviderApiKeyProvider:()=>jm,ProviderApiKeyPublic:()=>Tt,ProviderApiKeyPublicProvider:()=>Pm,ProviderApiKeyUpdate:()=>co,ProviderApiKeyWrite:()=>po,ProviderApiKeyWriteProvider:()=>Ni,ResponseFormat:()=>Xs,ResponseFormatType:()=>Hs,Result:()=>nr,ResultsNumberPublic:()=>ud,ScoreName:()=>pd,ServiceTogglesConfig:()=>Nd,Span:()=>kt,SpanBatch:()=>Kx,SpanBatchUpdate:()=>vo,SpanBatchWrite:()=>ko,SpanEnrichmentOptions:()=>fs,SpanExperimentItemBulkWriteView:()=>vs,SpanExperimentItemBulkWriteViewType:()=>zs,SpanFilter:()=>rt,SpanFilterOperator:()=>Gp,SpanFilterPublic:()=>So,SpanFilterPublicOperator:()=>Ms,SpanFilterWrite:()=>ac,SpanFilterWriteOperator:()=>ic,SpanLlmAsJudgeCode:()=>ot,SpanLlmAsJudgeCodePublic:()=>Sc,SpanLlmAsJudgeCodeWrite:()=>nc,SpanPagePublic:()=>Bd,SpanPublic:()=>jt,SpanPublicType:()=>Wd,SpanSearchStreamRequestPublic:()=>_o,SpanSearchStreamRequestPublicType:()=>Zi,SpanType:()=>Nl,SpanUpdate:()=>zo,SpanUpdateType:()=>Ns,SpanWrite:()=>yo,SpanWriteType:()=>Ds,SpansCountResponse:()=>qs,StartMultipartUploadRequest:()=>Nr,StartMultipartUploadRequestEntityType:()=>ki,StartMultipartUploadResponse:()=>Dp,StreamOptions:()=>Vs,StudioEvaluation:()=>Om,StudioEvaluationPublic:()=>rd,StudioEvaluationWrite:()=>Xm,StudioLlmModel:()=>Mm,StudioLlmModelPublic:()=>qm,StudioLlmModelWrite:()=>Hm,StudioMessage:()=>Dm,StudioMessagePublic:()=>Ym,StudioMessageWrite:()=>Lm,StudioMetric:()=>Fm,StudioMetricPublic:()=>ed,StudioMetricWrite:()=>Jm,StudioOptimizer:()=>Wm,StudioOptimizerPublic:()=>od,StudioOptimizerWrite:()=>Km,StudioPrompt:()=>Nm,StudioPromptPublic:()=>Zm,StudioPromptWrite:()=>Vm,Tool:()=>Ks,ToolCall:()=>ft,Trace:()=>yt,TraceBatch:()=>Gx,TraceBatchUpdate:()=>Po,TraceBatchWrite:()=>Ao,TraceCountResponse:()=>rp,TraceEnrichmentOptions:()=>hs,TraceExperimentItemBulkWriteView:()=>ks,TraceFilter:()=>Pe,TraceFilterOperator:()=>Fp,TraceFilterPublic:()=>Te,TraceFilterPublicOperator:()=>Ps,TraceFilterWrite:()=>it,TraceFilterWriteOperator:()=>Qp,TracePagePublic:()=>Yd,TracePublic:()=>Ut,TracePublicVisibilityMode:()=>Gd,TraceSearchStreamRequestPublic:()=>Fo,TraceThread:()=>Dt,TraceThreadBatchIdentifier:()=>Io,TraceThreadBatchUpdate:()=>jo,TraceThreadFilter:()=>Re,TraceThreadFilterOperator:()=>Ws,TraceThreadFilterPublic:()=>Je,TraceThreadFilterPublicOperator:()=>Cs,TraceThreadFilterWrite:()=>at,TraceThreadFilterWriteOperator:()=>pc,TraceThreadIdentifier:()=>ha,TraceThreadLlmAsJudgeCode:()=>qo,TraceThreadLlmAsJudgeCodePublic:()=>zc,TraceThreadLlmAsJudgeCodeWrite:()=>cc,TraceThreadPage:()=>Qd,TraceThreadSearchStreamRequest:()=>Mo,TraceThreadStatus:()=>$d,TraceThreadUpdate:()=>Co,TraceThreadUserDefinedMetricPythonCode:()=>et,TraceThreadUserDefinedMetricPythonCodePublic:()=>vc,TraceThreadUserDefinedMetricPythonCodeWrite:()=>mc,TraceUpdate:()=>Eo,TraceVisibilityMode:()=>Dl,TraceWrite:()=>To,UploadAttachmentRequestEntityType:()=>zi,Usage:()=>Hc,UserDefinedMetricPythonCode:()=>Zo,UserDefinedMetricPythonCodePublic:()=>kc,UserDefinedMetricPythonCodeWrite:()=>uc,ValueEntry:()=>Rs,ValueEntryCompare:()=>tl,ValueEntryCompareSource:()=>ol,ValueEntryExperimentItemBulkWriteView:()=>Ts,ValueEntryExperimentItemBulkWriteViewSource:()=>_s,ValueEntryPublic:()=>Od,ValueEntryPublicSource:()=>Fd,ValueEntrySource:()=>xs,VideoUrl:()=>Bp,VideoUrlPublic:()=>bc,VideoUrlWrite:()=>qp,Webhook:()=>tp,WebhookExamples:()=>yp,WebhookPublic:()=>fp,WebhookTestResult:()=>zp,WebhookTestResultStatus:()=>kp,WebhookWrite:()=>up,WelcomeWizardSubmission:()=>Ko,WelcomeWizardTracking:()=>Zd,WorkspaceConfiguration:()=>Nt,WorkspaceMetricRequest:()=>Yx,WorkspaceMetricResponse:()=>wa,WorkspaceMetricsSummaryRequest:()=>zr,WorkspaceMetricsSummaryResponse:()=>qd,WorkspaceNameHolder:()=>Mp,WorkspaceSpansCount:()=>Zs,WorkspaceTraceCount:()=>ep,alerts:()=>xi,annotationQueues:()=>oa,attachments:()=>fr,chatCompletions:()=>ta,dashboards:()=>ia,datasets:()=>Ti,experiments:()=>hr,feedbackDefinitions:()=>Di,guardrails:()=>aa,llmProviderKey:()=>Mi,optimizations:()=>Oi,projects:()=>Hi,prompts:()=>Gi,spans:()=>wr,traces:()=>Xe,welcomeWizard:()=>na});var xi={};E(xi,{GetWebhookExamplesRequestAlertType:()=>bi});var bi=r.enum_(["general","slack","pagerduty"]);var fr={};E(fr,{AttachmentListRequestEntityType:()=>Ri,DownloadAttachmentRequestEntityType:()=>yi,StartMultipartUploadRequest:()=>Nr,StartMultipartUploadRequestEntityType:()=>ki,UploadAttachmentRequestEntityType:()=>zi,uploadAttachment:()=>vi});var Ri=r.enum_(["trace","span"]);var yi=r.enum_(["trace","span"]);var ki=r.enum_(["trace","span"]);var zi=r.enum_(["trace","span"]);var vi={};E(vi,{Request:()=>Rx});var Rx=r.record(r.string(),r.unknown());var Nr=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",ki),entityId:r.property("entity_id",r.string()),path:r.string()});var Ti={};E(Ti,{CreateDatasetItemsFromSpansRequest:()=>Br,CreateDatasetItemsFromTracesRequest:()=>Lr,DatasetExpansionWrite:()=>Xr,DatasetIdentifier:()=>Hr,DatasetIdentifierPublic:()=>Kr,DatasetItemBatchUpdate:()=>Mr,DatasetItemBatchWrite:()=>Wr,DatasetItemStreamRequest:()=>Gr,DatasetItemsDelete:()=>Jr,DatasetUpdate:()=>Vr,DatasetUpdateVisibility:()=>_i,DatasetVersionCreatePublic:()=>Qr,DatasetVersionRestorePublic:()=>Yr,DatasetVersionTag:()=>$r,DatasetWrite:()=>Fr,DatasetWriteVisibility:()=>Si});var Si=r.enum_(["private","public"]);var _i=r.enum_(["private","public"]);var ms=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ds=r.object({field:r.string().optional(),operator:ms.optional(),key:r.string().optional(),value:r.string().optional()});var P=r.record(r.string(),r.unknown());var us=r.object({input:r.string().optional(),expectedOutput:r.property("expected_output",r.string().optional()),metadata:P.optional(),data:P.optional(),tags:r.list(r.string()).optional()});var Mr=r.object({ids:r.list(r.string()).optional(),filters:r.list(ds).optional(),update:us,mergeTags:r.property("merge_tags",r.boolean().optional())});var Fr=r.object({id:r.string().optional(),name:r.string(),visibility:Si.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});var gs=r.enum_(["manual","trace","span","sdk"]);var Or=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:gs,data:P,tags:r.list(r.string()).optional()});var Wr=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(Or)});var fs=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Br=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",fs)});var hs=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 Lr=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",hs)});var Vr=r.object({name:r.string(),description:r.string().optional(),visibility:_i.optional(),tags:r.list(r.string()).optional()});var Hr=r.object({datasetName:r.property("dataset_name",r.string())});var Jr=r.object({itemIds:r.property("item_ids",r.list(r.string()))});var Xr=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 Kr=r.object({datasetName:r.property("dataset_name",r.string())});var Gr=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 $r=r.object({tag:r.string()});var Qr=r.object({tag:r.string().optional(),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional()});var Yr=r.object({versionRef:r.property("version_ref",r.string())});var hr={};E(hr,{ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>to,ExperimentItemStreamRequest:()=>no,ExperimentItemsBatch:()=>eo,ExperimentItemsDelete:()=>ro,ExperimentStreamRequestPublic:()=>so,ExperimentUpdate:()=>ao,ExperimentUpdateStatus:()=>Ci,ExperimentUpdateType:()=>Pi,ExperimentWrite:()=>Zr,ExperimentWriteStatus:()=>Ei,ExperimentWriteType:()=>Ai,findFeedbackScoreNames:()=>ji});var Ai=r.enum_(["regular","trial","mini-batch"]);var Ei=r.enum_(["running","completed","cancelled"]);var Pi=r.enum_(["regular","trial","mini-batch"]);var Ci=r.enum_(["running","completed","cancelled"]);var ji={};E(ji,{Response:()=>yx});var yx=r.list(r.string());var ce=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var ws=r.object({name:r.string(),value:r.number()});var Ii=r.object({id:r.string()});var Zr=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),name:r.string().optional(),metadata:ce.optional(),type:Ai.optional(),optimizationId:r.property("optimization_id",r.string().optional()),status:Ei.optional(),experimentScores:r.property("experiment_scores",r.list(ws).optional()),promptVersion:r.property("prompt_version",Ii.optional()),promptVersions:r.property("prompt_versions",r.list(Ii).optional())});var N=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var bs=r.enum_(["ui","sdk","online_scoring"]);var xs=r.enum_(["ui","sdk","online_scoring"]);var Rs=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:xs.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:bs,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(),Rs).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 ys=r.enum_(["default","hidden"]);var qr=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:N.optional(),output:N.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",ys.optional())});var eo=r.object({experimentItems:r.property("experiment_items",r.list(qr))});var ro=r.object({ids:r.list(r.string())});var xe=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var oo=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var ks=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:xe.optional(),output:xe.optional(),metadata:xe.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",oo.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var zs=r.enum_(["general","tool","llm","guardrail"]);var vs=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:zs.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:xe.optional(),output:xe.optional(),metadata:xe.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",oo.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 Ss=r.enum_(["ui","sdk","online_scoring"]);var _s=r.enum_(["ui","sdk","online_scoring"]);var Ts=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:_s.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 As=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Ss,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(),Ts).optional())});var Es=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",xe.optional()),trace:ks.optional(),spans:r.list(vs).optional(),feedbackScores:r.property("feedback_scores",r.list(As).optional())});var to=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(Es)});var io=r.object({name:r.string(),value:r.number()});var ao=r.object({name:r.string().optional(),metadata:P.optional(),type:Pi.optional(),status:Ci.optional(),experimentScores:r.property("experiment_scores",r.list(io).optional())});var no=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 so=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional())});var Di={};E(Di,{FindFeedbackDefinitionsRequestType:()=>Ui});var Ui=r.enum_(["numerical","categorical","boolean"]);var Mi={};E(Mi,{ProviderApiKeyUpdate:()=>co,ProviderApiKeyWrite:()=>po,ProviderApiKeyWriteProvider:()=>Ni});var Ni=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var po=r.object({provider:Ni,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 co=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 Oi={};E(Oi,{OptimizationUpdate:()=>lo,OptimizationUpdateStatus:()=>Fi});var Fi=r.enum_(["running","completed","cancelled","initialized","error"]);var lo=r.object({name:r.string().optional(),status:Fi.optional()});var Hi={};E(Hi,{ProjectMetricRequestPublic:()=>go,ProjectMetricRequestPublicInterval:()=>Vi,ProjectMetricRequestPublicMetricType:()=>Li,ProjectRetrieveDetailed:()=>fo,ProjectUpdate:()=>uo,ProjectUpdateVisibility:()=>Bi,ProjectWrite:()=>mo,ProjectWriteVisibility:()=>Wi});var Wi=r.enum_(["private","public"]);var Bi=r.enum_(["private","public"]);var Li=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Vi=r.enum_(["HOURLY","DAILY","WEEKLY"]);var mo=r.object({name:r.string(),visibility:Wi.optional(),description:r.string().optional()});var uo=r.object({name:r.string().optional(),description:r.string().optional(),visibility:Bi.optional()});var Ps=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Te=r.object({field:r.string().optional(),operator:Ps.optional(),key:r.string().optional(),value:r.string().optional()});var Cs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Je=r.object({field:r.string().optional(),operator:Cs.optional(),key:r.string().optional(),value:r.string().optional()});var go=r.object({metricType:r.property("metric_type",Li.optional()),interval:Vi.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),traceFilters:r.property("trace_filters",r.list(Te).optional()),threadFilters:r.property("thread_filters",r.list(Je).optional())});var fo=r.object({name:r.string()});var Gi={};E(Gi,{CreatePromptVersionDetail:()=>wo,CreatePromptVersionDetailTemplateStructure:()=>Ki,PromptUpdatable:()=>bo,PromptVersionRetrieveDetail:()=>xo,PromptWrite:()=>ho,PromptWriteTemplateStructure:()=>Xi,PromptWriteType:()=>Ji});var Ji=r.enum_(["mustache","jinja2"]);var Xi=r.enum_(["text","chat"]);var Ki=r.enum_(["text","chat"]);var le=r.record(r.string(),r.unknown());var ho=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:le.optional(),changeDescription:r.property("change_description",r.string().optional()),type:Ji.optional(),templateStructure:r.property("template_structure",Xi.optional()),tags:r.list(r.string()).optional()});var js=r.record(r.string(),r.unknown());var Is=r.enum_(["mustache","jinja2"]);var Us=r.enum_(["text","chat"]);var Se=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:js.optional(),type:Is.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Us.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var wo=r.object({name:r.string(),version:Se,templateStructure:r.property("template_structure",Ki.optional())});var bo=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});var xo=r.object({name:r.string(),commit:r.string().optional()});var wr={};E(wr,{FindFeedbackScoreNames1RequestType:()=>Qi,GetSpanStatsRequestType:()=>Yi,GetSpansByProjectRequestType:()=>$i,SpanBatchUpdate:()=>vo,SpanBatchWrite:()=>ko,SpanSearchStreamRequestPublic:()=>_o,SpanSearchStreamRequestPublicType:()=>Zi,findFeedbackScoreNames1:()=>qi});var $i=r.enum_(["general","tool","llm","guardrail"]);var Qi=r.enum_(["general","tool","llm","guardrail"]);var Yi=r.enum_(["general","tool","llm","guardrail"]);var Zi=r.enum_(["general","tool","llm","guardrail"]);var qi={};E(qi,{Response:()=>kx});var kx=r.list(r.string());var Ds=r.enum_(["general","tool","llm","guardrail"]);var Ro=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var yo=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:Ds.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",Ro.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 ko=r.object({spans:r.list(yo)});var Ns=r.enum_(["general","tool","llm","guardrail"]);var Ae=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var zo=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:Ns.optional(),endTime:r.property("end_time",r.date().optional()),input:N.optional(),output:N.optional(),metadata:N.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",Ae.optional())});var vo=r.object({ids:r.list(r.string()),update:zo,mergeTags:r.property("merge_tags",r.boolean().optional())});var Ms=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var So=r.object({field:r.string().optional(),operator:Ms.optional(),key:r.string().optional(),value:r.string().optional()});var _o=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:Zi.optional(),filters:r.list(So).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 Xe={};E(Xe,{DeleteThreadFeedbackScores:()=>Uo,DeleteTraceThreads:()=>Do,FeedbackScoreBatchThread:()=>No,TraceBatchUpdate:()=>Po,TraceBatchWrite:()=>Ao,TraceSearchStreamRequestPublic:()=>Fo,TraceThreadBatchIdentifier:()=>Io,TraceThreadBatchUpdate:()=>jo,TraceThreadSearchStreamRequest:()=>Mo,findFeedbackScoreNames2:()=>ea,findTraceThreadsFeedbackScoreNames:()=>ra});var ea={};E(ea,{Response:()=>zx});var zx=r.list(r.string());var ra={};E(ra,{Response:()=>vx});var vx=r.list(r.string());var To=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:ce.optional(),output:ce.optional(),metadata:ce.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Ro.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var Ao=r.object({traces:r.list(To)});var Eo=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:N.optional(),output:N.optional(),metadata:N.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Ae.optional()),threadId:r.property("thread_id",r.string().optional())});var Po=r.object({ids:r.list(r.string()),update:Eo,mergeTags:r.property("merge_tags",r.boolean().optional())});var Co=r.object({tags:r.list(r.string()).optional()});var jo=r.object({ids:r.list(r.string()),update:Co,mergeTags:r.property("merge_tags",r.boolean().optional())});var Io=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 Uo=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 Do=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 Fs=r.enum_(["ui","sdk","online_scoring"]);var Os=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:Fs,author:r.string().optional(),threadId:r.property("thread_id",r.string())});var No=r.object({scores:r.list(Os)});var Ws=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Re=r.object({field:r.string().optional(),operator:Ws.optional(),key:r.string().optional(),value:r.string().optional()});var Mo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Re).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 Fo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Te).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 oa={};E(oa,{AnnotationQueueBatchWrite:()=>Wo,AnnotationQueueUpdate:()=>Bo});var Bs=r.enum_(["trace","thread"]);var Oo=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:Bs,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var Wo=r.object({annotationQueues:r.property("annotation_queues",r.list(Oo))});var Bo=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 ta={};E(ta,{ChatCompletionRequest:()=>Vo});var Ls=r.record(r.string(),r.unknown());var Vs=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});var Hs=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 Xs=r.object({type:Hs.optional(),jsonSchema:r.property("json_schema",Js.optional())});var Lo=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 Ks=r.object({type:r.stringLiteral("function").optional(),function:Lo.optional()});var Ee=r.object({name:r.string().optional(),arguments:r.string().optional()});var Vo=r.object({model:r.string().optional(),messages:r.list(Ls).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",Vs.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",Xs.optional()),seed:r.number().optional(),tools:r.list(Ks).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(Lo).optional(),functionCall:r.property("function_call",Ee.optional())});var ia={};E(ia,{DashboardUpdatePublic:()=>Jo,DashboardWrite:()=>Ho});var Ho=r.object({name:r.string(),description:r.string().optional(),config:le});var re=r.record(r.string(),r.unknown());var Jo=r.object({name:r.string().optional(),description:r.string().optional(),config:re.optional()});var aa={};E(aa,{GuardrailBatchWrite:()=>Xo});var Gs=r.enum_(["TOPIC","PII"]);var $s=r.enum_(["passed","failed"]);var Qs=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:Gs,result:$s,config:P,details:P});var Xo=r.object({guardrails:r.list(Qs)});var na={};E(na,{WelcomeWizardSubmission:()=>Ko});var Ko=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 Ys=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});var br=r.object({biInformation:r.property("bi_information",r.list(Ys).optional())});var Zs=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});var qs=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(Zs).optional())});var ep=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});var rp=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(ep).optional())});var ae=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var op=r.enum_(["general","slack","pagerduty"]);var tp=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 ip=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 ap=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var np=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:ap,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 sp=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",ip),triggerConfigs:r.property("trigger_configs",r.list(np).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Sx=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",op.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:tp,triggers:r.list(sp).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 pp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var cp=r.object({id:r.string().optional(),type:pp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional())});var lp=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 mp=r.object({id:r.string().optional(),eventType:r.property("event_type",lp),triggerConfigs:r.property("trigger_configs",r.list(cp).optional())});var dp=r.enum_(["general","slack","pagerduty"]);var up=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 Go=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",dp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:up,triggers:r.list(mp).optional()});var B=r.object({ids:r.list(r.string())});var gp=r.enum_(["general","slack","pagerduty"]);var fp=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 hp=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 wp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var bp=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:wp,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 xp=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",hp),triggerConfigs:r.property("trigger_configs",r.list(bp).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var $o=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",gp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:fp,triggers:r.list(xp).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 Rp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list($o).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var _x=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var yp=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});var kp=r.enum_(["success","failure"]);var zp=r.object({status:kp.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 sa=r.object({ids:r.list(r.string())});var vp=r.enum_(["trace","thread"]);var Sp=r.object({username:r.string().optional(),status:r.number().optional()});var ne=r.object({name:r.string(),value:r.number()});var _p=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:vp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(Sp).optional(),feedbackScores:r.property("feedback_scores",r.list(ne).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 Tx=r.object({annotationQueues:r.property("annotation_queues",r.list(_p))});var Tp=r.enum_(["trace","thread"]);var Ap=r.object({username:r.string().optional(),status:r.number().optional()});var Ke=r.object({name:r.string(),value:r.number()});var Qo=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:Tp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(Ap).optional(),feedbackScores:r.property("feedback_scores",r.list(Ke).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 Ep=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Qo).optional(),sortableBy:r.list(r.string()).optional()});var Pp=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 Cp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Pp).optional(),sortableBy:r.list(r.string()).optional()});var jp=r.enum_(["trace","span"]);var Ip=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});var pa=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",jp),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(Ip))});var Up=r.enum_(["trace","span"]);var Ax=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",Up),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});var Dp=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});var Np=r.record(r.string(),r.unknown());var Mp=r.object({workspaceName:r.property("workspace_name",r.string().optional())});var Fp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Pe=r.object({field:r.string().optional(),operator:Fp.optional(),key:r.string().optional(),value:r.string().optional()});var Ge=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",P.optional())});var Op=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Wp=r.object({url:r.string(),detail:r.string().optional()});var Bp=r.object({url:r.string()});var Lp=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Wp.optional()),videoUrl:r.property("video_url",Bp.optional())});var $e=r.object({role:Op,content:r.string().optional(),contentArray:r.property("content_array",r.list(Lp).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Vp=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Qe=r.object({name:r.string(),type:Vp,description:r.string()});var Yo=r.object({model:Ge,messages:r.list($e),variables:r.record(r.string(),r.string()),schema:r.list(Qe)});var Hp=r.object({filters:r.list(Pe).optional(),code:Yo.optional()});var Zo=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Jp=r.object({filters:r.list(Pe).optional(),code:Zo.optional()});var qo=r.object({model:Ge,messages:r.list($e),schema:r.list(Qe)});var Xp=r.object({filters:r.list(Re).optional(),code:qo.optional()});var et=r.object({metric:r.string()});var Kp=r.object({filters:r.list(Re).optional(),code:et.optional()});var Gp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var rt=r.object({field:r.string().optional(),operator:Gp.optional(),key:r.string().optional(),value:r.string().optional()});var ot=r.object({model:Ge,messages:r.list($e),variables:r.record(r.string(),r.string()),schema:r.list(Qe)});var $p=r.object({filters:r.list(rt).optional(),code:ot.optional()});var tt=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(),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")}),Ex=r.union("type",{llm_as_judge:Hp.extend(tt),user_defined_metric_python:Jp.extend(tt),trace_thread_llm_as_judge:Xp.extend(tt),trace_thread_user_defined_metric_python:Kp.extend(tt),span_llm_as_judge:$p.extend(tt)}).transform({transform:a=>a,untransform:a=>a});var Qp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var it=r.object({field:r.string().optional(),operator:Qp.optional(),key:r.string().optional(),value:r.string().optional()});var Ye=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",le.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 Ze=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 qe=r.object({name:r.string(),type:rc,description:r.string()});var oc=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var tc=r.object({filters:r.list(it).optional(),code:oc.optional()});var ic=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ac=r.object({field:r.string().optional(),operator:ic.optional(),key:r.string().optional(),value:r.string().optional()});var nc=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var sc=r.object({filters:r.list(ac).optional(),code:nc.optional()});var pc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var at=r.object({field:r.string().optional(),operator:pc.optional(),key:r.string().optional(),value:r.string().optional()});var cc=r.object({model:Ye,messages:r.list(Ze),schema:r.list(qe)});var lc=r.object({filters:r.list(at).optional(),code:cc.optional()});var mc=r.object({metric:r.string()});var dc=r.object({filters:r.list(at).optional(),code:mc.optional()});var uc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var gc=r.object({filters:r.list(it).optional(),code:uc.optional()});var nt=r.object({projectId:r.property("project_id",r.string()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),action:r.stringLiteral("evaluator")}),fc=r.union("type",{llm_as_judge:tc.extend(nt),user_defined_metric_python:gc.extend(nt),trace_thread_llm_as_judge:lc.extend(nt),trace_thread_user_defined_metric_python:dc.extend(nt),span_llm_as_judge:sc.extend(nt)}).transform({transform:a=>a,untransform:a=>a});var er=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",re.optional())});var hc=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var wc=r.object({url:r.string(),detail:r.string().optional()});var bc=r.object({url:r.string()});var xc=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",wc.optional()),videoUrl:r.property("video_url",bc.optional())});var rr=r.object({role:hc,content:r.string().optional(),contentArray:r.property("content_array",r.list(xc).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 or=r.object({name:r.string(),type:Rc,description:r.string()});var yc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var st=r.object({filters:r.list(Te).optional(),code:yc.optional()});var kc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var pt=r.object({filters:r.list(Te).optional(),code:kc.optional()});var zc=r.object({model:er,messages:r.list(rr),schema:r.list(or)});var ct=r.object({filters:r.list(Je).optional(),code:zc.optional()});var vc=r.object({metric:r.string()});var lt=r.object({filters:r.list(Je).optional(),code:vc.optional()});var Sc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var mt=r.object({filters:r.list(So).optional(),code:Sc.optional()});var dt=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(),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")}),_c=r.union("type",{llm_as_judge:st.extend(dt),user_defined_metric_python:pt.extend(dt),trace_thread_llm_as_judge:ct.extend(dt),trace_thread_user_defined_metric_python:lt.extend(dt),span_llm_as_judge:mt.extend(dt)}).transform({transform:a=>a,untransform:a=>a});var Tc=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(_c).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var ut=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(),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")}),Ac=r.union("type",{llm_as_judge:st.extend(ut),user_defined_metric_python:pt.extend(ut),trace_thread_llm_as_judge:ct.extend(ut),trace_thread_user_defined_metric_python:lt.extend(ut),span_llm_as_judge:mt.extend(ut)}).transform({transform:a=>a,untransform:a=>a});var Ec=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);var Pc=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:Ec.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});var Cc=r.object({content:r.list(Pc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var jc=r.object({filters:r.list(Pe).optional(),code:Yo.optional()});var Ic=r.object({filters:r.list(Pe).optional(),code:Zo.optional()});var Uc=r.object({filters:r.list(Re).optional(),code:qo.optional()});var Dc=r.object({filters:r.list(Re).optional(),code:et.optional()});var Nc=r.object({filters:r.list(rt).optional(),code:ot.optional()});var gt=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),projectId:r.property("project_id",r.string()),action:r.stringLiteral("evaluator")}),Mc=r.union("type",{llm_as_judge:jc.extend(gt),user_defined_metric_python:Ic.extend(gt),trace_thread_llm_as_judge:Uc.extend(gt),trace_thread_user_defined_metric_python:Dc.extend(gt),span_llm_as_judge:Nc.extend(gt)}).transform({transform:a=>a,untransform:a=>a});var Fc=r.enum_(["system","user","assistant","tool","function"]);var ft=r.object({id:r.string().optional(),index:r.number().optional(),type:r.stringLiteral("function").optional(),function:Ee.optional()});var Oc=r.object({role:Fc.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(ft).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",Ee.optional())});var Wc=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(ft).optional()),functionCall:r.property("function_call",Ee.optional())});var Bc=r.object({index:r.number().optional(),message:Oc.optional(),delta:Wc.optional(),finishReason:r.property("finish_reason",r.string().optional())});var Lc=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});var Vc=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});var Hc=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",Lc.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",Vc.optional())});var Jc=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(Bc).optional(),usage:Hc.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});var tr=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:re,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 Xc=r.object({content:r.list(tr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Kc=r.enum_(["private","public"]);var Gc=r.enum_(["unknown","processing","completed","failed"]);var Px=r.object({id:r.string().optional(),name:r.string(),visibility:Kc.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:Gc.optional()});var $c=r.enum_(["manual","trace","span","sdk"]);var ht=r.object({id:r.string().optional(),draftItemId:r.property("draft_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:$c,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(qr).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 Cx=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(ht)});var Qc=r.object({generatedSamples:r.property("generated_samples",r.list(ht).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});var jx=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 Yc=r.enum_(["string","number","object","boolean","array","null"]);var Zc=r.object({name:r.string().optional(),types:r.list(Yc).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var qc=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 el=r.enum_(["manual","trace","span","sdk"]);var ca=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var rl=r.enum_(["ui","sdk","online_scoring"]);var ol=r.enum_(["ui","sdk","online_scoring"]);var tl=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:ol.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 il=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:rl,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(),tl).optional())});var al=r.enum_(["default","hidden"]);var nl=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:ca.optional(),output:ca.optional(),feedbackScores:r.property("feedback_scores",r.list(il).optional()),comments:r.list(qc).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",al.optional())});var sl=r.object({id:r.string().optional(),draftItemId:r.property("draft_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:el,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(nl).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 pl=r.object({content:r.list(sl).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Zc).optional(),sortableBy:r.list(r.string()).optional(),hasDraft:r.boolean().optional()});var cl=r.enum_(["private","public"]);var ll=r.enum_(["unknown","processing","completed","failed"]);var xr=r.object({id:r.string().optional(),name:r.string(),visibility:cl.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:ll.optional()});var ml=r.object({content:r.list(xr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});var dl=r.object({value:r.number().optional()});var ul=r.object({value:r.number().optional()});var wt=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var gl=r.object({value:wt.optional()});var fl=r.object({name:r.string().optional()}),hl=r.union("type",{PERCENTAGE:gl.extend(fl),COUNT:ul.extend(fl),AVG:dl.extend(fl)}).transform({transform:a=>a,untransform:a=>a});var ir=r.object({stats:r.list(hl).optional()});var wl=r.enum_(["manual","trace","span","sdk"]);var bl=r.enum_(["default","hidden"]);var bt=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",bl.optional())});var xt=r.object({id:r.string().optional(),draftItemId:r.property("draft_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:wl,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(bt).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 xl=r.enum_(["string","number","object","boolean","array","null"]);var Rl=r.object({name:r.string().optional(),types:r.list(xl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var yl=r.object({content:r.list(xt).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Rl).optional(),sortableBy:r.list(r.string()).optional(),hasDraft:r.boolean().optional()});var kl=r.enum_(["string","number","object","boolean","array","null"]);var zl=r.object({name:r.string().optional(),types:r.list(kl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var vl=r.object({columns:r.list(zl).optional()});var Sl=r.object({typeName:r.string().optional()});var Ix=r.object({type:Sl.optional(),closed:r.boolean().optional()});var _l=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});var Tl=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:_l.optional()});var Rt=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 Al=r.object({content:r.list(Rt).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var El=r.enum_(["regular","trial","mini-batch"]);var Pl=r.enum_(["running","completed","cancelled"]);var Ce=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var la=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 Ux=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:N.optional(),type:El.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),comments:r.list(H).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:Ce.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(),experimentScores:r.property("experiment_scores",r.list(io).optional()),promptVersion:r.property("prompt_version",la.optional()),promptVersions:r.property("prompt_versions",r.list(la).optional())});var Rr=r.object({ids:r.list(r.string())});var Cl=r.enum_(["TOPIC","PII"]);var jl=r.enum_(["passed","failed"]);var Il=r.object({name:Cl.optional(),result:jl.optional()});var Ul=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Il).optional()});var Dl=r.enum_(["default","hidden"]);var yt=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:N.optional(),output:N.optional(),metadata:N.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Ae.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(Ul).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",Dl.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 Nl=r.enum_(["general","tool","llm","guardrail"]);var kt=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:Nl.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:N.optional(),output:N.optional(),metadata:N.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",Ae.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 Ml=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",N.optional()),trace:yt.optional(),spans:r.list(kt).optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional())});var Dx=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(Ml)});var ar=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 me=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var Fl=r.enum_(["regular","trial","mini-batch"]);var Ol=r.enum_(["running","completed","cancelled"]);var Wl=r.object({name:r.string(),value:r.number()});var ma=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 zt=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:me.optional(),type:Fl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Ke).optional()),comments:r.list(ar).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:wt.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:Ol.optional(),experimentScores:r.property("experiment_scores",r.list(Wl).optional()),promptVersion:r.property("prompt_version",ma.optional()),promptVersions:r.property("prompt_versions",r.list(ma).optional())});var Bl=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(zt).optional(),sortableBy:r.list(r.string()).optional()});var Ll=r.object({label:r.string().optional()});var Vl=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});var Hl=r.object({groupsDetails:r.property("groups_details",r.list(Vl).optional())});var Jl=r.object({content:r.record(r.string(),Ll).optional(),details:Hl.optional()});var Xl=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:Ce.optional(),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),experimentScores:r.property("experiment_scores",r.list(ne).optional())});var Kl=r.object({aggregations:Xl.optional()});var Gl=r.object({content:r.record(r.string(),Kl).optional()});var Nx=r.object({ids:r.list(r.string())});var $l=r.object({typeName:r.string().optional()});var Mx=r.object({type:$l.optional(),closed:r.boolean().optional()});var Ql=r.object({trueLabel:r.string(),falseLabel:r.string()});var Yl=r.object({details:Ql.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 Zl=r.object({categories:r.record(r.string(),r.number())});var ql=r.object({details:Zl.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 em=r.object({max:r.number(),min:r.number()});var rm=r.object({details:em.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 om=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()}),Fx=r.union("type",{numerical:rm.extend(om),categorical:ql.extend(om),boolean:Yl.extend(om)}).transform({transform:a=>a,untransform:a=>a});var tm=r.object({trueLabel:r.string(),falseLabel:r.string()});var im=r.object({details:tm.optional()});var am=r.object({categories:r.record(r.string(),r.number())});var nm=r.object({details:am.optional()});var sm=r.object({max:r.number(),min:r.number()});var pm=r.object({details:sm.optional()});var cm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),lm=r.union("type",{numerical:pm.extend(cm),categorical:nm.extend(cm),boolean:im.extend(cm)}).transform({transform:a=>a,untransform:a=>a});var mm=r.object({trueLabel:r.string(),falseLabel:r.string()});var vt=r.object({details:mm.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.object({categories:r.record(r.string(),r.number())});var St=r.object({details:dm.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 um=r.object({max:r.number(),min:r.number()});var _t=r.object({details:um.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({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()}),fm=r.union("type",{numerical:_t.extend(gm),categorical:St.extend(gm),boolean:vt.extend(gm)}).transform({transform:a=>a,untransform:a=>a});var hm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(fm).optional()});var wm=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()}),bm=r.union("type",{numerical:_t.extend(wm),categorical:St.extend(wm),boolean:vt.extend(wm)}).transform({transform:a=>a,untransform:a=>a});var xm=r.object({trueLabel:r.string(),falseLabel:r.string()});var Rm=r.object({details:xm.optional()});var ym=r.object({categories:r.record(r.string(),r.number())});var km=r.object({details:ym.optional()});var zm=r.object({max:r.number(),min:r.number()});var vm=r.object({details:zm.optional()});var Sm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),_m=r.union("type",{numerical:vm.extend(Sm),categorical:km.extend(Sm),boolean:Rm.extend(Sm)}).transform({transform:a=>a,untransform:a=>a});var Tm=r.enum_(["TOPIC","PII"]);var Am=r.enum_(["passed","failed"]);var Em=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:Am,config:P,details:P});var Ox=r.object({guardrails:r.list(Em)});var Pm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var Tt=r.object({id:r.string().optional(),provider:Pm,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 Cm=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(Tt).optional(),sortableBy:r.list(r.string()).optional()});var jm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var Wx=r.object({id:r.string().optional(),provider:jm,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 da=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});var Im=r.enum_(["trace","thread"]);var ua=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",Im)});var Bx=P;var Um=r.enum_(["running","completed","cancelled","initialized","error"]);var Dm=r.object({role:r.string(),content:r.string()});var Nm=r.object({messages:r.list(Dm)});var Mm=r.object({model:r.string(),parameters:P.optional()});var Fm=r.object({type:r.string(),parameters:P.optional()});var Om=r.object({metrics:r.list(Fm)});var Wm=r.object({type:r.string(),parameters:P.optional()});var Bm=r.object({datasetName:r.property("dataset_name",r.string()),prompt:Nm,llmModel:r.property("llm_model",Mm),evaluation:Om,optimizer:Wm});var Lx=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:N.optional(),studioConfig:r.property("studio_config",Bm.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).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 Lm=r.object({role:r.string(),content:r.string()});var Vm=r.object({messages:r.list(Lm)});var Hm=r.object({model:r.string(),parameters:le.optional()});var Jm=r.object({type:r.string(),parameters:le.optional()});var Xm=r.object({metrics:r.list(Jm)});var Km=r.object({type:r.string(),parameters:le.optional()});var Gm=r.object({datasetName:r.property("dataset_name",r.string()),prompt:Vm,llmModel:r.property("llm_model",Hm),evaluation:Xm,optimizer:Km});var $m=r.enum_(["running","completed","cancelled","initialized","error"]);var ga=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:$m,metadata:ce.optional(),studioConfig:r.property("studio_config",Gm.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var Qm=r.enum_(["running","completed","cancelled","initialized","error"]);var Ym=r.object({role:r.string(),content:r.string()});var Zm=r.object({messages:r.list(Ym)});var qm=r.object({model:r.string(),parameters:re.optional()});var ed=r.object({type:r.string(),parameters:re.optional()});var rd=r.object({metrics:r.list(ed)});var od=r.object({type:r.string(),parameters:re.optional()});var td=r.object({datasetName:r.property("dataset_name",r.string()),prompt:Zm,llmModel:r.property("llm_model",qm),evaluation:rd,optimizer:od});var yr=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:Qm,metadata:me.optional(),studioConfig:r.property("studio_config",td.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Ke).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 fa=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(yr).optional(),sortableBy:r.list(r.string()).optional()});var id=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});var At=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var ad=r.enum_(["private","public"]);var Vx=r.object({id:r.string().optional(),name:r.string(),visibility:ad.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(ne).optional()),duration:Ce.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",At.optional())});var nd=r.enum_(["private","public"]);var Et=r.object({id:r.string().optional(),name:r.string(),visibility:nd.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 sd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Et).optional(),sortableBy:r.list(r.string()).optional()});var pd=r.object({name:r.string().optional(),type:r.string().optional()});var cd=r.object({scores:r.list(pd).optional()});var ld=r.object({time:r.date(),value:r.number().optional()});var md=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var dd=r.enum_(["HOURLY","DAILY","WEEKLY"]);var ud=r.object({name:r.string().optional(),data:r.list(ld).optional()});var gd=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",md.optional()),interval:dd.optional(),results:r.list(ud).optional()});var fd=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),duration:Ce.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",At.optional())});var hd=r.object({content:r.list(fd).optional()});var wd=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var bd=r.object({name:r.string(),value:r.number()});var xd=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Rd=r.enum_(["private","public"]);var yd=r.object({id:r.string().optional(),name:r.string(),visibility:Rd.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(bd).optional()),duration:xd.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",wd.optional())});var Hx=r.object({errors:r.list(r.string()).optional()});var kd=r.enum_(["mustache","jinja2"]);var zd=r.enum_(["text","chat"]);var vd=r.enum_(["mustache","jinja2"]);var Sd=r.enum_(["text","chat"]);var _d=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:P.optional(),type:vd.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Sd.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Jx=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:P.optional(),changeDescription:r.property("change_description",r.string().optional()),type:kd.optional(),templateStructure:r.property("template_structure",zd.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",_d.optional())});var Xx=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Td=r.enum_(["text","chat"]);var Ad=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",Td.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",Se.optional())});var Ed=r.enum_(["mustache","jinja2"]);var Pd=r.enum_(["text","chat"]);var Cd=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:re.optional(),type:Ed.optional(),changeDescription:r.property("change_description",r.string().optional()),templateStructure:r.property("template_structure",Pd.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var jd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Cd).optional()});var Id=r.enum_(["text","chat"]);var Ud=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",Id.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 Dd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ud).optional(),sortableBy:r.list(r.string()).optional()});var Nd=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),spanLlmAsJudgeEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),csvUploadEnabled:r.boolean(),exportEnabled:r.boolean(),optimizationStudioEnabled:r.boolean(),dashboardsEnabled:r.boolean(),datasetVersioningEnabled:r.boolean()});var Kx=r.object({spans:r.list(kt)});var Pt=r.object({name:r.string(),author:r.string().optional()});var Ct=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Md=r.enum_(["ui","sdk","online_scoring"]);var Fd=r.enum_(["ui","sdk","online_scoring"]);var Od=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Fd.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 kr=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Md,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(),Od).optional())});var Wd=r.enum_(["general","tool","llm","guardrail"]);var jt=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:Wd.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:me.optional(),output:me.optional(),metadata:me.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",Ct.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(kr).optional()),comments:r.list(ar).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 Bd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(jt).optional(),sortableBy:r.list(r.string()).optional()});var Ld=r.enum_(["ui","sdk","online_scoring"]);var Vd=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:Ld,author:r.string().optional(),id:r.string()});var It=r.object({scores:r.list(Vd)});var Gx=r.object({traces:r.list(yt)});var $x=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});var Hd=r.enum_(["TOPIC","PII"]);var Jd=r.enum_(["passed","failed"]);var Xd=r.object({name:Hd.optional(),result:Jd.optional()});var Kd=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Xd).optional()});var Gd=r.enum_(["default","hidden"]);var Ut=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:me.optional(),output:me.optional(),metadata:me.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Ct.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(kr).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(kr).optional()),comments:r.list(ar).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(Kd).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",Gd.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 $d=r.enum_(["active","inactive"]);var Dt=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",N.optional()),lastMessage:r.property("last_message",N.optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),status:$d.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 ha=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 Qd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Dt).optional(),sortableBy:r.list(r.string()).optional()});var Yd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ut).optional(),sortableBy:r.list(r.string()).optional()});var Zd=r.object({completed:r.boolean().optional()});var nr=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});var zr=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 Qx=r.object({time:r.date(),value:r.number().optional()});var wa=r.object({results:r.list(nr).optional()});var Yx=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 Nt=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional())});var qd=r.object({results:r.list(nr).optional()});var ba=class{constructor(t={}){this._options=t;}getDatasetBiInfo(t){return w.fromPromise(this.__getDatasetBiInfo(t))}async __getDatasetBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:br.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 h("Timeout exceeded when calling GET /v1/internal/usage/bi-datasets.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getExperimentBiInfo(t){return w.fromPromise(this.__getExperimentBiInfo(t))}async __getExperimentBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:br.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 h("Timeout exceeded when calling GET /v1/internal/usage/bi-experiments.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansBiInfo(t){return w.fromPromise(this.__getSpansBiInfo(t))}async __getSpansBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:br.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 h("Timeout exceeded when calling GET /v1/internal/usage/bi-spans.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansCountForWorkspaces(t){return w.fromPromise(this.__getSpansCountForWorkspaces(t))}async __getSpansCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:qs.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 h("Timeout exceeded when calling GET /v1/internal/usage/workspace-span-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesBiInfo(t){return w.fromPromise(this.__getTracesBiInfo(t))}async __getTracesBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:br.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 h("Timeout exceeded when calling GET /v1/internal/usage/bi-traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesCountForWorkspaces(t){return w.fromPromise(this.__getTracesCountForWorkspaces(t))}async __getTracesCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:rp.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 h("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 xa=class{constructor(t={}){this._options=t;}findAlerts(t={},e){return w.fromPromise(this.__findAlerts(t,e))}async __findAlerts(t={},e){var g,f;let{page:o,size:i,sorting:n,filters:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.sorting=n),c!=null&&(m.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:Rp.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 h("Timeout exceeded when calling GET /v1/private/alerts.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createAlert(t,e){return w.fromPromise(this.__createAlert(t,e))}async __createAlert(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Go.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new T(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/alerts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAlertBatch(t,e){return w.fromPromise(this.__deleteAlertBatch(t,e))}async __deleteAlertBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400: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 h("Timeout exceeded when calling POST /v1/private/alerts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAlertById(t,e){return w.fromPromise(this.__getAlertById(t,e))}async __getAlertById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),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:$o.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 _(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 h("Timeout exceeded when calling GET /v1/private/alerts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAlert(t,e,o){return w.fromPromise(this.__updateAlert(t,e,o))}async __updateAlert(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),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: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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new T(i.error.body,i.rawResponse);case 409:throw new F(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/alerts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getWebhookExamples(t={},e){return w.fromPromise(this.__getWebhookExamples(t,e))}async __getWebhookExamples(t={},e){var c,m;let{alertType:o}=t,i={};o!=null&&(i.alert_type=bi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}));let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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:i,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:yp.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 h("Timeout exceeded when calling GET /v1/private/alerts/webhooks/examples.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}testWebhook(t,e){return w.fromPromise(this.__testWebhook(t,e))}async __testWebhook(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Go.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(o.ok)return {data:zp.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 L(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 h("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 Ra=class{constructor(t={}){this._options=t;}addItemsToAnnotationQueue(t,e,o){return w.fromPromise(this.__addItemsToAnnotationQueue(t,e,o))}async __addItemsToAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/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:sa.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/add.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findAnnotationQueues(t={},e){return w.fromPromise(this.__findAnnotationQueues(t,e))}async __findAnnotationQueues(t={},e){var f,y;let{page:o,size:i,name:n,filters:c,sorting:m}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.filters=c),m!=null&&(u.sorting=m);let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.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:Ep.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 h("Timeout exceeded when calling GET /v1/private/annotation-queues.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createAnnotationQueue(t,e){return w.fromPromise(this.__createAnnotationQueue(t,e))}async __createAnnotationQueue(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Oo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new T(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/annotation-queues.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createAnnotationQueueBatch(t,e){return w.fromPromise(this.__createAnnotationQueueBatch(t,e))}async __createAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Wo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new T(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/annotation-queues/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAnnotationQueueBatch(t,e){return w.fromPromise(this.__deleteAnnotationQueueBatch(t,e))}async __deleteAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400: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 h("Timeout exceeded when calling POST /v1/private/annotation-queues/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAnnotationQueueById(t,e){return w.fromPromise(this.__getAnnotationQueueById(t,e))}async __getAnnotationQueueById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),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:Qo.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 _(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 h("Timeout exceeded when calling GET /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAnnotationQueue(t,e={},o){return w.fromPromise(this.__updateAnnotationQueue(t,e,o))}async __updateAnnotationQueue(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),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:Bo.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new T(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}removeItemsFromAnnotationQueue(t,e,o){return w.fromPromise(this.__removeItemsFromAnnotationQueue(t,e,o))}async __removeItemsFromAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/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:sa.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ya=class{constructor(t={}){this._options=t;}attachmentList(t,e){return w.fromPromise(this.__attachmentList(t,e))}async __attachmentList(t,e){var y,z;let{page:o,size:i,projectId:n,entityType:c,entityId:m,path:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),g.project_id=n,g.entity_type=Ri.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m,g.path=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.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(f.ok)return {data:Cp.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/list.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}completeMultiPartUpload(t,e){return w.fromPromise(this.__completeMultiPartUpload(t,e))}async __completeMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:pa.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(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(ae.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 h("Timeout exceeded when calling POST /v1/private/attachment/upload-complete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAttachments(t,e){return w.fromPromise(this.__deleteAttachments(t,e))}async __deleteAttachments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:pa.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(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(ae.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 h("Timeout exceeded when calling POST /v1/private/attachment/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}downloadAttachment(t,e){return w.fromPromise(this.__downloadAttachment(t,e))}async __downloadAttachment(t,e){var y,z;let{workspaceName:o,containerId:i,entityType:n,entityId:c,fileName:m,mimeType:u}=t,g={};o!=null&&(g.workspace_name=o),g.container_id=i,g.entity_type=yi.jsonOrThrow(n,{unrecognizedObjectKeys:"strip"}),g.entity_id=c,g.file_name=m,g.mime_type=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.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(f.ok)return {data:f.body,rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/download.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}startMultiPartUpload(t,e){return w.fromPromise(this.__startMultiPartUpload(t,e))}async __startMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Nr.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(o.ok)return {data:Dp.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(ae.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 h("Timeout exceeded when calling POST /v1/private/attachment/upload-start.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}uploadAttachment(t,e){return w.fromPromise(this.__uploadAttachment(t,e))}async __uploadAttachment(t,e){var y,z;let{fileName:o,projectName:i,mimeType:n,entityType:c,entityId:m,body:u}=t,g={};g.file_name=o,i!=null&&(g.project_name=i),n!=null&&(g.mime_type=n),g.entity_type=zi.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.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:fr.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(f.ok)return {data:void 0,rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/attachment/upload.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ka=class{constructor(t={}){this._options=t;}access(t,e){return w.fromPromise(this.__access(t,e))}async __access(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Np.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(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(ae.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 h("Timeout exceeded when calling POST /v1/private/auth.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceName(t){return w.fromPromise(this.__getWorkspaceName(t))}async __getWorkspaceName(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:Mp.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(ae.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 h("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 za=class{constructor(t={}){this._options=t;}findEvaluators(t={},e){return w.fromPromise(this.__findEvaluators(t,e))}async __findEvaluators(t={},e){var z,v;let{projectId:o,id:i,name:n,filters:c,sorting:m,page:u,size:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.id=i),n!=null&&(f.name=n),c!=null&&(f.filters=c),m!=null&&(f.sorting=m),u!=null&&(f.page=u.toString()),g!=null&&(f.size=g.toString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.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:f,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:Tc.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 h("Timeout exceeded when calling GET /v1/private/automations/evaluators.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}createAutomationRuleEvaluator(t,e){return w.fromPromise(this.__createAutomationRuleEvaluator(t,e))}async __createAutomationRuleEvaluator(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:fc.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(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 h("Timeout exceeded when calling POST /v1/private/automations/evaluators.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAutomationRuleEvaluatorBatch(t,e){return w.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(t,e))}async __deleteAutomationRuleEvaluatorBatch(t,e){var m,u;let{projectId:o,body:i}=t,n={};o!=null&&(n.project_id=o);let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.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:B.jsonOrThrow(i,{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 h("Timeout exceeded when calling POST /v1/private/automations/evaluators/delete.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getEvaluatorById(t,e={},o){return w.fromPromise(this.__getEvaluatorById(t,e,o))}async __getEvaluatorById(t,e={},o){var m,u;let{projectId:i}=e,n={};i!=null&&(n.project_id=i);let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),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:Ac.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 h("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}updateAutomationRuleEvaluator(t,e,o){return w.fromPromise(this.__updateAutomationRuleEvaluator(t,e,o))}async __updateAutomationRuleEvaluator(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),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:Mc.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getEvaluatorLogsById(t,e={},o){return w.fromPromise(this.__getEvaluatorLogsById(t,e,o))}async __getEvaluatorLogsById(t,e={},o){var m,u;let{size:i}=e,n={};i!=null&&(n.size=i.toString());let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}/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:Cc.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 h("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 va=class{constructor(t={}){this._options=t;}createChatCompletions(t={},e){return w.fromPromise(this.__createChatCompletions(t,e))}async __createChatCompletions(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Vo.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(o.ok)return {data:Jc.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 h("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 Sa=class{constructor(t={}){this._options=t;}findDashboards(t={},e){return w.fromPromise(this.__findDashboards(t,e))}async __findDashboards(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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: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:Xc.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 h("Timeout exceeded when calling GET /v1/private/dashboards.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createDashboard(t,e){return w.fromPromise(this.__createDashboard(t,e))}async __createDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Ho.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(o.ok)return {data:tr.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 h("Timeout exceeded when calling POST /v1/private/dashboards.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDashboardById(t,e){return w.fromPromise(this.__getDashboardById(t,e))}async __getDashboardById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),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:tr.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 _(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 h("Timeout exceeded when calling GET /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDashboard(t,e){return w.fromPromise(this.__deleteDashboard(t,e))}async __deleteDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),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 h("Timeout exceeded when calling DELETE /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDashboard(t,e={},o){return w.fromPromise(this.__updateDashboard(t,e,o))}async __updateDashboard(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),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:Jo.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(i.ok)return {data:tr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);case 409:throw new F(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDashboardsBatch(t,e){return w.fromPromise(this.__deleteDashboardsBatch(t,e))}async __deleteDashboardsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/dashboards/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:B.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(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 h("Timeout exceeded when calling POST /v1/private/dashboards/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var _a=class{constructor(t={}){this._options=t;}batchUpdateDatasetItems(t,e){return w.fromPromise(this.__batchUpdateDatasetItems(t,e))}async __batchUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Mr.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400: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 h("Timeout exceeded when calling PATCH /v1/private/datasets/items/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findDatasets(t={},e){return w.fromPromise(this.__findDatasets(t,e))}async __findDatasets(t={},e){var v,S;let{page:o,size:i,withExperimentsOnly:n,withOptimizationsOnly:c,promptId:m,name:u,sorting:g,filters:f}=t,y={};o!=null&&(y.page=o.toString()),i!=null&&(y.size=i.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),f!=null&&(y.filters=f);let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.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(z.ok)return {data:ml.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}createDataset(t,e){return w.fromPromise(this.__createDataset(t,e))}async __createDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Fr.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(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 h("Timeout exceeded when calling POST /v1/private/datasets.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createOrUpdateDatasetItems(t,e){return w.fromPromise(this.__createOrUpdateDatasetItems(t,e))}async __createOrUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Wr.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(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 h("Timeout exceeded when calling PUT /v1/private/datasets/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createDatasetItemsFromCsv(t,e){return w.fromPromise(this.__createDatasetItemsFromCsv(t,e))}async __createDatasetItemsFromCsv(t,e){var c,m;let o=await Qg();o.append("file",Ie(t.file)),o.append("dataset_id",t.datasetId);let i=await o.getRequest(),n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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(),...i.headers,...e==null?void 0:e.headers},requestType:"file",duplex:i.duplex,body:i.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 T(n.error.body,n.rawResponse);case 404:throw new _(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 h("Timeout exceeded when calling POST /v1/private/datasets/items/from-csv.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}createDatasetItemsFromSpans(t,e,o){return w.fromPromise(this.__createDatasetItemsFromSpans(t,e,o))}async __createDatasetItemsFromSpans(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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:Br.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-spans.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createDatasetItemsFromTraces(t,e,o){return w.fromPromise(this.__createDatasetItemsFromTraces(t,e,o))}async __createDatasetItemsFromTraces(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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:Lr.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-traces.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetById(t,e){return w.fromPromise(this.__getDatasetById(t,e))}async __getDatasetById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),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:xr.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 h("Timeout exceeded when calling GET /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDataset(t,e,o){return w.fromPromise(this.__updateDataset(t,e,o))}async __updateDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),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: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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/datasets/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDataset(t,e){return w.fromPromise(this.__deleteDataset(t,e))}async __deleteDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),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 h("Timeout exceeded when calling DELETE /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetByName(t,e){return w.fromPromise(this.__deleteDatasetByName(t,e))}async __deleteDatasetByName(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Hr.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(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 h("Timeout exceeded when calling POST /v1/private/datasets/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetItems(t,e){return w.fromPromise(this.__deleteDatasetItems(t,e))}async __deleteDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Jr.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(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 h("Timeout exceeded when calling POST /v1/private/datasets/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetsBatch(t,e){return w.fromPromise(this.__deleteDatasetsBatch(t,e))}async __deleteDatasetsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/datasets/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}expandDataset(t,e,o){return w.fromPromise(this.__expandDataset(t,e,o))}async __expandDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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: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(i.ok)return {data:Qc.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/expansions.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findDatasetItemsWithExperimentItems(t,e,o){return w.fromPromise(this.__findDatasetItemsWithExperimentItems(t,e,o))}async __findDatasetItemsWithExperimentItems(t,e,o){var v,S;let{page:i,size:n,experimentIds:c,filters:m,sorting:u,search:g,truncate:f}=e,y={};i!=null&&(y.page=i.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),f!=null&&(y.truncate=f.toString());let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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(z.ok)return {data:pl.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}getDatasetByIdentifier(t,e){return w.fromPromise(this.__getDatasetByIdentifier(t,e))}async __getDatasetByIdentifier(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Kr.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(o.ok)return {data:xr.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 h("Timeout exceeded when calling POST /v1/private/datasets/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDatasetExperimentItemsStats(t,e,o){return w.fromPromise(this.__getDatasetExperimentItemsStats(t,e,o))}async __getDatasetExperimentItemsStats(t,e,o){var u,g;let{experimentIds:i,filters:n}=e,c={};c.experiment_ids=i,n!=null&&(c.filters=n);let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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:ir.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 h("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(t,e){return w.fromPromise(this.__getDatasetItemById(t,e))}async __getDatasetItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),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:xt.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 h("Timeout exceeded when calling GET /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}patchDatasetItem(t,e,o){return w.fromPromise(this.__patchDatasetItem(t,e,o))}async __patchDatasetItem(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),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:Or.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetItems(t,e={},o){return w.fromPromise(this.__getDatasetItems(t,e,o))}async __getDatasetItems(t,e={},o){var y,z;let{page:i,size:n,version:c,filters:m,truncate:u}=e,g={};i!=null&&(g.page=i.toString()),n!=null&&(g.size=n.toString()),c!=null&&(g.version=c),m!=null&&(g.filters=m),u!=null&&(g.truncate=u.toString());let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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:g,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(f.ok)return {data:yl.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}getDatasetItemsOutputColumns(t,e={},o){return w.fromPromise(this.__getDatasetItemsOutputColumns(t,e,o))}async __getDatasetItemsOutputColumns(t,e={},o){var m,u;let{experimentIds:i}=e,n={};i!=null&&(n.experiment_ids=i);let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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:vl.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 h("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(t,e){return w.fromPromise(this.__streamDatasetItems(t,e))}async __streamDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Gr.jsonOrThrow(t,{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 h("Timeout exceeded when calling POST /v1/private/datasets/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}compareDatasetVersions(t,e){return w.fromPromise(this.__compareDatasetVersions(t,e))}async __compareDatasetVersions(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/diff`),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:Tl.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 _(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 h("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions/diff.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createVersionTag(t,e,o,i){return w.fromPromise(this.__createVersionTag(t,e,o,i))}async __createVersionTag(t,e,o,i){var c,m;let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(t)}/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(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",body:$r.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 T(n.error.body,n.rawResponse);case 404:throw new _(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 h("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(t,e={},o){return w.fromPromise(this.__listDatasetVersions(t,e,o))}async __listDatasetVersions(t,e={},o){var u,g;let{page:i,size:n}=e,c={};i!=null&&(c.page=i.toString()),n!=null&&(c.size=n.toString());let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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:Al.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 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 h("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}createDatasetVersion(t,e={},o){return w.fromPromise(this.__createDatasetVersion(t,e,o))}async __createDatasetVersion(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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: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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new T(i.error.body,i.rawResponse);case 409:throw new F(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteVersionTag(t,e,o,i){return w.fromPromise(this.__deleteVersionTag(t,e,o,i))}async __deleteVersionTag(t,e,o,i){var c,m;let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,`v1/private/datasets/${encodeURIComponent(o)}/versions/${encodeURIComponent(t)}/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(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 h("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})}}restoreDatasetVersion(t,e,o){return w.fromPromise(this.__restoreDatasetVersion(t,e,o))}async __restoreDatasetVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/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",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(i.ok)return {data:Rt.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ta=class{constructor(t={}){this._options=t;}findExperiments(t={},e){return w.fromPromise(this.__findExperiments(t,e))}async __findExperiments(t={},e){var O,M;let{page:o,size:i,datasetId:n,optimizationId:c,types:m,name:u,datasetDeleted:g,promptId:f,sorting:y,filters:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.datasetId=n),c!=null&&(v.optimization_id=c),m!=null&&(v.types=m),u!=null&&(v.name=u),g!=null&&(v.dataset_deleted=g.toString()),f!=null&&(v.prompt_id=f),y!=null&&(v.sorting=y),z!=null&&(v.filters=z);let S=await x({url:R((M=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?M:b.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:v,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 T(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 h("Timeout exceeded when calling GET /v1/private/experiments.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}createExperiment(t,e){return w.fromPromise(this.__createExperiment(t,e))}async __createExperiment(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Zr.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(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 h("Timeout exceeded when calling POST /v1/private/experiments.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createExperimentItems(t,e){return w.fromPromise(this.__createExperimentItems(t,e))}async __createExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:eo.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(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 h("Timeout exceeded when calling POST /v1/private/experiments/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentItems(t,e){return w.fromPromise(this.__deleteExperimentItems(t,e))}async __deleteExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ro.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(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 h("Timeout exceeded when calling POST /v1/private/experiments/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentsById(t,e){return w.fromPromise(this.__deleteExperimentsById(t,e))}async __deleteExperimentsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Rr.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(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 h("Timeout exceeded when calling POST /v1/private/experiments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}experimentItemsBulk(t,e){return w.fromPromise(this.__experimentItemsBulk(t,e))}async __experimentItemsBulk(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:to.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new T(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling PUT /v1/private/experiments/items/bulk.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames(t={},e){return w.fromPromise(this.__findFeedbackScoreNames(t,e))}async __findFeedbackScoreNames(t={},e){var c,m;let{experimentIds:o}=t,i={};o!=null&&(i.experiment_ids=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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:i,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:hr.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 h("Timeout exceeded when calling GET /v1/private/experiments/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findExperimentGroups(t={},e){return w.fromPromise(this.__findExperimentGroups(t,e))}async __findExperimentGroups(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,m={};o!=null&&(m.groups=o),i!=null&&(m.types=i),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:Jl.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 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 h("Timeout exceeded when calling GET /v1/private/experiments/groups.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}findExperimentGroupsAggregations(t={},e){return w.fromPromise(this.__findExperimentGroupsAggregations(t,e))}async __findExperimentGroupsAggregations(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,m={};o!=null&&(m.groups=o),i!=null&&(m.types=i),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:Gl.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 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 h("Timeout exceeded when calling GET /v1/private/experiments/groups/aggregations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}finishExperiments(t,e){return w.fromPromise(this.__finishExperiments(t,e))}async __finishExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Rr.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400: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 h("Timeout exceeded when calling POST /v1/private/experiments/finish.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getExperimentById(t,e){return w.fromPromise(this.__getExperimentById(t,e))}async __getExperimentById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),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:zt.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 _(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 h("Timeout exceeded when calling GET /v1/private/experiments/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateExperiment(t,e={},o){return w.fromPromise(this.__updateExperiment(t,e,o))}async __updateExperiment(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new T(i.error.body,i.rawResponse);case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/experiments/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getExperimentItemById(t,e){return w.fromPromise(this.__getExperimentItemById(t,e))}async __getExperimentItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/items/${encodeURIComponent(t)}`),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:bt.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 _(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 h("Timeout exceeded when calling GET /v1/private/experiments/items/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperimentItems(t,e){return w.fromPromise(this.__streamExperimentItems(t,e))}async __streamExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:no.jsonOrThrow(t,{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 h("Timeout exceeded when calling POST /v1/private/experiments/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperiments(t,e){return w.fromPromise(this.__streamExperiments(t,e))}async __streamExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:so.jsonOrThrow(t,{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 h("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 Aa=class{constructor(t={}){this._options=t;}findFeedbackDefinitions(t={},e){return w.fromPromise(this.__findFeedbackDefinitions(t,e))}async __findFeedbackDefinitions(t={},e){var g,f;let{page:o,size:i,name:n,type:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.type=Ui.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}));let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:hm.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 h("Timeout exceeded when calling GET /v1/private/feedback-definitions.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createFeedbackDefinition(t,e){return w.fromPromise(this.__createFeedbackDefinition(t,e))}async __createFeedbackDefinition(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:lm.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(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 h("Timeout exceeded when calling POST /v1/private/feedback-definitions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getFeedbackDefinitionById(t,e){return w.fromPromise(this.__getFeedbackDefinitionById(t,e))}async __getFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),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:bm.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 h("Timeout exceeded when calling GET /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateFeedbackDefinition(t,e,o){return w.fromPromise(this.__updateFeedbackDefinition(t,e,o))}async __updateFeedbackDefinition(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),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:_m.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteFeedbackDefinitionById(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionById(t,e))}async __deleteFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),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 h("Timeout exceeded when calling DELETE /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteFeedbackDefinitionsBatch(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionsBatch(t,e))}async __deleteFeedbackDefinitionsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("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 Ea=class{constructor(t={}){this._options=t;}createGuardrails(t,e){return w.fromPromise(this.__createGuardrails(t,e))}async __createGuardrails(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Xo.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(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 h("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 Pa=class{constructor(t={}){this._options=t;}deleteLlmProviderApiKeysBatch(t,e){return w.fromPromise(this.__deleteLlmProviderApiKeysBatch(t,e))}async __deleteLlmProviderApiKeysBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/llm-provider-key/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findLlmProviderKeys(t){return w.fromPromise(this.__findLlmProviderKeys(t))}async __findLlmProviderKeys(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:Cm.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 h("Timeout exceeded when calling GET /v1/private/llm-provider-key.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}storeLlmProviderApiKey(t,e){return w.fromPromise(this.__storeLlmProviderApiKey(t,e))}async __storeLlmProviderApiKey(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:po.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(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(ae.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 h("Timeout exceeded when calling POST /v1/private/llm-provider-key.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getLlmProviderApiKeyById(t,e){return w.fromPromise(this.__getLlmProviderApiKeyById(t,e))}async __getLlmProviderApiKeyById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),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:Tt.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 _(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 h("Timeout exceeded when calling GET /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateLlmProviderApiKey(t,e={},o){return w.fromPromise(this.__updateLlmProviderApiKey(t,e,o))}async __updateLlmProviderApiKey(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),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: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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new $(i.error.body,i.rawResponse);case 403:throw new Z(ae.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),i.rawResponse);case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ca=class{constructor(t={}){this._options=t;}evaluateThreads(t,e){return w.fromPromise(this.__evaluateThreads(t,e))}async __evaluateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ua.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(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")switch(o.error.statusCode){case 400:throw new T(o.error.body,o.rawResponse);case 404: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 h("Timeout exceeded when calling POST /v1/private/manual-evaluation/threads.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateTraces(t,e){return w.fromPromise(this.__evaluateTraces(t,e))}async __evaluateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ua.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(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")switch(o.error.statusCode){case 400:throw new T(o.error.body,o.rawResponse);case 404: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 h("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 ja=class{constructor(t={}){this._options=t;}receiveProtobufTraces(t){return w.fromPromise(this.__receiveProtobufTraces(t))}async __receiveProtobufTraces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(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 h("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 Ia=class{constructor(t={}){this._options=t;}cancelStudioOptimizations(t,e){return w.fromPromise(this.__cancelStudioOptimizations(t,e))}async __cancelStudioOptimizations(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/cancel`),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:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 501:throw new Ve(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 h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}/cancel.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findOptimizations(t={},e){return w.fromPromise(this.__findOptimizations(t,e))}async __findOptimizations(t={},e){var y,z;let{page:o,size:i,datasetId:n,name:c,datasetDeleted:m,filters:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),n!=null&&(g.dataset_id=n),c!=null&&(g.name=c),m!=null&&(g.dataset_deleted=m.toString()),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.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: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(f.ok)return {data:fa.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 400:throw new T(f.error.body,f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}createOptimization(t,e){return w.fromPromise(this.__createOptimization(t,e))}async __createOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ga.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(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 h("Timeout exceeded when calling POST /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}upsertOptimization(t,e){return w.fromPromise(this.__upsertOptimization(t,e))}async __upsertOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ga.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(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 h("Timeout exceeded when calling PUT /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteOptimizationsById(t,e){return w.fromPromise(this.__deleteOptimizationsById(t,e))}async __deleteOptimizationsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Rr.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(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 h("Timeout exceeded when calling POST /v1/private/optimizations/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findStudioOptimizations(t={},e){return w.fromPromise(this.__findStudioOptimizations(t,e))}async __findStudioOptimizations(t={},e){var y,z;let{page:o,size:i,datasetId:n,name:c,datasetDeleted:m,filters:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),n!=null&&(g.dataset_id=n),c!=null&&(g.name=c),m!=null&&(g.dataset_deleted=m.toString()),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/optimizations/studio"),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(f.ok)return {data:fa.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 400:throw new T(f.error.body,f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/studio.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}getOptimizationById(t,e){return w.fromPromise(this.__getOptimizationById(t,e))}async __getOptimizationById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),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:yr.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 _(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 h("Timeout exceeded when calling GET /v1/private/optimizations/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateOptimizationsById(t,e={},o){return w.fromPromise(this.__updateOptimizationsById(t,e,o))}async __updateOptimizationsById(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),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:lo.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/optimizations/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getStudioOptimizationById(t,e){return w.fromPromise(this.__getStudioOptimizationById(t,e))}async __getStudioOptimizationById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}`),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:yr.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 _(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 h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getStudioOptimizationLogs(t,e){return w.fromPromise(this.__getStudioOptimizationLogs(t,e))}async __getStudioOptimizationLogs(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/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(),...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:id.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 _(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 h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}/logs.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ua=class{constructor(t={}){this._options=t;}findProjects(t={},e){return w.fromPromise(this.__findProjects(t,e))}async __findProjects(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:sd.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 h("Timeout exceeded when calling GET /v1/private/projects.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createProject(t,e){return w.fromPromise(this.__createProject(t,e))}async __createProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:mo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new T(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/projects.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getProjectById(t,e){return w.fromPromise(this.__getProjectById(t,e))}async __getProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),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:Et.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 h("Timeout exceeded when calling GET /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteProjectById(t,e){return w.fromPromise(this.__deleteProjectById(t,e))}async __deleteProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),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 h("Timeout exceeded when calling DELETE /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateProject(t,e={},o){return w.fromPromise(this.__updateProject(t,e,o))}async __updateProject(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new T(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/projects/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteProjectsBatch(t,e){return w.fromPromise(this.__deleteProjectsBatch(t,e))}async __deleteProjectsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/projects/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNamesByProjectIds(t={},e){return w.fromPromise(this.__findFeedbackScoreNamesByProjectIds(t,e))}async __findFeedbackScoreNamesByProjectIds(t={},e){var c,m;let{projectIds:o}=t,i={};o!=null&&(i.project_ids=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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:i,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:cd.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 h("Timeout exceeded when calling GET /v1/private/projects/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getProjectMetrics(t,e={},o){return w.fromPromise(this.__getProjectMetrics(t,e,o))}async __getProjectMetrics(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}/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: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(i.ok)return {data:gd.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new T(i.error.body,i.rawResponse);case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/{id}/metrics.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getProjectStats(t={},e){return w.fromPromise(this.__getProjectStats(t,e))}async __getProjectStats(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:hd.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 h("Timeout exceeded when calling GET /v1/private/projects/stats.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}retrieveProject(t,e){return w.fromPromise(this.__retrieveProject(t,e))}async __retrieveProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:fo.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(o.ok)return {data:yd.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 T(o.error.body,o.rawResponse);case 404:throw new _(o.error.body,o.rawResponse);case 422:throw new L(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 h("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 Da=class{constructor(t={}){this._options=t;}getPrompts(t={},e){return w.fromPromise(this.__getPrompts(t,e))}async __getPrompts(t={},e){var f,y;let{page:o,size:i,name:n,sorting:c,filters:m}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.sorting=c),m!=null&&(u.filters=m);let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.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:Dd.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 h("Timeout exceeded when calling GET /v1/private/prompts.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createPrompt(t,e){return w.fromPromise(this.__createPrompt(t,e))}async __createPrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ho.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new T(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/prompts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createPromptVersion(t,e){return w.fromPromise(this.__createPromptVersion(t,e))}async __createPromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:wo.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(o.ok)return {data:Se.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 T(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptById(t,e){return w.fromPromise(this.__getPromptById(t,e))}async __getPromptById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),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:Ad.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 _(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 h("Timeout exceeded when calling GET /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePrompt(t,e,o){return w.fromPromise(this.__updatePrompt(t,e,o))}async __updatePrompt(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),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:bo.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new T(i.error.body,i.rawResponse);case 404:throw new _(i.error.body,i.rawResponse);case 409:throw new F(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/prompts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deletePrompt(t,e){return w.fromPromise(this.__deletePrompt(t,e))}async __deletePrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),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 h("Timeout exceeded when calling DELETE /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deletePromptsBatch(t,e){return w.fromPromise(this.__deletePromptsBatch(t,e))}async __deletePromptsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/prompts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersionById(t,e){return w.fromPromise(this.__getPromptVersionById(t,e))}async __getPromptVersionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/versions/${encodeURIComponent(t)}`),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:Se.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 _(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 h("Timeout exceeded when calling GET /v1/private/prompts/versions/{versionId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersions(t,e={},o){return w.fromPromise(this.__getPromptVersions(t,e,o))}async __getPromptVersions(t,e={},o){var u,g;let{page:i,size:n}=e,c={};i!=null&&(c.page=i.toString()),n!=null&&(c.size=n.toString());let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/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:jd.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 h("Timeout exceeded when calling GET /v1/private/prompts/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}restorePromptVersion(t,e,o){return w.fromPromise(this.__restorePromptVersion(t,e,o))}async __restorePromptVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/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(i.ok)return {data:Se.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new T(i.error.body,i.rawResponse);case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/{promptId}/versions/{versionId}/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}retrievePromptVersion(t,e){return w.fromPromise(this.__retrievePromptVersion(t,e))}async __retrievePromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:xo.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(o.ok)return {data:Se.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 T(o.error.body,o.rawResponse);case 404:throw new _(o.error.body,o.rawResponse);case 422:throw new L(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 h("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 Na=class{constructor(t={}){this._options=t;}getServiceToggles(t){return w.fromPromise(this.__getServiceToggles(t))}async __getServiceToggles(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:Nd.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 h("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 Ma=class{constructor(t={}){this._options=t;}addSpanComment(t,e,o){return w.fromPromise(this.__addSpanComment(t,e,o))}async __addSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addSpanFeedbackScore(t,e,o){return w.fromPromise(this.__addSpanFeedbackScore(t,e,o))}async __addSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/spans/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createSpans(t,e){return w.fromPromise(this.__createSpans(t,e))}async __createSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ko.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(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 h("Timeout exceeded when calling POST /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateSpans(t,e){return w.fromPromise(this.__batchUpdateSpans(t,e))}async __batchUpdateSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:vo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400: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 h("Timeout exceeded when calling PATCH /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpansByProject(t={},e){return w.fromPromise(this.__getSpansByProject(t,e))}async __getSpansByProject(t={},e){var te,lr;let{page:o,size:i,projectName:n,projectId:c,traceId:m,type:u,filters:g,truncate:f,stripAttachments:y,sorting:z,exclude:v,fromTime:S,toTime:O}=t,M={};o!=null&&(M.page=o.toString()),i!=null&&(M.size=i.toString()),n!=null&&(M.project_name=n),c!=null&&(M.project_id=c),m!=null&&(M.trace_id=m),u!=null&&(M.type=$i.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"})),g!=null&&(M.filters=g),f!=null&&(M.truncate=f.toString()),y!=null&&(M.strip_attachments=y.toString()),z!=null&&(M.sorting=z),v!=null&&(M.exclude=v),S!=null&&(M.from_time=S.toISOString()),O!=null&&(M.to_time=O.toISOString());let G=await x({url:R((lr=(te=await s.get(this._options.baseUrl))!=null?te:await s.get(this._options.environment))!=null?lr:b.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:Bd.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 h("Timeout exceeded when calling GET /v1/private/spans.");case "unknown":throw new p({message:G.error.errorMessage,rawResponse:G.rawResponse})}}createSpan(t,e){return w.fromPromise(this.__createSpan(t,e))}async __createSpan(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:yo.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(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 h("Timeout exceeded when calling POST /v1/private/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpanById(t,e={},o){return w.fromPromise(this.__getSpanById(t,e,o))}async __getSpanById(t,e={},o){var m,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),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:jt.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 _(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 h("Timeout exceeded when calling GET /v1/private/spans/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteSpanById(t,e){return w.fromPromise(this.__deleteSpanById(t,e))}async __deleteSpanById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),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 Ve(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 h("Timeout exceeded when calling DELETE /v1/private/spans/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpan(t,e,o){return w.fromPromise(this.__updateSpan(t,e,o))}async __updateSpan(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteSpanComments(t,e){return w.fromPromise(this.__deleteSpanComments(t,e))}async __deleteSpanComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/spans/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteSpanFeedbackScore(t,e,o){return w.fromPromise(this.__deleteSpanFeedbackScore(t,e,o))}async __deleteSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/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:Pt.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findFeedbackScoreNames1(t={},e){return w.fromPromise(this.__findFeedbackScoreNames1(t,e))}async __findFeedbackScoreNames1(t={},e){var m,u;let{projectId:o,type:i}=t,n={};o!=null&&(n.project_id=o),i!=null&&(n.type=Qi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}));let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.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:wr.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 h("Timeout exceeded when calling GET /v1/private/spans/feedback-scores/names.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getSpanComment(t,e,o){return w.fromPromise(this.__getSpanComment(t,e,o))}async __getSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/{spanId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getSpanStats(t={},e){return w.fromPromise(this.__getSpanStats(t,e))}async __getSpanStats(t={},e){var z,v;let{projectId:o,projectName:i,traceId:n,type:c,filters:m,fromTime:u,toTime:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.project_name=i),n!=null&&(f.trace_id=n),c!=null&&(f.type=Yi.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"})),m!=null&&(f.filters=m),u!=null&&(f.from_time=u.toISOString()),g!=null&&(f.to_time=g.toISOString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.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:f,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:ir.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 h("Timeout exceeded when calling GET /v1/private/spans/stats.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}scoreBatchOfSpans(t,e){return w.fromPromise(this.__scoreBatchOfSpans(t,e))}async __scoreBatchOfSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:It.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(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 h("Timeout exceeded when calling PUT /v1/private/spans/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchSpans(t={},e){return w.fromPromise(this.__searchSpans(t,e))}async __searchSpans(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:_o.jsonOrThrow(t,{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 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 h("Timeout exceeded when calling POST /v1/private/spans/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpanComment(t,e,o){return w.fromPromise(this.__updateSpanComment(t,e,o))}async __updateSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Fa=class{constructor(t={}){this._options=t;}addThreadComment(t,e,o){return w.fromPromise(this.__addThreadComment(t,e,o))}async __addThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}/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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceComment(t,e,o){return w.fromPromise(this.__addTraceComment(t,e,o))}async __addTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceFeedbackScore(t,e,o){return w.fromPromise(this.__addTraceFeedbackScore(t,e,o))}async __addTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createTraces(t,e){return w.fromPromise(this.__createTraces(t,e))}async __createTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Ao.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(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 h("Timeout exceeded when calling POST /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateTraces(t,e){return w.fromPromise(this.__batchUpdateTraces(t,e))}async __batchUpdateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Po.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400: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 h("Timeout exceeded when calling PATCH /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateThreads(t,e){return w.fromPromise(this.__batchUpdateThreads(t,e))}async __batchUpdateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:jo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400: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 h("Timeout exceeded when calling PATCH /v1/private/traces/threads/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}closeTraceThread(t={},e){return w.fromPromise(this.__closeTraceThread(t,e))}async __closeTraceThread(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Io.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404: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 h("Timeout exceeded when calling PUT /v1/private/traces/threads/close.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTracesByProject(t={},e){return w.fromPromise(this.__getTracesByProject(t,e))}async __getTracesByProject(t={},e){var M,G;let{page:o,size:i,projectName:n,projectId:c,filters:m,truncate:u,stripAttachments:g,sorting:f,exclude:y,fromTime:z,toTime:v}=t,S={};o!=null&&(S.page=o.toString()),i!=null&&(S.size=i.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()),f!=null&&(S.sorting=f),y!=null&&(S.exclude=y),z!=null&&(S.from_time=z.toISOString()),v!=null&&(S.to_time=v.toISOString());let O=await x({url:R((G=(M=await s.get(this._options.baseUrl))!=null?M:await s.get(this._options.environment))!=null?G:b.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:Yd.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 h("Timeout exceeded when calling GET /v1/private/traces.");case "unknown":throw new p({message:O.error.errorMessage,rawResponse:O.rawResponse})}}createTrace(t,e){return w.fromPromise(this.__createTrace(t,e))}async __createTrace(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:To.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(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 h("Timeout exceeded when calling POST /v1/private/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceById(t,e={},o){return w.fromPromise(this.__getTraceById(t,e,o))}async __getTraceById(t,e={},o){var m,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),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:Ut.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 h("Timeout exceeded when calling GET /v1/private/traces/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteTraceById(t,e){return w.fromPromise(this.__deleteTraceById(t,e))}async __deleteTraceById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),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 h("Timeout exceeded when calling DELETE /v1/private/traces/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateTrace(t,e,o){return w.fromPromise(this.__updateTrace(t,e,o))}async __updateTrace(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteThreadComments(t,e){return w.fromPromise(this.__deleteThreadComments(t,e))}async __deleteThreadComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/traces/threads/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteThreadFeedbackScores(t,e){return w.fromPromise(this.__deleteThreadFeedbackScores(t,e))}async __deleteThreadFeedbackScores(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Uo.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(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 h("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(t,e){return w.fromPromise(this.__deleteTraceComments(t,e))}async __deleteTraceComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/traces/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceFeedbackScore(t,e,o){return w.fromPromise(this.__deleteTraceFeedbackScore(t,e,o))}async __deleteTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/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:Pt.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteTraceThreads(t,e){return w.fromPromise(this.__deleteTraceThreads(t,e))}async __deleteTraceThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Do.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(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 h("Timeout exceeded when calling POST /v1/private/traces/threads/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraces(t,e){return w.fromPromise(this.__deleteTraces(t,e))}async __deleteTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/traces/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames2(t={},e){return w.fromPromise(this.__findFeedbackScoreNames2(t,e))}async __findFeedbackScoreNames2(t={},e){var c,m;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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:i,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:Xe.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 h("Timeout exceeded when calling GET /v1/private/traces/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findTraceThreadsFeedbackScoreNames(t={},e){return w.fromPromise(this.__findTraceThreadsFeedbackScoreNames(t,e))}async __findTraceThreadsFeedbackScoreNames(t={},e){var c,m;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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:i,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:Xe.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 h("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(t={},e){return w.fromPromise(this.__getTraceStats(t,e))}async __getTraceStats(t={},e){var f,y;let{projectId:o,projectName:i,filters:n,fromTime:c,toTime:m}=t,u={};o!=null&&(u.project_id=o),i!=null&&(u.project_name=i),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),m!=null&&(u.to_time=m.toISOString());let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.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:ir.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 h("Timeout exceeded when calling GET /v1/private/traces/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getThreadComment(t,e,o){return w.fromPromise(this.__getThreadComment(t,e,o))}async __getThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/{threadId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceComment(t,e,o){return w.fromPromise(this.__getTraceComment(t,e,o))}async __getTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/{traceId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceThread(t,e){return w.fromPromise(this.__getTraceThread(t,e))}async __getTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ha.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(o.ok)return {data:Dt.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 _(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 h("Timeout exceeded when calling POST /v1/private/traces/threads/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceThreads(t={},e){return w.fromPromise(this.__getTraceThreads(t,e))}async __getTraceThreads(t={},e){var O,M;let{page:o,size:i,projectName:n,projectId:c,truncate:m,stripAttachments:u,filters:g,sorting:f,fromTime:y,toTime:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.project_name=n),c!=null&&(v.project_id=c),m!=null&&(v.truncate=m.toString()),u!=null&&(v.strip_attachments=u.toString()),g!=null&&(v.filters=g),f!=null&&(v.sorting=f),y!=null&&(v.from_time=y.toISOString()),z!=null&&(v.to_time=z.toISOString());let S=await x({url:R((M=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?M:b.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:v,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:Qd.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 h("Timeout exceeded when calling GET /v1/private/traces/threads.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}openTraceThread(t,e){return w.fromPromise(this.__openTraceThread(t,e))}async __openTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ha.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(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 h("Timeout exceeded when calling PUT /v1/private/traces/threads/open.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfThreads(t,e){return w.fromPromise(this.__scoreBatchOfThreads(t,e))}async __scoreBatchOfThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:No.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(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 h("Timeout exceeded when calling PUT /v1/private/traces/threads/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfTraces(t,e){return w.fromPromise(this.__scoreBatchOfTraces(t,e))}async __scoreBatchOfTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:It.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(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 h("Timeout exceeded when calling PUT /v1/private/traces/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraceThreads(t={},e){return w.fromPromise(this.__searchTraceThreads(t,e))}async __searchTraceThreads(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Mo.jsonOrThrow(t,{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 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 h("Timeout exceeded when calling POST /v1/private/traces/threads/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraces(t={},e){return w.fromPromise(this.__searchTraces(t,e))}async __searchTraces(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Fo.jsonOrThrow(t,{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 T(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 h("Timeout exceeded when calling POST /v1/private/traces/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateThread(t,e,o){return w.fromPromise(this.__updateThread(t,e,o))}async __updateThread(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}`),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: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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/{threadModelId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateThreadComment(t,e,o){return w.fromPromise(this.__updateThreadComment(t,e,o))}async __updateThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateTraceComment(t,e,o){return w.fromPromise(this.__updateTraceComment(t,e,o))}async __updateTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Oa=class{constructor(t={}){this._options=t;}getWelcomeWizardStatus(t){return w.fromPromise(this.__getWelcomeWizardStatus(t))}async __getWelcomeWizardStatus(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:Zd.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 h("Timeout exceeded when calling GET /v1/private/welcome-wizard.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}submitWelcomeWizard(t={},e){return w.fromPromise(this.__submitWelcomeWizard(t,e))}async __submitWelcomeWizard(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Ko.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(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 h("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 Wa=class{constructor(t={}){this._options=t;}costsSummary(t,e){return w.fromPromise(this.__costsSummary(t,e))}async __costsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:zr.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(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")switch(o.error.statusCode){case 400: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 h("Timeout exceeded when calling POST /v1/private/workspaces/costs/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceConfiguration(t){return w.fromPromise(this.__getWorkspaceConfiguration(t))}async __getWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:Nt.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 _(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 h("Timeout exceeded when calling GET /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}upsertWorkspaceConfiguration(t,e){return w.fromPromise(this.__upsertWorkspaceConfiguration(t,e))}async __upsertWorkspaceConfiguration(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Nt.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(o.ok)return {data:Nt.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 T(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling PUT /v1/private/workspaces/configurations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteWorkspaceConfiguration(t){return w.fromPromise(this.__deleteWorkspaceConfiguration(t))}async __deleteWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:void 0,rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new _(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 h("Timeout exceeded when calling DELETE /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getCost(t,e){return w.fromPromise(this.__getCost(t,e))}async __getCost(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:zr.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(o.ok)return {data:wa.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 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 h("Timeout exceeded when calling POST /v1/private/workspaces/costs.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getMetric(t,e){return w.fromPromise(this.__getMetric(t,e))}async __getMetric(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:zr.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(o.ok)return {data:wa.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 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 h("Timeout exceeded when calling POST /v1/private/workspaces/metrics.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}metricsSummary(t,e){return w.fromPromise(this.__metricsSummary(t,e))}async __metricsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:zr.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(o.ok)return {data:qd.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 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 h("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 Ba=class{constructor(t={}){this._options=t;}datasetsRedirect(t,e){return w.fromPromise(this.__datasetsRedirect(t,e))}async __datasetsRedirect(t,e){var u,g;let{datasetId:o,workspaceName:i,path:n}=t,c={};c.dataset_id=o,i!=null&&(c.workspace_name=i),c.path=n;let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.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 T(m.error.body,m.rawResponse);case 404: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 h("Timeout exceeded when calling GET /v1/session/redirect/datasets.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}experimentsRedirect(t,e){return w.fromPromise(this.__experimentsRedirect(t,e))}async __experimentsRedirect(t,e){var g,f;let{datasetId:o,experimentId:i,workspaceName:n,path:c}=t,m={};m.dataset_id=o,m.experiment_id=i,n!=null&&(m.workspace_name=n),m.path=c;let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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 T(u.error.body,u.rawResponse);case 404: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 h("Timeout exceeded when calling GET /v1/session/redirect/experiments.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}optimizationsRedirect(t,e){return w.fromPromise(this.__optimizationsRedirect(t,e))}async __optimizationsRedirect(t,e){var g,f;let{datasetId:o,optimizationId:i,workspaceName:n,path:c}=t,m={};m.dataset_id=o,m.optimization_id=i,n!=null&&(m.workspace_name=n),m.path=c;let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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 T(u.error.body,u.rawResponse);case 404: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 h("Timeout exceeded when calling GET /v1/session/redirect/optimizations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}projectsRedirect(t,e){return w.fromPromise(this.__projectsRedirect(t,e))}async __projectsRedirect(t,e){var u,g;let{traceId:o,workspaceName:i,path:n}=t,c={};c.trace_id=o,i!=null&&(c.workspace_name=i),c.path=n;let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.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 T(m.error.body,m.rawResponse);case 404: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 h("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 Mt=class{constructor(t={}){this._options=t;}get systemUsage(){var t;return (t=this._systemUsage)!=null?t:this._systemUsage=new ba(this._options)}get alerts(){var t;return (t=this._alerts)!=null?t:this._alerts=new xa(this._options)}get annotationQueues(){var t;return (t=this._annotationQueues)!=null?t:this._annotationQueues=new Ra(this._options)}get attachments(){var t;return (t=this._attachments)!=null?t:this._attachments=new ya(this._options)}get check(){var t;return (t=this._check)!=null?t:this._check=new ka(this._options)}get automationRuleEvaluators(){var t;return (t=this._automationRuleEvaluators)!=null?t:this._automationRuleEvaluators=new za(this._options)}get chatCompletions(){var t;return (t=this._chatCompletions)!=null?t:this._chatCompletions=new va(this._options)}get dashboards(){var t;return (t=this._dashboards)!=null?t:this._dashboards=new Sa(this._options)}get datasets(){var t;return (t=this._datasets)!=null?t:this._datasets=new _a(this._options)}get experiments(){var t;return (t=this._experiments)!=null?t:this._experiments=new Ta(this._options)}get feedbackDefinitions(){var t;return (t=this._feedbackDefinitions)!=null?t:this._feedbackDefinitions=new Aa(this._options)}get guardrails(){var t;return (t=this._guardrails)!=null?t:this._guardrails=new Ea(this._options)}get llmProviderKey(){var t;return (t=this._llmProviderKey)!=null?t:this._llmProviderKey=new Pa(this._options)}get manualEvaluation(){var t;return (t=this._manualEvaluation)!=null?t:this._manualEvaluation=new Ca(this._options)}get openTelemetryIngestion(){var t;return (t=this._openTelemetryIngestion)!=null?t:this._openTelemetryIngestion=new ja(this._options)}get optimizations(){var t;return (t=this._optimizations)!=null?t:this._optimizations=new Ia(this._options)}get projects(){var t;return (t=this._projects)!=null?t:this._projects=new Ua(this._options)}get prompts(){var t;return (t=this._prompts)!=null?t:this._prompts=new Da(this._options)}get serviceToggles(){var t;return (t=this._serviceToggles)!=null?t:this._serviceToggles=new Na(this._options)}get spans(){var t;return (t=this._spans)!=null?t:this._spans=new Ma(this._options)}get traces(){var t;return (t=this._traces)!=null?t:this._traces=new Fa(this._options)}get welcomeWizard(){var t;return (t=this._welcomeWizard)!=null?t:this._welcomeWizard=new Oa(this._options)}get workspaces(){var t;return (t=this._workspaces)!=null?t:this._workspaces=new Wa(this._options)}get redirect(){var t;return (t=this._redirect)!=null?t:this._redirect=new Ba(this._options)}isAlive(t){return w.fromPromise(this.__isAlive(t))}async __isAlive(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(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 h("Timeout exceeded when calling GET /is-alive/ping.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}version(t){return w.fromPromise(this.__version(t))}async __version(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(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 h("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 oe=()=>uuid.v7();var La=class a{constructor(t,e){this.data=t;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=t=>{var o;let e={parentSpanId:this.data.parentSpanId,projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,traceId:this.data.traceId,...t};return this.opik.spanBatchQueue.update(this.data.id,e),this.data={...this.data,...t},this};this.span=t=>{var n;let e=(n=this.data.projectName)!=null?n:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new a(o,this.opik);return this.childSpans.push(i),i};}};var Va=class{constructor(t,e){this.data=t;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=t=>{var n,c;let e=(c=(n=this.data.projectName)!=null?n:t.projectName)!=null?c:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new La(o,this.opik);return this.spans.push(i),i};this.update=t=>{var o;let e={projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,...t};return this.opik.traceBatchQueue.update(this.data.id,e),this.data={...this.data,...e},this};}};var Sf={EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECT_BY_NAME:"redirect/projects"},Ha={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",PROJECT_NAME:"name",PATH:"path"},qx=a=>Object.entries(a).map(([t,e])=>`${t}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),eR=a=>a.replace(/\/api$/,""),rR=a=>Buffer.from(a).toString("base64"),_f=(a,t,e)=>{let o=qx(e),i=`${t}?${o}`;return new URL(i,a).toString()},Tf=({datasetId:a,experimentId:t,baseUrl:e})=>_f(e,Sf.EXPERIMENTS,{[Ha.EXPERIMENT_ID]:t,[Ha.DATASET_ID]:a,[Ha.PATH]:rR(e)});var Af=({projectName:a,workspaceName:t,apiUrl:e})=>{let o=eR(e),i=`${t}/${Sf.PROJECT_BY_NAME}`;return _f(o,i,{[Ha.PROJECT_NAME]:a})};var oR=300,Ja=100,Ft=class{constructor({action:t,batchSize:e=Ja,delay:o,enableBatch:i,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=(t,e)=>{if(this.queue.set(t,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(t,e)=>{let o=this.queue.get(t);o&&(this.queue.set(t,{...o,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let t=new Map(this.queue);this.queue.clear(),k.debug(`Adding ${t.size} items to ${this.name} promise:`,t),this.promise=this.promise.finally(()=>(k.debug(`Flushing ${this.name}:`,t),this.action(t))).catch(e=>{k.error(`Failed to flush ${this.name}:`,e,t);}),await this.promise;};this.action=t,this.batchSize=e,this.delay=o,this.enableBatch=i,this.name=n;}},ge=class{constructor({delay:t=oR,enableCreateBatch:e=true,enableUpdateBatch:o=false,enableDeleteBatch:i=true,createBatchSize:n=Ja,updateBatchSize:c=Ja,deleteBatchSize:m=Ja,name:u="BatchQueue"}={}){this.create=t=>{let e=this.getId(t);this.createQueue.add(e,t);};this.get=async t=>{let e=this.createQueue.queue.get(t);return e||this.getEntity(t)};this.update=(t,e)=>{if(this.createQueue.queue.get(t)){this.createQueue.update(t,e);return}this.updateQueue.add(t,e);};this.delete=t=>{if(this.createQueue.queue.has(t)){this.createQueue.queue.delete(t);return}this.deleteQueue.add(t);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=u,this.createQueue=new Ft({action:async g=>{await this.createEntities(Array.from(g.values()));},delay:t,enableBatch:e,batchSize:n,name:`${u}:createQueue`}),this.updateQueue=new Ft({action:async g=>{await this.createQueue.flush();let f=Array.from(g.entries());for(let[y,z]of f)await this.updateEntity(y,z);},delay:t,enableBatch:o,batchSize:c,name:`${u}:updateQueue`}),this.deleteQueue=new Ft({action:async g=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(g.keys()));},delay:t,enableBatch:i,batchSize:m,name:`${u}:deleteQueue`});}};var Xa=class extends ge{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 Ka=class extends ge{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 Ga=class extends ge{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 $a=class extends ge{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 Qa=class extends Mt{constructor(e){super(e);this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};var Ya=class extends ge{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 eu=null;async function Ef(){return eu||(eu=await tR__default.default()),eu}var Ot=class a{constructor(t){let{id:e,traceId:o,spanId:i,source:n,...c}=t;this.id=e||oe(),this.traceId=o,this.spanId=i,this.source=n||Wn.Sdk,this.data={...c};}getContent(t=false){return t?{...this.data,id:this.id}:{...this.data}}async contentHash(){let t=this.getContent(),e=iR__default.default(t);return (await Ef()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent()}}static fromApiModel(t){return new a({id:t.id,traceId:t.traceId,spanId:t.spanId,source:t.source,...t.data})}};async function Ne(a,t,e){var c;if(e===0)return [];let o=new util.TextDecoder("utf-8"),i=[],n="";try{for await(let m of a){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 f=JSON.parse(g),y=t.parse(f);if(y.ok){if(i.push(y.value),e!==void 0&&i.length>=e)return i}else k.error("Error parsing experiment item:",y.errors);}catch(f){k.error("Error parsing JSON line:",f instanceof Error?f.message:String(f));}}if(n.trim()&&n!=="{}"&&n!=="[]"&&n!=="null")try{let m=JSON.parse(n),u=t.parse(m);u.ok?i.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 i}function
|
|
1
|
+
'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),Eu=require('fs'),Uh=require('ini');require('dotenv/config');var Eb=require('qs'),uuid=require('uuid'),sR=require('fast-json-stable-stringify'),nR=require('xxhash-wasm'),util=require('util'),dR=require('mustache'),fR=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),bR=require('fast-deep-equal'),async_hooks=require('async_hooks'),dn=require('chalk'),ER=require('boxen'),PR=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 Eu__default=/*#__PURE__*/_interopDefault(Eu);var Uh__default=/*#__PURE__*/_interopDefault(Uh);var Eb__default=/*#__PURE__*/_interopDefault(Eb);var sR__default=/*#__PURE__*/_interopDefault(sR);var nR__default=/*#__PURE__*/_interopDefault(nR);var dR__default=/*#__PURE__*/_interopDefault(dR);var fR__default=/*#__PURE__*/_interopDefault(fR);var bR__default=/*#__PURE__*/_interopDefault(bR);var dn__default=/*#__PURE__*/_interopDefault(dn);var ER__default=/*#__PURE__*/_interopDefault(ER);var PR__default=/*#__PURE__*/_interopDefault(PR);var yu=Object.create;var mr=Object.defineProperty;var ku=Object.getOwnPropertyDescriptor;var yh=Object.getOwnPropertyNames;var kh=Object.getPrototypeOf,zh=Object.prototype.hasOwnProperty;var zu=(a,t)=>(t=Symbol[a])?t:Symbol.for("Symbol."+a),jr=a=>{throw TypeError(a)};var vh=(a,t,e)=>t in a?mr(a,t,{enumerable:true,configurable:true,writable:true,value:e}):a[t]=e;var ue=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(t,e)=>(typeof require!="undefined"?require:t)[e]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var zn=(a,t)=>()=>(a&&(t=a(a=0)),t);var Y=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),E=(a,t)=>{for(var e in t)mr(a,e,{get:t[e],enumerable:true});},Sh=(a,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of yh(t))!zh.call(a,i)&&i!==e&&mr(a,i,{get:()=>t[i],enumerable:!(o=ku(t,i))||o.enumerable});return a};var _h=(a,t,e)=>(e=a!=null?yu(kh(a)):{},Sh(mr(e,"default",{value:a,enumerable:true}),a));var vu=a=>{var t;return [,,,yu((t=void 0)!=null?t:null)]},Su=["class","method","getter","setter","accessor","field","value","get","set"],Cr=a=>a!==void 0&&typeof a!="function"?jr("Function expected"):a,Ah=(a,t,e,o,i)=>({kind:Su[a],name:t,metadata:o,addInitializer:n=>e._?jr("Already initialized"):i.push(Cr(n||null))}),vn=(a,t)=>vh(t,zu("metadata"),a[3]),_u=(a,t,e,o)=>{for(var i=0,n=a[t>>1],c=n&&n.length;i<c;i++)n[i].call(e);return o},Au=(a,t,e,o,i,n)=>{var m,u,g,f,y=t&7,z=false,v=false,S=2,O=Su[y+5],G=a[S]||(a[S]=[]),te=((i=i.prototype),ku(i,e));for(var lr=o.length-1;lr>=0;lr--)g=Ah(y,e,u={},a[3],G),(g.static=z,g.private=v,f=g.access={has:pe=>e in pe},(f.get=pe=>pe[e]),y>2),m=(0, o[lr])(te[O],g),u._=1,Cr(m)&&(te[O]=m);return te&&mr(i,e,te),i};var sg={};E(sg,{Node18UniversalStreamWrapper:()=>Vn});var Vn,pg=zn(()=>{Vn=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.on("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.on("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.off("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.off("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);});}destroy(t){this.reader.cancel(t).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:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var cg={};E(cg,{UndiciStreamWrapper:()=>Hn});var Hn,lg=zn(()=>{Hn=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.on("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.on("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.off("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.off("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);});}destroy(t){this.reader.cancel(t).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:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var mg={};E(mg,{NodePre18StreamWrapper:()=>Jn});var Jn,dg=zn(()=>{Jn=class{constructor(t){this.readableStream=t;}on(t,e){this.readableStream.on(t,e);}off(t,e){this.readableStream.off(t,e);}pipe(t){return this.readableStream.pipe(t),t}pipeTo(t){return this.pipe(t)}unpipe(t){t?this.readableStream.unpipe(t):this.readableStream.unpipe();}destroy(t){this.readableStream.destroy(t);}pause(){this.readableStream.pause();}resume(){this.readableStream.resume();}get isPaused(){return this.readableStream.isPaused()}async read(){return new Promise((t,e)=>{let o=this.readableStream.read();o?t(o):(this.readableStream.once("readable",()=>{let i=this.readableStream.read();t(i);}),this.readableStream.once("error",e));})}setEncoding(t){this.readableStream.setEncoding(t),this.encoding=t;}async text(){let t=[],e=new TextEncoder;this.readableStream.setEncoding(this.encoding||"utf-8");for await(let i of this.readableStream)t.push(e.encode(i));return new TextDecoder(this.encoding||"utf-8").decode(Buffer.concat(t))}async json(){let t=await this.text();return JSON.parse(t)}[Symbol.asyncIterator](){let e=this.readableStream[Symbol.asyncIterator]();return {async next(){let{value:o,done:i}=await e.next();return {value:o,done:i}},[Symbol.asyncIterator](){return this}}}};});var yg=Y((fD,Rg)=>{var xg=ue("stream").Stream,Ub=ue("util");Rg.exports=we;function we(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=true,this._maxDataSizeExceeded=false,this._released=false,this._bufferedEvents=[];}Ub.inherits(we,xg);we.create=function(a,t){var e=new this;t=t||{};for(var o in t)e[o]=t[o];e.source=a;var i=a.emit;return a.emit=function(){return e._handleEmit(arguments),i.apply(a,arguments)},a.on("error",function(){}),e.pauseStream&&a.pause(),e};Object.defineProperty(we.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});we.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};we.prototype.resume=function(){this._released||this.release(),this.source.resume();};we.prototype.pause=function(){this.source.pause();};we.prototype.release=function(){this._released=true,this._bufferedEvents.forEach(function(a){this.emit.apply(this,a);}.bind(this)),this._bufferedEvents=[];};we.prototype.pipe=function(){var a=xg.prototype.pipe.apply(this,arguments);return this.resume(),a};we.prototype._handleEmit=function(a){if(this._released){this.emit.apply(this,a);return}a[0]==="data"&&(this.dataSize+=a[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(a);};we.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=true;var a="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(a));}};});var Sg=Y((hD,vg)=>{var Db=ue("util"),zg=ue("stream").Stream,kg=yg();vg.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;}Db.inherits(V,zg);V.create=function(a){var t=new this;a=a||{};for(var e in a)t[e]=a[e];return t};V.isStreamLike=function(a){return typeof a!="function"&&typeof a!="string"&&typeof a!="boolean"&&typeof a!="number"&&!Buffer.isBuffer(a)};V.prototype.append=function(a){var t=V.isStreamLike(a);if(t){if(!(a instanceof kg)){var e=kg.create(a,{maxDataSize:1/0,pauseStream:this.pauseStreams});a.on("data",this._checkDataSize.bind(this)),a=e;}this._handleErrors(a),this.pauseStreams&&a.pause();}return this._streams.push(a),this};V.prototype.pipe=function(a,t){return zg.prototype.pipe.call(this,a,t),this.resume(),a};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 a=this._streams.shift();if(typeof a=="undefined"){this.end();return}if(typeof a!="function"){this._pipeNext(a);return}var t=a;t(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(a){this._currentStream=a;var t=V.isStreamLike(a);if(t){a.on("end",this._getNext.bind(this)),a.pipe(this,{end:false});return}var e=a;this.write(e),this._getNext();};V.prototype._handleErrors=function(a){var t=this;a.on("error",function(e){t._emitError(e);});};V.prototype.write=function(a){this.emit("data",a);};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 a="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(a));}};V.prototype._updateDataSize=function(){this.dataSize=0;var a=this;this._streams.forEach(function(t){t.dataSize&&(a.dataSize+=t.dataSize);}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize);};V.prototype._emitError=function(a){this._reset(),this.emit("error",a);};});var _g=Y((wD,Nb)=>{Nb.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 Tg=Y((bD,Ag)=>{Ag.exports=_g();});var Cg=Y(ie=>{var ui=Tg(),Mb=ue("path").extname,Eg=/^\s*([^;\s]*)(?:;|\s|$)/,Fb=/^text\//i;ie.charset=Pg;ie.charsets={lookup:Pg};ie.contentType=Ob;ie.extension=Wb;ie.extensions=Object.create(null);ie.lookup=Bb;ie.types=Object.create(null);Lb(ie.extensions,ie.types);function Pg(a){if(!a||typeof a!="string")return false;var t=Eg.exec(a),e=t&&ui[t[1].toLowerCase()];return e&&e.charset?e.charset:t&&Fb.test(t[1])?"UTF-8":false}function Ob(a){if(!a||typeof a!="string")return false;var t=a.indexOf("/")===-1?ie.lookup(a):a;if(!t)return false;if(t.indexOf("charset")===-1){var e=ie.charset(t);e&&(t+="; charset="+e.toLowerCase());}return t}function Wb(a){if(!a||typeof a!="string")return false;var t=Eg.exec(a),e=t&&ie.extensions[t[1].toLowerCase()];return !e||!e.length?false:e[0]}function Bb(a){if(!a||typeof a!="string")return false;var t=Mb("x."+a).toLowerCase().substr(1);return t&&ie.types[t]||false}function Lb(a,t){var e=["nginx","apache",void 0,"iana"];Object.keys(ui).forEach(function(i){var n=ui[i],c=n.extensions;if(!(!c||!c.length)){a[i]=c;for(var m=0;m<c.length;m++){var u=c[m];if(t[u]){var g=e.indexOf(ui[t[u]].source),f=e.indexOf(n.source);if(t[u]!=="application/octet-stream"&&(g>f||g===f&&t[u].substr(0,12)==="application/"))continue}t[u]=i;}}});}});var Ig=Y((RD,jg)=>{jg.exports=Vb;function Vb(a){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(a):setTimeout(a,0);}});var Xn=Y((yD,Dg)=>{var Ug=Ig();Dg.exports=Hb;function Hb(a){var t=false;return Ug(function(){t=true;}),function(o,i){t?a(o,i):Ug(function(){a(o,i);});}}});var Kn=Y((kD,Ng)=>{Ng.exports=Jb;function Jb(a){Object.keys(a.jobs).forEach(Xb.bind(a)),a.jobs={};}function Xb(a){typeof this.jobs[a]=="function"&&this.jobs[a]();}});var Gn=Y((zD,Fg)=>{var Mg=Xn(),Kb=Kn();Fg.exports=Gb;function Gb(a,t,e,o){var i=e.keyedList?e.keyedList[e.index]:e.index;e.jobs[i]=$b(t,i,a[i],function(n,c){i in e.jobs&&(delete e.jobs[i],n?Kb(e):e.results[i]=c,o(n,e.results));});}function $b(a,t,e,o){var i;return a.length==2?i=a(e,Mg(o)):i=a(e,t,Mg(o)),i}});var $n=Y((vD,Og)=>{Og.exports=Qb;function Qb(a,t){var e=!Array.isArray(a),o={index:0,keyedList:e||t?Object.keys(a):null,jobs:{},results:e?{}:[],size:e?Object.keys(a).length:a.length};return t&&o.keyedList.sort(e?t:function(i,n){return t(a[i],a[n])}),o}});var Qn=Y((SD,Wg)=>{var Yb=Kn(),Zb=Xn();Wg.exports=qb;function qb(a){Object.keys(this.jobs).length&&(this.index=this.size,Yb(this),Zb(a)(null,this.results));}});var Lg=Y((_D,Bg)=>{var ex=Gn(),rx=$n(),ox=Qn();Bg.exports=tx;function tx(a,t,e){for(var o=rx(a);o.index<(o.keyedList||a).length;)ex(a,t,o,function(i,n){if(i){e(i,n);return}if(Object.keys(o.jobs).length===0){e(null,o.results);return}}),o.index++;return ox.bind(o,e)}});var Yn=Y((AD,gi)=>{var Vg=Gn(),ix=$n(),ax=Qn();gi.exports=nx;gi.exports.ascending=Hg;gi.exports.descending=sx;function nx(a,t,e,o){var i=ix(a,e);return Vg(a,t,i,function n(c,m){if(c){o(c,m);return}if(i.index++,i.index<(i.keyedList||a).length){Vg(a,t,i,n);return}o(null,i.results);}),ax.bind(i,o)}function Hg(a,t){return a<t?-1:a>t?1:0}function sx(a,t){return -1*Hg(a,t)}});var Xg=Y((TD,Jg)=>{var px=Yn();Jg.exports=cx;function cx(a,t,e){return px(a,t,null,e)}});var Gg=Y((ED,Kg)=>{Kg.exports={parallel:Lg(),serial:Xg(),serialOrdered:Yn()};});var Qg=Y((PD,$g)=>{$g.exports=function(a,t){return Object.keys(t).forEach(function(e){a[e]=a[e]||t[e];}),a};});var Zg=Y((CD,Yg)=>{var rs=Sg(),lx=ue("util"),Zn=ue("path"),mx=ue("http"),dx=ue("https"),ux=ue("url").parse,gx=ue("fs"),fx=ue("stream").Stream,qn=Cg(),hx=Gg(),es=Qg();Yg.exports=C;lx.inherits(C,rs);function C(a){if(!(this instanceof C))return new C(a);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],rs.call(this),a=a||{};for(var t in a)this[t]=a[t];}C.LINE_BREAK=`\r
|
|
2
|
+
`;C.DEFAULT_CONTENT_TYPE="application/octet-stream";C.prototype.append=function(a,t,e){e=e||{},typeof e=="string"&&(e={filename:e});var o=rs.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(a,t,e),n=this._multiPartFooter();o(i),o(t),o(n),this._trackLength(i,t,e);};C.prototype._trackLength=function(a,t,e){var o=0;e.knownLength!=null?o+=+e.knownLength:Buffer.isBuffer(t)?o=t.length:typeof t=="string"&&(o=Buffer.byteLength(t)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(a)+C.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof fx))&&(e.knownLength||this._valuesToMeasure.push(t));};C.prototype._lengthRetriever=function(a,t){a.hasOwnProperty("fd")?a.end!=null&&a.end!=1/0&&a.start!=null?t(null,a.end+1-(a.start?a.start:0)):gx.stat(a.path,function(e,o){var i;if(e){t(e);return}i=o.size-(a.start?a.start:0),t(null,i);}):a.hasOwnProperty("httpVersion")?t(null,+a.headers["content-length"]):a.hasOwnProperty("httpModule")?(a.on("response",function(e){a.pause(),t(null,+e.headers["content-length"]);}),a.resume()):t("Unknown stream");};C.prototype._multiPartHeader=function(a,t,e){if(typeof e.header=="string")return e.header;var o=this._getContentDisposition(t,e),i=this._getContentType(t,e),n="",c={"Content-Disposition":["form-data",'name="'+a+'"'].concat(o||[]),"Content-Type":[].concat(i||[])};typeof e.header=="object"&&es(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("; ")+C.LINE_BREAK)));return "--"+this.getBoundary()+C.LINE_BREAK+n+C.LINE_BREAK};C.prototype._getContentDisposition=function(a,t){var e,o;return typeof t.filepath=="string"?e=Zn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||a.name||a.path?e=Zn.basename(t.filename||a.name||a.path):a.readable&&a.hasOwnProperty("httpVersion")&&(e=Zn.basename(a.client._httpMessage.path||"")),e&&(o='filename="'+e+'"'),o};C.prototype._getContentType=function(a,t){var e=t.contentType;return !e&&a.name&&(e=qn.lookup(a.name)),!e&&a.path&&(e=qn.lookup(a.path)),!e&&a.readable&&a.hasOwnProperty("httpVersion")&&(e=a.headers["content-type"]),!e&&(t.filepath||t.filename)&&(e=qn.lookup(t.filepath||t.filename)),!e&&typeof a=="object"&&(e=C.DEFAULT_CONTENT_TYPE),e};C.prototype._multiPartFooter=function(){return function(a){var t=C.LINE_BREAK,e=this._streams.length===0;e&&(t+=this._lastBoundary()),a(t);}.bind(this)};C.prototype._lastBoundary=function(){return "--"+this.getBoundary()+"--"+C.LINE_BREAK};C.prototype.getHeaders=function(a){var t,e={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in a)a.hasOwnProperty(t)&&(e[t.toLowerCase()]=a[t]);return e};C.prototype.setBoundary=function(a){this._boundary=a;};C.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};C.prototype.getBuffer=function(){for(var a=new Buffer.alloc(0),t=this.getBoundary(),e=0,o=this._streams.length;e<o;e++)typeof this._streams[e]!="function"&&(Buffer.isBuffer(this._streams[e])?a=Buffer.concat([a,this._streams[e]]):a=Buffer.concat([a,Buffer.from(this._streams[e])]),(typeof this._streams[e]!="string"||this._streams[e].substring(2,t.length+2)!==t)&&(a=Buffer.concat([a,Buffer.from(C.LINE_BREAK)])));return Buffer.concat([a,Buffer.from(this._lastBoundary())])};C.prototype._generateBoundary=function(){for(var a="--------------------------",t=0;t<24;t++)a+=Math.floor(Math.random()*10).toString(16);this._boundary=a;};C.prototype.getLengthSync=function(){var a=this._overheadLength+this._valueLength;return this._streams.length&&(a+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),a};C.prototype.hasKnownLength=function(){var a=true;return this._valuesToMeasure.length&&(a=false),a};C.prototype.getLength=function(a){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(a.bind(this,null,t));return}hx.parallel(this._valuesToMeasure,this._lengthRetriever,function(e,o){if(e){a(e);return}o.forEach(function(i){t+=i;}),a(null,t);});};C.prototype.submit=function(a,t){var e,o,i={method:"post"};return typeof a=="string"?(a=ux(a),o=es({port:a.port,path:a.pathname,host:a.hostname,protocol:a.protocol},i)):(o=es(a,i),o.port||(o.port=o.protocol=="https:"?443:80)),o.headers=this.getHeaders(a.headers),o.protocol=="https:"?e=dx.request(o):e=mx.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),t){var m,u=function(g,f){return e.removeListener("error",u),e.removeListener("response",m),t.call(this,g,f)};m=u.bind(this,null),e.on("error",u),e.on("response",m);}}.bind(this)),e};C.prototype._error=function(a){this.error||(this.error=a,this.pause(),this.emit("error",a));};C.prototype.toString=function(){return "[object FormData]"};});var jh={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};function qt(a,t=a){return ansiEscapes.link(t,a)}var k=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),Tu=a=>{k.settings.minLevel=jh[a];},Ih=()=>{k.settings.minLevel=100;};Tu(process.env.OPIK_LOG_LEVEL||"INFO");var Dh="~/.opik.config",_n={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false};function Pu(a){return Object.fromEntries(Object.entries(a).filter(([,t])=>t!==void 0))}function Nh(){return Pu({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 Mh(){let a=process.env.OPIK_CONFIG_PATH||Dh;if(!Eu__default.default.existsSync(a)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${a}`);return {}}try{let t=Uh__default.default.parse(Eu__default.default.readFileSync(a,"utf8"));return t.opik?Pu({apiKey:t.opik.api_key,apiUrl:t.opik.url_override,projectName:t.opik.project_name,workspaceName:t.opik.workspace}):{}}catch(t){return k.error(`Error loading config file ${a}: ${t}`),{}}}function Cu(a){let t=Nh(),e=Mh(),{headers:o,...i}=a||{};return Fh({..._n,...e,...t,...i})}function Fh(a){if(!a.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");let t=Oh(a.apiUrl);if(t&&!a.apiKey)throw new Error("OPIK_API_KEY is not set");if(t&&!a.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return a}function Oh(a){return new URL(a).hostname.endsWith("comet.com")}var X={};E(X,{AlertAlertType:()=>Wh,AlertPublicAlertType:()=>Gh,AlertTriggerConfigPublicType:()=>Xh,AlertTriggerConfigType:()=>Lh,AlertTriggerConfigWriteType:()=>Vh,AlertTriggerEventType:()=>Bh,AlertTriggerPublicEventType:()=>Kh,AlertTriggerWriteEventType:()=>Hh,AlertWriteAlertType:()=>Jh,AnnotationQueuePublicScope:()=>Zh,AnnotationQueueScope:()=>Qh,AnnotationQueueWriteScope:()=>Yh,AssistantMessageRole:()=>ww,AttachmentListRequestEntityType:()=>Iu,BadRequestError:()=>A,CheckName:()=>Fw,CheckPublicName:()=>zb,CheckPublicResult:()=>vb,CheckResult:()=>Ow,ColumnCompareTypesItem:()=>_w,ColumnPublicTypesItem:()=>Dw,ColumnTypesItem:()=>Nw,CompleteMultipartUploadRequestEntityType:()=>qh,ConflictError:()=>M,CreatePromptVersionDetailTemplateStructure:()=>Zu,DatasetItemCompareSource:()=>Aw,DatasetItemFilterOperator:()=>xw,DatasetItemPublicSource:()=>Iw,DatasetItemSource:()=>kw,DatasetItemWriteSource:()=>Bn,DatasetPublicStatus:()=>jw,DatasetPublicVisibility:()=>Cw,DatasetStatus:()=>yw,DatasetUpdateVisibility:()=>Fu,DatasetVisibility:()=>Rw,DatasetWriteVisibility:()=>Mu,DeleteAttachmentsRequestEntityType:()=>ew,DownloadAttachmentRequestEntityType:()=>Uu,ExperimentItemCompareTraceVisibilityMode:()=>Tw,ExperimentItemPublicTraceVisibilityMode:()=>Uw,ExperimentItemTraceVisibilityMode:()=>zw,ExperimentPublicStatus:()=>Jw,ExperimentPublicType:()=>Hw,ExperimentStatus:()=>Mw,ExperimentType:()=>Ln,ExperimentUpdateStatus:()=>Lu,ExperimentUpdateType:()=>Bu,ExperimentWriteStatus:()=>Wu,ExperimentWriteType:()=>Ou,FeedbackScoreBatchItemSource:()=>kb,FeedbackScoreBatchItemThreadSource:()=>Ab,FeedbackScoreCompareSource:()=>Ew,FeedbackScoreExperimentItemBulkWriteViewSource:()=>Bw,FeedbackScorePublicSource:()=>xb,FeedbackScoreSource:()=>vw,FindFeedbackDefinitionsRequestType:()=>Vu,FindFeedbackScoreNames1RequestType:()=>eg,ForbiddenError:()=>Z,GetSpanStatsRequestType:()=>rg,GetSpansByProjectRequestType:()=>qu,GetWebhookExamplesRequestAlertType:()=>ju,GuardrailName:()=>Xw,GuardrailResult:()=>Kw,GuardrailWriteName:()=>Gw,GuardrailWriteResult:()=>$w,LlmAsJudgeMessagePublicRole:()=>mw,LlmAsJudgeMessageRole:()=>rw,LlmAsJudgeMessageWriteRole:()=>nw,LlmAsJudgeOutputSchemaPublicType:()=>dw,LlmAsJudgeOutputSchemaType:()=>ow,LlmAsJudgeOutputSchemaWriteType:()=>sw,LogItemLevel:()=>hw,ManualEvaluationRequestEntityType:()=>Zw,NotFoundError:()=>_,NotImplementedError:()=>Ve,OptimizationPublicStatus:()=>rb,OptimizationStatus:()=>qw,OptimizationUpdateStatus:()=>Ju,OptimizationWriteStatus:()=>eb,ProjectDetailedVisibility:()=>nb,ProjectMetricRequestPublicInterval:()=>$u,ProjectMetricRequestPublicMetricType:()=>Gu,ProjectMetricResponsePublicInterval:()=>ab,ProjectMetricResponsePublicMetricType:()=>ib,ProjectPublicVisibility:()=>tb,ProjectUpdateVisibility:()=>Ku,ProjectVisibility:()=>ob,ProjectWriteVisibility:()=>Xu,PromptDetailTemplateStructure:()=>ub,PromptPublicTemplateStructure:()=>hb,PromptTemplateStructure:()=>pb,PromptType:()=>sb,PromptVersionDetailTemplateStructure:()=>db,PromptVersionDetailType:()=>mb,PromptVersionPublicTemplateStructure:()=>fb,PromptVersionPublicType:()=>gb,PromptVersionTemplateStructure:()=>lb,PromptVersionType:()=>cb,PromptWriteTemplateStructure:()=>Yu,PromptWriteType:()=>Qu,ProviderApiKeyProvider:()=>Yw,ProviderApiKeyPublicProvider:()=>Qw,ProviderApiKeyWriteProvider:()=>Hu,ResponseFormatType:()=>bw,SpanExperimentItemBulkWriteViewType:()=>Lw,SpanFilterOperator:()=>tw,SpanFilterPublicOperator:()=>uw,SpanFilterWriteOperator:()=>pw,SpanPublicType:()=>Rb,SpanSearchStreamRequestPublicType:()=>og,SpanType:()=>ve,SpanUpdateType:()=>wb,SpanWriteType:()=>bb,StartMultipartUploadRequestEntityType:()=>Du,TraceFilterOperator:()=>iw,TraceFilterPublicOperator:()=>gw,TraceFilterWriteOperator:()=>cw,TracePublicVisibilityMode:()=>Sb,TraceThreadFilterOperator:()=>aw,TraceThreadFilterPublicOperator:()=>fw,TraceThreadFilterWriteOperator:()=>lw,TraceThreadStatus:()=>_b,TraceVisibilityMode:()=>Ww,UnauthorizedError:()=>$,UnprocessableEntityError:()=>L,UploadAttachmentRequestEntityType:()=>Nu,ValueEntryCompareSource:()=>Pw,ValueEntryExperimentItemBulkWriteViewSource:()=>Vw,ValueEntryPublicSource:()=>yb,ValueEntrySource:()=>Sw,WebhookTestResultStatus:()=>$h,alerts:()=>ei,annotationQueues:()=>Tn,attachments:()=>ri,automationRuleEvaluators:()=>Pn,chatCompletions:()=>Cn,check:()=>En,dashboards:()=>jn,datasets:()=>oi,experiments:()=>ti,feedbackDefinitions:()=>ii,guardrails:()=>In,llmProviderKey:()=>ai,manualEvaluation:()=>Un,openTelemetryIngestion:()=>Dn,optimizations:()=>ni,projects:()=>si,prompts:()=>pi,redirect:()=>Wn,serviceToggles:()=>Nn,spans:()=>ci,systemUsage:()=>An,traces:()=>Mn,welcomeWizard:()=>Fn,workspaces:()=>On});var ei={};E(ei,{GetWebhookExamplesRequestAlertType:()=>ju});var ju={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var ri={};E(ri,{AttachmentListRequestEntityType:()=>Iu,DownloadAttachmentRequestEntityType:()=>Uu,StartMultipartUploadRequestEntityType:()=>Du,UploadAttachmentRequestEntityType:()=>Nu});var Iu={Trace:"trace",Span:"span"};var Uu={Trace:"trace",Span:"span"};var Du={Trace:"trace",Span:"span"};var Nu={Trace:"trace",Span:"span"};var oi={};E(oi,{DatasetUpdateVisibility:()=>Fu,DatasetWriteVisibility:()=>Mu});var Mu={Private:"private",Public:"public"};var Fu={Private:"private",Public:"public"};var ti={};E(ti,{ExperimentUpdateStatus:()=>Lu,ExperimentUpdateType:()=>Bu,ExperimentWriteStatus:()=>Wu,ExperimentWriteType:()=>Ou});var Ou={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Wu={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Bu={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Lu={Running:"running",Completed:"completed",Cancelled:"cancelled"};var ii={};E(ii,{FindFeedbackDefinitionsRequestType:()=>Vu});var Vu={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};var ai={};E(ai,{ProviderApiKeyWriteProvider:()=>Hu});var Hu={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var ni={};E(ni,{OptimizationUpdateStatus:()=>Ju});var Ju={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var si={};E(si,{ProjectMetricRequestPublicInterval:()=>$u,ProjectMetricRequestPublicMetricType:()=>Gu,ProjectUpdateVisibility:()=>Ku,ProjectWriteVisibility:()=>Xu});var Xu={Private:"private",Public:"public"};var Ku={Private:"private",Public:"public"};var Gu={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 $u={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var pi={};E(pi,{CreatePromptVersionDetailTemplateStructure:()=>Zu,PromptWriteTemplateStructure:()=>Yu,PromptWriteType:()=>Qu});var Qu={Mustache:"mustache",Jinja2:"jinja2"};var Yu={Text:"text",Chat:"chat"};var Zu={Text:"text",Chat:"chat"};var ci={};E(ci,{FindFeedbackScoreNames1RequestType:()=>eg,GetSpanStatsRequestType:()=>rg,GetSpansByProjectRequestType:()=>qu,SpanSearchStreamRequestPublicType:()=>og});var qu={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var eg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var rg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var og={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var An={};var Tn={};var En={};var Pn={};var Cn={};var jn={};var In={};var Un={};var Dn={};var Nn={};var Mn={};var Fn={};var On={};var Wn={};var Wh={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Bh={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 Lh={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Vh={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Hh={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 Jh={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Xh={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Kh={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 Gh={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var $h={Success:"success",Failure:"failure"};var Qh={Trace:"trace",Thread:"thread"};var Yh={Trace:"trace",Thread:"thread"};var Zh={Trace:"trace",Thread:"thread"};var qh={Trace:"trace",Span:"span"};var ew={Trace:"trace",Span:"span"};var rw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var ow={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var tw={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 iw={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 aw={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 nw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var sw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var pw={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 cw={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 lw={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 mw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var dw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var uw={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 gw={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 fw={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 hw={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};var ww={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};var bw={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};var xw={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 yw={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var kw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var zw={Default:"default",Hidden:"hidden"};var vw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Sw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Bn={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var _w={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Aw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Tw={Default:"default",Hidden:"hidden"};var Ew={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Pw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Cw={Private:"private",Public:"public"};var jw={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Iw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Uw={Default:"default",Hidden:"hidden"};var Dw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Nw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Ln={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Mw={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Fw={Topic:"TOPIC",Pii:"PII"};var Ow={Passed:"passed",Failed:"failed"};var ve={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Ww={Default:"default",Hidden:"hidden"};var Bw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Lw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Vw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Hw={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Jw={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Xw={Topic:"TOPIC",Pii:"PII"};var Kw={Passed:"passed",Failed:"failed"};var Gw={Topic:"TOPIC",Pii:"PII"};var $w={Passed:"passed",Failed:"failed"};var Qw={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Yw={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Zw={Trace:"trace",Thread:"thread"};var qw={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var eb={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var rb={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var ob={Private:"private",Public:"public"};var tb={Private:"private",Public:"public"};var ib={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 ab={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var nb={Private:"private",Public:"public"};var sb={Mustache:"mustache",Jinja2:"jinja2"};var pb={Text:"text",Chat:"chat"};var cb={Mustache:"mustache",Jinja2:"jinja2"};var lb={Text:"text",Chat:"chat"};var mb={Mustache:"mustache",Jinja2:"jinja2"};var db={Text:"text",Chat:"chat"};var ub={Text:"text",Chat:"chat"};var gb={Mustache:"mustache",Jinja2:"jinja2"};var fb={Text:"text",Chat:"chat"};var hb={Text:"text",Chat:"chat"};var wb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var bb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var xb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Rb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var yb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var kb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var zb={Topic:"TOPIC",Pii:"PII"};var vb={Passed:"passed",Failed:"failed"};var Sb={Default:"default",Hidden:"hidden"};var _b={Active:"active",Inactive:"inactive"};var Ab={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ie=(a,t,e)=>JSON.stringify(a,t,e);var p=class a extends Error{constructor({message:t,statusCode:e,body:o,rawResponse:i}){super(Tb({message:t,statusCode:e,body:o})),Object.setPrototypeOf(this,a.prototype),this.statusCode=e,this.body=o,this.rawResponse=i;}};function Tb({message:a,statusCode:t,body:e}){let o=[];return a!=null&&o.push(a),t!=null&&o.push(`Status code: ${t.toString()}`),e!=null&&o.push(`Body: ${Ie(e,void 0,2)}`),o.join(`
|
|
3
|
+
`)}var h=class a extends Error{constructor(t){super(t),Object.setPrototypeOf(this,a.prototype);}};var A=class a extends p{constructor(t,e){super({message:"BadRequestError",statusCode:400,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var M=class a extends p{constructor(t,e){super({message:"ConflictError",statusCode:409,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var L=class a extends p{constructor(t,e){super({message:"UnprocessableEntityError",statusCode:422,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var _=class a extends p{constructor(t,e){super({message:"NotFoundError",statusCode:404,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var $=class a extends p{constructor(t,e){super({message:"UnauthorizedError",statusCode:401,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Z=class a extends p{constructor(t,e){super({message:"ForbiddenError",statusCode:403,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Ve=class a extends p{constructor(t,e){super({message:"NotImplementedError",statusCode:501,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var b={Default:"http://localhost:5173/api"};var Ir;typeof globalThis.Headers!="undefined"?Ir=globalThis.Headers:Ir=class tg{constructor(t){if(this.headers=new Map,t)if(t instanceof tg)t.forEach((e,o)=>this.append(o,e));else if(Array.isArray(t))for(let[e,o]of t)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(t))if(typeof o=="string")this.append(e,o);else throw new TypeError("Header values must be strings")}append(t,e){let o=t.toLowerCase(),i=this.headers.get(o)||[];this.headers.set(o,[...i,e]);}delete(t){let e=t.toLowerCase();this.headers.delete(e);}get(t){let e=t.toLowerCase(),o=this.headers.get(e);return o?o.join(", "):null}has(t){let e=t.toLowerCase();return this.headers.has(e)}set(t,e){let o=t.toLowerCase();this.headers.set(o,[e]);}forEach(t,e){let o=e?t.bind(e):t;this.headers.forEach((i,n)=>o(i.join(", "),n,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[t,e]of this.headers.entries())yield [t,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let t of this.headers.values())yield t.join(", ");}[Symbol.iterator](){return this.entries()}};var li={headers:new Ir,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},mi={headers:new Ir,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};function di(a){return {headers:a.headers,redirected:a.redirected,status:a.status,statusText:a.statusText,type:a.type,url:a.url}}function ig(a,t){return Object.keys(t!=null?t:{}).length>0?`${a}?${Eb__default.default.stringify(t,{arrayFormat:"repeat"})}`:a}var d=Pb();function Pb(){var u,g,f,y,z;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"||((f=self.constructor)==null?void 0:f.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&&!!((z=process.versions)!=null&&z.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 ag(){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 ng({body:a,type:t}){return t.includes("json")?Ie(a):a}async function ug(a){return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?new(await Promise.resolve().then(()=>(pg(),sg))).Node18UniversalStreamWrapper(a):d.type!=="node"&&typeof fetch=="function"?new(await Promise.resolve().then(()=>(lg(),cg))).UndiciStreamWrapper(a):new(await Promise.resolve().then(()=>(dg(),mg))).NodePre18StreamWrapper(a)}async function gg(a,t){if(a.body!=null&&t==="blob")return await a.blob();if(a.body!=null&&t==="arrayBuffer")return await a.arrayBuffer();if(a.body!=null&&t==="sse")return a.body;if(a.body!=null&&t==="streaming")return ug(a.body);if(a.body!=null&&t==="text")return await a.text();{let e=await a.text();if(e.length>0)try{return JSON.parse(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:a.status,rawBody:e}}}else return}}var Cb="timeout";function fg(a){let t=new AbortController,e=setTimeout(()=>t.abort(Cb),a);return {signal:t.signal,abortId:e}}function hg(...a){let t=a.length===1&&Array.isArray(a[0])?a[0]:a,e=new AbortController;for(let o of t){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 wg=async(a,t,e,o,i,n,c,m,u)=>{let g=[],f;if(n!=null){let{signal:v,abortId:S}=fg(n);f=S,g.push(v);}c!=null&&g.push(c);let y=hg(g),z=await a(t,{method:e,headers:o,body:i,signal:y,credentials:m?"include":void 0,duplex:u});return f!=null&&clearTimeout(f),z};function jb(a){let t=1+(Math.random()*2-1)*.2;return a*t}async function bg(a,t=2){let e=await a();for(let o=0;o<t&&([408,429].includes(e.status)||e.status>=500);++o){let i=Math.min(1e3*Math.pow(2,o),6e4),n=jb(i);await new Promise(c=>setTimeout(c,n)),e=await a();}return e}async function Ib(a){let t={};if(a.body!==void 0&&a.contentType!=null&&(t["Content-Type"]=a.contentType),a.headers!=null)for(let[n,c]of Object.entries(a.headers))c!=null&&(t[n]=c);let e=ig(a.url,a.queryParameters),o=await ng({body:a.body,type:a.requestType==="json"?"json":"other"}),i=await ag();try{let n=await bg(async()=>wg(i,e,a.method,t,o,a.timeoutMs,a.abortSignal,a.withCredentials,a.duplex),a.maxRetries),c=await gg(n,a.responseType);return n.status>=200&&n.status<400?{ok:!0,body:c,headers:n.headers,rawResponse:di(n)}:{ok:!1,error:{reason:"status-code",statusCode:n.status,body:c},rawResponse:di(n)}}catch(n){return a.abortSignal!=null&&a.abortSignal.aborted?{ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:li}:n instanceof Error&&n.name==="AbortError"?{ok:false,error:{reason:"timeout"},rawResponse:li}:n instanceof Error?{ok:false,error:{reason:"unknown",errorMessage:n.message},rawResponse:mi}:{ok:false,error:{reason:"unknown",errorMessage:Ie(n)},rawResponse:mi}}}var x=Ib;var s={get:async a=>typeof a=="function"?a():a};var w=class a extends Promise{constructor(t){super(e=>{e(void 0);}),this.innerPromise=t;}static fromFunction(t,...e){return new a(t(...e))}static interceptFunction(t){return (...e)=>a.fromPromise(t(...e))}static fromPromise(t){return new a(t)}static fromExecutor(t){let e=new Promise(t);return new a(e)}static fromResult(t){let e=Promise.resolve(t);return new a(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:t})=>t)),this.unwrappedPromise}then(t,e){return this.unwrap().then(t,e)}catch(t){return this.unwrap().catch(t)}finally(t){return this.unwrap().finally(t)}async withRawResponse(){return await this.innerPromise}};function as(a){return typeof a=="object"&&a!=null&&"name"in a}function ns(a){return typeof a=="object"&&a!=null&&"path"in a}function ss(a){let t=a.lastIndexOf("/"),e=a.lastIndexOf("\\"),o=Math.max(t,e);return o>=0?a.substring(o+1):a}async function qg(){let a;return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?a=new os:d.type==="node"?a=new ts:a=new is,await a.setup(),a}var os=class{async setup(){this.fd=new(await import('formdata-node')).FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(as(t))return t.name;if(ns(t)&&t.path)return ss(t.path.toString())}async appendFile(t,e,o){var i,n;o=this.getFileName(e,o),e instanceof Blob?(i=this.fd)==null||i.append(t,e,o):(n=this.fd)==null||n.append(t,{type:void 0,name:o,[Symbol.toStringTag]:"File",stream(){return e}});}async getRequest(){let t=new(await import('form-data-encoder')).FormDataEncoder(this.fd);return {body:(await import('readable-stream')).Readable.from(t),headers:t.headers,duplex:"half"}}},ts=class{async setup(){this.fd=new(await Promise.resolve().then(()=>_h(Zg()))).default;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(as(t))return t.name;if(ns(t)&&t.path)return ss(t.path.toString())}async appendFile(t,e,o){var n,c;o=this.getFileName(e,o);let i;e instanceof Blob?i=Buffer.from(await e.arrayBuffer()):i=e,o==null?(n=this.fd)==null||n.append(t,i):(c=this.fd)==null||c.append(t,i,{filename:o});}getRequest(){return {body:this.fd,headers:this.fd?this.fd.getHeaders():{}}}},is=class{async setup(){this.fd=new FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(as(t))return t.name;if(ns(t)&&t.path)return ss(t.path.toString())}async appendFile(t,e,o){var i,n;if(o=this.getFileName(e,o),e instanceof Blob){(i=this.fd)==null||i.append(t,e,o);return}(n=this.fd)==null||n.append(t,new Blob([e]),o);}getRequest(){return {body:this.fd,headers:{}}}};var r={};E(r,{JsonError:()=>dr,ParseError:()=>ur,any:()=>ff,bigint:()=>rf,boolean:()=>hf,booleanLiteral:()=>gf,date:()=>of,discriminant:()=>Sf,enum_:()=>hi,getObjectLikeUtils:()=>be,getObjectUtils:()=>He,getSchemaUtils:()=>D,isProperty:()=>De,lazy:()=>tf,lazyObject:()=>mf,list:()=>bi,number:()=>wf,object:()=>wi,objectWithoutOptionalProperties:()=>lf,optional:()=>ps,property:()=>nf,record:()=>yf,set:()=>kf,string:()=>bf,stringLiteral:()=>uf,transform:()=>cs,undiscriminatedUnion:()=>vf,union:()=>Af,unknown:()=>xf,withParsedProperties:()=>ms});var T={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 U(a,t){return `Expected ${t}. Received ${wx(a)}.`}function wx(a){if(Array.isArray(a))return "list";if(a===null)return "null";if(a instanceof BigInt)return "BigInt";switch(typeof a){case "string":return `"${a}"`;case "bigint":case "number":case "boolean":case "undefined":return `${a}`}return typeof a}function Q(a){return {...a,json:ef(a.json),parse:ef(a.parse)}}function ef(a){return (t,e)=>{let o=a(t,e),{skipValidation:i=false}=e!=null?e:{};return !o.ok&&i?(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:t}):o}}function fi(a){return a.path.length===0?a.message:`${a.path.join(" -> ")}: ${a.message}`}var dr=class a extends Error{constructor(e){super(e.map(fi).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};var ur=class a extends Error{constructor(e){super(e.map(fi).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};function D(a){return {nullable:()=>bx(a),optional:()=>ps(a),optionalNullable:()=>xx(a),transform:t=>cs(a,t),parseOrThrow:(t,e)=>{let o=a.parse(t,e);if(o.ok)return o.value;throw new ur(o.errors)},jsonOrThrow:(t,e)=>{let o=a.json(t,e);if(o.ok)return o.value;throw new dr(o.errors)}}}function bx(a){let t={parse:(e,o)=>e==null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e==null?{ok:true,value:null}:a.json(e,o),getType:()=>T.NULLABLE};return {...t,...D(t)}}function ps(a){let t={parse:(e,o)=>e==null?{ok:true,value:void 0}:a.parse(e,o),json:(e,o)=>o!=null&&o.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:a.json(e,o),getType:()=>T.OPTIONAL};return {...t,...D(t)}}function xx(a){let t={parse:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.json(e,o),getType:()=>T.OPTIONAL_NULLABLE};return {...t,...D(t)}}function cs(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);return n.ok?{ok:true,value:t.transform(n.value)}:n},json:(o,i)=>{let n=t.untransform(o);return a.json(n,i)},getType:()=>a.getType()};return {...e,...D(e)}}function rf(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t=="bigint"?{ok:true,value:t}:typeof t=="number"?{ok:true,value:BigInt(t)}:{ok:false,errors:[{path:e,message:U(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="bigint"?{ok:false,errors:[{path:e,message:U(t,"bigint")}]}:{ok:true,value:t},getType:()=>T.BIGINT};return {...Q(a),...D(a)}}var Rx=/^([+-]?\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 of(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:e,message:U(t,"string")}]}:Rx.test(t)?{ok:true,value:new Date(t)}:{ok:false,errors:[{path:e,message:U(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>t instanceof Date?{ok:true,value:t.toISOString()}:{ok:false,errors:[{path:e,message:U(t,"Date object")}]},getType:()=>T.DATE};return {...Q(a),...D(a)}}function q(a,t){return ()=>{let e={parse:t,json:t,getType:()=>a};return {...Q(e),...D(e)}}}function hi(a){let t=new Set(a);return q(T.ENUM,(o,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:n=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:n,message:U(o,"string")}]}:!t.has(o)&&!i?{ok:false,errors:[{path:n,message:U(o,"enum")}]}:{ok:true,value:o})()}function tf(a){let t=ls(a);return {...t,...D(t)}}function ls(a){return {parse:(t,e)=>gr(a).parse(t,e),json:(t,e)=>gr(a).json(t,e),getType:()=>gr(a).getType()}}function gr(a){let t=a;return t.__zurg_memoized==null&&(t.__zurg_memoized=a()),t.__zurg_memoized}function Ur(a){return Object.entries(a)}function Dr(a,t){let e=new Set(t);return Object.entries(a).reduce((o,[i,n])=>(e.has(i)&&(o[i]=n),o),{})}function Ue(a){if(typeof a!="object"||a===null)return false;if(Object.getPrototypeOf(a)===null)return true;let t=a;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(a)===t}function Nr(a){return Object.keys(a)}function af(a,t){let e=[],o=[];for(let i of a)t(i)?e.push(i):o.push(i);return [e,o]}function be(a){return {withParsedProperties:t=>ms(a,t)}}function ms(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);if(!n.ok)return n;let c=Object.entries(t).reduce((m,[u,g])=>({...m,[u]:typeof g=="function"?g(n.value):g}),{});return {ok:true,value:{...n.value,...c}}},json:(o,i)=>{var m;if(!Ue(o))return {ok:false,errors:[{path:(m=i==null?void 0:i.breadcrumbsPrefix)!=null?m:[],message:U(o,"object")}]};let n=new Set(Object.keys(t)),c=Dr(o,Object.keys(o).filter(u=>!n.has(u)));return a.json(c,i)},getType:()=>a.getType()};return {...e,...D(e),...be(e)}}function nf(a,t){return {rawKey:a,valueSchema:t,isProperty:true}}function De(a){return a.isProperty}function wi(a){let t={_getRawProperties:()=>Object.entries(a).map(([e,o])=>De(o)?o.rawKey:e),_getParsedProperties:()=>Nr(a),parse:(e,o)=>{let i={},n=[];for(let[c,m]of Ur(a)){let u=De(m)?m.rawKey:c,g=De(m)?m.valueSchema:m,f={rawKey:u,parsedKey:c,valueSchema:g};i[u]=f,cf(g)&&n.push(u);}return sf({value:e,requiredKeys:n,getProperty:c=>{let m=i[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 i=[];for(let[n,c]of Ur(a)){let m=De(c)?c.valueSchema:c;cf(m)&&i.push(n);}return sf({value:e,requiredKeys:i,getProperty:n=>{let c=a[n];if(c!=null)return De(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:()=>T.OBJECT};return {...Q(t),...D(t),...be(t),...He(t)}}function sf({value:a,requiredKeys:t,getProperty:e,unrecognizedObjectKeys:o="fail",skipValidation:i=false,breadcrumbsPrefix:n=[]}){if(!Ue(a))return {ok:false,errors:[{path:n,message:U(a,"object")}]};let c=new Set(t),m=[],u={};for(let[g,f]of Object.entries(a)){let y=e(g);if(y!=null){c.delete(g);let z=y.transform(f);z.ok?u[y.transformedKey]=z.value:(u[g]=f,m.push(...z.errors));}else switch(o){case "fail":m.push({path:[...n,g],message:`Unexpected key "${g}"`});break;case "strip":break;case "passthrough":u[g]=f;break}}return m.push(...t.filter(g=>c.has(g)).map(g=>({path:n,message:`Missing required key "${g}"`}))),m.length===0||i?{ok:true,value:u}:{ok:false,errors:m}}function He(a){return {extend:t=>{let e={_getParsedProperties:()=>[...a._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...a._getRawProperties(),...t._getRawProperties()],parse:(o,i)=>pf({extensionKeys:t._getRawProperties(),value:o,transformBase:n=>a.parse(n,i),transformExtension:n=>t.parse(n,i)}),json:(o,i)=>pf({extensionKeys:t._getParsedProperties(),value:o,transformBase:n=>a.json(n,i),transformExtension:n=>t.json(n,i)}),getType:()=>T.OBJECT};return {...e,...D(e),...be(e),...He(e)}},passthrough:()=>{let t={_getParsedProperties:()=>a._getParsedProperties(),_getRawProperties:()=>a._getRawProperties(),parse:(e,o)=>{let i=a.parse(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},json:(e,o)=>{let i=a.json(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},getType:()=>T.OBJECT};return {...t,...D(t),...be(t),...He(t)}}}}function pf({extensionKeys:a,value:t,transformBase:e,transformExtension:o}){let i=new Set(a),[n,c]=af(Nr(t),g=>i.has(g)),m=e(Dr(t,c)),u=o(Dr(t,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 cf(a){return !yx(a)}function yx(a){switch(a.getType()){case T.ANY:case T.UNKNOWN:case T.OPTIONAL:case T.OPTIONAL_NULLABLE:return true;default:return false}}function lf(a){return wi(a)}function mf(a){let t={...ls(a),_getRawProperties:()=>gr(a)._getRawProperties(),_getParsedProperties:()=>gr(a)._getParsedProperties()};return {...t,...D(t),...be(t),...He(t)}}function bi(a){let t={parse:(e,o)=>df(e,(i,n)=>{var c;return a.parse(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),json:(e,o)=>df(e,(i,n)=>{var c;return a.json(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),getType:()=>T.LIST};return {...Q(t),...D(t)}}function df(a,t){return Array.isArray(a)?a.map((o,i)=>t(o,i)).reduce((o,i)=>{if(o.ok&&i.ok)return {ok:true,value:[...o.value,i.value]};let n=[];return o.ok||n.push(...o.errors),i.ok||n.push(...i.errors),{ok:false,errors:n}},{ok:true,value:[]}):{ok:false,errors:[{message:U(a,"list"),path:[]}]}}function uf(a){return q(T.STRING_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===a?{ok:true,value:a}:{ok:false,errors:[{path:o,message:U(e,`"${a}"`)}]})()}function gf(a){return q(T.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===a?{ok:true,value:a}:{ok:false,errors:[{path:o,message:U(e,`${a.toString()}`)}]})()}var ff=q(T.ANY,a=>({ok:true,value:a}));var hf=q(T.BOOLEAN,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="boolean"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"boolean")}]});var wf=q(T.NUMBER,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="number"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"number")}]});var bf=q(T.STRING,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="string"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"string")}]});var xf=q(T.UNKNOWN,a=>({ok:true,value:a}));function yf(a,t){let e={parse:(o,i)=>Rf({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.parse(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return t.parse(n,{...i,breadcrumbsPrefix:[...(m=i==null?void 0:i.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(o,i)=>Rf({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.json(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return t.json(n,{...i,breadcrumbsPrefix:[...(m=i==null?void 0:i.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>T.RECORD};return {...Q(e),...D(e)}}function Rf({value:a,isKeyNumeric:t,transformKey:e,transformValue:o,breadcrumbsPrefix:i=[]}){return Ue(a)?Ur(a).reduce((n,[c,m])=>{if(m===void 0)return n;let u=n,g=c;if(t){let v=c.length>0?Number(c):NaN;isNaN(v)||(g=v);}let f=e(g),y=o(m,g);if(u.ok&&f.ok&&y.ok)return {ok:true,value:{...u.value,[f.value]:y.value}};let z=[];return u.ok||z.push(...u.errors),f.ok||z.push(...f.errors),y.ok||z.push(...y.errors),{ok:false,errors:z}},{ok:true,value:{}}):{ok:false,errors:[{path:i,message:U(a,"object")}]}}function kf(a){let t=bi(a),e={parse:(o,i)=>{let n=t.parse(o,i);return n.ok?{ok:true,value:new Set(n.value)}:n},json:(o,i)=>{var c;return o instanceof Set?t.json([...o],i):{ok:false,errors:[{path:(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],message:U(o,"Set")}]}},getType:()=>T.SET};return {...Q(e),...D(e)}}function vf(a){let t={parse:(e,o)=>zf((i,n)=>i.parse(e,n),a,o),json:(e,o)=>zf((i,n)=>i.json(e,n),a,o),getType:()=>T.UNDISCRIMINATED_UNION};return {...Q(t),...D(t)}}function zf(a,t,e){let o=[];for(let[i,n]of t.entries()){let c=a(n,{...e,skipValidation:false});if(c.ok)return c;for(let m of c.errors)o.push({path:m.path,message:`[Variant ${i}] ${m.message}`});}return {ok:false,errors:o}}function Sf(a,t){return {parsedDiscriminant:a,rawDiscriminant:t}}function Af(a,t){let e=typeof a=="string"?a:a.rawDiscriminant,o=typeof a=="string"?a:a.parsedDiscriminant,i=hi(Nr(t)),n={parse:(c,m)=>_f({value:c,discriminant:e,transformedDiscriminant:o,transformDiscriminantValue:u=>{var g;return i.parse(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],e]})},getAdditionalPropertiesSchema:u=>t[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)=>_f({value:c,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:u=>{var g;return i.json(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],o]})},getAdditionalPropertiesSchema:u=>t[u],allowUnrecognizedUnionMembers:m==null?void 0:m.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.json(u,m),breadcrumbsPrefix:m==null?void 0:m.breadcrumbsPrefix}),getType:()=>T.UNION};return {...Q(n),...D(n),...be(n)}}function _f({value:a,discriminant:t,transformedDiscriminant:e,transformDiscriminantValue:o,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:n=false,transformAdditionalProperties:c,breadcrumbsPrefix:m=[]}){if(!Ue(a))return {ok:false,errors:[{path:m,message:U(a,"object")}]};let{[t]:u,...g}=a;if(u==null)return {ok:false,errors:[{path:m,message:`Missing discriminant ("${t}")`}]};let f=o(u);if(!f.ok)return {ok:false,errors:f.errors};let y=i(f.value);if(y==null)return n?{ok:true,value:{[e]:f.value,...g}}:{ok:false,errors:[{path:[...m,t],message:"Unexpected discriminant value"}]};let z=c(g,y);return z.ok?{ok:true,value:{[e]:u,...z.value}}:z}function kx(a){var t=[];if(a.length===0)return "";if(typeof a[0]!="string")throw new TypeError("Url must be a string. Received "+a[0]);if(a[0].match(/^[^/:]+:\/*$/)&&a.length>1){var e=a.shift();a[0]=e+a[0];}a[0].match(/^file:\/\/\//)?a[0]=a[0].replace(/^([^/:]+):\/*/,"$1:///"):a[0]=a[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<a.length;o++){var i=a[o];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(o>0&&(i=i.replace(/^[\/]+/,"")),o<a.length-1?i=i.replace(/[\/]+$/,""):i=i.replace(/[\/]+$/,"/"),t.push(i));}var n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");var c=n.split("?");return n=c.shift()+(c.length>0?"?":"")+c.join("&"),n}function R(){var a;return typeof arguments[0]=="object"?a=arguments[0]:a=[].slice.call(arguments),kx(a)}var j={};E(j,{AggregationData:()=>$l,Alert:()=>Tx,AlertAlertType:()=>tp,AlertPagePublic:()=>yp,AlertPublic:()=>Yo,AlertPublicAlertType:()=>fp,AlertTrigger:()=>pp,AlertTriggerConfig:()=>sp,AlertTriggerConfigPublic:()=>xp,AlertTriggerConfigPublicType:()=>bp,AlertTriggerConfigType:()=>np,AlertTriggerConfigWrite:()=>lp,AlertTriggerConfigWriteType:()=>cp,AlertTriggerEventType:()=>ap,AlertTriggerPublic:()=>Rp,AlertTriggerPublicEventType:()=>wp,AlertTriggerWrite:()=>dp,AlertTriggerWriteEventType:()=>mp,AlertWrite:()=>Qo,AlertWriteAlertType:()=>up,AnnotationQueue:()=>Ap,AnnotationQueueBatch:()=>Px,AnnotationQueueBatchWrite:()=>Lo,AnnotationQueueItemIds:()=>pa,AnnotationQueuePagePublic:()=>Pp,AnnotationQueuePublic:()=>Zo,AnnotationQueuePublicScope:()=>Tp,AnnotationQueueReviewer:()=>_p,AnnotationQueueReviewerPublic:()=>Ep,AnnotationQueueScope:()=>Sp,AnnotationQueueUpdate:()=>Vo,AnnotationQueueWrite:()=>Bo,AnnotationQueueWriteScope:()=>Ls,AssistantMessage:()=>Wc,AssistantMessageRole:()=>Oc,Attachment:()=>Cp,AttachmentListRequestEntityType:()=>yi,AttachmentPage:()=>jp,AuthDetailsHolder:()=>Mp,AutomationRuleEvaluator:()=>jx,AutomationRuleEvaluatorLlmAsJudge:()=>Jp,AutomationRuleEvaluatorLlmAsJudgePublic:()=>ct,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>ic,AutomationRuleEvaluatorObjectObjectPublic:()=>Ac,AutomationRuleEvaluatorPagePublic:()=>Tc,AutomationRuleEvaluatorPublic:()=>Ec,AutomationRuleEvaluatorSpanLlmAsJudge:()=>Qp,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>ut,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>pc,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>Kp,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>mt,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>mc,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>Gp,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>dt,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>uc,AutomationRuleEvaluatorUpdate:()=>Fc,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>Ic,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>Mc,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>Dc,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>Nc,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>Uc,AutomationRuleEvaluatorUserDefinedMetricPython:()=>Xp,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>lt,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>fc,AutomationRuleEvaluatorWrite:()=>hc,AvgValueStatPublic:()=>fl,BatchDelete:()=>B,BatchDeleteByProject:()=>Zx,BiInformation:()=>Zs,BiInformationResponse:()=>br,BooleanFeedbackDefinition:()=>em,BooleanFeedbackDefinitionCreate:()=>sm,BooleanFeedbackDefinitionPublic:()=>St,BooleanFeedbackDefinitionUpdate:()=>zm,BooleanFeedbackDetail:()=>ql,BooleanFeedbackDetailCreate:()=>nm,BooleanFeedbackDetailPublic:()=>gm,BooleanFeedbackDetailUpdate:()=>km,CategoricalFeedbackDefinition:()=>om,CategoricalFeedbackDefinitionCreate:()=>cm,CategoricalFeedbackDefinitionPublic:()=>_t,CategoricalFeedbackDefinitionUpdate:()=>Sm,CategoricalFeedbackDetail:()=>rm,CategoricalFeedbackDetailCreate:()=>pm,CategoricalFeedbackDetailPublic:()=>fm,CategoricalFeedbackDetailUpdate:()=>vm,ChatCompletionChoice:()=>Lc,ChatCompletionRequest:()=>Jo,ChatCompletionResponse:()=>Xc,Check:()=>Nl,CheckName:()=>Ul,CheckPublic:()=>$d,CheckPublicName:()=>Kd,CheckPublicResult:()=>Gd,CheckResult:()=>Dl,ChunkedOutputJsonNode:()=>Nx,ChunkedOutputJsonNodePublic:()=>Wx,ChunkedOutputJsonNodePublicType:()=>Zl,ChunkedOutputJsonNodeType:()=>Tl,Column:()=>_l,ColumnCompare:()=>el,ColumnCompareTypesItem:()=>qc,ColumnPublic:()=>zl,ColumnPublicTypesItem:()=>kl,ColumnTypesItem:()=>Sl,Comment:()=>H,CommentCompare:()=>rl,CommentPublic:()=>ar,CompleteMultipartUploadRequest:()=>ca,CompleteMultipartUploadRequestEntityType:()=>Ip,CompletionTokensDetails:()=>Hc,CountValueStatPublic:()=>hl,CreateDatasetItemsFromSpansRequest:()=>Lr,CreateDatasetItemsFromTracesRequest:()=>Vr,CreatePromptVersionDetail:()=>xo,CreatePromptVersionDetailTemplateStructure:()=>Gi,DashboardPagePublic:()=>Kc,DashboardPublic:()=>tr,DashboardUpdatePublic:()=>Ko,DashboardWrite:()=>Xo,DataPointDouble:()=>qx,DataPointNumberPublic:()=>ud,Dataset:()=>Ix,DatasetExpansion:()=>Dx,DatasetExpansionResponse:()=>Zc,DatasetExpansionWrite:()=>Kr,DatasetIdentifier:()=>Jr,DatasetIdentifierPublic:()=>Gr,DatasetItem:()=>bt,DatasetItemBatch:()=>Ux,DatasetItemBatchUpdate:()=>Fr,DatasetItemBatchWrite:()=>Br,DatasetItemCompare:()=>cl,DatasetItemCompareSource:()=>ol,DatasetItemFilter:()=>us,DatasetItemFilterOperator:()=>ds,DatasetItemPageCompare:()=>ll,DatasetItemPagePublic:()=>vl,DatasetItemPublic:()=>yt,DatasetItemPublicSource:()=>Rl,DatasetItemSource:()=>Yc,DatasetItemStreamRequest:()=>$r,DatasetItemUpdate:()=>gs,DatasetItemWrite:()=>Wr,DatasetItemWriteSource:()=>fs,DatasetItemsDelete:()=>Xr,DatasetPagePublic:()=>gl,DatasetPublic:()=>xr,DatasetPublicStatus:()=>dl,DatasetPublicVisibility:()=>ml,DatasetStatus:()=>$c,DatasetUpdate:()=>Hr,DatasetUpdateVisibility:()=>Ai,DatasetVersionCreatePublic:()=>Yr,DatasetVersionDiff:()=>Pl,DatasetVersionDiffStats:()=>El,DatasetVersionPagePublic:()=>Cl,DatasetVersionPublic:()=>Rr,DatasetVersionRestorePublic:()=>Zr,DatasetVersionSummary:()=>Qc,DatasetVersionSummaryPublic:()=>ul,DatasetVersionTag:()=>Qr,DatasetVersionUpdatePublic:()=>qr,DatasetVisibility:()=>Gc,DatasetWrite:()=>Or,DatasetWriteVisibility:()=>_i,DeleteAttachmentsRequest:()=>Cx,DeleteAttachmentsRequestEntityType:()=>Dp,DeleteFeedbackScore:()=>Ct,DeleteIdsHolder:()=>yr,DeleteThreadFeedbackScores:()=>No,DeleteTraceThreads:()=>Mo,Delta:()=>Bc,DownloadAttachmentRequestEntityType:()=>ki,ErrorCountWithDeviation:()=>Et,ErrorCountWithDeviationDetailed:()=>Rd,ErrorInfo:()=>Te,ErrorInfoExperimentItemBulkWriteView:()=>io,ErrorInfoPublic:()=>jt,ErrorInfoWrite:()=>ko,ErrorMessage:()=>ae,ErrorMessageDetail:()=>$x,ErrorMessageDetailed:()=>Kx,ErrorMessagePublic:()=>Ex,Experiment:()=>Mx,ExperimentGroupAggregationsResponse:()=>Yl,ExperimentGroupResponse:()=>Gl,ExperimentItem:()=>ro,ExperimentItemBulkRecord:()=>Wl,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>Ps,ExperimentItemBulkUpload:()=>Fx,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>ao,ExperimentItemCompare:()=>pl,ExperimentItemCompareTraceVisibilityMode:()=>sl,ExperimentItemPublic:()=>Rt,ExperimentItemPublicTraceVisibilityMode:()=>yl,ExperimentItemStreamRequest:()=>po,ExperimentItemTraceVisibilityMode:()=>ks,ExperimentItemsBatch:()=>oo,ExperimentItemsDelete:()=>to,ExperimentPagePublic:()=>Hl,ExperimentPublic:()=>vt,ExperimentPublicStatus:()=>Ll,ExperimentPublicType:()=>Bl,ExperimentScore:()=>no,ExperimentScorePublic:()=>Vl,ExperimentScoreWrite:()=>bs,ExperimentStatus:()=>Il,ExperimentStreamRequestPublic:()=>co,ExperimentType:()=>jl,ExperimentUpdate:()=>so,ExperimentUpdateStatus:()=>ji,ExperimentUpdateType:()=>Ci,ExperimentWrite:()=>eo,ExperimentWriteStatus:()=>Pi,ExperimentWriteType:()=>Ei,ExportTraceServiceRequest:()=>Hx,Feedback:()=>Bx,FeedbackCreate:()=>um,FeedbackDefinitionPagePublic:()=>xm,FeedbackObjectPublic:()=>bm,FeedbackPublic:()=>ym,FeedbackScore:()=>ee,FeedbackScoreAverage:()=>ne,FeedbackScoreAverageDetailed:()=>yd,FeedbackScoreAveragePublic:()=>Ke,FeedbackScoreBatch:()=>Ut,FeedbackScoreBatchItem:()=>Xd,FeedbackScoreBatchItemSource:()=>Jd,FeedbackScoreBatchItemThread:()=>Ws,FeedbackScoreBatchItemThreadSource:()=>Os,FeedbackScoreBatchThread:()=>Fo,FeedbackScoreCompare:()=>nl,FeedbackScoreCompareSource:()=>tl,FeedbackScoreExperimentItemBulkWriteView:()=>Es,FeedbackScoreExperimentItemBulkWriteViewSource:()=>_s,FeedbackScoreNames:()=>dd,FeedbackScorePublic:()=>zr,FeedbackScorePublicSource:()=>Wd,FeedbackScoreSource:()=>xs,FeedbackUpdate:()=>Em,FindFeedbackDefinitionsRequestType:()=>Di,FindFeedbackScoreNames1RequestType:()=>Yi,Function:()=>Ho,FunctionCall:()=>Ee,GetSpanStatsRequestType:()=>Zi,GetSpansByProjectRequestType:()=>Qi,GetWebhookExamplesRequestAlertType:()=>xi,GroupContent:()=>Jl,GroupContentWithAggregations:()=>Ql,GroupDetail:()=>Xl,GroupDetails:()=>Kl,Guardrail:()=>jm,GuardrailBatch:()=>Lx,GuardrailBatchWrite:()=>Go,GuardrailName:()=>Pm,GuardrailResult:()=>Cm,GuardrailWrite:()=>Ys,GuardrailWriteName:()=>$s,GuardrailWriteResult:()=>Qs,GuardrailsValidation:()=>Ml,GuardrailsValidationPublic:()=>Qd,IdsHolder:()=>Ox,ImageUrl:()=>Bp,ImageUrlPublic:()=>bc,ImageUrlWrite:()=>qp,JsonListString:()=>N,JsonListStringCompare:()=>la,JsonListStringExperimentItemBulkWriteView:()=>xe,JsonListStringPublic:()=>me,JsonListStringWrite:()=>ce,JsonNode:()=>P,JsonNodeDetail:()=>Is,JsonNodePublic:()=>re,JsonNodeWrite:()=>le,JsonSchema:()=>Xs,LlmAsJudgeCode:()=>qo,LlmAsJudgeCodePublic:()=>kc,LlmAsJudgeCodeWrite:()=>tc,LlmAsJudgeMessage:()=>$e,LlmAsJudgeMessageContent:()=>Vp,LlmAsJudgeMessageContentPublic:()=>Rc,LlmAsJudgeMessageContentWrite:()=>rc,LlmAsJudgeMessagePublic:()=>rr,LlmAsJudgeMessagePublicRole:()=>wc,LlmAsJudgeMessageRole:()=>Wp,LlmAsJudgeMessageWrite:()=>Ze,LlmAsJudgeMessageWriteRole:()=>Zp,LlmAsJudgeModelParameters:()=>Ge,LlmAsJudgeModelParametersPublic:()=>er,LlmAsJudgeModelParametersWrite:()=>Ye,LlmAsJudgeOutputSchema:()=>Qe,LlmAsJudgeOutputSchemaPublic:()=>or,LlmAsJudgeOutputSchemaPublicType:()=>yc,LlmAsJudgeOutputSchemaType:()=>Hp,LlmAsJudgeOutputSchemaWrite:()=>qe,LlmAsJudgeOutputSchemaWriteType:()=>oc,LogItem:()=>Cc,LogItemLevel:()=>Pc,LogPage:()=>jc,ManualEvaluationRequest:()=>ga,ManualEvaluationRequestEntityType:()=>Nm,ManualEvaluationResponse:()=>ua,Message:()=>Vs,MultipartUploadPart:()=>Up,NumericalFeedbackDefinition:()=>im,NumericalFeedbackDefinitionCreate:()=>mm,NumericalFeedbackDefinitionPublic:()=>At,NumericalFeedbackDefinitionUpdate:()=>Am,NumericalFeedbackDetail:()=>tm,NumericalFeedbackDetailCreate:()=>lm,NumericalFeedbackDetailPublic:()=>hm,NumericalFeedbackDetailUpdate:()=>_m,Optimization:()=>Jx,OptimizationPagePublic:()=>ha,OptimizationPublic:()=>kr,OptimizationPublicStatus:()=>qm,OptimizationStatus:()=>Mm,OptimizationStudioConfig:()=>Hm,OptimizationStudioConfigPublic:()=>nd,OptimizationStudioConfigWrite:()=>Ym,OptimizationStudioLog:()=>sd,OptimizationUpdate:()=>uo,OptimizationUpdateStatus:()=>Oi,OptimizationWrite:()=>fa,OptimizationWriteStatus:()=>Zm,PageColumns:()=>Al,PercentageValueStatPublic:()=>wl,PercentageValues:()=>Ce,PercentageValuesDetailed:()=>kd,PercentageValuesPublic:()=>xt,Project:()=>Xx,ProjectDetailed:()=>vd,ProjectDetailedVisibility:()=>zd,ProjectMetricRequestPublic:()=>ho,ProjectMetricRequestPublicInterval:()=>Hi,ProjectMetricRequestPublicMetricType:()=>Vi,ProjectMetricResponsePublic:()=>wd,ProjectMetricResponsePublicInterval:()=>fd,ProjectMetricResponsePublicMetricType:()=>gd,ProjectPagePublic:()=>ld,ProjectPublic:()=>Pt,ProjectPublicVisibility:()=>cd,ProjectRetrieveDetailed:()=>wo,ProjectStatItemObjectPublic:()=>xl,ProjectStatsPublic:()=>ir,ProjectStatsSummary:()=>xd,ProjectStatsSummaryItem:()=>bd,ProjectUpdate:()=>fo,ProjectUpdateVisibility:()=>Li,ProjectVisibility:()=>pd,ProjectWrite:()=>go,ProjectWriteVisibility:()=>Bi,Prompt:()=>Gx,PromptDetail:()=>Cd,PromptDetailTemplateStructure:()=>Pd,PromptPagePublic:()=>Fd,PromptPublic:()=>Md,PromptPublicTemplateStructure:()=>Nd,PromptTemplateStructure:()=>_d,PromptTokensDetails:()=>Vc,PromptType:()=>Sd,PromptUpdatable:()=>Ro,PromptVersion:()=>Ed,PromptVersionDetail:()=>Se,PromptVersionDetailTemplateStructure:()=>Ds,PromptVersionDetailType:()=>Us,PromptVersionLink:()=>ma,PromptVersionLinkPublic:()=>da,PromptVersionLinkWrite:()=>Ui,PromptVersionPagePublic:()=>Dd,PromptVersionPublic:()=>Ud,PromptVersionPublicTemplateStructure:()=>Id,PromptVersionPublicType:()=>jd,PromptVersionRetrieveDetail:()=>yo,PromptVersionTemplateStructure:()=>Td,PromptVersionType:()=>Ad,PromptWrite:()=>bo,PromptWriteTemplateStructure:()=>Ki,PromptWriteType:()=>Xi,ProviderApiKey:()=>Vx,ProviderApiKeyPagePublic:()=>Um,ProviderApiKeyProvider:()=>Dm,ProviderApiKeyPublic:()=>Tt,ProviderApiKeyPublicProvider:()=>Im,ProviderApiKeyUpdate:()=>mo,ProviderApiKeyWrite:()=>lo,ProviderApiKeyWriteProvider:()=>Mi,ResponseFormat:()=>Ks,ResponseFormatType:()=>Js,Result:()=>nr,ResultsNumberPublic:()=>hd,ScoreName:()=>md,ServiceTogglesConfig:()=>Od,Span:()=>zt,SpanBatch:()=>Qx,SpanBatchUpdate:()=>_o,SpanBatchWrite:()=>vo,SpanEnrichmentOptions:()=>hs,SpanExperimentItemBulkWriteView:()=>Ss,SpanExperimentItemBulkWriteViewType:()=>vs,SpanFilter:()=>tt,SpanFilterOperator:()=>$p,SpanFilterPublic:()=>Ao,SpanFilterPublicOperator:()=>Fs,SpanFilterWrite:()=>nc,SpanFilterWriteOperator:()=>ac,SpanLlmAsJudgeCode:()=>it,SpanLlmAsJudgeCodePublic:()=>_c,SpanLlmAsJudgeCodeWrite:()=>sc,SpanPagePublic:()=>Hd,SpanPublic:()=>It,SpanPublicType:()=>Vd,SpanSearchStreamRequestPublic:()=>To,SpanSearchStreamRequestPublicType:()=>qi,SpanType:()=>Ol,SpanUpdate:()=>So,SpanUpdateType:()=>Ms,SpanWrite:()=>zo,SpanWriteType:()=>Ns,SpansCountResponse:()=>ep,StartMultipartUploadRequest:()=>Mr,StartMultipartUploadRequestEntityType:()=>zi,StartMultipartUploadResponse:()=>Np,StreamOptions:()=>Hs,StudioEvaluation:()=>Lm,StudioEvaluationPublic:()=>id,StudioEvaluationWrite:()=>$m,StudioLlmModel:()=>Wm,StudioLlmModelPublic:()=>od,StudioLlmModelWrite:()=>Km,StudioMessage:()=>Fm,StudioMessagePublic:()=>ed,StudioMessageWrite:()=>Jm,StudioMetric:()=>Bm,StudioMetricPublic:()=>td,StudioMetricWrite:()=>Gm,StudioOptimizer:()=>Vm,StudioOptimizerPublic:()=>ad,StudioOptimizerWrite:()=>Qm,StudioPrompt:()=>Om,StudioPromptPublic:()=>rd,StudioPromptWrite:()=>Xm,Tool:()=>Gs,ToolCall:()=>wt,Trace:()=>kt,TraceBatch:()=>Yx,TraceBatchUpdate:()=>jo,TraceBatchWrite:()=>Po,TraceCountResponse:()=>op,TraceEnrichmentOptions:()=>ws,TraceExperimentItemBulkWriteView:()=>zs,TraceFilter:()=>Pe,TraceFilterOperator:()=>Op,TraceFilterPublic:()=>Ae,TraceFilterPublicOperator:()=>Cs,TraceFilterWrite:()=>nt,TraceFilterWriteOperator:()=>Yp,TracePagePublic:()=>eu,TracePublic:()=>Dt,TracePublicVisibilityMode:()=>Yd,TraceSearchStreamRequestPublic:()=>Wo,TraceThread:()=>Nt,TraceThreadBatchIdentifier:()=>Do,TraceThreadBatchUpdate:()=>Uo,TraceThreadFilter:()=>Re,TraceThreadFilterOperator:()=>Bs,TraceThreadFilterPublic:()=>Je,TraceThreadFilterPublicOperator:()=>js,TraceThreadFilterWrite:()=>st,TraceThreadFilterWriteOperator:()=>cc,TraceThreadIdentifier:()=>wa,TraceThreadLlmAsJudgeCode:()=>rt,TraceThreadLlmAsJudgeCodePublic:()=>vc,TraceThreadLlmAsJudgeCodeWrite:()=>lc,TraceThreadPage:()=>qd,TraceThreadSearchStreamRequest:()=>Oo,TraceThreadStatus:()=>Zd,TraceThreadUpdate:()=>Io,TraceThreadUserDefinedMetricPythonCode:()=>ot,TraceThreadUserDefinedMetricPythonCodePublic:()=>Sc,TraceThreadUserDefinedMetricPythonCodeWrite:()=>dc,TraceUpdate:()=>Co,TraceVisibilityMode:()=>Fl,TraceWrite:()=>Eo,UploadAttachmentRequestEntityType:()=>vi,Usage:()=>Jc,UserDefinedMetricPythonCode:()=>et,UserDefinedMetricPythonCodePublic:()=>zc,UserDefinedMetricPythonCodeWrite:()=>gc,ValueEntry:()=>ys,ValueEntryCompare:()=>al,ValueEntryCompareSource:()=>il,ValueEntryExperimentItemBulkWriteView:()=>Ts,ValueEntryExperimentItemBulkWriteViewSource:()=>As,ValueEntryPublic:()=>Ld,ValueEntryPublicSource:()=>Bd,ValueEntrySource:()=>Rs,VideoUrl:()=>Lp,VideoUrlPublic:()=>xc,VideoUrlWrite:()=>ec,Webhook:()=>ip,WebhookExamples:()=>kp,WebhookPublic:()=>hp,WebhookTestResult:()=>vp,WebhookTestResultStatus:()=>zp,WebhookWrite:()=>gp,WelcomeWizardSubmission:()=>$o,WelcomeWizardTracking:()=>ru,WorkspaceConfiguration:()=>Mt,WorkspaceMetricRequest:()=>eR,WorkspaceMetricResponse:()=>ba,WorkspaceMetricsSummaryRequest:()=>vr,WorkspaceMetricsSummaryResponse:()=>ou,WorkspaceNameHolder:()=>Fp,WorkspaceSpansCount:()=>qs,WorkspaceTraceCount:()=>rp,alerts:()=>Ri,annotationQueues:()=>ta,attachments:()=>fr,chatCompletions:()=>ia,dashboards:()=>aa,datasets:()=>Ti,experiments:()=>hr,feedbackDefinitions:()=>Ni,guardrails:()=>na,llmProviderKey:()=>Fi,optimizations:()=>Wi,projects:()=>Ji,prompts:()=>$i,spans:()=>wr,traces:()=>Xe,welcomeWizard:()=>sa});var Ri={};E(Ri,{GetWebhookExamplesRequestAlertType:()=>xi});var xi=r.enum_(["general","slack","pagerduty"]);var fr={};E(fr,{AttachmentListRequestEntityType:()=>yi,DownloadAttachmentRequestEntityType:()=>ki,StartMultipartUploadRequest:()=>Mr,StartMultipartUploadRequestEntityType:()=>zi,UploadAttachmentRequestEntityType:()=>vi,uploadAttachment:()=>Si});var yi=r.enum_(["trace","span"]);var ki=r.enum_(["trace","span"]);var zi=r.enum_(["trace","span"]);var vi=r.enum_(["trace","span"]);var Si={};E(Si,{Request:()=>zx});var zx=r.record(r.string(),r.unknown());var Mr=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",zi),entityId:r.property("entity_id",r.string()),path:r.string()});var Ti={};E(Ti,{CreateDatasetItemsFromSpansRequest:()=>Lr,CreateDatasetItemsFromTracesRequest:()=>Vr,DatasetExpansionWrite:()=>Kr,DatasetIdentifier:()=>Jr,DatasetIdentifierPublic:()=>Gr,DatasetItemBatchUpdate:()=>Fr,DatasetItemBatchWrite:()=>Br,DatasetItemStreamRequest:()=>$r,DatasetItemsDelete:()=>Xr,DatasetUpdate:()=>Hr,DatasetUpdateVisibility:()=>Ai,DatasetVersionCreatePublic:()=>Yr,DatasetVersionRestorePublic:()=>Zr,DatasetVersionTag:()=>Qr,DatasetVersionUpdatePublic:()=>qr,DatasetWrite:()=>Or,DatasetWriteVisibility:()=>_i});var _i=r.enum_(["private","public"]);var Ai=r.enum_(["private","public"]);var ds=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var us=r.object({field:r.string().optional(),operator:ds.optional(),key:r.string().optional(),value:r.string().optional()});var P=r.record(r.string(),r.unknown());var gs=r.object({input:r.string().optional(),expectedOutput:r.property("expected_output",r.string().optional()),metadata:P.optional(),data:P.optional(),tags:r.list(r.string()).optional()});var Fr=r.object({ids:r.list(r.string()).optional(),filters:r.list(us).optional(),update:gs,mergeTags:r.property("merge_tags",r.boolean().optional())});var Or=r.object({id:r.string().optional(),name:r.string(),visibility:_i.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});var fs=r.enum_(["manual","trace","span","sdk"]);var Wr=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:fs,data:P,tags:r.list(r.string()).optional()});var Br=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(Wr)});var hs=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Lr=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",hs)});var ws=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 Vr=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",ws)});var Hr=r.object({name:r.string(),description:r.string().optional(),visibility:Ai.optional(),tags:r.list(r.string()).optional()});var Jr=r.object({datasetName:r.property("dataset_name",r.string())});var Xr=r.object({itemIds:r.property("item_ids",r.list(r.string()))});var Kr=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 Gr=r.object({datasetName:r.property("dataset_name",r.string())});var $r=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 Qr=r.object({tag:r.string()});var Yr=r.object({tags:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional()});var Zr=r.object({versionRef:r.property("version_ref",r.string())});var qr=r.object({changeDescription:r.property("change_description",r.string().optional()),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional())});var hr={};E(hr,{ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>ao,ExperimentItemStreamRequest:()=>po,ExperimentItemsBatch:()=>oo,ExperimentItemsDelete:()=>to,ExperimentStreamRequestPublic:()=>co,ExperimentUpdate:()=>so,ExperimentUpdateStatus:()=>ji,ExperimentUpdateType:()=>Ci,ExperimentWrite:()=>eo,ExperimentWriteStatus:()=>Pi,ExperimentWriteType:()=>Ei,findFeedbackScoreNames:()=>Ii});var Ei=r.enum_(["regular","trial","mini-batch"]);var Pi=r.enum_(["running","completed","cancelled"]);var Ci=r.enum_(["regular","trial","mini-batch"]);var ji=r.enum_(["running","completed","cancelled"]);var Ii={};E(Ii,{Response:()=>vx});var vx=r.list(r.string());var ce=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var bs=r.object({name:r.string(),value:r.number()});var Ui=r.object({id:r.string()});var eo=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),name:r.string().optional(),metadata:ce.optional(),type:Ei.optional(),optimizationId:r.property("optimization_id",r.string().optional()),status:Pi.optional(),experimentScores:r.property("experiment_scores",r.list(bs).optional()),promptVersion:r.property("prompt_version",Ui.optional()),promptVersions:r.property("prompt_versions",r.list(Ui).optional())});var N=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var xs=r.enum_(["ui","sdk","online_scoring"]);var Rs=r.enum_(["ui","sdk","online_scoring"]);var ys=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Rs.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:xs,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(),ys).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 ks=r.enum_(["default","hidden"]);var ro=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:N.optional(),output:N.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",ks.optional())});var oo=r.object({experimentItems:r.property("experiment_items",r.list(ro))});var to=r.object({ids:r.list(r.string())});var xe=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var io=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var zs=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:xe.optional(),output:xe.optional(),metadata:xe.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",io.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var vs=r.enum_(["general","tool","llm","guardrail"]);var Ss=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:vs.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:xe.optional(),output:xe.optional(),metadata:xe.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",io.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 _s=r.enum_(["ui","sdk","online_scoring"]);var As=r.enum_(["ui","sdk","online_scoring"]);var Ts=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:As.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 Es=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:_s,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(),Ts).optional())});var Ps=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",xe.optional()),trace:zs.optional(),spans:r.list(Ss).optional(),feedbackScores:r.property("feedback_scores",r.list(Es).optional())});var ao=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(Ps)});var no=r.object({name:r.string(),value:r.number()});var so=r.object({name:r.string().optional(),metadata:P.optional(),type:Ci.optional(),status:ji.optional(),experimentScores:r.property("experiment_scores",r.list(no).optional())});var po=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 co=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional())});var Ni={};E(Ni,{FindFeedbackDefinitionsRequestType:()=>Di});var Di=r.enum_(["numerical","categorical","boolean"]);var Fi={};E(Fi,{ProviderApiKeyUpdate:()=>mo,ProviderApiKeyWrite:()=>lo,ProviderApiKeyWriteProvider:()=>Mi});var Mi=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var lo=r.object({provider:Mi,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 mo=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 Wi={};E(Wi,{OptimizationUpdate:()=>uo,OptimizationUpdateStatus:()=>Oi});var Oi=r.enum_(["running","completed","cancelled","initialized","error"]);var uo=r.object({name:r.string().optional(),status:Oi.optional()});var Ji={};E(Ji,{ProjectMetricRequestPublic:()=>ho,ProjectMetricRequestPublicInterval:()=>Hi,ProjectMetricRequestPublicMetricType:()=>Vi,ProjectRetrieveDetailed:()=>wo,ProjectUpdate:()=>fo,ProjectUpdateVisibility:()=>Li,ProjectWrite:()=>go,ProjectWriteVisibility:()=>Bi});var Bi=r.enum_(["private","public"]);var Li=r.enum_(["private","public"]);var Vi=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Hi=r.enum_(["HOURLY","DAILY","WEEKLY"]);var go=r.object({name:r.string(),visibility:Bi.optional(),description:r.string().optional()});var fo=r.object({name:r.string().optional(),description:r.string().optional(),visibility:Li.optional()});var Cs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ae=r.object({field:r.string().optional(),operator:Cs.optional(),key:r.string().optional(),value:r.string().optional()});var js=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Je=r.object({field:r.string().optional(),operator:js.optional(),key:r.string().optional(),value:r.string().optional()});var ho=r.object({metricType:r.property("metric_type",Vi.optional()),interval:Hi.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),traceFilters:r.property("trace_filters",r.list(Ae).optional()),threadFilters:r.property("thread_filters",r.list(Je).optional())});var wo=r.object({name:r.string()});var $i={};E($i,{CreatePromptVersionDetail:()=>xo,CreatePromptVersionDetailTemplateStructure:()=>Gi,PromptUpdatable:()=>Ro,PromptVersionRetrieveDetail:()=>yo,PromptWrite:()=>bo,PromptWriteTemplateStructure:()=>Ki,PromptWriteType:()=>Xi});var Xi=r.enum_(["mustache","jinja2"]);var Ki=r.enum_(["text","chat"]);var Gi=r.enum_(["text","chat"]);var le=r.record(r.string(),r.unknown());var bo=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:le.optional(),changeDescription:r.property("change_description",r.string().optional()),type:Xi.optional(),templateStructure:r.property("template_structure",Ki.optional()),tags:r.list(r.string()).optional()});var Is=r.record(r.string(),r.unknown());var Us=r.enum_(["mustache","jinja2"]);var Ds=r.enum_(["text","chat"]);var Se=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:Is.optional(),type:Us.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Ds.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var xo=r.object({name:r.string(),version:Se,templateStructure:r.property("template_structure",Gi.optional())});var Ro=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});var yo=r.object({name:r.string(),commit:r.string().optional()});var wr={};E(wr,{FindFeedbackScoreNames1RequestType:()=>Yi,GetSpanStatsRequestType:()=>Zi,GetSpansByProjectRequestType:()=>Qi,SpanBatchUpdate:()=>_o,SpanBatchWrite:()=>vo,SpanSearchStreamRequestPublic:()=>To,SpanSearchStreamRequestPublicType:()=>qi,findFeedbackScoreNames1:()=>ea});var Qi=r.enum_(["general","tool","llm","guardrail"]);var Yi=r.enum_(["general","tool","llm","guardrail"]);var Zi=r.enum_(["general","tool","llm","guardrail"]);var qi=r.enum_(["general","tool","llm","guardrail"]);var ea={};E(ea,{Response:()=>Sx});var Sx=r.list(r.string());var Ns=r.enum_(["general","tool","llm","guardrail"]);var ko=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var zo=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:Ns.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",ko.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 vo=r.object({spans:r.list(zo)});var Ms=r.enum_(["general","tool","llm","guardrail"]);var Te=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:Ms.optional(),endTime:r.property("end_time",r.date().optional()),input:N.optional(),output:N.optional(),metadata:N.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",Te.optional())});var _o=r.object({ids:r.list(r.string()),update:So,mergeTags:r.property("merge_tags",r.boolean().optional())});var Fs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ao=r.object({field:r.string().optional(),operator:Fs.optional(),key:r.string().optional(),value:r.string().optional()});var To=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:qi.optional(),filters:r.list(Ao).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 Xe={};E(Xe,{DeleteThreadFeedbackScores:()=>No,DeleteTraceThreads:()=>Mo,FeedbackScoreBatchThread:()=>Fo,TraceBatchUpdate:()=>jo,TraceBatchWrite:()=>Po,TraceSearchStreamRequestPublic:()=>Wo,TraceThreadBatchIdentifier:()=>Do,TraceThreadBatchUpdate:()=>Uo,TraceThreadSearchStreamRequest:()=>Oo,findFeedbackScoreNames2:()=>ra,findTraceThreadsFeedbackScoreNames:()=>oa});var ra={};E(ra,{Response:()=>_x});var _x=r.list(r.string());var oa={};E(oa,{Response:()=>Ax});var Ax=r.list(r.string());var Eo=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:ce.optional(),output:ce.optional(),metadata:ce.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",ko.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var Po=r.object({traces:r.list(Eo)});var Co=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:N.optional(),output:N.optional(),metadata:N.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Te.optional()),threadId:r.property("thread_id",r.string().optional())});var jo=r.object({ids:r.list(r.string()),update:Co,mergeTags:r.property("merge_tags",r.boolean().optional())});var Io=r.object({tags:r.list(r.string()).optional()});var Uo=r.object({ids:r.list(r.string()),update:Io,mergeTags:r.property("merge_tags",r.boolean().optional())});var Do=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 No=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 Mo=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 Os=r.enum_(["ui","sdk","online_scoring"]);var Ws=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:Os,author:r.string().optional(),threadId:r.property("thread_id",r.string())});var Fo=r.object({scores:r.list(Ws)});var Bs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Re=r.object({field:r.string().optional(),operator:Bs.optional(),key:r.string().optional(),value:r.string().optional()});var Oo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Re).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 Wo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Ae).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 ta={};E(ta,{AnnotationQueueBatchWrite:()=>Lo,AnnotationQueueUpdate:()=>Vo});var Ls=r.enum_(["trace","thread"]);var Bo=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:Ls,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var Lo=r.object({annotationQueues:r.property("annotation_queues",r.list(Bo))});var Vo=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 ia={};E(ia,{ChatCompletionRequest:()=>Jo});var Vs=r.record(r.string(),r.unknown());var Hs=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});var Js=r.enum_(["text","json_object","json_schema"]);var Xs=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var Ks=r.object({type:Js.optional(),jsonSchema:r.property("json_schema",Xs.optional())});var Ho=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 Gs=r.object({type:r.stringLiteral("function").optional(),function:Ho.optional()});var Ee=r.object({name:r.string().optional(),arguments:r.string().optional()});var Jo=r.object({model:r.string().optional(),messages:r.list(Vs).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",Hs.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",Ks.optional()),seed:r.number().optional(),tools:r.list(Gs).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(Ho).optional(),functionCall:r.property("function_call",Ee.optional())});var aa={};E(aa,{DashboardUpdatePublic:()=>Ko,DashboardWrite:()=>Xo});var Xo=r.object({name:r.string(),description:r.string().optional(),config:le});var re=r.record(r.string(),r.unknown());var Ko=r.object({name:r.string().optional(),description:r.string().optional(),config:re.optional()});var na={};E(na,{GuardrailBatchWrite:()=>Go});var $s=r.enum_(["TOPIC","PII"]);var Qs=r.enum_(["passed","failed"]);var Ys=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:$s,result:Qs,config:P,details:P});var Go=r.object({guardrails:r.list(Ys)});var sa={};E(sa,{WelcomeWizardSubmission:()=>$o});var $o=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 Zs=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});var br=r.object({biInformation:r.property("bi_information",r.list(Zs).optional())});var qs=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});var ep=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(qs).optional())});var rp=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});var op=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(rp).optional())});var ae=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var tp=r.enum_(["general","slack","pagerduty"]);var ip=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 np=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var sp=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:np,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 pp=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(sp).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Tx=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",tp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:ip,triggers:r.list(pp).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 cp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var lp=r.object({id:r.string().optional(),type:cp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional())});var mp=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 dp=r.object({id:r.string().optional(),eventType:r.property("event_type",mp),triggerConfigs:r.property("trigger_configs",r.list(lp).optional())});var up=r.enum_(["general","slack","pagerduty"]);var gp=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 Qo=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",up.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:gp,triggers:r.list(dp).optional()});var B=r.object({ids:r.list(r.string())});var fp=r.enum_(["general","slack","pagerduty"]);var hp=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 wp=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 bp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var xp=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:bp,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 Rp=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",wp),triggerConfigs:r.property("trigger_configs",r.list(xp).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Yo=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",fp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:hp,triggers:r.list(Rp).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 yp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Yo).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Ex=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var kp=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});var zp=r.enum_(["success","failure"]);var vp=r.object({status:zp.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 pa=r.object({ids:r.list(r.string())});var Sp=r.enum_(["trace","thread"]);var _p=r.object({username:r.string().optional(),status:r.number().optional()});var ne=r.object({name:r.string(),value:r.number()});var Ap=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:Sp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(_p).optional(),feedbackScores:r.property("feedback_scores",r.list(ne).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 Px=r.object({annotationQueues:r.property("annotation_queues",r.list(Ap))});var Tp=r.enum_(["trace","thread"]);var Ep=r.object({username:r.string().optional(),status:r.number().optional()});var Ke=r.object({name:r.string(),value:r.number()});var Zo=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:Tp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(Ep).optional(),feedbackScores:r.property("feedback_scores",r.list(Ke).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 Pp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Zo).optional(),sortableBy:r.list(r.string()).optional()});var Cp=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 jp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Cp).optional(),sortableBy:r.list(r.string()).optional()});var Ip=r.enum_(["trace","span"]);var Up=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});var ca=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",Ip),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(Up))});var Dp=r.enum_(["trace","span"]);var Cx=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",Dp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});var Np=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});var Mp=r.record(r.string(),r.unknown());var Fp=r.object({workspaceName:r.property("workspace_name",r.string().optional())});var Op=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Pe=r.object({field:r.string().optional(),operator:Op.optional(),key:r.string().optional(),value:r.string().optional()});var Ge=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",P.optional())});var Wp=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Bp=r.object({url:r.string(),detail:r.string().optional()});var Lp=r.object({url:r.string()});var Vp=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Bp.optional()),videoUrl:r.property("video_url",Lp.optional())});var $e=r.object({role:Wp,content:r.string().optional(),contentArray:r.property("content_array",r.list(Vp).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Hp=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Qe=r.object({name:r.string(),type:Hp,description:r.string()});var qo=r.object({model:Ge,messages:r.list($e),variables:r.record(r.string(),r.string()),schema:r.list(Qe)});var Jp=r.object({filters:r.list(Pe).optional(),code:qo.optional()});var et=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Xp=r.object({filters:r.list(Pe).optional(),code:et.optional()});var rt=r.object({model:Ge,messages:r.list($e),schema:r.list(Qe)});var Kp=r.object({filters:r.list(Re).optional(),code:rt.optional()});var ot=r.object({metric:r.string()});var Gp=r.object({filters:r.list(Re).optional(),code:ot.optional()});var $p=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var tt=r.object({field:r.string().optional(),operator:$p.optional(),key:r.string().optional(),value:r.string().optional()});var it=r.object({model:Ge,messages:r.list($e),variables:r.record(r.string(),r.string()),schema:r.list(Qe)});var Qp=r.object({filters:r.list(tt).optional(),code:it.optional()});var at=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(),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")}),jx=r.union("type",{llm_as_judge:Jp.extend(at),user_defined_metric_python:Xp.extend(at),trace_thread_llm_as_judge:Kp.extend(at),trace_thread_user_defined_metric_python:Gp.extend(at),span_llm_as_judge:Qp.extend(at)}).transform({transform:a=>a,untransform:a=>a});var Yp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var nt=r.object({field:r.string().optional(),operator:Yp.optional(),key:r.string().optional(),value:r.string().optional()});var Ye=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",le.optional())});var Zp=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var qp=r.object({url:r.string(),detail:r.string().optional()});var ec=r.object({url:r.string()});var rc=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",qp.optional()),videoUrl:r.property("video_url",ec.optional())});var Ze=r.object({role:Zp,content:r.string().optional(),contentArray:r.property("content_array",r.list(rc).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var oc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var qe=r.object({name:r.string(),type:oc,description:r.string()});var tc=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var ic=r.object({filters:r.list(nt).optional(),code:tc.optional()});var ac=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var nc=r.object({field:r.string().optional(),operator:ac.optional(),key:r.string().optional(),value:r.string().optional()});var sc=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var pc=r.object({filters:r.list(nc).optional(),code:sc.optional()});var cc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var st=r.object({field:r.string().optional(),operator:cc.optional(),key:r.string().optional(),value:r.string().optional()});var lc=r.object({model:Ye,messages:r.list(Ze),schema:r.list(qe)});var mc=r.object({filters:r.list(st).optional(),code:lc.optional()});var dc=r.object({metric:r.string()});var uc=r.object({filters:r.list(st).optional(),code:dc.optional()});var gc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var fc=r.object({filters:r.list(nt).optional(),code:gc.optional()});var pt=r.object({projectId:r.property("project_id",r.string()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),action:r.stringLiteral("evaluator")}),hc=r.union("type",{llm_as_judge:ic.extend(pt),user_defined_metric_python:fc.extend(pt),trace_thread_llm_as_judge:mc.extend(pt),trace_thread_user_defined_metric_python:uc.extend(pt),span_llm_as_judge:pc.extend(pt)}).transform({transform:a=>a,untransform:a=>a});var er=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",re.optional())});var wc=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var bc=r.object({url:r.string(),detail:r.string().optional()});var xc=r.object({url:r.string()});var Rc=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",bc.optional()),videoUrl:r.property("video_url",xc.optional())});var rr=r.object({role:wc,content:r.string().optional(),contentArray:r.property("content_array",r.list(Rc).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var yc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var or=r.object({name:r.string(),type:yc,description:r.string()});var kc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var ct=r.object({filters:r.list(Ae).optional(),code:kc.optional()});var zc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var lt=r.object({filters:r.list(Ae).optional(),code:zc.optional()});var vc=r.object({model:er,messages:r.list(rr),schema:r.list(or)});var mt=r.object({filters:r.list(Je).optional(),code:vc.optional()});var Sc=r.object({metric:r.string()});var dt=r.object({filters:r.list(Je).optional(),code:Sc.optional()});var _c=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var ut=r.object({filters:r.list(Ao).optional(),code:_c.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(),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")}),Ac=r.union("type",{llm_as_judge:ct.extend(gt),user_defined_metric_python:lt.extend(gt),trace_thread_llm_as_judge:mt.extend(gt),trace_thread_user_defined_metric_python:dt.extend(gt),span_llm_as_judge:ut.extend(gt)}).transform({transform:a=>a,untransform:a=>a});var Tc=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ac).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var ft=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(),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")}),Ec=r.union("type",{llm_as_judge:ct.extend(ft),user_defined_metric_python:lt.extend(ft),trace_thread_llm_as_judge:mt.extend(ft),trace_thread_user_defined_metric_python:dt.extend(ft),span_llm_as_judge:ut.extend(ft)}).transform({transform:a=>a,untransform:a=>a});var Pc=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);var Cc=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:Pc.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});var jc=r.object({content:r.list(Cc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Ic=r.object({filters:r.list(Pe).optional(),code:qo.optional()});var Uc=r.object({filters:r.list(Pe).optional(),code:et.optional()});var Dc=r.object({filters:r.list(Re).optional(),code:rt.optional()});var Nc=r.object({filters:r.list(Re).optional(),code:ot.optional()});var Mc=r.object({filters:r.list(tt).optional(),code:it.optional()});var ht=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),projectId:r.property("project_id",r.string()),action:r.stringLiteral("evaluator")}),Fc=r.union("type",{llm_as_judge:Ic.extend(ht),user_defined_metric_python:Uc.extend(ht),trace_thread_llm_as_judge:Dc.extend(ht),trace_thread_user_defined_metric_python:Nc.extend(ht),span_llm_as_judge:Mc.extend(ht)}).transform({transform:a=>a,untransform:a=>a});var Oc=r.enum_(["system","user","assistant","tool","function"]);var wt=r.object({id:r.string().optional(),index:r.number().optional(),type:r.stringLiteral("function").optional(),function:Ee.optional()});var Wc=r.object({role:Oc.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(wt).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",Ee.optional())});var Bc=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(wt).optional()),functionCall:r.property("function_call",Ee.optional())});var Lc=r.object({index:r.number().optional(),message:Wc.optional(),delta:Bc.optional(),finishReason:r.property("finish_reason",r.string().optional())});var Vc=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});var Hc=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});var Jc=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",Vc.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",Hc.optional())});var Xc=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(Lc).optional(),usage:Jc.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});var tr=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:re,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 Kc=r.object({content:r.list(tr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Gc=r.enum_(["private","public"]);var $c=r.enum_(["unknown","processing","completed","failed"]);var Qc=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});var Ix=r.object({id:r.string().optional(),name:r.string(),visibility:Gc.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:$c.optional(),latestVersion:r.property("latest_version",Qc.optional())});var Yc=r.enum_(["manual","trace","span","sdk"]);var bt=r.object({id:r.string().optional(),draftItemId:r.property("draft_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Yc,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(ro).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 Ux=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(bt)});var Zc=r.object({generatedSamples:r.property("generated_samples",r.list(bt).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});var Dx=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 qc=r.enum_(["string","number","object","boolean","array","null"]);var el=r.object({name:r.string().optional(),types:r.list(qc).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var rl=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 ol=r.enum_(["manual","trace","span","sdk"]);var la=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var tl=r.enum_(["ui","sdk","online_scoring"]);var il=r.enum_(["ui","sdk","online_scoring"]);var al=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:il.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 nl=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:tl,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(),al).optional())});var sl=r.enum_(["default","hidden"]);var pl=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:la.optional(),output:la.optional(),feedbackScores:r.property("feedback_scores",r.list(nl).optional()),comments:r.list(rl).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",sl.optional())});var cl=r.object({id:r.string().optional(),draftItemId:r.property("draft_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:ol,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(pl).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 ll=r.object({content:r.list(cl).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(el).optional(),sortableBy:r.list(r.string()).optional(),hasDraft:r.boolean().optional()});var ml=r.enum_(["private","public"]);var dl=r.enum_(["unknown","processing","completed","failed"]);var ul=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});var xr=r.object({id:r.string().optional(),name:r.string(),visibility:ml.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:dl.optional(),latestVersion:r.property("latest_version",ul.optional())});var gl=r.object({content:r.list(xr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});var fl=r.object({value:r.number().optional()});var hl=r.object({value:r.number().optional()});var xt=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var wl=r.object({value:xt.optional()});var bl=r.object({name:r.string().optional()}),xl=r.union("type",{PERCENTAGE:wl.extend(bl),COUNT:hl.extend(bl),AVG:fl.extend(bl)}).transform({transform:a=>a,untransform:a=>a});var ir=r.object({stats:r.list(xl).optional()});var Rl=r.enum_(["manual","trace","span","sdk"]);var yl=r.enum_(["default","hidden"]);var Rt=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",yl.optional())});var yt=r.object({id:r.string().optional(),draftItemId:r.property("draft_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Rl,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(Rt).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 kl=r.enum_(["string","number","object","boolean","array","null"]);var zl=r.object({name:r.string().optional(),types:r.list(kl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var vl=r.object({content:r.list(yt).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(zl).optional(),sortableBy:r.list(r.string()).optional(),hasDraft:r.boolean().optional()});var Sl=r.enum_(["string","number","object","boolean","array","null"]);var _l=r.object({name:r.string().optional(),types:r.list(Sl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Al=r.object({columns:r.list(_l).optional()});var Tl=r.object({typeName:r.string().optional()});var Nx=r.object({type:Tl.optional(),closed:r.boolean().optional()});var El=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});var Pl=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:El.optional()});var Rr=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(),isLatest:r.property("is_latest",r.boolean().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 Cl=r.object({content:r.list(Rr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var jl=r.enum_(["regular","trial","mini-batch"]);var Il=r.enum_(["running","completed","cancelled"]);var Ce=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var ma=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 Mx=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:N.optional(),type:jl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),comments:r.list(H).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:Ce.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:Il.optional(),experimentScores:r.property("experiment_scores",r.list(no).optional()),promptVersion:r.property("prompt_version",ma.optional()),promptVersions:r.property("prompt_versions",r.list(ma).optional())});var yr=r.object({ids:r.list(r.string())});var Ul=r.enum_(["TOPIC","PII"]);var Dl=r.enum_(["passed","failed"]);var Nl=r.object({name:Ul.optional(),result:Dl.optional()});var Ml=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Nl).optional()});var Fl=r.enum_(["default","hidden"]);var kt=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:N.optional(),output:N.optional(),metadata:N.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Te.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(Ml).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",Fl.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 Ol=r.enum_(["general","tool","llm","guardrail"]);var zt=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:Ol.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:N.optional(),output:N.optional(),metadata:N.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",Te.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 Wl=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",N.optional()),trace:kt.optional(),spans:r.list(zt).optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional())});var Fx=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(Wl)});var ar=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 me=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var Bl=r.enum_(["regular","trial","mini-batch"]);var Ll=r.enum_(["running","completed","cancelled"]);var Vl=r.object({name:r.string(),value:r.number()});var da=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 vt=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:me.optional(),type:Bl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Ke).optional()),comments:r.list(ar).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:xt.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:Ll.optional(),experimentScores:r.property("experiment_scores",r.list(Vl).optional()),promptVersion:r.property("prompt_version",da.optional()),promptVersions:r.property("prompt_versions",r.list(da).optional())});var Hl=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(vt).optional(),sortableBy:r.list(r.string()).optional()});var Jl=r.object({label:r.string().optional()});var Xl=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});var Kl=r.object({groupsDetails:r.property("groups_details",r.list(Xl).optional())});var Gl=r.object({content:r.record(r.string(),Jl).optional(),details:Kl.optional()});var $l=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:Ce.optional(),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),experimentScores:r.property("experiment_scores",r.list(ne).optional())});var Ql=r.object({label:r.string().optional(),aggregations:$l.optional()});var Yl=r.object({content:r.record(r.string(),Ql).optional()});var Ox=r.object({ids:r.list(r.string())});var Zl=r.object({typeName:r.string().optional()});var Wx=r.object({type:Zl.optional(),closed:r.boolean().optional()});var ql=r.object({trueLabel:r.string(),falseLabel:r.string()});var em=r.object({details:ql.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 rm=r.object({categories:r.record(r.string(),r.number())});var om=r.object({details:rm.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 tm=r.object({max:r.number(),min:r.number()});var im=r.object({details:tm.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 am=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()}),Bx=r.union("type",{numerical:im.extend(am),categorical:om.extend(am),boolean:em.extend(am)}).transform({transform:a=>a,untransform:a=>a});var nm=r.object({trueLabel:r.string(),falseLabel:r.string()});var sm=r.object({details:nm.optional()});var pm=r.object({categories:r.record(r.string(),r.number())});var cm=r.object({details:pm.optional()});var lm=r.object({max:r.number(),min:r.number()});var mm=r.object({details:lm.optional()});var dm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),um=r.union("type",{numerical:mm.extend(dm),categorical:cm.extend(dm),boolean:sm.extend(dm)}).transform({transform:a=>a,untransform:a=>a});var gm=r.object({trueLabel:r.string(),falseLabel:r.string()});var St=r.object({details:gm.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 fm=r.object({categories:r.record(r.string(),r.number())});var _t=r.object({details:fm.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 hm=r.object({max:r.number(),min:r.number()});var At=r.object({details:hm.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 wm=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()}),bm=r.union("type",{numerical:At.extend(wm),categorical:_t.extend(wm),boolean:St.extend(wm)}).transform({transform:a=>a,untransform:a=>a});var xm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(bm).optional()});var Rm=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()}),ym=r.union("type",{numerical:At.extend(Rm),categorical:_t.extend(Rm),boolean:St.extend(Rm)}).transform({transform:a=>a,untransform:a=>a});var km=r.object({trueLabel:r.string(),falseLabel:r.string()});var zm=r.object({details:km.optional()});var vm=r.object({categories:r.record(r.string(),r.number())});var Sm=r.object({details:vm.optional()});var _m=r.object({max:r.number(),min:r.number()});var Am=r.object({details:_m.optional()});var Tm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Em=r.union("type",{numerical:Am.extend(Tm),categorical:Sm.extend(Tm),boolean:zm.extend(Tm)}).transform({transform:a=>a,untransform:a=>a});var Pm=r.enum_(["TOPIC","PII"]);var Cm=r.enum_(["passed","failed"]);var jm=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:Pm,result:Cm,config:P,details:P});var Lx=r.object({guardrails:r.list(jm)});var Im=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var Tt=r.object({id:r.string().optional(),provider:Im,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 Um=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(Tt).optional(),sortableBy:r.list(r.string()).optional()});var Dm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var Vx=r.object({id:r.string().optional(),provider:Dm,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 ua=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});var Nm=r.enum_(["trace","thread"]);var ga=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",Nm)});var Hx=P;var Mm=r.enum_(["running","completed","cancelled","initialized","error"]);var Fm=r.object({role:r.string(),content:r.string()});var Om=r.object({messages:r.list(Fm)});var Wm=r.object({model:r.string(),parameters:P.optional()});var Bm=r.object({type:r.string(),parameters:P.optional()});var Lm=r.object({metrics:r.list(Bm)});var Vm=r.object({type:r.string(),parameters:P.optional()});var Hm=r.object({datasetName:r.property("dataset_name",r.string()),prompt:Om,llmModel:r.property("llm_model",Wm),evaluation:Lm,optimizer:Vm});var Jx=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:N.optional(),studioConfig:r.property("studio_config",Hm.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).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 Jm=r.object({role:r.string(),content:r.string()});var Xm=r.object({messages:r.list(Jm)});var Km=r.object({model:r.string(),parameters:le.optional()});var Gm=r.object({type:r.string(),parameters:le.optional()});var $m=r.object({metrics:r.list(Gm)});var Qm=r.object({type:r.string(),parameters:le.optional()});var Ym=r.object({datasetName:r.property("dataset_name",r.string()),prompt:Xm,llmModel:r.property("llm_model",Km),evaluation:$m,optimizer:Qm});var Zm=r.enum_(["running","completed","cancelled","initialized","error"]);var fa=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:Zm,metadata:ce.optional(),studioConfig:r.property("studio_config",Ym.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var qm=r.enum_(["running","completed","cancelled","initialized","error"]);var ed=r.object({role:r.string(),content:r.string()});var rd=r.object({messages:r.list(ed)});var od=r.object({model:r.string(),parameters:re.optional()});var td=r.object({type:r.string(),parameters:re.optional()});var id=r.object({metrics:r.list(td)});var ad=r.object({type:r.string(),parameters:re.optional()});var nd=r.object({datasetName:r.property("dataset_name",r.string()),prompt:rd,llmModel:r.property("llm_model",od),evaluation:id,optimizer:ad});var kr=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:qm,metadata:me.optional(),studioConfig:r.property("studio_config",nd.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Ke).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 ha=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(kr).optional(),sortableBy:r.list(r.string()).optional()});var sd=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});var Et=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var pd=r.enum_(["private","public"]);var Xx=r.object({id:r.string().optional(),name:r.string(),visibility:pd.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(ne).optional()),duration:Ce.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",Et.optional())});var cd=r.enum_(["private","public"]);var Pt=r.object({id:r.string().optional(),name:r.string(),visibility:cd.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 ld=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Pt).optional(),sortableBy:r.list(r.string()).optional()});var md=r.object({name:r.string().optional(),type:r.string().optional()});var dd=r.object({scores:r.list(md).optional()});var ud=r.object({time:r.date(),value:r.number().optional()});var gd=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var fd=r.enum_(["HOURLY","DAILY","WEEKLY"]);var hd=r.object({name:r.string().optional(),data:r.list(ud).optional()});var wd=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",gd.optional()),interval:fd.optional(),results:r.list(hd).optional()});var bd=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),duration:Ce.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",Et.optional())});var xd=r.object({content:r.list(bd).optional()});var Rd=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var yd=r.object({name:r.string(),value:r.number()});var kd=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var zd=r.enum_(["private","public"]);var vd=r.object({id:r.string().optional(),name:r.string(),visibility:zd.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(yd).optional()),duration:kd.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",Rd.optional())});var Kx=r.object({errors:r.list(r.string()).optional()});var Sd=r.enum_(["mustache","jinja2"]);var _d=r.enum_(["text","chat"]);var Ad=r.enum_(["mustache","jinja2"]);var Td=r.enum_(["text","chat"]);var Ed=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:P.optional(),type:Ad.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Td.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Gx=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:P.optional(),changeDescription:r.property("change_description",r.string().optional()),type:Sd.optional(),templateStructure:r.property("template_structure",_d.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",Ed.optional())});var $x=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Pd=r.enum_(["text","chat"]);var Cd=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",Pd.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",Se.optional())});var jd=r.enum_(["mustache","jinja2"]);var Id=r.enum_(["text","chat"]);var Ud=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:re.optional(),type:jd.optional(),changeDescription:r.property("change_description",r.string().optional()),templateStructure:r.property("template_structure",Id.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Dd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ud).optional()});var Nd=r.enum_(["text","chat"]);var Md=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",Nd.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 Fd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Md).optional(),sortableBy:r.list(r.string()).optional()});var Od=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),spanLlmAsJudgeEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),csvUploadEnabled:r.boolean(),exportEnabled:r.boolean(),optimizationStudioEnabled:r.boolean(),dashboardsEnabled:r.boolean(),datasetVersioningEnabled:r.boolean()});var Qx=r.object({spans:r.list(zt)});var Ct=r.object({name:r.string(),author:r.string().optional()});var jt=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Wd=r.enum_(["ui","sdk","online_scoring"]);var Bd=r.enum_(["ui","sdk","online_scoring"]);var Ld=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Bd.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 zr=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Wd,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(),Ld).optional())});var Vd=r.enum_(["general","tool","llm","guardrail"]);var It=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:Vd.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:me.optional(),output:me.optional(),metadata:me.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",jt.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(zr).optional()),comments:r.list(ar).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 Hd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(It).optional(),sortableBy:r.list(r.string()).optional()});var Jd=r.enum_(["ui","sdk","online_scoring"]);var Xd=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:Jd,author:r.string().optional(),id:r.string()});var Ut=r.object({scores:r.list(Xd)});var Yx=r.object({traces:r.list(kt)});var Zx=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});var Kd=r.enum_(["TOPIC","PII"]);var Gd=r.enum_(["passed","failed"]);var $d=r.object({name:Kd.optional(),result:Gd.optional()});var Qd=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list($d).optional()});var Yd=r.enum_(["default","hidden"]);var Dt=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:me.optional(),output:me.optional(),metadata:me.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",jt.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(zr).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(zr).optional()),comments:r.list(ar).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(Qd).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",Yd.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 Zd=r.enum_(["active","inactive"]);var Nt=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",N.optional()),lastMessage:r.property("last_message",N.optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),status:Zd.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 wa=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 qd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Nt).optional(),sortableBy:r.list(r.string()).optional()});var eu=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Dt).optional(),sortableBy:r.list(r.string()).optional()});var ru=r.object({completed:r.boolean().optional()});var nr=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});var vr=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 qx=r.object({time:r.date(),value:r.number().optional()});var ba=r.object({results:r.list(nr).optional()});var eR=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 Mt=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional())});var ou=r.object({results:r.list(nr).optional()});var xa=class{constructor(t={}){this._options=t;}getDatasetBiInfo(t){return w.fromPromise(this.__getDatasetBiInfo(t))}async __getDatasetBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:br.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 h("Timeout exceeded when calling GET /v1/internal/usage/bi-datasets.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getExperimentBiInfo(t){return w.fromPromise(this.__getExperimentBiInfo(t))}async __getExperimentBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:br.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 h("Timeout exceeded when calling GET /v1/internal/usage/bi-experiments.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansBiInfo(t){return w.fromPromise(this.__getSpansBiInfo(t))}async __getSpansBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:br.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 h("Timeout exceeded when calling GET /v1/internal/usage/bi-spans.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansCountForWorkspaces(t){return w.fromPromise(this.__getSpansCountForWorkspaces(t))}async __getSpansCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:ep.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 h("Timeout exceeded when calling GET /v1/internal/usage/workspace-span-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesBiInfo(t){return w.fromPromise(this.__getTracesBiInfo(t))}async __getTracesBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:br.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 h("Timeout exceeded when calling GET /v1/internal/usage/bi-traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesCountForWorkspaces(t){return w.fromPromise(this.__getTracesCountForWorkspaces(t))}async __getTracesCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:op.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 h("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 Ra=class{constructor(t={}){this._options=t;}findAlerts(t={},e){return w.fromPromise(this.__findAlerts(t,e))}async __findAlerts(t={},e){var g,f;let{page:o,size:i,sorting:n,filters:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.sorting=n),c!=null&&(m.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:yp.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 h("Timeout exceeded when calling GET /v1/private/alerts.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createAlert(t,e){return w.fromPromise(this.__createAlert(t,e))}async __createAlert(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Qo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(o.error.body,o.rawResponse);case 409:throw new M(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/alerts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAlertBatch(t,e){return w.fromPromise(this.__deleteAlertBatch(t,e))}async __deleteAlertBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(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 h("Timeout exceeded when calling POST /v1/private/alerts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAlertById(t,e){return w.fromPromise(this.__getAlertById(t,e))}async __getAlertById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),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:Yo.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 _(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 h("Timeout exceeded when calling GET /v1/private/alerts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAlert(t,e,o){return w.fromPromise(this.__updateAlert(t,e,o))}async __updateAlert(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),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:Qo.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new A(i.error.body,i.rawResponse);case 409:throw new M(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/alerts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getWebhookExamples(t={},e){return w.fromPromise(this.__getWebhookExamples(t,e))}async __getWebhookExamples(t={},e){var c,m;let{alertType:o}=t,i={};o!=null&&(i.alert_type=xi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}));let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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:i,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:kp.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 h("Timeout exceeded when calling GET /v1/private/alerts/webhooks/examples.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}testWebhook(t,e){return w.fromPromise(this.__testWebhook(t,e))}async __testWebhook(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Qo.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(o.ok)return {data:vp.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 L(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 h("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 ya=class{constructor(t={}){this._options=t;}addItemsToAnnotationQueue(t,e,o){return w.fromPromise(this.__addItemsToAnnotationQueue(t,e,o))}async __addItemsToAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/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:pa.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/add.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findAnnotationQueues(t={},e){return w.fromPromise(this.__findAnnotationQueues(t,e))}async __findAnnotationQueues(t={},e){var f,y;let{page:o,size:i,name:n,filters:c,sorting:m}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.filters=c),m!=null&&(u.sorting=m);let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.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:Pp.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 h("Timeout exceeded when calling GET /v1/private/annotation-queues.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createAnnotationQueue(t,e){return w.fromPromise(this.__createAnnotationQueue(t,e))}async __createAnnotationQueue(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Bo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/annotation-queues.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createAnnotationQueueBatch(t,e){return w.fromPromise(this.__createAnnotationQueueBatch(t,e))}async __createAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Lo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(o.error.body,o.rawResponse);case 409:throw new M(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/annotation-queues/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAnnotationQueueBatch(t,e){return w.fromPromise(this.__deleteAnnotationQueueBatch(t,e))}async __deleteAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(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 h("Timeout exceeded when calling POST /v1/private/annotation-queues/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAnnotationQueueById(t,e){return w.fromPromise(this.__getAnnotationQueueById(t,e))}async __getAnnotationQueueById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),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:Zo.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 _(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 h("Timeout exceeded when calling GET /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAnnotationQueue(t,e={},o){return w.fromPromise(this.__updateAnnotationQueue(t,e,o))}async __updateAnnotationQueue(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),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:Vo.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}removeItemsFromAnnotationQueue(t,e,o){return w.fromPromise(this.__removeItemsFromAnnotationQueue(t,e,o))}async __removeItemsFromAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/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:pa.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ka=class{constructor(t={}){this._options=t;}attachmentList(t,e){return w.fromPromise(this.__attachmentList(t,e))}async __attachmentList(t,e){var y,z;let{page:o,size:i,projectId:n,entityType:c,entityId:m,path:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),g.project_id=n,g.entity_type=yi.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m,g.path=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.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(f.ok)return {data:jp.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/list.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}completeMultiPartUpload(t,e){return w.fromPromise(this.__completeMultiPartUpload(t,e))}async __completeMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ca.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(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(ae.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 h("Timeout exceeded when calling POST /v1/private/attachment/upload-complete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAttachments(t,e){return w.fromPromise(this.__deleteAttachments(t,e))}async __deleteAttachments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ca.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(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(ae.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 h("Timeout exceeded when calling POST /v1/private/attachment/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}downloadAttachment(t,e){return w.fromPromise(this.__downloadAttachment(t,e))}async __downloadAttachment(t,e){var y,z;let{workspaceName:o,containerId:i,entityType:n,entityId:c,fileName:m,mimeType:u}=t,g={};o!=null&&(g.workspace_name=o),g.container_id=i,g.entity_type=ki.jsonOrThrow(n,{unrecognizedObjectKeys:"strip"}),g.entity_id=c,g.file_name=m,g.mime_type=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.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(f.ok)return {data:f.body,rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/download.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}startMultiPartUpload(t,e){return w.fromPromise(this.__startMultiPartUpload(t,e))}async __startMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Mr.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(o.ok)return {data:Np.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(ae.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 h("Timeout exceeded when calling POST /v1/private/attachment/upload-start.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}uploadAttachment(t,e){return w.fromPromise(this.__uploadAttachment(t,e))}async __uploadAttachment(t,e){var y,z;let{fileName:o,projectName:i,mimeType:n,entityType:c,entityId:m,body:u}=t,g={};g.file_name=o,i!=null&&(g.project_name=i),n!=null&&(g.mime_type=n),g.entity_type=vi.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.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:fr.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(f.ok)return {data:void 0,rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/attachment/upload.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var za=class{constructor(t={}){this._options=t;}access(t,e){return w.fromPromise(this.__access(t,e))}async __access(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Mp.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(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(ae.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 h("Timeout exceeded when calling POST /v1/private/auth.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceName(t){return w.fromPromise(this.__getWorkspaceName(t))}async __getWorkspaceName(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:Fp.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(ae.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 h("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 va=class{constructor(t={}){this._options=t;}findEvaluators(t={},e){return w.fromPromise(this.__findEvaluators(t,e))}async __findEvaluators(t={},e){var z,v;let{projectId:o,id:i,name:n,filters:c,sorting:m,page:u,size:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.id=i),n!=null&&(f.name=n),c!=null&&(f.filters=c),m!=null&&(f.sorting=m),u!=null&&(f.page=u.toString()),g!=null&&(f.size=g.toString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.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:f,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:Tc.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 h("Timeout exceeded when calling GET /v1/private/automations/evaluators.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}createAutomationRuleEvaluator(t,e){return w.fromPromise(this.__createAutomationRuleEvaluator(t,e))}async __createAutomationRuleEvaluator(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:hc.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(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 h("Timeout exceeded when calling POST /v1/private/automations/evaluators.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAutomationRuleEvaluatorBatch(t,e){return w.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(t,e))}async __deleteAutomationRuleEvaluatorBatch(t,e){var m,u;let{projectId:o,body:i}=t,n={};o!=null&&(n.project_id=o);let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.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:B.jsonOrThrow(i,{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 h("Timeout exceeded when calling POST /v1/private/automations/evaluators/delete.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getEvaluatorById(t,e={},o){return w.fromPromise(this.__getEvaluatorById(t,e,o))}async __getEvaluatorById(t,e={},o){var m,u;let{projectId:i}=e,n={};i!=null&&(n.project_id=i);let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),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:Ec.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 h("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}updateAutomationRuleEvaluator(t,e,o){return w.fromPromise(this.__updateAutomationRuleEvaluator(t,e,o))}async __updateAutomationRuleEvaluator(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),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:Fc.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getEvaluatorLogsById(t,e={},o){return w.fromPromise(this.__getEvaluatorLogsById(t,e,o))}async __getEvaluatorLogsById(t,e={},o){var m,u;let{size:i}=e,n={};i!=null&&(n.size=i.toString());let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}/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:jc.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 h("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 Sa=class{constructor(t={}){this._options=t;}createChatCompletions(t={},e){return w.fromPromise(this.__createChatCompletions(t,e))}async __createChatCompletions(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Jo.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(o.ok)return {data:Xc.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 h("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 _a=class{constructor(t={}){this._options=t;}findDashboards(t={},e){return w.fromPromise(this.__findDashboards(t,e))}async __findDashboards(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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: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:Kc.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 h("Timeout exceeded when calling GET /v1/private/dashboards.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createDashboard(t,e){return w.fromPromise(this.__createDashboard(t,e))}async __createDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Xo.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(o.ok)return {data:tr.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 h("Timeout exceeded when calling POST /v1/private/dashboards.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDashboardById(t,e){return w.fromPromise(this.__getDashboardById(t,e))}async __getDashboardById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),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:tr.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 _(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 h("Timeout exceeded when calling GET /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDashboard(t,e){return w.fromPromise(this.__deleteDashboard(t,e))}async __deleteDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),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 h("Timeout exceeded when calling DELETE /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDashboard(t,e={},o){return w.fromPromise(this.__updateDashboard(t,e,o))}async __updateDashboard(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),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:Ko.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(i.ok)return {data:tr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);case 409:throw new M(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDashboardsBatch(t,e){return w.fromPromise(this.__deleteDashboardsBatch(t,e))}async __deleteDashboardsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/dashboards/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:B.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(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 h("Timeout exceeded when calling POST /v1/private/dashboards/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Aa=class{constructor(t={}){this._options=t;}batchUpdateDatasetItems(t,e){return w.fromPromise(this.__batchUpdateDatasetItems(t,e))}async __batchUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Fr.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(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 h("Timeout exceeded when calling PATCH /v1/private/datasets/items/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findDatasets(t={},e){return w.fromPromise(this.__findDatasets(t,e))}async __findDatasets(t={},e){var v,S;let{page:o,size:i,withExperimentsOnly:n,withOptimizationsOnly:c,promptId:m,name:u,sorting:g,filters:f}=t,y={};o!=null&&(y.page=o.toString()),i!=null&&(y.size=i.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),f!=null&&(y.filters=f);let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.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(z.ok)return {data:gl.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}createDataset(t,e){return w.fromPromise(this.__createDataset(t,e))}async __createDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Or.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(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 h("Timeout exceeded when calling POST /v1/private/datasets.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createOrUpdateDatasetItems(t,e){return w.fromPromise(this.__createOrUpdateDatasetItems(t,e))}async __createOrUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Br.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(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 h("Timeout exceeded when calling PUT /v1/private/datasets/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createDatasetItemsFromCsv(t,e){return w.fromPromise(this.__createDatasetItemsFromCsv(t,e))}async __createDatasetItemsFromCsv(t,e){var c,m;let o=await qg();o.append("file",Ie(t.file)),o.append("dataset_id",t.datasetId);let i=await o.getRequest(),n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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(),...i.headers,...e==null?void 0:e.headers},requestType:"file",duplex:i.duplex,body:i.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 A(n.error.body,n.rawResponse);case 404:throw new _(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 h("Timeout exceeded when calling POST /v1/private/datasets/items/from-csv.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}createDatasetItemsFromSpans(t,e,o){return w.fromPromise(this.__createDatasetItemsFromSpans(t,e,o))}async __createDatasetItemsFromSpans(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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:Lr.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-spans.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createDatasetItemsFromTraces(t,e,o){return w.fromPromise(this.__createDatasetItemsFromTraces(t,e,o))}async __createDatasetItemsFromTraces(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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: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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-traces.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetById(t,e){return w.fromPromise(this.__getDatasetById(t,e))}async __getDatasetById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),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:xr.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 h("Timeout exceeded when calling GET /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDataset(t,e,o){return w.fromPromise(this.__updateDataset(t,e,o))}async __updateDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),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: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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/datasets/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDataset(t,e){return w.fromPromise(this.__deleteDataset(t,e))}async __deleteDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),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 h("Timeout exceeded when calling DELETE /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetByName(t,e){return w.fromPromise(this.__deleteDatasetByName(t,e))}async __deleteDatasetByName(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Jr.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(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 h("Timeout exceeded when calling POST /v1/private/datasets/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetItems(t,e){return w.fromPromise(this.__deleteDatasetItems(t,e))}async __deleteDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Xr.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(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 h("Timeout exceeded when calling POST /v1/private/datasets/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetsBatch(t,e){return w.fromPromise(this.__deleteDatasetsBatch(t,e))}async __deleteDatasetsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/datasets/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}expandDataset(t,e,o){return w.fromPromise(this.__expandDataset(t,e,o))}async __expandDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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:Kr.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(i.ok)return {data:Zc.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/expansions.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findDatasetItemsWithExperimentItems(t,e,o){return w.fromPromise(this.__findDatasetItemsWithExperimentItems(t,e,o))}async __findDatasetItemsWithExperimentItems(t,e,o){var v,S;let{page:i,size:n,experimentIds:c,filters:m,sorting:u,search:g,truncate:f}=e,y={};i!=null&&(y.page=i.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),f!=null&&(y.truncate=f.toString());let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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(z.ok)return {data:ll.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}getDatasetByIdentifier(t,e){return w.fromPromise(this.__getDatasetByIdentifier(t,e))}async __getDatasetByIdentifier(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Gr.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(o.ok)return {data:xr.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 h("Timeout exceeded when calling POST /v1/private/datasets/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDatasetExperimentItemsStats(t,e,o){return w.fromPromise(this.__getDatasetExperimentItemsStats(t,e,o))}async __getDatasetExperimentItemsStats(t,e,o){var u,g;let{experimentIds:i,filters:n}=e,c={};c.experiment_ids=i,n!=null&&(c.filters=n);let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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:ir.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 h("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(t,e){return w.fromPromise(this.__getDatasetItemById(t,e))}async __getDatasetItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),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:yt.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 h("Timeout exceeded when calling GET /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}patchDatasetItem(t,e,o){return w.fromPromise(this.__patchDatasetItem(t,e,o))}async __patchDatasetItem(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),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:Wr.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetItems(t,e={},o){return w.fromPromise(this.__getDatasetItems(t,e,o))}async __getDatasetItems(t,e={},o){var y,z;let{page:i,size:n,version:c,filters:m,truncate:u}=e,g={};i!=null&&(g.page=i.toString()),n!=null&&(g.size=n.toString()),c!=null&&(g.version=c),m!=null&&(g.filters=m),u!=null&&(g.truncate=u.toString());let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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:g,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(f.ok)return {data:vl.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}getDatasetItemsOutputColumns(t,e={},o){return w.fromPromise(this.__getDatasetItemsOutputColumns(t,e,o))}async __getDatasetItemsOutputColumns(t,e={},o){var m,u;let{experimentIds:i}=e,n={};i!=null&&(n.experiment_ids=i);let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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 h("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(t,e){return w.fromPromise(this.__streamDatasetItems(t,e))}async __streamDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:$r.jsonOrThrow(t,{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 h("Timeout exceeded when calling POST /v1/private/datasets/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}compareDatasetVersions(t,e){return w.fromPromise(this.__compareDatasetVersions(t,e))}async __compareDatasetVersions(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/diff`),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:Pl.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 _(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 h("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions/diff.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createVersionTag(t,e,o,i){return w.fromPromise(this.__createVersionTag(t,e,o,i))}async __createVersionTag(t,e,o,i){var c,m;let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(t)}/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(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",body:Qr.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 A(n.error.body,n.rawResponse);case 404:throw new _(n.error.body,n.rawResponse);case 409:throw new M(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 h("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(t,e={},o){return w.fromPromise(this.__listDatasetVersions(t,e,o))}async __listDatasetVersions(t,e={},o){var u,g;let{page:i,size:n}=e,c={};i!=null&&(c.page=i.toString()),n!=null&&(c.size=n.toString());let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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:Cl.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 A(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 h("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}createDatasetVersion(t,e={},o){return w.fromPromise(this.__createDatasetVersion(t,e,o))}async __createDatasetVersion(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/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: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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new A(i.error.body,i.rawResponse);case 409:throw new M(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteVersionTag(t,e,o,i){return w.fromPromise(this.__deleteVersionTag(t,e,o,i))}async __deleteVersionTag(t,e,o,i){var c,m;let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,`v1/private/datasets/${encodeURIComponent(o)}/versions/${encodeURIComponent(t)}/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(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 h("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})}}restoreDatasetVersion(t,e,o){return w.fromPromise(this.__restoreDatasetVersion(t,e,o))}async __restoreDatasetVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/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",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(i.ok)return {data:Rr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateDatasetVersion(t,e,o={},i){return w.fromPromise(this.__updateDatasetVersion(t,e,o,i))}async __updateDatasetVersion(t,e,o={},i){var c,m;let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(t)}`),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(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",body:qr.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:Rr.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new A(n.error.body,n.rawResponse);case 404:throw new _(n.error.body,n.rawResponse);case 409:throw new M(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 h("Timeout exceeded when calling PATCH /v1/private/datasets/{id}/versions/hash/{versionHash}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ta=class{constructor(t={}){this._options=t;}findExperiments(t={},e){return w.fromPromise(this.__findExperiments(t,e))}async __findExperiments(t={},e){var O,F;let{page:o,size:i,datasetId:n,optimizationId:c,types:m,name:u,datasetDeleted:g,promptId:f,sorting:y,filters:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.datasetId=n),c!=null&&(v.optimization_id=c),m!=null&&(v.types=m),u!=null&&(v.name=u),g!=null&&(v.dataset_deleted=g.toString()),f!=null&&(v.prompt_id=f),y!=null&&(v.sorting=y),z!=null&&(v.filters=z);let S=await x({url:R((F=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?F:b.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:v,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:Hl.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 A(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 h("Timeout exceeded when calling GET /v1/private/experiments.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}createExperiment(t,e){return w.fromPromise(this.__createExperiment(t,e))}async __createExperiment(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:eo.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(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 h("Timeout exceeded when calling POST /v1/private/experiments.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createExperimentItems(t,e){return w.fromPromise(this.__createExperimentItems(t,e))}async __createExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:oo.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(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 h("Timeout exceeded when calling POST /v1/private/experiments/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentItems(t,e){return w.fromPromise(this.__deleteExperimentItems(t,e))}async __deleteExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:to.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(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 h("Timeout exceeded when calling POST /v1/private/experiments/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentsById(t,e){return w.fromPromise(this.__deleteExperimentsById(t,e))}async __deleteExperimentsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:yr.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(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 h("Timeout exceeded when calling POST /v1/private/experiments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}experimentItemsBulk(t,e){return w.fromPromise(this.__experimentItemsBulk(t,e))}async __experimentItemsBulk(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ao.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(o.error.body,o.rawResponse);case 409:throw new M(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling PUT /v1/private/experiments/items/bulk.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames(t={},e){return w.fromPromise(this.__findFeedbackScoreNames(t,e))}async __findFeedbackScoreNames(t={},e){var c,m;let{experimentIds:o}=t,i={};o!=null&&(i.experiment_ids=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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:i,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:hr.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 h("Timeout exceeded when calling GET /v1/private/experiments/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findExperimentGroups(t={},e){return w.fromPromise(this.__findExperimentGroups(t,e))}async __findExperimentGroups(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,m={};o!=null&&(m.groups=o),i!=null&&(m.types=i),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:Gl.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 A(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 h("Timeout exceeded when calling GET /v1/private/experiments/groups.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}findExperimentGroupsAggregations(t={},e){return w.fromPromise(this.__findExperimentGroupsAggregations(t,e))}async __findExperimentGroupsAggregations(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,m={};o!=null&&(m.groups=o),i!=null&&(m.types=i),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:Yl.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 A(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 h("Timeout exceeded when calling GET /v1/private/experiments/groups/aggregations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}finishExperiments(t,e){return w.fromPromise(this.__finishExperiments(t,e))}async __finishExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:yr.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(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 h("Timeout exceeded when calling POST /v1/private/experiments/finish.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getExperimentById(t,e){return w.fromPromise(this.__getExperimentById(t,e))}async __getExperimentById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),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:vt.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 _(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 h("Timeout exceeded when calling GET /v1/private/experiments/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateExperiment(t,e={},o){return w.fromPromise(this.__updateExperiment(t,e,o))}async __updateExperiment(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new A(i.error.body,i.rawResponse);case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/experiments/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getExperimentItemById(t,e){return w.fromPromise(this.__getExperimentItemById(t,e))}async __getExperimentItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/items/${encodeURIComponent(t)}`),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:Rt.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 _(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 h("Timeout exceeded when calling GET /v1/private/experiments/items/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperimentItems(t,e){return w.fromPromise(this.__streamExperimentItems(t,e))}async __streamExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:po.jsonOrThrow(t,{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 h("Timeout exceeded when calling POST /v1/private/experiments/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperiments(t,e){return w.fromPromise(this.__streamExperiments(t,e))}async __streamExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:co.jsonOrThrow(t,{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 h("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 Ea=class{constructor(t={}){this._options=t;}findFeedbackDefinitions(t={},e){return w.fromPromise(this.__findFeedbackDefinitions(t,e))}async __findFeedbackDefinitions(t={},e){var g,f;let{page:o,size:i,name:n,type:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.type=Di.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}));let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:xm.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 h("Timeout exceeded when calling GET /v1/private/feedback-definitions.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createFeedbackDefinition(t,e){return w.fromPromise(this.__createFeedbackDefinition(t,e))}async __createFeedbackDefinition(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:um.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(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 h("Timeout exceeded when calling POST /v1/private/feedback-definitions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getFeedbackDefinitionById(t,e){return w.fromPromise(this.__getFeedbackDefinitionById(t,e))}async __getFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),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:ym.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 h("Timeout exceeded when calling GET /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateFeedbackDefinition(t,e,o){return w.fromPromise(this.__updateFeedbackDefinition(t,e,o))}async __updateFeedbackDefinition(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),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:Em.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteFeedbackDefinitionById(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionById(t,e))}async __deleteFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),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 M(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 h("Timeout exceeded when calling DELETE /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteFeedbackDefinitionsBatch(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionsBatch(t,e))}async __deleteFeedbackDefinitionsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new M(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 h("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 Pa=class{constructor(t={}){this._options=t;}createGuardrails(t,e){return w.fromPromise(this.__createGuardrails(t,e))}async __createGuardrails(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Go.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(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 h("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 Ca=class{constructor(t={}){this._options=t;}deleteLlmProviderApiKeysBatch(t,e){return w.fromPromise(this.__deleteLlmProviderApiKeysBatch(t,e))}async __deleteLlmProviderApiKeysBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/llm-provider-key/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findLlmProviderKeys(t){return w.fromPromise(this.__findLlmProviderKeys(t))}async __findLlmProviderKeys(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:Um.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 h("Timeout exceeded when calling GET /v1/private/llm-provider-key.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}storeLlmProviderApiKey(t,e){return w.fromPromise(this.__storeLlmProviderApiKey(t,e))}async __storeLlmProviderApiKey(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:lo.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(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(ae.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 h("Timeout exceeded when calling POST /v1/private/llm-provider-key.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getLlmProviderApiKeyById(t,e){return w.fromPromise(this.__getLlmProviderApiKeyById(t,e))}async __getLlmProviderApiKeyById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),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:Tt.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 _(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 h("Timeout exceeded when calling GET /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateLlmProviderApiKey(t,e={},o){return w.fromPromise(this.__updateLlmProviderApiKey(t,e,o))}async __updateLlmProviderApiKey(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new $(i.error.body,i.rawResponse);case 403:throw new Z(ae.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),i.rawResponse);case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ja=class{constructor(t={}){this._options=t;}evaluateThreads(t,e){return w.fromPromise(this.__evaluateThreads(t,e))}async __evaluateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ga.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(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")switch(o.error.statusCode){case 400:throw new A(o.error.body,o.rawResponse);case 404: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 h("Timeout exceeded when calling POST /v1/private/manual-evaluation/threads.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateTraces(t,e){return w.fromPromise(this.__evaluateTraces(t,e))}async __evaluateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:ga.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(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")switch(o.error.statusCode){case 400:throw new A(o.error.body,o.rawResponse);case 404: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 h("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 Ia=class{constructor(t={}){this._options=t;}receiveProtobufTraces(t){return w.fromPromise(this.__receiveProtobufTraces(t))}async __receiveProtobufTraces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(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 h("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 Ua=class{constructor(t={}){this._options=t;}cancelStudioOptimizations(t,e){return w.fromPromise(this.__cancelStudioOptimizations(t,e))}async __cancelStudioOptimizations(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/cancel`),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:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 501:throw new Ve(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 h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}/cancel.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findOptimizations(t={},e){return w.fromPromise(this.__findOptimizations(t,e))}async __findOptimizations(t={},e){var y,z;let{page:o,size:i,datasetId:n,name:c,datasetDeleted:m,filters:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),n!=null&&(g.dataset_id=n),c!=null&&(g.name=c),m!=null&&(g.dataset_deleted=m.toString()),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.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: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(f.ok)return {data:ha.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 400:throw new A(f.error.body,f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}createOptimization(t,e){return w.fromPromise(this.__createOptimization(t,e))}async __createOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:fa.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(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 h("Timeout exceeded when calling POST /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}upsertOptimization(t,e){return w.fromPromise(this.__upsertOptimization(t,e))}async __upsertOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:fa.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(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 h("Timeout exceeded when calling PUT /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteOptimizationsById(t,e){return w.fromPromise(this.__deleteOptimizationsById(t,e))}async __deleteOptimizationsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:yr.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(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 h("Timeout exceeded when calling POST /v1/private/optimizations/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findStudioOptimizations(t={},e){return w.fromPromise(this.__findStudioOptimizations(t,e))}async __findStudioOptimizations(t={},e){var y,z;let{page:o,size:i,datasetId:n,name:c,datasetDeleted:m,filters:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),n!=null&&(g.dataset_id=n),c!=null&&(g.name=c),m!=null&&(g.dataset_deleted=m.toString()),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/optimizations/studio"),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(f.ok)return {data:ha.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 400:throw new A(f.error.body,f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/studio.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}getOptimizationById(t,e){return w.fromPromise(this.__getOptimizationById(t,e))}async __getOptimizationById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),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:kr.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 _(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 h("Timeout exceeded when calling GET /v1/private/optimizations/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateOptimizationsById(t,e={},o){return w.fromPromise(this.__updateOptimizationsById(t,e,o))}async __updateOptimizationsById(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),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: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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/optimizations/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getStudioOptimizationById(t,e){return w.fromPromise(this.__getStudioOptimizationById(t,e))}async __getStudioOptimizationById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}`),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:kr.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 _(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 h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getStudioOptimizationLogs(t,e){return w.fromPromise(this.__getStudioOptimizationLogs(t,e))}async __getStudioOptimizationLogs(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/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(),...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:sd.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 _(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 h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}/logs.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Da=class{constructor(t={}){this._options=t;}findProjects(t={},e){return w.fromPromise(this.__findProjects(t,e))}async __findProjects(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:ld.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 h("Timeout exceeded when calling GET /v1/private/projects.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createProject(t,e){return w.fromPromise(this.__createProject(t,e))}async __createProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:go.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/projects.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getProjectById(t,e){return w.fromPromise(this.__getProjectById(t,e))}async __getProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),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:Pt.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 h("Timeout exceeded when calling GET /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteProjectById(t,e){return w.fromPromise(this.__deleteProjectById(t,e))}async __deleteProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),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 M(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 h("Timeout exceeded when calling DELETE /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateProject(t,e={},o){return w.fromPromise(this.__updateProject(t,e,o))}async __updateProject(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new A(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/projects/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteProjectsBatch(t,e){return w.fromPromise(this.__deleteProjectsBatch(t,e))}async __deleteProjectsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/projects/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNamesByProjectIds(t={},e){return w.fromPromise(this.__findFeedbackScoreNamesByProjectIds(t,e))}async __findFeedbackScoreNamesByProjectIds(t={},e){var c,m;let{projectIds:o}=t,i={};o!=null&&(i.project_ids=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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:i,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:dd.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 h("Timeout exceeded when calling GET /v1/private/projects/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getProjectMetrics(t,e={},o){return w.fromPromise(this.__getProjectMetrics(t,e,o))}async __getProjectMetrics(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}/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:ho.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(i.ok)return {data:wd.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new A(i.error.body,i.rawResponse);case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/{id}/metrics.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getProjectStats(t={},e){return w.fromPromise(this.__getProjectStats(t,e))}async __getProjectStats(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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:xd.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 h("Timeout exceeded when calling GET /v1/private/projects/stats.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}retrieveProject(t,e){return w.fromPromise(this.__retrieveProject(t,e))}async __retrieveProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:wo.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(o.ok)return {data:vd.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 A(o.error.body,o.rawResponse);case 404:throw new _(o.error.body,o.rawResponse);case 422:throw new L(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 h("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 Na=class{constructor(t={}){this._options=t;}getPrompts(t={},e){return w.fromPromise(this.__getPrompts(t,e))}async __getPrompts(t={},e){var f,y;let{page:o,size:i,name:n,sorting:c,filters:m}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.sorting=c),m!=null&&(u.filters=m);let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.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:Fd.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 h("Timeout exceeded when calling GET /v1/private/prompts.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createPrompt(t,e){return w.fromPromise(this.__createPrompt(t,e))}async __createPrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:bo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(o.error.body,o.rawResponse);case 409:throw new M(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/prompts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createPromptVersion(t,e){return w.fromPromise(this.__createPromptVersion(t,e))}async __createPromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:xo.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(o.ok)return {data:Se.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 A(o.error.body,o.rawResponse);case 409:throw new M(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling POST /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptById(t,e){return w.fromPromise(this.__getPromptById(t,e))}async __getPromptById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),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:Cd.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 _(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 h("Timeout exceeded when calling GET /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePrompt(t,e,o){return w.fromPromise(this.__updatePrompt(t,e,o))}async __updatePrompt(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new A(i.error.body,i.rawResponse);case 404:throw new _(i.error.body,i.rawResponse);case 409:throw new M(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/prompts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deletePrompt(t,e){return w.fromPromise(this.__deletePrompt(t,e))}async __deletePrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),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 h("Timeout exceeded when calling DELETE /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deletePromptsBatch(t,e){return w.fromPromise(this.__deletePromptsBatch(t,e))}async __deletePromptsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/prompts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersionById(t,e){return w.fromPromise(this.__getPromptVersionById(t,e))}async __getPromptVersionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/versions/${encodeURIComponent(t)}`),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:Se.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 _(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 h("Timeout exceeded when calling GET /v1/private/prompts/versions/{versionId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersions(t,e={},o){return w.fromPromise(this.__getPromptVersions(t,e,o))}async __getPromptVersions(t,e={},o){var u,g;let{page:i,size:n}=e,c={};i!=null&&(c.page=i.toString()),n!=null&&(c.size=n.toString());let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/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:Dd.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 h("Timeout exceeded when calling GET /v1/private/prompts/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}restorePromptVersion(t,e,o){return w.fromPromise(this.__restorePromptVersion(t,e,o))}async __restorePromptVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/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(i.ok)return {data:Se.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new A(i.error.body,i.rawResponse);case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/{promptId}/versions/{versionId}/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}retrievePromptVersion(t,e){return w.fromPromise(this.__retrievePromptVersion(t,e))}async __retrievePromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:yo.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(o.ok)return {data:Se.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 A(o.error.body,o.rawResponse);case 404:throw new _(o.error.body,o.rawResponse);case 422:throw new L(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 h("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 Ma=class{constructor(t={}){this._options=t;}getServiceToggles(t){return w.fromPromise(this.__getServiceToggles(t))}async __getServiceToggles(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:Od.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 h("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 Fa=class{constructor(t={}){this._options=t;}addSpanComment(t,e,o){return w.fromPromise(this.__addSpanComment(t,e,o))}async __addSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addSpanFeedbackScore(t,e,o){return w.fromPromise(this.__addSpanFeedbackScore(t,e,o))}async __addSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/spans/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createSpans(t,e){return w.fromPromise(this.__createSpans(t,e))}async __createSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:vo.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(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 h("Timeout exceeded when calling POST /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateSpans(t,e){return w.fromPromise(this.__batchUpdateSpans(t,e))}async __batchUpdateSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:_o.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(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 h("Timeout exceeded when calling PATCH /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpansByProject(t={},e){return w.fromPromise(this.__getSpansByProject(t,e))}async __getSpansByProject(t={},e){var te,lr;let{page:o,size:i,projectName:n,projectId:c,traceId:m,type:u,filters:g,truncate:f,stripAttachments:y,sorting:z,exclude:v,fromTime:S,toTime:O}=t,F={};o!=null&&(F.page=o.toString()),i!=null&&(F.size=i.toString()),n!=null&&(F.project_name=n),c!=null&&(F.project_id=c),m!=null&&(F.trace_id=m),u!=null&&(F.type=Qi.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"})),g!=null&&(F.filters=g),f!=null&&(F.truncate=f.toString()),y!=null&&(F.strip_attachments=y.toString()),z!=null&&(F.sorting=z),v!=null&&(F.exclude=v),S!=null&&(F.from_time=S.toISOString()),O!=null&&(F.to_time=O.toISOString());let G=await x({url:R((lr=(te=await s.get(this._options.baseUrl))!=null?te:await s.get(this._options.environment))!=null?lr:b.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:F,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:Hd.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 h("Timeout exceeded when calling GET /v1/private/spans.");case "unknown":throw new p({message:G.error.errorMessage,rawResponse:G.rawResponse})}}createSpan(t,e){return w.fromPromise(this.__createSpan(t,e))}async __createSpan(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:zo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new M(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 h("Timeout exceeded when calling POST /v1/private/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpanById(t,e={},o){return w.fromPromise(this.__getSpanById(t,e,o))}async __getSpanById(t,e={},o){var m,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),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:It.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 _(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 h("Timeout exceeded when calling GET /v1/private/spans/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteSpanById(t,e){return w.fromPromise(this.__deleteSpanById(t,e))}async __deleteSpanById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),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 Ve(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 h("Timeout exceeded when calling DELETE /v1/private/spans/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpan(t,e,o){return w.fromPromise(this.__updateSpan(t,e,o))}async __updateSpan(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteSpanComments(t,e){return w.fromPromise(this.__deleteSpanComments(t,e))}async __deleteSpanComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/spans/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteSpanFeedbackScore(t,e,o){return w.fromPromise(this.__deleteSpanFeedbackScore(t,e,o))}async __deleteSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/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:Ct.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findFeedbackScoreNames1(t={},e){return w.fromPromise(this.__findFeedbackScoreNames1(t,e))}async __findFeedbackScoreNames1(t={},e){var m,u;let{projectId:o,type:i}=t,n={};o!=null&&(n.project_id=o),i!=null&&(n.type=Yi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}));let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.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:wr.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 h("Timeout exceeded when calling GET /v1/private/spans/feedback-scores/names.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getSpanComment(t,e,o){return w.fromPromise(this.__getSpanComment(t,e,o))}async __getSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/{spanId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getSpanStats(t={},e){return w.fromPromise(this.__getSpanStats(t,e))}async __getSpanStats(t={},e){var z,v;let{projectId:o,projectName:i,traceId:n,type:c,filters:m,fromTime:u,toTime:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.project_name=i),n!=null&&(f.trace_id=n),c!=null&&(f.type=Zi.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"})),m!=null&&(f.filters=m),u!=null&&(f.from_time=u.toISOString()),g!=null&&(f.to_time=g.toISOString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.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:f,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:ir.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 h("Timeout exceeded when calling GET /v1/private/spans/stats.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}scoreBatchOfSpans(t,e){return w.fromPromise(this.__scoreBatchOfSpans(t,e))}async __scoreBatchOfSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Ut.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(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 h("Timeout exceeded when calling PUT /v1/private/spans/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchSpans(t={},e){return w.fromPromise(this.__searchSpans(t,e))}async __searchSpans(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:To.jsonOrThrow(t,{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 A(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 h("Timeout exceeded when calling POST /v1/private/spans/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpanComment(t,e,o){return w.fromPromise(this.__updateSpanComment(t,e,o))}async __updateSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Oa=class{constructor(t={}){this._options=t;}addThreadComment(t,e,o){return w.fromPromise(this.__addThreadComment(t,e,o))}async __addThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}/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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceComment(t,e,o){return w.fromPromise(this.__addTraceComment(t,e,o))}async __addTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceFeedbackScore(t,e,o){return w.fromPromise(this.__addTraceFeedbackScore(t,e,o))}async __addTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createTraces(t,e){return w.fromPromise(this.__createTraces(t,e))}async __createTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Po.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(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 h("Timeout exceeded when calling POST /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateTraces(t,e){return w.fromPromise(this.__batchUpdateTraces(t,e))}async __batchUpdateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:jo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(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 h("Timeout exceeded when calling PATCH /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateThreads(t,e){return w.fromPromise(this.__batchUpdateThreads(t,e))}async __batchUpdateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Uo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new A(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 h("Timeout exceeded when calling PATCH /v1/private/traces/threads/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}closeTraceThread(t={},e){return w.fromPromise(this.__closeTraceThread(t,e))}async __closeTraceThread(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Do.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404: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 h("Timeout exceeded when calling PUT /v1/private/traces/threads/close.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTracesByProject(t={},e){return w.fromPromise(this.__getTracesByProject(t,e))}async __getTracesByProject(t={},e){var F,G;let{page:o,size:i,projectName:n,projectId:c,filters:m,truncate:u,stripAttachments:g,sorting:f,exclude:y,fromTime:z,toTime:v}=t,S={};o!=null&&(S.page=o.toString()),i!=null&&(S.size=i.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()),f!=null&&(S.sorting=f),y!=null&&(S.exclude=y),z!=null&&(S.from_time=z.toISOString()),v!=null&&(S.to_time=v.toISOString());let O=await x({url:R((G=(F=await s.get(this._options.baseUrl))!=null?F:await s.get(this._options.environment))!=null?G:b.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:eu.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 h("Timeout exceeded when calling GET /v1/private/traces.");case "unknown":throw new p({message:O.error.errorMessage,rawResponse:O.rawResponse})}}createTrace(t,e){return w.fromPromise(this.__createTrace(t,e))}async __createTrace(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Eo.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(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 h("Timeout exceeded when calling POST /v1/private/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceById(t,e={},o){return w.fromPromise(this.__getTraceById(t,e,o))}async __getTraceById(t,e={},o){var m,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),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:Dt.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 h("Timeout exceeded when calling GET /v1/private/traces/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteTraceById(t,e){return w.fromPromise(this.__deleteTraceById(t,e))}async __deleteTraceById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),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 h("Timeout exceeded when calling DELETE /v1/private/traces/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateTrace(t,e,o){return w.fromPromise(this.__updateTrace(t,e,o))}async __updateTrace(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),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: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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteThreadComments(t,e){return w.fromPromise(this.__deleteThreadComments(t,e))}async __deleteThreadComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/traces/threads/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteThreadFeedbackScores(t,e){return w.fromPromise(this.__deleteThreadFeedbackScores(t,e))}async __deleteThreadFeedbackScores(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:No.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(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 h("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(t,e){return w.fromPromise(this.__deleteTraceComments(t,e))}async __deleteTraceComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/traces/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceFeedbackScore(t,e,o){return w.fromPromise(this.__deleteTraceFeedbackScore(t,e,o))}async __deleteTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/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:Ct.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteTraceThreads(t,e){return w.fromPromise(this.__deleteTraceThreads(t,e))}async __deleteTraceThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Mo.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(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 h("Timeout exceeded when calling POST /v1/private/traces/threads/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraces(t,e){return w.fromPromise(this.__deleteTraces(t,e))}async __deleteTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:B.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(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 h("Timeout exceeded when calling POST /v1/private/traces/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames2(t={},e){return w.fromPromise(this.__findFeedbackScoreNames2(t,e))}async __findFeedbackScoreNames2(t={},e){var c,m;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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:i,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:Xe.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 h("Timeout exceeded when calling GET /v1/private/traces/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findTraceThreadsFeedbackScoreNames(t={},e){return w.fromPromise(this.__findTraceThreadsFeedbackScoreNames(t,e))}async __findTraceThreadsFeedbackScoreNames(t={},e){var c,m;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.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:i,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:Xe.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 h("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(t={},e){return w.fromPromise(this.__getTraceStats(t,e))}async __getTraceStats(t={},e){var f,y;let{projectId:o,projectName:i,filters:n,fromTime:c,toTime:m}=t,u={};o!=null&&(u.project_id=o),i!=null&&(u.project_name=i),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),m!=null&&(u.to_time=m.toISOString());let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.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:ir.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 h("Timeout exceeded when calling GET /v1/private/traces/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getThreadComment(t,e,o){return w.fromPromise(this.__getThreadComment(t,e,o))}async __getThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/{threadId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceComment(t,e,o){return w.fromPromise(this.__getTraceComment(t,e,o))}async __getTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/{traceId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceThread(t,e){return w.fromPromise(this.__getTraceThread(t,e))}async __getTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:wa.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(o.ok)return {data:Nt.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 _(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 h("Timeout exceeded when calling POST /v1/private/traces/threads/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceThreads(t={},e){return w.fromPromise(this.__getTraceThreads(t,e))}async __getTraceThreads(t={},e){var O,F;let{page:o,size:i,projectName:n,projectId:c,truncate:m,stripAttachments:u,filters:g,sorting:f,fromTime:y,toTime:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.project_name=n),c!=null&&(v.project_id=c),m!=null&&(v.truncate=m.toString()),u!=null&&(v.strip_attachments=u.toString()),g!=null&&(v.filters=g),f!=null&&(v.sorting=f),y!=null&&(v.from_time=y.toISOString()),z!=null&&(v.to_time=z.toISOString());let S=await x({url:R((F=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?F:b.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:v,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:qd.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 h("Timeout exceeded when calling GET /v1/private/traces/threads.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}openTraceThread(t,e){return w.fromPromise(this.__openTraceThread(t,e))}async __openTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:wa.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(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 h("Timeout exceeded when calling PUT /v1/private/traces/threads/open.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfThreads(t,e){return w.fromPromise(this.__scoreBatchOfThreads(t,e))}async __scoreBatchOfThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Fo.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(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 h("Timeout exceeded when calling PUT /v1/private/traces/threads/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfTraces(t,e){return w.fromPromise(this.__scoreBatchOfTraces(t,e))}async __scoreBatchOfTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Ut.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(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 h("Timeout exceeded when calling PUT /v1/private/traces/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraceThreads(t={},e){return w.fromPromise(this.__searchTraceThreads(t,e))}async __searchTraceThreads(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Oo.jsonOrThrow(t,{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 A(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 h("Timeout exceeded when calling POST /v1/private/traces/threads/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraces(t={},e){return w.fromPromise(this.__searchTraces(t,e))}async __searchTraces(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Wo.jsonOrThrow(t,{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 A(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 h("Timeout exceeded when calling POST /v1/private/traces/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateThread(t,e,o){return w.fromPromise(this.__updateThread(t,e,o))}async __updateThread(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}`),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: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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/{threadModelId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateThreadComment(t,e,o){return w.fromPromise(this.__updateThreadComment(t,e,o))}async __updateThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateTraceComment(t,e,o){return w.fromPromise(this.__updateTraceComment(t,e,o))}async __updateTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/comments/${encodeURIComponent(t)}`),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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Wa=class{constructor(t={}){this._options=t;}getWelcomeWizardStatus(t){return w.fromPromise(this.__getWelcomeWizardStatus(t))}async __getWelcomeWizardStatus(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:ru.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 h("Timeout exceeded when calling GET /v1/private/welcome-wizard.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}submitWelcomeWizard(t={},e){return w.fromPromise(this.__submitWelcomeWizard(t,e))}async __submitWelcomeWizard(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:$o.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(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 h("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 Ba=class{constructor(t={}){this._options=t;}costsSummary(t,e){return w.fromPromise(this.__costsSummary(t,e))}async __costsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:vr.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(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")switch(o.error.statusCode){case 400:throw new A(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 h("Timeout exceeded when calling POST /v1/private/workspaces/costs/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceConfiguration(t){return w.fromPromise(this.__getWorkspaceConfiguration(t))}async __getWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:Mt.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 _(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 h("Timeout exceeded when calling GET /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}upsertWorkspaceConfiguration(t,e){return w.fromPromise(this.__upsertWorkspaceConfiguration(t,e))}async __upsertWorkspaceConfiguration(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:Mt.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(o.ok)return {data:Mt.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 A(o.error.body,o.rawResponse);case 422:throw new L(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 h("Timeout exceeded when calling PUT /v1/private/workspaces/configurations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteWorkspaceConfiguration(t){return w.fromPromise(this.__deleteWorkspaceConfiguration(t))}async __deleteWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(e.ok)return {data:void 0,rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new _(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 h("Timeout exceeded when calling DELETE /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getCost(t,e){return w.fromPromise(this.__getCost(t,e))}async __getCost(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:vr.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(o.ok)return {data:ba.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 A(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 h("Timeout exceeded when calling POST /v1/private/workspaces/costs.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getMetric(t,e){return w.fromPromise(this.__getMetric(t,e))}async __getMetric(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:vr.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(o.ok)return {data:ba.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 A(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 h("Timeout exceeded when calling POST /v1/private/workspaces/metrics.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}metricsSummary(t,e){return w.fromPromise(this.__metricsSummary(t,e))}async __metricsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.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:vr.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(o.ok)return {data:ou.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 A(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 h("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 La=class{constructor(t={}){this._options=t;}datasetsRedirect(t,e){return w.fromPromise(this.__datasetsRedirect(t,e))}async __datasetsRedirect(t,e){var u,g;let{datasetId:o,workspaceName:i,path:n}=t,c={};c.dataset_id=o,i!=null&&(c.workspace_name=i),c.path=n;let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.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 A(m.error.body,m.rawResponse);case 404: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 h("Timeout exceeded when calling GET /v1/session/redirect/datasets.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}experimentsRedirect(t,e){return w.fromPromise(this.__experimentsRedirect(t,e))}async __experimentsRedirect(t,e){var g,f;let{datasetId:o,experimentId:i,workspaceName:n,path:c}=t,m={};m.dataset_id=o,m.experiment_id=i,n!=null&&(m.workspace_name=n),m.path=c;let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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 A(u.error.body,u.rawResponse);case 404: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 h("Timeout exceeded when calling GET /v1/session/redirect/experiments.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}optimizationsRedirect(t,e){return w.fromPromise(this.__optimizationsRedirect(t,e))}async __optimizationsRedirect(t,e){var g,f;let{datasetId:o,optimizationId:i,workspaceName:n,path:c}=t,m={};m.dataset_id=o,m.optimization_id=i,n!=null&&(m.workspace_name=n),m.path=c;let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.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 A(u.error.body,u.rawResponse);case 404: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 h("Timeout exceeded when calling GET /v1/session/redirect/optimizations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}projectsRedirect(t,e){return w.fromPromise(this.__projectsRedirect(t,e))}async __projectsRedirect(t,e){var u,g;let{traceId:o,workspaceName:i,path:n}=t,c={};c.trace_id=o,i!=null&&(c.workspace_name=i),c.path=n;let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.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 A(m.error.body,m.rawResponse);case 404: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 h("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 Ft=class{constructor(t={}){this._options=t;}get systemUsage(){var t;return (t=this._systemUsage)!=null?t:this._systemUsage=new xa(this._options)}get alerts(){var t;return (t=this._alerts)!=null?t:this._alerts=new Ra(this._options)}get annotationQueues(){var t;return (t=this._annotationQueues)!=null?t:this._annotationQueues=new ya(this._options)}get attachments(){var t;return (t=this._attachments)!=null?t:this._attachments=new ka(this._options)}get check(){var t;return (t=this._check)!=null?t:this._check=new za(this._options)}get automationRuleEvaluators(){var t;return (t=this._automationRuleEvaluators)!=null?t:this._automationRuleEvaluators=new va(this._options)}get chatCompletions(){var t;return (t=this._chatCompletions)!=null?t:this._chatCompletions=new Sa(this._options)}get dashboards(){var t;return (t=this._dashboards)!=null?t:this._dashboards=new _a(this._options)}get datasets(){var t;return (t=this._datasets)!=null?t:this._datasets=new Aa(this._options)}get experiments(){var t;return (t=this._experiments)!=null?t:this._experiments=new Ta(this._options)}get feedbackDefinitions(){var t;return (t=this._feedbackDefinitions)!=null?t:this._feedbackDefinitions=new Ea(this._options)}get guardrails(){var t;return (t=this._guardrails)!=null?t:this._guardrails=new Pa(this._options)}get llmProviderKey(){var t;return (t=this._llmProviderKey)!=null?t:this._llmProviderKey=new Ca(this._options)}get manualEvaluation(){var t;return (t=this._manualEvaluation)!=null?t:this._manualEvaluation=new ja(this._options)}get openTelemetryIngestion(){var t;return (t=this._openTelemetryIngestion)!=null?t:this._openTelemetryIngestion=new Ia(this._options)}get optimizations(){var t;return (t=this._optimizations)!=null?t:this._optimizations=new Ua(this._options)}get projects(){var t;return (t=this._projects)!=null?t:this._projects=new Da(this._options)}get prompts(){var t;return (t=this._prompts)!=null?t:this._prompts=new Na(this._options)}get serviceToggles(){var t;return (t=this._serviceToggles)!=null?t:this._serviceToggles=new Ma(this._options)}get spans(){var t;return (t=this._spans)!=null?t:this._spans=new Fa(this._options)}get traces(){var t;return (t=this._traces)!=null?t:this._traces=new Oa(this._options)}get welcomeWizard(){var t;return (t=this._welcomeWizard)!=null?t:this._welcomeWizard=new Wa(this._options)}get workspaces(){var t;return (t=this._workspaces)!=null?t:this._workspaces=new Ba(this._options)}get redirect(){var t;return (t=this._redirect)!=null?t:this._redirect=new La(this._options)}isAlive(t){return w.fromPromise(this.__isAlive(t))}async __isAlive(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(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 h("Timeout exceeded when calling GET /is-alive/ping.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}version(t){return w.fromPromise(this.__version(t))}async __version(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.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(),...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(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 h("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 oe=()=>uuid.v7();var Va=class a{constructor(t,e){this.data=t;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=t=>{var o;let e={parentSpanId:this.data.parentSpanId,projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,traceId:this.data.traceId,...t};return this.opik.spanBatchQueue.update(this.data.id,e),this.data={...this.data,...t},this};this.span=t=>{var n;let e=(n=this.data.projectName)!=null?n:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new a(o,this.opik);return this.childSpans.push(i),i};}};var Ha=class{constructor(t,e){this.data=t;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=t=>{var n,c;let e=(c=(n=this.data.projectName)!=null?n:t.projectName)!=null?c:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new Va(o,this.opik);return this.spans.push(i),i};this.update=t=>{var o;let e={projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,...t};return this.opik.traceBatchQueue.update(this.data.id,e),this.data={...this.data,...e},this};}};var Tf={EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECT_BY_NAME:"redirect/projects"},Ja={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",PROJECT_NAME:"name",PATH:"path"},oR=a=>Object.entries(a).map(([t,e])=>`${t}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),tR=a=>a.replace(/\/api$/,""),iR=a=>Buffer.from(a).toString("base64"),Ef=(a,t,e)=>{let o=oR(e),i=`${t}?${o}`;return new URL(i,a).toString()},Pf=({datasetId:a,experimentId:t,baseUrl:e})=>Ef(e,Tf.EXPERIMENTS,{[Ja.EXPERIMENT_ID]:t,[Ja.DATASET_ID]:a,[Ja.PATH]:iR(e)});var Cf=({projectName:a,workspaceName:t,apiUrl:e})=>{let o=tR(e),i=`${t}/${Tf.PROJECT_BY_NAME}`;return Ef(o,i,{[Ja.PROJECT_NAME]:a})};var aR=300,Xa=100,Ot=class{constructor({action:t,batchSize:e=Xa,delay:o,enableBatch:i,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=(t,e)=>{if(this.queue.set(t,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(t,e)=>{let o=this.queue.get(t);o&&(this.queue.set(t,{...o,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let t=new Map(this.queue);this.queue.clear(),k.debug(`Adding ${t.size} items to ${this.name} promise:`,t),this.promise=this.promise.finally(()=>(k.debug(`Flushing ${this.name}:`,t),this.action(t))).catch(e=>{k.error(`Failed to flush ${this.name}:`,e,t);}),await this.promise;};this.action=t,this.batchSize=e,this.delay=o,this.enableBatch=i,this.name=n;}},ge=class{constructor({delay:t=aR,enableCreateBatch:e=true,enableUpdateBatch:o=false,enableDeleteBatch:i=true,createBatchSize:n=Xa,updateBatchSize:c=Xa,deleteBatchSize:m=Xa,name:u="BatchQueue"}={}){this.create=t=>{let e=this.getId(t);this.createQueue.add(e,t);};this.get=async t=>{let e=this.createQueue.queue.get(t);return e||this.getEntity(t)};this.update=(t,e)=>{if(this.createQueue.queue.get(t)){this.createQueue.update(t,e);return}this.updateQueue.add(t,e);};this.delete=t=>{if(this.createQueue.queue.has(t)){this.createQueue.queue.delete(t);return}this.deleteQueue.add(t);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=u,this.createQueue=new Ot({action:async g=>{await this.createEntities(Array.from(g.values()));},delay:t,enableBatch:e,batchSize:n,name:`${u}:createQueue`}),this.updateQueue=new Ot({action:async g=>{await this.createQueue.flush();let f=Array.from(g.entries());for(let[y,z]of f)await this.updateEntity(y,z);},delay:t,enableBatch:o,batchSize:c,name:`${u}:updateQueue`}),this.deleteQueue=new Ot({action:async g=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(g.keys()));},delay:t,enableBatch:i,batchSize:m,name:`${u}:deleteQueue`});}};var Ka=class extends ge{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 Ga=class extends ge{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 $a=class extends ge{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 Qa=class extends ge{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 Ya=class extends Ft{constructor(e){super(e);this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};var Za=class extends ge{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 tu=null;async function jf(){return tu||(tu=await nR__default.default()),tu}var Wt=class a{constructor(t){let{id:e,traceId:o,spanId:i,source:n,...c}=t;this.id=e||oe(),this.traceId=o,this.spanId=i,this.source=n||Bn.Sdk,this.data={...c};}getContent(t=false){return t?{...this.data,id:this.id}:{...this.data}}async contentHash(){let t=this.getContent(),e=sR__default.default(t);return (await jf()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent()}}static fromApiModel(t){return new a({id:t.id,traceId:t.traceId,spanId:t.spanId,source:t.source,...t.data})}};async function Ne(a,t,e){var c;if(e===0)return [];let o=new util.TextDecoder("utf-8"),i=[],n="";try{for await(let m of a){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 f=JSON.parse(g),y=t.parse(f);if(y.ok){if(i.push(y.value),e!==void 0&&i.length>=e)return i}else k.error("Error parsing experiment item:",y.errors);}catch(f){k.error("Error parsing JSON line:",f instanceof Error?f.message:String(f));}}if(n.trim()&&n!=="{}"&&n!=="[]"&&n!=="null")try{let m=JSON.parse(n),u=t.parse(m);u.ok?i.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 i}function Bt(a,t){let e=[];for(let o=0;o<a.length;o+=t.maxBatchSize)e.push(a.slice(o,o+t.maxBatchSize));return e}var de=class extends Error{constructor(t){var e;super(t.message),this.name=this.constructor.name,this.code=t.code,this.statusCode=t.statusCode,this.details=t.details,this.originalError=t.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 If={DATASET_NOT_FOUND:a=>`Dataset with name '${a}' not found`,DATASET_ITEM_NOT_FOUND:a=>`Dataset item with id '${a}' not found`,DATASET_ITEM_MISSING_ID:a=>`Item at index ${a} is missing an ID required for update`,INVALID_JSON_FORMAT:a=>`Invalid JSON format${a?": "+a:""}`,JSON_NOT_ARRAY:"JSON input must be an array of objects",ITEM_NOT_OBJECT:(a,t)=>`Item at position ${a} is not an object (${t})`,INSERTION_FAILED:a=>`Failed to insert items from JSON: ${a}`,DATASET_JSON_PARSE_ERROR:a=>`Failed to parse JSON input: ${a}`};var cR={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID"},qa=class extends de{constructor(t){super({message:If.DATASET_ITEM_MISSING_ID(t),code:cR.DATASET_ITEM_MISSING_ID});}};var lR={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},en=class extends de{constructor(t){super({message:t,code:lR.SEARCH_TIMEOUT});}};var rn={JSON_NOT_ARRAY:a=>`JSON input must be an array of objects${a?` (${a})`:""}`,JSON_PARSE_ERROR:"Failed to parse JSON input",JSON_ITEM_NOT_OBJECT:(a,t)=>`Item at position ${a} is not an object (${t})`};var iu={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},on=class extends de{constructor(t){let e=t instanceof Error?t:new Error(String(t));super({message:rn.JSON_PARSE_ERROR,code:iu.JSON_PARSE_ERROR,originalError:e});}},tn=class extends de{constructor(t){super({message:rn.JSON_NOT_ARRAY(t),code:iu.JSON_NOT_ARRAY});}},an=class extends de{constructor(t,e){super({message:rn.JSON_ITEM_NOT_OBJECT(t,e),code:iu.JSON_ITEM_NOT_OBJECT});}};var Sr=class{constructor({name:t,description:e,id:o},i){this.opik=i;this.idToHash=new Map;this.hashes=new Set;this.id=o||oe(),this.name=t,this.description=e;}async insert(t){if(!t||t.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let e=await this.getDeduplicatedItems(t),o=Bt(e,{maxBatchSize:1e3});try{let i=0;for(let n of o)await this.opik.api.datasets.createOrUpdateDatasetItems({datasetId:this.id,items:n}),i+=n.length,k.info(`Inserted ${Math.min(i,e.length)} of ${e.length} items into dataset ${this.id}`);}catch(i){throw k.error(`Error inserting items into dataset: ${i instanceof Error?i.message:String(i)}`),i}}async update(t){if(!(!t||t.length===0)){for(let e=0;e<t.length;e++)if(!t[e].id)throw new qa(e);await this.insert(t);}}async delete(t){if(!t||t.length===0){k.info("No item IDs provided for deletion");return}let e=Bt(t,{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 i of o)if(this.idToHash.has(i)){let n=this.idToHash.get(i);this.hashes.delete(n),this.idToHash.delete(i);}}}async clear(){let e=(await this.getItems()).map(o=>o.id).filter(Boolean);e.length!==0&&await this.delete(e);}async getItems(t,e){return (await this.getItemsAsDataclasses(t,e)).map(i=>i.getContent(true))}async getItemsAsDataclasses(t,e){let o=t?Math.min(t,2e3):2e3,i=await this.opik.api.datasets.streamDatasetItems({datasetName:this.name,lastRetrievedId:e,steamLimit:o});return (await Ne(i,j.DatasetItemPublic,t)).map(c=>Wt.fromApiModel(c))}async insertFromJson(t,e={},o=[]){let i;try{i=JSON.parse(t);}catch(c){throw new on(c)}if(!Array.isArray(i))throw new tn(typeof i);if(i.length===0)return;for(let c=0;c<i.length;c++){let m=i[c];if(typeof m!="object"||m===null)throw new an(c,typeof m)}let n=i.map(c=>{let m=c,u={};for(let[g,f]of Object.entries(m)){if(o.includes(g))continue;let y=e[g]||g;u[y]=f;}return u});await this.insert(n);}async toJson(t={}){let o=(await this.getItems()).map(i=>{let n={...i};if(Object.keys(t).length>0){for(let[c,m]of Object.entries(t))if(c in n){let u=n[c];delete n[c],n[m]=u;}}return n});return sR__default.default(o)}async getDeduplicatedItems(t){let e=[];for(let o of t){let i=new Wt(o),n=await i.contentHash();if(this.hashes.has(n)){k.debug("Duplicate item found - skipping",{contentHash:n,datasetId:this.id});continue}e.push(i.toApiModel()),this.hashes.add(n),this.idToHash.set(i.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 t=await this.getItemsAsDataclasses();this.clearHashState();for(let e of t){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:t.length});}catch(t){if(t instanceof p&&t.statusCode===404){k.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw t}}};var au=class extends Error{constructor(t){super(t),this.name="DatasetError";}},Lt=class extends au{constructor(t){super(`Dataset with name '${t}' not found`),this.name="DatasetNotFoundError";}};var nn=class{constructor(t){if(!t.datasetItemId)throw new Error("datasetItemId is required");if(!t.traceId)throw new Error("traceId is required");this.datasetItemId=t.datasetItemId,this.traceId=t.traceId;}},sn=class a{constructor(t){this.id=t.id,this.datasetItemId=t.datasetItemId,this.traceId=t.traceId,this.datasetItemData=t.datasetItemData,this.evaluationTaskOutput=t.evaluationTaskOutput,this.feedbackScores=[...t.feedbackScores];}static fromRestExperimentItemCompare(t){var o,i;let e=(i=(o=t.feedbackScores)==null?void 0:o.map(n=>({categoryName:n.categoryName,name:n.name,reason:n.reason,value:n.value,source:n.source})))!=null?i:[];return new a({id:t.id,traceId:t.traceId,datasetItemId:t.datasetItemId,datasetItemData:t.input,evaluationTaskOutput:t.output,feedbackScores:e})}};var sr=class{constructor({id:t,name:e,datasetName:o,prompts:i},n){this.opik=n;this.id=t||oe(),this._name=e,this.datasetName=o,this.prompts=i;}get name(){return this._name}async ensureNameLoaded(){if(this._name!==void 0)return this._name;let t=await this.opik.api.experiments.getExperimentById(this.id);if(this._name=t.name,!this._name)throw new Error("Experiment name is not loaded");return this._name}async insert(t){if(t.length===0)return;let e=t.map(i=>({id:oe(),experimentId:this.id,datasetItemId:i.datasetItemId,traceId:i.traceId})),o=Bt(e,{maxBatchSize:50});try{for(let i of o)await this.opik.api.experiments.createExperimentItems({experimentItems:i});k.debug(`Inserted ${t.length} items into experiment ${this.id}`);}catch(i){throw k.error(`Error inserting items into experiment: ${i instanceof Error?i.message:String(i)}`),i}}async getItems(t){let e=[],{maxResults:i,truncate:n=false}=t||{},c,m=true;try{for(;m&&!(i!==void 0&&e.length>=i);){let u=i?Math.min(i-e.length,2e3):2e3,g=await this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:u,lastRetrievedId:c,truncate:n});try{let f=await Ne(g,j.ExperimentItemCompare,u);if(f.length===0){m=!1;break}for(let y of f){let z=sn.fromRestExperimentItemCompare(y);if(e.push(z),i!==void 0&&e.length>=i){m=!1;break}}c=f[f.length-1].id;}catch(f){k.error("Error parsing experiment item: "+(f instanceof Error?f.message:String(f))),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${i?` (limited by maxResults=${i})`:""}`),e}async getUrl(){let t=await this.opik.getDataset(this.datasetName),e=this.opik.config.apiUrl||_n.apiUrl;return Pf({datasetId:t.id,experimentId:this.id,baseUrl:e})}};var pn={EXPERIMENT_NOT_FOUND:a=>`Experiment with name '${a}' not found`,INVALID_CONFIG_TYPE:a=>`experimentConfig must be a plain object, but ${a} 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
|
|
9
|
+
The prompts parameter is recommended for prompt version tracking.`};var nu={EXPERIMENT_NOT_FOUND:"EXPERIMENT_NOT_FOUND",INVALID_CONFIG_TYPE:"INVALID_CONFIG_TYPE",CONFIG_PROMPTS_CONFLICT:"CONFIG_PROMPTS_CONFLICT"},Vt=class extends de{constructor(t){super({message:pn.EXPERIMENT_NOT_FOUND(t),code:nu.EXPERIMENT_NOT_FOUND});}},Ht=class a extends de{constructor(t,e){super({message:t,code:e});}static invalidConfigType(t){return new a(pn.INVALID_CONFIG_TYPE(t),nu.INVALID_CONFIG_TYPE)}static promptsConflict(){return new a(pn.CONFIG_PROMPTS_CONFLICT(),nu.CONFIG_PROMPTS_CONFLICT)}};function Uf(a,t){if(a!==void 0&&(typeof a!="object"||a===null||Array.isArray(a)))throw Ht.invalidConfigType(typeof a);if(t&&t.length>0&&(a!=null&&a.prompts))throw Ht.promptsConflict();if(!a&&(!t||t.length===0))return [void 0,void 0];let e=a?structuredClone(a):{},o;if(t&&t.length>0){o=[];let i={};for(let n of t)o.push({id:n.versionId}),i[n.name]=n.prompt;e.prompts=i;}return Object.keys(e).length===0?[void 0,void 0]:[e,o]}var ye={MUSTACHE:"mustache",JINJA2:"jinja2"};var K=class a extends Error{constructor(t){super(t),this.name="PromptValidationError",Object.setPrototypeOf(this,a.prototype);}};function uR(a){try{let e=dR__default.default.parse(a).filter(o=>{let i=o[0];return i==="name"||i==="#"||i==="&"||i==="^"}).map(o=>o[1].split(".")[0]);return new Set(e)}catch(t){throw new K(`Invalid Mustache template syntax: ${t instanceof Error?t.message:String(t)}`)}}function Df(a,t,e){if(e!=="mustache")return;let o=uR(a),i=new Set(Object.keys(t)),n=new Set([...o].filter(c=>!i.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: {${[...i].join(", ")}}`),new K(`Template variables validation failed:
|
|
10
10
|
${c.join(`
|
|
11
|
-
`)}`)}}function _e(a,t,e){try{switch(
|
|
11
|
+
`)}`)}}function _e(a,t,e){try{switch(Df(a,t,e),e){case "mustache":return dR__default.default.render(a,t,{},{escape:o=>o});case "jinja2":return fR__default.default.renderString(a,t);default:return a}}catch(o){if(o instanceof K)throw o;let i=o instanceof Error?o.message:String(o);throw new K(`Failed to format prompt template: ${i}`)}}var Jt=class a{constructor(t){this.id=t.versionId,this.name=t.name,this.prompt=t.prompt,this.commit=t.commit,this.type=t.type,this.metadata=t.metadata,this.changeDescription=t.changeDescription,this.createdAt=t.createdAt,this.createdBy=t.createdBy;}format(t){return _e(this.prompt,t,this.type)}getVersionAge(){return this.createdAt?dateFns.formatDistanceToNow(new Date(this.createdAt),{addSuffix:true}):"Unknown"}getVersionInfo(){let t=[`[${this.commit}]`];if(this.createdAt){let e=new Date(this.createdAt);t.push(e.toISOString().split("T")[0]);}return this.createdBy&&t.push(`by ${this.createdBy}`),this.changeDescription&&t.push(`- ${this.changeDescription}`),t.join(" ")}compareTo(t){let e=`Current version [${this.commit}]`,o=`Other version [${t.commit}]`,i=jestDiff.diffStringsUnified(t.prompt,this.prompt,{aAnnotation:o,bAnnotation:e,includeChangeCounts:true,contextLines:3,expand:false});return k.info(`
|
|
12
12
|
Prompt version comparison:
|
|
13
|
-
${i}`),i}static fromApiResponse(t,e){var o;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id'");return new a({name:t,prompt:e.template,commit:e.commit,promptId:e.promptId,versionId:e.id,type:(o=e.type)!=null?o:ye.MUSTACHE,metadata:e.metadata,changeDescription:e.changeDescription,createdAt:e.createdAt?new Date(e.createdAt):void 0,createdBy:e.createdBy})}};var Me=class a{constructor({promptId:t,versionId:e,name:o,prompt:i,commit:n,metadata:c,type:m,changeDescription:u,description:g,tags:f=[]},y){this.opik=y;this.id=t,this.versionId=e,this.prompt=i,this.commit=n,this.type=m!=null?m:ye.MUSTACHE,this.changeDescription=u,this._name=o,this._description=g,this._tags=[...f],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(t){return _e(this.prompt,t,this.type)}static fromApiResponse(t,e,o){var n;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id' (version ID)");let i=(n=e.type)!=null?n:ye.MUSTACHE;if(i!=="mustache"&&i!=="jinja2")throw new K(`Invalid API response: unknown prompt type '${i}'`);return new a({promptId:e.promptId,versionId:e.id,name:t.name,prompt:e.template,commit:e.commit,metadata:e.metadata,type:i,changeDescription:e.changeDescription,description:t.description,tags:t.tags},o)}async updateProperties(t){var e,o,i,n;return await this.opik.api.prompts.updatePrompt(this.id,{name:(e=t.name)!=null?e:this._name,description:t.description,tags:t.tags},this.opik.api.requestOptions),this._name=(o=t.name)!=null?o:this._name,this._description=(i=t.description)!=null?i:this._description,this._tags=(n=t.tags)!=null?n:this._tags,this}async delete(){await this.opik.deletePrompts([this.id]);}async getVersions(){var t;k.debug("Getting versions for prompt",{promptId:this.id,name:this.name});try{let e=[],o=1,i=100;for(;;){let c=(t=(await this.opik.api.prompts.getPromptVersions(this.id,{page:o,size:i},this.opik.api.requestOptions)).content)!=null?t:[];if(e.push(...c),c.length<i)break;o++;}return k.debug("Successfully retrieved prompt versions",{promptId:this.id,name:this.name,totalVersions:e.length}),e.map(n=>Ht.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(t){k.debug("Restoring prompt version",{promptId:this.id,name:this.name,versionId:t.id,versionCommit:t.commit});try{let e=await this.opik.api.prompts.restorePromptVersion(this.id,t.id,this.opik.api.requestOptions);return k.debug("Successfully restored prompt version",{promptId:this.id,name:this.name,restoredVersionId:e.id,restoredCommit:e.commit}),a.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:t.id,versionCommit:t.commit,error:e}),e}}async getVersion(t){try{let e=await this.opik.api.prompts.retrievePromptVersion({name:this.name,commit:t},this.opik.api.requestOptions);return a.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:t,error:e}),e}}};async function If(a,t,e){try{return await a.retrievePromptVersion({name:t},e)}catch(o){if(wR(o))return null;throw o}}function Uf(a,t,e){return t?t.template!==a.prompt||!hR(t.metadata,a.metadata)||t.type!==e:true}function hR(a,t){let e=a!=null?a:{},o=t!=null?t:{};return fR__default.default(e,o)}function wR(a){return typeof a=="object"&&a!==null&&"statusCode"in a&&a.statusCode===404}var se=class{constructor(t){this.input=t;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(t){return this.input[this.cursor+t]}consumeChar(){return this.input[this.cursor++]}advance(t=1){this.cursor+=t;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(t){let e=this.cursor;for(;this.cursor<this.input.length&&t(this.input[this.cursor]);)this.cursor++;return this.input.slice(e,this.cursor)}sliceFrom(t){return this.input.slice(t,this.cursor)}static isFieldChar(t){return /[a-zA-Z0-9_]/.test(t)}static isLetterChar(t){return /[a-zA-Z]/.test(t)}static isDigitChar(t){return /\d/.test(t)}static isWhitespaceChar(t){return /\s/.test(t)}static isQuoteChar(t){return t==='"'||t==="'"}};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"]},Fe={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"},Df={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},pn={SPECIAL_FIELDS:["usage","metadata","feedback_scores"],USAGE_KEYS:["total_tokens","prompt_tokens","completion_tokens"]};function Nf(a){let t=pn.SPECIAL_FIELDS.includes(a),e=Object.keys(Fe).includes(a);if(!t&&!e){let o=Object.keys(Fe).join(", ");throw new Error(`Field ${a} is not supported, only the fields ${o} are supported.`)}}function Mf(a,t){if(!pn.SPECIAL_FIELDS.includes(a)){let e=Object.keys(Fe).join(", ");throw new Error(`Field ${a}.${t} is not supported, only the fields ${e} are supported.`)}if(a==="usage"&&!pn.USAGE_KEYS.includes(t))throw new Error(`When querying usage, ${t} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function iu(a,t){let e=Df[a];if(!(e!=null&&e.includes(t))){let o=(e==null?void 0:e.join(", "))||"none";throw new Error(`Operator ${t} is not supported for field ${a}, only the operators ${o} are supported.`)}}function Ff(a){let t=a.toLowerCase();if(t==="and")return true;throw t==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${a}`)}function cn(a,t,e){if(!a)throw new Error(`Missing closing quote for: ${e}`)}var Jt=class{static parse(t){t.skipWhitespace();let e=this.parseFieldName(t);return Nf(e),t.peekChar()==="."?this.parseFieldWithKey(t,e):{type:"simple",field:e,columnType:Fe[e]}}static parseFieldName(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseFieldWithKey(t,e){t.advance();let o=this.parseKey(t);if(Mf(e,o),e==="usage"){let i=`usage.${o}`;return {type:"simple",field:i,columnType:Fe[i]}}return {type:"nested",field:e,key:o,columnType:Fe[e]}}static parseKey(t){let e=t.peekChar();return se.isQuoteChar(e)?this.parseQuotedKey(t,e):this.parseUnquotedKey(t)}static parseUnquotedKey(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseQuotedKey(t,e){let o=t.getPosition();t.advance();let i="",n=false;for(;!t.isAtEnd();){let m=t.peekChar();if(m===e){if(t.peekCharAt(1)===e){i+=e,t.advance(2);continue}n=true,t.advance();break}i+=m,t.advance();}let c=t.getFullInput().slice(o);return cn(n,o,c),i}};var Xt=class{static parse(t,e){t.skipWhitespace();let o=t.peekChar(),i=this.tryParseSymbolicOperator(t,o);if(i)return iu(e,i),{operator:i};let n=this.parseWordOperator(t);return iu(e,n),{operator:n}}static tryParseSymbolicOperator(t,e){if(e==="=")return t.advance(),"=";if(e==="<"||e===">"){let o=e;return t.advance(),t.peekChar()==="="?(t.advance(),o+"="):o}return e==="!"&&t.peekCharAt(1)==="="?(t.advance(2),"!="):null}static parseWordOperator(t){return t.consumeWhile(e=>!se.isWhitespaceChar(e))}};var Kt=class{static parse(t){t.skipWhitespace();let e=t.getPosition(),o=t.peekChar();if(o==='"')return this.parseQuotedString(t,e);if(se.isDigitChar(o)||o==="-")return this.parseNumber(t);let i=t.getRemainingInput();throw new Error(`Invalid value ${i.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(t,e){t.advance();let o=t.getPosition(),i=false;for(;!t.isAtEnd();){if(t.peekChar()==='"'){i=true;break}t.advance();}cn(i,e,`value starting at position ${e}`);let n=t.sliceFrom(o);return t.advance(),{value:n}}static parseNumber(t){let e="";return t.peekChar()==="-"&&(e+=t.consumeChar()),e+=this.parseDigits(t),t.peekChar()==="."&&(e+=t.consumeChar(),e+=this.parseDigits(t)),{value:e}}static parseDigits(t){return t.consumeWhile(e=>se.isDigitChar(e))}};var Oe=class{constructor(t){let e=t||"";this.filterExpressions=e?this.parse(e):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}getFilterExpressions(){return this.filterExpressions}parse(t){let e=new se(t),o=[];for(;!e.isAtEnd();){let i=this.parseExpression(e);if(o.push(i),e.skipWhitespace(),!e.isAtEnd()&&!this.parseConnector(e))break}return o}parseExpression(t){let e=Jt.parse(t),o=Xt.parse(t,this.getFieldName(e)),i=Kt.parse(t);return this.buildExpression(e,o,i)}getFieldName(t){return t.field}buildExpression(t,e,o){let i={field:t.field,operator:e.operator,value:o.value,type:t.columnType};return t.type==="nested"&&(i.key=t.key),i}parseConnector(t){let e=t.getPosition(),o=t.consumeWhile(i=>se.isLetterChar(i));try{return Ff(o)}catch(i){if(i instanceof Error&&i.message.includes("trailing characters")){let n=t.getFullInput().slice(e);throw new Error(`Invalid filter string, trailing characters ${n}`)}throw i}}};async function Of(a,t,e,o,i){let n=await a.traces.searchTraces({projectName:t,filters:e!=null?e:void 0,limit:o,truncate:i});return await Ne(n,j.TracePublic,o)}async function Wf(a,t,e,o){let i=Date.now(),n=[];for(;;){if(n=await a(),n.length>=t||Date.now()-i>=e)return n;await new Promise(m=>setTimeout(m,o));}}function Bf(a){if(!a)return null;let e=new Oe(a).getFilterExpressions();return e?e.map(o=>{let i={field:o.field,operator:o.operator,value:o.value};return o.key&&(i.key=o.key),i}):null}var au=[],pr=class{constructor(t){this.displayTraceLog=t=>{if(t===this.lastProjectNameLogged||!this.config.apiUrl)return;let e=Af({apiUrl:this.config.apiUrl,projectName:t,workspaceName:this.config.workspaceName});k.info(`Started logging traces to the "${t}" project at ${Zt(e)}`),this.lastProjectNameLogged=t;};this.trace=t=>{var i;k.debug("Creating new trace with data:",t);let e=(i=t.projectName)!=null?i:this.config.projectName,o=new Va({id:oe(),startTime:new Date,...t,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 t=>{k.debug(`Getting dataset with name "${t}"`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.getDatasetByIdentifier({datasetName:t});return new vr(e,this)}catch(e){throw e instanceof p&&e.statusCode===404?new Bt(t):e}};this.createDataset=async(t,e)=>{k.debug(`Creating dataset with name "${t}"`);let o=new vr({name:t,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(i){throw k.error(`Failed to create dataset "${t}"`,{error:i}),new Error(`Error creating dataset "${t}": ${i}`)}};this.getOrCreateDataset=async(t,e)=>{k.debug(`Attempting to retrieve or create dataset with name: "${t}"`);try{return await this.getDataset(t)}catch(o){if(o instanceof Bt)return k.info(`Dataset "${t}" not found. Proceeding to create a new one.`),this.createDataset(t,e);throw k.error(`Error retrieving dataset "${t}":`,o),o}};this.getDatasets=async(t=100)=>{k.debug(`Getting all datasets (limit: ${t})`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.findDatasets({size:t}),o=[];for(let i of e.content||[])o.push(new vr(i,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 t=>{k.debug(`Deleting dataset with name "${t}"`);try{let e=await this.getDataset(t);if(!e.id)throw new Error(`Cannot delete dataset "${t}": ID not available`);this.datasetBatchQueue.delete(e.id);}catch(e){throw k.error(`Failed to delete dataset "${t}"`,{error:e}),new Error(`Failed to delete dataset "${t}": ${e}`)}};this.createExperiment=async({datasetName:t,name:e,experimentConfig:o,prompts:i,type:n=Bn.Regular,optimizationId:c})=>{if(k.debug(`Creating experiment for dataset "${t}"`),!t)throw new Error("Dataset name is required to create an experiment");let[m,u]=Cf(o,i),g=oe(),f=new sr({id:g,name:e,datasetName:t,prompts:i},this);try{return this.api.experiments.createExperiment({id:g,datasetName:t,name:e,metadata:m,promptVersions:u,type:n,optimizationId:c}),k.debug("Experiment added to the queue with id:",g),f}catch(y){throw k.error(`Failed to create experiment for dataset "${t}"`,{error:y}),new Error(`Error creating experiment: ${y}`)}};this.updateExperiment=async(t,e)=>{if(!t)throw new Error("id is required to update an experiment");let{name:o,experimentConfig:i}=e;if(!o&&!i)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");k.debug(`Updating experiment with ID "${t}"`);let n={};o!==void 0&&(n.name=o),i!==void 0&&(n.metadata=i);try{await this.api.experiments.updateExperiment(t,n);}catch(c){throw k.error(`Failed to update experiment with ID "${t}"`,{error:c}),c}};this.getExperimentById=async t=>{k.debug(`Getting experiment with ID "${t}"`);try{let e=await this.api.experiments.getExperimentById(t);return new sr({id:e.id,name:e.name,datasetName:e.datasetName},this)}catch(e){throw e instanceof p&&e.statusCode===404?new Lt(`No experiment found with ID '${t}'`):(k.error(`Failed to get experiment with ID "${t}"`,{error:e}),e)}};this.getExperimentsByName=async t=>{k.debug(`Getting experiments with name "${t}"`);try{let e=await this.api.experiments.streamExperiments({name:t});return (await Ne(e,j.ExperimentPublic)).map(i=>new sr({id:i.id,name:i.name,datasetName:i.datasetName},this))}catch(e){throw k.error(`Failed to get experiments with name "${t}"`,{error:e}),e}};this.getExperiment=async t=>{k.debug(`Getting experiment with name "${t}"`);let e=await this.getExperimentsByName(t);if(e.length===0)throw new Lt(t);return e[0]};this.getDatasetExperiments=async(t,e=100)=>{var c;k.debug(`Getting experiments for dataset "${t}"`);let o=await this.getDataset(t),i=Math.min(100,e),n=[];try{let m=1;for(;n.length<e;){let u=await this.api.experiments.findExperiments({page:m,size:i,datasetId:o.id}),g=(c=u==null?void 0:u.content)!=null?c:[];if(g.length===0)break;let f=e-n.length,y=Math.min(g.length,f);for(let z=0;z<y;z++){let v=g[z];n.push(new sr({id:v.id,name:v.name,datasetName:v.datasetName},this));}if(y<g.length)break;m+=1;}return n}catch(m){throw k.error(`Failed to get experiments for dataset "${t}"`,{error:m}),m}};this.deleteExperiment=async t=>{k.debug(`Deleting experiment with ID "${t}"`);try{await this.api.experiments.deleteExperimentsById({ids:[t]});}catch(e){throw k.error(`Failed to delete experiment with ID "${t}"`,{error:e}),e}};this.createPrompt=async t=>{var e;k.debug("Creating prompt",{name:t.name});try{let o=await If(this.api.prompts,t.name,this.api.requestOptions),i=(e=t.type)!=null?e:ye.MUSTACHE,n=Uf(t,o,i),c;if(n?(k.debug("Creating new prompt version",{name:t.name}),c=await this.api.prompts.createPromptVersion({name:t.name,version:{template:t.prompt,metadata:t.metadata,type:i}},this.api.requestOptions)):(k.debug("Returning existing prompt version",{name:t.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=Me.fromApiResponse(m,c,this);return k.debug("Prompt created",{name:t.name}),t.description||t.tags?await u.updateProperties({description:t.description,tags:t.tags}):u}catch(o){throw k.error("Failed to create prompt",{name:t.name,error:o}),o}};this.getPrompt=async t=>{var e;k.debug("Getting prompt",t);try{let i=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:t.name}]),size:1},this.api.requestOptions)).content)==null?void 0:e[0];if(!i)return k.debug("Prompt not found",{name:t.name}),null;let n=await this.api.prompts.retrievePromptVersion(t,this.api.requestOptions);return Me.fromApiResponse(i,n,this)}catch(o){if(o instanceof p&&o.statusCode===404)return null;throw k.error("Failed to get prompt",{name:t.name,error:o}),o}};this.searchPrompts=async t=>{var e;k.debug("Searching prompts",{filterString:t});try{let o;if(t){let u=new Oe(t).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 Me.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 t=>{k.debug("Deleting prompts in batch",{count:t.length});try{await this.api.prompts.deletePromptsBatch({ids:t},this.api.requestOptions),k.info("Successfully deleted prompts",{count:t.length});}catch(e){throw k.error("Failed to delete prompts",{count:t.length,error:e}),e}};this.searchTraces=async t=>{let{projectName:e,filterString:o,maxResults:i=1e3,truncate:n=true,waitForAtLeast:c,waitForTimeout:m=60}=t!=null?t:{};k.debug("Searching traces",{projectName:e,filterString:o,maxResults:i,truncate:n,waitForAtLeast:c,waitForTimeout:m});let u=Bf(o),g=e!=null?e:this.config.projectName,f=()=>Of(this.api,g,u,i,n);if(c===void 0)return await f();let y=await Wf(f,c,m*1e3,5e3);if(y.length<c)throw new qa(`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(t){k.error("Error during flush operation:",{error:t instanceof Error?t.message:t});}};k.debug("Initializing OpikClient with config:",t),this.config=Au(t);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};t!=null&&t.headers&&(k.debug("Initializing OpikClient with additional headers:",t==null?void 0:t.headers),e.requestOptions={headers:t==null?void 0:t.headers}),this.api=new Qa(e);let o=this.config.holdUntilFlush?24*60*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new Xa(this.api,o),this.traceBatchQueue=new Ga(this.api,o),this.spanFeedbackScoresBatchQueue=new Ka(this.api,o),this.traceFeedbackScoresBatchQueue=new $a(this.api,o),this.datasetBatchQueue=new Ya(this.api,o),au.push(this);}};var xR="track.decorator",Gt=new async_hooks.AsyncLocalStorage,RR=()=>{let{span:a,trace:t}=Gt.getStore()||{};if(!(!a||!t))return {span:a,trace:t}};function yR(a){return !!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"}function kR({name:a,parentSpan:t,projectName:e,trace:o,type:i="llm"}){k.debug("Creating new span:",{name:a,parentSpan:t==null?void 0:t.data.id,projectName:e,type:i});let n=o;n||(n=su().trace({name:a,projectName:e}));let c=n.span({name:a,parentSpanId:t==null?void 0:t.data.id,projectName:e,type:i});return k.debug("Span created with ID:",c.data.id),{span:c,trace:n}}function zR({args:a,span:t,trace:e}){if(k.debug("Starting span execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id}),a.length===0)return;let o={arguments:a};k.debug("Recording span input"),t.update({input:o}),e&&(k.debug("Recording trace input"),e.update({input:o}));}function Lf({result:a,span:t,trace:e,enrichSpan:o}){k.debug("Recording successful execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id});let i=typeof a=="object"?a:{result:a},n=new Date,c={endTime:n,output:i};if(o){let m=o(a);Object.assign(c,m);}t.update(c),e&&e.update({endTime:n,output:i});}function Vf({span:a,error:t,trace:e}){var o,i;k.error("Recording execution error:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id,error:t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t}),t instanceof Error&&a.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(o=t.stack)!=null?o:""}}),a.end(),e&&(e.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(i=t.stack)!=null?i:""}}),e.end());}function ln({name:a,projectName:t,type:e,enrichSpan:o}={},i){return function(...c){let m=Gt.getStore(),{span:u,trace:g}=kR({name:a!=null?a:i.name||xR,parentSpan:m==null?void 0:m.span,projectName:t,trace:m==null?void 0:m.trace,type:e}),f=!m,y=this;return Gt.run({span:u,trace:g},()=>{let z=f?g:void 0;try{zR({args:c,span:u,trace:z});let v=i.apply(y,c);return yR(v)?v.then(S=>(Lf({span:u,result:S,trace:z,enrichSpan:o}),S),S=>{throw Vf({span:u,error:S,trace:z}),S}):(Lf({span:u,result:v,trace:z,enrichSpan:o}),v)}catch(v){throw Vf({span:u,error:v,trace:z}),v}})}}function je(a,t){if(typeof a=="function")return ln({},a);let e=a;return t?ln(e,t):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 ln(e,c)}let[,,i]=o;if(!i||typeof i.value!="function")throw new Error("track decorator can only be applied to methods");let n=i.value;return i.value=ln(e,n),i}}var nu=null;function su(){return nu===null&&(nu=new pr),nu}var vR=async()=>{k.debug("Starting flushAll operation");try{await Promise.all([su().flush(),...au.map(a=>a.flush())]),k.debug("flushAll operation completed successfully");}catch(a){throw k.error("Error during flushAll operation:",{error:a instanceof Error?a.message:a,stack:a instanceof Error?a.stack:void 0}),a}};function Hf(a,t){if(!t||typeof t!="object")throw new Error("Arguments must be an object");let e=a.validationSchema,i=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(t);if(!i.success){let n=i.error.issues.map(m=>m.path[0]).filter(Boolean),c=[...new Set(n)];throw new Error(SR(a,t,c))}}function SR(a,t,e){let o=Object.keys(t),i=e.filter(n=>!(n in t));return `Metric '${a.name}' is skipped, missing required arguments: ${i.join(", ")}. Available arguments: ${o.join(", ")}.`}var dn=class{static calculateAverageScores(t){if(!t||t.length===0)return new Map;let e=new Map;for(let i of t)if(!(!i||!i.scoreResults||i.scoreResults.length===0))for(let n of i.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((i,n)=>{o.set(n,i.count>0?i.sum/i.count:0);}),o}static formatScore(t){return t.toFixed(4)}static formatTime(t){let e=Math.floor(t/3600),o=Math.floor(t%3600/60),i=Math.floor(t%60);return `${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}static async generateResultTable(t,e,o,i){if(t.length===0){k.info(`
|
|
13
|
+
${i}`),i}static fromApiResponse(t,e){var o;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id'");return new a({name:t,prompt:e.template,commit:e.commit,promptId:e.promptId,versionId:e.id,type:(o=e.type)!=null?o:ye.MUSTACHE,metadata:e.metadata,changeDescription:e.changeDescription,createdAt:e.createdAt?new Date(e.createdAt):void 0,createdBy:e.createdBy})}};var Me=class a{constructor({promptId:t,versionId:e,name:o,prompt:i,commit:n,metadata:c,type:m,changeDescription:u,description:g,tags:f=[]},y){this.opik=y;this.id=t,this.versionId=e,this.prompt=i,this.commit=n,this.type=m!=null?m:ye.MUSTACHE,this.changeDescription=u,this._name=o,this._description=g,this._tags=[...f],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(t){return _e(this.prompt,t,this.type)}static fromApiResponse(t,e,o){var n;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id' (version ID)");let i=(n=e.type)!=null?n:ye.MUSTACHE;if(i!=="mustache"&&i!=="jinja2")throw new K(`Invalid API response: unknown prompt type '${i}'`);return new a({promptId:e.promptId,versionId:e.id,name:t.name,prompt:e.template,commit:e.commit,metadata:e.metadata,type:i,changeDescription:e.changeDescription,description:t.description,tags:t.tags},o)}async updateProperties(t){var e,o,i,n;return await this.opik.api.prompts.updatePrompt(this.id,{name:(e=t.name)!=null?e:this._name,description:t.description,tags:t.tags},this.opik.api.requestOptions),this._name=(o=t.name)!=null?o:this._name,this._description=(i=t.description)!=null?i:this._description,this._tags=(n=t.tags)!=null?n:this._tags,this}async delete(){await this.opik.deletePrompts([this.id]);}async getVersions(){var t;k.debug("Getting versions for prompt",{promptId:this.id,name:this.name});try{let e=[],o=1,i=100;for(;;){let c=(t=(await this.opik.api.prompts.getPromptVersions(this.id,{page:o,size:i},this.opik.api.requestOptions)).content)!=null?t:[];if(e.push(...c),c.length<i)break;o++;}return k.debug("Successfully retrieved prompt versions",{promptId:this.id,name:this.name,totalVersions:e.length}),e.map(n=>Jt.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(t){k.debug("Restoring prompt version",{promptId:this.id,name:this.name,versionId:t.id,versionCommit:t.commit});try{let e=await this.opik.api.prompts.restorePromptVersion(this.id,t.id,this.opik.api.requestOptions);return k.debug("Successfully restored prompt version",{promptId:this.id,name:this.name,restoredVersionId:e.id,restoredCommit:e.commit}),a.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:t.id,versionCommit:t.commit,error:e}),e}}async getVersion(t){try{let e=await this.opik.api.prompts.retrievePromptVersion({name:this.name,commit:t},this.opik.api.requestOptions);return a.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:t,error:e}),e}}};async function Nf(a,t,e){try{return await a.retrievePromptVersion({name:t},e)}catch(o){if(RR(o))return null;throw o}}function Mf(a,t,e){return t?t.template!==a.prompt||!xR(t.metadata,a.metadata)||t.type!==e:true}function xR(a,t){let e=a!=null?a:{},o=t!=null?t:{};return bR__default.default(e,o)}function RR(a){return typeof a=="object"&&a!==null&&"statusCode"in a&&a.statusCode===404}var se=class{constructor(t){this.input=t;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(t){return this.input[this.cursor+t]}consumeChar(){return this.input[this.cursor++]}advance(t=1){this.cursor+=t;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(t){let e=this.cursor;for(;this.cursor<this.input.length&&t(this.input[this.cursor]);)this.cursor++;return this.input.slice(e,this.cursor)}sliceFrom(t){return this.input.slice(t,this.cursor)}static isFieldChar(t){return /[a-zA-Z0-9_]/.test(t)}static isLetterChar(t){return /[a-zA-Z]/.test(t)}static isDigitChar(t){return /\d/.test(t)}static isWhitespaceChar(t){return /\s/.test(t)}static isQuoteChar(t){return t==='"'||t==="'"}};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"]},Fe={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"},Ff={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},cn={SPECIAL_FIELDS:["usage","metadata","feedback_scores"],USAGE_KEYS:["total_tokens","prompt_tokens","completion_tokens"]};function Of(a){let t=cn.SPECIAL_FIELDS.includes(a),e=Object.keys(Fe).includes(a);if(!t&&!e){let o=Object.keys(Fe).join(", ");throw new Error(`Field ${a} is not supported, only the fields ${o} are supported.`)}}function Wf(a,t){if(!cn.SPECIAL_FIELDS.includes(a)){let e=Object.keys(Fe).join(", ");throw new Error(`Field ${a}.${t} is not supported, only the fields ${e} are supported.`)}if(a==="usage"&&!cn.USAGE_KEYS.includes(t))throw new Error(`When querying usage, ${t} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function su(a,t){let e=Ff[a];if(!(e!=null&&e.includes(t))){let o=(e==null?void 0:e.join(", "))||"none";throw new Error(`Operator ${t} is not supported for field ${a}, only the operators ${o} are supported.`)}}function Bf(a){let t=a.toLowerCase();if(t==="and")return true;throw t==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${a}`)}function ln(a,t,e){if(!a)throw new Error(`Missing closing quote for: ${e}`)}var Xt=class{static parse(t){t.skipWhitespace();let e=this.parseFieldName(t);return Of(e),t.peekChar()==="."?this.parseFieldWithKey(t,e):{type:"simple",field:e,columnType:Fe[e]}}static parseFieldName(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseFieldWithKey(t,e){t.advance();let o=this.parseKey(t);if(Wf(e,o),e==="usage"){let i=`usage.${o}`;return {type:"simple",field:i,columnType:Fe[i]}}return {type:"nested",field:e,key:o,columnType:Fe[e]}}static parseKey(t){let e=t.peekChar();return se.isQuoteChar(e)?this.parseQuotedKey(t,e):this.parseUnquotedKey(t)}static parseUnquotedKey(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseQuotedKey(t,e){let o=t.getPosition();t.advance();let i="",n=false;for(;!t.isAtEnd();){let m=t.peekChar();if(m===e){if(t.peekCharAt(1)===e){i+=e,t.advance(2);continue}n=true,t.advance();break}i+=m,t.advance();}let c=t.getFullInput().slice(o);return ln(n,o,c),i}};var Kt=class{static parse(t,e){t.skipWhitespace();let o=t.peekChar(),i=this.tryParseSymbolicOperator(t,o);if(i)return su(e,i),{operator:i};let n=this.parseWordOperator(t);return su(e,n),{operator:n}}static tryParseSymbolicOperator(t,e){if(e==="=")return t.advance(),"=";if(e==="<"||e===">"){let o=e;return t.advance(),t.peekChar()==="="?(t.advance(),o+"="):o}return e==="!"&&t.peekCharAt(1)==="="?(t.advance(2),"!="):null}static parseWordOperator(t){return t.consumeWhile(e=>!se.isWhitespaceChar(e))}};var Gt=class{static parse(t){t.skipWhitespace();let e=t.getPosition(),o=t.peekChar();if(o==='"')return this.parseQuotedString(t,e);if(se.isDigitChar(o)||o==="-")return this.parseNumber(t);let i=t.getRemainingInput();throw new Error(`Invalid value ${i.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(t,e){t.advance();let o=t.getPosition(),i=false;for(;!t.isAtEnd();){if(t.peekChar()==='"'){i=true;break}t.advance();}ln(i,e,`value starting at position ${e}`);let n=t.sliceFrom(o);return t.advance(),{value:n}}static parseNumber(t){let e="";return t.peekChar()==="-"&&(e+=t.consumeChar()),e+=this.parseDigits(t),t.peekChar()==="."&&(e+=t.consumeChar(),e+=this.parseDigits(t)),{value:e}}static parseDigits(t){return t.consumeWhile(e=>se.isDigitChar(e))}};var Oe=class{constructor(t){let e=t||"";this.filterExpressions=e?this.parse(e):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}getFilterExpressions(){return this.filterExpressions}parse(t){let e=new se(t),o=[];for(;!e.isAtEnd();){let i=this.parseExpression(e);if(o.push(i),e.skipWhitespace(),!e.isAtEnd()&&!this.parseConnector(e))break}return o}parseExpression(t){let e=Xt.parse(t),o=Kt.parse(t,this.getFieldName(e)),i=Gt.parse(t);return this.buildExpression(e,o,i)}getFieldName(t){return t.field}buildExpression(t,e,o){let i={field:t.field,operator:e.operator,value:o.value,type:t.columnType};return t.type==="nested"&&(i.key=t.key),i}parseConnector(t){let e=t.getPosition(),o=t.consumeWhile(i=>se.isLetterChar(i));try{return Bf(o)}catch(i){if(i instanceof Error&&i.message.includes("trailing characters")){let n=t.getFullInput().slice(e);throw new Error(`Invalid filter string, trailing characters ${n}`)}throw i}}};async function Lf(a,t,e,o,i){let n=await a.traces.searchTraces({projectName:t,filters:e!=null?e:void 0,limit:o,truncate:i});return await Ne(n,j.TracePublic,o)}async function Vf(a,t,e,o){let i=Date.now(),n=[];for(;;){if(n=await a(),n.length>=t||Date.now()-i>=e)return n;await new Promise(m=>setTimeout(m,o));}}function Hf(a){if(!a)return null;let e=new Oe(a).getFilterExpressions();return e?e.map(o=>{let i={field:o.field,operator:o.operator,value:o.value};return o.key&&(i.key=o.key),i}):null}var pu=[],pr=class{constructor(t){this.displayTraceLog=t=>{if(t===this.lastProjectNameLogged||!this.config.apiUrl)return;let e=Cf({apiUrl:this.config.apiUrl,projectName:t,workspaceName:this.config.workspaceName});k.info(`Started logging traces to the "${t}" project at ${qt(e)}`),this.lastProjectNameLogged=t;};this.trace=t=>{var i;k.debug("Creating new trace with data:",t);let e=(i=t.projectName)!=null?i:this.config.projectName,o=new Ha({id:oe(),startTime:new Date,...t,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 t=>{k.debug(`Getting dataset with name "${t}"`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.getDatasetByIdentifier({datasetName:t});return new Sr(e,this)}catch(e){throw e instanceof p&&e.statusCode===404?new Lt(t):e}};this.createDataset=async(t,e)=>{k.debug(`Creating dataset with name "${t}"`);let o=new Sr({name:t,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(i){throw k.error(`Failed to create dataset "${t}"`,{error:i}),new Error(`Error creating dataset "${t}": ${i}`)}};this.getOrCreateDataset=async(t,e)=>{k.debug(`Attempting to retrieve or create dataset with name: "${t}"`);try{return await this.getDataset(t)}catch(o){if(o instanceof Lt)return k.info(`Dataset "${t}" not found. Proceeding to create a new one.`),this.createDataset(t,e);throw k.error(`Error retrieving dataset "${t}":`,o),o}};this.getDatasets=async(t=100)=>{k.debug(`Getting all datasets (limit: ${t})`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.findDatasets({size:t}),o=[];for(let i of e.content||[])o.push(new Sr(i,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 t=>{k.debug(`Deleting dataset with name "${t}"`);try{let e=await this.getDataset(t);if(!e.id)throw new Error(`Cannot delete dataset "${t}": ID not available`);this.datasetBatchQueue.delete(e.id);}catch(e){throw k.error(`Failed to delete dataset "${t}"`,{error:e}),new Error(`Failed to delete dataset "${t}": ${e}`)}};this.createExperiment=async({datasetName:t,name:e,experimentConfig:o,prompts:i,type:n=Ln.Regular,optimizationId:c})=>{if(k.debug(`Creating experiment for dataset "${t}"`),!t)throw new Error("Dataset name is required to create an experiment");let[m,u]=Uf(o,i),g=oe(),f=new sr({id:g,name:e,datasetName:t,prompts:i},this);try{return this.api.experiments.createExperiment({id:g,datasetName:t,name:e,metadata:m,promptVersions:u,type:n,optimizationId:c}),k.debug("Experiment added to the queue with id:",g),f}catch(y){throw k.error(`Failed to create experiment for dataset "${t}"`,{error:y}),new Error(`Error creating experiment: ${y}`)}};this.updateExperiment=async(t,e)=>{if(!t)throw new Error("id is required to update an experiment");let{name:o,experimentConfig:i}=e;if(!o&&!i)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");k.debug(`Updating experiment with ID "${t}"`);let n={};o!==void 0&&(n.name=o),i!==void 0&&(n.metadata=i);try{await this.api.experiments.updateExperiment(t,n);}catch(c){throw k.error(`Failed to update experiment with ID "${t}"`,{error:c}),c}};this.getExperimentById=async t=>{k.debug(`Getting experiment with ID "${t}"`);try{let e=await this.api.experiments.getExperimentById(t);return new sr({id:e.id,name:e.name,datasetName:e.datasetName},this)}catch(e){throw e instanceof p&&e.statusCode===404?new Vt(`No experiment found with ID '${t}'`):(k.error(`Failed to get experiment with ID "${t}"`,{error:e}),e)}};this.getExperimentsByName=async t=>{k.debug(`Getting experiments with name "${t}"`);try{let e=await this.api.experiments.streamExperiments({name:t});return (await Ne(e,j.ExperimentPublic)).map(i=>new sr({id:i.id,name:i.name,datasetName:i.datasetName},this))}catch(e){throw k.error(`Failed to get experiments with name "${t}"`,{error:e}),e}};this.getExperiment=async t=>{k.debug(`Getting experiment with name "${t}"`);let e=await this.getExperimentsByName(t);if(e.length===0)throw new Vt(t);return e[0]};this.getDatasetExperiments=async(t,e=100)=>{var c;k.debug(`Getting experiments for dataset "${t}"`);let o=await this.getDataset(t),i=Math.min(100,e),n=[];try{let m=1;for(;n.length<e;){let u=await this.api.experiments.findExperiments({page:m,size:i,datasetId:o.id}),g=(c=u==null?void 0:u.content)!=null?c:[];if(g.length===0)break;let f=e-n.length,y=Math.min(g.length,f);for(let z=0;z<y;z++){let v=g[z];n.push(new sr({id:v.id,name:v.name,datasetName:v.datasetName},this));}if(y<g.length)break;m+=1;}return n}catch(m){throw k.error(`Failed to get experiments for dataset "${t}"`,{error:m}),m}};this.deleteExperiment=async t=>{k.debug(`Deleting experiment with ID "${t}"`);try{await this.api.experiments.deleteExperimentsById({ids:[t]});}catch(e){throw k.error(`Failed to delete experiment with ID "${t}"`,{error:e}),e}};this.createPrompt=async t=>{var e;k.debug("Creating prompt",{name:t.name});try{let o=await Nf(this.api.prompts,t.name,this.api.requestOptions),i=(e=t.type)!=null?e:ye.MUSTACHE,n=Mf(t,o,i),c;if(n?(k.debug("Creating new prompt version",{name:t.name}),c=await this.api.prompts.createPromptVersion({name:t.name,version:{template:t.prompt,metadata:t.metadata,type:i}},this.api.requestOptions)):(k.debug("Returning existing prompt version",{name:t.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=Me.fromApiResponse(m,c,this);return k.debug("Prompt created",{name:t.name}),t.description||t.tags?await u.updateProperties({description:t.description,tags:t.tags}):u}catch(o){throw k.error("Failed to create prompt",{name:t.name,error:o}),o}};this.getPrompt=async t=>{var e;k.debug("Getting prompt",t);try{let i=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:t.name}]),size:1},this.api.requestOptions)).content)==null?void 0:e[0];if(!i)return k.debug("Prompt not found",{name:t.name}),null;let n=await this.api.prompts.retrievePromptVersion(t,this.api.requestOptions);return Me.fromApiResponse(i,n,this)}catch(o){if(o instanceof p&&o.statusCode===404)return null;throw k.error("Failed to get prompt",{name:t.name,error:o}),o}};this.searchPrompts=async t=>{var e;k.debug("Searching prompts",{filterString:t});try{let o;if(t){let u=new Oe(t).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 Me.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 t=>{k.debug("Deleting prompts in batch",{count:t.length});try{await this.api.prompts.deletePromptsBatch({ids:t},this.api.requestOptions),k.info("Successfully deleted prompts",{count:t.length});}catch(e){throw k.error("Failed to delete prompts",{count:t.length,error:e}),e}};this.searchTraces=async t=>{let{projectName:e,filterString:o,maxResults:i=1e3,truncate:n=true,waitForAtLeast:c,waitForTimeout:m=60}=t!=null?t:{};k.debug("Searching traces",{projectName:e,filterString:o,maxResults:i,truncate:n,waitForAtLeast:c,waitForTimeout:m});let u=Hf(o),g=e!=null?e:this.config.projectName,f=()=>Lf(this.api,g,u,i,n);if(c===void 0)return await f();let y=await Vf(f,c,m*1e3,5e3);if(y.length<c)throw new en(`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(t){k.error("Error during flush operation:",{error:t instanceof Error?t.message:t});}};k.debug("Initializing OpikClient with config:",t),this.config=Cu(t);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};t!=null&&t.headers&&(k.debug("Initializing OpikClient with additional headers:",t==null?void 0:t.headers),e.requestOptions={headers:t==null?void 0:t.headers}),this.api=new Ya(e);let o=this.config.holdUntilFlush?24*60*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new Ka(this.api,o),this.traceBatchQueue=new $a(this.api,o),this.spanFeedbackScoresBatchQueue=new Ga(this.api,o),this.traceFeedbackScoresBatchQueue=new Qa(this.api,o),this.datasetBatchQueue=new Za(this.api,o),pu.push(this);}};var kR="track.decorator",$t=new async_hooks.AsyncLocalStorage,zR=()=>{let{span:a,trace:t}=$t.getStore()||{};if(!(!a||!t))return {span:a,trace:t}};function vR(a){return !!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"}function SR({name:a,parentSpan:t,projectName:e,trace:o,type:i="llm"}){k.debug("Creating new span:",{name:a,parentSpan:t==null?void 0:t.data.id,projectName:e,type:i});let n=o;n||(n=lu().trace({name:a,projectName:e}));let c=n.span({name:a,parentSpanId:t==null?void 0:t.data.id,projectName:e,type:i});return k.debug("Span created with ID:",c.data.id),{span:c,trace:n}}function _R({args:a,span:t,trace:e}){if(k.debug("Starting span execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id}),a.length===0)return;let o={arguments:a};k.debug("Recording span input"),t.update({input:o}),e&&(k.debug("Recording trace input"),e.update({input:o}));}function Jf({result:a,span:t,trace:e,enrichSpan:o}){k.debug("Recording successful execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id});let i=typeof a=="object"?a:{result:a},n=new Date,c={endTime:n,output:i};if(o){let m=o(a);Object.assign(c,m);}t.update(c),e&&e.update({endTime:n,output:i});}function Xf({span:a,error:t,trace:e}){var o,i;k.error("Recording execution error:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id,error:t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t}),t instanceof Error&&a.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(o=t.stack)!=null?o:""}}),a.end(),e&&(e.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(i=t.stack)!=null?i:""}}),e.end());}function mn({name:a,projectName:t,type:e,enrichSpan:o}={},i){return function(...c){let m=$t.getStore(),{span:u,trace:g}=SR({name:a!=null?a:i.name||kR,parentSpan:m==null?void 0:m.span,projectName:t,trace:m==null?void 0:m.trace,type:e}),f=!m,y=this;return $t.run({span:u,trace:g},()=>{let z=f?g:void 0;try{_R({args:c,span:u,trace:z});let v=i.apply(y,c);return vR(v)?v.then(S=>(Jf({span:u,result:S,trace:z,enrichSpan:o}),S),S=>{throw Xf({span:u,error:S,trace:z}),S}):(Jf({span:u,result:v,trace:z,enrichSpan:o}),v)}catch(v){throw Xf({span:u,error:v,trace:z}),v}})}}function je(a,t){if(typeof a=="function")return mn({},a);let e=a;return t?mn(e,t):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 mn(e,c)}let[,,i]=o;if(!i||typeof i.value!="function")throw new Error("track decorator can only be applied to methods");let n=i.value;return i.value=mn(e,n),i}}var cu=null;function lu(){return cu===null&&(cu=new pr),cu}var AR=async()=>{k.debug("Starting flushAll operation");try{await Promise.all([lu().flush(),...pu.map(a=>a.flush())]),k.debug("flushAll operation completed successfully");}catch(a){throw k.error("Error during flushAll operation:",{error:a instanceof Error?a.message:a,stack:a instanceof Error?a.stack:void 0}),a}};function Kf(a,t){if(!t||typeof t!="object")throw new Error("Arguments must be an object");let e=a.validationSchema,i=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(t);if(!i.success){let n=i.error.issues.map(m=>m.path[0]).filter(Boolean),c=[...new Set(n)];throw new Error(TR(a,t,c))}}function TR(a,t,e){let o=Object.keys(t),i=e.filter(n=>!(n in t));return `Metric '${a.name}' is skipped, missing required arguments: ${i.join(", ")}. Available arguments: ${o.join(", ")}.`}var un=class{static calculateAverageScores(t){if(!t||t.length===0)return new Map;let e=new Map;for(let i of t)if(!(!i||!i.scoreResults||i.scoreResults.length===0))for(let n of i.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((i,n)=>{o.set(n,i.count>0?i.sum/i.count:0);}),o}static formatScore(t){return t.toFixed(4)}static formatTime(t){let e=Math.floor(t/3600),o=Math.floor(t%3600/60),i=Math.floor(t%60);return `${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}static async generateResultTable(t,e,o,i){if(t.length===0){k.info(`
|
|
14
14
|
No test results available to display.`);return}if(o.size===0){k.info(`
|
|
15
|
-
No metrics available to display.`);return}let n=[...o.keys()].sort(),c=this.formatTime(i),m=[
|
|
16
|
-
`),u=await e.ensureNameLoaded(),g=
|
|
15
|
+
No metrics available to display.`);return}let n=[...o.keys()].sort(),c=this.formatTime(i),m=[dn__default.default.bold(`Total time: ${c}`),dn__default.default.bold(`Number of samples: ${t.length}`),"",...n.map(f=>{let y=this.formatScore(o.get(f)||0);return dn__default.default.green(`${f}: ${y} (avg)`)})].join(`
|
|
16
|
+
`),u=await e.ensureNameLoaded(),g=ER__default.default(m,{title:`${u} (${t.length} samples)`,titleAlignment:"left",padding:1,margin:0,borderColor:"cyan",borderStyle:"round"});k.info(`
|
|
17
17
|
`+g+`
|
|
18
|
-
`),k.info(
|
|
18
|
+
`),k.info(dn__default.default.blue("Uploading results to Opik ... "));}static async displayExperimentLink(t){let e=await t.getUrl();k.info(`View the results ${qt(e,"in your Opik dashboard")}`);}static async processResults(t,e,o=0){let i=this.calculateAverageScores(t);await this.generateResultTable(t,e,i,o),await this.displayExperimentLink(e);let n=await e.ensureNameLoaded();return {experimentId:e.id,experimentName:n,testResults:t}}};function Gf(a,t,e){if(!a||typeof t!="string"||t.trim()==="")return e;let o=t.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),i=a;for(let n of o)if(typeof i=="object"&&i!==null&&n in i)i=i[n];else return e;return i===void 0?e:i}var $f,mu;$f=[je({name:"metrics_calculation",type:ve.General})];var _r=class{constructor(t,e,o){_u(mu,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=t.dataset,this.experiment=o,this.task=t.task,this.scoringMetrics=t.scoringMetrics||[],this.projectName=t.projectName,this.nbSamples=t.nbSamples,this.scoringKeyMapping=t.scoringKeyMapping;}async execute(){var f;let t=performance.now(),e=[],o=await this.dataset.getItems(this.nbSamples),i=o.length,n=k.settings.minLevel;k.settings.minLevel=6;let c=PR__default.default({text:`Evaluating dataset (0/${i} items)`}).start(),m=[];for(let y=0;y<o.length;y++){let z=o[y];try{this.rootTrace=this.client.trace({projectName:this.projectName,name:"evaluation_task",createdBy:"evaluation",input:z}),$t.enterWith({trace:this.rootTrace});let v=await this.executeTask(z);m.push(v),this.rootTrace.update({output:v.testCase.taskOutput,endTime:new Date});}catch(v){let S=v instanceof Error?v.message:String(v);k.error(`Error processing dataset item: ${z.id} - ${S}`),v instanceof Error&&this.rootTrace.update({errorInfo:{message:v.message,exceptionType:v.name,traceback:(f=v.stack)!=null?f:""},endTime:new Date});}e.push(new nn({datasetItemId:z.id,traceId:this.rootTrace.data.id})),c.text=`Evaluating dataset (${y+1}/${i} items, ${Math.round((y+1)/i*100)}%)`;}let g=(performance.now()-t)/1e3;return c.succeed(`Evaluation complete: ${i} items processed in ${g.toFixed(2)}s`),k.settings.minLevel=n,this.experiment.insert(e),await this.client.flush(),un.processResults(m,this.experiment,g)}async executeTask(t){let e={},o=[];k.debug(`Starting evaluation task on dataset item ${t.id}`),e=await je({name:"llm_task",type:ve.General},this.task)(t),k.debug(`Finished evaluation task on dataset item ${t.id}`);let i=this.prepareScoringInputs(t,e),n={traceId:this.rootTrace.data.id,datasetItemId:t.id,scoringInputs:i,taskOutput:e};return this.scoringMetrics.length>0?this.calculateScores(n):{testCase:n,scoreResults:o}}async calculateScores(t){let e=[],{scoringInputs:o}=t;for(let i of this.scoringMetrics){k.debug(`Calculating score for metric ${i.name}`);try{Kf(i,o);let n=await i.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 ${i.name} failed: ${c}`);}k.debug(`Finished calculating score for metric ${i.name}`);}return e.forEach(i=>{var n;return (n=this.rootTrace)==null?void 0:n.score({name:i.name,value:i.value,reason:i.reason})}),{testCase:t,scoreResults:e}}prepareScoringInputs(t,e){let o={...t,...e};if(!this.scoringKeyMapping)return o;let i={...o};for(let[n,c]of Object.entries(this.scoringKeyMapping)){let m=Gf(o,c);m!==void 0&&(i[n]=m);}return i}};mu=vu(),Au(mu,1,"calculateScores",$f,_r),vn(mu,_r);var Ar=class Ar{static getInstance(t){return Ar.instance||(Ar.instance=new pr(t)),Ar.instance}};Ar.instance=null;var gn=Ar;async function Qf(a){var o;if(!a.dataset)throw new Error("Dataset is required for evaluation");if(!a.task)throw new Error("Task function is required for evaluation");let t=(o=a.client)!=null?o:gn.getInstance(),e=await t.createExperiment({name:a.experimentName,datasetName:a.dataset.name,experimentConfig:a.experimentConfig,prompts:a.prompts});try{let i=new _r(a,t,e);return k.info("Starting evaluation"),i.execute()}catch(i){throw k.error(`Error during evaluation: ${i}`),i}}var cr=class{constructor(t){this.modelName=t;}};var Qt=class a extends Error{constructor(t){super(t),this.name="ModelError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},Tr=class a extends Qt{constructor(e,o){super(e);this.cause=o;this.name="ModelGenerationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},We=class a extends Qt{constructor(t){super(t),this.name="ModelConfigurationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}};function UR(a,t){return a.startsWith("gpt-")||a.startsWith("o1")||a.startsWith("o3")||a.startsWith("chatgpt-")}function DR(a,t){return a.startsWith("claude-")}function NR(a,t){return a.startsWith("gemini-")||a.startsWith("gemma-")}function du(a,t,e){if(!t)throw new We(`API key for ${a} is not configured. Please provide it via the 'apiKey' option or set the ${e} environment variable.`)}function uu(a,t){if(UR(a)){let e=(t==null?void 0:t.apiKey)||process.env.OPENAI_API_KEY;return du("OpenAI",e,"OPENAI_API_KEY"),openai.createOpenAI({apiKey:e,...t})(a)}if(DR(a)){let e=(t==null?void 0:t.apiKey)||process.env.ANTHROPIC_API_KEY;return du("Anthropic",e,"ANTHROPIC_API_KEY"),anthropic.createAnthropic({apiKey:e,...t})(a)}if(NR(a)){let e=(t==null?void 0:t.apiKey)||process.env.GOOGLE_API_KEY;return du("Google Gemini",e,"GOOGLE_API_KEY"),google.createGoogleGenerativeAI({apiKey:e,...t})(a)}throw new We(`Unable to detect provider for model ID: ${a}. Supported providers are OpenAI (gpt-*, o1*, o3*, chatgpt-*), Anthropic (claude-*), and Google Gemini (gemini-*, gemma-*).`)}var MR={inputTokens:"prompt_tokens",outputTokens:"completion_tokens",totalTokens:"total_tokens",reasoningTokens:"reasoning_tokens",cachedInputTokens:"cached_input_tokens"};function FR(a){if(!a||typeof a!="object")return false;let t=a,e="usage"in t,o="response"in t,i="text"in t,n="object"in t;return e||o||i||n}function gu(a,t){if(!FR(a))return {model:t};let e={model:OR(a,t)},o=WR(a.usage);o&&(e.usage=o);let i=BR(a);i&&(e.provider=i);let n=VR(a);n&&(e.metadata=n);let c=HR(a);return c&&(e.output=c),e}function OR(a,t){var e,o;return (o=(e=a.response)==null?void 0:e.modelId)!=null?o:t}function WR(a){if(!a)return;let t={};for(let[e,o]of Object.entries(MR)){let i=a[e];i!==void 0&&(t[o]=i);}return Object.keys(t).length>0?t:void 0}function BR(a){if(!a.providerMetadata)return;let t=Object.keys(a.providerMetadata);return t.length>0?t[0]:void 0}function LR(a){if(!a)return;let t={};return a.id&&(t.id=a.id),a.timestamp&&(t.timestamp=a.timestamp.toISOString()),Object.keys(t).length>0?t:void 0}function VR(a){let t={};a.usage&&(t.usage=a.usage),a.warnings&&a.warnings.length>0&&(t.warnings=a.warnings);let e=LR(a.response);return e&&(t.response=e),a.providerMetadata&&(t.providerMetadata=a.providerMetadata),a.finishReason&&(t.finishReason=a.finishReason),Object.keys(t).length>0?t:void 0}function HR(a){let t={};return "text"in a&&a.text&&(t.text=a.text),"object"in a&&a.object!==void 0&&(t.object=a.object),"toolCalls"in a&&Array.isArray(a.toolCalls)&&(t.toolCalls=a.toolCalls),"toolResults"in a&&Array.isArray(a.toolResults)&&(t.toolResults=a.toolResults),"sources"in a&&Array.isArray(a.sources)&&(t.sources=a.sources),Object.keys(t).length>0?t:void 0}var Er=class extends cr{constructor(t,e={trackGenerations:true}){let o=typeof t=="string"?t:t.modelId;super(o);let{trackGenerations:i,...n}=e;try{typeof t!="string"?(this.model=t,k.debug("Initialized VercelAIChatModel with custom LanguageModel")):(this.model=uu(t,n),k.debug(`Initialized VercelAIChatModel with model ID: ${t}`)),i?(this._generateText=je({name:"model.generateText",type:ve.Llm,enrichSpan:c=>gu(c,this.modelName)},ai$1.generateText),this._generateObject=je({name:"model.generateObject",type:ve.Llm,enrichSpan:c=>gu(c,this.modelName)},ai$1.generateObject)):(this._generateText=ai$1.generateText,this._generateObject=ai$1.generateObject);}catch(c){throw new We(`Failed to initialize model ${o}: ${c instanceof Error?c.message:String(c)}`)}}async generateString(t,e,o){try{let i;if(e){k.debug(`Generating structured output with model ${this.modelName}, input length: ${t.length}`);let n=await this._generateObject({model:this.model,prompt:t,schema:e,...o});k.debug(`Generated structured output with model ${this.modelName}`),i=JSON.stringify(n.object);}else {k.debug(`Generating text with model ${this.modelName}, input length: ${t.length}`);let n=await this._generateText({model:this.model,prompt:t,...o});k.debug(`Generated text with model ${this.modelName}, output length: ${n.text.length}`),i=n.text;}return i}catch(i){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:i}),new Tr(n,i instanceof Error?i:new Error(String(i)))}}async generateProviderResponse(t,e){try{k.debug(`Generating provider response with model ${this.modelName}, messages count: ${t.length}`);let o=await this._generateText({model:this.model,messages:t,...e});return k.debug(`Generated provider response with model ${this.modelName}`),o}catch(o){let i=`Failed to generate provider response with model ${this.modelName}`;throw k.error(i,{error:o}),new Tr(i,o instanceof Error?o:new Error(String(o)))}}};var qf="gpt-4o";function fu(a,t){return new Er(a,t)}function eh(a,t){return new Er(a,t)}function JR(a){return a instanceof cr}function XR(a){return typeof a=="object"&&a!==null&&"modelId"in a&&typeof a.modelId=="string"}function KR(a){return typeof a=="string"&&a.length>0}function GR(a){let t=typeof a,e=t==="object"?JSON.stringify(a):String(a);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
|
|
22
|
-
- undefined (uses default model: ${
|
|
22
|
+
- undefined (uses default model: ${qf})
|
|
23
23
|
|
|
24
|
-
Received: ${t} ${e}`)}function
|
|
25
|
-
`)}function
|
|
26
|
-
`)}function
|
|
24
|
+
Received: ${t} ${e}`)}function Yt(a,t){if(a==null)return fu(qf,t);if(KR(a))return fu(a,t);if(JR(a))return a;if(XR(a))return eh(a,t);throw GR(a)}function rh(a){return a.map(t=>{let e=Array.isArray(t.content)?$R(t.content):t.content;return `${t.role}: ${e}`}).join(`
|
|
25
|
+
`)}function $R(a){return a.map(t=>t.type==="text"?t.text:t.type==="file"?`[file: ${t.filename||"unknown"}]`:t.type==="tool-call"?`[tool-call: ${t.toolName}]`:t.type==="tool-result"?`[tool-result: ${t.toolName}]`:t.type==="reasoning"?`[reasoning: ${t.text}]`:"").filter(t=>t.length>0).join(`
|
|
26
|
+
`)}function QR(a,t,e){return typeof a=="string"?_e(a,t,e):Array.isArray(a)?a.map(i=>i.type==="text"&&typeof i.text=="string"?{...i,text:_e(i.text,t,e)}:i.type==="image"&&typeof i.image=="string"?{...i,image:_e(i.image,t,e)}:i.type==="file"&&typeof i.data=="string"?{...i,data:_e(i.data,t,e)}:i.type==="reasoning"&&typeof i.text=="string"?{...i,text:_e(i.text,t,e)}:i):a}function oh(a,t,e){let o=QR(a.content,t,e);return {...a,content:o}}async function ede(a){var i;if(!a.dataset)throw new Error("Dataset is required for prompt evaluation");if(!a.messages||a.messages.length===0)throw new Error("Messages array is required and cannot be empty");if(a.experimentConfig!==void 0&&(typeof a.experimentConfig!="object"||a.experimentConfig===null||Array.isArray(a.experimentConfig)))throw new Error("experimentConfig must be a plain object, not an array or primitive value");let t=Yt(a.model),e={...a.experimentConfig,prompt_template:a.messages,model:t.modelName,...a.temperature!==void 0&&{temperature:a.temperature},...a.seed!==void 0&&{seed:a.seed}},o=YR(t,a.messages,(i=a.templateType)!=null?i:ye.MUSTACHE,{temperature:a.temperature,seed:a.seed});return Qf({dataset:a.dataset,task:o,scoringMetrics:a.scoringMetrics,experimentName:a.experimentName,projectName:a.projectName,experimentConfig:e,prompts:a.prompts,client:a.client,nbSamples:a.nbSamples,scoringKeyMapping:a.scoringKeyMapping})}function YR(a,t,e,o){return async i=>{let n=t.map(g=>oh(g,i,e)),c=await a.generateProviderResponse(n,o),m=ZR(c);return {input:rh(n),output:m}}}function ZR(a){return a&&typeof a=="object"?"text"in a&&typeof a.text=="string"?a.text:"content"in a&&typeof a.content=="string"?a.content:JSON.stringify(a):String(a)}var fe=class{constructor(t,e=true){if(this.name=t,this.trackMetric=e,e){let o=this.score.bind(this);this.score=je({name:this.name,type:ve.General},o);}}};var qR=zod.z.object({output:zod.z.unknown(),expected:zod.z.unknown()}),th=class extends fe{constructor(e="exact_match",o=true){super(e,o);this.validationSchema=qR;}async score(e){let{output:o,expected:i}=e,n=o===i?1:0;return {name:this.name,value:n,reason:`Exact match: ${n===1?"Match":"No match"}`}}};var ey=zod.z.object({output:zod.z.string(),substring:zod.z.string()}),ih=class extends fe{constructor(e="contains",o=true,i=false){super(e,o);this.validationSchema=ey;this.caseSensitive=i;}async score(e){let{output:o,substring:i}=e,n=this.caseSensitive?o:o.toLowerCase(),c=this.caseSensitive?i:i.toLowerCase();return n.includes(c)?{name:this.name,value:1,reason:`Contains: "${i}" found in output.`}:{name:this.name,value:0,reason:`Contains: "${i}" not found in output.`}}};var ry=zod.z.object({output:zod.z.string(),pattern:zod.z.string(),flags:zod.z.string().optional()}),ah=class extends fe{constructor(e="regex_match",o=true){super(e,o);this.validationSchema=ry;}async score(e){let{output:o,pattern:i,flags:n}=e,c;typeof i=="string"&&n?c=new RegExp(i,n):c=new RegExp(i);let m=c.test(o);return {name:this.name,value:m?1:0,reason:m?`Regex: Output matches the regex pattern: ${i}`:`Regex: Output does not match the regex pattern: ${i}`}}};var oy=zod.z.object({output:zod.z.unknown()}),sh=class extends fe{constructor(e="is_json_metric",o=true){super(e,o);this.validationSchema=oy;}async score(e){let{output:o}=e;try{return JSON.parse(o),{name:this.name,value:1,reason:"IsJson: Output is valid JSON."}}catch{return {name:this.name,value:0,reason:"IsJson: Output is not valid JSON"}}}};var ke=class extends fe{constructor(t,e){var i;let o=(i=e==null?void 0:e.trackMetric)!=null?i:true;super(t,o),this.temperature=e==null?void 0:e.temperature,this.seed=e==null?void 0:e.seed,this.maxTokens=e==null?void 0:e.maxTokens,this.modelSettings=e==null?void 0:e.modelSettings,this.model=this.initModel(e==null?void 0:e.model,{trackGenerations:o});}initModel(t,e){return Yt(t,e)}buildModelOptions(){return {...this.modelSettings,...this.temperature!==void 0&&{temperature:this.temperature},...this.seed!==void 0&&{seed:this.seed},...this.maxTokens!==void 0&&{maxTokens:this.maxTokens}}}};function ph(a,t=[]){let e="";return t.length>0&&(e=`
|
|
27
27
|
|
|
28
28
|
###EXAMPLES###
|
|
29
29
|
|
|
@@ -85,7 +85,7 @@ ${e}
|
|
|
85
85
|
Analyze the following text and provide your verdict score, and reason in the specified JSON format:
|
|
86
86
|
|
|
87
87
|
${a}
|
|
88
|
-
`}var
|
|
88
|
+
`}var hn=class a extends Error{constructor(t){super(t),this.name="MetricError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},he=class a extends hn{constructor(e,o){super(e);this.cause=o;this.name="MetricComputationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},wn=class a extends hn{constructor(e,o){super(e);this.cause=o;this.name="JSONParsingError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}};function Be(a){try{return JSON.parse(a)}catch{return ty(a)}}function ty(a){try{let t=a.indexOf("{"),e=a.lastIndexOf("}");if(t===-1||e===-1||t>=e)throw new Error("No valid JSON object found in content");let o=a.substring(t,e+1);return JSON.parse(o)}catch(t){let e=t instanceof Error?t.message:String(t);throw new wn(`Failed to extract JSON from content: ${e}`,t instanceof Error?t:void 0)}}function ch(a,t){try{let e=Be(a),o=Number(e.score);if(isNaN(o)||o<0||o>1)throw new Error(`Moderation score must be between 0.0 and 1.0, got ${o}`);return {name:t,value:o,reason:String(e.reason||"")}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate moderation score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var iy=zod.z.object({output:zod.z.string()}),ay=zod.z.object({score:zod.z.number(),reason:zod.z.string()}),bn=class extends ke{constructor(e){var i,n;let o=(i=e==null?void 0:e.name)!=null?i:"moderation_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=iy;this.fewShotExamples=(n=e==null?void 0:e.fewShotExamples)!=null?n:[];}async score(e){let{output:o}=e,i=ph(o,this.fewShotExamples),n=this.buildModelOptions(),c=await this.model.generateString(i,ay,n);return ch(c,this.name)}};function lh(a,t){return `
|
|
89
89
|
You are an impartial judge tasked with evaluating the quality and usefulness of AI-generated responses.
|
|
90
90
|
Your evaluation should consider the following key factors:
|
|
91
91
|
- Helpfulness: How well does it solve the user's problem?
|
|
@@ -121,7 +121,7 @@ ${a}
|
|
|
121
121
|
AI Response: ${t}
|
|
122
122
|
|
|
123
123
|
Provide your evaluation in the specified JSON format.
|
|
124
|
-
`}function
|
|
124
|
+
`}function mh(a,t){try{let e=Be(a),o=Number(e.score);if(isNaN(o)||o<0||o>1)throw new Error(`Usefulness score must be between 0.0 and 1.0, got ${o}`);return {name:t,value:o,reason:String(e.reason||"")}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate usefulness score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var ny=zod.z.object({input:zod.z.string(),output:zod.z.string()}),sy=zod.z.object({score:zod.z.number(),reason:zod.z.string()}),xn=class extends ke{constructor(e){var i;let o=(i=e==null?void 0:e.name)!=null?i:"usefulness_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=ny;}async score(e){let{input:o,output:i}=e,n=lh(o,i),c=this.buildModelOptions(),m=await this.model.generateString(n,sy,c);return mh(m,this.name)}};var py=`You are an expert judge tasked with evaluating the faithfulness of an AI-generated answer to the given context. Analyze the provided INPUT, CONTEXT, and OUTPUT to determine if the OUTPUT contains any hallucinations or unfaithful information.
|
|
125
125
|
|
|
126
126
|
Guidelines:
|
|
127
127
|
1. The OUTPUT must not introduce new information beyond what's provided in the CONTEXT.
|
|
@@ -156,7 +156,7 @@ It is crucial that you provide your answer in the following JSON format:
|
|
|
156
156
|
"reason": ["reason 1", "reason 2"]
|
|
157
157
|
}}
|
|
158
158
|
Reasons amount is not restricted. Output must be JSON format only.
|
|
159
|
-
`,
|
|
159
|
+
`,cy=`You are an expert judge tasked with evaluating the factual accuracy and reliability of an AI-generated answer. Analyze the provided INPUT, and OUTPUT to determine if the OUTPUT contains any hallucinations or unfaithful information.
|
|
160
160
|
|
|
161
161
|
Guidelines:
|
|
162
162
|
1. Evaluate the OUTPUT based on generally accepted facts and reliable information.
|
|
@@ -187,7 +187,7 @@ It is crucial that you provide your answer in the following JSON format:
|
|
|
187
187
|
"reason": ["some reason 1", "some reason 2"]
|
|
188
188
|
}}
|
|
189
189
|
Reasons amount is not restricted. Output must be JSON format only.
|
|
190
|
-
`;function
|
|
190
|
+
`;function dh(a,t){return a.length===0?"":`
|
|
191
191
|
|
|
192
192
|
EXAMPLES:
|
|
193
193
|
|
|
@@ -199,7 +199,7 @@ ${i}Output: ${o.output}
|
|
|
199
199
|
{"score": "${o.score}", "reason": "${o.reason}"}
|
|
200
200
|
</example>`}).join(`
|
|
201
201
|
|
|
202
|
-
`)}`}function
|
|
202
|
+
`)}`}function uh(a,t,e,o=[]){let i=dh(o,true);return py.replace("{examples_str}",i).replace("{input}",a).replace("{context}",JSON.stringify(e)).replace("{output}",t)}function gh(a,t,e=[]){let o=dh(e,false);return cy.replace("{examples_str}",o).replace("{input}",a).replace("{output}",t)}function fh(a,t){try{let e=Be(a),o=e.score;if(o==null)throw new Error(`Hallucination score is required but got ${o}`);let i=Number(o);if(isNaN(i)||i<0||i>1)throw new Error(`Hallucination score must be between 0.0 and 1.0, got ${i}`);let n="",c=e.reason;return Array.isArray(c)?n=c.map(m=>String(m)).join(" "):c&&(n=String(c)),{name:t,value:i,reason:n}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate hallucination score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var ly=zod.z.object({input:zod.z.string(),output:zod.z.string(),context:zod.z.array(zod.z.string()).optional()}),my=zod.z.object({score:zod.z.number(),reason:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())])}),Rn=class extends ke{constructor(e){var i,n;let o=(i=e==null?void 0:e.name)!=null?i:"hallucination_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=ly;this.fewShotExamples=(n=e==null?void 0:e.fewShotExamples)!=null?n:[];}async score(e){let{input:o,output:i,context:n}=e,c=n?uh(o,i,n,this.fewShotExamples):gh(o,i,this.fewShotExamples),m=this.buildModelOptions(),u=await this.model.generateString(c,my,m);return fh(u,this.name)}};var hh=[{title:"Low Relevance Score",input:"What's the capital of France?",output:"The Eiffel Tower is a famous landmark.",context:["France is a country in Europe.","Paris is known for its iconic Eiffel Tower."],answer_relevance_score:.2,reason:"The answer provides information about the Eiffel Tower, which is related to France, but fails to address the specific question about the capital city. It doesn't directly answer the user's query, resulting in low relevance."},{title:"Medium Relevance Score",input:"What's the capital of France?",output:"France has many beautiful cities, including Paris.",context:["France is a country in Europe.","Paris is the capital and largest city of France."],answer_relevance_score:.6,reason:"The answer mentions Paris, which is the correct capital, but it's presented as just one of many cities rather than explicitly stating it's the capital. The response is partially relevant but lacks directness in addressing the specific question."},{title:"High Relevance Score",input:"What's the capital of France?",output:"The capital of France is Paris, a city known for its iconic Eiffel Tower.",context:["France is a country in Europe.","Paris is the capital and largest city of France."],answer_relevance_score:.9,reason:"The answer directly and correctly identifies Paris as the capital of France, which is highly relevant to the user's question. It also provides additional context about the Eiffel Tower, which aligns with the provided context. The response is comprehensive and relevant, though slightly more detailed than necessary, preventing a perfect score."}],wh=[{title:"Low Relevance Score",input:"What's the capital of France?",output:"The Eiffel Tower is a famous landmark.",answer_relevance_score:.2,reason:"The answer provides information about the Eiffel Tower, which is related to France, but fails to address the specific question about the capital city. It doesn't directly answer the user's query, resulting in low relevance."},{title:"Medium Relevance Score",input:"What's the capital of France?",output:"France has many beautiful cities, including Paris.",answer_relevance_score:.6,reason:"The answer mentions Paris, which is the correct capital, but it's presented as just one of many cities rather than explicitly stating it's the capital. The response is partially relevant but lacks directness in addressing the specific question."},{title:"High Relevance Score",input:"What's the capital of France?",output:"The capital of France is Paris, a city known for its iconic Eiffel Tower.",answer_relevance_score:.9,reason:"The answer directly and correctly identifies Paris as the capital of France, which is highly relevant to the user's question. It also provides additional context about the Eiffel Tower, which aligns with the provided context. The response is comprehensive and relevant, though slightly more detailed than necessary, preventing a perfect score."}];function dy(a){return a.map((t,e)=>`#### Example ${e+1}: ${t.title}
|
|
203
203
|
|
|
204
204
|
- **Input:** "${t.input}"
|
|
205
205
|
- **Output:** "${t.output}"
|
|
@@ -212,7 +212,7 @@ ${i}Output: ${o.output}
|
|
|
212
212
|
}
|
|
213
213
|
\`\`\``).join(`
|
|
214
214
|
|
|
215
|
-
`)}function
|
|
215
|
+
`)}function uy(a){return a.map((t,e)=>`#### Example ${e+1}: ${t.title}
|
|
216
216
|
|
|
217
217
|
- **Input:** "${t.input}"
|
|
218
218
|
- **Output:** "${t.output}"
|
|
@@ -224,7 +224,7 @@ ${i}Output: ${o.output}
|
|
|
224
224
|
}
|
|
225
225
|
\`\`\``).join(`
|
|
226
226
|
|
|
227
|
-
`)}function
|
|
227
|
+
`)}function bh(a,t,e,o){return `
|
|
228
228
|
YOU ARE AN EXPERT IN NLP EVALUATION METRICS, SPECIALLY TRAINED TO ASSESS ANSWER RELEVANCE IN RESPONSES
|
|
229
229
|
PROVIDED BY LANGUAGE MODELS. YOUR TASK IS TO EVALUATE THE RELEVANCE OF A GIVEN ANSWER FROM
|
|
230
230
|
ANOTHER LLM BASED ON THE USER'S INPUT AND CONTEXT PROVIDED.
|
|
@@ -270,7 +270,7 @@ ${i}Output: ${o.output}
|
|
|
270
270
|
|
|
271
271
|
###FEW-SHOT EXAMPLES###
|
|
272
272
|
|
|
273
|
-
${
|
|
273
|
+
${dy(o)}
|
|
274
274
|
|
|
275
275
|
###INPUTS:###
|
|
276
276
|
***
|
|
@@ -283,7 +283,7 @@ ${i}Output: ${o.output}
|
|
|
283
283
|
Context:
|
|
284
284
|
${JSON.stringify(e)}
|
|
285
285
|
***
|
|
286
|
-
`}function
|
|
286
|
+
`}function xh(a,t,e){return `
|
|
287
287
|
YOU ARE AN EXPERT IN NLP EVALUATION METRICS, SPECIALLY TRAINED TO ASSESS ANSWER RELEVANCE IN RESPONSES
|
|
288
288
|
PROVIDED BY LANGUAGE MODELS. YOUR TASK IS TO EVALUATE THE RELEVANCE OF A GIVEN ANSWER FROM
|
|
289
289
|
ANOTHER LLM BASED ON THE USER'S INPUT.
|
|
@@ -328,7 +328,7 @@ ${i}Output: ${o.output}
|
|
|
328
328
|
|
|
329
329
|
###FEW-SHOT EXAMPLES###
|
|
330
330
|
|
|
331
|
-
${
|
|
331
|
+
${uy(e)}
|
|
332
332
|
|
|
333
333
|
###INPUTS:###
|
|
334
334
|
***
|
|
@@ -338,7 +338,7 @@ ${i}Output: ${o.output}
|
|
|
338
338
|
Output:
|
|
339
339
|
${t}
|
|
340
340
|
***
|
|
341
|
-
`}function
|
|
341
|
+
`}function Rh(a,t){try{let e=Be(a),o=e.answer_relevance_score;if(o==null)throw new Error(`Answer relevance score is required but got ${o}`);let i=Number(o);if(isNaN(i)||i<0||i>1)throw new Error(`Answer relevance score must be between 0.0 and 1.0, got ${i}`);return {name:t,value:i,reason:String(e.reason||"")}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate answer relevance score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var gy=zod.z.object({input:zod.z.string(),output:zod.z.string(),context:zod.z.array(zod.z.string()).optional()}),fy=zod.z.object({answer_relevance_score:zod.z.number(),reason:zod.z.string()}),yn=class extends ke{constructor(e){var i,n,c,m;let o=(i=e==null?void 0:e.name)!=null?i:"answer_relevance_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=gy;this.fewShotExamplesWithContext=(n=e==null?void 0:e.fewShotExamples)!=null?n:hh,this.fewShotExamplesNoContext=(c=e==null?void 0:e.fewShotExamplesNoContext)!=null?c:wh,this.requireContext=(m=e==null?void 0:e.requireContext)!=null?m:true;}async score(e){let{input:o,output:i,context:n}=e;if(!n&&this.requireContext)throw new he(`${this.name} requires context by default. If you want to allow execution in no-context mode, enable it via 'new AnswerRelevance({ requireContext: false })'`);let c=n?bh(o,i,n,this.fewShotExamplesWithContext):xh(o,i,this.fewShotExamplesNoContext),m=this.buildModelOptions(),u=await this.model.generateString(c,fy,m);return Rh(u,this.name)}};/*! Bundled license information:
|
|
342
342
|
|
|
343
343
|
mime-db/index.js:
|
|
344
344
|
(*!
|
|
@@ -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=
|
|
358
|
+
*/Object.defineProperty(exports,"z",{enumerable:true,get:function(){return zod.z}});exports.AnswerRelevance=yn;exports.BaseLLMJudgeMetric=ke;exports.BaseMetric=fe;exports.Contains=ih;exports.ExactMatch=th;exports.Hallucination=Rn;exports.IsJson=sh;exports.ModelConfigurationError=We;exports.ModelError=Qt;exports.ModelGenerationError=Tr;exports.Moderation=bn;exports.Opik=pr;exports.OpikBaseModel=cr;exports.OpikQueryLanguage=Oe;exports.OpikSpanType=ve;exports.Prompt=Me;exports.PromptType=ye;exports.RegexMatch=ah;exports.Usefulness=xn;exports.VercelAIChatModel=Er;exports.createModel=fu;exports.createModelFromInstance=eh;exports.detectProvider=uu;exports.disableLogger=Ih;exports.evaluate=Qf;exports.evaluatePrompt=ede;exports.flushAll=AR;exports.generateId=oe;exports.getTrackContext=zR;exports.logger=k;exports.resolveModel=Yt;exports.setLoggerLevel=Tu;exports.track=je;
|