opik 1.9.34 → 1.9.37
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 +45 -45
- package/dist/index.d.cts +553 -103
- package/dist/index.d.ts +553 -103
- package/dist/index.js +33 -33
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),Cd=require('fs'),Uf=require('ini');require('dotenv/config');var Rw=require('qs'),uuid=require('uuid'),Zb=require('fast-json-stable-stringify'),Yb=require('xxhash-wasm'),util=require('util'),ax=require('mustache'),nx=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),cx=require('fast-deep-equal'),async_hooks=require('async_hooks'),Qi=require('chalk'),Rx=require('boxen'),yx=require('ora'),ai$1=require('ai'),openai=require('@ai-sdk/openai'),anthropic=require('@ai-sdk/anthropic'),google=require('@ai-sdk/google'),zod=require('zod');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Cd__default=/*#__PURE__*/_interopDefault(Cd);var Uf__default=/*#__PURE__*/_interopDefault(Uf);var Rw__default=/*#__PURE__*/_interopDefault(Rw);var Zb__default=/*#__PURE__*/_interopDefault(Zb);var Yb__default=/*#__PURE__*/_interopDefault(Yb);var ax__default=/*#__PURE__*/_interopDefault(ax);var nx__default=/*#__PURE__*/_interopDefault(nx);var cx__default=/*#__PURE__*/_interopDefault(cx);var Qi__default=/*#__PURE__*/_interopDefault(Qi);var Rx__default=/*#__PURE__*/_interopDefault(Rx);var yx__default=/*#__PURE__*/_interopDefault(yx);var vd=Object.create;var Ze=Object.defineProperty;var zd=Object.getOwnPropertyDescriptor;var yf=Object.getOwnPropertyNames;var kf=Object.getPrototypeOf,vf=Object.prototype.hasOwnProperty;var Sd=(i,a)=>(a=Symbol[i])?a:Symbol.for("Symbol."+i),wr=i=>{throw TypeError(i)};var zf=(i,a,e)=>a in i?Ze(i,a,{enumerable:true,configurable:true,writable:true,value:e}):i[a]=e;var me=(i=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(i,{get:(a,e)=>(typeof require!="undefined"?require:a)[e]}):i)(function(i){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var pn=(i,a)=>()=>(i&&(a=i(i=0)),a);var Y=(i,a)=>()=>(a||i((a={exports:{}}).exports,a),a.exports),E=(i,a)=>{for(var e in a)Ze(i,e,{get:a[e],enumerable:true});},Sf=(i,a,e,o)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of yf(a))!vf.call(i,t)&&t!==e&&Ze(i,t,{get:()=>a[t],enumerable:!(o=zd(a,t))||o.enumerable});return i};var _f=(i,a,e)=>(e=i!=null?vd(kf(i)):{},Sf(Ze(e,"default",{value:i,enumerable:true}),i));var _d=i=>{var a;return [,,,vd((a=void 0)!=null?a:null)]},Td=["class","method","getter","setter","accessor","field","value","get","set"],hr=i=>i!==void 0&&typeof i!="function"?wr("Function expected"):i,Tf=(i,a,e,o,t)=>({kind:Td[i],name:a,metadata:o,addInitializer:n=>e._?wr("Already initialized"):t.push(hr(n||null))}),cn=(i,a)=>zf(a,Sd("metadata"),i[3]),Ad=(i,a,e,o)=>{for(var t=0,n=i[a>>1],c=n&&n.length;t<c;t++)n[t].call(e);return o},Ed=(i,a,e,o,t,n)=>{var m,u,g,R,y=a&7,v=false,z=false,S=2,O=Td[y+5],G=i[S]||(i[S]=[]),oe=((t=t.prototype),zd(t,e));for(var Ye=o.length-1;Ye>=0;Ye--)g=Tf(y,e,u={},i[3],G),(g.static=v,g.private=z,R=g.access={has:ne=>e in ne},(R.get=ne=>ne[e]),y>2),m=(0, o[Ye])(oe[O],g),u._=1,hr(m)&&(oe[O]=m);return oe&&Ze(t,e,oe),t};var su={};E(su,{Node18UniversalStreamWrapper:()=>An});var An,pu=pn(()=>{An=class i{constructor(a){this.readableStream=a,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(a,e){var o;(o=this.events[a])==null||o.push(e);}off(a,e){var o;this.events[a]=(o=this.events[a])==null?void 0:o.filter(t=>t!==e);}pipe(a){return this.on("data",async e=>{if(a instanceof i)a._write(e);else if(a instanceof WritableStream){let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}else a.write(e);}),this.on("end",async()=>{a instanceof i?a._end():a instanceof WritableStream?a.getWriter().close():a.end();}),this.on("error",async e=>{a instanceof i?a._error(e):a instanceof WritableStream?a.getWriter().abort(e):a.destroy(e);}),this._startReading(),a}pipeTo(a){return this.pipe(a)}unpipe(a){this.off("data",async e=>{if(a instanceof i)a._write(e);else if(a instanceof WritableStream){let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}else a.write(e);}),this.off("end",async()=>{a instanceof i?a._end():a instanceof WritableStream?a.getWriter().close():a.end();}),this.off("error",async e=>{a instanceof i?a._error(e):a instanceof WritableStream?a.getWriter().abort(e):a.destroy(e);});}destroy(a){this.reader.cancel(a).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(!a)return e}setEncoding(a){this.encoding=a;}async text(){let a=[];for(;;){let{done:o,value:t}=await this.reader.read();if(o)break;t&&a.push(t);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(a).arrayBuffer())}async json(){let a=await this.text();return JSON.parse(a)}_write(a){this._emit("data",a);}_end(){this._emit("end");}_error(a){this._emit("error",a);}_emit(a,e){if(this.events[a])for(let o of this.events[a]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(a){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(a){this._emit("error",a);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();return a?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var cu={};E(cu,{UndiciStreamWrapper:()=>En});var En,lu=pn(()=>{En=class i{constructor(a){this.readableStream=a,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(a,e){var o;(o=this.events[a])==null||o.push(e);}off(a,e){var o;this.events[a]=(o=this.events[a])==null?void 0:o.filter(t=>t!==e);}pipe(a){return this.on("data",e=>{if(a instanceof i)a._write(e);else {let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.on("end",()=>{a instanceof i?a._end():a.getWriter().close();}),this.on("error",e=>{a instanceof i?a._error(e):a.getWriter().abort(e);}),this._startReading(),a}pipeTo(a){return this.pipe(a)}unpipe(a){this.off("data",e=>{if(a instanceof i)a._write(e);else {let o=a.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.off("end",()=>{a instanceof i?a._end():a.getWriter().close();}),this.off("error",e=>{a instanceof i?a._error(e):a.getWriter().abort(e);});}destroy(a){this.reader.cancel(a).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(!a)return e}setEncoding(a){this.encoding=a;}async text(){let a=[];for(;;){let{done:o,value:t}=await this.reader.read();if(o)break;t&&a.push(t);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(a).arrayBuffer())}async json(){let a=await this.text();return JSON.parse(a)}_write(a){this._emit("data",a);}_end(){this._emit("end");}_error(a){this._emit("error",a);}_emit(a,e){if(this.events[a])for(let o of this.events[a]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();if(a){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(a){this._emit("error",a);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:a,value:e}=await this.reader.read();return a?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var mu={};E(mu,{NodePre18StreamWrapper:()=>Pn});var Pn,du=pn(()=>{Pn=class{constructor(a){this.readableStream=a;}on(a,e){this.readableStream.on(a,e);}off(a,e){this.readableStream.off(a,e);}pipe(a){return this.readableStream.pipe(a),a}pipeTo(a){return this.pipe(a)}unpipe(a){a?this.readableStream.unpipe(a):this.readableStream.unpipe();}destroy(a){this.readableStream.destroy(a);}pause(){this.readableStream.pause();}resume(){this.readableStream.resume();}get isPaused(){return this.readableStream.isPaused()}async read(){return new Promise((a,e)=>{let o=this.readableStream.read();o?a(o):(this.readableStream.once("readable",()=>{let t=this.readableStream.read();a(t);}),this.readableStream.once("error",e));})}setEncoding(a){this.readableStream.setEncoding(a),this.encoding=a;}async text(){let a=[],e=new TextEncoder;this.readableStream.setEncoding(this.encoding||"utf-8");for await(let t of this.readableStream)a.push(e.encode(t));return new TextDecoder(this.encoding||"utf-8").decode(Buffer.concat(a))}async json(){let a=await this.text();return JSON.parse(a)}[Symbol.asyncIterator](){let e=this.readableStream[Symbol.asyncIterator]();return {async next(){let{value:o,done:t}=await e.next();return {value:o,done:t}},[Symbol.asyncIterator](){return this}}}};});var yu=Y((qI,Ru)=>{var xu=me("stream").Stream,Sw=me("util");Ru.exports=fe;function fe(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=true,this._maxDataSizeExceeded=false,this._released=false,this._bufferedEvents=[];}Sw.inherits(fe,xu);fe.create=function(i,a){var e=new this;a=a||{};for(var o in a)e[o]=a[o];e.source=i;var t=i.emit;return i.emit=function(){return e._handleEmit(arguments),t.apply(i,arguments)},i.on("error",function(){}),e.pauseStream&&i.pause(),e};Object.defineProperty(fe.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});fe.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};fe.prototype.resume=function(){this._released||this.release(),this.source.resume();};fe.prototype.pause=function(){this.source.pause();};fe.prototype.release=function(){this._released=true,this._bufferedEvents.forEach(function(i){this.emit.apply(this,i);}.bind(this)),this._bufferedEvents=[];};fe.prototype.pipe=function(){var i=xu.prototype.pipe.apply(this,arguments);return this.resume(),i};fe.prototype._handleEmit=function(i){if(this._released){this.emit.apply(this,i);return}i[0]==="data"&&(this.dataSize+=i[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(i);};fe.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=true;var i="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(i));}};});var Su=Y((ej,zu)=>{var _w=me("util"),vu=me("stream").Stream,ku=yu();zu.exports=V;function V(){this.writable=false,this.readable=true,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=true,this._released=false,this._streams=[],this._currentStream=null,this._insideLoop=false,this._pendingNext=false;}_w.inherits(V,vu);V.create=function(i){var a=new this;i=i||{};for(var e in i)a[e]=i[e];return a};V.isStreamLike=function(i){return typeof i!="function"&&typeof i!="string"&&typeof i!="boolean"&&typeof i!="number"&&!Buffer.isBuffer(i)};V.prototype.append=function(i){var a=V.isStreamLike(i);if(a){if(!(i instanceof ku)){var e=ku.create(i,{maxDataSize:1/0,pauseStream:this.pauseStreams});i.on("data",this._checkDataSize.bind(this)),i=e;}this._handleErrors(i),this.pauseStreams&&i.pause();}return this._streams.push(i),this};V.prototype.pipe=function(i,a){return vu.prototype.pipe.call(this,i,a),this.resume(),i};V.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=false;}};V.prototype._realGetNext=function(){var i=this._streams.shift();if(typeof i=="undefined"){this.end();return}if(typeof i!="function"){this._pipeNext(i);return}var a=i;a(function(e){var o=V.isStreamLike(e);o&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e);}.bind(this));};V.prototype._pipeNext=function(i){this._currentStream=i;var a=V.isStreamLike(i);if(a){i.on("end",this._getNext.bind(this)),i.pipe(this,{end:false});return}var e=i;this.write(e),this._getNext();};V.prototype._handleErrors=function(i){var a=this;i.on("error",function(e){a._emitError(e);});};V.prototype.write=function(i){this.emit("data",i);};V.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"));};V.prototype.resume=function(){this._released||(this._released=true,this.writable=true,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume");};V.prototype.end=function(){this._reset(),this.emit("end");};V.prototype.destroy=function(){this._reset(),this.emit("close");};V.prototype._reset=function(){this.writable=false,this._streams=[],this._currentStream=null;};V.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var i="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(i));}};V.prototype._updateDataSize=function(){this.dataSize=0;var i=this;this._streams.forEach(function(a){a.dataSize&&(i.dataSize+=a.dataSize);}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize);};V.prototype._emitError=function(i){this._reset(),this.emit("error",i);};});var _u=Y((rj,Tw)=>{Tw.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/3gpp-ims+xml":{source:"iana",compressible:true},"application/3gpphal+json":{source:"iana",compressible:true},"application/3gpphalforms+json":{source:"iana",compressible:true},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:true},"application/alto-costmap+json":{source:"iana",compressible:true},"application/alto-costmapfilter+json":{source:"iana",compressible:true},"application/alto-directory+json":{source:"iana",compressible:true},"application/alto-endpointcost+json":{source:"iana",compressible:true},"application/alto-endpointcostparams+json":{source:"iana",compressible:true},"application/alto-endpointprop+json":{source:"iana",compressible:true},"application/alto-endpointpropparams+json":{source:"iana",compressible:true},"application/alto-error+json":{source:"iana",compressible:true},"application/alto-networkmap+json":{source:"iana",compressible:true},"application/alto-networkmapfilter+json":{source:"iana",compressible:true},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:true},"application/alto-updatestreamparams+json":{source:"iana",compressible:true},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:true,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:true,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:true,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:true,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:true,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:true,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:true},"application/atsc-rsat+xml":{source:"iana",compressible:true,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:true},"application/bacnet-xdd+zip":{source:"iana",compressible:false},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:false,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/calendar+json":{source:"iana",compressible:true},"application/calendar+xml":{source:"iana",compressible:true,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:true},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:true},"application/ccxml+xml":{source:"iana",compressible:true,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:true,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:true},"application/cellml+xml":{source:"iana",compressible:true},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:true},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:true},"application/clue_info+xml":{source:"iana",compressible:true},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:true},"application/coap-group+json":{source:"iana",compressible:true},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:true},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:true,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:true},"application/cstadata+xml":{source:"iana",compressible:true},"application/csvm+json":{source:"iana",compressible:true},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:true},"application/dash+xml":{source:"iana",compressible:true,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:true,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:true,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:true},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:true},"application/dicom+xml":{source:"iana",compressible:true},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:true},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:true,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:true},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:true,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:true,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:false},"application/edifact":{source:"iana",compressible:false},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:true},"application/elm+xml":{source:"iana",compressible:true},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/emergencycalldata.comment+xml":{source:"iana",compressible:true},"application/emergencycalldata.control+xml":{source:"iana",compressible:true},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.veds+xml":{source:"iana",compressible:true},"application/emma+xml":{source:"iana",compressible:true,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:true,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:true},"application/epub+zip":{source:"iana",compressible:false,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:true},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:true,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:true},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/fido.trusted-apps+json":{compressible:true},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:false},"application/framework-attributes+xml":{source:"iana",compressible:true},"application/geo+json":{source:"iana",compressible:true,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:true},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:true,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:true,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:false,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:true},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:true},"application/ibe-pkg-reply+xml":{source:"iana",compressible:true},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:true,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:true,extensions:["its"]},"application/java-archive":{source:"apache",compressible:false,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:false,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:false,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:true,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:true},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:true},"application/jrd+json":{source:"iana",compressible:true},"application/jscalendar+json":{source:"iana",compressible:true},"application/json":{source:"iana",charset:"UTF-8",compressible:true,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:true},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:true,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:true},"application/jwk-set+json":{source:"iana",compressible:true},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:true},"application/kpml-response+xml":{source:"iana",compressible:true},"application/ld+json":{source:"iana",compressible:true,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:true,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:true},"application/lost+xml":{source:"iana",compressible:true,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:true},"application/lpf+zip":{source:"iana",compressible:false},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:true,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:true,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:true,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:true,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:true},"application/mathml-presentation+xml":{source:"iana",compressible:true},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:true},"application/mbms-deregister+xml":{source:"iana",compressible:true},"application/mbms-envelope+xml":{source:"iana",compressible:true},"application/mbms-msk+xml":{source:"iana",compressible:true},"application/mbms-msk-response+xml":{source:"iana",compressible:true},"application/mbms-protection-description+xml":{source:"iana",compressible:true},"application/mbms-reception-report+xml":{source:"iana",compressible:true},"application/mbms-register+xml":{source:"iana",compressible:true},"application/mbms-register-response+xml":{source:"iana",compressible:true},"application/mbms-schedule+xml":{source:"iana",compressible:true},"application/mbms-user-service-description+xml":{source:"iana",compressible:true},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:true,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:true},"application/mediaservercontrol+xml":{source:"iana",compressible:true,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:true},"application/metalink+xml":{source:"apache",compressible:true,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:true,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:true,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:true,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:true,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:true,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:true},"application/mrb-publish+xml":{source:"iana",compressible:true},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/msword":{source:"iana",compressible:false,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:true},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:true},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:false,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:true},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:true,extensions:["opf"]},"application/ogg":{source:"iana",compressible:false,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:true,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:true},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:false},"application/p2p-overlay+xml":{source:"iana",compressible:true,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:true,extensions:["xer"]},"application/pdf":{source:"iana",compressible:false,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:false,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:true,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/postscript":{source:"iana",compressible:true,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:true},"application/problem+json":{source:"iana",compressible:true},"application/problem+xml":{source:"iana",compressible:true},"application/provenance+xml":{source:"iana",compressible:true,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:false},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:true},"application/pskc+xml":{source:"iana",compressible:true,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:true},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:true,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:true},"application/rdf+xml":{source:"iana",compressible:true,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:true,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:true},"application/resource-lists+xml":{source:"iana",compressible:true,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:true,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:true},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:true},"application/rls-services+xml":{source:"iana",compressible:true,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:true,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:true,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:true,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:true,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:true,extensions:["rss"]},"application/rtf":{source:"iana",compressible:true,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:true},"application/samlmetadata+xml":{source:"iana",compressible:true},"application/sarif+json":{source:"iana",compressible:true},"application/sarif-external-properties+json":{source:"iana",compressible:true},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:true,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:true},"application/scim+json":{source:"iana",compressible:true},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:true},"application/senml+xml":{source:"iana",compressible:true,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:true},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:true},"application/sensml+xml":{source:"iana",compressible:true,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:true},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:true,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:true},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:true,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:true},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:true,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:true},"application/spirits-event+xml":{source:"iana",compressible:true},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:true,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:true,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:true,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:true,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:true},"application/swid+xml":{source:"iana",compressible:true,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:true},"application/taxii+json":{source:"iana",compressible:true},"application/td+json":{source:"iana",compressible:true},"application/tei+xml":{source:"iana",compressible:true,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:true,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:true},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:true,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:true,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:false,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:true},"application/urc-ressheet+xml":{source:"iana",compressible:true,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:true,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:true},"application/vcard+json":{source:"iana",compressible:true},"application/vcard+xml":{source:"iana",compressible:true},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:true,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:true},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:true},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:true},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:true},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:true},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:true},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:true},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:true},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:true},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:true},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:false,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:true,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:true},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:true},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:false,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:true},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:true},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:true},"application/vnd.apple.installer+xml":{source:"iana",compressible:true,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:false,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:true},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:true},"application/vnd.avistar+xml":{source:"iana",compressible:true},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:true,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:true},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:true},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:true},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:true},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:true},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:true,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:true,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:true},"application/vnd.collection.doc+json":{source:"iana",compressible:true},"application/vnd.collection.next+json":{source:"iana",compressible:true},"application/vnd.comicbook+zip":{source:"iana",compressible:false},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:true},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:true,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:true},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:true},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:true},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:true},"application/vnd.cyclonedx+xml":{source:"iana",compressible:true},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:false},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:true,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:true},"application/vnd.dataresource+json":{source:"iana",compressible:true},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:true,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:true},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:true},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:true},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:true},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:true},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:true},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:true},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:true},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:false},"application/vnd.eszigno3+xml":{source:"iana",compressible:true,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:true},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:false},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:false},"application/vnd.etsi.cug+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:true},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:true},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:true},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:true},"application/vnd.etsi.sci+xml":{source:"iana",compressible:true},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:true},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:true},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:true},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:false},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:false},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:false},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:true},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:true},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:true},"application/vnd.geo+json":{source:"iana",compressible:true},"application/vnd.geocube+xml":{source:"iana",compressible:true},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:false,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:false,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:false,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:true,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:false,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:true},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:false},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:true},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:true},"application/vnd.hal+xml":{source:"iana",compressible:true,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:true,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:true},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:true},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:true},"application/vnd.hyper-item+json":{source:"iana",compressible:true},"application/vnd.hyperdrive+json":{source:"iana",compressible:true},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:false},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:false},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:true},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:true},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:true},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:true},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:true,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:false},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:true},"application/vnd.las.las+xml":{source:"iana",compressible:true,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:true},"application/vnd.liberty-request+xml":{source:"iana",compressible:true},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:true,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:false},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:true},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:false},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:true},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:true},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:true,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:false,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:true,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:true},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:true},"application/vnd.ms-outlook":{compressible:false,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:true},"application/vnd.ms-powerpoint":{source:"iana",compressible:false,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:true},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:true},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:true},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:false,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:true},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:true},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:true},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:true},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:true},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:true},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:true,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:true},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:false,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:false,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:false,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:false,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:true},"application/vnd.oftn.l10n+json":{source:"iana",compressible:true},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:true},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:true},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:true},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:true},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:true},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:true},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:true},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:true},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:true},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:true},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:true,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:true},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:true},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:true},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:true},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:true},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:true},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:true,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:true,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:false,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:false,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:false,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:true},"application/vnd.oracle.resource+json":{source:"iana",compressible:true},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:true},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:true},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:true},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:true},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:true},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:true,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:true},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:true,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:true},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:true},"application/vnd.shopkick+json":{source:"iana",compressible:true},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:true},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:true,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:true,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:true,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:true},"application/vnd.syft+json":{source:"iana",compressible:true},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:true},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:true},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:true},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:true,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:true},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:true},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:true},"application/vnd.wv.ssp+xml":{source:"iana",compressible:true},"application/vnd.xacml+json":{source:"iana",compressible:true},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:true},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:true,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:true,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:true,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:true},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:true,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:true,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:true},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:true,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:true,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:false,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:false,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:false,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:false,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:false,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:false},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:true,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:true,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:true,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:false,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:true,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:false,extensions:["jnlp"]},"application/x-javascript":{compressible:true},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:false,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:false},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:true,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:false,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:false,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:true,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:false,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:false,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:true,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:true,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:true,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:true,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:true,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:false,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:true,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:true,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:true,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:true,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:true},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:true,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:false,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:true},"application/xaml+xml":{source:"apache",compressible:true,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:true,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:true,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:true,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:true,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:true},"application/xcap-ns+xml":{source:"iana",compressible:true,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:true},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:true},"application/xenc+xml":{source:"iana",compressible:true,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:true,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:true},"application/xliff+xml":{source:"iana",compressible:true,extensions:["xlf"]},"application/xml":{source:"iana",compressible:true,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:true,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:true},"application/xmpp+xml":{source:"iana",compressible:true},"application/xop+xml":{source:"iana",compressible:true,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:true,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:true,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:true,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:true,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:true},"application/yang-data+xml":{source:"iana",compressible:true},"application/yang-patch+json":{source:"iana",compressible:true},"application/yang-patch+xml":{source:"iana",compressible:true},"application/yin+xml":{source:"iana",compressible:true,extensions:["yin"]},"application/zip":{source:"iana",compressible:false,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:false,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:false,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:false},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:false,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:false,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:false,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:false,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:false},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:false},"audio/vorbis":{source:"iana",compressible:false},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:false,extensions:["wav"]},"audio/wave":{compressible:false,extensions:["wav"]},"audio/webm":{source:"apache",compressible:false,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:false,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:false,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:true,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:true,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:false,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:false,extensions:["avif"]},"image/bmp":{source:"iana",compressible:true,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:false,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:false,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:false,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:false,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:false,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:false},"image/png":{source:"iana",compressible:false,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:true,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:false,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:true,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:true,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:true,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:true,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:true,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:false},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:false},"message/imdn+xml":{source:"iana",compressible:true},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:false},"message/rfc822":{source:"iana",compressible:true,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:true,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:true,extensions:["glb"]},"model/iges":{source:"iana",compressible:false,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:false,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:true,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:false,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:false,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:true,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:true},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:false,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:false,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:false,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:false,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:true,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:false},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:false},"multipart/form-data":{source:"iana",compressible:false},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:false},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:false},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:true,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:true},"text/cmd":{compressible:true},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:true,extensions:["css"]},"text/csv":{source:"iana",compressible:true,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:true,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:true},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:true,extensions:["jsx"]},"text/less":{compressible:true,extensions:["less"]},"text/markdown":{source:"iana",compressible:true,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:true,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:true,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:true,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:true,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:true,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:true,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:true,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:true,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:true,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:true},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:true},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:true,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:true,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:true,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:true,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:true,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:true,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:false,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:false,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:false,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:false,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:false,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:false,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:false,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:false,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:true},"x-shader/x-vertex":{compressible:true}};});var Au=Y((oj,Tu)=>{Tu.exports=_u();});var Cu=Y(ae=>{var Qa=Au(),Aw=me("path").extname,Eu=/^\s*([^;\s]*)(?:;|\s|$)/,Ew=/^text\//i;ae.charset=Pu;ae.charsets={lookup:Pu};ae.contentType=Pw;ae.extension=Cw;ae.extensions=Object.create(null);ae.lookup=Iw;ae.types=Object.create(null);jw(ae.extensions,ae.types);function Pu(i){if(!i||typeof i!="string")return false;var a=Eu.exec(i),e=a&&Qa[a[1].toLowerCase()];return e&&e.charset?e.charset:a&&Ew.test(a[1])?"UTF-8":false}function Pw(i){if(!i||typeof i!="string")return false;var a=i.indexOf("/")===-1?ae.lookup(i):i;if(!a)return false;if(a.indexOf("charset")===-1){var e=ae.charset(a);e&&(a+="; charset="+e.toLowerCase());}return a}function Cw(i){if(!i||typeof i!="string")return false;var a=Eu.exec(i),e=a&&ae.extensions[a[1].toLowerCase()];return !e||!e.length?false:e[0]}function Iw(i){if(!i||typeof i!="string")return false;var a=Aw("x."+i).toLowerCase().substr(1);return a&&ae.types[a]||false}function jw(i,a){var e=["nginx","apache",void 0,"iana"];Object.keys(Qa).forEach(function(t){var n=Qa[t],c=n.extensions;if(!(!c||!c.length)){i[t]=c;for(var m=0;m<c.length;m++){var u=c[m];if(a[u]){var g=e.indexOf(Qa[a[u]].source),R=e.indexOf(n.source);if(a[u]!=="application/octet-stream"&&(g>R||g===R&&a[u].substr(0,12)==="application/"))continue}a[u]=t;}}});}});var ju=Y((tj,Iu)=>{Iu.exports=Uw;function Uw(i){var a=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;a?a(i):setTimeout(i,0);}});var Cn=Y((ij,Du)=>{var Uu=ju();Du.exports=Dw;function Dw(i){var a=false;return Uu(function(){a=true;}),function(o,t){a?i(o,t):Uu(function(){i(o,t);});}}});var In=Y((nj,Nu)=>{Nu.exports=Nw;function Nw(i){Object.keys(i.jobs).forEach(Mw.bind(i)),i.jobs={};}function Mw(i){typeof this.jobs[i]=="function"&&this.jobs[i]();}});var jn=Y((sj,Fu)=>{var Mu=Cn(),Fw=In();Fu.exports=Ow;function Ow(i,a,e,o){var t=e.keyedList?e.keyedList[e.index]:e.index;e.jobs[t]=Ww(a,t,i[t],function(n,c){t in e.jobs&&(delete e.jobs[t],n?Fw(e):e.results[t]=c,o(n,e.results));});}function Ww(i,a,e,o){var t;return i.length==2?t=i(e,Mu(o)):t=i(e,a,Mu(o)),t}});var Un=Y((pj,Ou)=>{Ou.exports=Bw;function Bw(i,a){var e=!Array.isArray(i),o={index:0,keyedList:e||a?Object.keys(i):null,jobs:{},results:e?{}:[],size:e?Object.keys(i).length:i.length};return a&&o.keyedList.sort(e?a:function(t,n){return a(i[t],i[n])}),o}});var Dn=Y((cj,Wu)=>{var Lw=In(),Vw=Cn();Wu.exports=Hw;function Hw(i){Object.keys(this.jobs).length&&(this.index=this.size,Lw(this),Vw(i)(null,this.results));}});var Lu=Y((lj,Bu)=>{var Jw=jn(),Kw=Un(),Xw=Dn();Bu.exports=Gw;function Gw(i,a,e){for(var o=Kw(i);o.index<(o.keyedList||i).length;)Jw(i,a,o,function(t,n){if(t){e(t,n);return}if(Object.keys(o.jobs).length===0){e(null,o.results);return}}),o.index++;return Xw.bind(o,e)}});var Nn=Y((mj,Ya)=>{var Vu=jn(),$w=Un(),Qw=Dn();Ya.exports=Yw;Ya.exports.ascending=Hu;Ya.exports.descending=Zw;function Yw(i,a,e,o){var t=$w(i,e);return Vu(i,a,t,function n(c,m){if(c){o(c,m);return}if(t.index++,t.index<(t.keyedList||i).length){Vu(i,a,t,n);return}o(null,t.results);}),Qw.bind(t,o)}function Hu(i,a){return i<a?-1:i>a?1:0}function Zw(i,a){return -1*Hu(i,a)}});var Ku=Y((dj,Ju)=>{var qw=Nn();Ju.exports=eb;function eb(i,a,e){return qw(i,a,null,e)}});var Gu=Y((uj,Xu)=>{Xu.exports={parallel:Lu(),serial:Ku(),serialOrdered:Nn()};});var Qu=Y((gj,$u)=>{$u.exports=function(i,a){return Object.keys(a).forEach(function(e){i[e]=i[e]||a[e];}),i};});var Zu=Y((fj,Yu)=>{var Wn=Su(),rb=me("util"),Mn=me("path"),ob=me("http"),ab=me("https"),tb=me("url").parse,ib=me("fs"),nb=me("stream").Stream,Fn=Cu(),sb=Gu(),On=Qu();Yu.exports=P;rb.inherits(P,Wn);function P(i){if(!(this instanceof P))return new P(i);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Wn.call(this),i=i||{};for(var a in i)this[a]=i[a];}P.LINE_BREAK=`\r
|
|
2
|
-
`;P.DEFAULT_CONTENT_TYPE="application/octet-stream";P.prototype.append=function(i,a,e){e=e||{},typeof e=="string"&&(e={filename:e});var o=Wn.prototype.append.bind(this);if(typeof a=="number"&&(a=""+a),Array.isArray(a)){this._error(new Error("Arrays are not supported."));return}var t=this._multiPartHeader(i,a,e),n=this._multiPartFooter();o(t),o(a),o(n),this._trackLength(t,a,e);};P.prototype._trackLength=function(i,a,e){var o=0;e.knownLength!=null?o+=+e.knownLength:Buffer.isBuffer(a)?o=a.length:typeof a=="string"&&(o=Buffer.byteLength(a)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(i)+P.LINE_BREAK.length,!(!a||!a.path&&!(a.readable&&a.hasOwnProperty("httpVersion"))&&!(a instanceof nb))&&(e.knownLength||this._valuesToMeasure.push(a));};P.prototype._lengthRetriever=function(i,a){i.hasOwnProperty("fd")?i.end!=null&&i.end!=1/0&&i.start!=null?a(null,i.end+1-(i.start?i.start:0)):ib.stat(i.path,function(e,o){var t;if(e){a(e);return}t=o.size-(i.start?i.start:0),a(null,t);}):i.hasOwnProperty("httpVersion")?a(null,+i.headers["content-length"]):i.hasOwnProperty("httpModule")?(i.on("response",function(e){i.pause(),a(null,+e.headers["content-length"]);}),i.resume()):a("Unknown stream");};P.prototype._multiPartHeader=function(i,a,e){if(typeof e.header=="string")return e.header;var o=this._getContentDisposition(a,e),t=this._getContentType(a,e),n="",c={"Content-Disposition":["form-data",'name="'+i+'"'].concat(o||[]),"Content-Type":[].concat(t||[])};typeof e.header=="object"&&On(c,e.header);var m;for(var u in c)c.hasOwnProperty(u)&&(m=c[u],m!=null&&(Array.isArray(m)||(m=[m]),m.length&&(n+=u+": "+m.join("; ")+P.LINE_BREAK)));return "--"+this.getBoundary()+P.LINE_BREAK+n+P.LINE_BREAK};P.prototype._getContentDisposition=function(i,a){var e,o;return typeof a.filepath=="string"?e=Mn.normalize(a.filepath).replace(/\\/g,"/"):a.filename||i.name||i.path?e=Mn.basename(a.filename||i.name||i.path):i.readable&&i.hasOwnProperty("httpVersion")&&(e=Mn.basename(i.client._httpMessage.path||"")),e&&(o='filename="'+e+'"'),o};P.prototype._getContentType=function(i,a){var e=a.contentType;return !e&&i.name&&(e=Fn.lookup(i.name)),!e&&i.path&&(e=Fn.lookup(i.path)),!e&&i.readable&&i.hasOwnProperty("httpVersion")&&(e=i.headers["content-type"]),!e&&(a.filepath||a.filename)&&(e=Fn.lookup(a.filepath||a.filename)),!e&&typeof i=="object"&&(e=P.DEFAULT_CONTENT_TYPE),e};P.prototype._multiPartFooter=function(){return function(i){var a=P.LINE_BREAK,e=this._streams.length===0;e&&(a+=this._lastBoundary()),i(a);}.bind(this)};P.prototype._lastBoundary=function(){return "--"+this.getBoundary()+"--"+P.LINE_BREAK};P.prototype.getHeaders=function(i){var a,e={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(a in i)i.hasOwnProperty(a)&&(e[a.toLowerCase()]=i[a]);return e};P.prototype.setBoundary=function(i){this._boundary=i;};P.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};P.prototype.getBuffer=function(){for(var i=new Buffer.alloc(0),a=this.getBoundary(),e=0,o=this._streams.length;e<o;e++)typeof this._streams[e]!="function"&&(Buffer.isBuffer(this._streams[e])?i=Buffer.concat([i,this._streams[e]]):i=Buffer.concat([i,Buffer.from(this._streams[e])]),(typeof this._streams[e]!="string"||this._streams[e].substring(2,a.length+2)!==a)&&(i=Buffer.concat([i,Buffer.from(P.LINE_BREAK)])));return Buffer.concat([i,Buffer.from(this._lastBoundary())])};P.prototype._generateBoundary=function(){for(var i="--------------------------",a=0;a<24;a++)i+=Math.floor(Math.random()*10).toString(16);this._boundary=i;};P.prototype.getLengthSync=function(){var i=this._overheadLength+this._valueLength;return this._streams.length&&(i+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),i};P.prototype.hasKnownLength=function(){var i=true;return this._valuesToMeasure.length&&(i=false),i};P.prototype.getLength=function(i){var a=this._overheadLength+this._valueLength;if(this._streams.length&&(a+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(i.bind(this,null,a));return}sb.parallel(this._valuesToMeasure,this._lengthRetriever,function(e,o){if(e){i(e);return}o.forEach(function(t){a+=t;}),i(null,a);});};P.prototype.submit=function(i,a){var e,o,t={method:"post"};return typeof i=="string"?(i=tb(i),o=On({port:i.port,path:i.pathname,host:i.hostname,protocol:i.protocol},t)):(o=On(i,t),o.port||(o.port=o.protocol=="https:"?443:80)),o.headers=this.getHeaders(i.headers),o.protocol=="https:"?e=ab.request(o):e=ob.request(o),this.getLength(function(n,c){if(n&&n!=="Unknown stream"){this._error(n);return}if(c&&e.setHeader("Content-Length",c),this.pipe(e),a){var m,u=function(g,R){return e.removeListener("error",u),e.removeListener("response",m),a.call(this,g,R)};m=u.bind(this,null),e.on("error",u),e.on("response",m);}}.bind(this)),e};P.prototype._error=function(i){this.error||(this.error=i,this.pause(),this.emit("error",i));};P.prototype.toString=function(){return "[object FormData]"};});var If={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};function Na(i,a=i){return ansiEscapes.link(a,i)}var k=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),Pd=i=>{k.settings.minLevel=If[i];},jf=()=>{k.settings.minLevel=100;};Pd(process.env.OPIK_LOG_LEVEL||"INFO");var Df="~/.opik.config",mn={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false};function Id(i){return Object.fromEntries(Object.entries(i).filter(([,a])=>a!==void 0))}function Nf(){return Id({apiKey:process.env.OPIK_API_KEY,apiUrl:process.env.OPIK_URL_OVERRIDE,projectName:process.env.OPIK_PROJECT_NAME,workspaceName:process.env.OPIK_WORKSPACE,batchDelayMs:process.env.OPIK_BATCH_DELAY_MS?Number(process.env.OPIK_BATCH_DELAY_MS):void 0,holdUntilFlush:process.env.OPIK_HOLD_UNTIL_FLUSH===void 0?void 0:["1","true","yes"].includes(String(process.env.OPIK_HOLD_UNTIL_FLUSH).toLowerCase())})}function Mf(){let i=process.env.OPIK_CONFIG_PATH||Df;if(!Cd__default.default.existsSync(i)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${i}`);return {}}try{let a=Uf__default.default.parse(Cd__default.default.readFileSync(i,"utf8"));return a.opik?Id({apiKey:a.opik.api_key,apiUrl:a.opik.url_override,projectName:a.opik.project_name,workspaceName:a.opik.workspace}):{}}catch(a){return k.error(`Error loading config file ${i}: ${a}`),{}}}function jd(i){let a=Nf(),e=Mf(),{headers:o,...t}=i||{};return Ff({...mn,...e,...a,...t})}function Ff(i){if(!i.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");let a=Of(i.apiUrl);if(a&&!i.apiKey)throw new Error("OPIK_API_KEY is not set");if(a&&!i.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return i}function Of(i){return new URL(i).hostname.endsWith("comet.com")}var K={};E(K,{AlertAlertType:()=>Wf,AlertPublicAlertType:()=>Gf,AlertTriggerConfigPublicType:()=>Kf,AlertTriggerConfigType:()=>Lf,AlertTriggerConfigWriteType:()=>Vf,AlertTriggerEventType:()=>Bf,AlertTriggerPublicEventType:()=>Xf,AlertTriggerWriteEventType:()=>Hf,AlertWriteAlertType:()=>Jf,AnnotationQueuePublicScope:()=>Zf,AnnotationQueueScope:()=>Qf,AnnotationQueueWriteScope:()=>Yf,AssistantMessageRole:()=>mh,AttachmentListRequestEntityType:()=>Dd,BadRequestError:()=>_,CheckName:()=>Ih,CheckPublicName:()=>uw,CheckPublicResult:()=>gw,CheckResult:()=>jh,ColumnCompareTypesItem:()=>Rh,ColumnPublicTypesItem:()=>Eh,ColumnTypesItem:()=>Ph,CompleteMultipartUploadRequestEntityType:()=>qf,ConflictError:()=>F,DatasetItemCompareSource:()=>yh,DatasetItemFilterOperator:()=>uh,DatasetItemPublicSource:()=>Th,DatasetItemSource:()=>hh,DatasetItemWriteSource:()=>_n,DatasetPublicStatus:()=>_h,DatasetPublicVisibility:()=>Sh,DatasetStatus:()=>fh,DatasetUpdateVisibility:()=>Wd,DatasetVisibility:()=>gh,DatasetWriteVisibility:()=>Od,DeleteAttachmentsRequestEntityType:()=>eh,DownloadAttachmentRequestEntityType:()=>Nd,ExperimentItemCompareTraceVisibilityMode:()=>kh,ExperimentItemPublicTraceVisibilityMode:()=>Ah,ExperimentItemTraceVisibilityMode:()=>wh,ExperimentPublicStatus:()=>Oh,ExperimentPublicType:()=>Fh,ExperimentStatus:()=>Ch,ExperimentType:()=>Tn,ExperimentUpdateStatus:()=>Hd,ExperimentUpdateType:()=>Vd,ExperimentWriteStatus:()=>Ld,ExperimentWriteType:()=>Bd,FeedbackScoreBatchItemSource:()=>mw,FeedbackScoreBatchItemThreadSource:()=>ww,FeedbackScoreCompareSource:()=>vh,FeedbackScoreExperimentItemBulkWriteViewSource:()=>Dh,FeedbackScorePublicSource:()=>pw,FeedbackScoreSource:()=>bh,FindFeedbackDefinitionsRequestType:()=>Jd,FindFeedbackScoreNames1RequestType:()=>eu,ForbiddenError:()=>Z,GetSpanStatsRequestType:()=>ru,GetSpansByProjectRequestType:()=>qd,GetWebhookExamplesRequestAlertType:()=>Ud,GuardrailName:()=>Wh,GuardrailResult:()=>Bh,GuardrailWriteName:()=>Lh,GuardrailWriteResult:()=>Vh,LlmAsJudgeMessagePublicRole:()=>sh,LlmAsJudgeMessageRole:()=>rh,LlmAsJudgeMessageWriteRole:()=>th,LlmAsJudgeOutputSchemaPublicType:()=>ph,LlmAsJudgeOutputSchemaType:()=>oh,LlmAsJudgeOutputSchemaWriteType:()=>ih,LogItemLevel:()=>lh,ManualEvaluationRequestEntityType:()=>Kh,NotFoundError:()=>T,NotImplementedError:()=>br,OptimizationPublicStatus:()=>$h,OptimizationStatus:()=>Xh,OptimizationUpdateStatus:()=>Xd,OptimizationWriteStatus:()=>Gh,ProjectDetailedVisibility:()=>rw,ProjectMetricRequestPublicInterval:()=>Yd,ProjectMetricRequestPublicMetricType:()=>Qd,ProjectMetricResponsePublicInterval:()=>qh,ProjectMetricResponsePublicMetricType:()=>Zh,ProjectPublicVisibility:()=>Yh,ProjectUpdateVisibility:()=>$d,ProjectVisibility:()=>Qh,ProjectWriteVisibility:()=>Gd,PromptType:()=>ow,PromptVersionDetailType:()=>tw,PromptVersionPublicType:()=>iw,PromptVersionType:()=>aw,PromptWriteType:()=>Zd,ProviderApiKeyProvider:()=>Jh,ProviderApiKeyPublicProvider:()=>Hh,ProviderApiKeyWriteProvider:()=>Kd,ResponseFormatType:()=>dh,SpanExperimentItemBulkWriteViewType:()=>Nh,SpanFilterPublicOperator:()=>dw,SpanPublicType:()=>cw,SpanSearchStreamRequestPublicType:()=>ou,SpanType:()=>ye,SpanUpdateType:()=>nw,SpanWriteType:()=>sw,StartMultipartUploadRequestEntityType:()=>Md,TraceFilterOperator:()=>ah,TraceFilterPublicOperator:()=>ch,TraceFilterWriteOperator:()=>nh,TracePublicVisibilityMode:()=>fw,TraceThreadFilterOperator:()=>bw,TraceThreadFilterPublicOperator:()=>ew,TraceThreadStatus:()=>hw,TraceVisibilityMode:()=>Uh,UnauthorizedError:()=>$,UnprocessableEntityError:()=>B,UploadAttachmentRequestEntityType:()=>Fd,ValueEntryCompareSource:()=>zh,ValueEntryExperimentItemBulkWriteViewSource:()=>Mh,ValueEntryPublicSource:()=>lw,ValueEntrySource:()=>xh,WebhookTestResultStatus:()=>$f,alerts:()=>Ma,annotationQueues:()=>un,attachments:()=>Fa,automationRuleEvaluators:()=>fn,chatCompletions:()=>hn,check:()=>gn,dashboards:()=>wn,datasets:()=>Oa,experiments:()=>Wa,feedbackDefinitions:()=>Ba,guardrails:()=>bn,llmProviderKey:()=>La,manualEvaluation:()=>xn,openTelemetryIngestion:()=>Rn,optimizations:()=>Va,projects:()=>Ha,prompts:()=>Ja,redirect:()=>Sn,serviceToggles:()=>yn,spans:()=>Ka,systemUsage:()=>dn,traces:()=>kn,welcomeWizard:()=>vn,workspaces:()=>zn});var Ma={};E(Ma,{GetWebhookExamplesRequestAlertType:()=>Ud});var Ud={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Fa={};E(Fa,{AttachmentListRequestEntityType:()=>Dd,DownloadAttachmentRequestEntityType:()=>Nd,StartMultipartUploadRequestEntityType:()=>Md,UploadAttachmentRequestEntityType:()=>Fd});var Dd={Trace:"trace",Span:"span"};var Nd={Trace:"trace",Span:"span"};var Md={Trace:"trace",Span:"span"};var Fd={Trace:"trace",Span:"span"};var Oa={};E(Oa,{DatasetUpdateVisibility:()=>Wd,DatasetWriteVisibility:()=>Od});var Od={Private:"private",Public:"public"};var Wd={Private:"private",Public:"public"};var Wa={};E(Wa,{ExperimentUpdateStatus:()=>Hd,ExperimentUpdateType:()=>Vd,ExperimentWriteStatus:()=>Ld,ExperimentWriteType:()=>Bd});var Bd={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Ld={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Vd={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Hd={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Ba={};E(Ba,{FindFeedbackDefinitionsRequestType:()=>Jd});var Jd={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};var La={};E(La,{ProviderApiKeyWriteProvider:()=>Kd});var Kd={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Va={};E(Va,{OptimizationUpdateStatus:()=>Xd});var Xd={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Ha={};E(Ha,{ProjectMetricRequestPublicInterval:()=>Yd,ProjectMetricRequestPublicMetricType:()=>Qd,ProjectUpdateVisibility:()=>$d,ProjectWriteVisibility:()=>Gd});var Gd={Private:"private",Public:"public"};var $d={Private:"private",Public:"public"};var Qd={FeedbackScores:"FEEDBACK_SCORES",TraceCount:"TRACE_COUNT",TokenUsage:"TOKEN_USAGE",Duration:"DURATION",Cost:"COST",GuardrailsFailedCount:"GUARDRAILS_FAILED_COUNT",ThreadCount:"THREAD_COUNT",ThreadDuration:"THREAD_DURATION",ThreadFeedbackScores:"THREAD_FEEDBACK_SCORES"};var Yd={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var Ja={};E(Ja,{PromptWriteType:()=>Zd});var Zd={Mustache:"mustache",Jinja2:"jinja2"};var Ka={};E(Ka,{FindFeedbackScoreNames1RequestType:()=>eu,GetSpanStatsRequestType:()=>ru,GetSpansByProjectRequestType:()=>qd,SpanSearchStreamRequestPublicType:()=>ou});var qd={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var eu={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var ru={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var ou={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var dn={};var un={};var gn={};var fn={};var hn={};var wn={};var bn={};var xn={};var Rn={};var yn={};var kn={};var vn={};var zn={};var Sn={};var Wf={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Bf={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var Lf={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Vf={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Hf={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var Jf={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Kf={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Xf={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var Gf={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var $f={Success:"success",Failure:"failure"};var Qf={Trace:"trace",Thread:"thread"};var Yf={Trace:"trace",Thread:"thread"};var Zf={Trace:"trace",Thread:"thread"};var qf={Trace:"trace",Span:"span"};var eh={Trace:"trace",Span:"span"};var rh={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var oh={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var ah={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var th={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var ih={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var nh={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var sh={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var ph={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var ch={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var lh={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};var mh={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};var dh={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};var uh={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var gh={Private:"private",Public:"public"};var fh={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var hh={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var wh={Default:"default",Hidden:"hidden"};var bh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var xh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var _n={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Rh={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var yh={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var kh={Default:"default",Hidden:"hidden"};var vh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var zh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Sh={Private:"private",Public:"public"};var _h={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Th={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Ah={Default:"default",Hidden:"hidden"};var Eh={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Ph={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Tn={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Ch={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Ih={Topic:"TOPIC",Pii:"PII"};var jh={Passed:"passed",Failed:"failed"};var ye={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Uh={Default:"default",Hidden:"hidden"};var Dh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Nh={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Mh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Fh={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Oh={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Wh={Topic:"TOPIC",Pii:"PII"};var Bh={Passed:"passed",Failed:"failed"};var Lh={Topic:"TOPIC",Pii:"PII"};var Vh={Passed:"passed",Failed:"failed"};var Hh={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Jh={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Kh={Trace:"trace",Thread:"thread"};var Xh={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Gh={Running:"running",Completed:"completed",Cancelled:"cancelled"};var $h={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Qh={Private:"private",Public:"public"};var Yh={Private:"private",Public:"public"};var Zh={FeedbackScores:"FEEDBACK_SCORES",TraceCount:"TRACE_COUNT",TokenUsage:"TOKEN_USAGE",Duration:"DURATION",Cost:"COST",GuardrailsFailedCount:"GUARDRAILS_FAILED_COUNT",ThreadCount:"THREAD_COUNT",ThreadDuration:"THREAD_DURATION",ThreadFeedbackScores:"THREAD_FEEDBACK_SCORES"};var qh={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var ew={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var rw={Private:"private",Public:"public"};var ow={Mustache:"mustache",Jinja2:"jinja2"};var aw={Mustache:"mustache",Jinja2:"jinja2"};var tw={Mustache:"mustache",Jinja2:"jinja2"};var iw={Mustache:"mustache",Jinja2:"jinja2"};var nw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var sw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var pw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var cw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var lw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var mw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var dw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var uw={Topic:"TOPIC",Pii:"PII"};var gw={Passed:"passed",Failed:"failed"};var fw={Default:"default",Hidden:"hidden"};var hw={Active:"active",Inactive:"inactive"};var ww={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var bw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Pe=(i,a,e)=>JSON.stringify(i,a,e);var p=class i extends Error{constructor({message:a,statusCode:e,body:o,rawResponse:t}){super(xw({message:a,statusCode:e,body:o})),Object.setPrototypeOf(this,i.prototype),this.statusCode=e,this.body=o,this.rawResponse=t;}};function xw({message:i,statusCode:a,body:e}){let o=[];return i!=null&&o.push(i),a!=null&&o.push(`Status code: ${a.toString()}`),e!=null&&o.push(`Body: ${Pe(e,void 0,2)}`),o.join(`
|
|
3
|
-
`)}var f=class i extends Error{constructor(a){super(a),Object.setPrototypeOf(this,i.prototype);}};var _=class i extends p{constructor(a,e){super({message:"BadRequestError",statusCode:400,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var F=class i extends p{constructor(a,e){super({message:"ConflictError",statusCode:409,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var B=class i extends p{constructor(a,e){super({message:"UnprocessableEntityError",statusCode:422,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var T=class i extends p{constructor(a,e){super({message:"NotFoundError",statusCode:404,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var $=class i extends p{constructor(a,e){super({message:"UnauthorizedError",statusCode:401,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var Z=class i extends p{constructor(a,e){super({message:"ForbiddenError",statusCode:403,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var br=class i extends p{constructor(a,e){super({message:"NotImplementedError",statusCode:501,body:a,rawResponse:e}),Object.setPrototypeOf(this,i.prototype);}};var w={Default:"http://localhost:5173/api"};var xr;typeof globalThis.Headers!="undefined"?xr=globalThis.Headers:xr=class au{constructor(a){if(this.headers=new Map,a)if(a instanceof au)a.forEach((e,o)=>this.append(o,e));else if(Array.isArray(a))for(let[e,o]of a)if(typeof e=="string"&&typeof o=="string")this.append(e,o);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[e,o]of Object.entries(a))if(typeof o=="string")this.append(e,o);else throw new TypeError("Header values must be strings")}append(a,e){let o=a.toLowerCase(),t=this.headers.get(o)||[];this.headers.set(o,[...t,e]);}delete(a){let e=a.toLowerCase();this.headers.delete(e);}get(a){let e=a.toLowerCase(),o=this.headers.get(e);return o?o.join(", "):null}has(a){let e=a.toLowerCase();return this.headers.has(e)}set(a,e){let o=a.toLowerCase();this.headers.set(o,[e]);}forEach(a,e){let o=e?a.bind(e):a;this.headers.forEach((t,n)=>o(t.join(", "),n,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[a,e]of this.headers.entries())yield [a,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let a of this.headers.values())yield a.join(", ");}[Symbol.iterator](){return this.entries()}};var Xa={headers:new xr,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},Ga={headers:new xr,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};function $a(i){return {headers:i.headers,redirected:i.redirected,status:i.status,statusText:i.statusText,type:i.type,url:i.url}}function tu(i,a){return Object.keys(a!=null?a:{}).length>0?`${i}?${Rw__default.default.stringify(a,{arrayFormat:"repeat"})}`:i}var d=yw();function yw(){var u,g,R,y,v;return typeof window!="undefined"&&typeof window.document!="undefined"?{type:"browser",version:window.navigator.userAgent}:typeof globalThis!="undefined"&&((u=globalThis==null?void 0:globalThis.navigator)==null?void 0:u.userAgent)==="Cloudflare-Workers"?{type:"workerd"}:typeof EdgeRuntime=="string"?{type:"edge-runtime"}:typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((g=self.constructor)==null?void 0:g.name)==="DedicatedWorkerGlobalScope"||((R=self.constructor)==null?void 0:R.name)==="ServiceWorkerGlobalScope"||((y=self.constructor)==null?void 0:y.name)==="SharedWorkerGlobalScope")?{type:"web-worker"}:typeof Deno!="undefined"&&typeof Deno.version!="undefined"&&typeof Deno.version.deno!="undefined"?{type:"deno",version:Deno.version.deno}:typeof Bun!="undefined"&&typeof Bun.version!="undefined"?{type:"bun",version:Bun.version}:typeof process!="undefined"&&"version"in process&&!!process.version&&"versions"in process&&!!((v=process.versions)!=null&&v.node)?{type:"node",version:process.versions.node,parsedVersion:Number(process.versions.node.split(".")[0])}:typeof navigator!="undefined"&&(navigator==null?void 0:navigator.product)==="ReactNative"?{type:"react-native"}:{type:"unknown"}}async function iu(){return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?fetch:d.type==="node"?(await import('node-fetch')).default:typeof fetch=="function"?fetch:(await import('node-fetch')).default}async function nu({body:i,type:a}){return a.includes("json")?Pe(i):i}async function uu(i){return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?new(await Promise.resolve().then(()=>(pu(),su))).Node18UniversalStreamWrapper(i):d.type!=="node"&&typeof fetch=="function"?new(await Promise.resolve().then(()=>(lu(),cu))).UndiciStreamWrapper(i):new(await Promise.resolve().then(()=>(du(),mu))).NodePre18StreamWrapper(i)}async function gu(i,a){if(i.body!=null&&a==="blob")return await i.blob();if(i.body!=null&&a==="arrayBuffer")return await i.arrayBuffer();if(i.body!=null&&a==="sse")return i.body;if(i.body!=null&&a==="streaming")return uu(i.body);if(i.body!=null&&a==="text")return await i.text();{let e=await i.text();if(e.length>0)try{return JSON.parse(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:i.status,rawBody:e}}}else return}}var kw="timeout";function fu(i){let a=new AbortController,e=setTimeout(()=>a.abort(kw),i);return {signal:a.signal,abortId:e}}function hu(...i){let a=i.length===1&&Array.isArray(i[0])?i[0]:i,e=new AbortController;for(let o of a){if(o.aborted){e.abort(o==null?void 0:o.reason);break}o.addEventListener("abort",()=>e.abort(o==null?void 0:o.reason),{signal:e.signal});}return e.signal}var wu=async(i,a,e,o,t,n,c,m,u)=>{let g=[],R;if(n!=null){let{signal:z,abortId:S}=fu(n);R=S,g.push(z);}c!=null&&g.push(c);let y=hu(g),v=await i(a,{method:e,headers:o,body:t,signal:y,credentials:m?"include":void 0,duplex:u});return R!=null&&clearTimeout(R),v};function vw(i){let a=1+(Math.random()*2-1)*.2;return i*a}async function bu(i,a=2){let e=await i();for(let o=0;o<a&&([408,429].includes(e.status)||e.status>=500);++o){let t=Math.min(1e3*Math.pow(2,o),6e4),n=vw(t);await new Promise(c=>setTimeout(c,n)),e=await i();}return e}async function zw(i){let a={};if(i.body!==void 0&&i.contentType!=null&&(a["Content-Type"]=i.contentType),i.headers!=null)for(let[n,c]of Object.entries(i.headers))c!=null&&(a[n]=c);let e=tu(i.url,i.queryParameters),o=await nu({body:i.body,type:i.requestType==="json"?"json":"other"}),t=await iu();try{let n=await bu(async()=>wu(t,e,i.method,a,o,i.timeoutMs,i.abortSignal,i.withCredentials,i.duplex),i.maxRetries),c=await gu(n,i.responseType);return n.status>=200&&n.status<400?{ok:!0,body:c,headers:n.headers,rawResponse:$a(n)}:{ok:!1,error:{reason:"status-code",statusCode:n.status,body:c},rawResponse:$a(n)}}catch(n){return i.abortSignal!=null&&i.abortSignal.aborted?{ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:Xa}:n instanceof Error&&n.name==="AbortError"?{ok:false,error:{reason:"timeout"},rawResponse:Xa}:n instanceof Error?{ok:false,error:{reason:"unknown",errorMessage:n.message},rawResponse:Ga}:{ok:false,error:{reason:"unknown",errorMessage:Pe(n)},rawResponse:Ga}}}var b=zw;var s={get:async i=>typeof i=="function"?i():i};var h=class i extends Promise{constructor(a){super(e=>{e(void 0);}),this.innerPromise=a;}static fromFunction(a,...e){return new i(a(...e))}static interceptFunction(a){return (...e)=>i.fromPromise(a(...e))}static fromPromise(a){return new i(a)}static fromExecutor(a){let e=new Promise(a);return new i(e)}static fromResult(a){let e=Promise.resolve(a);return new i(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:a})=>a)),this.unwrappedPromise}then(a,e){return this.unwrap().then(a,e)}catch(a){return this.unwrap().catch(a)}finally(a){return this.unwrap().finally(a)}async withRawResponse(){return await this.innerPromise}};function Hn(i){return typeof i=="object"&&i!=null&&"name"in i}function Jn(i){return typeof i=="object"&&i!=null&&"path"in i}function Kn(i){let a=i.lastIndexOf("/"),e=i.lastIndexOf("\\"),o=Math.max(a,e);return o>=0?i.substring(o+1):i}async function qu(){let i;return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?i=new Bn:d.type==="node"?i=new Ln:i=new Vn,await i.setup(),i}var Bn=class{async setup(){this.fd=new(await import('formdata-node')).FormData;}append(a,e){var o;(o=this.fd)==null||o.append(a,e);}getFileName(a,e){if(e!=null)return e;if(Hn(a))return a.name;if(Jn(a)&&a.path)return Kn(a.path.toString())}async appendFile(a,e,o){var t,n;o=this.getFileName(e,o),e instanceof Blob?(t=this.fd)==null||t.append(a,e,o):(n=this.fd)==null||n.append(a,{type:void 0,name:o,[Symbol.toStringTag]:"File",stream(){return e}});}async getRequest(){let a=new(await import('form-data-encoder')).FormDataEncoder(this.fd);return {body:(await import('readable-stream')).Readable.from(a),headers:a.headers,duplex:"half"}}},Ln=class{async setup(){this.fd=new(await Promise.resolve().then(()=>_f(Zu()))).default;}append(a,e){var o;(o=this.fd)==null||o.append(a,e);}getFileName(a,e){if(e!=null)return e;if(Hn(a))return a.name;if(Jn(a)&&a.path)return Kn(a.path.toString())}async appendFile(a,e,o){var n,c;o=this.getFileName(e,o);let t;e instanceof Blob?t=Buffer.from(await e.arrayBuffer()):t=e,o==null?(n=this.fd)==null||n.append(a,t):(c=this.fd)==null||c.append(a,t,{filename:o});}getRequest(){return {body:this.fd,headers:this.fd?this.fd.getHeaders():{}}}},Vn=class{async setup(){this.fd=new FormData;}append(a,e){var o;(o=this.fd)==null||o.append(a,e);}getFileName(a,e){if(e!=null)return e;if(Hn(a))return a.name;if(Jn(a)&&a.path)return Kn(a.path.toString())}async appendFile(a,e,o){var t,n;if(o=this.getFileName(e,o),e instanceof Blob){(t=this.fd)==null||t.append(a,e,o);return}(n=this.fd)==null||n.append(a,new Blob([e]),o);}getRequest(){return {body:this.fd,headers:{}}}};var r={};E(r,{JsonError:()=>qe,ParseError:()=>er,any:()=>gg,bigint:()=>rg,boolean:()=>fg,booleanLiteral:()=>ug,date:()=>og,discriminant:()=>zg,enum_:()=>qa,getObjectLikeUtils:()=>he,getObjectUtils:()=>We,getSchemaUtils:()=>U,isProperty:()=>Ie,lazy:()=>ag,lazyObject:()=>lg,list:()=>rt,number:()=>hg,object:()=>et,objectWithoutOptionalProperties:()=>cg,optional:()=>Xn,property:()=>ig,record:()=>Rg,set:()=>yg,string:()=>wg,stringLiteral:()=>dg,transform:()=>Gn,undiscriminatedUnion:()=>vg,union:()=>_g,unknown:()=>bg,withParsedProperties:()=>Qn});var A={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"};function j(i,a){return `Expected ${a}. Received ${pb(i)}.`}function pb(i){if(Array.isArray(i))return "list";if(i===null)return "null";if(i instanceof BigInt)return "BigInt";switch(typeof i){case "string":return `"${i}"`;case "bigint":case "number":case "boolean":case "undefined":return `${i}`}return typeof i}function Q(i){return {...i,json:eg(i.json),parse:eg(i.parse)}}function eg(i){return (a,e)=>{let o=i(a,e),{skipValidation:t=false}=e!=null?e:{};return !o.ok&&t?(console.warn(["Failed to validate.",...o.errors.map(n=>" - "+(n.path.length>0?`${n.path.join(".")}: ${n.message}`:n.message))].join(`
|
|
4
|
-
`)),{ok:true,value:a}):o}}function Za(i){return i.path.length===0?i.message:`${i.path.join(" -> ")}: ${i.message}`}var qe=class i extends Error{constructor(e){super(e.map(Za).join("; "));this.errors=e;Object.setPrototypeOf(this,i.prototype);}};var er=class i extends Error{constructor(e){super(e.map(Za).join("; "));this.errors=e;Object.setPrototypeOf(this,i.prototype);}};function U(i){return {nullable:()=>cb(i),optional:()=>Xn(i),optionalNullable:()=>lb(i),transform:a=>Gn(i,a),parseOrThrow:(a,e)=>{let o=i.parse(a,e);if(o.ok)return o.value;throw new er(o.errors)},jsonOrThrow:(a,e)=>{let o=i.json(a,e);if(o.ok)return o.value;throw new qe(o.errors)}}}function cb(i){let a={parse:(e,o)=>e==null?{ok:true,value:null}:i.parse(e,o),json:(e,o)=>e==null?{ok:true,value:null}:i.json(e,o),getType:()=>A.NULLABLE};return {...a,...U(a)}}function Xn(i){let a={parse:(e,o)=>e==null?{ok:true,value:void 0}:i.parse(e,o),json:(e,o)=>o!=null&&o.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:i.json(e,o),getType:()=>A.OPTIONAL};return {...a,...U(a)}}function lb(i){let a={parse:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:i.parse(e,o),json:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:i.json(e,o),getType:()=>A.OPTIONAL_NULLABLE};return {...a,...U(a)}}function Gn(i,a){let e={parse:(o,t)=>{let n=i.parse(o,t);return n.ok?{ok:true,value:a.transform(n.value)}:n},json:(o,t)=>{let n=a.untransform(o);return i.json(n,t)},getType:()=>i.getType()};return {...e,...U(e)}}function rg(){let i={parse:(a,{breadcrumbsPrefix:e=[]}={})=>typeof a=="bigint"?{ok:true,value:a}:typeof a=="number"?{ok:true,value:BigInt(a)}:{ok:false,errors:[{path:e,message:j(a,"bigint | number")}]},json:(a,{breadcrumbsPrefix:e=[]}={})=>typeof a!="bigint"?{ok:false,errors:[{path:e,message:j(a,"bigint")}]}:{ok:true,value:a},getType:()=>A.BIGINT};return {...Q(i),...U(i)}}var mb=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;function og(){let i={parse:(a,{breadcrumbsPrefix:e=[]}={})=>typeof a!="string"?{ok:false,errors:[{path:e,message:j(a,"string")}]}:mb.test(a)?{ok:true,value:new Date(a)}:{ok:false,errors:[{path:e,message:j(a,"ISO 8601 date string")}]},json:(a,{breadcrumbsPrefix:e=[]}={})=>a instanceof Date?{ok:true,value:a.toISOString()}:{ok:false,errors:[{path:e,message:j(a,"Date object")}]},getType:()=>A.DATE};return {...Q(i),...U(i)}}function q(i,a){return ()=>{let e={parse:a,json:a,getType:()=>i};return {...Q(e),...U(e)}}}function qa(i){let a=new Set(i);return q(A.ENUM,(o,{allowUnrecognizedEnumValues:t,breadcrumbsPrefix:n=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:n,message:j(o,"string")}]}:!a.has(o)&&!t?{ok:false,errors:[{path:n,message:j(o,"enum")}]}:{ok:true,value:o})()}function ag(i){let a=$n(i);return {...a,...U(a)}}function $n(i){return {parse:(a,e)=>rr(i).parse(a,e),json:(a,e)=>rr(i).json(a,e),getType:()=>rr(i).getType()}}function rr(i){let a=i;return a.__zurg_memoized==null&&(a.__zurg_memoized=i()),a.__zurg_memoized}function Rr(i){return Object.entries(i)}function yr(i,a){let e=new Set(a);return Object.entries(i).reduce((o,[t,n])=>(e.has(t)&&(o[t]=n),o),{})}function Ce(i){if(typeof i!="object"||i===null)return false;if(Object.getPrototypeOf(i)===null)return true;let a=i;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(i)===a}function kr(i){return Object.keys(i)}function tg(i,a){let e=[],o=[];for(let t of i)a(t)?e.push(t):o.push(t);return [e,o]}function he(i){return {withParsedProperties:a=>Qn(i,a)}}function Qn(i,a){let e={parse:(o,t)=>{let n=i.parse(o,t);if(!n.ok)return n;let c=Object.entries(a).reduce((m,[u,g])=>({...m,[u]:typeof g=="function"?g(n.value):g}),{});return {ok:true,value:{...n.value,...c}}},json:(o,t)=>{var m;if(!Ce(o))return {ok:false,errors:[{path:(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],message:j(o,"object")}]};let n=new Set(Object.keys(a)),c=yr(o,Object.keys(o).filter(u=>!n.has(u)));return i.json(c,t)},getType:()=>i.getType()};return {...e,...U(e),...he(e)}}function ig(i,a){return {rawKey:i,valueSchema:a,isProperty:true}}function Ie(i){return i.isProperty}function et(i){let a={_getRawProperties:()=>Object.entries(i).map(([e,o])=>Ie(o)?o.rawKey:e),_getParsedProperties:()=>kr(i),parse:(e,o)=>{let t={},n=[];for(let[c,m]of Rr(i)){let u=Ie(m)?m.rawKey:c,g=Ie(m)?m.valueSchema:m,R={rawKey:u,parsedKey:c,valueSchema:g};t[u]=R,pg(g)&&n.push(u);}return ng({value:e,requiredKeys:n,getProperty:c=>{let m=t[c];if(m!=null)return {transformedKey:m.parsedKey,transform:u=>{var g;return m.valueSchema.parse(u,{...o,breadcrumbsPrefix:[...(g=o==null?void 0:o.breadcrumbsPrefix)!=null?g:[],c]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},json:(e,o)=>{let t=[];for(let[n,c]of Rr(i)){let m=Ie(c)?c.valueSchema:c;pg(m)&&t.push(n);}return ng({value:e,requiredKeys:t,getProperty:n=>{let c=i[n];if(c!=null)return Ie(c)?{transformedKey:c.rawKey,transform:m=>{var u;return c.valueSchema.json(m,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}:{transformedKey:n,transform:m=>{var u;return c.json(m,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},getType:()=>A.OBJECT};return {...Q(a),...U(a),...he(a),...We(a)}}function ng({value:i,requiredKeys:a,getProperty:e,unrecognizedObjectKeys:o="fail",skipValidation:t=false,breadcrumbsPrefix:n=[]}){if(!Ce(i))return {ok:false,errors:[{path:n,message:j(i,"object")}]};let c=new Set(a),m=[],u={};for(let[g,R]of Object.entries(i)){let y=e(g);if(y!=null){c.delete(g);let v=y.transform(R);v.ok?u[y.transformedKey]=v.value:(u[g]=R,m.push(...v.errors));}else switch(o){case "fail":m.push({path:[...n,g],message:`Unexpected key "${g}"`});break;case "strip":break;case "passthrough":u[g]=R;break}}return m.push(...a.filter(g=>c.has(g)).map(g=>({path:n,message:`Missing required key "${g}"`}))),m.length===0||t?{ok:true,value:u}:{ok:false,errors:m}}function We(i){return {extend:a=>{let e={_getParsedProperties:()=>[...i._getParsedProperties(),...a._getParsedProperties()],_getRawProperties:()=>[...i._getRawProperties(),...a._getRawProperties()],parse:(o,t)=>sg({extensionKeys:a._getRawProperties(),value:o,transformBase:n=>i.parse(n,t),transformExtension:n=>a.parse(n,t)}),json:(o,t)=>sg({extensionKeys:a._getParsedProperties(),value:o,transformBase:n=>i.json(n,t),transformExtension:n=>a.json(n,t)}),getType:()=>A.OBJECT};return {...e,...U(e),...he(e),...We(e)}},passthrough:()=>{let a={_getParsedProperties:()=>i._getParsedProperties(),_getRawProperties:()=>i._getRawProperties(),parse:(e,o)=>{let t=i.parse(e,{...o,unrecognizedObjectKeys:"passthrough"});return t.ok?{ok:true,value:{...e,...t.value}}:t},json:(e,o)=>{let t=i.json(e,{...o,unrecognizedObjectKeys:"passthrough"});return t.ok?{ok:true,value:{...e,...t.value}}:t},getType:()=>A.OBJECT};return {...a,...U(a),...he(a),...We(a)}}}}function sg({extensionKeys:i,value:a,transformBase:e,transformExtension:o}){let t=new Set(i),[n,c]=tg(kr(a),g=>t.has(g)),m=e(yr(a,c)),u=o(yr(a,n));return m.ok&&u.ok?{ok:true,value:{...m.value,...u.value}}:{ok:false,errors:[...m.ok?[]:m.errors,...u.ok?[]:u.errors]}}function pg(i){return !db(i)}function db(i){switch(i.getType()){case A.ANY:case A.UNKNOWN:case A.OPTIONAL:case A.OPTIONAL_NULLABLE:return true;default:return false}}function cg(i){return et(i)}function lg(i){let a={...$n(i),_getRawProperties:()=>rr(i)._getRawProperties(),_getParsedProperties:()=>rr(i)._getParsedProperties()};return {...a,...U(a),...he(a),...We(a)}}function rt(i){let a={parse:(e,o)=>mg(e,(t,n)=>{var c;return i.parse(t,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),json:(e,o)=>mg(e,(t,n)=>{var c;return i.json(t,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),getType:()=>A.LIST};return {...Q(a),...U(a)}}function mg(i,a){return Array.isArray(i)?i.map((o,t)=>a(o,t)).reduce((o,t)=>{if(o.ok&&t.ok)return {ok:true,value:[...o.value,t.value]};let n=[];return o.ok||n.push(...o.errors),t.ok||n.push(...t.errors),{ok:false,errors:n}},{ok:true,value:[]}):{ok:false,errors:[{message:j(i,"list"),path:[]}]}}function dg(i){return q(A.STRING_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===i?{ok:true,value:i}:{ok:false,errors:[{path:o,message:j(e,`"${i}"`)}]})()}function ug(i){return q(A.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===i?{ok:true,value:i}:{ok:false,errors:[{path:o,message:j(e,`${i.toString()}`)}]})()}var gg=q(A.ANY,i=>({ok:true,value:i}));var fg=q(A.BOOLEAN,(i,{breadcrumbsPrefix:a=[]}={})=>typeof i=="boolean"?{ok:true,value:i}:{ok:false,errors:[{path:a,message:j(i,"boolean")}]});var hg=q(A.NUMBER,(i,{breadcrumbsPrefix:a=[]}={})=>typeof i=="number"?{ok:true,value:i}:{ok:false,errors:[{path:a,message:j(i,"number")}]});var wg=q(A.STRING,(i,{breadcrumbsPrefix:a=[]}={})=>typeof i=="string"?{ok:true,value:i}:{ok:false,errors:[{path:a,message:j(i,"string")}]});var bg=q(A.UNKNOWN,i=>({ok:true,value:i}));function Rg(i,a){let e={parse:(o,t)=>xg({value:o,isKeyNumeric:i.getType()===A.NUMBER,transformKey:n=>{var c;return i.parse(n,{...t,breadcrumbsPrefix:[...(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return a.parse(n,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix}),json:(o,t)=>xg({value:o,isKeyNumeric:i.getType()===A.NUMBER,transformKey:n=>{var c;return i.json(n,{...t,breadcrumbsPrefix:[...(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return a.json(n,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix}),getType:()=>A.RECORD};return {...Q(e),...U(e)}}function xg({value:i,isKeyNumeric:a,transformKey:e,transformValue:o,breadcrumbsPrefix:t=[]}){return Ce(i)?Rr(i).reduce((n,[c,m])=>{if(m===void 0)return n;let u=n,g=c;if(a){let z=c.length>0?Number(c):NaN;isNaN(z)||(g=z);}let R=e(g),y=o(m,g);if(u.ok&&R.ok&&y.ok)return {ok:true,value:{...u.value,[R.value]:y.value}};let v=[];return u.ok||v.push(...u.errors),R.ok||v.push(...R.errors),y.ok||v.push(...y.errors),{ok:false,errors:v}},{ok:true,value:{}}):{ok:false,errors:[{path:t,message:j(i,"object")}]}}function yg(i){let a=rt(i),e={parse:(o,t)=>{let n=a.parse(o,t);return n.ok?{ok:true,value:new Set(n.value)}:n},json:(o,t)=>{var c;return o instanceof Set?a.json([...o],t):{ok:false,errors:[{path:(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],message:j(o,"Set")}]}},getType:()=>A.SET};return {...Q(e),...U(e)}}function vg(i){let a={parse:(e,o)=>kg((t,n)=>t.parse(e,n),i,o),json:(e,o)=>kg((t,n)=>t.json(e,n),i,o),getType:()=>A.UNDISCRIMINATED_UNION};return {...Q(a),...U(a)}}function kg(i,a,e){let o=[];for(let[t,n]of a.entries()){let c=i(n,{...e,skipValidation:false});if(c.ok)return c;for(let m of c.errors)o.push({path:m.path,message:`[Variant ${t}] ${m.message}`});}return {ok:false,errors:o}}function zg(i,a){return {parsedDiscriminant:i,rawDiscriminant:a}}function _g(i,a){let e=typeof i=="string"?i:i.rawDiscriminant,o=typeof i=="string"?i:i.parsedDiscriminant,t=qa(kr(a)),n={parse:(c,m)=>Sg({value:c,discriminant:e,transformedDiscriminant:o,transformDiscriminantValue:u=>{var g;return t.parse(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],e]})},getAdditionalPropertiesSchema:u=>a[u],allowUnrecognizedUnionMembers:m==null?void 0:m.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.parse(u,m),breadcrumbsPrefix:m==null?void 0:m.breadcrumbsPrefix}),json:(c,m)=>Sg({value:c,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:u=>{var g;return t.json(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],o]})},getAdditionalPropertiesSchema:u=>a[u],allowUnrecognizedUnionMembers:m==null?void 0:m.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.json(u,m),breadcrumbsPrefix:m==null?void 0:m.breadcrumbsPrefix}),getType:()=>A.UNION};return {...Q(n),...U(n),...he(n)}}function Sg({value:i,discriminant:a,transformedDiscriminant:e,transformDiscriminantValue:o,getAdditionalPropertiesSchema:t,allowUnrecognizedUnionMembers:n=false,transformAdditionalProperties:c,breadcrumbsPrefix:m=[]}){if(!Ce(i))return {ok:false,errors:[{path:m,message:j(i,"object")}]};let{[a]:u,...g}=i;if(u==null)return {ok:false,errors:[{path:m,message:`Missing discriminant ("${a}")`}]};let R=o(u);if(!R.ok)return {ok:false,errors:R.errors};let y=t(R.value);if(y==null)return n?{ok:true,value:{[e]:R.value,...g}}:{ok:false,errors:[{path:[...m,a],message:"Unexpected discriminant value"}]};let v=c(g,y);return v.ok?{ok:true,value:{[e]:u,...v.value}}:v}function ub(i){var a=[];if(i.length===0)return "";if(typeof i[0]!="string")throw new TypeError("Url must be a string. Received "+i[0]);if(i[0].match(/^[^/:]+:\/*$/)&&i.length>1){var e=i.shift();i[0]=e+i[0];}i[0].match(/^file:\/\/\//)?i[0]=i[0].replace(/^([^/:]+):\/*/,"$1:///"):i[0]=i[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<i.length;o++){var t=i[o];if(typeof t!="string")throw new TypeError("Url must be a string. Received "+t);t!==""&&(o>0&&(t=t.replace(/^[\/]+/,"")),o<i.length-1?t=t.replace(/[\/]+$/,""):t=t.replace(/[\/]+$/,"/"),a.push(t));}var n=a.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");var c=n.split("?");return n=c.shift()+(c.length>0?"?":"")+c.join("&"),n}function x(){var i;return typeof arguments[0]=="object"?i=arguments[0]:i=[].slice.call(arguments),ub(i)}var C={};E(C,{AggregationData:()=>vl,Alert:()=>xb,AlertAlertType:()=>Vs,AlertPagePublic:()=>sp,AlertPublic:()=>jo,AlertPublicAlertType:()=>rp,AlertTrigger:()=>Gs,AlertTriggerConfig:()=>Xs,AlertTriggerConfigPublic:()=>ip,AlertTriggerConfigPublicType:()=>tp,AlertTriggerConfigType:()=>Ks,AlertTriggerConfigWrite:()=>Qs,AlertTriggerConfigWriteType:()=>$s,AlertTriggerEventType:()=>Js,AlertTriggerPublic:()=>np,AlertTriggerPublicEventType:()=>ap,AlertTriggerWrite:()=>Zs,AlertTriggerWriteEventType:()=>Ys,AlertWrite:()=>Io,AlertWriteAlertType:()=>qs,AnnotationQueue:()=>up,AnnotationQueueBatch:()=>yb,AnnotationQueueBatchWrite:()=>zo,AnnotationQueueItemIds:()=>Vt,AnnotationQueuePagePublic:()=>hp,AnnotationQueuePublic:()=>Uo,AnnotationQueuePublicScope:()=>gp,AnnotationQueueReviewer:()=>dp,AnnotationQueueReviewerPublic:()=>fp,AnnotationQueueScope:()=>mp,AnnotationQueueUpdate:()=>So,AnnotationQueueWrite:()=>vo,AnnotationQueueWriteScope:()=>As,AssistantMessage:()=>bc,AssistantMessageRole:()=>wc,Attachment:()=>wp,AttachmentListRequestEntityType:()=>tt,AttachmentPage:()=>bp,AuthDetailsHolder:()=>vp,AutomationRuleEvaluator:()=>vb,AutomationRuleEvaluatorLlmAsJudge:()=>Cp,AutomationRuleEvaluatorLlmAsJudgePublic:()=>$o,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>Bp,AutomationRuleEvaluatorObjectPublic:()=>nc,AutomationRuleEvaluatorPagePublic:()=>sc,AutomationRuleEvaluatorPublic:()=>pc,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>jp,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>Yo,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>Vp,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>Up,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>Zo,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>Jp,AutomationRuleEvaluatorUpdate:()=>hc,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>dc,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>gc,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>fc,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>uc,AutomationRuleEvaluatorUserDefinedMetricPython:()=>Ip,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>Qo,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>Xp,AutomationRuleEvaluatorWrite:()=>Qp,AvgValueStatPublic:()=>Jc,BatchDelete:()=>L,BatchDeleteByProject:()=>Vb,BiInformation:()=>Fs,BiInformationResponse:()=>ir,BooleanFeedbackDefinition:()=>Al,BooleanFeedbackDefinitionCreate:()=>Dl,BooleanFeedbackDefinitionPublic:()=>sa,BooleanFeedbackDefinitionUpdate:()=>Yl,BooleanFeedbackDetail:()=>Tl,BooleanFeedbackDetailCreate:()=>Ul,BooleanFeedbackDetailPublic:()=>Ll,BooleanFeedbackDetailUpdate:()=>Ql,CategoricalFeedbackDefinition:()=>Pl,CategoricalFeedbackDefinitionCreate:()=>Ml,CategoricalFeedbackDefinitionPublic:()=>pa,CategoricalFeedbackDefinitionUpdate:()=>ql,CategoricalFeedbackDetail:()=>El,CategoricalFeedbackDetailCreate:()=>Nl,CategoricalFeedbackDetailPublic:()=>Vl,CategoricalFeedbackDetailUpdate:()=>Zl,ChatCompletionChoice:()=>Rc,ChatCompletionRequest:()=>To,ChatCompletionResponse:()=>zc,Check:()=>ml,CheckName:()=>cl,CheckPublic:()=>Ym,CheckPublicName:()=>$m,CheckPublicResult:()=>Qm,CheckResult:()=>ll,ChunkedOutputJsonNode:()=>Tb,ChunkedOutputJsonNodePublic:()=>Cb,ChunkedOutputJsonNodePublicType:()=>_l,ChunkedOutputJsonNodeType:()=>tl,Column:()=>ol,ColumnCompare:()=>Cc,ColumnCompareTypesItem:()=>Pc,ColumnPublic:()=>qc,ColumnPublicTypesItem:()=>Zc,ColumnTypesItem:()=>rl,Comment:()=>H,CommentCompare:()=>Ic,CommentPublic:()=>Ke,CompleteMultipartUploadRequest:()=>Ht,CompleteMultipartUploadRequestEntityType:()=>xp,CompletionTokensDetails:()=>kc,CountValueStatPublic:()=>Kc,CreateDatasetItemsFromSpansRequest:()=>Ar,CreateDatasetItemsFromTracesRequest:()=>Er,CreatePromptVersionDetail:()=>ro,DashboardPagePublic:()=>Sc,DashboardPublic:()=>He,DashboardUpdatePublic:()=>Eo,DashboardWrite:()=>Ao,DataPointDouble:()=>Hb,DataPointNumberPublic:()=>Rm,Dataset:()=>zb,DatasetExpansion:()=>_b,DatasetExpansionResponse:()=>Ec,DatasetExpansionWrite:()=>jr,DatasetIdentifier:()=>Cr,DatasetIdentifierPublic:()=>Ur,DatasetItem:()=>ea,DatasetItemBatch:()=>Sb,DatasetItemBatchUpdate:()=>zr,DatasetItemBatchWrite:()=>Tr,DatasetItemCompare:()=>Wc,DatasetItemCompareSource:()=>jc,DatasetItemFilter:()=>Zn,DatasetItemFilterOperator:()=>Yn,DatasetItemPageCompare:()=>Bc,DatasetItemPagePublic:()=>el,DatasetItemPublic:()=>aa,DatasetItemPublicSource:()=>Qc,DatasetItemSource:()=>Ac,DatasetItemStreamRequest:()=>Dr,DatasetItemUpdate:()=>qn,DatasetItemWrite:()=>_r,DatasetItemWriteSource:()=>es,DatasetItemsDelete:()=>Ir,DatasetPagePublic:()=>Hc,DatasetPublic:()=>nr,DatasetPublicStatus:()=>Vc,DatasetPublicVisibility:()=>Lc,DatasetStatus:()=>Tc,DatasetUpdate:()=>Pr,DatasetUpdateVisibility:()=>lt,DatasetVersionCreatePublic:()=>Mr,DatasetVersionPagePublic:()=>nl,DatasetVersionPublic:()=>il,DatasetVersionTag:()=>Nr,DatasetVisibility:()=>_c,DatasetWrite:()=>Sr,DatasetWriteVisibility:()=>ct,DeleteAttachmentsRequest:()=>kb,DeleteAttachmentsRequestEntityType:()=>yp,DeleteFeedbackScore:()=>ga,DeleteIdsHolder:()=>sr,DeleteThreadFeedbackScores:()=>bo,DeleteTraceThreads:()=>xo,Delta:()=>xc,DownloadAttachmentRequestEntityType:()=>it,ErrorCountWithDeviation:()=>da,ErrorCountWithDeviationDetailed:()=>Tm,ErrorInfo:()=>Se,ErrorInfoExperimentItemBulkWriteView:()=>Lr,ErrorInfoPublic:()=>fa,ErrorInfoWrite:()=>to,ErrorMessage:()=>te,ErrorMessageDetail:()=>Wb,ErrorMessageDetailed:()=>Fb,ErrorMessagePublic:()=>Rb,Experiment:()=>Ab,ExperimentGroupAggregationsResponse:()=>Sl,ExperimentGroupResponse:()=>kl,ExperimentItem:()=>Or,ExperimentItemBulkRecord:()=>fl,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>gs,ExperimentItemBulkUpload:()=>Eb,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Vr,ExperimentItemCompare:()=>Oc,ExperimentItemCompareTraceVisibilityMode:()=>Fc,ExperimentItemPublic:()=>oa,ExperimentItemPublicTraceVisibilityMode:()=>Yc,ExperimentItemStreamRequest:()=>Jr,ExperimentItemTraceVisibilityMode:()=>ns,ExperimentItemsBatch:()=>Wr,ExperimentItemsDelete:()=>Br,ExperimentPagePublic:()=>bl,ExperimentPublic:()=>na,ExperimentPublicStatus:()=>wl,ExperimentPublicType:()=>hl,ExperimentStatus:()=>pl,ExperimentStreamRequestPublic:()=>Kr,ExperimentType:()=>sl,ExperimentUpdate:()=>Hr,ExperimentUpdateStatus:()=>ft,ExperimentUpdateType:()=>gt,ExperimentWrite:()=>Fr,ExperimentWriteStatus:()=>ut,ExperimentWriteType:()=>dt,ExportTraceServiceRequest:()=>Db,Feedback:()=>Ib,FeedbackCreate:()=>Bl,FeedbackDefinitionPagePublic:()=>Xl,FeedbackObjectPublic:()=>Kl,FeedbackPublic:()=>$l,FeedbackScore:()=>ee,FeedbackScoreAverage:()=>pe,FeedbackScoreAverageDetailed:()=>Am,FeedbackScoreAveragePublic:()=>Ve,FeedbackScoreBatch:()=>wa,FeedbackScoreBatchItem:()=>Gm,FeedbackScoreBatchItemSource:()=>Xm,FeedbackScoreBatchItemThread:()=>Ss,FeedbackScoreBatchItemThreadSource:()=>zs,FeedbackScoreBatchThread:()=>Ro,FeedbackScoreCompare:()=>Mc,FeedbackScoreCompareSource:()=>Uc,FeedbackScoreExperimentItemBulkWriteView:()=>us,FeedbackScoreExperimentItemBulkWriteViewSource:()=>ls,FeedbackScoreNames:()=>xm,FeedbackScorePublic:()=>pr,FeedbackScorePublicSource:()=>Lm,FeedbackScoreSource:()=>as,FeedbackUpdate:()=>am,FindFeedbackDefinitionsRequestType:()=>bt,FindFeedbackScoreNames1RequestType:()=>It,Function:()=>_o,FunctionCall:()=>_e,GetSpanStatsRequestType:()=>jt,GetSpansByProjectRequestType:()=>Ct,GetWebhookExamplesRequestAlertType:()=>ot,GroupContent:()=>xl,GroupContentWithAggregations:()=>zl,GroupDetail:()=>Rl,GroupDetails:()=>yl,Guardrail:()=>nm,GuardrailBatch:()=>jb,GuardrailBatchWrite:()=>Po,GuardrailName:()=>tm,GuardrailResult:()=>im,GuardrailWrite:()=>Ms,GuardrailWriteName:()=>Ds,GuardrailWriteResult:()=>Ns,GuardrailsValidation:()=>dl,GuardrailsValidationPublic:()=>Zm,IdsHolder:()=>Pb,ImageUrl:()=>Tp,ImageUrlPublic:()=>Zp,ImageUrlWrite:()=>Np,JsonListString:()=>D,JsonListStringCompare:()=>Qt,JsonListStringExperimentItemBulkWriteView:()=>we,JsonListStringPublic:()=>ce,JsonListStringWrite:()=>se,JsonNode:()=>N,JsonNodeDetail:()=>bs,JsonNodePublic:()=>Te,JsonNodeWrite:()=>Be,JsonSchema:()=>Is,LlmAsJudgeCode:()=>Oo,LlmAsJudgeCodePublic:()=>oc,LlmAsJudgeCodeWrite:()=>Wp,LlmAsJudgeMessage:()=>Mo,LlmAsJudgeMessageContent:()=>Ep,LlmAsJudgeMessageContentPublic:()=>ec,LlmAsJudgeMessageContentWrite:()=>Fp,LlmAsJudgeMessagePublic:()=>Xo,LlmAsJudgeMessagePublicRole:()=>Yp,LlmAsJudgeMessageRole:()=>_p,LlmAsJudgeMessageWrite:()=>Ho,LlmAsJudgeMessageWriteRole:()=>Dp,LlmAsJudgeModelParameters:()=>No,LlmAsJudgeModelParametersPublic:()=>Ko,LlmAsJudgeModelParametersWrite:()=>Vo,LlmAsJudgeOutputSchema:()=>Fo,LlmAsJudgeOutputSchemaPublic:()=>Go,LlmAsJudgeOutputSchemaPublicType:()=>rc,LlmAsJudgeOutputSchemaType:()=>Pp,LlmAsJudgeOutputSchemaWrite:()=>Jo,LlmAsJudgeOutputSchemaWriteType:()=>Op,LogItem:()=>lc,LogItemLevel:()=>cc,LogPage:()=>mc,ManualEvaluationRequest:()=>ei,ManualEvaluationRequestEntityType:()=>lm,ManualEvaluationResponse:()=>qt,Message:()=>Es,MultipartUploadPart:()=>Rp,NumericalFeedbackDefinition:()=>Il,NumericalFeedbackDefinitionCreate:()=>Ol,NumericalFeedbackDefinitionPublic:()=>ca,NumericalFeedbackDefinitionUpdate:()=>rm,NumericalFeedbackDetail:()=>Cl,NumericalFeedbackDetailCreate:()=>Fl,NumericalFeedbackDetailPublic:()=>Hl,NumericalFeedbackDetailUpdate:()=>em,Optimization:()=>Nb,OptimizationPagePublic:()=>gm,OptimizationPublic:()=>ma,OptimizationPublicStatus:()=>um,OptimizationStatus:()=>mm,OptimizationUpdate:()=>$r,OptimizationUpdateStatus:()=>kt,OptimizationWrite:()=>ri,OptimizationWriteStatus:()=>dm,PageColumns:()=>al,PercentageValueStatPublic:()=>Xc,PercentageValues:()=>Ae,PercentageValuesDetailed:()=>Em,PercentageValuesPublic:()=>ra,Project:()=>Mb,ProjectDetailed:()=>Cm,ProjectDetailedVisibility:()=>Pm,ProjectMetricRequestPublic:()=>Zr,ProjectMetricRequestPublicInterval:()=>Tt,ProjectMetricRequestPublicMetricType:()=>_t,ProjectMetricResponsePublic:()=>zm,ProjectMetricResponsePublicInterval:()=>km,ProjectMetricResponsePublicMetricType:()=>ym,ProjectPagePublic:()=>wm,ProjectPublic:()=>ua,ProjectPublicVisibility:()=>hm,ProjectRetrieveDetailed:()=>qr,ProjectStatItemObjectPublic:()=>$c,ProjectStatsPublic:()=>Je,ProjectStatsSummary:()=>_m,ProjectStatsSummaryItem:()=>Sm,ProjectUpdate:()=>Yr,ProjectUpdateVisibility:()=>St,ProjectVisibility:()=>fm,ProjectWrite:()=>Qr,ProjectWriteVisibility:()=>zt,Prompt:()=>Ob,PromptDetail:()=>Dm,PromptPagePublic:()=>Wm,PromptPublic:()=>Om,PromptTokensDetails:()=>yc,PromptType:()=>Im,PromptUpdatable:()=>oo,PromptVersion:()=>Um,PromptVersionDetail:()=>ke,PromptVersionDetailType:()=>xs,PromptVersionLink:()=>Yt,PromptVersionLinkPublic:()=>Zt,PromptVersionLinkWrite:()=>wt,PromptVersionPagePublic:()=>Fm,PromptVersionPublic:()=>Mm,PromptVersionPublicType:()=>Nm,PromptVersionRetrieveDetail:()=>ao,PromptVersionType:()=>jm,PromptWrite:()=>eo,PromptWriteType:()=>Et,ProviderApiKey:()=>Ub,ProviderApiKeyPagePublic:()=>pm,ProviderApiKeyProvider:()=>cm,ProviderApiKeyPublic:()=>la,ProviderApiKeyPublicProvider:()=>sm,ProviderApiKeyUpdate:()=>Gr,ProviderApiKeyWrite:()=>Xr,ProviderApiKeyWriteProvider:()=>Rt,ResponseFormat:()=>js,ResponseFormatType:()=>Cs,Result:()=>Xe,ResultsNumberPublic:()=>vm,ScoreName:()=>bm,ServiceTogglesConfig:()=>Bm,Span:()=>ia,SpanBatch:()=>Bb,SpanBatchUpdate:()=>po,SpanBatchWrite:()=>no,SpanEnrichmentOptions:()=>rs,SpanExperimentItemBulkWriteView:()=>cs,SpanExperimentItemBulkWriteViewType:()=>ps,SpanFilterPublic:()=>vs,SpanFilterPublicOperator:()=>ks,SpanPagePublic:()=>Km,SpanPublic:()=>ha,SpanPublicType:()=>Jm,SpanSearchStreamRequestPublic:()=>co,SpanSearchStreamRequestPublicType:()=>Ut,SpanType:()=>gl,SpanUpdate:()=>so,SpanUpdateType:()=>ys,SpanWrite:()=>io,SpanWriteType:()=>Rs,SpansCountResponse:()=>Ws,StartMultipartUploadRequest:()=>vr,StartMultipartUploadRequestEntityType:()=>nt,StartMultipartUploadResponse:()=>kp,StreamOptions:()=>Ps,Tool:()=>Us,ToolCall:()=>qo,Trace:()=>ta,TraceBatch:()=>Lb,TraceBatchUpdate:()=>go,TraceBatchWrite:()=>mo,TraceCountResponse:()=>Ls,TraceEnrichmentOptions:()=>os,TraceExperimentItemBulkWriteView:()=>ss,TraceFilter:()=>Do,TraceFilterOperator:()=>Sp,TraceFilterPublic:()=>ze,TraceFilterPublicOperator:()=>fs,TraceFilterWrite:()=>$p,TraceFilterWriteOperator:()=>Gp,TracePagePublic:()=>od,TracePublic:()=>ba,TracePublicVisibilityMode:()=>qm,TraceSearchStreamRequestPublic:()=>ko,TraceThread:()=>xa,TraceThreadBatchIdentifier:()=>wo,TraceThreadBatchUpdate:()=>ho,TraceThreadFilter:()=>Ts,TraceThreadFilterOperator:()=>_s,TraceThreadFilterPublic:()=>ws,TraceThreadFilterPublicOperator:()=>hs,TraceThreadIdentifier:()=>oi,TraceThreadLlmAsJudgeCode:()=>Bo,TraceThreadLlmAsJudgeCodePublic:()=>tc,TraceThreadLlmAsJudgeCodeWrite:()=>Lp,TraceThreadPage:()=>rd,TraceThreadSearchStreamRequest:()=>yo,TraceThreadStatus:()=>ed,TraceThreadUpdate:()=>fo,TraceThreadUserDefinedMetricPythonCode:()=>Lo,TraceThreadUserDefinedMetricPythonCodePublic:()=>ic,TraceThreadUserDefinedMetricPythonCodeWrite:()=>Hp,TraceUpdate:()=>uo,TraceVisibilityMode:()=>ul,TraceWrite:()=>lo,UploadAttachmentRequestEntityType:()=>st,Usage:()=>vc,UserDefinedMetricPythonCode:()=>Wo,UserDefinedMetricPythonCodePublic:()=>ac,UserDefinedMetricPythonCodeWrite:()=>Kp,ValueEntry:()=>is,ValueEntryCompare:()=>Nc,ValueEntryCompareSource:()=>Dc,ValueEntryExperimentItemBulkWriteView:()=>ds,ValueEntryExperimentItemBulkWriteViewSource:()=>ms,ValueEntryPublic:()=>Hm,ValueEntryPublicSource:()=>Vm,ValueEntrySource:()=>ts,VideoUrl:()=>Ap,VideoUrlPublic:()=>qp,VideoUrlWrite:()=>Mp,Webhook:()=>Hs,WebhookExamples:()=>pp,WebhookPublic:()=>op,WebhookTestResult:()=>lp,WebhookTestResultStatus:()=>cp,WebhookWrite:()=>ep,WelcomeWizardSubmission:()=>Co,WelcomeWizardTracking:()=>ad,WorkspaceConfiguration:()=>Ra,WorkspaceMetricRequest:()=>Jb,WorkspaceMetricResponse:()=>ai,WorkspaceMetricsSummaryRequest:()=>cr,WorkspaceMetricsSummaryResponse:()=>td,WorkspaceNameHolder:()=>zp,WorkspaceSpansCount:()=>Os,WorkspaceTraceCount:()=>Bs,alerts:()=>at,annotationQueues:()=>Ft,attachments:()=>or,chatCompletions:()=>Ot,dashboards:()=>Wt,datasets:()=>mt,experiments:()=>ar,feedbackDefinitions:()=>xt,guardrails:()=>Bt,llmProviderKey:()=>yt,optimizations:()=>vt,projects:()=>At,prompts:()=>Pt,spans:()=>tr,traces:()=>Le,welcomeWizard:()=>Lt});var at={};E(at,{GetWebhookExamplesRequestAlertType:()=>ot});var ot=r.enum_(["general","slack","pagerduty"]);var or={};E(or,{AttachmentListRequestEntityType:()=>tt,DownloadAttachmentRequestEntityType:()=>it,StartMultipartUploadRequest:()=>vr,StartMultipartUploadRequestEntityType:()=>nt,UploadAttachmentRequestEntityType:()=>st,uploadAttachment:()=>pt});var tt=r.enum_(["trace","span"]);var it=r.enum_(["trace","span"]);var nt=r.enum_(["trace","span"]);var st=r.enum_(["trace","span"]);var pt={};E(pt,{Request:()=>gb});var gb=r.record(r.string(),r.unknown());var vr=r.object({fileName:r.property("file_name",r.string()),numOfFileParts:r.property("num_of_file_parts",r.number()),mimeType:r.property("mime_type",r.string().optional()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",nt),entityId:r.property("entity_id",r.string()),path:r.string()});var mt={};E(mt,{CreateDatasetItemsFromSpansRequest:()=>Ar,CreateDatasetItemsFromTracesRequest:()=>Er,DatasetExpansionWrite:()=>jr,DatasetIdentifier:()=>Cr,DatasetIdentifierPublic:()=>Ur,DatasetItemBatchUpdate:()=>zr,DatasetItemBatchWrite:()=>Tr,DatasetItemStreamRequest:()=>Dr,DatasetItemsDelete:()=>Ir,DatasetUpdate:()=>Pr,DatasetUpdateVisibility:()=>lt,DatasetVersionCreatePublic:()=>Mr,DatasetVersionTag:()=>Nr,DatasetWrite:()=>Sr,DatasetWriteVisibility:()=>ct});var ct=r.enum_(["private","public"]);var lt=r.enum_(["private","public"]);var Yn=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Zn=r.object({field:r.string().optional(),operator:Yn.optional(),key:r.string().optional(),value:r.string().optional()});var N=r.record(r.string(),r.unknown());var qn=r.object({input:r.string().optional(),expectedOutput:r.property("expected_output",r.string().optional()),metadata:N.optional(),data:N.optional(),tags:r.list(r.string()).optional()});var zr=r.object({ids:r.list(r.string()).optional(),filters:r.list(Zn).optional(),update:qn,mergeTags:r.property("merge_tags",r.boolean().optional())});var Sr=r.object({id:r.string().optional(),name:r.string(),visibility:ct.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});var es=r.enum_(["manual","trace","span","sdk"]);var _r=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:es,data:N,tags:r.list(r.string()).optional()});var Tr=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(_r)});var rs=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Ar=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",rs)});var os=r.object({includeSpans:r.boolean().optional(),includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Er=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",os)});var Pr=r.object({name:r.string(),description:r.string().optional(),visibility:lt.optional(),tags:r.list(r.string()).optional()});var Cr=r.object({datasetName:r.property("dataset_name",r.string())});var Ir=r.object({itemIds:r.property("item_ids",r.list(r.string()))});var jr=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional())});var Ur=r.object({datasetName:r.property("dataset_name",r.string())});var Dr=r.object({datasetName:r.property("dataset_name",r.string()),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),steamLimit:r.property("steam_limit",r.number().optional())});var Nr=r.object({tag:r.string()});var Mr=r.object({tag:r.string().optional(),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional()});var ar={};E(ar,{ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Vr,ExperimentItemStreamRequest:()=>Jr,ExperimentItemsBatch:()=>Wr,ExperimentItemsDelete:()=>Br,ExperimentStreamRequestPublic:()=>Kr,ExperimentUpdate:()=>Hr,ExperimentUpdateStatus:()=>ft,ExperimentUpdateType:()=>gt,ExperimentWrite:()=>Fr,ExperimentWriteStatus:()=>ut,ExperimentWriteType:()=>dt,findFeedbackScoreNames:()=>ht});var dt=r.enum_(["regular","trial","mini-batch"]);var ut=r.enum_(["running","completed","cancelled"]);var gt=r.enum_(["regular","trial","mini-batch"]);var ft=r.enum_(["running","completed","cancelled"]);var ht={};E(ht,{Response:()=>fb});var fb=r.list(r.string());var se=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var wt=r.object({id:r.string()});var Fr=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),name:r.string().optional(),metadata:se.optional(),type:dt.optional(),optimizationId:r.property("optimization_id",r.string().optional()),status:ut.optional(),promptVersion:r.property("prompt_version",wt.optional()),promptVersions:r.property("prompt_versions",r.list(wt).optional())});var D=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var as=r.enum_(["ui","sdk","online_scoring"]);var ts=r.enum_(["ui","sdk","online_scoring"]);var is=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:ts.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var ee=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:as,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),is).optional())});var H=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var ns=r.enum_(["default","hidden"]);var Or=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),input:D.optional(),output:D.optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",ns.optional())});var Wr=r.object({experimentItems:r.property("experiment_items",r.list(Or))});var Br=r.object({ids:r.list(r.string())});var we=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var Lr=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var ss=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:we.optional(),output:we.optional(),metadata:we.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Lr.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var ps=r.enum_(["general","tool","llm","guardrail"]);var cs=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:ps.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:we.optional(),output:we.optional(),metadata:we.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Lr.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional())});var ls=r.enum_(["ui","sdk","online_scoring"]);var ms=r.enum_(["ui","sdk","online_scoring"]);var ds=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:ms.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var us=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:ls,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),ds).optional())});var gs=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",we.optional()),trace:ss.optional(),spans:r.list(cs).optional(),feedbackScores:r.property("feedback_scores",r.list(us).optional())});var Vr=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(gs)});var Hr=r.object({name:r.string().optional(),metadata:N.optional(),type:gt.optional(),status:ft.optional()});var Jr=r.object({experimentName:r.property("experiment_name",r.string()),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional()});var Kr=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional())});var xt={};E(xt,{FindFeedbackDefinitionsRequestType:()=>bt});var bt=r.enum_(["numerical","categorical","boolean"]);var yt={};E(yt,{ProviderApiKeyUpdate:()=>Gr,ProviderApiKeyWrite:()=>Xr,ProviderApiKeyWriteProvider:()=>Rt});var Rt=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var Xr=r.object({provider:Rt,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});var Gr=r.object({apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});var vt={};E(vt,{OptimizationUpdate:()=>$r,OptimizationUpdateStatus:()=>kt});var kt=r.enum_(["running","completed","cancelled"]);var $r=r.object({name:r.string().optional(),status:kt.optional()});var At={};E(At,{ProjectMetricRequestPublic:()=>Zr,ProjectMetricRequestPublicInterval:()=>Tt,ProjectMetricRequestPublicMetricType:()=>_t,ProjectRetrieveDetailed:()=>qr,ProjectUpdate:()=>Yr,ProjectUpdateVisibility:()=>St,ProjectWrite:()=>Qr,ProjectWriteVisibility:()=>zt});var zt=r.enum_(["private","public"]);var St=r.enum_(["private","public"]);var _t=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Tt=r.enum_(["HOURLY","DAILY","WEEKLY"]);var Qr=r.object({name:r.string(),visibility:zt.optional(),description:r.string().optional()});var Yr=r.object({name:r.string().optional(),description:r.string().optional(),visibility:St.optional()});var fs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ze=r.object({field:r.string().optional(),operator:fs.optional(),key:r.string().optional(),value:r.string().optional()});var hs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ws=r.object({field:r.string().optional(),operator:hs.optional(),key:r.string().optional(),value:r.string().optional()});var Zr=r.object({metricType:r.property("metric_type",_t.optional()),interval:Tt.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),traceFilters:r.property("trace_filters",r.list(ze).optional()),threadFilters:r.property("thread_filters",r.list(ws).optional())});var qr=r.object({name:r.string()});var Pt={};E(Pt,{CreatePromptVersionDetail:()=>ro,PromptUpdatable:()=>oo,PromptVersionRetrieveDetail:()=>ao,PromptWrite:()=>eo,PromptWriteType:()=>Et});var Et=r.enum_(["mustache","jinja2"]);var Be=r.record(r.string(),r.unknown());var eo=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:Be.optional(),changeDescription:r.property("change_description",r.string().optional()),type:Et.optional(),tags:r.list(r.string()).optional()});var bs=r.record(r.string(),r.unknown());var xs=r.enum_(["mustache","jinja2"]);var ke=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:bs.optional(),type:xs.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var ro=r.object({name:r.string(),version:ke});var oo=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});var ao=r.object({name:r.string(),commit:r.string().optional()});var tr={};E(tr,{FindFeedbackScoreNames1RequestType:()=>It,GetSpanStatsRequestType:()=>jt,GetSpansByProjectRequestType:()=>Ct,SpanBatchUpdate:()=>po,SpanBatchWrite:()=>no,SpanSearchStreamRequestPublic:()=>co,SpanSearchStreamRequestPublicType:()=>Ut,findFeedbackScoreNames1:()=>Dt});var Ct=r.enum_(["general","tool","llm","guardrail"]);var It=r.enum_(["general","tool","llm","guardrail"]);var jt=r.enum_(["general","tool","llm","guardrail"]);var Ut=r.enum_(["general","tool","llm","guardrail"]);var Dt={};E(Dt,{Response:()=>hb});var hb=r.list(r.string());var Rs=r.enum_(["general","tool","llm","guardrail"]);var to=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var io=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Rs.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:se.optional(),output:se.optional(),metadata:se.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",to.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional())});var no=r.object({spans:r.list(io)});var ys=r.enum_(["general","tool","llm","guardrail"]);var Se=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var so=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:ys.optional(),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),errorInfo:r.property("error_info",Se.optional())});var po=r.object({ids:r.list(r.string()),update:so,mergeTags:r.property("merge_tags",r.boolean().optional())});var ks=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var vs=r.object({field:r.string().optional(),operator:ks.optional(),key:r.string().optional(),value:r.string().optional()});var co=r.object({traceId:r.property("trace_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),type:Ut.optional(),filters:r.list(vs).optional(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var Le={};E(Le,{DeleteThreadFeedbackScores:()=>bo,DeleteTraceThreads:()=>xo,FeedbackScoreBatchThread:()=>Ro,TraceBatchUpdate:()=>go,TraceBatchWrite:()=>mo,TraceSearchStreamRequestPublic:()=>ko,TraceThreadBatchIdentifier:()=>wo,TraceThreadBatchUpdate:()=>ho,TraceThreadSearchStreamRequest:()=>yo,findFeedbackScoreNames2:()=>Nt,findTraceThreadsFeedbackScoreNames:()=>Mt});var Nt={};E(Nt,{Response:()=>wb});var wb=r.list(r.string());var Mt={};E(Mt,{Response:()=>bb});var bb=r.list(r.string());var lo=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:se.optional(),output:se.optional(),metadata:se.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",to.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var mo=r.object({traces:r.list(lo)});var uo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Se.optional()),threadId:r.property("thread_id",r.string().optional())});var go=r.object({ids:r.list(r.string()),update:uo,mergeTags:r.property("merge_tags",r.boolean().optional())});var fo=r.object({tags:r.list(r.string()).optional()});var ho=r.object({ids:r.list(r.string()),update:fo,mergeTags:r.property("merge_tags",r.boolean().optional())});var wo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()).optional())});var bo=r.object({projectName:r.property("project_name",r.string()),threadId:r.property("thread_id",r.string()),names:r.list(r.string()),author:r.string().optional()});var xo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()))});var zs=r.enum_(["ui","sdk","online_scoring"]);var Ss=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:zs,author:r.string().optional(),threadId:r.property("thread_id",r.string())});var Ro=r.object({scores:r.list(Ss)});var _s=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ts=r.object({field:r.string().optional(),operator:_s.optional(),key:r.string().optional(),value:r.string().optional()});var yo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Ts).optional(),lastRetrievedThreadModelId:r.property("last_retrieved_thread_model_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var ko=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(ze).optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var Ft={};E(Ft,{AnnotationQueueBatchWrite:()=>zo,AnnotationQueueUpdate:()=>So});var As=r.enum_(["trace","thread"]);var vo=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:As,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var zo=r.object({annotationQueues:r.property("annotation_queues",r.list(vo))});var So=r.object({name:r.string().optional(),description:r.string().optional(),instructions:r.string().optional(),commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var Ot={};E(Ot,{ChatCompletionRequest:()=>To});var Es=r.record(r.string(),r.unknown());var Ps=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});var Cs=r.enum_(["text","json_object","json_schema"]);var Is=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var js=r.object({type:Cs.optional(),jsonSchema:r.property("json_schema",Is.optional())});var _o=r.object({name:r.string().optional(),description:r.string().optional(),strict:r.boolean().optional(),parameters:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var Us=r.object({type:r.stringLiteral("function").optional(),function:_o.optional()});var _e=r.object({name:r.string().optional(),arguments:r.string().optional()});var To=r.object({model:r.string().optional(),messages:r.list(Es).optional(),temperature:r.number().optional(),topP:r.property("top_p",r.number().optional()),n:r.number().optional(),stream:r.boolean().optional(),streamOptions:r.property("stream_options",Ps.optional()),stop:r.list(r.string()).optional(),maxTokens:r.property("max_tokens",r.number().optional()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional()),presencePenalty:r.property("presence_penalty",r.number().optional()),frequencyPenalty:r.property("frequency_penalty",r.number().optional()),logitBias:r.property("logit_bias",r.record(r.string(),r.number()).optional()),user:r.string().optional(),responseFormat:r.property("response_format",js.optional()),seed:r.number().optional(),tools:r.list(Us).optional(),toolChoice:r.property("tool_choice",r.record(r.string(),r.unknown()).optional()),parallelToolCalls:r.property("parallel_tool_calls",r.boolean().optional()),store:r.boolean().optional(),metadata:r.record(r.string(),r.string()).optional(),reasoningEffort:r.property("reasoning_effort",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional()),functions:r.list(_o).optional(),functionCall:r.property("function_call",_e.optional())});var Wt={};E(Wt,{DashboardUpdatePublic:()=>Eo,DashboardWrite:()=>Ao});var Ao=r.object({name:r.string(),description:r.string().optional(),config:Be});var Te=r.record(r.string(),r.unknown());var Eo=r.object({name:r.string().optional(),description:r.string().optional(),config:Te.optional()});var Bt={};E(Bt,{GuardrailBatchWrite:()=>Po});var Ds=r.enum_(["TOPIC","PII"]);var Ns=r.enum_(["passed","failed"]);var Ms=r.object({entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:Ds,result:Ns,config:N,details:N});var Po=r.object({guardrails:r.list(Ms)});var Lt={};E(Lt,{WelcomeWizardSubmission:()=>Co});var Co=r.object({role:r.string().optional(),integrations:r.list(r.string()).optional(),email:r.string().optional(),joinBetaProgram:r.property("join_beta_program",r.boolean().optional())});var Fs=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});var ir=r.object({biInformation:r.property("bi_information",r.list(Fs).optional())});var Os=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});var Ws=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(Os).optional())});var Bs=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});var Ls=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(Bs).optional())});var te=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Vs=r.enum_(["general","slack","pagerduty"]);var Hs=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Js=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var Ks=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var Xs=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:Ks,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Gs=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",Js),triggerConfigs:r.property("trigger_configs",r.list(Xs).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var xb=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",Vs.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:Hs,triggers:r.list(Gs).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var $s=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var Qs=r.object({id:r.string().optional(),type:$s,configValue:r.property("config_value",r.record(r.string(),r.string()).optional())});var Ys=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var Zs=r.object({id:r.string().optional(),eventType:r.property("event_type",Ys),triggerConfigs:r.property("trigger_configs",r.list(Qs).optional())});var qs=r.enum_(["general","slack","pagerduty"]);var ep=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional()});var Io=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",qs.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:ep,triggers:r.list(Zs).optional()});var L=r.object({ids:r.list(r.string())});var rp=r.enum_(["general","slack","pagerduty"]);var op=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var ap=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var tp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var ip=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:tp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var np=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",ap),triggerConfigs:r.property("trigger_configs",r.list(ip).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var jo=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",rp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:op,triggers:r.list(np).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var sp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(jo).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Rb=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var pp=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});var cp=r.enum_(["success","failure"]);var lp=r.object({status:cp.optional(),statusCode:r.property("status_code",r.number().optional()),requestBody:r.property("request_body",r.string().optional()),errorMessage:r.property("error_message",r.string().optional())});var Vt=r.object({ids:r.list(r.string())});var mp=r.enum_(["trace","thread"]);var dp=r.object({username:r.string().optional(),status:r.number().optional()});var pe=r.object({name:r.string(),value:r.number()});var up=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:mp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(dp).optional(),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var yb=r.object({annotationQueues:r.property("annotation_queues",r.list(up))});var gp=r.enum_(["trace","thread"]);var fp=r.object({username:r.string().optional(),status:r.number().optional()});var Ve=r.object({name:r.string(),value:r.number()});var Uo=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:gp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(fp).optional(),feedbackScores:r.property("feedback_scores",r.list(Ve).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var hp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Uo).optional(),sortableBy:r.list(r.string()).optional()});var wp=r.object({link:r.string().optional(),fileName:r.property("file_name",r.string()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string())});var bp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(wp).optional(),sortableBy:r.list(r.string()).optional()});var xp=r.enum_(["trace","span"]);var Rp=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});var Ht=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",xp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string().optional()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string().optional()),uploadId:r.property("upload_id",r.string()),uploadedFileParts:r.property("uploaded_file_parts",r.list(Rp))});var yp=r.enum_(["trace","span"]);var kb=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",yp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});var kp=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});var vp=r.record(r.string(),r.unknown());var zp=r.object({workspaceName:r.property("workspace_name",r.string().optional())});var Sp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Do=r.object({field:r.string().optional(),operator:Sp.optional(),key:r.string().optional(),value:r.string().optional()});var No=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",N.optional())});var _p=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Tp=r.object({url:r.string(),detail:r.string().optional()});var Ap=r.object({url:r.string()});var Ep=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Tp.optional()),videoUrl:r.property("video_url",Ap.optional())});var Mo=r.object({role:_p,content:r.string().optional(),contentArray:r.property("content_array",r.list(Ep).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Pp=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Fo=r.object({name:r.string(),type:Pp,description:r.string()});var Oo=r.object({model:No,messages:r.list(Mo),variables:r.record(r.string(),r.string()),schema:r.list(Fo)});var Cp=r.object({code:Oo.optional()});var Wo=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Ip=r.object({code:Wo.optional()});var Bo=r.object({model:No,messages:r.list(Mo),schema:r.list(Fo)});var jp=r.object({code:Bo.optional()});var Lo=r.object({metric:r.string()});var Up=r.object({code:Lo.optional()});var Jt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(Do).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),vb=r.union("type",{llm_as_judge:Cp.extend(Jt),user_defined_metric_python:Ip.extend(Jt),trace_thread_llm_as_judge:jp.extend(Jt),trace_thread_user_defined_metric_python:Up.extend(Jt)}).transform({transform:i=>i,untransform:i=>i});var Vo=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Be.optional())});var Dp=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Np=r.object({url:r.string(),detail:r.string().optional()});var Mp=r.object({url:r.string()});var Fp=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Np.optional()),videoUrl:r.property("video_url",Mp.optional())});var Ho=r.object({role:Dp,content:r.string().optional(),contentArray:r.property("content_array",r.list(Fp).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Op=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Jo=r.object({name:r.string(),type:Op,description:r.string()});var Wp=r.object({model:Vo,messages:r.list(Ho),variables:r.record(r.string(),r.string()),schema:r.list(Jo)});var Bp=r.object({code:Wp.optional()});var Lp=r.object({model:Vo,messages:r.list(Ho),schema:r.list(Jo)});var Vp=r.object({code:Lp.optional()});var Hp=r.object({metric:r.string()});var Jp=r.object({code:Hp.optional()});var Kp=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Xp=r.object({code:Kp.optional()});var Gp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var $p=r.object({field:r.string().optional(),operator:Gp.optional(),key:r.string().optional(),value:r.string().optional()});var Kt=r.object({projectId:r.property("project_id",r.string()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list($p).optional(),action:r.stringLiteral("evaluator")}),Qp=r.union("type",{llm_as_judge:Bp.extend(Kt),user_defined_metric_python:Xp.extend(Kt),trace_thread_llm_as_judge:Vp.extend(Kt),trace_thread_user_defined_metric_python:Jp.extend(Kt)}).transform({transform:i=>i,untransform:i=>i});var Ko=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Te.optional())});var Yp=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Zp=r.object({url:r.string(),detail:r.string().optional()});var qp=r.object({url:r.string()});var ec=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Zp.optional()),videoUrl:r.property("video_url",qp.optional())});var Xo=r.object({role:Yp,content:r.string().optional(),contentArray:r.property("content_array",r.list(ec).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var rc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Go=r.object({name:r.string(),type:rc,description:r.string()});var oc=r.object({model:Ko,messages:r.list(Xo),variables:r.record(r.string(),r.string()),schema:r.list(Go)});var $o=r.object({code:oc.optional()});var ac=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Qo=r.object({code:ac.optional()});var tc=r.object({model:Ko,messages:r.list(Xo),schema:r.list(Go)});var Yo=r.object({code:tc.optional()});var ic=r.object({metric:r.string()});var Zo=r.object({code:ic.optional()});var Xt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(ze).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),nc=r.union("type",{llm_as_judge:$o.extend(Xt),user_defined_metric_python:Qo.extend(Xt),trace_thread_llm_as_judge:Yo.extend(Xt),trace_thread_user_defined_metric_python:Zo.extend(Xt)}).transform({transform:i=>i,untransform:i=>i});var sc=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(nc).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Gt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(ze).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),pc=r.union("type",{llm_as_judge:$o.extend(Gt),user_defined_metric_python:Qo.extend(Gt),trace_thread_llm_as_judge:Yo.extend(Gt),trace_thread_user_defined_metric_python:Zo.extend(Gt)}).transform({transform:i=>i,untransform:i=>i});var cc=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);var lc=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:cc.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});var mc=r.object({content:r.list(lc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var dc=r.object({code:Oo.optional()});var uc=r.object({code:Wo.optional()});var gc=r.object({code:Bo.optional()});var fc=r.object({code:Lo.optional()});var $t=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),filters:r.list(Do).optional(),projectId:r.property("project_id",r.string()),action:r.stringLiteral("evaluator")}),hc=r.union("type",{llm_as_judge:dc.extend($t),user_defined_metric_python:uc.extend($t),trace_thread_llm_as_judge:gc.extend($t),trace_thread_user_defined_metric_python:fc.extend($t)}).transform({transform:i=>i,untransform:i=>i});var wc=r.enum_(["system","user","assistant","tool","function"]);var qo=r.object({id:r.string().optional(),index:r.number().optional(),type:r.stringLiteral("function").optional(),function:_e.optional()});var bc=r.object({role:wc.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(qo).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",_e.optional())});var xc=r.object({role:r.string().optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),toolCalls:r.property("tool_calls",r.list(qo).optional()),functionCall:r.property("function_call",_e.optional())});var Rc=r.object({index:r.number().optional(),message:bc.optional(),delta:xc.optional(),finishReason:r.property("finish_reason",r.string().optional())});var yc=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});var kc=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});var vc=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",yc.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",kc.optional())});var zc=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(Rc).optional(),usage:vc.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});var He=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),name:r.string(),slug:r.string().optional(),description:r.string().optional(),config:Te,createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var Sc=r.object({content:r.list(He).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var _c=r.enum_(["private","public"]);var Tc=r.enum_(["unknown","processing","completed","failed"]);var zb=r.object({id:r.string().optional(),name:r.string(),visibility:_c.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:Tc.optional()});var Ac=r.enum_(["manual","trace","span","sdk"]);var ea=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Ac,data:N,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(Or).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Sb=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(ea)});var Ec=r.object({generatedSamples:r.property("generated_samples",r.list(ea).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});var _b=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional())});var Pc=r.enum_(["string","number","object","boolean","array","null"]);var Cc=r.object({name:r.string().optional(),types:r.list(Pc).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Ic=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var jc=r.enum_(["manual","trace","span","sdk"]);var Qt=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var Uc=r.enum_(["ui","sdk","online_scoring"]);var Dc=r.enum_(["ui","sdk","online_scoring"]);var Nc=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Dc.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var Mc=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Uc,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Nc).optional())});var Fc=r.enum_(["default","hidden"]);var Oc=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),input:Qt.optional(),output:Qt.optional(),feedbackScores:r.property("feedback_scores",r.list(Mc).optional()),comments:r.list(Ic).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Fc.optional())});var Wc=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:jc,data:N,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(Oc).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Bc=r.object({content:r.list(Wc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Cc).optional(),sortableBy:r.list(r.string()).optional()});var Lc=r.enum_(["private","public"]);var Vc=r.enum_(["unknown","processing","completed","failed"]);var nr=r.object({id:r.string().optional(),name:r.string(),visibility:Lc.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:Vc.optional()});var Hc=r.object({content:r.list(nr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});var Jc=r.object({value:r.number().optional()});var Kc=r.object({value:r.number().optional()});var ra=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Xc=r.object({value:ra.optional()});var Gc=r.object({name:r.string().optional()}),$c=r.union("type",{PERCENTAGE:Xc.extend(Gc),COUNT:Kc.extend(Gc),AVG:Jc.extend(Gc)}).transform({transform:i=>i,untransform:i=>i});var Je=r.object({stats:r.list($c).optional()});var Qc=r.enum_(["manual","trace","span","sdk"]);var Yc=r.enum_(["default","hidden"]);var oa=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Yc.optional())});var aa=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Qc,data:N,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(oa).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Zc=r.enum_(["string","number","object","boolean","array","null"]);var qc=r.object({name:r.string().optional(),types:r.list(Zc).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var el=r.object({content:r.list(aa).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(qc).optional(),sortableBy:r.list(r.string()).optional()});var rl=r.enum_(["string","number","object","boolean","array","null"]);var ol=r.object({name:r.string().optional(),types:r.list(rl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var al=r.object({columns:r.list(ol).optional()});var tl=r.object({typeName:r.string().optional()});var Tb=r.object({type:tl.optional(),closed:r.boolean().optional()});var il=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),versionHash:r.property("version_hash",r.string().optional()),tags:r.list(r.string()).optional(),itemsTotal:r.property("items_total",r.number().optional()),itemsAdded:r.property("items_added",r.number().optional()),itemsModified:r.property("items_modified",r.number().optional()),itemsDeleted:r.property("items_deleted",r.number().optional()),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var nl=r.object({content:r.list(il).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var sl=r.enum_(["regular","trial","mini-batch"]);var pl=r.enum_(["running","completed","cancelled"]);var Ae=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Yt=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});var Ab=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),datasetId:r.property("dataset_id",r.string().optional()),name:r.string().optional(),metadata:D.optional(),type:sl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),comments:r.list(H).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:Ae.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:pl.optional(),promptVersion:r.property("prompt_version",Yt.optional()),promptVersions:r.property("prompt_versions",r.list(Yt).optional())});var sr=r.object({ids:r.list(r.string())});var cl=r.enum_(["TOPIC","PII"]);var ll=r.enum_(["passed","failed"]);var ml=r.object({name:cl.optional(),result:ll.optional()});var dl=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(ml).optional()});var ul=r.enum_(["default","hidden"]);var ta=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Se.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(dl).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",ul.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional()});var gl=r.enum_(["general","tool","llm","guardrail"]);var ia=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:gl.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:D.optional(),output:D.optional(),metadata:D.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Se.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional()});var fl=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",D.optional()),trace:ta.optional(),spans:r.list(ia).optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional())});var Eb=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(fl)});var Ke=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var ce=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var hl=r.enum_(["regular","trial","mini-batch"]);var wl=r.enum_(["running","completed","cancelled"]);var Zt=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});var na=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),datasetId:r.property("dataset_id",r.string().optional()),name:r.string().optional(),metadata:ce.optional(),type:hl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Ve).optional()),comments:r.list(Ke).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:ra.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:wl.optional(),promptVersion:r.property("prompt_version",Zt.optional()),promptVersions:r.property("prompt_versions",r.list(Zt).optional())});var bl=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(na).optional(),sortableBy:r.list(r.string()).optional()});var xl=r.object({label:r.string().optional()});var Rl=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});var yl=r.object({groupsDetails:r.property("groups_details",r.list(Rl).optional())});var kl=r.object({content:r.record(r.string(),xl).optional(),details:yl.optional()});var vl=r.object({experimentCount:r.property("experiment_count",r.number().optional()),traceCount:r.property("trace_count",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),duration:Ae.optional(),feedbackScores:r.property("feedback_scores",r.list(pe).optional())});var zl=r.object({aggregations:vl.optional()});var Sl=r.object({content:r.record(r.string(),zl).optional()});var Pb=r.object({ids:r.list(r.string())});var _l=r.object({typeName:r.string().optional()});var Cb=r.object({type:_l.optional(),closed:r.boolean().optional()});var Tl=r.object({trueLabel:r.string(),falseLabel:r.string()});var Al=r.object({details:Tl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var El=r.object({categories:r.record(r.string(),r.number())});var Pl=r.object({details:El.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Cl=r.object({max:r.number(),min:r.number()});var Il=r.object({details:Cl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var jl=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Ib=r.union("type",{numerical:Il.extend(jl),categorical:Pl.extend(jl),boolean:Al.extend(jl)}).transform({transform:i=>i,untransform:i=>i});var Ul=r.object({trueLabel:r.string(),falseLabel:r.string()});var Dl=r.object({details:Ul.optional()});var Nl=r.object({categories:r.record(r.string(),r.number())});var Ml=r.object({details:Nl.optional()});var Fl=r.object({max:r.number(),min:r.number()});var Ol=r.object({details:Fl.optional()});var Wl=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Bl=r.union("type",{numerical:Ol.extend(Wl),categorical:Ml.extend(Wl),boolean:Dl.extend(Wl)}).transform({transform:i=>i,untransform:i=>i});var Ll=r.object({trueLabel:r.string(),falseLabel:r.string()});var sa=r.object({details:Ll.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Vl=r.object({categories:r.record(r.string(),r.number())});var pa=r.object({details:Vl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Hl=r.object({max:r.number(),min:r.number()});var ca=r.object({details:Hl.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Jl=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Kl=r.union("type",{numerical:ca.extend(Jl),categorical:pa.extend(Jl),boolean:sa.extend(Jl)}).transform({transform:i=>i,untransform:i=>i});var Xl=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Kl).optional()});var Gl=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),$l=r.union("type",{numerical:ca.extend(Gl),categorical:pa.extend(Gl),boolean:sa.extend(Gl)}).transform({transform:i=>i,untransform:i=>i});var Ql=r.object({trueLabel:r.string(),falseLabel:r.string()});var Yl=r.object({details:Ql.optional()});var Zl=r.object({categories:r.record(r.string(),r.number())});var ql=r.object({details:Zl.optional()});var em=r.object({max:r.number(),min:r.number()});var rm=r.object({details:em.optional()});var om=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),am=r.union("type",{numerical:rm.extend(om),categorical:ql.extend(om),boolean:Yl.extend(om)}).transform({transform:i=>i,untransform:i=>i});var tm=r.enum_(["TOPIC","PII"]);var im=r.enum_(["passed","failed"]);var nm=r.object({id:r.string().optional(),entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:tm,result:im,config:N,details:N});var jb=r.object({guardrails:r.list(nm)});var sm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var la=r.object({id:r.string().optional(),provider:sm,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var pm=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(la).optional(),sortableBy:r.list(r.string()).optional()});var cm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var Ub=r.object({id:r.string().optional(),provider:cm,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var qt=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});var lm=r.enum_(["trace","thread"]);var ei=r.object({projectId:r.property("project_id",r.string()),entityIds:r.property("entity_ids",r.list(r.string())),ruleIds:r.property("rule_ids",r.list(r.string())),entityType:r.property("entity_type",lm)});var Db=N;var mm=r.enum_(["running","completed","cancelled"]);var Nb=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:mm,metadata:D.optional(),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var dm=r.enum_(["running","completed","cancelled"]);var ri=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:dm,metadata:se.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var um=r.enum_(["running","completed","cancelled"]);var ma=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:um,metadata:ce.optional(),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Ve).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var gm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ma).optional(),sortableBy:r.list(r.string()).optional()});var da=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var fm=r.enum_(["private","public"]);var Mb=r.object({id:r.string().optional(),name:r.string(),visibility:fm.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),duration:Ae.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",da.optional())});var hm=r.enum_(["private","public"]);var ua=r.object({id:r.string().optional(),name:r.string(),visibility:hm.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional())});var wm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ua).optional(),sortableBy:r.list(r.string()).optional()});var bm=r.object({name:r.string().optional()});var xm=r.object({scores:r.list(bm).optional()});var Rm=r.object({time:r.date(),value:r.number().optional()});var ym=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var km=r.enum_(["HOURLY","DAILY","WEEKLY"]);var vm=r.object({name:r.string().optional(),data:r.list(Rm).optional()});var zm=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",ym.optional()),interval:km.optional(),results:r.list(vm).optional()});var Sm=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(pe).optional()),duration:Ae.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",da.optional())});var _m=r.object({content:r.list(Sm).optional()});var Tm=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var Am=r.object({name:r.string(),value:r.number()});var Em=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Pm=r.enum_(["private","public"]);var Cm=r.object({id:r.string().optional(),name:r.string(),visibility:Pm.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(Am).optional()),duration:Em.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Tm.optional())});var Fb=r.object({errors:r.list(r.string()).optional()});var Im=r.enum_(["mustache","jinja2"]);var jm=r.enum_(["mustache","jinja2"]);var Um=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:N.optional(),type:jm.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Ob=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:N.optional(),changeDescription:r.property("change_description",r.string().optional()),type:Im.optional(),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Um.optional())});var Wb=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Dm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",ke.optional())});var Nm=r.enum_(["mustache","jinja2"]);var Mm=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:Te.optional(),type:Nm.optional(),changeDescription:r.property("change_description",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Fm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Mm).optional()});var Om=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional())});var Wm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Om).optional(),sortableBy:r.list(r.string()).optional()});var Bm=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),csvUploadEnabled:r.boolean(),exportEnabled:r.boolean()});var Bb=r.object({spans:r.list(ia)});var ga=r.object({name:r.string(),author:r.string().optional()});var fa=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Lm=r.enum_(["ui","sdk","online_scoring"]);var Vm=r.enum_(["ui","sdk","online_scoring"]);var Hm=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Vm.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var pr=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Lm,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Hm).optional())});var Jm=r.enum_(["general","tool","llm","guardrail"]);var ha=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Jm.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:ce.optional(),output:ce.optional(),metadata:ce.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",fa.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(pr).optional()),comments:r.list(Ke).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional()});var Km=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ha).optional(),sortableBy:r.list(r.string()).optional()});var Xm=r.enum_(["ui","sdk","online_scoring"]);var Gm=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Xm,author:r.string().optional(),id:r.string()});var wa=r.object({scores:r.list(Gm)});var Lb=r.object({traces:r.list(ta)});var Vb=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});var $m=r.enum_(["TOPIC","PII"]);var Qm=r.enum_(["passed","failed"]);var Ym=r.object({name:$m.optional(),result:Qm.optional()});var Zm=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Ym).optional()});var qm=r.enum_(["default","hidden"]);var ba=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:ce.optional(),output:ce.optional(),metadata:ce.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",fa.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(pr).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(pr).optional()),comments:r.list(Ke).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(Zm).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",qm.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional()});var ed=r.enum_(["active","inactive"]);var xa=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),threadModelId:r.property("thread_model_id",r.string().optional()),startTime:r.property("start_time",r.date().optional()),endTime:r.property("end_time",r.date().optional()),duration:r.number().optional(),firstMessage:r.property("first_message",D.optional()),lastMessage:r.property("last_message",D.optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),status:ed.optional(),numberOfMessages:r.property("number_of_messages",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),comments:r.list(H).optional(),tags:r.list(r.string()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional())});var oi=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string()),truncate:r.boolean().optional()});var rd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(xa).optional(),sortableBy:r.list(r.string()).optional()});var od=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ba).optional(),sortableBy:r.list(r.string()).optional()});var ad=r.object({completed:r.boolean().optional()});var Xe=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});var cr=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});var Hb=r.object({time:r.date(),value:r.number().optional()});var ai=r.object({results:r.list(Xe).optional()});var Jb=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});var Ra=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional())});var td=r.object({results:r.list(Xe).optional()});var ti=class{constructor(a={}){this._options=a;}getDatasetBiInfo(a){return h.fromPromise(this.__getDatasetBiInfo(a))}async __getDatasetBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-datasets.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getExperimentBiInfo(a){return h.fromPromise(this.__getExperimentBiInfo(a))}async __getExperimentBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-experiments.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansBiInfo(a){return h.fromPromise(this.__getSpansBiInfo(a))}async __getSpansBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-spans.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansCountForWorkspaces(a){return h.fromPromise(this.__getSpansCountForWorkspaces(a))}async __getSpansCountForWorkspaces(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Ws.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/workspace-span-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesBiInfo(a){return h.fromPromise(this.__getTracesBiInfo(a))}async __getTracesBiInfo(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ir.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/bi-traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesCountForWorkspaces(a){return h.fromPromise(this.__getTracesCountForWorkspaces(a))}async __getTracesCountForWorkspaces(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Ls.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/internal/usage/workspace-trace-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ii=class{constructor(a={}){this._options=a;}findAlerts(a={},e){return h.fromPromise(this.__findAlerts(a,e))}async __findAlerts(a={},e){var g,R;let{page:o,size:t,sorting:n,filters:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.sorting=n),c!=null&&(m.filters=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/alerts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:sp.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/alerts.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createAlert(a,e){return h.fromPromise(this.__createAlert(a,e))}async __createAlert(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/alerts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Io.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/alerts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAlertBatch(a,e){return h.fromPromise(this.__deleteAlertBatch(a,e))}async __deleteAlertBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/alerts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/alerts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAlertById(a,e){return h.fromPromise(this.__getAlertById(a,e))}async __getAlertById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/alerts/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:jo.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/alerts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAlert(a,e,o){return h.fromPromise(this.__updateAlert(a,e,o))}async __updateAlert(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/alerts/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Io.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/alerts/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getWebhookExamples(a={},e){return h.fromPromise(this.__getWebhookExamples(a,e))}async __getWebhookExamples(a={},e){var c,m;let{alertType:o}=a,t={};o!=null&&(t.alert_type=ot.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}));let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:pp.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/alerts/webhooks/examples.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}testWebhook(a,e){return h.fromPromise(this.__testWebhook(a,e))}async __testWebhook(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Io.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:lp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/alerts/webhooks/tests.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ni=class{constructor(a={}){this._options=a;}addItemsToAnnotationQueue(a,e,o){return h.fromPromise(this.__addItemsToAnnotationQueue(a,e,o))}async __addItemsToAnnotationQueue(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}/items/add`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Vt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/add.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findAnnotationQueues(a={},e){return h.fromPromise(this.__findAnnotationQueues(a,e))}async __findAnnotationQueues(a={},e){var R,y;let{page:o,size:t,name:n,filters:c,sorting:m}=a,u={};o!=null&&(u.page=o.toString()),t!=null&&(u.size=t.toString()),n!=null&&(u.name=n),c!=null&&(u.filters=c),m!=null&&(u.sorting=m);let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/annotation-queues"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:hp.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/annotation-queues.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createAnnotationQueue(a,e){return h.fromPromise(this.__createAnnotationQueue(a,e))}async __createAnnotationQueue(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/annotation-queues"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:vo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createAnnotationQueueBatch(a,e){return h.fromPromise(this.__createAnnotationQueueBatch(a,e))}async __createAnnotationQueueBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:zo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAnnotationQueueBatch(a,e){return h.fromPromise(this.__deleteAnnotationQueueBatch(a,e))}async __deleteAnnotationQueueBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAnnotationQueueById(a,e){return h.fromPromise(this.__getAnnotationQueueById(a,e))}async __getAnnotationQueueById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Uo.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAnnotationQueue(a,e={},o){return h.fromPromise(this.__updateAnnotationQueue(a,e,o))}async __updateAnnotationQueue(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:So.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}removeItemsFromAnnotationQueue(a,e,o){return h.fromPromise(this.__removeItemsFromAnnotationQueue(a,e,o))}async __removeItemsFromAnnotationQueue(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/annotation-queues/${encodeURIComponent(a)}/items/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Vt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var si=class{constructor(a={}){this._options=a;}attachmentList(a,e){return h.fromPromise(this.__attachmentList(a,e))}async __attachmentList(a,e){var y,v;let{page:o,size:t,projectId:n,entityType:c,entityId:m,path:u}=a,g={};o!=null&&(g.page=o.toString()),t!=null&&(g.size=t.toString()),g.project_id=n,g.entity_type=tt.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m,g.path=u;let R=await b({url:x((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v:w.Default,"v1/private/attachment/list"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(R.ok)return {data:bp.parseOrThrow(R.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:R.rawResponse};if(R.error.reason==="status-code")switch(R.error.statusCode){case 401:throw new $(R.error.body,R.rawResponse);case 403:throw new Z(te.parseOrThrow(R.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),R.rawResponse);default:throw new p({statusCode:R.error.statusCode,body:R.error.body,rawResponse:R.rawResponse})}switch(R.error.reason){case "non-json":throw new p({statusCode:R.error.statusCode,body:R.error.rawBody,rawResponse:R.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/attachment/list.");case "unknown":throw new p({message:R.error.errorMessage,rawResponse:R.rawResponse})}}completeMultiPartUpload(a,e){return h.fromPromise(this.__completeMultiPartUpload(a,e))}async __completeMultiPartUpload(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ht.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/attachment/upload-complete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAttachments(a,e){return h.fromPromise(this.__deleteAttachments(a,e))}async __deleteAttachments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/attachment/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ht.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/attachment/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}downloadAttachment(a,e){return h.fromPromise(this.__downloadAttachment(a,e))}async __downloadAttachment(a,e){var y,v;let{workspaceName:o,containerId:t,entityType:n,entityId:c,fileName:m,mimeType:u}=a,g={};o!=null&&(g.workspace_name=o),g.container_id=t,g.entity_type=it.jsonOrThrow(n,{unrecognizedObjectKeys:"strip"}),g.entity_id=c,g.file_name=m,g.mime_type=u;let R=await b({url:x((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v:w.Default,"v1/private/attachment/download"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(R.ok)return {data:R.body,rawResponse:R.rawResponse};if(R.error.reason==="status-code")switch(R.error.statusCode){case 401:throw new $(R.error.body,R.rawResponse);case 403:throw new Z(te.parseOrThrow(R.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),R.rawResponse);default:throw new p({statusCode:R.error.statusCode,body:R.error.body,rawResponse:R.rawResponse})}switch(R.error.reason){case "non-json":throw new p({statusCode:R.error.statusCode,body:R.error.rawBody,rawResponse:R.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/attachment/download.");case "unknown":throw new p({message:R.error.errorMessage,rawResponse:R.rawResponse})}}startMultiPartUpload(a,e){return h.fromPromise(this.__startMultiPartUpload(a,e))}async __startMultiPartUpload(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/attachment/upload-start"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:vr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:kp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/attachment/upload-start.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}uploadAttachment(a,e){return h.fromPromise(this.__uploadAttachment(a,e))}async __uploadAttachment(a,e){var y,v;let{fileName:o,projectName:t,mimeType:n,entityType:c,entityId:m,body:u}=a,g={};g.file_name=o,t!=null&&(g.project_name=t),n!=null&&(g.mime_type=n),g.entity_type=st.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m;let R=await b({url:x((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v:w.Default,"v1/private/attachment/upload"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",body:or.uploadAttachment.Request.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(R.ok)return {data:void 0,rawResponse:R.rawResponse};if(R.error.reason==="status-code")switch(R.error.statusCode){case 401:throw new $(R.error.body,R.rawResponse);case 403:throw new Z(te.parseOrThrow(R.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),R.rawResponse);default:throw new p({statusCode:R.error.statusCode,body:R.error.body,rawResponse:R.rawResponse})}switch(R.error.reason){case "non-json":throw new p({statusCode:R.error.statusCode,body:R.error.rawBody,rawResponse:R.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/attachment/upload.");case "unknown":throw new p({message:R.error.errorMessage,rawResponse:R.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var pi=class{constructor(a={}){this._options=a;}access(a,e){return h.fromPromise(this.__access(a,e))}async __access(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/auth"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:vp.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/auth.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceName(a){return h.fromPromise(this.__getWorkspaceName(a))}async __getWorkspaceName(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/auth/workspace"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:zp.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 401:throw new $(e.error.body,e.rawResponse);case 403:throw new Z(te.parseOrThrow(e.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/auth/workspace.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ci=class{constructor(a={}){this._options=a;}findEvaluators(a={},e){return h.fromPromise(this.__findEvaluators(a,e))}async __findEvaluators(a={},e){var v,z;let{projectId:o,id:t,name:n,filters:c,sorting:m,page:u,size:g}=a,R={};o!=null&&(R.project_id=o),t!=null&&(R.id=t),n!=null&&(R.name=n),c!=null&&(R.filters=c),m!=null&&(R.sorting=m),u!=null&&(R.page=u.toString()),g!=null&&(R.size=g.toString());let y=await b({url:x((z=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?z:w.Default,"v1/private/automations/evaluators"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:R,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(y.ok)return {data:sc.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/automations/evaluators.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}createAutomationRuleEvaluator(a,e){return h.fromPromise(this.__createAutomationRuleEvaluator(a,e))}async __createAutomationRuleEvaluator(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/automations/evaluators"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Qp.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/automations/evaluators.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAutomationRuleEvaluatorBatch(a,e){return h.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(a,e))}async __deleteAutomationRuleEvaluatorBatch(a,e){var m,u;let{projectId:o,body:t}=a,n={};o!=null&&(n.project_id=o);let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",body:L.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/automations/evaluators/delete.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getEvaluatorById(a,e={},o){return h.fromPromise(this.__getEvaluatorById(a,e,o))}async __getEvaluatorById(a,e={},o){var m,u;let{projectId:t}=e,n={};t!=null&&(n.project_id=t);let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/automations/evaluators/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:pc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}updateAutomationRuleEvaluator(a,e,o){return h.fromPromise(this.__updateAutomationRuleEvaluator(a,e,o))}async __updateAutomationRuleEvaluator(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/automations/evaluators/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:hc.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getEvaluatorLogsById(a,e={},o){return h.fromPromise(this.__getEvaluatorLogsById(a,e,o))}async __getEvaluatorLogsById(a,e={},o){var m,u;let{size:t}=e,n={};t!=null&&(n.size=t.toString());let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/automations/evaluators/${encodeURIComponent(a)}/logs`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:mc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}/logs.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var li=class{constructor(a={}){this._options=a;}createChatCompletions(a={},e){return h.fromPromise(this.__createChatCompletions(a,e))}async __createChatCompletions(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/chat/completions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:To.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:zc.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/chat/completions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var mi=class{constructor(a={}){this._options=a;}findDashboards(a={},e){return h.fromPromise(this.__findDashboards(a,e))}async __findDashboards(a={},e){var u,g;let{page:o,size:t,name:n}=a,c={};o!=null&&(c.page=o.toString()),t!=null&&(c.size=t.toString()),n!=null&&(c.name=n);let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,"v1/private/dashboards"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:Sc.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/dashboards.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}createDashboard(a,e){return h.fromPromise(this.__createDashboard(a,e))}async __createDashboard(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/dashboards"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ao.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:He.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/dashboards.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDashboardById(a,e){return h.fromPromise(this.__getDashboardById(a,e))}async __getDashboardById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/dashboards/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:He.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDashboard(a,e){return h.fromPromise(this.__deleteDashboard(a,e))}async __deleteDashboard(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/dashboards/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDashboard(a,e={},o){return h.fromPromise(this.__updateDashboard(a,e,o))}async __updateDashboard(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/dashboards/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Eo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:He.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var di=class{constructor(a={}){this._options=a;}batchUpdateDatasetItems(a,e){return h.fromPromise(this.__batchUpdateDatasetItems(a,e))}async __batchUpdateDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:zr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/datasets/items/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findDatasets(a={},e){return h.fromPromise(this.__findDatasets(a,e))}async __findDatasets(a={},e){var z,S;let{page:o,size:t,withExperimentsOnly:n,withOptimizationsOnly:c,promptId:m,name:u,sorting:g,filters:R}=a,y={};o!=null&&(y.page=o.toString()),t!=null&&(y.size=t.toString()),n!=null&&(y.with_experiments_only=n.toString()),c!=null&&(y.with_optimizations_only=c.toString()),m!=null&&(y.prompt_id=m),u!=null&&(y.name=u),g!=null&&(y.sorting=g),R!=null&&(y.filters=R);let v=await b({url:x((S=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?S:w.Default,"v1/private/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(v.ok)return {data:Hc.parseOrThrow(v.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:v.rawResponse};if(v.error.reason==="status-code")throw new p({statusCode:v.error.statusCode,body:v.error.body,rawResponse:v.rawResponse});switch(v.error.reason){case "non-json":throw new p({statusCode:v.error.statusCode,body:v.error.rawBody,rawResponse:v.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets.");case "unknown":throw new p({message:v.error.errorMessage,rawResponse:v.rawResponse})}}createDataset(a,e){return h.fromPromise(this.__createDataset(a,e))}async __createDataset(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Sr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createOrUpdateDatasetItems(a,e){return h.fromPromise(this.__createOrUpdateDatasetItems(a,e))}async __createOrUpdateDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/datasets/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createDatasetItemsFromCsv(a,e){return h.fromPromise(this.__createDatasetItemsFromCsv(a,e))}async __createDatasetItemsFromCsv(a,e){var c,m;let o=await qu();o.append("file",Pe(a.file)),o.append("dataset_id",a.datasetId);let t=await o.getRequest(),n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t.headers,...e==null?void 0:e.headers},requestType:"file",duplex:t.duplex,body:t.body,timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new T(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/items/from-csv.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}createDatasetItemsFromSpans(a,e,o){return h.fromPromise(this.__createDatasetItemsFromSpans(a,e,o))}async __createDatasetItemsFromSpans(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/from-spans`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Ar.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-spans.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createDatasetItemsFromTraces(a,e,o){return h.fromPromise(this.__createDatasetItemsFromTraces(a,e,o))}async __createDatasetItemsFromTraces(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/from-traces`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Er.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-traces.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getDatasetById(a,e){return h.fromPromise(this.__getDatasetById(a,e))}async __getDatasetById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/datasets/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDataset(a,e,o){return h.fromPromise(this.__updateDataset(a,e,o))}async __updateDataset(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Pr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/datasets/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteDataset(a,e){return h.fromPromise(this.__deleteDataset(a,e))}async __deleteDataset(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/datasets/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetByName(a,e){return h.fromPromise(this.__deleteDatasetByName(a,e))}async __deleteDatasetByName(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetItems(a,e){return h.fromPromise(this.__deleteDatasetItems(a,e))}async __deleteDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ir.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetsBatch(a,e){return h.fromPromise(this.__deleteDatasetsBatch(a,e))}async __deleteDatasetsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}expandDataset(a,e,o){return h.fromPromise(this.__expandDataset(a,e,o))}async __expandDataset(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/expansions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:jr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:Ec.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{id}/expansions.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findDatasetItemsWithExperimentItems(a,e,o){return h.fromPromise(this.__findDatasetItemsWithExperimentItems(a,e,o))}async __findDatasetItemsWithExperimentItems(a,e,o){var z,S;let{page:t,size:n,experimentIds:c,filters:m,sorting:u,search:g,truncate:R}=e,y={};t!=null&&(y.page=t.toString()),n!=null&&(y.size=n.toString()),y.experiment_ids=c,m!=null&&(y.filters=m),u!=null&&(y.sorting=u),g!=null&&(y.search=g),R!=null&&(y.truncate=R.toString());let v=await b({url:x((S=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?S:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/experiments/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(v.ok)return {data:Bc.parseOrThrow(v.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:v.rawResponse};if(v.error.reason==="status-code")throw new p({statusCode:v.error.statusCode,body:v.error.body,rawResponse:v.rawResponse});switch(v.error.reason){case "non-json":throw new p({statusCode:v.error.statusCode,body:v.error.rawBody,rawResponse:v.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items.");case "unknown":throw new p({message:v.error.errorMessage,rawResponse:v.rawResponse})}}getDatasetByIdentifier(a,e){return h.fromPromise(this.__getDatasetByIdentifier(a,e))}async __getDatasetByIdentifier(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ur.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDatasetExperimentItemsStats(a,e,o){return h.fromPromise(this.__getDatasetExperimentItemsStats(a,e,o))}async __getDatasetExperimentItemsStats(a,e,o){var u,g;let{experimentIds:t,filters:n}=e,c={};c.experiment_ids=t,n!=null&&(c.filters=n);let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/experiments/items/stats`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:Je.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/stats.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}getDatasetItemById(a,e){return h.fromPromise(this.__getDatasetItemById(a,e))}async __getDatasetItemById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/datasets/items/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:aa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}patchDatasetItem(a,e,o){return h.fromPromise(this.__patchDatasetItem(a,e,o))}async __patchDatasetItem(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/items/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:_r.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getDatasetItems(a,e={},o){return h.fromPromise(this.__getDatasetItems(a,e,o))}async __getDatasetItems(a,e={},o){var R,y;let{page:t,size:n,filters:c,truncate:m}=e,u={};t!=null&&(u.page=t.toString()),n!=null&&(u.size=n.toString()),c!=null&&(u.filters=c),m!=null&&(u.truncate=m.toString());let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(g.ok)return {data:el.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getDatasetItemsOutputColumns(a,e={},o){return h.fromPromise(this.__getDatasetItemsOutputColumns(a,e,o))}async __getDatasetItemsOutputColumns(a,e={},o){var m,u;let{experimentIds:t}=e,n={};t!=null&&(n.experiment_ids=t);let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/items/experiments/items/output/columns`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:al.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/output/columns.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}streamDatasetItems(a,e){return h.fromPromise(this.__streamDatasetItems(a,e))}async __streamDatasetItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/datasets/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Dr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createVersionTag(a,e,o,t){return h.fromPromise(this.__createVersionTag(a,e,o,t))}async __createVersionTag(a,e,o,t){var c,m;let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(a)}/tags`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",body:Nr.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new T(n.error.body,n.rawResponse);case 409:throw new F(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/hash/{versionHash}/tags.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}listDatasetVersions(a,e={},o){return h.fromPromise(this.__listDatasetVersions(a,e,o))}async __listDatasetVersions(a,e={},o){var u,g;let{page:t,size:n}=e,c={};t!=null&&(c.page=t.toString()),n!=null&&(c.size=n.toString());let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:nl.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}createDatasetVersion(a,e={},o){return h.fromPromise(this.__createDatasetVersion(a,e,o))}async __createDatasetVersion(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/datasets/${encodeURIComponent(a)}/versions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Mr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteVersionTag(a,e,o,t){return h.fromPromise(this.__deleteVersionTag(a,e,o,t))}async __deleteVersionTag(a,e,o,t){var c,m;let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,`v1/private/datasets/${encodeURIComponent(o)}/versions/${encodeURIComponent(a)}/tags/${encodeURIComponent(e)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ui=class{constructor(a={}){this._options=a;}findExperiments(a={},e){return h.fromPromise(this.__findExperiments(a,e))}async __findExperiments(a={},e){var O,M;let{page:o,size:t,datasetId:n,optimizationId:c,types:m,name:u,datasetDeleted:g,promptId:R,sorting:y,filters:v}=a,z={};o!=null&&(z.page=o.toString()),t!=null&&(z.size=t.toString()),n!=null&&(z.datasetId=n),c!=null&&(z.optimization_id=c),m!=null&&(z.types=m),u!=null&&(z.name=u),g!=null&&(z.dataset_deleted=g.toString()),R!=null&&(z.prompt_id=R),y!=null&&(z.sorting=y),v!=null&&(z.filters=v);let S=await b({url:x((M=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?M:w.Default,"v1/private/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:z,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:bl.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")switch(S.error.statusCode){case 400:throw new _(S.error.body,S.rawResponse);default:throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse})}switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}createExperiment(a,e){return h.fromPromise(this.__createExperiment(a,e))}async __createExperiment(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Fr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createExperimentItems(a,e){return h.fromPromise(this.__createExperimentItems(a,e))}async __createExperimentItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Wr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentItems(a,e){return h.fromPromise(this.__deleteExperimentItems(a,e))}async __deleteExperimentItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Br.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentsById(a,e){return h.fromPromise(this.__deleteExperimentsById(a,e))}async __deleteExperimentsById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:sr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}experimentItemsBulk(a,e){return h.fromPromise(this.__experimentItemsBulk(a,e))}async __experimentItemsBulk(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Vr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/experiments/items/bulk.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames(a={},e){return h.fromPromise(this.__findFeedbackScoreNames(a,e))}async __findFeedbackScoreNames(a={},e){var c,m;let{experimentIds:o}=a,t={};o!=null&&(t.experiment_ids=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:ar.findFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findExperimentGroups(a={},e){return h.fromPromise(this.__findExperimentGroups(a,e))}async __findExperimentGroups(a={},e){var g,R;let{groups:o,types:t,name:n,filters:c}=a,m={};o!=null&&(m.groups=o),t!=null&&(m.types=t),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/experiments/groups"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:kl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/groups.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}findExperimentGroupsAggregations(a={},e){return h.fromPromise(this.__findExperimentGroupsAggregations(a,e))}async __findExperimentGroupsAggregations(a={},e){var g,R;let{groups:o,types:t,name:n,filters:c}=a,m={};o!=null&&(m.groups=o),t!=null&&(m.types=t),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Sl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/groups/aggregations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}finishExperiments(a,e){return h.fromPromise(this.__finishExperiments(a,e))}async __finishExperiments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/finish"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:sr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/finish.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getExperimentById(a,e){return h.fromPromise(this.__getExperimentById(a,e))}async __getExperimentById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/experiments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:na.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateExperiment(a,e={},o){return h.fromPromise(this.__updateExperiment(a,e,o))}async __updateExperiment(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/experiments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Hr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/experiments/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getExperimentItemById(a,e){return h.fromPromise(this.__getExperimentItemById(a,e))}async __getExperimentItemById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/experiments/items/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:oa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/experiments/items/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperimentItems(a,e){return h.fromPromise(this.__streamExperimentItems(a,e))}async __streamExperimentItems(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Jr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperiments(a,e){return h.fromPromise(this.__streamExperiments(a,e))}async __streamExperiments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/experiments/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Kr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/experiments/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var gi=class{constructor(a={}){this._options=a;}findFeedbackDefinitions(a={},e){return h.fromPromise(this.__findFeedbackDefinitions(a,e))}async __findFeedbackDefinitions(a={},e){var g,R;let{page:o,size:t,name:n,type:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.type=bt.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}));let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/feedback-definitions"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Xl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/feedback-definitions.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createFeedbackDefinition(a,e){return h.fromPromise(this.__createFeedbackDefinition(a,e))}async __createFeedbackDefinition(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/feedback-definitions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Bl.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/feedback-definitions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getFeedbackDefinitionById(a,e){return h.fromPromise(this.__getFeedbackDefinitionById(a,e))}async __getFeedbackDefinitionById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/feedback-definitions/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:$l.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateFeedbackDefinition(a,e,o){return h.fromPromise(this.__updateFeedbackDefinition(a,e,o))}async __updateFeedbackDefinition(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/feedback-definitions/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:am.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteFeedbackDefinitionById(a,e){return h.fromPromise(this.__deleteFeedbackDefinitionById(a,e))}async __deleteFeedbackDefinitionById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/feedback-definitions/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteFeedbackDefinitionsBatch(a,e){return h.fromPromise(this.__deleteFeedbackDefinitionsBatch(a,e))}async __deleteFeedbackDefinitionsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/feedback-definitions/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var fi=class{constructor(a={}){this._options=a;}createGuardrails(a,e){return h.fromPromise(this.__createGuardrails(a,e))}async __createGuardrails(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/guardrails"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Po.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/guardrails.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var hi=class{constructor(a={}){this._options=a;}deleteLlmProviderApiKeysBatch(a,e){return h.fromPromise(this.__deleteLlmProviderApiKeysBatch(a,e))}async __deleteLlmProviderApiKeysBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/llm-provider-key/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findLlmProviderKeys(a){return h.fromPromise(this.__findLlmProviderKeys(a))}async __findLlmProviderKeys(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/llm-provider-key"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:pm.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/llm-provider-key.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}storeLlmProviderApiKey(a,e){return h.fromPromise(this.__storeLlmProviderApiKey(a,e))}async __storeLlmProviderApiKey(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/llm-provider-key"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Xr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(te.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/llm-provider-key.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getLlmProviderApiKeyById(a,e){return h.fromPromise(this.__getLlmProviderApiKeyById(a,e))}async __getLlmProviderApiKeyById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/llm-provider-key/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:la.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateLlmProviderApiKey(a,e={},o){return h.fromPromise(this.__updateLlmProviderApiKey(a,e,o))}async __updateLlmProviderApiKey(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/llm-provider-key/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Gr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new $(t.error.body,t.rawResponse);case 403:throw new Z(te.parseOrThrow(t.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var wi=class{constructor(a={}){this._options=a;}evaluateThreads(a,e){return h.fromPromise(this.__evaluateThreads(a,e))}async __evaluateThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ei.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:qt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/manual-evaluation/threads.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateTraces(a,e){return h.fromPromise(this.__evaluateTraces(a,e))}async __evaluateTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ei.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:qt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/manual-evaluation/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var bi=class{constructor(a={}){this._options=a;}receiveProtobufTraces(a){return h.fromPromise(this.__receiveProtobufTraces(a))}async __receiveProtobufTraces(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/otel/v1/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/otel/v1/traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var xi=class{constructor(a={}){this._options=a;}findOptimizations(a={},e){return h.fromPromise(this.__findOptimizations(a,e))}async __findOptimizations(a={},e){var R,y;let{page:o,size:t,datasetId:n,name:c,datasetDeleted:m}=a,u={};o!=null&&(u.page=o.toString()),t!=null&&(u.size=t.toString()),n!=null&&(u.dataset_id=n),c!=null&&(u.name=c),m!=null&&(u.dataset_deleted=m.toString());let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:gm.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")switch(g.error.statusCode){case 400:throw new _(g.error.body,g.rawResponse);default:throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse})}switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/optimizations.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createOptimization(a,e){return h.fromPromise(this.__createOptimization(a,e))}async __createOptimization(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/optimizations"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ri.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}upsertOptimization(a,e){return h.fromPromise(this.__upsertOptimization(a,e))}async __upsertOptimization(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/optimizations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ri.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteOptimizationsById(a,e){return h.fromPromise(this.__deleteOptimizationsById(a,e))}async __deleteOptimizationsById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/optimizations/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:sr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/optimizations/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getOptimizationById(a,e){return h.fromPromise(this.__getOptimizationById(a,e))}async __getOptimizationById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/optimizations/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ma.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/optimizations/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateOptimizationsById(a,e={},o){return h.fromPromise(this.__updateOptimizationsById(a,e,o))}async __updateOptimizationsById(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/optimizations/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:$r.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/optimizations/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ri=class{constructor(a={}){this._options=a;}findProjects(a={},e){return h.fromPromise(this.__findProjects(a,e))}async __findProjects(a={},e){var g,R;let{page:o,size:t,name:n,sorting:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/projects"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:wm.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createProject(a,e){return h.fromPromise(this.__createProject(a,e))}async __createProject(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/projects"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Qr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getProjectById(a,e){return h.fromPromise(this.__getProjectById(a,e))}async __getProjectById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/projects/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ua.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteProjectById(a,e){return h.fromPromise(this.__deleteProjectById(a,e))}async __deleteProjectById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/projects/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateProject(a,e={},o){return h.fromPromise(this.__updateProject(a,e,o))}async __updateProject(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/projects/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Yr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/projects/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteProjectsBatch(a,e){return h.fromPromise(this.__deleteProjectsBatch(a,e))}async __deleteProjectsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/projects/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNamesByProjectIds(a={},e){return h.fromPromise(this.__findFeedbackScoreNamesByProjectIds(a,e))}async __findFeedbackScoreNamesByProjectIds(a={},e){var c,m;let{projectIds:o}=a,t={};o!=null&&(t.project_ids=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:xm.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getProjectMetrics(a,e={},o){return h.fromPromise(this.__getProjectMetrics(a,e,o))}async __getProjectMetrics(a,e={},o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/projects/${encodeURIComponent(a)}/metrics`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Zr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:zm.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects/{id}/metrics.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getProjectStats(a={},e){return h.fromPromise(this.__getProjectStats(a,e))}async __getProjectStats(a={},e){var g,R;let{page:o,size:t,name:n,sorting:c}=a,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/private/projects/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:_m.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/projects/stats.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}retrieveProject(a,e){return h.fromPromise(this.__retrieveProject(a,e))}async __retrieveProject(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/projects/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:qr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Cm.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/projects/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var yi=class{constructor(a={}){this._options=a;}getPrompts(a={},e){return h.fromPromise(this.__getPrompts(a,e))}async __getPrompts(a={},e){var R,y;let{page:o,size:t,name:n,sorting:c,filters:m}=a,u={};o!=null&&(u.page=o.toString()),t!=null&&(u.size=t.toString()),n!=null&&(u.name=n),c!=null&&(u.sorting=c),m!=null&&(u.filters=m);let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/prompts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Wm.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createPrompt(a,e){return h.fromPromise(this.__createPrompt(a,e))}async __createPrompt(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:eo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createPromptVersion(a,e){return h.fromPromise(this.__createPromptVersion(a,e))}async __createPromptVersion(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts/versions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ro.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ke.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptById(a,e){return h.fromPromise(this.__getPromptById(a,e))}async __getPromptById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/prompts/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Dm.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePrompt(a,e,o){return h.fromPromise(this.__updatePrompt(a,e,o))}async __updatePrompt(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/prompts/${encodeURIComponent(a)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:oo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/prompts/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deletePrompt(a,e){return h.fromPromise(this.__deletePrompt(a,e))}async __deletePrompt(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/prompts/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deletePromptsBatch(a,e){return h.fromPromise(this.__deletePromptsBatch(a,e))}async __deletePromptsBatch(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersionById(a,e){return h.fromPromise(this.__getPromptVersionById(a,e))}async __getPromptVersionById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/prompts/versions/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ke.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts/versions/{versionId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersions(a,e={},o){return h.fromPromise(this.__getPromptVersions(a,e,o))}async __getPromptVersions(a,e={},o){var u,g;let{page:t,size:n}=e,c={};t!=null&&(c.page=t.toString()),n!=null&&(c.size=n.toString());let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,`v1/private/prompts/${encodeURIComponent(a)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:Fm.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/prompts/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}restorePromptVersion(a,e,o){return h.fromPromise(this.__restorePromptVersion(a,e,o))}async __restorePromptVersion(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/prompts/${encodeURIComponent(a)}/versions/${encodeURIComponent(e)}/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:ke.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/{promptId}/versions/{versionId}/restore.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}retrievePromptVersion(a,e){return h.fromPromise(this.__retrievePromptVersion(a,e))}async __retrievePromptVersion(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ao.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ke.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new T(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/prompts/versions/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ki=class{constructor(a={}){this._options=a;}getServiceToggles(a){return h.fromPromise(this.__getServiceToggles(a))}async __getServiceToggles(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/toggles"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Bm.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/toggles.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var vi=class{constructor(a={}){this._options=a;}addSpanComment(a,e,o){return h.fromPromise(this.__addSpanComment(a,e,o))}async __addSpanComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addSpanFeedbackScore(a,e,o){return h.fromPromise(this.__addSpanFeedbackScore(a,e,o))}async __addSpanFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/spans/{id}/feedback-scores.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createSpans(a,e){return h.fromPromise(this.__createSpans(a,e))}async __createSpans(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:no.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateSpans(a,e){return h.fromPromise(this.__batchUpdateSpans(a,e))}async __batchUpdateSpans(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:po.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpansByProject(a={},e){return h.fromPromise(this.__getSpansByProject(a,e))}async __getSpansByProject(a={},e){var oe,Ye;let{page:o,size:t,projectName:n,projectId:c,traceId:m,type:u,filters:g,truncate:R,stripAttachments:y,sorting:v,exclude:z,fromTime:S,toTime:O}=a,M={};o!=null&&(M.page=o.toString()),t!=null&&(M.size=t.toString()),n!=null&&(M.project_name=n),c!=null&&(M.project_id=c),m!=null&&(M.trace_id=m),u!=null&&(M.type=Ct.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"})),g!=null&&(M.filters=g),R!=null&&(M.truncate=R.toString()),y!=null&&(M.strip_attachments=y.toString()),v!=null&&(M.sorting=v),z!=null&&(M.exclude=z),S!=null&&(M.from_time=S.toISOString()),O!=null&&(M.to_time=O.toISOString());let G=await b({url:x((Ye=(oe=await s.get(this._options.baseUrl))!=null?oe:await s.get(this._options.environment))!=null?Ye:w.Default,"v1/private/spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:M,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(G.ok)return {data:Km.parseOrThrow(G.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:G.rawResponse};if(G.error.reason==="status-code")throw new p({statusCode:G.error.statusCode,body:G.error.body,rawResponse:G.rawResponse});switch(G.error.reason){case "non-json":throw new p({statusCode:G.error.statusCode,body:G.error.rawBody,rawResponse:G.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans.");case "unknown":throw new p({message:G.error.errorMessage,rawResponse:G.rawResponse})}}createSpan(a,e){return h.fromPromise(this.__createSpan(a,e))}async __createSpan(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:io.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new F(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpanById(a,e={},o){return h.fromPromise(this.__getSpanById(a,e,o))}async __getSpanById(a,e={},o){var m,u;let{stripAttachments:t}=e,n={};t!=null&&(n.strip_attachments=t.toString());let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/spans/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:ha.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 404:throw new T(c.error.body,c.rawResponse);default:throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteSpanById(a,e){return h.fromPromise(this.__deleteSpanById(a,e))}async __deleteSpanById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/spans/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 501:throw new br(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/spans/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpan(a,e,o){return h.fromPromise(this.__updateSpan(a,e,o))}async __updateSpan(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:so.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/spans/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteSpanComments(a,e){return h.fromPromise(this.__deleteSpanComments(a,e))}async __deleteSpanComments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteSpanFeedbackScore(a,e,o){return h.fromPromise(this.__deleteSpanFeedbackScore(a,e,o))}async __deleteSpanFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(a)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ga.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/{id}/feedback-scores/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findFeedbackScoreNames1(a={},e){return h.fromPromise(this.__findFeedbackScoreNames1(a,e))}async __findFeedbackScoreNames1(a={},e){var m,u;let{projectId:o,type:t}=a,n={};o!=null&&(n.project_id=o),t!=null&&(n.type=It.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}));let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:tr.findFeedbackScoreNames1.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/feedback-scores/names.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getSpanComment(a,e,o){return h.fromPromise(this.__getSpanComment(a,e,o))}async __getSpanComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/${encodeURIComponent(e)}/comments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/{spanId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getSpanStats(a={},e){return h.fromPromise(this.__getSpanStats(a,e))}async __getSpanStats(a={},e){var v,z;let{projectId:o,projectName:t,traceId:n,type:c,filters:m,fromTime:u,toTime:g}=a,R={};o!=null&&(R.project_id=o),t!=null&&(R.project_name=t),n!=null&&(R.trace_id=n),c!=null&&(R.type=jt.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"})),m!=null&&(R.filters=m),u!=null&&(R.from_time=u.toISOString()),g!=null&&(R.to_time=g.toISOString());let y=await b({url:x((z=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?z:w.Default,"v1/private/spans/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:R,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(y.ok)return {data:Je.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/spans/stats.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}scoreBatchOfSpans(a,e){return h.fromPromise(this.__scoreBatchOfSpans(a,e))}async __scoreBatchOfSpans(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wa.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/spans/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchSpans(a={},e){return h.fromPromise(this.__searchSpans(a,e))}async __searchSpans(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/spans/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:co.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/spans/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpanComment(a,e,o){return h.fromPromise(this.__updateSpanComment(a,e,o))}async __updateSpanComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/spans/comments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/spans/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var zi=class{constructor(a={}){this._options=a;}addThreadComment(a,e,o){return h.fromPromise(this.__addThreadComment(a,e,o))}async __addThreadComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/${encodeURIComponent(a)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addTraceComment(a,e,o){return h.fromPromise(this.__addTraceComment(a,e,o))}async __addTraceComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addTraceFeedbackScore(a,e,o){return h.fromPromise(this.__addTraceFeedbackScore(a,e,o))}async __addTraceFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/{id}/feedback-scores.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createTraces(a,e){return h.fromPromise(this.__createTraces(a,e))}async __createTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:mo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateTraces(a,e){return h.fromPromise(this.__batchUpdateTraces(a,e))}async __batchUpdateTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:go.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateThreads(a,e){return h.fromPromise(this.__batchUpdateThreads(a,e))}async __batchUpdateThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ho.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/threads/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}closeTraceThread(a={},e){return h.fromPromise(this.__closeTraceThread(a,e))}async __closeTraceThread(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/close"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/threads/close.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTracesByProject(a={},e){return h.fromPromise(this.__getTracesByProject(a,e))}async __getTracesByProject(a={},e){var M,G;let{page:o,size:t,projectName:n,projectId:c,filters:m,truncate:u,stripAttachments:g,sorting:R,exclude:y,fromTime:v,toTime:z}=a,S={};o!=null&&(S.page=o.toString()),t!=null&&(S.size=t.toString()),n!=null&&(S.project_name=n),c!=null&&(S.project_id=c),m!=null&&(S.filters=m),u!=null&&(S.truncate=u.toString()),g!=null&&(S.strip_attachments=g.toString()),R!=null&&(S.sorting=R),y!=null&&(S.exclude=y),v!=null&&(S.from_time=v.toISOString()),z!=null&&(S.to_time=z.toISOString());let O=await b({url:x((G=(M=await s.get(this._options.baseUrl))!=null?M:await s.get(this._options.environment))!=null?G:w.Default,"v1/private/traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:S,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(O.ok)return {data:od.parseOrThrow(O.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:O.rawResponse};if(O.error.reason==="status-code")throw new p({statusCode:O.error.statusCode,body:O.error.body,rawResponse:O.rawResponse});switch(O.error.reason){case "non-json":throw new p({statusCode:O.error.statusCode,body:O.error.rawBody,rawResponse:O.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces.");case "unknown":throw new p({message:O.error.errorMessage,rawResponse:O.rawResponse})}}createTrace(a,e){return h.fromPromise(this.__createTrace(a,e))}async __createTrace(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:lo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceById(a,e={},o){return h.fromPromise(this.__getTraceById(a,e,o))}async __getTraceById(a,e={},o){var m,u;let{stripAttachments:t}=e,n={};t!=null&&(n.strip_attachments=t.toString());let c=await b({url:x((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:w.Default,`v1/private/traces/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:ba.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteTraceById(a,e){return h.fromPromise(this.__deleteTraceById(a,e))}async __deleteTraceById(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,`v1/private/traces/${encodeURIComponent(a)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/traces/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateTrace(a,e,o){return h.fromPromise(this.__updateTrace(a,e,o))}async __updateTrace(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:uo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteThreadComments(a,e){return h.fromPromise(this.__deleteThreadComments(a,e))}async __deleteThreadComments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteThreadFeedbackScores(a,e){return h.fromPromise(this.__deleteThreadFeedbackScores(a,e))}async __deleteThreadFeedbackScores(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:bo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/feedback-scores/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceComments(a,e){return h.fromPromise(this.__deleteTraceComments(a,e))}async __deleteTraceComments(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceFeedbackScore(a,e,o){return h.fromPromise(this.__deleteTraceFeedbackScore(a,e,o))}async __deleteTraceFeedbackScore(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(a)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ga.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/{id}/feedback-scores/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteTraceThreads(a,e){return h.fromPromise(this.__deleteTraceThreads(a,e))}async __deleteTraceThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:xo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraces(a,e){return h.fromPromise(this.__deleteTraces(a,e))}async __deleteTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:L.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames2(a={},e){return h.fromPromise(this.__findFeedbackScoreNames2(a,e))}async __findFeedbackScoreNames2(a={},e){var c,m;let{projectId:o}=a,t={};o!=null&&(t.project_id=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Le.findFeedbackScoreNames2.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findTraceThreadsFeedbackScoreNames(a={},e){return h.fromPromise(this.__findTraceThreadsFeedbackScoreNames(a,e))}async __findTraceThreadsFeedbackScoreNames(a={},e){var c,m;let{projectId:o}=a,t={};o!=null&&(t.project_id=o);let n=await b({url:x((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:w.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Le.findTraceThreadsFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/threads/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getTraceStats(a={},e){return h.fromPromise(this.__getTraceStats(a,e))}async __getTraceStats(a={},e){var R,y;let{projectId:o,projectName:t,filters:n,fromTime:c,toTime:m}=a,u={};o!=null&&(u.project_id=o),t!=null&&(u.project_name=t),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),m!=null&&(u.to_time=m.toISOString());let g=await b({url:x((y=(R=await s.get(this._options.baseUrl))!=null?R:await s.get(this._options.environment))!=null?y:w.Default,"v1/private/traces/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Je.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getThreadComment(a,e,o){return h.fromPromise(this.__getThreadComment(a,e,o))}async __getThreadComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/${encodeURIComponent(e)}/comments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/threads/{threadId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getTraceComment(a,e,o){return h.fromPromise(this.__getTraceComment(a,e,o))}async __getTraceComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/${encodeURIComponent(e)}/comments/${encodeURIComponent(a)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/{traceId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getTraceThread(a,e){return h.fromPromise(this.__getTraceThread(a,e))}async __getTraceThread(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:oi.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:xa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new T(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceThreads(a={},e){return h.fromPromise(this.__getTraceThreads(a,e))}async __getTraceThreads(a={},e){var O,M;let{page:o,size:t,projectName:n,projectId:c,truncate:m,stripAttachments:u,filters:g,sorting:R,fromTime:y,toTime:v}=a,z={};o!=null&&(z.page=o.toString()),t!=null&&(z.size=t.toString()),n!=null&&(z.project_name=n),c!=null&&(z.project_id=c),m!=null&&(z.truncate=m.toString()),u!=null&&(z.strip_attachments=u.toString()),g!=null&&(z.filters=g),R!=null&&(z.sorting=R),y!=null&&(z.from_time=y.toISOString()),v!=null&&(z.to_time=v.toISOString());let S=await b({url:x((M=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?M:w.Default,"v1/private/traces/threads"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:z,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:rd.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse});switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/traces/threads.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}openTraceThread(a,e){return h.fromPromise(this.__openTraceThread(a,e))}async __openTraceThread(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/open"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:oi.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/threads/open.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfThreads(a,e){return h.fromPromise(this.__scoreBatchOfThreads(a,e))}async __scoreBatchOfThreads(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ro.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/threads/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfTraces(a,e){return h.fromPromise(this.__scoreBatchOfTraces(a,e))}async __scoreBatchOfTraces(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wa.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/traces/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraceThreads(a={},e){return h.fromPromise(this.__searchTraceThreads(a,e))}async __searchTraceThreads(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/threads/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:yo.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/threads/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraces(a={},e){return h.fromPromise(this.__searchTraces(a,e))}async __searchTraces(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/traces/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ko.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 401:throw new $(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/traces/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateThread(a,e,o){return h.fromPromise(this.__updateThread(a,e,o))}async __updateThread(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:fo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/threads/{threadModelId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}updateThreadComment(a,e,o){return h.fromPromise(this.__updateThreadComment(a,e,o))}async __updateThreadComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/threads/comments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/threads/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}updateTraceComment(a,e,o){return h.fromPromise(this.__updateTraceComment(a,e,o))}async __updateTraceComment(a,e,o){var n,c;let t=await b({url:x((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:w.Default,`v1/private/traces/comments/${encodeURIComponent(a)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new T(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PATCH /v1/private/traces/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Si=class{constructor(a={}){this._options=a;}getWelcomeWizardStatus(a){return h.fromPromise(this.__getWelcomeWizardStatus(a))}async __getWelcomeWizardStatus(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/welcome-wizard"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:ad.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/welcome-wizard.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}submitWelcomeWizard(a={},e){return h.fromPromise(this.__submitWelcomeWizard(a,e))}async __submitWelcomeWizard(a={},e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/welcome-wizard"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Co.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/welcome-wizard.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var _i=class{constructor(a={}){this._options=a;}costsSummary(a,e){return h.fromPromise(this.__costsSummary(a,e))}async __costsSummary(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:cr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Xe.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/costs/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceConfiguration(a){return h.fromPromise(this.__getWorkspaceConfiguration(a))}async __getWorkspaceConfiguration(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/workspaces/configurations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:Ra.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new T(e.error.body,e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}upsertWorkspaceConfiguration(a,e){return h.fromPromise(this.__upsertWorkspaceConfiguration(a,e))}async __upsertWorkspaceConfiguration(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ra.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ra.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling PUT /v1/private/workspaces/configurations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteWorkspaceConfiguration(a){return h.fromPromise(this.__deleteWorkspaceConfiguration(a))}async __deleteWorkspaceConfiguration(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:void 0,rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new T(e.error.body,e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling DELETE /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getCost(a,e){return h.fromPromise(this.__getCost(a,e))}async __getCost(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/costs"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:cr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ai.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/costs.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getMetric(a,e){return h.fromPromise(this.__getMetric(a,e))}async __getMetric(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/metrics"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:cr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ai.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/metrics.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}metricsSummary(a,e){return h.fromPromise(this.__metricsSummary(a,e))}async __metricsSummary(a,e){var t,n;let o=await b({url:x((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:w.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:cr.jsonOrThrow(a,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:td.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new f("Timeout exceeded when calling POST /v1/private/workspaces/metrics/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ti=class{constructor(a={}){this._options=a;}datasetsRedirect(a,e){return h.fromPromise(this.__datasetsRedirect(a,e))}async __datasetsRedirect(a,e){var u,g;let{datasetId:o,workspaceName:t,path:n}=a,c={};c.dataset_id=o,t!=null&&(c.workspace_name=t),c.path=n;let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,"v1/session/redirect/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);case 404:throw new T(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/datasets.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}experimentsRedirect(a,e){return h.fromPromise(this.__experimentsRedirect(a,e))}async __experimentsRedirect(a,e){var g,R;let{datasetId:o,experimentId:t,workspaceName:n,path:c}=a,m={};m.dataset_id=o,m.experiment_id=t,n!=null&&(m.workspace_name=n),m.path=c;let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/session/redirect/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:void 0,rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);case 404:throw new T(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/experiments.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}optimizationsRedirect(a,e){return h.fromPromise(this.__optimizationsRedirect(a,e))}async __optimizationsRedirect(a,e){var g,R;let{datasetId:o,optimizationId:t,workspaceName:n,path:c}=a,m={};m.dataset_id=o,m.optimization_id=t,n!=null&&(m.workspace_name=n),m.path=c;let u=await b({url:x((R=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?R:w.Default,"v1/session/redirect/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:void 0,rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);case 404:throw new T(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/optimizations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}projectsRedirect(a,e){return h.fromPromise(this.__projectsRedirect(a,e))}async __projectsRedirect(a,e){var u,g;let{traceId:o,workspaceName:t,path:n}=a,c={};c.trace_id=o,t!=null&&(c.workspace_name=t),c.path=n;let m=await b({url:x((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:w.Default,"v1/session/redirect/projects"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);case 404:throw new T(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /v1/session/redirect/projects.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ya=class{constructor(a={}){this._options=a;}get systemUsage(){var a;return (a=this._systemUsage)!=null?a:this._systemUsage=new ti(this._options)}get alerts(){var a;return (a=this._alerts)!=null?a:this._alerts=new ii(this._options)}get annotationQueues(){var a;return (a=this._annotationQueues)!=null?a:this._annotationQueues=new ni(this._options)}get attachments(){var a;return (a=this._attachments)!=null?a:this._attachments=new si(this._options)}get check(){var a;return (a=this._check)!=null?a:this._check=new pi(this._options)}get automationRuleEvaluators(){var a;return (a=this._automationRuleEvaluators)!=null?a:this._automationRuleEvaluators=new ci(this._options)}get chatCompletions(){var a;return (a=this._chatCompletions)!=null?a:this._chatCompletions=new li(this._options)}get dashboards(){var a;return (a=this._dashboards)!=null?a:this._dashboards=new mi(this._options)}get datasets(){var a;return (a=this._datasets)!=null?a:this._datasets=new di(this._options)}get experiments(){var a;return (a=this._experiments)!=null?a:this._experiments=new ui(this._options)}get feedbackDefinitions(){var a;return (a=this._feedbackDefinitions)!=null?a:this._feedbackDefinitions=new gi(this._options)}get guardrails(){var a;return (a=this._guardrails)!=null?a:this._guardrails=new fi(this._options)}get llmProviderKey(){var a;return (a=this._llmProviderKey)!=null?a:this._llmProviderKey=new hi(this._options)}get manualEvaluation(){var a;return (a=this._manualEvaluation)!=null?a:this._manualEvaluation=new wi(this._options)}get openTelemetryIngestion(){var a;return (a=this._openTelemetryIngestion)!=null?a:this._openTelemetryIngestion=new bi(this._options)}get optimizations(){var a;return (a=this._optimizations)!=null?a:this._optimizations=new xi(this._options)}get projects(){var a;return (a=this._projects)!=null?a:this._projects=new Ri(this._options)}get prompts(){var a;return (a=this._prompts)!=null?a:this._prompts=new yi(this._options)}get serviceToggles(){var a;return (a=this._serviceToggles)!=null?a:this._serviceToggles=new ki(this._options)}get spans(){var a;return (a=this._spans)!=null?a:this._spans=new vi(this._options)}get traces(){var a;return (a=this._traces)!=null?a:this._traces=new zi(this._options)}get welcomeWizard(){var a;return (a=this._welcomeWizard)!=null?a:this._welcomeWizard=new Si(this._options)}get workspaces(){var a;return (a=this._workspaces)!=null?a:this._workspaces=new _i(this._options)}get redirect(){var a;return (a=this._redirect)!=null?a:this._redirect=new Ti(this._options)}isAlive(a){return h.fromPromise(this.__isAlive(a))}async __isAlive(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"is-alive/ping"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /is-alive/ping.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}version(a){return h.fromPromise(this.__version(a))}async __version(a){var o,t;let e=await b({url:x((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t:w.Default,"is-alive/ver"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...a==null?void 0:a.headers},contentType:"application/json",requestType:"json",timeoutMs:(a==null?void 0:a.timeoutInSeconds)!=null?a.timeoutInSeconds*1e3:6e4,maxRetries:a==null?void 0:a.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new f("Timeout exceeded when calling GET /is-alive/ver.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var re=()=>uuid.v7();var Ai=class i{constructor(a,e){this.data=a;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=a=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...a,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=a=>{var o;let e={parentSpanId:this.data.parentSpanId,projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,traceId:this.data.traceId,...a};return this.opik.spanBatchQueue.update(this.data.id,e),this.data={...this.data,...a},this};this.span=a=>{var n;let e=(n=this.data.projectName)!=null?n:this.opik.config.projectName,o={id:re(),startTime:new Date,...a,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(o);let t=new i(o,this.opik);return this.childSpans.push(t),t};}};var Ei=class{constructor(a,e){this.data=a;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=a=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...a,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=a=>{var n,c;let e=(c=(n=this.data.projectName)!=null?n:a.projectName)!=null?c:this.opik.config.projectName,o={id:re(),startTime:new Date,...a,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(o);let t=new Ai(o,this.opik);return this.spans.push(t),t};this.update=a=>{var o;let e={projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,...a};return this.opik.traceBatchQueue.update(this.data.id,e),this.data={...this.data,...e},this};}};var Tg={EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECT_BY_NAME:"redirect/projects"},Pi={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",PROJECT_NAME:"name",PATH:"path"},Xb=i=>Object.entries(i).map(([a,e])=>`${a}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),Gb=i=>i.replace(/\/api$/,""),$b=i=>Buffer.from(i).toString("base64"),Ag=(i,a,e)=>{let o=Xb(e),t=`${a}?${o}`;return new URL(t,i).toString()},Eg=({datasetId:i,experimentId:a,baseUrl:e})=>Ag(e,Tg.EXPERIMENTS,{[Pi.EXPERIMENT_ID]:a,[Pi.DATASET_ID]:i,[Pi.PATH]:$b(e)});var Pg=({projectName:i,workspaceName:a,apiUrl:e})=>{let o=Gb(e),t=`${a}/${Tg.PROJECT_BY_NAME}`;return Ag(o,t,{[Pi.PROJECT_NAME]:i})};var Qb=300,Ci=100,ka=class{constructor({action:a,batchSize:e=Ci,delay:o,enableBatch:t,name:n="ActionQueue"}){this.timerId=null;this.promise=Promise.resolve();this.queue=new Map;this.debounceFlush=()=>{this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>this.flush(),this.delay);};this.add=(a,e)=>{if(this.queue.set(a,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(a,e)=>{let o=this.queue.get(a);o&&(this.queue.set(a,{...o,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let a=new Map(this.queue);this.queue.clear(),k.debug(`Adding ${a.size} items to ${this.name} promise:`,a),this.promise=this.promise.finally(()=>(k.debug(`Flushing ${this.name}:`,a),this.action(a))).catch(e=>{k.error(`Failed to flush ${this.name}:`,e,a);}),await this.promise;};this.action=a,this.batchSize=e,this.delay=o,this.enableBatch=t,this.name=n;}},de=class{constructor({delay:a=Qb,enableCreateBatch:e=true,enableUpdateBatch:o=false,enableDeleteBatch:t=true,createBatchSize:n=Ci,updateBatchSize:c=Ci,deleteBatchSize:m=Ci,name:u="BatchQueue"}={}){this.create=a=>{let e=this.getId(a);this.createQueue.add(e,a);};this.get=async a=>{let e=this.createQueue.queue.get(a);return e||this.getEntity(a)};this.update=(a,e)=>{if(this.createQueue.queue.get(a)){this.createQueue.update(a,e);return}this.updateQueue.add(a,e);};this.delete=a=>{if(this.createQueue.queue.has(a)){this.createQueue.queue.delete(a);return}this.deleteQueue.add(a);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=u,this.createQueue=new ka({action:async g=>{await this.createEntities(Array.from(g.values()));},delay:a,enableBatch:e,batchSize:n,name:`${u}:createQueue`}),this.updateQueue=new ka({action:async g=>{await this.createQueue.flush();let R=Array.from(g.entries());for(let[y,v]of R)await this.updateEntity(y,v);},delay:a,enableBatch:o,batchSize:c,name:`${u}:updateQueue`}),this.deleteQueue=new ka({action:async g=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(g.keys()));},delay:a,enableBatch:t,batchSize:m,name:`${u}:deleteQueue`});}};var Ii=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.spans.createSpans({spans:e},this.api.requestOptions);}async getEntity(e){return await this.api.spans.getSpanById(e,{},this.api.requestOptions)}async updateEntity(e,o){await this.api.spans.updateSpan(e,o,this.api.requestOptions);}async deleteEntities(e){for(let o of e)await this.api.spans.deleteSpanById(o,this.api.requestOptions);}};var ji=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.spans.scoreBatchOfSpans({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let o of e)await this.api.spans.deleteSpanFeedbackScore(o.id,{name:o.name},this.api.requestOptions);}};var Ui=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.traces.createTraces({traces:e},this.api.requestOptions);}async getEntity(e){return await this.api.traces.getTraceById(e,{},this.api.requestOptions)}async updateEntity(e,o){await this.api.traces.updateTrace(e,o,this.api.requestOptions);}async deleteEntities(e){await this.api.traces.deleteTraces({ids:e},this.api.requestOptions);}};var Di=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.traces.scoreBatchOfTraces({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let o of e)await this.api.traces.deleteTraceFeedbackScore(o.id,{name:o.name},this.api.requestOptions);}};var Ni=class extends ya{constructor(e){super(e);this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};var Mi=class extends de{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=e;}getId(e){return e.id||""}async createEntities(e){for(let o of e)await this.api.datasets.createDataset(o,this.api.requestOptions);}async getEntity(e){try{return await this.api.datasets.getDatasetById(e,this.api.requestOptions)}catch{return}}async updateEntity(e,o){await this.api.datasets.updateDataset(e,{name:o.name||"",visibility:o.visibility,description:o.description},this.api.requestOptions);}async deleteEntities(e){await this.api.datasets.deleteDatasetsBatch({ids:e},this.api.requestOptions);}};var id=null;async function Cg(){return id||(id=await Yb__default.default()),id}var va=class i{constructor(a){let{id:e,traceId:o,spanId:t,source:n,...c}=a;this.id=e||re(),this.traceId=o,this.spanId=t,this.source=n||_n.Sdk,this.data={...c};}getContent(a=false){return a?{...this.data,id:this.id}:{...this.data}}async contentHash(){let a=this.getContent(),e=Zb__default.default(a);return (await Cg()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent()}}static fromApiModel(a){return new i({id:a.id,traceId:a.traceId,spanId:a.spanId,source:a.source,...a.data})}};async function je(i,a,e){var c;if(e===0)return [];let o=new util.TextDecoder("utf-8"),t=[],n="";try{for await(let m of i){n+=o.decode(m,{stream:!0});let u=n.split(`
|
|
5
|
-
`);n=(c=u.pop())!=null?c:"";for(let g of u)if(!(!g.trim()||g==="{}"||g==="[]"||g==="null"))try{let
|
|
1
|
+
'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),wu=require('fs'),Rh=require('ini');require('dotenv/config');var cb=require('qs'),uuid=require('uuid'),Bx=require('fast-json-stable-stringify'),Wx=require('xxhash-wasm'),util=require('util'),Xx=require('mustache'),$x=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),Zx=require('fast-deep-equal'),async_hooks=require('async_hooks'),sn=require('chalk'),cR=require('boxen'),lR=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 wu__default=/*#__PURE__*/_interopDefault(wu);var Rh__default=/*#__PURE__*/_interopDefault(Rh);var cb__default=/*#__PURE__*/_interopDefault(cb);var Bx__default=/*#__PURE__*/_interopDefault(Bx);var Wx__default=/*#__PURE__*/_interopDefault(Wx);var Xx__default=/*#__PURE__*/_interopDefault(Xx);var $x__default=/*#__PURE__*/_interopDefault($x);var Zx__default=/*#__PURE__*/_interopDefault(Zx);var sn__default=/*#__PURE__*/_interopDefault(sn);var cR__default=/*#__PURE__*/_interopDefault(cR);var lR__default=/*#__PURE__*/_interopDefault(lR);var cu=Object.create;var mr=Object.defineProperty;var lu=Object.getOwnPropertyDescriptor;var sh=Object.getOwnPropertyNames;var ph=Object.getPrototypeOf,ch=Object.prototype.hasOwnProperty;var mu=(a,i)=>(i=Symbol[a])?i:Symbol.for("Symbol."+a),Cr=a=>{throw TypeError(a)};var lh=(a,i,e)=>i in a?mr(a,i,{enumerable:true,configurable:true,writable:true,value:e}):a[i]=e;var ue=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(i,e)=>(typeof require!="undefined"?require:i)[e]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var bn=(a,i)=>()=>(a&&(i=a(a=0)),i);var Y=(a,i)=>()=>(i||a((i={exports:{}}).exports,i),i.exports),E=(a,i)=>{for(var e in i)mr(a,e,{get:i[e],enumerable:true});},mh=(a,i,e,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of sh(i))!ch.call(a,t)&&t!==e&&mr(a,t,{get:()=>i[t],enumerable:!(o=lu(i,t))||o.enumerable});return a};var dh=(a,i,e)=>(e=a!=null?cu(ph(a)):{},mh(mr(e,"default",{value:a,enumerable:true}),a));var du=a=>{var i;return [,,,cu((i=void 0)!=null?i:null)]},uu=["class","method","getter","setter","accessor","field","value","get","set"],Pr=a=>a!==void 0&&typeof a!="function"?Cr("Function expected"):a,uh=(a,i,e,o,t)=>({kind:uu[a],name:i,metadata:o,addInitializer:n=>e._?Cr("Already initialized"):t.push(Pr(n||null))}),xn=(a,i)=>lh(i,mu("metadata"),a[3]),gu=(a,i,e,o)=>{for(var t=0,n=a[i>>1],c=n&&n.length;t<c;t++)n[t].call(e);return o},fu=(a,i,e,o,t,n)=>{var m,u,g,f,y=i&7,v=false,z=false,S=2,O=uu[y+5],G=a[S]||(a[S]=[]),ie=((t=t.prototype),lu(t,e));for(var lr=o.length-1;lr>=0;lr--)g=uh(y,e,u={},a[3],G),(g.static=v,g.private=z,f=g.access={has:pe=>e in pe},(f.get=pe=>pe[e]),y>2),m=(0, o[lr])(ie[O],g),u._=1,Pr(m)&&(ie[O]=m);return ie&&mr(t,e,ie),t};var Ku={};E(Ku,{Node18UniversalStreamWrapper:()=>Fn});var Fn,Gu=bn(()=>{Fn=class a{constructor(i){this.readableStream=i,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(i,e){var o;(o=this.events[i])==null||o.push(e);}off(i,e){var o;this.events[i]=(o=this.events[i])==null?void 0:o.filter(t=>t!==e);}pipe(i){return this.on("data",async e=>{if(i instanceof a)i._write(e);else if(i instanceof WritableStream){let o=i.getWriter();o.write(e).then(()=>o.releaseLock());}else i.write(e);}),this.on("end",async()=>{i instanceof a?i._end():i instanceof WritableStream?i.getWriter().close():i.end();}),this.on("error",async e=>{i instanceof a?i._error(e):i instanceof WritableStream?i.getWriter().abort(e):i.destroy(e);}),this._startReading(),i}pipeTo(i){return this.pipe(i)}unpipe(i){this.off("data",async e=>{if(i instanceof a)i._write(e);else if(i instanceof WritableStream){let o=i.getWriter();o.write(e).then(()=>o.releaseLock());}else i.write(e);}),this.off("end",async()=>{i instanceof a?i._end():i instanceof WritableStream?i.getWriter().close():i.end();}),this.off("error",async e=>{i instanceof a?i._error(e):i instanceof WritableStream?i.getWriter().abort(e):i.destroy(e);});}destroy(i){this.reader.cancel(i).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:i,value:e}=await this.reader.read();if(!i)return e}setEncoding(i){this.encoding=i;}async text(){let i=[];for(;;){let{done:o,value:t}=await this.reader.read();if(o)break;t&&i.push(t);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(i).arrayBuffer())}async json(){let i=await this.text();return JSON.parse(i)}_write(i){this._emit("data",i);}_end(){this._emit("end");}_error(i){this._emit("error",i);}_emit(i,e){if(this.events[i])for(let o of this.events[i]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:i,value:e}=await this.reader.read();if(i){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(i){this._emit("error",i);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:i,value:e}=await this.reader.read();return i?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var $u={};E($u,{UndiciStreamWrapper:()=>On});var On,Qu=bn(()=>{On=class a{constructor(i){this.readableStream=i,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(i,e){var o;(o=this.events[i])==null||o.push(e);}off(i,e){var o;this.events[i]=(o=this.events[i])==null?void 0:o.filter(t=>t!==e);}pipe(i){return this.on("data",e=>{if(i instanceof a)i._write(e);else {let o=i.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.on("end",()=>{i instanceof a?i._end():i.getWriter().close();}),this.on("error",e=>{i instanceof a?i._error(e):i.getWriter().abort(e);}),this._startReading(),i}pipeTo(i){return this.pipe(i)}unpipe(i){this.off("data",e=>{if(i instanceof a)i._write(e);else {let o=i.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.off("end",()=>{i instanceof a?i._end():i.getWriter().close();}),this.off("error",e=>{i instanceof a?i._error(e):i.getWriter().abort(e);});}destroy(i){this.reader.cancel(i).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:i,value:e}=await this.reader.read();if(!i)return e}setEncoding(i){this.encoding=i;}async text(){let i=[];for(;;){let{done:o,value:t}=await this.reader.read();if(o)break;t&&i.push(t);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(i).arrayBuffer())}async json(){let i=await this.text();return JSON.parse(i)}_write(i){this._emit("data",i);}_end(){this._emit("end");}_error(i){this._emit("error",i);}_emit(i,e){if(this.events[i])for(let o of this.events[i]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:i,value:e}=await this.reader.read();if(i){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(i){this._emit("error",i);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:i,value:e}=await this.reader.read();return i?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var Yu={};E(Yu,{NodePre18StreamWrapper:()=>Wn});var Wn,Zu=bn(()=>{Wn=class{constructor(i){this.readableStream=i;}on(i,e){this.readableStream.on(i,e);}off(i,e){this.readableStream.off(i,e);}pipe(i){return this.readableStream.pipe(i),i}pipeTo(i){return this.pipe(i)}unpipe(i){i?this.readableStream.unpipe(i):this.readableStream.unpipe();}destroy(i){this.readableStream.destroy(i);}pause(){this.readableStream.pause();}resume(){this.readableStream.resume();}get isPaused(){return this.readableStream.isPaused()}async read(){return new Promise((i,e)=>{let o=this.readableStream.read();o?i(o):(this.readableStream.once("readable",()=>{let t=this.readableStream.read();i(t);}),this.readableStream.once("error",e));})}setEncoding(i){this.readableStream.setEncoding(i),this.encoding=i;}async text(){let i=[],e=new TextEncoder;this.readableStream.setEncoding(this.encoding||"utf-8");for await(let t of this.readableStream)i.push(e.encode(t));return new TextDecoder(this.encoding||"utf-8").decode(Buffer.concat(i))}async json(){let i=await this.text();return JSON.parse(i)}[Symbol.asyncIterator](){let e=this.readableStream[Symbol.asyncIterator]();return {async next(){let{value:o,done:t}=await e.next();return {value:o,done:t}},[Symbol.asyncIterator](){return this}}}};});var sg=Y((CU,ng)=>{var ag=ue("stream").Stream,gb=ue("util");ng.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=[];}gb.inherits(we,ag);we.create=function(a,i){var e=new this;i=i||{};for(var o in i)e[o]=i[o];e.source=a;var t=a.emit;return a.emit=function(){return e._handleEmit(arguments),t.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=ag.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 mg=Y((jU,lg)=>{var fb=ue("util"),cg=ue("stream").Stream,pg=sg();lg.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;}fb.inherits(V,cg);V.create=function(a){var i=new this;a=a||{};for(var e in a)i[e]=a[e];return i};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 i=V.isStreamLike(a);if(i){if(!(a instanceof pg)){var e=pg.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,i){return cg.prototype.pipe.call(this,a,i),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 i=a;i(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 i=V.isStreamLike(a);if(i){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 i=this;a.on("error",function(e){i._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(i){i.dataSize&&(a.dataSize+=i.dataSize);}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize);};V.prototype._emitError=function(a){this._reset(),this.emit("error",a);};});var dg=Y((IU,hb)=>{hb.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 gg=Y((UU,ug)=>{ug.exports=dg();});var wg=Y(te=>{var lt=gg(),wb=ue("path").extname,fg=/^\s*([^;\s]*)(?:;|\s|$)/,bb=/^text\//i;te.charset=hg;te.charsets={lookup:hg};te.contentType=xb;te.extension=Rb;te.extensions=Object.create(null);te.lookup=yb;te.types=Object.create(null);kb(te.extensions,te.types);function hg(a){if(!a||typeof a!="string")return false;var i=fg.exec(a),e=i&<[i[1].toLowerCase()];return e&&e.charset?e.charset:i&&bb.test(i[1])?"UTF-8":false}function xb(a){if(!a||typeof a!="string")return false;var i=a.indexOf("/")===-1?te.lookup(a):a;if(!i)return false;if(i.indexOf("charset")===-1){var e=te.charset(i);e&&(i+="; charset="+e.toLowerCase());}return i}function Rb(a){if(!a||typeof a!="string")return false;var i=fg.exec(a),e=i&&te.extensions[i[1].toLowerCase()];return !e||!e.length?false:e[0]}function yb(a){if(!a||typeof a!="string")return false;var i=wb("x."+a).toLowerCase().substr(1);return i&&te.types[i]||false}function kb(a,i){var e=["nginx","apache",void 0,"iana"];Object.keys(lt).forEach(function(t){var n=lt[t],c=n.extensions;if(!(!c||!c.length)){a[t]=c;for(var m=0;m<c.length;m++){var u=c[m];if(i[u]){var g=e.indexOf(lt[i[u]].source),f=e.indexOf(n.source);if(i[u]!=="application/octet-stream"&&(g>f||g===f&&i[u].substr(0,12)==="application/"))continue}i[u]=t;}}});}});var xg=Y((MU,bg)=>{bg.exports=vb;function vb(a){var i=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;i?i(a):setTimeout(a,0);}});var Bn=Y((DU,yg)=>{var Rg=xg();yg.exports=zb;function zb(a){var i=false;return Rg(function(){i=true;}),function(o,t){i?a(o,t):Rg(function(){a(o,t);});}}});var Ln=Y((FU,kg)=>{kg.exports=Sb;function Sb(a){Object.keys(a.jobs).forEach(_b.bind(a)),a.jobs={};}function _b(a){typeof this.jobs[a]=="function"&&this.jobs[a]();}});var Vn=Y((OU,zg)=>{var vg=Bn(),Ab=Ln();zg.exports=Tb;function Tb(a,i,e,o){var t=e.keyedList?e.keyedList[e.index]:e.index;e.jobs[t]=Eb(i,t,a[t],function(n,c){t in e.jobs&&(delete e.jobs[t],n?Ab(e):e.results[t]=c,o(n,e.results));});}function Eb(a,i,e,o){var t;return a.length==2?t=a(e,vg(o)):t=a(e,i,vg(o)),t}});var Hn=Y((WU,Sg)=>{Sg.exports=Pb;function Pb(a,i){var e=!Array.isArray(a),o={index:0,keyedList:e||i?Object.keys(a):null,jobs:{},results:e?{}:[],size:e?Object.keys(a).length:a.length};return i&&o.keyedList.sort(e?i:function(t,n){return i(a[t],a[n])}),o}});var Jn=Y((BU,_g)=>{var Cb=Ln(),jb=Bn();_g.exports=Ib;function Ib(a){Object.keys(this.jobs).length&&(this.index=this.size,Cb(this),jb(a)(null,this.results));}});var Tg=Y((LU,Ag)=>{var Ub=Vn(),Nb=Hn(),Mb=Jn();Ag.exports=Db;function Db(a,i,e){for(var o=Nb(a);o.index<(o.keyedList||a).length;)Ub(a,i,o,function(t,n){if(t){e(t,n);return}if(Object.keys(o.jobs).length===0){e(null,o.results);return}}),o.index++;return Mb.bind(o,e)}});var Xn=Y((VU,mt)=>{var Eg=Vn(),Fb=Hn(),Ob=Jn();mt.exports=Wb;mt.exports.ascending=Pg;mt.exports.descending=Bb;function Wb(a,i,e,o){var t=Fb(a,e);return Eg(a,i,t,function n(c,m){if(c){o(c,m);return}if(t.index++,t.index<(t.keyedList||a).length){Eg(a,i,t,n);return}o(null,t.results);}),Ob.bind(t,o)}function Pg(a,i){return a<i?-1:a>i?1:0}function Bb(a,i){return -1*Pg(a,i)}});var jg=Y((HU,Cg)=>{var Lb=Xn();Cg.exports=Vb;function Vb(a,i,e){return Lb(a,i,null,e)}});var Ug=Y((JU,Ig)=>{Ig.exports={parallel:Tg(),serial:jg(),serialOrdered:Xn()};});var Mg=Y((XU,Ng)=>{Ng.exports=function(a,i){return Object.keys(i).forEach(function(e){a[e]=a[e]||i[e];}),a};});var Fg=Y((KU,Dg)=>{var Qn=mg(),Hb=ue("util"),Kn=ue("path"),Jb=ue("http"),Xb=ue("https"),Kb=ue("url").parse,Gb=ue("fs"),$b=ue("stream").Stream,Gn=wg(),Qb=Ug(),$n=Mg();Dg.exports=C;Hb.inherits(C,Qn);function C(a){if(!(this instanceof C))return new C(a);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Qn.call(this),a=a||{};for(var i in a)this[i]=a[i];}C.LINE_BREAK=`\r
|
|
2
|
+
`;C.DEFAULT_CONTENT_TYPE="application/octet-stream";C.prototype.append=function(a,i,e){e=e||{},typeof e=="string"&&(e={filename:e});var o=Qn.prototype.append.bind(this);if(typeof i=="number"&&(i=""+i),Array.isArray(i)){this._error(new Error("Arrays are not supported."));return}var t=this._multiPartHeader(a,i,e),n=this._multiPartFooter();o(t),o(i),o(n),this._trackLength(t,i,e);};C.prototype._trackLength=function(a,i,e){var o=0;e.knownLength!=null?o+=+e.knownLength:Buffer.isBuffer(i)?o=i.length:typeof i=="string"&&(o=Buffer.byteLength(i)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(a)+C.LINE_BREAK.length,!(!i||!i.path&&!(i.readable&&i.hasOwnProperty("httpVersion"))&&!(i instanceof $b))&&(e.knownLength||this._valuesToMeasure.push(i));};C.prototype._lengthRetriever=function(a,i){a.hasOwnProperty("fd")?a.end!=null&&a.end!=1/0&&a.start!=null?i(null,a.end+1-(a.start?a.start:0)):Gb.stat(a.path,function(e,o){var t;if(e){i(e);return}t=o.size-(a.start?a.start:0),i(null,t);}):a.hasOwnProperty("httpVersion")?i(null,+a.headers["content-length"]):a.hasOwnProperty("httpModule")?(a.on("response",function(e){a.pause(),i(null,+e.headers["content-length"]);}),a.resume()):i("Unknown stream");};C.prototype._multiPartHeader=function(a,i,e){if(typeof e.header=="string")return e.header;var o=this._getContentDisposition(i,e),t=this._getContentType(i,e),n="",c={"Content-Disposition":["form-data",'name="'+a+'"'].concat(o||[]),"Content-Type":[].concat(t||[])};typeof e.header=="object"&&$n(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,i){var e,o;return typeof i.filepath=="string"?e=Kn.normalize(i.filepath).replace(/\\/g,"/"):i.filename||a.name||a.path?e=Kn.basename(i.filename||a.name||a.path):a.readable&&a.hasOwnProperty("httpVersion")&&(e=Kn.basename(a.client._httpMessage.path||"")),e&&(o='filename="'+e+'"'),o};C.prototype._getContentType=function(a,i){var e=i.contentType;return !e&&a.name&&(e=Gn.lookup(a.name)),!e&&a.path&&(e=Gn.lookup(a.path)),!e&&a.readable&&a.hasOwnProperty("httpVersion")&&(e=a.headers["content-type"]),!e&&(i.filepath||i.filename)&&(e=Gn.lookup(i.filepath||i.filename)),!e&&typeof a=="object"&&(e=C.DEFAULT_CONTENT_TYPE),e};C.prototype._multiPartFooter=function(){return function(a){var i=C.LINE_BREAK,e=this._streams.length===0;e&&(i+=this._lastBoundary()),a(i);}.bind(this)};C.prototype._lastBoundary=function(){return "--"+this.getBoundary()+"--"+C.LINE_BREAK};C.prototype.getHeaders=function(a){var i,e={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(i in a)a.hasOwnProperty(i)&&(e[i.toLowerCase()]=a[i]);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),i=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,i.length+2)!==i)&&(a=Buffer.concat([a,Buffer.from(C.LINE_BREAK)])));return Buffer.concat([a,Buffer.from(this._lastBoundary())])};C.prototype._generateBoundary=function(){for(var a="--------------------------",i=0;i<24;i++)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 i=this._overheadLength+this._valueLength;if(this._streams.length&&(i+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(a.bind(this,null,i));return}Qb.parallel(this._valuesToMeasure,this._lengthRetriever,function(e,o){if(e){a(e);return}o.forEach(function(t){i+=t;}),a(null,i);});};C.prototype.submit=function(a,i){var e,o,t={method:"post"};return typeof a=="string"?(a=Kb(a),o=$n({port:a.port,path:a.pathname,host:a.hostname,protocol:a.protocol},t)):(o=$n(a,t),o.port||(o.port=o.protocol=="https:"?443:80)),o.headers=this.getHeaders(a.headers),o.protocol=="https:"?e=Xb.request(o):e=Jb.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),i){var m,u=function(g,f){return e.removeListener("error",u),e.removeListener("response",m),i.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 bh={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};function Qi(a,i=a){return ansiEscapes.link(i,a)}var k=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),hu=a=>{k.settings.minLevel=bh[a];},xh=()=>{k.settings.minLevel=100;};hu(process.env.OPIK_LOG_LEVEL||"INFO");var yh="~/.opik.config",yn={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false};function bu(a){return Object.fromEntries(Object.entries(a).filter(([,i])=>i!==void 0))}function kh(){return bu({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 vh(){let a=process.env.OPIK_CONFIG_PATH||yh;if(!wu__default.default.existsSync(a)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${a}`);return {}}try{let i=Rh__default.default.parse(wu__default.default.readFileSync(a,"utf8"));return i.opik?bu({apiKey:i.opik.api_key,apiUrl:i.opik.url_override,projectName:i.opik.project_name,workspaceName:i.opik.workspace}):{}}catch(i){return k.error(`Error loading config file ${a}: ${i}`),{}}}function xu(a){let i=kh(),e=vh(),{headers:o,...t}=a||{};return zh({...yn,...e,...i,...t})}function zh(a){if(!a.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");let i=Sh(a.apiUrl);if(i&&!a.apiKey)throw new Error("OPIK_API_KEY is not set");if(i&&!a.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return a}function Sh(a){return new URL(a).hostname.endsWith("comet.com")}var X={};E(X,{AlertAlertType:()=>_h,AlertPublicAlertType:()=>Uh,AlertTriggerConfigPublicType:()=>jh,AlertTriggerConfigType:()=>Th,AlertTriggerConfigWriteType:()=>Eh,AlertTriggerEventType:()=>Ah,AlertTriggerPublicEventType:()=>Ih,AlertTriggerWriteEventType:()=>Ph,AlertWriteAlertType:()=>Ch,AnnotationQueuePublicScope:()=>Fh,AnnotationQueueScope:()=>Mh,AnnotationQueueWriteScope:()=>Dh,AssistantMessageRole:()=>iw,AttachmentListRequestEntityType:()=>yu,BadRequestError:()=>_,CheckName:()=>zw,CheckPublicName:()=>ib,CheckPublicResult:()=>tb,CheckResult:()=>Sw,ColumnCompareTypesItem:()=>dw,ColumnPublicTypesItem:()=>yw,ColumnTypesItem:()=>kw,CompleteMultipartUploadRequestEntityType:()=>Oh,ConflictError:()=>F,DatasetItemCompareSource:()=>uw,DatasetItemFilterOperator:()=>aw,DatasetItemPublicSource:()=>xw,DatasetItemSource:()=>pw,DatasetItemWriteSource:()=>Mn,DatasetPublicStatus:()=>bw,DatasetPublicVisibility:()=>ww,DatasetStatus:()=>sw,DatasetUpdateVisibility:()=>_u,DatasetVisibility:()=>nw,DatasetWriteVisibility:()=>Su,DeleteAttachmentsRequestEntityType:()=>Wh,DownloadAttachmentRequestEntityType:()=>ku,ExperimentItemCompareTraceVisibilityMode:()=>gw,ExperimentItemPublicTraceVisibilityMode:()=>Rw,ExperimentItemTraceVisibilityMode:()=>cw,ExperimentPublicStatus:()=>Cw,ExperimentPublicType:()=>Pw,ExperimentStatus:()=>vw,ExperimentType:()=>Dn,ExperimentUpdateStatus:()=>Pu,ExperimentUpdateType:()=>Eu,ExperimentWriteStatus:()=>Tu,ExperimentWriteType:()=>Au,FeedbackScoreBatchItemSource:()=>ob,FeedbackScoreBatchItemThreadSource:()=>sb,FeedbackScoreCompareSource:()=>fw,FeedbackScoreExperimentItemBulkWriteViewSource:()=>Aw,FeedbackScorePublicSource:()=>qw,FeedbackScoreSource:()=>lw,FindFeedbackDefinitionsRequestType:()=>Cu,FindFeedbackScoreNames1RequestType:()=>Wu,ForbiddenError:()=>Z,GetSpanStatsRequestType:()=>Bu,GetSpansByProjectRequestType:()=>Ou,GetWebhookExamplesRequestAlertType:()=>Ru,GuardrailName:()=>jw,GuardrailResult:()=>Iw,GuardrailWriteName:()=>Uw,GuardrailWriteResult:()=>Nw,LlmAsJudgeMessagePublicRole:()=>Yh,LlmAsJudgeMessageRole:()=>Bh,LlmAsJudgeMessageWriteRole:()=>Xh,LlmAsJudgeOutputSchemaPublicType:()=>Zh,LlmAsJudgeOutputSchemaType:()=>Lh,LlmAsJudgeOutputSchemaWriteType:()=>Kh,LogItemLevel:()=>ow,ManualEvaluationRequestEntityType:()=>Fw,NotFoundError:()=>A,NotImplementedError:()=>Ve,OptimizationPublicStatus:()=>Bw,OptimizationStatus:()=>Ow,OptimizationUpdateStatus:()=>Iu,OptimizationWriteStatus:()=>Ww,ProjectDetailedVisibility:()=>Xw,ProjectMetricRequestPublicInterval:()=>Du,ProjectMetricRequestPublicMetricType:()=>Mu,ProjectMetricResponsePublicInterval:()=>Jw,ProjectMetricResponsePublicMetricType:()=>Hw,ProjectPublicVisibility:()=>Vw,ProjectUpdateVisibility:()=>Nu,ProjectVisibility:()=>Lw,ProjectWriteVisibility:()=>Uu,PromptType:()=>Kw,PromptVersionDetailType:()=>$w,PromptVersionPublicType:()=>Qw,PromptVersionType:()=>Gw,PromptWriteType:()=>Fu,ProviderApiKeyProvider:()=>Dw,ProviderApiKeyPublicProvider:()=>Mw,ProviderApiKeyWriteProvider:()=>ju,ResponseFormatType:()=>tw,SpanExperimentItemBulkWriteViewType:()=>Tw,SpanFilterOperator:()=>Vh,SpanFilterPublicOperator:()=>qh,SpanFilterWriteOperator:()=>Gh,SpanPublicType:()=>eb,SpanSearchStreamRequestPublicType:()=>Lu,SpanType:()=>ze,SpanUpdateType:()=>Yw,SpanWriteType:()=>Zw,StartMultipartUploadRequestEntityType:()=>vu,TraceFilterOperator:()=>Hh,TraceFilterPublicOperator:()=>ew,TraceFilterWriteOperator:()=>$h,TracePublicVisibilityMode:()=>ab,TraceThreadFilterOperator:()=>Jh,TraceThreadFilterPublicOperator:()=>rw,TraceThreadFilterWriteOperator:()=>Qh,TraceThreadStatus:()=>nb,TraceVisibilityMode:()=>_w,UnauthorizedError:()=>$,UnprocessableEntityError:()=>B,UploadAttachmentRequestEntityType:()=>zu,ValueEntryCompareSource:()=>hw,ValueEntryExperimentItemBulkWriteViewSource:()=>Ew,ValueEntryPublicSource:()=>rb,ValueEntrySource:()=>mw,WebhookTestResultStatus:()=>Nh,alerts:()=>Yi,annotationQueues:()=>vn,attachments:()=>Zi,automationRuleEvaluators:()=>Sn,chatCompletions:()=>_n,check:()=>zn,dashboards:()=>An,datasets:()=>qi,experiments:()=>et,feedbackDefinitions:()=>rt,guardrails:()=>Tn,llmProviderKey:()=>ot,manualEvaluation:()=>En,openTelemetryIngestion:()=>Pn,optimizations:()=>it,projects:()=>tt,prompts:()=>at,redirect:()=>Nn,serviceToggles:()=>Cn,spans:()=>nt,systemUsage:()=>kn,traces:()=>jn,welcomeWizard:()=>In,workspaces:()=>Un});var Yi={};E(Yi,{GetWebhookExamplesRequestAlertType:()=>Ru});var Ru={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Zi={};E(Zi,{AttachmentListRequestEntityType:()=>yu,DownloadAttachmentRequestEntityType:()=>ku,StartMultipartUploadRequestEntityType:()=>vu,UploadAttachmentRequestEntityType:()=>zu});var yu={Trace:"trace",Span:"span"};var ku={Trace:"trace",Span:"span"};var vu={Trace:"trace",Span:"span"};var zu={Trace:"trace",Span:"span"};var qi={};E(qi,{DatasetUpdateVisibility:()=>_u,DatasetWriteVisibility:()=>Su});var Su={Private:"private",Public:"public"};var _u={Private:"private",Public:"public"};var et={};E(et,{ExperimentUpdateStatus:()=>Pu,ExperimentUpdateType:()=>Eu,ExperimentWriteStatus:()=>Tu,ExperimentWriteType:()=>Au});var Au={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Tu={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Eu={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Pu={Running:"running",Completed:"completed",Cancelled:"cancelled"};var rt={};E(rt,{FindFeedbackDefinitionsRequestType:()=>Cu});var Cu={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};var ot={};E(ot,{ProviderApiKeyWriteProvider:()=>ju});var ju={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var it={};E(it,{OptimizationUpdateStatus:()=>Iu});var Iu={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var tt={};E(tt,{ProjectMetricRequestPublicInterval:()=>Du,ProjectMetricRequestPublicMetricType:()=>Mu,ProjectUpdateVisibility:()=>Nu,ProjectWriteVisibility:()=>Uu});var Uu={Private:"private",Public:"public"};var Nu={Private:"private",Public:"public"};var Mu={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 Du={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var at={};E(at,{PromptWriteType:()=>Fu});var Fu={Mustache:"mustache",Jinja2:"jinja2"};var nt={};E(nt,{FindFeedbackScoreNames1RequestType:()=>Wu,GetSpanStatsRequestType:()=>Bu,GetSpansByProjectRequestType:()=>Ou,SpanSearchStreamRequestPublicType:()=>Lu});var Ou={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Wu={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Bu={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Lu={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var kn={};var vn={};var zn={};var Sn={};var _n={};var An={};var Tn={};var En={};var Pn={};var Cn={};var jn={};var In={};var Un={};var Nn={};var _h={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Ah={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 Th={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Eh={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Ph={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 Ch={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var jh={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var Ih={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 Uh={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var Nh={Success:"success",Failure:"failure"};var Mh={Trace:"trace",Thread:"thread"};var Dh={Trace:"trace",Thread:"thread"};var Fh={Trace:"trace",Thread:"thread"};var Oh={Trace:"trace",Span:"span"};var Wh={Trace:"trace",Span:"span"};var Bh={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var Lh={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var Vh={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 Hh={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 Jh={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 Xh={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var Kh={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var Gh={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 $h={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 Qh={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 Yh={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var Zh={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var qh={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 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={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};var iw={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};var tw={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};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={Private:"private",Public:"public"};var sw={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 lw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var mw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Mn={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var dw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var uw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var gw={Default:"default",Hidden:"hidden"};var fw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var hw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};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={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var kw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Dn={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var vw={Running:"running",Completed:"completed",Cancelled:"cancelled"};var zw={Topic:"TOPIC",Pii:"PII"};var Sw={Passed:"passed",Failed:"failed"};var ze={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var _w={Default:"default",Hidden:"hidden"};var Aw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Tw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Ew={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Pw={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Cw={Running:"running",Completed:"completed",Cancelled:"cancelled"};var jw={Topic:"TOPIC",Pii:"PII"};var Iw={Passed:"passed",Failed:"failed"};var Uw={Topic:"TOPIC",Pii:"PII"};var Nw={Passed:"passed",Failed:"failed"};var Mw={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Dw={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm"};var Fw={Trace:"trace",Thread:"thread"};var Ow={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var Ww={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var Bw={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var Lw={Private:"private",Public:"public"};var Vw={Private:"private",Public:"public"};var Hw={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 Jw={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var Xw={Private:"private",Public:"public"};var Kw={Mustache:"mustache",Jinja2:"jinja2"};var Gw={Mustache:"mustache",Jinja2:"jinja2"};var $w={Mustache:"mustache",Jinja2:"jinja2"};var Qw={Mustache:"mustache",Jinja2:"jinja2"};var Yw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Zw={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var qw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var eb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var rb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var ob={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var ib={Topic:"TOPIC",Pii:"PII"};var tb={Passed:"passed",Failed:"failed"};var ab={Default:"default",Hidden:"hidden"};var nb={Active:"active",Inactive:"inactive"};var sb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ie=(a,i,e)=>JSON.stringify(a,i,e);var p=class a extends Error{constructor({message:i,statusCode:e,body:o,rawResponse:t}){super(pb({message:i,statusCode:e,body:o})),Object.setPrototypeOf(this,a.prototype),this.statusCode=e,this.body=o,this.rawResponse=t;}};function pb({message:a,statusCode:i,body:e}){let o=[];return a!=null&&o.push(a),i!=null&&o.push(`Status code: ${i.toString()}`),e!=null&&o.push(`Body: ${Ie(e,void 0,2)}`),o.join(`
|
|
3
|
+
`)}var h=class a extends Error{constructor(i){super(i),Object.setPrototypeOf(this,a.prototype);}};var _=class a extends p{constructor(i,e){super({message:"BadRequestError",statusCode:400,body:i,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var F=class a extends p{constructor(i,e){super({message:"ConflictError",statusCode:409,body:i,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var B=class a extends p{constructor(i,e){super({message:"UnprocessableEntityError",statusCode:422,body:i,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var A=class a extends p{constructor(i,e){super({message:"NotFoundError",statusCode:404,body:i,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var $=class a extends p{constructor(i,e){super({message:"UnauthorizedError",statusCode:401,body:i,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Z=class a extends p{constructor(i,e){super({message:"ForbiddenError",statusCode:403,body:i,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Ve=class a extends p{constructor(i,e){super({message:"NotImplementedError",statusCode:501,body:i,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 Vu{constructor(i){if(this.headers=new Map,i)if(i instanceof Vu)i.forEach((e,o)=>this.append(o,e));else if(Array.isArray(i))for(let[e,o]of i)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(i))if(typeof o=="string")this.append(e,o);else throw new TypeError("Header values must be strings")}append(i,e){let o=i.toLowerCase(),t=this.headers.get(o)||[];this.headers.set(o,[...t,e]);}delete(i){let e=i.toLowerCase();this.headers.delete(e);}get(i){let e=i.toLowerCase(),o=this.headers.get(e);return o?o.join(", "):null}has(i){let e=i.toLowerCase();return this.headers.has(e)}set(i,e){let o=i.toLowerCase();this.headers.set(o,[e]);}forEach(i,e){let o=e?i.bind(e):i;this.headers.forEach((t,n)=>o(t.join(", "),n,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[i,e]of this.headers.entries())yield [i,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let i of this.headers.values())yield i.join(", ");}[Symbol.iterator](){return this.entries()}};var st={headers:new jr,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},pt={headers:new jr,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};function ct(a){return {headers:a.headers,redirected:a.redirected,status:a.status,statusText:a.statusText,type:a.type,url:a.url}}function Hu(a,i){return Object.keys(i!=null?i:{}).length>0?`${a}?${cb__default.default.stringify(i,{arrayFormat:"repeat"})}`:a}var d=lb();function lb(){var u,g,f,y,v;return typeof window!="undefined"&&typeof window.document!="undefined"?{type:"browser",version:window.navigator.userAgent}:typeof globalThis!="undefined"&&((u=globalThis==null?void 0:globalThis.navigator)==null?void 0:u.userAgent)==="Cloudflare-Workers"?{type:"workerd"}:typeof EdgeRuntime=="string"?{type:"edge-runtime"}:typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((g=self.constructor)==null?void 0:g.name)==="DedicatedWorkerGlobalScope"||((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&&!!((v=process.versions)!=null&&v.node)?{type:"node",version:process.versions.node,parsedVersion:Number(process.versions.node.split(".")[0])}:typeof navigator!="undefined"&&(navigator==null?void 0:navigator.product)==="ReactNative"?{type:"react-native"}:{type:"unknown"}}async function Ju(){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 Xu({body:a,type:i}){return i.includes("json")?Ie(a):a}async function qu(a){return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?new(await Promise.resolve().then(()=>(Gu(),Ku))).Node18UniversalStreamWrapper(a):d.type!=="node"&&typeof fetch=="function"?new(await Promise.resolve().then(()=>(Qu(),$u))).UndiciStreamWrapper(a):new(await Promise.resolve().then(()=>(Zu(),Yu))).NodePre18StreamWrapper(a)}async function eg(a,i){if(a.body!=null&&i==="blob")return await a.blob();if(a.body!=null&&i==="arrayBuffer")return await a.arrayBuffer();if(a.body!=null&&i==="sse")return a.body;if(a.body!=null&&i==="streaming")return qu(a.body);if(a.body!=null&&i==="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 mb="timeout";function rg(a){let i=new AbortController,e=setTimeout(()=>i.abort(mb),a);return {signal:i.signal,abortId:e}}function og(...a){let i=a.length===1&&Array.isArray(a[0])?a[0]:a,e=new AbortController;for(let o of i){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 ig=async(a,i,e,o,t,n,c,m,u)=>{let g=[],f;if(n!=null){let{signal:z,abortId:S}=rg(n);f=S,g.push(z);}c!=null&&g.push(c);let y=og(g),v=await a(i,{method:e,headers:o,body:t,signal:y,credentials:m?"include":void 0,duplex:u});return f!=null&&clearTimeout(f),v};function db(a){let i=1+(Math.random()*2-1)*.2;return a*i}async function tg(a,i=2){let e=await a();for(let o=0;o<i&&([408,429].includes(e.status)||e.status>=500);++o){let t=Math.min(1e3*Math.pow(2,o),6e4),n=db(t);await new Promise(c=>setTimeout(c,n)),e=await a();}return e}async function ub(a){let i={};if(a.body!==void 0&&a.contentType!=null&&(i["Content-Type"]=a.contentType),a.headers!=null)for(let[n,c]of Object.entries(a.headers))c!=null&&(i[n]=c);let e=Hu(a.url,a.queryParameters),o=await Xu({body:a.body,type:a.requestType==="json"?"json":"other"}),t=await Ju();try{let n=await tg(async()=>ig(t,e,a.method,i,o,a.timeoutMs,a.abortSignal,a.withCredentials,a.duplex),a.maxRetries),c=await eg(n,a.responseType);return n.status>=200&&n.status<400?{ok:!0,body:c,headers:n.headers,rawResponse:ct(n)}:{ok:!1,error:{reason:"status-code",statusCode:n.status,body:c},rawResponse:ct(n)}}catch(n){return a.abortSignal!=null&&a.abortSignal.aborted?{ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:st}:n instanceof Error&&n.name==="AbortError"?{ok:false,error:{reason:"timeout"},rawResponse:st}:n instanceof Error?{ok:false,error:{reason:"unknown",errorMessage:n.message},rawResponse:pt}:{ok:false,error:{reason:"unknown",errorMessage:Ie(n)},rawResponse:pt}}}var x=ub;var s={get:async a=>typeof a=="function"?a():a};var w=class a extends Promise{constructor(i){super(e=>{e(void 0);}),this.innerPromise=i;}static fromFunction(i,...e){return new a(i(...e))}static interceptFunction(i){return (...e)=>a.fromPromise(i(...e))}static fromPromise(i){return new a(i)}static fromExecutor(i){let e=new Promise(i);return new a(e)}static fromResult(i){let e=Promise.resolve(i);return new a(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:i})=>i)),this.unwrappedPromise}then(i,e){return this.unwrap().then(i,e)}catch(i){return this.unwrap().catch(i)}finally(i){return this.unwrap().finally(i)}async withRawResponse(){return await this.innerPromise}};function es(a){return typeof a=="object"&&a!=null&&"name"in a}function rs(a){return typeof a=="object"&&a!=null&&"path"in a}function os(a){let i=a.lastIndexOf("/"),e=a.lastIndexOf("\\"),o=Math.max(i,e);return o>=0?a.substring(o+1):a}async function Og(){let a;return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?a=new Yn:d.type==="node"?a=new Zn:a=new qn,await a.setup(),a}var Yn=class{async setup(){this.fd=new(await import('formdata-node')).FormData;}append(i,e){var o;(o=this.fd)==null||o.append(i,e);}getFileName(i,e){if(e!=null)return e;if(es(i))return i.name;if(rs(i)&&i.path)return os(i.path.toString())}async appendFile(i,e,o){var t,n;o=this.getFileName(e,o),e instanceof Blob?(t=this.fd)==null||t.append(i,e,o):(n=this.fd)==null||n.append(i,{type:void 0,name:o,[Symbol.toStringTag]:"File",stream(){return e}});}async getRequest(){let i=new(await import('form-data-encoder')).FormDataEncoder(this.fd);return {body:(await import('readable-stream')).Readable.from(i),headers:i.headers,duplex:"half"}}},Zn=class{async setup(){this.fd=new(await Promise.resolve().then(()=>dh(Fg()))).default;}append(i,e){var o;(o=this.fd)==null||o.append(i,e);}getFileName(i,e){if(e!=null)return e;if(es(i))return i.name;if(rs(i)&&i.path)return os(i.path.toString())}async appendFile(i,e,o){var n,c;o=this.getFileName(e,o);let t;e instanceof Blob?t=Buffer.from(await e.arrayBuffer()):t=e,o==null?(n=this.fd)==null||n.append(i,t):(c=this.fd)==null||c.append(i,t,{filename:o});}getRequest(){return {body:this.fd,headers:this.fd?this.fd.getHeaders():{}}}},qn=class{async setup(){this.fd=new FormData;}append(i,e){var o;(o=this.fd)==null||o.append(i,e);}getFileName(i,e){if(e!=null)return e;if(es(i))return i.name;if(rs(i)&&i.path)return os(i.path.toString())}async appendFile(i,e,o){var t,n;if(o=this.getFileName(e,o),e instanceof Blob){(t=this.fd)==null||t.append(i,e,o);return}(n=this.fd)==null||n.append(i,new Blob([e]),o);}getRequest(){return {body:this.fd,headers:{}}}};var r={};E(r,{JsonError:()=>dr,ParseError:()=>ur,any:()=>ef,bigint:()=>Bg,boolean:()=>rf,booleanLiteral:()=>qg,date:()=>Lg,discriminant:()=>mf,enum_:()=>ut,getObjectLikeUtils:()=>be,getObjectUtils:()=>He,getSchemaUtils:()=>N,isProperty:()=>Ne,lazy:()=>Vg,lazyObject:()=>Qg,list:()=>ft,number:()=>of,object:()=>gt,objectWithoutOptionalProperties:()=>$g,optional:()=>is,property:()=>Jg,record:()=>sf,set:()=>pf,string:()=>tf,stringLiteral:()=>Zg,transform:()=>ts,undiscriminatedUnion:()=>lf,union:()=>uf,unknown:()=>af,withParsedProperties:()=>ns});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,i){return `Expected ${i}. Received ${Yb(a)}.`}function Yb(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:Wg(a.json),parse:Wg(a.parse)}}function Wg(a){return (i,e)=>{let o=a(i,e),{skipValidation:t=false}=e!=null?e:{};return !o.ok&&t?(console.warn(["Failed to validate.",...o.errors.map(n=>" - "+(n.path.length>0?`${n.path.join(".")}: ${n.message}`:n.message))].join(`
|
|
4
|
+
`)),{ok:true,value:i}):o}}function dt(a){return a.path.length===0?a.message:`${a.path.join(" -> ")}: ${a.message}`}var dr=class a extends Error{constructor(e){super(e.map(dt).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};var ur=class a extends Error{constructor(e){super(e.map(dt).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};function N(a){return {nullable:()=>Zb(a),optional:()=>is(a),optionalNullable:()=>qb(a),transform:i=>ts(a,i),parseOrThrow:(i,e)=>{let o=a.parse(i,e);if(o.ok)return o.value;throw new ur(o.errors)},jsonOrThrow:(i,e)=>{let o=a.json(i,e);if(o.ok)return o.value;throw new dr(o.errors)}}}function Zb(a){let i={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 {...i,...N(i)}}function is(a){let i={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 {...i,...N(i)}}function qb(a){let i={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 {...i,...N(i)}}function ts(a,i){let e={parse:(o,t)=>{let n=a.parse(o,t);return n.ok?{ok:true,value:i.transform(n.value)}:n},json:(o,t)=>{let n=i.untransform(o);return a.json(n,t)},getType:()=>a.getType()};return {...e,...N(e)}}function Bg(){let a={parse:(i,{breadcrumbsPrefix:e=[]}={})=>typeof i=="bigint"?{ok:true,value:i}:typeof i=="number"?{ok:true,value:BigInt(i)}:{ok:false,errors:[{path:e,message:U(i,"bigint | number")}]},json:(i,{breadcrumbsPrefix:e=[]}={})=>typeof i!="bigint"?{ok:false,errors:[{path:e,message:U(i,"bigint")}]}:{ok:true,value:i},getType:()=>T.BIGINT};return {...Q(a),...N(a)}}var ex=/^([+-]?\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 Lg(){let a={parse:(i,{breadcrumbsPrefix:e=[]}={})=>typeof i!="string"?{ok:false,errors:[{path:e,message:U(i,"string")}]}:ex.test(i)?{ok:true,value:new Date(i)}:{ok:false,errors:[{path:e,message:U(i,"ISO 8601 date string")}]},json:(i,{breadcrumbsPrefix:e=[]}={})=>i instanceof Date?{ok:true,value:i.toISOString()}:{ok:false,errors:[{path:e,message:U(i,"Date object")}]},getType:()=>T.DATE};return {...Q(a),...N(a)}}function q(a,i){return ()=>{let e={parse:i,json:i,getType:()=>a};return {...Q(e),...N(e)}}}function ut(a){let i=new Set(a);return q(T.ENUM,(o,{allowUnrecognizedEnumValues:t,breadcrumbsPrefix:n=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:n,message:U(o,"string")}]}:!i.has(o)&&!t?{ok:false,errors:[{path:n,message:U(o,"enum")}]}:{ok:true,value:o})()}function Vg(a){let i=as(a);return {...i,...N(i)}}function as(a){return {parse:(i,e)=>gr(a).parse(i,e),json:(i,e)=>gr(a).json(i,e),getType:()=>gr(a).getType()}}function gr(a){let i=a;return i.__zurg_memoized==null&&(i.__zurg_memoized=a()),i.__zurg_memoized}function Ir(a){return Object.entries(a)}function Ur(a,i){let e=new Set(i);return Object.entries(a).reduce((o,[t,n])=>(e.has(t)&&(o[t]=n),o),{})}function Ue(a){if(typeof a!="object"||a===null)return false;if(Object.getPrototypeOf(a)===null)return true;let i=a;for(;Object.getPrototypeOf(i)!==null;)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(a)===i}function Nr(a){return Object.keys(a)}function Hg(a,i){let e=[],o=[];for(let t of a)i(t)?e.push(t):o.push(t);return [e,o]}function be(a){return {withParsedProperties:i=>ns(a,i)}}function ns(a,i){let e={parse:(o,t)=>{let n=a.parse(o,t);if(!n.ok)return n;let c=Object.entries(i).reduce((m,[u,g])=>({...m,[u]:typeof g=="function"?g(n.value):g}),{});return {ok:true,value:{...n.value,...c}}},json:(o,t)=>{var m;if(!Ue(o))return {ok:false,errors:[{path:(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],message:U(o,"object")}]};let n=new Set(Object.keys(i)),c=Ur(o,Object.keys(o).filter(u=>!n.has(u)));return a.json(c,t)},getType:()=>a.getType()};return {...e,...N(e),...be(e)}}function Jg(a,i){return {rawKey:a,valueSchema:i,isProperty:true}}function Ne(a){return a.isProperty}function gt(a){let i={_getRawProperties:()=>Object.entries(a).map(([e,o])=>Ne(o)?o.rawKey:e),_getParsedProperties:()=>Nr(a),parse:(e,o)=>{let t={},n=[];for(let[c,m]of Ir(a)){let u=Ne(m)?m.rawKey:c,g=Ne(m)?m.valueSchema:m,f={rawKey:u,parsedKey:c,valueSchema:g};t[u]=f,Gg(g)&&n.push(u);}return Xg({value:e,requiredKeys:n,getProperty:c=>{let m=t[c];if(m!=null)return {transformedKey:m.parsedKey,transform:u=>{var g;return m.valueSchema.parse(u,{...o,breadcrumbsPrefix:[...(g=o==null?void 0:o.breadcrumbsPrefix)!=null?g:[],c]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},json:(e,o)=>{let t=[];for(let[n,c]of Ir(a)){let m=Ne(c)?c.valueSchema:c;Gg(m)&&t.push(n);}return Xg({value:e,requiredKeys:t,getProperty:n=>{let c=a[n];if(c!=null)return Ne(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(i),...N(i),...be(i),...He(i)}}function Xg({value:a,requiredKeys:i,getProperty:e,unrecognizedObjectKeys:o="fail",skipValidation:t=false,breadcrumbsPrefix:n=[]}){if(!Ue(a))return {ok:false,errors:[{path:n,message:U(a,"object")}]};let c=new Set(i),m=[],u={};for(let[g,f]of Object.entries(a)){let y=e(g);if(y!=null){c.delete(g);let v=y.transform(f);v.ok?u[y.transformedKey]=v.value:(u[g]=f,m.push(...v.errors));}else switch(o){case "fail":m.push({path:[...n,g],message:`Unexpected key "${g}"`});break;case "strip":break;case "passthrough":u[g]=f;break}}return m.push(...i.filter(g=>c.has(g)).map(g=>({path:n,message:`Missing required key "${g}"`}))),m.length===0||t?{ok:true,value:u}:{ok:false,errors:m}}function He(a){return {extend:i=>{let e={_getParsedProperties:()=>[...a._getParsedProperties(),...i._getParsedProperties()],_getRawProperties:()=>[...a._getRawProperties(),...i._getRawProperties()],parse:(o,t)=>Kg({extensionKeys:i._getRawProperties(),value:o,transformBase:n=>a.parse(n,t),transformExtension:n=>i.parse(n,t)}),json:(o,t)=>Kg({extensionKeys:i._getParsedProperties(),value:o,transformBase:n=>a.json(n,t),transformExtension:n=>i.json(n,t)}),getType:()=>T.OBJECT};return {...e,...N(e),...be(e),...He(e)}},passthrough:()=>{let i={_getParsedProperties:()=>a._getParsedProperties(),_getRawProperties:()=>a._getRawProperties(),parse:(e,o)=>{let t=a.parse(e,{...o,unrecognizedObjectKeys:"passthrough"});return t.ok?{ok:true,value:{...e,...t.value}}:t},json:(e,o)=>{let t=a.json(e,{...o,unrecognizedObjectKeys:"passthrough"});return t.ok?{ok:true,value:{...e,...t.value}}:t},getType:()=>T.OBJECT};return {...i,...N(i),...be(i),...He(i)}}}}function Kg({extensionKeys:a,value:i,transformBase:e,transformExtension:o}){let t=new Set(a),[n,c]=Hg(Nr(i),g=>t.has(g)),m=e(Ur(i,c)),u=o(Ur(i,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 Gg(a){return !rx(a)}function rx(a){switch(a.getType()){case T.ANY:case T.UNKNOWN:case T.OPTIONAL:case T.OPTIONAL_NULLABLE:return true;default:return false}}function $g(a){return gt(a)}function Qg(a){let i={...as(a),_getRawProperties:()=>gr(a)._getRawProperties(),_getParsedProperties:()=>gr(a)._getParsedProperties()};return {...i,...N(i),...be(i),...He(i)}}function ft(a){let i={parse:(e,o)=>Yg(e,(t,n)=>{var c;return a.parse(t,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),json:(e,o)=>Yg(e,(t,n)=>{var c;return a.json(t,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),getType:()=>T.LIST};return {...Q(i),...N(i)}}function Yg(a,i){return Array.isArray(a)?a.map((o,t)=>i(o,t)).reduce((o,t)=>{if(o.ok&&t.ok)return {ok:true,value:[...o.value,t.value]};let n=[];return o.ok||n.push(...o.errors),t.ok||n.push(...t.errors),{ok:false,errors:n}},{ok:true,value:[]}):{ok:false,errors:[{message:U(a,"list"),path:[]}]}}function Zg(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 qg(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 ef=q(T.ANY,a=>({ok:true,value:a}));var rf=q(T.BOOLEAN,(a,{breadcrumbsPrefix:i=[]}={})=>typeof a=="boolean"?{ok:true,value:a}:{ok:false,errors:[{path:i,message:U(a,"boolean")}]});var of=q(T.NUMBER,(a,{breadcrumbsPrefix:i=[]}={})=>typeof a=="number"?{ok:true,value:a}:{ok:false,errors:[{path:i,message:U(a,"number")}]});var tf=q(T.STRING,(a,{breadcrumbsPrefix:i=[]}={})=>typeof a=="string"?{ok:true,value:a}:{ok:false,errors:[{path:i,message:U(a,"string")}]});var af=q(T.UNKNOWN,a=>({ok:true,value:a}));function sf(a,i){let e={parse:(o,t)=>nf({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.parse(n,{...t,breadcrumbsPrefix:[...(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return i.parse(n,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix}),json:(o,t)=>nf({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.json(n,{...t,breadcrumbsPrefix:[...(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return i.json(n,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix}),getType:()=>T.RECORD};return {...Q(e),...N(e)}}function nf({value:a,isKeyNumeric:i,transformKey:e,transformValue:o,breadcrumbsPrefix:t=[]}){return Ue(a)?Ir(a).reduce((n,[c,m])=>{if(m===void 0)return n;let u=n,g=c;if(i){let z=c.length>0?Number(c):NaN;isNaN(z)||(g=z);}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 v=[];return u.ok||v.push(...u.errors),f.ok||v.push(...f.errors),y.ok||v.push(...y.errors),{ok:false,errors:v}},{ok:true,value:{}}):{ok:false,errors:[{path:t,message:U(a,"object")}]}}function pf(a){let i=ft(a),e={parse:(o,t)=>{let n=i.parse(o,t);return n.ok?{ok:true,value:new Set(n.value)}:n},json:(o,t)=>{var c;return o instanceof Set?i.json([...o],t):{ok:false,errors:[{path:(c=t==null?void 0:t.breadcrumbsPrefix)!=null?c:[],message:U(o,"Set")}]}},getType:()=>T.SET};return {...Q(e),...N(e)}}function lf(a){let i={parse:(e,o)=>cf((t,n)=>t.parse(e,n),a,o),json:(e,o)=>cf((t,n)=>t.json(e,n),a,o),getType:()=>T.UNDISCRIMINATED_UNION};return {...Q(i),...N(i)}}function cf(a,i,e){let o=[];for(let[t,n]of i.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 ${t}] ${m.message}`});}return {ok:false,errors:o}}function mf(a,i){return {parsedDiscriminant:a,rawDiscriminant:i}}function uf(a,i){let e=typeof a=="string"?a:a.rawDiscriminant,o=typeof a=="string"?a:a.parsedDiscriminant,t=ut(Nr(i)),n={parse:(c,m)=>df({value:c,discriminant:e,transformedDiscriminant:o,transformDiscriminantValue:u=>{var g;return t.parse(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],e]})},getAdditionalPropertiesSchema:u=>i[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)=>df({value:c,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:u=>{var g;return t.json(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],o]})},getAdditionalPropertiesSchema:u=>i[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),...N(n),...be(n)}}function df({value:a,discriminant:i,transformedDiscriminant:e,transformDiscriminantValue:o,getAdditionalPropertiesSchema:t,allowUnrecognizedUnionMembers:n=false,transformAdditionalProperties:c,breadcrumbsPrefix:m=[]}){if(!Ue(a))return {ok:false,errors:[{path:m,message:U(a,"object")}]};let{[i]:u,...g}=a;if(u==null)return {ok:false,errors:[{path:m,message:`Missing discriminant ("${i}")`}]};let f=o(u);if(!f.ok)return {ok:false,errors:f.errors};let y=t(f.value);if(y==null)return n?{ok:true,value:{[e]:f.value,...g}}:{ok:false,errors:[{path:[...m,i],message:"Unexpected discriminant value"}]};let v=c(g,y);return v.ok?{ok:true,value:{[e]:u,...v.value}}:v}function ox(a){var i=[];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 t=a[o];if(typeof t!="string")throw new TypeError("Url must be a string. Received "+t);t!==""&&(o>0&&(t=t.replace(/^[\/]+/,"")),o<a.length-1?t=t.replace(/[\/]+$/,""):t=t.replace(/[\/]+$/,"/"),i.push(t));}var n=i.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),ox(a)}var j={};E(j,{AggregationData:()=>Ll,Alert:()=>px,AlertAlertType:()=>Ys,AlertPagePublic:()=>fp,AlertPublic:()=>Go,AlertPublicAlertType:()=>cp,AlertTrigger:()=>op,AlertTriggerConfig:()=>rp,AlertTriggerConfigPublic:()=>up,AlertTriggerConfigPublicType:()=>dp,AlertTriggerConfigType:()=>ep,AlertTriggerConfigWrite:()=>tp,AlertTriggerConfigWriteType:()=>ip,AlertTriggerEventType:()=>qs,AlertTriggerPublic:()=>gp,AlertTriggerPublicEventType:()=>mp,AlertTriggerWrite:()=>np,AlertTriggerWriteEventType:()=>ap,AlertWrite:()=>Ko,AlertWriteAlertType:()=>sp,AnnotationQueue:()=>yp,AnnotationQueueBatch:()=>lx,AnnotationQueueBatchWrite:()=>Oo,AnnotationQueueItemIds:()=>ia,AnnotationQueuePagePublic:()=>zp,AnnotationQueuePublic:()=>$o,AnnotationQueuePublicScope:()=>kp,AnnotationQueueReviewer:()=>Rp,AnnotationQueueReviewerPublic:()=>vp,AnnotationQueueScope:()=>xp,AnnotationQueueUpdate:()=>Wo,AnnotationQueueWrite:()=>Fo,AnnotationQueueWriteScope:()=>Ms,AssistantMessage:()=>Uc,AssistantMessageRole:()=>Ic,Attachment:()=>Sp,AttachmentListRequestEntityType:()=>bt,AttachmentPage:()=>_p,AuthDetailsHolder:()=>Cp,AutomationRuleEvaluator:()=>dx,AutomationRuleEvaluatorLlmAsJudge:()=>Op,AutomationRuleEvaluatorLlmAsJudgePublic:()=>ni,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>Zp,AutomationRuleEvaluatorObjectObjectPublic:()=>yc,AutomationRuleEvaluatorPagePublic:()=>kc,AutomationRuleEvaluatorPublic:()=>vc,AutomationRuleEvaluatorSpanLlmAsJudge:()=>Hp,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>li,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>oc,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>Bp,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>pi,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>ac,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>Lp,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>ci,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>sc,AutomationRuleEvaluatorUpdate:()=>jc,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>Ac,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>Cc,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>Ec,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>Pc,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>Tc,AutomationRuleEvaluatorUserDefinedMetricPython:()=>Wp,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>si,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>cc,AutomationRuleEvaluatorWrite:()=>lc,AvgValueStatPublic:()=>sl,BatchDelete:()=>L,BatchDeleteByProject:()=>jx,BiInformation:()=>Xs,BiInformationResponse:()=>br,BooleanFeedbackDefinition:()=>Kl,BooleanFeedbackDefinitionCreate:()=>em,BooleanFeedbackDefinitionPublic:()=>ki,BooleanFeedbackDefinitionUpdate:()=>hm,BooleanFeedbackDetail:()=>Xl,BooleanFeedbackDetailCreate:()=>ql,BooleanFeedbackDetailPublic:()=>sm,BooleanFeedbackDetailUpdate:()=>fm,CategoricalFeedbackDefinition:()=>$l,CategoricalFeedbackDefinitionCreate:()=>om,CategoricalFeedbackDefinitionPublic:()=>vi,CategoricalFeedbackDefinitionUpdate:()=>bm,CategoricalFeedbackDetail:()=>Gl,CategoricalFeedbackDetailCreate:()=>rm,CategoricalFeedbackDetailPublic:()=>pm,CategoricalFeedbackDetailUpdate:()=>wm,ChatCompletionChoice:()=>Mc,ChatCompletionRequest:()=>Lo,ChatCompletionResponse:()=>Wc,Check:()=>El,CheckName:()=>Al,CheckPublic:()=>Dd,CheckPublicName:()=>Nd,CheckPublicResult:()=>Md,CheckResult:()=>Tl,ChunkedOutputJsonNode:()=>hx,ChunkedOutputJsonNodePublic:()=>Rx,ChunkedOutputJsonNodePublicType:()=>Jl,ChunkedOutputJsonNodeType:()=>Rl,Column:()=>bl,ColumnCompare:()=>Kc,ColumnCompareTypesItem:()=>Xc,ColumnPublic:()=>fl,ColumnPublicTypesItem:()=>gl,ColumnTypesItem:()=>wl,Comment:()=>H,CommentCompare:()=>Gc,CommentPublic:()=>ar,CompleteMultipartUploadRequest:()=>ta,CompleteMultipartUploadRequestEntityType:()=>Ap,CompletionTokensDetails:()=>Fc,CountValueStatPublic:()=>pl,CreateDatasetItemsFromSpansRequest:()=>Br,CreateDatasetItemsFromTracesRequest:()=>Lr,CreatePromptVersionDetail:()=>ho,DashboardPagePublic:()=>Bc,DashboardPublic:()=>ir,DashboardUpdatePublic:()=>Ho,DashboardWrite:()=>Vo,DataPointDouble:()=>Ix,DataPointNumberPublic:()=>nd,Dataset:()=>ux,DatasetExpansion:()=>fx,DatasetExpansionResponse:()=>Jc,DatasetExpansionWrite:()=>Xr,DatasetIdentifier:()=>Hr,DatasetIdentifierPublic:()=>Kr,DatasetItem:()=>fi,DatasetItemBatch:()=>gx,DatasetItemBatchUpdate:()=>Dr,DatasetItemBatchWrite:()=>Wr,DatasetItemCompare:()=>ol,DatasetItemCompareSource:()=>$c,DatasetItemFilter:()=>ps,DatasetItemFilterOperator:()=>ss,DatasetItemPageCompare:()=>il,DatasetItemPagePublic:()=>hl,DatasetItemPublic:()=>bi,DatasetItemPublicSource:()=>dl,DatasetItemSource:()=>Hc,DatasetItemStreamRequest:()=>Gr,DatasetItemUpdate:()=>cs,DatasetItemWrite:()=>Or,DatasetItemWriteSource:()=>ls,DatasetItemsDelete:()=>Jr,DatasetPagePublic:()=>nl,DatasetPublic:()=>xr,DatasetPublicStatus:()=>al,DatasetPublicVisibility:()=>tl,DatasetStatus:()=>Vc,DatasetUpdate:()=>Vr,DatasetUpdateVisibility:()=>zt,DatasetVersionCreatePublic:()=>Qr,DatasetVersionDiff:()=>kl,DatasetVersionDiffStats:()=>yl,DatasetVersionPagePublic:()=>zl,DatasetVersionPublic:()=>vl,DatasetVersionTag:()=>$r,DatasetVisibility:()=>Lc,DatasetWrite:()=>Fr,DatasetWriteVisibility:()=>vt,DeleteAttachmentsRequest:()=>mx,DeleteAttachmentsRequestEntityType:()=>Ep,DeleteFeedbackScore:()=>Ti,DeleteIdsHolder:()=>Rr,DeleteThreadFeedbackScores:()=>Io,DeleteTraceThreads:()=>Uo,Delta:()=>Nc,DownloadAttachmentRequestEntityType:()=>xt,ErrorCountWithDeviation:()=>_i,ErrorCountWithDeviationDetailed:()=>ud,ErrorInfo:()=>Te,ErrorInfoExperimentItemBulkWriteView:()=>ro,ErrorInfoPublic:()=>Ei,ErrorInfoWrite:()=>xo,ErrorMessage:()=>ae,ErrorMessageDetail:()=>Ex,ErrorMessageDetailed:()=>Ax,ErrorMessagePublic:()=>cx,Experiment:()=>wx,ExperimentGroupAggregationsResponse:()=>Hl,ExperimentGroupResponse:()=>Bl,ExperimentItem:()=>Zr,ExperimentItemBulkRecord:()=>Il,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>Ss,ExperimentItemBulkUpload:()=>bx,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>oo,ExperimentItemCompare:()=>rl,ExperimentItemCompareTraceVisibilityMode:()=>el,ExperimentItemPublic:()=>wi,ExperimentItemPublicTraceVisibilityMode:()=>ul,ExperimentItemStreamRequest:()=>ao,ExperimentItemTraceVisibilityMode:()=>ws,ExperimentItemsBatch:()=>qr,ExperimentItemsDelete:()=>eo,ExperimentPagePublic:()=>Dl,ExperimentPublic:()=>yi,ExperimentPublicStatus:()=>Nl,ExperimentPublicType:()=>Ul,ExperimentScore:()=>io,ExperimentScorePublic:()=>Ml,ExperimentScoreWrite:()=>us,ExperimentStatus:()=>_l,ExperimentStreamRequestPublic:()=>no,ExperimentType:()=>Sl,ExperimentUpdate:()=>to,ExperimentUpdateStatus:()=>Et,ExperimentUpdateType:()=>Tt,ExperimentWrite:()=>Yr,ExperimentWriteStatus:()=>At,ExperimentWriteType:()=>_t,ExportTraceServiceRequest:()=>zx,Feedback:()=>yx,FeedbackCreate:()=>nm,FeedbackDefinitionPagePublic:()=>dm,FeedbackObjectPublic:()=>mm,FeedbackPublic:()=>gm,FeedbackScore:()=>ee,FeedbackScoreAverage:()=>ne,FeedbackScoreAverageDetailed:()=>gd,FeedbackScoreAveragePublic:()=>Ke,FeedbackScoreBatch:()=>Ci,FeedbackScoreBatchItem:()=>Ud,FeedbackScoreBatchItemSource:()=>Id,FeedbackScoreBatchItemThread:()=>Us,FeedbackScoreBatchItemThreadSource:()=>Is,FeedbackScoreBatchThread:()=>No,FeedbackScoreCompare:()=>qc,FeedbackScoreCompareSource:()=>Qc,FeedbackScoreExperimentItemBulkWriteView:()=>zs,FeedbackScoreExperimentItemBulkWriteViewSource:()=>ys,FeedbackScoreNames:()=>ad,FeedbackScorePublic:()=>kr,FeedbackScorePublicSource:()=>Td,FeedbackScoreSource:()=>gs,FeedbackUpdate:()=>km,FindFeedbackDefinitionsRequestType:()=>jt,FindFeedbackScoreNames1RequestType:()=>Xt,Function:()=>Bo,FunctionCall:()=>Ee,GetSpanStatsRequestType:()=>Kt,GetSpansByProjectRequestType:()=>Jt,GetWebhookExamplesRequestAlertType:()=>ht,GroupContent:()=>Fl,GroupContentWithAggregations:()=>Vl,GroupDetail:()=>Ol,GroupDetails:()=>Wl,Guardrail:()=>Sm,GuardrailBatch:()=>kx,GuardrailBatchWrite:()=>Jo,GuardrailName:()=>vm,GuardrailResult:()=>zm,GuardrailWrite:()=>Js,GuardrailWriteName:()=>Vs,GuardrailWriteResult:()=>Hs,GuardrailsValidation:()=>Pl,GuardrailsValidationPublic:()=>Fd,IdsHolder:()=>xx,ImageUrl:()=>Np,ImageUrlPublic:()=>dc,ImageUrlWrite:()=>Kp,JsonListString:()=>M,JsonListStringCompare:()=>aa,JsonListStringExperimentItemBulkWriteView:()=>xe,JsonListStringPublic:()=>me,JsonListStringWrite:()=>ce,JsonNode:()=>P,JsonNodeDetail:()=>Ts,JsonNodePublic:()=>re,JsonNodeWrite:()=>le,JsonSchema:()=>Ws,LlmAsJudgeCode:()=>Qo,LlmAsJudgeCodePublic:()=>hc,LlmAsJudgeCodeWrite:()=>Yp,LlmAsJudgeMessage:()=>$e,LlmAsJudgeMessageContent:()=>Dp,LlmAsJudgeMessageContentPublic:()=>gc,LlmAsJudgeMessageContentWrite:()=>$p,LlmAsJudgeMessagePublic:()=>rr,LlmAsJudgeMessagePublicRole:()=>mc,LlmAsJudgeMessageRole:()=>Up,LlmAsJudgeMessageWrite:()=>Ze,LlmAsJudgeMessageWriteRole:()=>Xp,LlmAsJudgeModelParameters:()=>Ge,LlmAsJudgeModelParametersPublic:()=>er,LlmAsJudgeModelParametersWrite:()=>Ye,LlmAsJudgeOutputSchema:()=>Qe,LlmAsJudgeOutputSchemaPublic:()=>or,LlmAsJudgeOutputSchemaPublicType:()=>fc,LlmAsJudgeOutputSchemaType:()=>Fp,LlmAsJudgeOutputSchemaWrite:()=>qe,LlmAsJudgeOutputSchemaWriteType:()=>Qp,LogItem:()=>Sc,LogItemLevel:()=>zc,LogPage:()=>_c,ManualEvaluationRequest:()=>ca,ManualEvaluationRequestEntityType:()=>Em,ManualEvaluationResponse:()=>pa,Message:()=>Ds,MultipartUploadPart:()=>Tp,NumericalFeedbackDefinition:()=>Yl,NumericalFeedbackDefinitionCreate:()=>tm,NumericalFeedbackDefinitionPublic:()=>zi,NumericalFeedbackDefinitionUpdate:()=>Rm,NumericalFeedbackDetail:()=>Ql,NumericalFeedbackDetailCreate:()=>im,NumericalFeedbackDetailPublic:()=>cm,NumericalFeedbackDetailUpdate:()=>xm,Optimization:()=>Sx,OptimizationPagePublic:()=>ma,OptimizationPublic:()=>yr,OptimizationPublicStatus:()=>Xm,OptimizationStatus:()=>Pm,OptimizationStudioConfig:()=>Dm,OptimizationStudioConfigPublic:()=>qm,OptimizationStudioConfigWrite:()=>Hm,OptimizationStudioLog:()=>ed,OptimizationUpdate:()=>co,OptimizationUpdateStatus:()=>Mt,OptimizationWrite:()=>la,OptimizationWriteStatus:()=>Jm,PageColumns:()=>xl,PercentageValueStatPublic:()=>cl,PercentageValues:()=>Ce,PercentageValuesDetailed:()=>fd,PercentageValuesPublic:()=>hi,Project:()=>_x,ProjectDetailed:()=>wd,ProjectDetailedVisibility:()=>hd,ProjectMetricRequestPublic:()=>uo,ProjectMetricRequestPublicInterval:()=>Bt,ProjectMetricRequestPublicMetricType:()=>Wt,ProjectMetricResponsePublic:()=>ld,ProjectMetricResponsePublicInterval:()=>pd,ProjectMetricResponsePublicMetricType:()=>sd,ProjectPagePublic:()=>id,ProjectPublic:()=>Ai,ProjectPublicVisibility:()=>od,ProjectRetrieveDetailed:()=>go,ProjectStatItemObjectPublic:()=>ml,ProjectStatsPublic:()=>tr,ProjectStatsSummary:()=>dd,ProjectStatsSummaryItem:()=>md,ProjectUpdate:()=>mo,ProjectUpdateVisibility:()=>Ot,ProjectVisibility:()=>rd,ProjectWrite:()=>lo,ProjectWriteVisibility:()=>Ft,Prompt:()=>Tx,PromptDetail:()=>yd,PromptPagePublic:()=>_d,PromptPublic:()=>Sd,PromptTokensDetails:()=>Dc,PromptType:()=>bd,PromptUpdatable:()=>wo,PromptVersion:()=>Rd,PromptVersionDetail:()=>Se,PromptVersionDetailType:()=>Es,PromptVersionLink:()=>na,PromptVersionLinkPublic:()=>sa,PromptVersionLinkWrite:()=>Ct,PromptVersionPagePublic:()=>zd,PromptVersionPublic:()=>vd,PromptVersionPublicType:()=>kd,PromptVersionRetrieveDetail:()=>bo,PromptVersionType:()=>xd,PromptWrite:()=>fo,PromptWriteType:()=>Vt,ProviderApiKey:()=>vx,ProviderApiKeyPagePublic:()=>Am,ProviderApiKeyProvider:()=>Tm,ProviderApiKeyPublic:()=>Si,ProviderApiKeyPublicProvider:()=>_m,ProviderApiKeyUpdate:()=>po,ProviderApiKeyWrite:()=>so,ProviderApiKeyWriteProvider:()=>Ut,ResponseFormat:()=>Bs,ResponseFormatType:()=>Os,Result:()=>nr,ResultsNumberPublic:()=>cd,ScoreName:()=>td,ServiceTogglesConfig:()=>Ad,Span:()=>Ri,SpanBatch:()=>Px,SpanBatchUpdate:()=>vo,SpanBatchWrite:()=>yo,SpanEnrichmentOptions:()=>ms,SpanExperimentItemBulkWriteView:()=>Rs,SpanExperimentItemBulkWriteViewType:()=>xs,SpanFilter:()=>ei,SpanFilterOperator:()=>Vp,SpanFilterPublic:()=>zo,SpanFilterPublicOperator:()=>js,SpanFilterWrite:()=>ec,SpanFilterWriteOperator:()=>qp,SpanLlmAsJudgeCode:()=>ri,SpanLlmAsJudgeCodePublic:()=>Rc,SpanLlmAsJudgeCodeWrite:()=>rc,SpanPagePublic:()=>jd,SpanPublic:()=>Pi,SpanPublicType:()=>Cd,SpanSearchStreamRequestPublic:()=>So,SpanSearchStreamRequestPublicType:()=>Gt,SpanType:()=>jl,SpanUpdate:()=>ko,SpanUpdateType:()=>Cs,SpanWrite:()=>Ro,SpanWriteType:()=>Ps,SpansCountResponse:()=>Gs,StartMultipartUploadRequest:()=>Mr,StartMultipartUploadRequestEntityType:()=>Rt,StartMultipartUploadResponse:()=>Pp,StreamOptions:()=>Fs,StudioEvaluation:()=>Nm,StudioEvaluationPublic:()=>Ym,StudioEvaluationWrite:()=>Lm,StudioLlmModel:()=>Im,StudioLlmModelPublic:()=>$m,StudioLlmModelWrite:()=>Wm,StudioMessage:()=>Cm,StudioMessagePublic:()=>Km,StudioMessageWrite:()=>Fm,StudioMetric:()=>Um,StudioMetricPublic:()=>Qm,StudioMetricWrite:()=>Bm,StudioOptimizer:()=>Mm,StudioOptimizerPublic:()=>Zm,StudioOptimizerWrite:()=>Vm,StudioPrompt:()=>jm,StudioPromptPublic:()=>Gm,StudioPromptWrite:()=>Om,Tool:()=>Ls,ToolCall:()=>gi,Trace:()=>xi,TraceBatch:()=>Cx,TraceBatchUpdate:()=>Eo,TraceBatchWrite:()=>Ao,TraceCountResponse:()=>Qs,TraceEnrichmentOptions:()=>ds,TraceExperimentItemBulkWriteView:()=>bs,TraceFilter:()=>Pe,TraceFilterOperator:()=>Ip,TraceFilterPublic:()=>Ae,TraceFilterPublicOperator:()=>_s,TraceFilterWrite:()=>ii,TraceFilterWriteOperator:()=>Jp,TracePagePublic:()=>Ld,TracePublic:()=>ji,TracePublicVisibilityMode:()=>Od,TraceSearchStreamRequestPublic:()=>Do,TraceThread:()=>Ii,TraceThreadBatchIdentifier:()=>jo,TraceThreadBatchUpdate:()=>Co,TraceThreadFilter:()=>Re,TraceThreadFilterOperator:()=>Ns,TraceThreadFilterPublic:()=>Je,TraceThreadFilterPublicOperator:()=>As,TraceThreadFilterWrite:()=>ti,TraceThreadFilterWriteOperator:()=>ic,TraceThreadIdentifier:()=>da,TraceThreadLlmAsJudgeCode:()=>Zo,TraceThreadLlmAsJudgeCodePublic:()=>bc,TraceThreadLlmAsJudgeCodeWrite:()=>tc,TraceThreadPage:()=>Bd,TraceThreadSearchStreamRequest:()=>Mo,TraceThreadStatus:()=>Wd,TraceThreadUpdate:()=>Po,TraceThreadUserDefinedMetricPythonCode:()=>qo,TraceThreadUserDefinedMetricPythonCodePublic:()=>xc,TraceThreadUserDefinedMetricPythonCodeWrite:()=>nc,TraceUpdate:()=>To,TraceVisibilityMode:()=>Cl,TraceWrite:()=>_o,UploadAttachmentRequestEntityType:()=>yt,Usage:()=>Oc,UserDefinedMetricPythonCode:()=>Yo,UserDefinedMetricPythonCodePublic:()=>wc,UserDefinedMetricPythonCodeWrite:()=>pc,ValueEntry:()=>hs,ValueEntryCompare:()=>Zc,ValueEntryCompareSource:()=>Yc,ValueEntryExperimentItemBulkWriteView:()=>vs,ValueEntryExperimentItemBulkWriteViewSource:()=>ks,ValueEntryPublic:()=>Pd,ValueEntryPublicSource:()=>Ed,ValueEntrySource:()=>fs,VideoUrl:()=>Mp,VideoUrlPublic:()=>uc,VideoUrlWrite:()=>Gp,Webhook:()=>Zs,WebhookExamples:()=>hp,WebhookPublic:()=>lp,WebhookTestResult:()=>bp,WebhookTestResultStatus:()=>wp,WebhookWrite:()=>pp,WelcomeWizardSubmission:()=>Xo,WelcomeWizardTracking:()=>Vd,WorkspaceConfiguration:()=>Ui,WorkspaceMetricRequest:()=>Ux,WorkspaceMetricResponse:()=>ua,WorkspaceMetricsSummaryRequest:()=>vr,WorkspaceMetricsSummaryResponse:()=>Hd,WorkspaceNameHolder:()=>jp,WorkspaceSpansCount:()=>Ks,WorkspaceTraceCount:()=>$s,alerts:()=>wt,annotationQueues:()=>Zt,attachments:()=>fr,chatCompletions:()=>qt,dashboards:()=>ea,datasets:()=>St,experiments:()=>hr,feedbackDefinitions:()=>It,guardrails:()=>ra,llmProviderKey:()=>Nt,optimizations:()=>Dt,projects:()=>Lt,prompts:()=>Ht,spans:()=>wr,traces:()=>Xe,welcomeWizard:()=>oa});var wt={};E(wt,{GetWebhookExamplesRequestAlertType:()=>ht});var ht=r.enum_(["general","slack","pagerduty"]);var fr={};E(fr,{AttachmentListRequestEntityType:()=>bt,DownloadAttachmentRequestEntityType:()=>xt,StartMultipartUploadRequest:()=>Mr,StartMultipartUploadRequestEntityType:()=>Rt,UploadAttachmentRequestEntityType:()=>yt,uploadAttachment:()=>kt});var bt=r.enum_(["trace","span"]);var xt=r.enum_(["trace","span"]);var Rt=r.enum_(["trace","span"]);var yt=r.enum_(["trace","span"]);var kt={};E(kt,{Request:()=>ix});var ix=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",Rt),entityId:r.property("entity_id",r.string()),path:r.string()});var St={};E(St,{CreateDatasetItemsFromSpansRequest:()=>Br,CreateDatasetItemsFromTracesRequest:()=>Lr,DatasetExpansionWrite:()=>Xr,DatasetIdentifier:()=>Hr,DatasetIdentifierPublic:()=>Kr,DatasetItemBatchUpdate:()=>Dr,DatasetItemBatchWrite:()=>Wr,DatasetItemStreamRequest:()=>Gr,DatasetItemsDelete:()=>Jr,DatasetUpdate:()=>Vr,DatasetUpdateVisibility:()=>zt,DatasetVersionCreatePublic:()=>Qr,DatasetVersionTag:()=>$r,DatasetWrite:()=>Fr,DatasetWriteVisibility:()=>vt});var vt=r.enum_(["private","public"]);var zt=r.enum_(["private","public"]);var ss=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ps=r.object({field:r.string().optional(),operator:ss.optional(),key:r.string().optional(),value:r.string().optional()});var P=r.record(r.string(),r.unknown());var cs=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 Dr=r.object({ids:r.list(r.string()).optional(),filters:r.list(ps).optional(),update:cs,mergeTags:r.property("merge_tags",r.boolean().optional())});var Fr=r.object({id:r.string().optional(),name:r.string(),visibility:vt.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});var ls=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:ls,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 ms=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",ms)});var ds=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",ds)});var Vr=r.object({name:r.string(),description:r.string().optional(),visibility:zt.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 hr={};E(hr,{ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>oo,ExperimentItemStreamRequest:()=>ao,ExperimentItemsBatch:()=>qr,ExperimentItemsDelete:()=>eo,ExperimentStreamRequestPublic:()=>no,ExperimentUpdate:()=>to,ExperimentUpdateStatus:()=>Et,ExperimentUpdateType:()=>Tt,ExperimentWrite:()=>Yr,ExperimentWriteStatus:()=>At,ExperimentWriteType:()=>_t,findFeedbackScoreNames:()=>Pt});var _t=r.enum_(["regular","trial","mini-batch"]);var At=r.enum_(["running","completed","cancelled"]);var Tt=r.enum_(["regular","trial","mini-batch"]);var Et=r.enum_(["running","completed","cancelled"]);var Pt={};E(Pt,{Response:()=>tx});var tx=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 us=r.object({name:r.string(),value:r.number()});var Ct=r.object({id:r.string()});var Yr=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),name:r.string().optional(),metadata:ce.optional(),type:_t.optional(),optimizationId:r.property("optimization_id",r.string().optional()),status:At.optional(),experimentScores:r.property("experiment_scores",r.list(us).optional()),promptVersion:r.property("prompt_version",Ct.optional()),promptVersions:r.property("prompt_versions",r.list(Ct).optional())});var M=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var gs=r.enum_(["ui","sdk","online_scoring"]);var fs=r.enum_(["ui","sdk","online_scoring"]);var hs=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:fs.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:gs,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(),hs).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 ws=r.enum_(["default","hidden"]);var Zr=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:M.optional(),output:M.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",ws.optional())});var qr=r.object({experimentItems:r.property("experiment_items",r.list(Zr))});var eo=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 ro=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var bs=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",ro.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var xs=r.enum_(["general","tool","llm","guardrail"]);var Rs=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:xs.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",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 ys=r.enum_(["ui","sdk","online_scoring"]);var ks=r.enum_(["ui","sdk","online_scoring"]);var vs=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:ks.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 zs=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:ys,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(),vs).optional())});var Ss=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",xe.optional()),trace:bs.optional(),spans:r.list(Rs).optional(),feedbackScores:r.property("feedback_scores",r.list(zs).optional())});var oo=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(Ss)});var io=r.object({name:r.string(),value:r.number()});var to=r.object({name:r.string().optional(),metadata:P.optional(),type:Tt.optional(),status:Et.optional(),experimentScores:r.property("experiment_scores",r.list(io).optional())});var ao=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 no=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional())});var It={};E(It,{FindFeedbackDefinitionsRequestType:()=>jt});var jt=r.enum_(["numerical","categorical","boolean"]);var Nt={};E(Nt,{ProviderApiKeyUpdate:()=>po,ProviderApiKeyWrite:()=>so,ProviderApiKeyWriteProvider:()=>Ut});var Ut=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var so=r.object({provider:Ut,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 po=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 Dt={};E(Dt,{OptimizationUpdate:()=>co,OptimizationUpdateStatus:()=>Mt});var Mt=r.enum_(["running","completed","cancelled","initialized","error"]);var co=r.object({name:r.string().optional(),status:Mt.optional()});var Lt={};E(Lt,{ProjectMetricRequestPublic:()=>uo,ProjectMetricRequestPublicInterval:()=>Bt,ProjectMetricRequestPublicMetricType:()=>Wt,ProjectRetrieveDetailed:()=>go,ProjectUpdate:()=>mo,ProjectUpdateVisibility:()=>Ot,ProjectWrite:()=>lo,ProjectWriteVisibility:()=>Ft});var Ft=r.enum_(["private","public"]);var Ot=r.enum_(["private","public"]);var Wt=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Bt=r.enum_(["HOURLY","DAILY","WEEKLY"]);var lo=r.object({name:r.string(),visibility:Ft.optional(),description:r.string().optional()});var mo=r.object({name:r.string().optional(),description:r.string().optional(),visibility:Ot.optional()});var _s=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ae=r.object({field:r.string().optional(),operator:_s.optional(),key:r.string().optional(),value:r.string().optional()});var As=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Je=r.object({field:r.string().optional(),operator:As.optional(),key:r.string().optional(),value:r.string().optional()});var uo=r.object({metricType:r.property("metric_type",Wt.optional()),interval:Bt.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 go=r.object({name:r.string()});var Ht={};E(Ht,{CreatePromptVersionDetail:()=>ho,PromptUpdatable:()=>wo,PromptVersionRetrieveDetail:()=>bo,PromptWrite:()=>fo,PromptWriteType:()=>Vt});var Vt=r.enum_(["mustache","jinja2"]);var le=r.record(r.string(),r.unknown());var fo=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:Vt.optional(),tags:r.list(r.string()).optional()});var Ts=r.record(r.string(),r.unknown());var Es=r.enum_(["mustache","jinja2"]);var Se=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:Ts.optional(),type:Es.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var ho=r.object({name:r.string(),version:Se});var wo=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});var bo=r.object({name:r.string(),commit:r.string().optional()});var wr={};E(wr,{FindFeedbackScoreNames1RequestType:()=>Xt,GetSpanStatsRequestType:()=>Kt,GetSpansByProjectRequestType:()=>Jt,SpanBatchUpdate:()=>vo,SpanBatchWrite:()=>yo,SpanSearchStreamRequestPublic:()=>So,SpanSearchStreamRequestPublicType:()=>Gt,findFeedbackScoreNames1:()=>$t});var Jt=r.enum_(["general","tool","llm","guardrail"]);var Xt=r.enum_(["general","tool","llm","guardrail"]);var Kt=r.enum_(["general","tool","llm","guardrail"]);var Gt=r.enum_(["general","tool","llm","guardrail"]);var $t={};E($t,{Response:()=>ax});var ax=r.list(r.string());var Ps=r.enum_(["general","tool","llm","guardrail"]);var xo=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Ro=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:Ps.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",xo.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 yo=r.object({spans:r.list(Ro)});var Cs=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 ko=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:Cs.optional(),endTime:r.property("end_time",r.date().optional()),input:M.optional(),output:M.optional(),metadata:M.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 vo=r.object({ids:r.list(r.string()),update:ko,mergeTags:r.property("merge_tags",r.boolean().optional())});var js=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var zo=r.object({field:r.string().optional(),operator:js.optional(),key:r.string().optional(),value:r.string().optional()});var So=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:Gt.optional(),filters:r.list(zo).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:()=>Io,DeleteTraceThreads:()=>Uo,FeedbackScoreBatchThread:()=>No,TraceBatchUpdate:()=>Eo,TraceBatchWrite:()=>Ao,TraceSearchStreamRequestPublic:()=>Do,TraceThreadBatchIdentifier:()=>jo,TraceThreadBatchUpdate:()=>Co,TraceThreadSearchStreamRequest:()=>Mo,findFeedbackScoreNames2:()=>Qt,findTraceThreadsFeedbackScoreNames:()=>Yt});var Qt={};E(Qt,{Response:()=>nx});var nx=r.list(r.string());var Yt={};E(Yt,{Response:()=>sx});var sx=r.list(r.string());var _o=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",xo.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(_o)});var To=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:M.optional(),output:M.optional(),metadata:M.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Te.optional()),threadId:r.property("thread_id",r.string().optional())});var Eo=r.object({ids:r.list(r.string()),update:To,mergeTags:r.property("merge_tags",r.boolean().optional())});var Po=r.object({tags:r.list(r.string()).optional()});var Co=r.object({ids:r.list(r.string()),update:Po,mergeTags:r.property("merge_tags",r.boolean().optional())});var jo=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 Io=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 Uo=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 Is=r.enum_(["ui","sdk","online_scoring"]);var Us=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:Is,author:r.string().optional(),threadId:r.property("thread_id",r.string())});var No=r.object({scores:r.list(Us)});var Ns=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Re=r.object({field:r.string().optional(),operator:Ns.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 Do=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 Zt={};E(Zt,{AnnotationQueueBatchWrite:()=>Oo,AnnotationQueueUpdate:()=>Wo});var Ms=r.enum_(["trace","thread"]);var Fo=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:Ms,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var Oo=r.object({annotationQueues:r.property("annotation_queues",r.list(Fo))});var Wo=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 qt={};E(qt,{ChatCompletionRequest:()=>Lo});var Ds=r.record(r.string(),r.unknown());var Fs=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});var Os=r.enum_(["text","json_object","json_schema"]);var Ws=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var Bs=r.object({type:Os.optional(),jsonSchema:r.property("json_schema",Ws.optional())});var Bo=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 Ls=r.object({type:r.stringLiteral("function").optional(),function:Bo.optional()});var Ee=r.object({name:r.string().optional(),arguments:r.string().optional()});var Lo=r.object({model:r.string().optional(),messages:r.list(Ds).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",Fs.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",Bs.optional()),seed:r.number().optional(),tools:r.list(Ls).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(Bo).optional(),functionCall:r.property("function_call",Ee.optional())});var ea={};E(ea,{DashboardUpdatePublic:()=>Ho,DashboardWrite:()=>Vo});var Vo=r.object({name:r.string(),description:r.string().optional(),config:le});var re=r.record(r.string(),r.unknown());var Ho=r.object({name:r.string().optional(),description:r.string().optional(),config:re.optional()});var ra={};E(ra,{GuardrailBatchWrite:()=>Jo});var Vs=r.enum_(["TOPIC","PII"]);var Hs=r.enum_(["passed","failed"]);var Js=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:Vs,result:Hs,config:P,details:P});var Jo=r.object({guardrails:r.list(Js)});var oa={};E(oa,{WelcomeWizardSubmission:()=>Xo});var Xo=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 Xs=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(Xs).optional())});var Ks=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});var Gs=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(Ks).optional())});var $s=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});var Qs=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list($s).optional())});var ae=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Ys=r.enum_(["general","slack","pagerduty"]);var Zs=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 qs=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 ep=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var rp=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:ep,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 op=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",qs),triggerConfigs:r.property("trigger_configs",r.list(rp).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var px=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",Ys.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:Zs,triggers:r.list(op).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_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var tp=r.object({id:r.string().optional(),type:ip,configValue:r.property("config_value",r.record(r.string(),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.object({id:r.string().optional(),eventType:r.property("event_type",ap),triggerConfigs:r.property("trigger_configs",r.list(tp).optional())});var sp=r.enum_(["general","slack","pagerduty"]);var pp=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 Ko=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",sp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:pp,triggers:r.list(np).optional()});var L=r.object({ids:r.list(r.string())});var cp=r.enum_(["general","slack","pagerduty"]);var lp=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 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.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var up=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:dp,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 gp=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",mp),triggerConfigs:r.property("trigger_configs",r.list(up).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Go=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",cp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:lp,triggers:r.list(gp).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 fp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Go).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var cx=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var hp=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});var wp=r.enum_(["success","failure"]);var bp=r.object({status:wp.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 ia=r.object({ids:r.list(r.string())});var xp=r.enum_(["trace","thread"]);var Rp=r.object({username:r.string().optional(),status:r.number().optional()});var ne=r.object({name:r.string(),value:r.number()});var yp=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:xp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(Rp).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 lx=r.object({annotationQueues:r.property("annotation_queues",r.list(yp))});var kp=r.enum_(["trace","thread"]);var vp=r.object({username:r.string().optional(),status:r.number().optional()});var Ke=r.object({name:r.string(),value:r.number()});var $o=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:kp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(vp).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 zp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list($o).optional(),sortableBy:r.list(r.string()).optional()});var Sp=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 _p=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Sp).optional(),sortableBy:r.list(r.string()).optional()});var Ap=r.enum_(["trace","span"]);var Tp=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});var ta=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",Ap),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(Tp))});var Ep=r.enum_(["trace","span"]);var mx=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",Ep),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});var Pp=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});var Cp=r.record(r.string(),r.unknown());var jp=r.object({workspaceName:r.property("workspace_name",r.string().optional())});var Ip=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Pe=r.object({field:r.string().optional(),operator:Ip.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 Up=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Np=r.object({url:r.string(),detail:r.string().optional()});var Mp=r.object({url:r.string()});var Dp=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Np.optional()),videoUrl:r.property("video_url",Mp.optional())});var $e=r.object({role:Up,content:r.string().optional(),contentArray:r.property("content_array",r.list(Dp).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Fp=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var Qe=r.object({name:r.string(),type:Fp,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 Op=r.object({filters:r.list(Pe).optional(),code:Qo.optional()});var Yo=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Wp=r.object({filters:r.list(Pe).optional(),code:Yo.optional()});var Zo=r.object({model:Ge,messages:r.list($e),schema:r.list(Qe)});var Bp=r.object({filters:r.list(Re).optional(),code:Zo.optional()});var qo=r.object({metric:r.string()});var Lp=r.object({filters:r.list(Re).optional(),code:qo.optional()});var Vp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ei=r.object({field:r.string().optional(),operator:Vp.optional(),key:r.string().optional(),value:r.string().optional()});var ri=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(ei).optional(),code:ri.optional()});var oi=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")}),dx=r.union("type",{llm_as_judge:Op.extend(oi),user_defined_metric_python:Wp.extend(oi),trace_thread_llm_as_judge:Bp.extend(oi),trace_thread_user_defined_metric_python:Lp.extend(oi),span_llm_as_judge:Hp.extend(oi)}).transform({transform:a=>a,untransform:a=>a});var Jp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ii=r.object({field:r.string().optional(),operator:Jp.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 Xp=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Kp=r.object({url:r.string(),detail:r.string().optional()});var Gp=r.object({url:r.string()});var $p=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Kp.optional()),videoUrl:r.property("video_url",Gp.optional())});var Ze=r.object({role:Xp,content:r.string().optional(),contentArray:r.property("content_array",r.list($p).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Qp=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var qe=r.object({name:r.string(),type:Qp,description:r.string()});var Yp=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var Zp=r.object({filters:r.list(ii).optional(),code:Yp.optional()});var qp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ec=r.object({field:r.string().optional(),operator:qp.optional(),key:r.string().optional(),value:r.string().optional()});var rc=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var oc=r.object({filters:r.list(ec).optional(),code:rc.optional()});var ic=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ti=r.object({field:r.string().optional(),operator:ic.optional(),key:r.string().optional(),value:r.string().optional()});var tc=r.object({model:Ye,messages:r.list(Ze),schema:r.list(qe)});var ac=r.object({filters:r.list(ti).optional(),code:tc.optional()});var nc=r.object({metric:r.string()});var sc=r.object({filters:r.list(ti).optional(),code:nc.optional()});var pc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var cc=r.object({filters:r.list(ii).optional(),code:pc.optional()});var ai=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")}),lc=r.union("type",{llm_as_judge:Zp.extend(ai),user_defined_metric_python:cc.extend(ai),trace_thread_llm_as_judge:ac.extend(ai),trace_thread_user_defined_metric_python:sc.extend(ai),span_llm_as_judge:oc.extend(ai)}).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 mc=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var dc=r.object({url:r.string(),detail:r.string().optional()});var uc=r.object({url:r.string()});var gc=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",dc.optional()),videoUrl:r.property("video_url",uc.optional())});var rr=r.object({role:mc,content:r.string().optional(),contentArray:r.property("content_array",r.list(gc).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var fc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var or=r.object({name:r.string(),type:fc,description:r.string()});var hc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var ni=r.object({filters:r.list(Ae).optional(),code:hc.optional()});var wc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var si=r.object({filters:r.list(Ae).optional(),code:wc.optional()});var bc=r.object({model:er,messages:r.list(rr),schema:r.list(or)});var pi=r.object({filters:r.list(Je).optional(),code:bc.optional()});var xc=r.object({metric:r.string()});var ci=r.object({filters:r.list(Je).optional(),code:xc.optional()});var Rc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var li=r.object({filters:r.list(zo).optional(),code:Rc.optional()});var mi=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")}),yc=r.union("type",{llm_as_judge:ni.extend(mi),user_defined_metric_python:si.extend(mi),trace_thread_llm_as_judge:pi.extend(mi),trace_thread_user_defined_metric_python:ci.extend(mi),span_llm_as_judge:li.extend(mi)}).transform({transform:a=>a,untransform:a=>a});var kc=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(yc).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var di=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")}),vc=r.union("type",{llm_as_judge:ni.extend(di),user_defined_metric_python:si.extend(di),trace_thread_llm_as_judge:pi.extend(di),trace_thread_user_defined_metric_python:ci.extend(di),span_llm_as_judge:li.extend(di)}).transform({transform:a=>a,untransform:a=>a});var zc=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);var Sc=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:zc.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});var _c=r.object({content:r.list(Sc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Ac=r.object({filters:r.list(Pe).optional(),code:Qo.optional()});var Tc=r.object({filters:r.list(Pe).optional(),code:Yo.optional()});var Ec=r.object({filters:r.list(Re).optional(),code:Zo.optional()});var Pc=r.object({filters:r.list(Re).optional(),code:qo.optional()});var Cc=r.object({filters:r.list(ei).optional(),code:ri.optional()});var ui=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")}),jc=r.union("type",{llm_as_judge:Ac.extend(ui),user_defined_metric_python:Tc.extend(ui),trace_thread_llm_as_judge:Ec.extend(ui),trace_thread_user_defined_metric_python:Pc.extend(ui),span_llm_as_judge:Cc.extend(ui)}).transform({transform:a=>a,untransform:a=>a});var Ic=r.enum_(["system","user","assistant","tool","function"]);var gi=r.object({id:r.string().optional(),index:r.number().optional(),type:r.stringLiteral("function").optional(),function:Ee.optional()});var Uc=r.object({role:Ic.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(gi).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",Ee.optional())});var Nc=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(gi).optional()),functionCall:r.property("function_call",Ee.optional())});var Mc=r.object({index:r.number().optional(),message:Uc.optional(),delta:Nc.optional(),finishReason:r.property("finish_reason",r.string().optional())});var Dc=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});var Fc=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});var Oc=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",Dc.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",Fc.optional())});var Wc=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(Mc).optional(),usage:Oc.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});var ir=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 Bc=r.object({content:r.list(ir).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Lc=r.enum_(["private","public"]);var Vc=r.enum_(["unknown","processing","completed","failed"]);var ux=r.object({id:r.string().optional(),name:r.string(),visibility:Lc.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:Vc.optional()});var Hc=r.enum_(["manual","trace","span","sdk"]);var fi=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:Hc,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(Zr).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 gx=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(fi)});var Jc=r.object({generatedSamples:r.property("generated_samples",r.list(fi).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});var fx=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 Xc=r.enum_(["string","number","object","boolean","array","null"]);var Kc=r.object({name:r.string().optional(),types:r.list(Xc).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Gc=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 $c=r.enum_(["manual","trace","span","sdk"]);var aa=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var Qc=r.enum_(["ui","sdk","online_scoring"]);var Yc=r.enum_(["ui","sdk","online_scoring"]);var Zc=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Yc.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 qc=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Qc,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(),Zc).optional())});var el=r.enum_(["default","hidden"]);var rl=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:aa.optional(),output:aa.optional(),feedbackScores:r.property("feedback_scores",r.list(qc).optional()),comments:r.list(Gc).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",el.optional())});var ol=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(rl).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 il=r.object({content:r.list(ol).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Kc).optional(),sortableBy:r.list(r.string()).optional()});var tl=r.enum_(["private","public"]);var al=r.enum_(["unknown","processing","completed","failed"]);var xr=r.object({id:r.string().optional(),name:r.string(),visibility:tl.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:al.optional()});var nl=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 sl=r.object({value:r.number().optional()});var pl=r.object({value:r.number().optional()});var hi=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var cl=r.object({value:hi.optional()});var ll=r.object({name:r.string().optional()}),ml=r.union("type",{PERCENTAGE:cl.extend(ll),COUNT:pl.extend(ll),AVG:sl.extend(ll)}).transform({transform:a=>a,untransform:a=>a});var tr=r.object({stats:r.list(ml).optional()});var dl=r.enum_(["manual","trace","span","sdk"]);var ul=r.enum_(["default","hidden"]);var wi=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",ul.optional())});var bi=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:dl,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(wi).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 gl=r.enum_(["string","number","object","boolean","array","null"]);var fl=r.object({name:r.string().optional(),types:r.list(gl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var hl=r.object({content:r.list(bi).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(fl).optional(),sortableBy:r.list(r.string()).optional()});var wl=r.enum_(["string","number","object","boolean","array","null"]);var bl=r.object({name:r.string().optional(),types:r.list(wl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var xl=r.object({columns:r.list(bl).optional()});var Rl=r.object({typeName:r.string().optional()});var hx=r.object({type:Rl.optional(),closed:r.boolean().optional()});var yl=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});var kl=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:yl.optional()});var vl=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 zl=r.object({content:r.list(vl).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Sl=r.enum_(["regular","trial","mini-batch"]);var _l=r.enum_(["running","completed","cancelled"]);var Ce=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var na=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 wx=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:M.optional(),type:Sl.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:_l.optional(),experimentScores:r.property("experiment_scores",r.list(io).optional()),promptVersion:r.property("prompt_version",na.optional()),promptVersions:r.property("prompt_versions",r.list(na).optional())});var Rr=r.object({ids:r.list(r.string())});var Al=r.enum_(["TOPIC","PII"]);var Tl=r.enum_(["passed","failed"]);var El=r.object({name:Al.optional(),result:Tl.optional()});var Pl=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(El).optional()});var Cl=r.enum_(["default","hidden"]);var xi=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:M.optional(),output:M.optional(),metadata:M.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(Pl).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",Cl.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 jl=r.enum_(["general","tool","llm","guardrail"]);var Ri=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:jl.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:M.optional(),output:M.optional(),metadata:M.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 Il=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",M.optional()),trace:xi.optional(),spans:r.list(Ri).optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional())});var bx=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(Il)});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 Ul=r.enum_(["regular","trial","mini-batch"]);var Nl=r.enum_(["running","completed","cancelled"]);var Ml=r.object({name:r.string(),value:r.number()});var sa=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 yi=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:Ul.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:hi.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:Nl.optional(),experimentScores:r.property("experiment_scores",r.list(Ml).optional()),promptVersion:r.property("prompt_version",sa.optional()),promptVersions:r.property("prompt_versions",r.list(sa).optional())});var Dl=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(yi).optional(),sortableBy:r.list(r.string()).optional()});var Fl=r.object({label:r.string().optional()});var Ol=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});var Wl=r.object({groupsDetails:r.property("groups_details",r.list(Ol).optional())});var Bl=r.object({content:r.record(r.string(),Fl).optional(),details:Wl.optional()});var Ll=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 Vl=r.object({aggregations:Ll.optional()});var Hl=r.object({content:r.record(r.string(),Vl).optional()});var xx=r.object({ids:r.list(r.string())});var Jl=r.object({typeName:r.string().optional()});var Rx=r.object({type:Jl.optional(),closed:r.boolean().optional()});var Xl=r.object({trueLabel:r.string(),falseLabel:r.string()});var Kl=r.object({details:Xl.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 Gl=r.object({categories:r.record(r.string(),r.number())});var $l=r.object({details:Gl.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 Ql=r.object({max:r.number(),min:r.number()});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({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()}),yx=r.union("type",{numerical:Yl.extend(Zl),categorical:$l.extend(Zl),boolean:Kl.extend(Zl)}).transform({transform:a=>a,untransform:a=>a});var ql=r.object({trueLabel:r.string(),falseLabel:r.string()});var em=r.object({details:ql.optional()});var rm=r.object({categories:r.record(r.string(),r.number())});var om=r.object({details:rm.optional()});var im=r.object({max:r.number(),min:r.number()});var tm=r.object({details:im.optional()});var am=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),nm=r.union("type",{numerical:tm.extend(am),categorical:om.extend(am),boolean:em.extend(am)}).transform({transform:a=>a,untransform:a=>a});var sm=r.object({trueLabel:r.string(),falseLabel:r.string()});var ki=r.object({details:sm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var pm=r.object({categories:r.record(r.string(),r.number())});var vi=r.object({details:pm.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({max:r.number(),min:r.number()});var zi=r.object({details:cm.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({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()}),mm=r.union("type",{numerical:zi.extend(lm),categorical:vi.extend(lm),boolean:ki.extend(lm)}).transform({transform:a=>a,untransform:a=>a});var dm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(mm).optional()});var um=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()}),gm=r.union("type",{numerical:zi.extend(um),categorical:vi.extend(um),boolean:ki.extend(um)}).transform({transform:a=>a,untransform:a=>a});var fm=r.object({trueLabel:r.string(),falseLabel:r.string()});var hm=r.object({details:fm.optional()});var wm=r.object({categories:r.record(r.string(),r.number())});var bm=r.object({details:wm.optional()});var xm=r.object({max:r.number(),min:r.number()});var Rm=r.object({details:xm.optional()});var ym=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),km=r.union("type",{numerical:Rm.extend(ym),categorical:bm.extend(ym),boolean:hm.extend(ym)}).transform({transform:a=>a,untransform:a=>a});var vm=r.enum_(["TOPIC","PII"]);var zm=r.enum_(["passed","failed"]);var Sm=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:vm,result:zm,config:P,details:P});var kx=r.object({guardrails:r.list(Sm)});var _m=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var Si=r.object({id:r.string().optional(),provider:_m,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 Am=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(Si).optional(),sortableBy:r.list(r.string()).optional()});var Tm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm"]);var vx=r.object({id:r.string().optional(),provider:Tm,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 pa=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});var Em=r.enum_(["trace","thread"]);var ca=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",Em)});var zx=P;var Pm=r.enum_(["running","completed","cancelled","initialized","error"]);var Cm=r.object({role:r.string(),content:r.string()});var jm=r.object({messages:r.list(Cm)});var Im=r.object({model:r.string(),parameters:P.optional()});var Um=r.object({type:r.string(),parameters:P.optional()});var Nm=r.object({metrics:r.list(Um)});var Mm=r.object({type:r.string(),parameters:P.optional()});var Dm=r.object({datasetName:r.property("dataset_name",r.string()),prompt:jm,llmModel:r.property("llm_model",Im),evaluation:Nm,optimizer:Mm});var Sx=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:Pm,metadata:M.optional(),studioConfig:r.property("studio_config",Dm.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 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:le.optional()});var Bm=r.object({type:r.string(),parameters:le.optional()});var Lm=r.object({metrics:r.list(Bm)});var Vm=r.object({type:r.string(),parameters:le.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 Jm=r.enum_(["running","completed","cancelled","initialized","error"]);var la=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:Jm,metadata:ce.optional(),studioConfig:r.property("studio_config",Hm.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var Xm=r.enum_(["running","completed","cancelled","initialized","error"]);var Km=r.object({role:r.string(),content:r.string()});var Gm=r.object({messages:r.list(Km)});var $m=r.object({model:r.string(),parameters:re.optional()});var Qm=r.object({type:r.string(),parameters:re.optional()});var Ym=r.object({metrics:r.list(Qm)});var Zm=r.object({type:r.string(),parameters:re.optional()});var qm=r.object({datasetName:r.property("dataset_name",r.string()),prompt:Gm,llmModel:r.property("llm_model",$m),evaluation:Ym,optimizer:Zm});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:Xm,metadata:me.optional(),studioConfig:r.property("studio_config",qm.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 ma=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 ed=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});var _i=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var rd=r.enum_(["private","public"]);var _x=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(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",_i.optional())});var od=r.enum_(["private","public"]);var Ai=r.object({id:r.string().optional(),name:r.string(),visibility:od.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 id=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ai).optional(),sortableBy:r.list(r.string()).optional()});var td=r.object({name:r.string().optional(),type:r.string().optional()});var ad=r.object({scores:r.list(td).optional()});var nd=r.object({time:r.date(),value:r.number().optional()});var sd=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var pd=r.enum_(["HOURLY","DAILY","WEEKLY"]);var cd=r.object({name:r.string().optional(),data:r.list(nd).optional()});var ld=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",sd.optional()),interval:pd.optional(),results:r.list(cd).optional()});var md=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",_i.optional())});var dd=r.object({content:r.list(md).optional()});var ud=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var gd=r.object({name:r.string(),value:r.number()});var fd=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var hd=r.enum_(["private","public"]);var wd=r.object({id:r.string().optional(),name:r.string(),visibility:hd.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(gd).optional()),duration:fd.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",ud.optional())});var Ax=r.object({errors:r.list(r.string()).optional()});var bd=r.enum_(["mustache","jinja2"]);var xd=r.enum_(["mustache","jinja2"]);var Rd=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:xd.optional(),changeDescription:r.property("change_description",r.string().optional()),variables:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Tx=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:bd.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",Rd.optional())});var Ex=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var yd=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Se.optional())});var kd=r.enum_(["mustache","jinja2"]);var vd=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:kd.optional(),changeDescription:r.property("change_description",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var zd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(vd).optional()});var Sd=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional())});var _d=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Sd).optional(),sortableBy:r.list(r.string()).optional()});var Ad=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(),dashboardsEnabled:r.boolean()});var Px=r.object({spans:r.list(Ri)});var Ti=r.object({name:r.string(),author:r.string().optional()});var Ei=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Td=r.enum_(["ui","sdk","online_scoring"]);var Ed=r.enum_(["ui","sdk","online_scoring"]);var Pd=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Ed.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:Td,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(),Pd).optional())});var Cd=r.enum_(["general","tool","llm","guardrail"]);var Pi=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:Cd.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",Ei.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 jd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Pi).optional(),sortableBy:r.list(r.string()).optional()});var Id=r.enum_(["ui","sdk","online_scoring"]);var Ud=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:Id,author:r.string().optional(),id:r.string()});var Ci=r.object({scores:r.list(Ud)});var Cx=r.object({traces:r.list(xi)});var jx=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});var Nd=r.enum_(["TOPIC","PII"]);var Md=r.enum_(["passed","failed"]);var Dd=r.object({name:Nd.optional(),result:Md.optional()});var Fd=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Dd).optional()});var Od=r.enum_(["default","hidden"]);var ji=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",Ei.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(Fd).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",Od.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 Wd=r.enum_(["active","inactive"]);var Ii=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",M.optional()),lastMessage:r.property("last_message",M.optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),status:Wd.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 da=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 Bd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ii).optional(),sortableBy:r.list(r.string()).optional()});var Ld=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ji).optional(),sortableBy:r.list(r.string()).optional()});var Vd=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 Ix=r.object({time:r.date(),value:r.number().optional()});var ua=r.object({results:r.list(nr).optional()});var Ux=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 Ui=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional())});var Hd=r.object({results:r.list(nr).optional()});var ga=class{constructor(i={}){this._options=i;}getDatasetBiInfo(i){return w.fromPromise(this.__getDatasetBiInfo(i))}async __getDatasetBiInfo(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(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(i){return w.fromPromise(this.__getExperimentBiInfo(i))}async __getExperimentBiInfo(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(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(i){return w.fromPromise(this.__getSpansBiInfo(i))}async __getSpansBiInfo(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(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(i){return w.fromPromise(this.__getSpansCountForWorkspaces(i))}async __getSpansCountForWorkspaces(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(e.ok)return {data:Gs.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(i){return w.fromPromise(this.__getTracesBiInfo(i))}async __getTracesBiInfo(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(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(i){return w.fromPromise(this.__getTracesCountForWorkspaces(i))}async __getTracesCountForWorkspaces(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(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-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 fa=class{constructor(i={}){this._options=i;}findAlerts(i={},e){return w.fromPromise(this.__findAlerts(i,e))}async __findAlerts(i={},e){var g,f;let{page:o,size:t,sorting:n,filters:c}=i,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.sorting=n),c!=null&&(m.filters=c);let u=await 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:fp.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(i,e){return w.fromPromise(this.__createAlert(i,e))}async __createAlert(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Ko.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAlertBatch(i,e){return w.fromPromise(this.__deleteAlertBatch(i,e))}async __deleteAlertBatch(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:L.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAlertById(i,e){return w.fromPromise(this.__getAlertById(i,e))}async __getAlertById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/alerts/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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:Go.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 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 GET /v1/private/alerts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAlert(i,e,o){return w.fromPromise(this.__updateAlert(i,e,o))}async __updateAlert(i,e,o){var n,c;let t=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(i)}`),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: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(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/alerts/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getWebhookExamples(i={},e){return w.fromPromise(this.__getWebhookExamples(i,e))}async __getWebhookExamples(i={},e){var c,m;let{alertType:o}=i,t={};o!=null&&(t.alert_type=ht.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:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:hp.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(i,e){return w.fromPromise(this.__testWebhook(i,e))}async __testWebhook(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Ko.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(o.ok)return {data:bp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new 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 ha=class{constructor(i={}){this._options=i;}addItemsToAnnotationQueue(i,e,o){return w.fromPromise(this.__addItemsToAnnotationQueue(i,e,o))}async __addItemsToAnnotationQueue(i,e,o){var n,c;let t=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(i)}/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:ia.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/add.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findAnnotationQueues(i={},e){return w.fromPromise(this.__findAnnotationQueues(i,e))}async __findAnnotationQueues(i={},e){var f,y;let{page:o,size:t,name:n,filters:c,sorting:m}=i,u={};o!=null&&(u.page=o.toString()),t!=null&&(u.size=t.toString()),n!=null&&(u.name=n),c!=null&&(u.filters=c),m!=null&&(u.sorting=m);let g=await 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:zp.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(i,e){return w.fromPromise(this.__createAnnotationQueue(i,e))}async __createAnnotationQueue(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Fo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createAnnotationQueueBatch(i,e){return w.fromPromise(this.__createAnnotationQueueBatch(i,e))}async __createAnnotationQueueBatch(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Oo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAnnotationQueueBatch(i,e){return w.fromPromise(this.__deleteAnnotationQueueBatch(i,e))}async __deleteAnnotationQueueBatch(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:L.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAnnotationQueueById(i,e){return w.fromPromise(this.__getAnnotationQueueById(i,e))}async __getAnnotationQueueById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/annotation-queues/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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 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 GET /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAnnotationQueue(i,e={},o){return w.fromPromise(this.__updateAnnotationQueue(i,e,o))}async __updateAnnotationQueue(i,e={},o){var n,c;let t=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(i)}`),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:Wo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}removeItemsFromAnnotationQueue(i,e,o){return w.fromPromise(this.__removeItemsFromAnnotationQueue(i,e,o))}async __removeItemsFromAnnotationQueue(i,e,o){var n,c;let t=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(i)}/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:ia.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var wa=class{constructor(i={}){this._options=i;}attachmentList(i,e){return w.fromPromise(this.__attachmentList(i,e))}async __attachmentList(i,e){var y,v;let{page:o,size:t,projectId:n,entityType:c,entityId:m,path:u}=i,g={};o!=null&&(g.page=o.toString()),t!=null&&(g.size=t.toString()),g.project_id=n,g.entity_type=bt.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m,g.path=u;let f=await x({url:R((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v: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:_p.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(i,e){return w.fromPromise(this.__completeMultiPartUpload(i,e))}async __completeMultiPartUpload(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:ta.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(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(i,e){return w.fromPromise(this.__deleteAttachments(i,e))}async __deleteAttachments(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:ta.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(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(i,e){return w.fromPromise(this.__downloadAttachment(i,e))}async __downloadAttachment(i,e){var y,v;let{workspaceName:o,containerId:t,entityType:n,entityId:c,fileName:m,mimeType:u}=i,g={};o!=null&&(g.workspace_name=o),g.container_id=t,g.entity_type=xt.jsonOrThrow(n,{unrecognizedObjectKeys:"strip"}),g.entity_id=c,g.file_name=m,g.mime_type=u;let f=await x({url:R((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v: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(i,e){return w.fromPromise(this.__startMultiPartUpload(i,e))}async __startMultiPartUpload(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(o.ok)return {data:Pp.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(i,e){return w.fromPromise(this.__uploadAttachment(i,e))}async __uploadAttachment(i,e){var y,v;let{fileName:o,projectName:t,mimeType:n,entityType:c,entityId:m,body:u}=i,g={};g.file_name=o,t!=null&&(g.project_name=t),n!=null&&(g.mime_type=n),g.entity_type=yt.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m;let f=await x({url:R((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v: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 ba=class{constructor(i={}){this._options=i;}access(i,e){return w.fromPromise(this.__access(i,e))}async __access(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Cp.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(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(i){return w.fromPromise(this.__getWorkspaceName(i))}async __getWorkspaceName(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(e.ok)return {data:jp.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 xa=class{constructor(i={}){this._options=i;}findEvaluators(i={},e){return w.fromPromise(this.__findEvaluators(i,e))}async __findEvaluators(i={},e){var v,z;let{projectId:o,id:t,name:n,filters:c,sorting:m,page:u,size:g}=i,f={};o!=null&&(f.project_id=o),t!=null&&(f.id=t),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((z=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?z: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:kc.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(i,e){return w.fromPromise(this.__createAutomationRuleEvaluator(i,e))}async __createAutomationRuleEvaluator(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:lc.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(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(i,e){return w.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(i,e))}async __deleteAutomationRuleEvaluatorBatch(i,e){var m,u;let{projectId:o,body:t}=i,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:L.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/automations/evaluators/delete.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getEvaluatorById(i,e={},o){return w.fromPromise(this.__getEvaluatorById(i,e,o))}async __getEvaluatorById(i,e={},o){var m,u;let{projectId:t}=e,n={};t!=null&&(n.project_id=t);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(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.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:vc.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(i,e,o){return w.fromPromise(this.__updateAutomationRuleEvaluator(i,e,o))}async __updateAutomationRuleEvaluator(i,e,o){var n,c;let t=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(i)}`),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:jc.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getEvaluatorLogsById(i,e={},o){return w.fromPromise(this.__getEvaluatorLogsById(i,e,o))}async __getEvaluatorLogsById(i,e={},o){var m,u;let{size:t}=e,n={};t!=null&&(n.size=t.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(i)}/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:_c.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 Ra=class{constructor(i={}){this._options=i;}createChatCompletions(i={},e){return w.fromPromise(this.__createChatCompletions(i,e))}async __createChatCompletions(i={},e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Lo.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(o.ok)return {data:Wc.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 ya=class{constructor(i={}){this._options=i;}findDashboards(i={},e){return w.fromPromise(this.__findDashboards(i,e))}async __findDashboards(i={},e){var u,g;let{page:o,size:t,name:n}=i,c={};o!=null&&(c.page=o.toString()),t!=null&&(c.size=t.toString()),n!=null&&(c.name=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/dashboards"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:Bc.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/dashboards.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}createDashboard(i,e){return w.fromPromise(this.__createDashboard(i,e))}async __createDashboard(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Vo.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(o.ok)return {data:ir.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(i,e){return w.fromPromise(this.__getDashboardById(i,e))}async __getDashboardById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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:ir.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 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 GET /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDashboard(i,e){return w.fromPromise(this.__deleteDashboard(i,e))}async __deleteDashboard(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(i)}`),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(i,e={},o){return w.fromPromise(this.__updateDashboard(i,e,o))}async __updateDashboard(i,e={},o){var n,c;let t=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(i)}`),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: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(t.ok)return {data:ir.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ka=class{constructor(i={}){this._options=i;}batchUpdateDatasetItems(i,e){return w.fromPromise(this.__batchUpdateDatasetItems(i,e))}async __batchUpdateDatasetItems(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Dr.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/items/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findDatasets(i={},e){return w.fromPromise(this.__findDatasets(i,e))}async __findDatasets(i={},e){var z,S;let{page:o,size:t,withExperimentsOnly:n,withOptimizationsOnly:c,promptId:m,name:u,sorting:g,filters:f}=i,y={};o!=null&&(y.page=o.toString()),t!=null&&(y.size=t.toString()),n!=null&&(y.with_experiments_only=n.toString()),c!=null&&(y.with_optimizations_only=c.toString()),m!=null&&(y.prompt_id=m),u!=null&&(y.name=u),g!=null&&(y.sorting=g),f!=null&&(y.filters=f);let v=await x({url:R((S=(z=await s.get(this._options.baseUrl))!=null?z: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(v.ok)return {data:nl.parseOrThrow(v.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:v.rawResponse};if(v.error.reason==="status-code")throw new p({statusCode:v.error.statusCode,body:v.error.body,rawResponse:v.rawResponse});switch(v.error.reason){case "non-json":throw new p({statusCode:v.error.statusCode,body:v.error.rawBody,rawResponse:v.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets.");case "unknown":throw new p({message:v.error.errorMessage,rawResponse:v.rawResponse})}}createDataset(i,e){return w.fromPromise(this.__createDataset(i,e))}async __createDataset(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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(i,e){return w.fromPromise(this.__createOrUpdateDatasetItems(i,e))}async __createOrUpdateDatasetItems(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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(i,e){return w.fromPromise(this.__createDatasetItemsFromCsv(i,e))}async __createDatasetItemsFromCsv(i,e){var c,m;let o=await Og();o.append("file",Ie(i.file)),o.append("dataset_id",i.datasetId);let t=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(),...t.headers,...e==null?void 0:e.headers},requestType:"file",duplex:t.duplex,body:t.body,timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(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(i,e,o){return w.fromPromise(this.__createDatasetItemsFromSpans(i,e,o))}async __createDatasetItemsFromSpans(i,e,o){var n,c;let t=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(i)}/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(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-spans.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createDatasetItemsFromTraces(i,e,o){return w.fromPromise(this.__createDatasetItemsFromTraces(i,e,o))}async __createDatasetItemsFromTraces(i,e,o){var n,c;let t=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(i)}/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(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-traces.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getDatasetById(i,e){return w.fromPromise(this.__getDatasetById(i,e))}async __getDatasetById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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(i,e,o){return w.fromPromise(this.__updateDataset(i,e,o))}async __updateDataset(i,e,o){var n,c;let t=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(i)}`),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(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/datasets/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteDataset(i,e){return w.fromPromise(this.__deleteDataset(i,e))}async __deleteDataset(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(i)}`),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(i,e){return w.fromPromise(this.__deleteDatasetByName(i,e))}async __deleteDatasetByName(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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(i,e){return w.fromPromise(this.__deleteDatasetItems(i,e))}async __deleteDatasetItems(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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(i,e){return w.fromPromise(this.__deleteDatasetsBatch(i,e))}async __deleteDatasetsBatch(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:L.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(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(i,e,o){return w.fromPromise(this.__expandDataset(i,e,o))}async __expandDataset(i,e,o){var n,c;let t=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(i)}/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(t.ok)return {data:Jc.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/expansions.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findDatasetItemsWithExperimentItems(i,e,o){return w.fromPromise(this.__findDatasetItemsWithExperimentItems(i,e,o))}async __findDatasetItemsWithExperimentItems(i,e,o){var z,S;let{page:t,size:n,experimentIds:c,filters:m,sorting:u,search:g,truncate:f}=e,y={};t!=null&&(y.page=t.toString()),n!=null&&(y.size=n.toString()),y.experiment_ids=c,m!=null&&(y.filters=m),u!=null&&(y.sorting=u),g!=null&&(y.search=g),f!=null&&(y.truncate=f.toString());let v=await x({url:R((S=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?S:b.Default,`v1/private/datasets/${encodeURIComponent(i)}/items/experiments/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(v.ok)return {data:il.parseOrThrow(v.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:v.rawResponse};if(v.error.reason==="status-code")throw new p({statusCode:v.error.statusCode,body:v.error.body,rawResponse:v.rawResponse});switch(v.error.reason){case "non-json":throw new p({statusCode:v.error.statusCode,body:v.error.rawBody,rawResponse:v.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items.");case "unknown":throw new p({message:v.error.errorMessage,rawResponse:v.rawResponse})}}getDatasetByIdentifier(i,e){return w.fromPromise(this.__getDatasetByIdentifier(i,e))}async __getDatasetByIdentifier(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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(i,e,o){return w.fromPromise(this.__getDatasetExperimentItemsStats(i,e,o))}async __getDatasetExperimentItemsStats(i,e,o){var u,g;let{experimentIds:t,filters:n}=e,c={};c.experiment_ids=t,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(i)}/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:tr.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(i,e){return w.fromPromise(this.__getDatasetItemById(i,e))}async __getDatasetItemById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/items/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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:bi.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(i,e,o){return w.fromPromise(this.__patchDatasetItem(i,e,o))}async __patchDatasetItem(i,e,o){var n,c;let t=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(i)}`),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(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getDatasetItems(i,e={},o){return w.fromPromise(this.__getDatasetItems(i,e,o))}async __getDatasetItems(i,e={},o){var y,v;let{page:t,size:n,version:c,filters:m,truncate:u}=e,g={};t!=null&&(g.page=t.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((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v:b.Default,`v1/private/datasets/${encodeURIComponent(i)}/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:hl.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(i,e={},o){return w.fromPromise(this.__getDatasetItemsOutputColumns(i,e,o))}async __getDatasetItemsOutputColumns(i,e={},o){var m,u;let{experimentIds:t}=e,n={};t!=null&&(n.experiment_ids=t);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(i)}/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:xl.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(i,e){return w.fromPromise(this.__streamDatasetItems(i,e))}async __streamDatasetItems(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(i,{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(i,e){return w.fromPromise(this.__compareDatasetVersions(i,e))}async __compareDatasetVersions(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(i)}/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:kl.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 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 GET /v1/private/datasets/{id}/versions/diff.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createVersionTag(i,e,o,t){return w.fromPromise(this.__createVersionTag(i,e,o,t))}async __createVersionTag(i,e,o,t){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(i)}/tags`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",body:$r.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(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(i,e={},o){return w.fromPromise(this.__listDatasetVersions(i,e,o))}async __listDatasetVersions(i,e={},o){var u,g;let{page:t,size:n}=e,c={};t!=null&&(c.page=t.toString()),n!=null&&(c.size=n.toString());let m=await 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(i)}/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:zl.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}createDatasetVersion(i,e={},o){return w.fromPromise(this.__createDatasetVersion(i,e,o))}async __createDatasetVersion(i,e={},o){var n,c;let t=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(i)}/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(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteVersionTag(i,e,o,t){return w.fromPromise(this.__deleteVersionTag(i,e,o,t))}async __deleteVersionTag(i,e,o,t){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(i)}/tags/${encodeURIComponent(e)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new 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})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var va=class{constructor(i={}){this._options=i;}findExperiments(i={},e){return w.fromPromise(this.__findExperiments(i,e))}async __findExperiments(i={},e){var O,D;let{page:o,size:t,datasetId:n,optimizationId:c,types:m,name:u,datasetDeleted:g,promptId:f,sorting:y,filters:v}=i,z={};o!=null&&(z.page=o.toString()),t!=null&&(z.size=t.toString()),n!=null&&(z.datasetId=n),c!=null&&(z.optimization_id=c),m!=null&&(z.types=m),u!=null&&(z.name=u),g!=null&&(z.dataset_deleted=g.toString()),f!=null&&(z.prompt_id=f),y!=null&&(z.sorting=y),v!=null&&(z.filters=v);let S=await x({url:R((D=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?D: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:z,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:Dl.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")switch(S.error.statusCode){case 400:throw new _(S.error.body,S.rawResponse);default:throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse})}switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}createExperiment(i,e){return w.fromPromise(this.__createExperiment(i,e))}async __createExperiment(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Yr.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(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(i,e){return w.fromPromise(this.__createExperimentItems(i,e))}async __createExperimentItems(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:qr.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(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(i,e){return w.fromPromise(this.__deleteExperimentItems(i,e))}async __deleteExperimentItems(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:eo.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(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(i,e){return w.fromPromise(this.__deleteExperimentsById(i,e))}async __deleteExperimentsById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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(i,e){return w.fromPromise(this.__experimentItemsBulk(i,e))}async __experimentItemsBulk(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:oo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/experiments/items/bulk.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames(i={},e){return w.fromPromise(this.__findFeedbackScoreNames(i,e))}async __findFeedbackScoreNames(i={},e){var c,m;let{experimentIds:o}=i,t={};o!=null&&(t.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:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data: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(i={},e){return w.fromPromise(this.__findExperimentGroups(i,e))}async __findExperimentGroups(i={},e){var g,f;let{groups:o,types:t,name:n,filters:c}=i,m={};o!=null&&(m.groups=o),t!=null&&(m.types=t),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:Bl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/groups.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}findExperimentGroupsAggregations(i={},e){return w.fromPromise(this.__findExperimentGroupsAggregations(i,e))}async __findExperimentGroupsAggregations(i={},e){var g,f;let{groups:o,types:t,name:n,filters:c}=i,m={};o!=null&&(m.groups=o),t!=null&&(m.types=t),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:Hl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/groups/aggregations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}finishExperiments(i,e){return w.fromPromise(this.__finishExperiments(i,e))}async __finishExperiments(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/finish.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getExperimentById(i,e){return w.fromPromise(this.__getExperimentById(i,e))}async __getExperimentById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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:yi.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 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 GET /v1/private/experiments/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateExperiment(i,e={},o){return w.fromPromise(this.__updateExperiment(i,e,o))}async __updateExperiment(i,e={},o){var n,c;let t=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(i)}`),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:to.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/experiments/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getExperimentItemById(i,e){return w.fromPromise(this.__getExperimentItemById(i,e))}async __getExperimentItemById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/items/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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:wi.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 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 GET /v1/private/experiments/items/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperimentItems(i,e){return w.fromPromise(this.__streamExperimentItems(i,e))}async __streamExperimentItems(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:ao.jsonOrThrow(i,{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(i,e){return w.fromPromise(this.__streamExperiments(i,e))}async __streamExperiments(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:no.jsonOrThrow(i,{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 za=class{constructor(i={}){this._options=i;}findFeedbackDefinitions(i={},e){return w.fromPromise(this.__findFeedbackDefinitions(i,e))}async __findFeedbackDefinitions(i={},e){var g,f;let{page:o,size:t,name:n,type:c}=i,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.type=jt.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:dm.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(i,e){return w.fromPromise(this.__createFeedbackDefinition(i,e))}async __createFeedbackDefinition(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:nm.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(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(i,e){return w.fromPromise(this.__getFeedbackDefinitionById(i,e))}async __getFeedbackDefinitionById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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:gm.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(i,e,o){return w.fromPromise(this.__updateFeedbackDefinition(i,e,o))}async __updateFeedbackDefinition(i,e,o){var n,c;let t=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(i)}`),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:km.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteFeedbackDefinitionById(i,e){return w.fromPromise(this.__deleteFeedbackDefinitionById(i,e))}async __deleteFeedbackDefinitionById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(i)}`),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(i,e){return w.fromPromise(this.__deleteFeedbackDefinitionsBatch(i,e))}async __deleteFeedbackDefinitionsBatch(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:L.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(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 Sa=class{constructor(i={}){this._options=i;}createGuardrails(i,e){return w.fromPromise(this.__createGuardrails(i,e))}async __createGuardrails(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Jo.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(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 _a=class{constructor(i={}){this._options=i;}deleteLlmProviderApiKeysBatch(i,e){return w.fromPromise(this.__deleteLlmProviderApiKeysBatch(i,e))}async __deleteLlmProviderApiKeysBatch(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:L.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(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(i){return w.fromPromise(this.__findLlmProviderKeys(i))}async __findLlmProviderKeys(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(e.ok)return {data:Am.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(i,e){return w.fromPromise(this.__storeLlmProviderApiKey(i,e))}async __storeLlmProviderApiKey(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:so.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(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(i,e){return w.fromPromise(this.__getLlmProviderApiKeyById(i,e))}async __getLlmProviderApiKeyById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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:Si.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 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 GET /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateLlmProviderApiKey(i,e={},o){return w.fromPromise(this.__updateLlmProviderApiKey(i,e,o))}async __updateLlmProviderApiKey(i,e={},o){var n,c;let t=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(i)}`),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:po.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new $(t.error.body,t.rawResponse);case 403:throw new Z(ae.parseOrThrow(t.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),t.rawResponse);case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Aa=class{constructor(i={}){this._options=i;}evaluateThreads(i,e){return w.fromPromise(this.__evaluateThreads(i,e))}async __evaluateThreads(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:ca.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(o.ok)return {data:pa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new 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/manual-evaluation/threads.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateTraces(i,e){return w.fromPromise(this.__evaluateTraces(i,e))}async __evaluateTraces(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:ca.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(o.ok)return {data:pa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new 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/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 Ta=class{constructor(i={}){this._options=i;}receiveProtobufTraces(i){return w.fromPromise(this.__receiveProtobufTraces(i))}async __receiveProtobufTraces(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(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 Ea=class{constructor(i={}){this._options=i;}cancelStudioOptimizations(i,e){return w.fromPromise(this.__cancelStudioOptimizations(i,e))}async __cancelStudioOptimizations(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(i)}/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(i={},e){return w.fromPromise(this.__findOptimizations(i,e))}async __findOptimizations(i={},e){var y,v;let{page:o,size:t,datasetId:n,name:c,datasetDeleted:m,filters:u}=i,g={};o!=null&&(g.page=o.toString()),t!=null&&(g.size=t.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((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v: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:ma.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 _(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(i,e){return w.fromPromise(this.__createOptimization(i,e))}async __createOptimization(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:la.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(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(i,e){return w.fromPromise(this.__upsertOptimization(i,e))}async __upsertOptimization(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:la.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(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(i,e){return w.fromPromise(this.__deleteOptimizationsById(i,e))}async __deleteOptimizationsById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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(i={},e){return w.fromPromise(this.__findStudioOptimizations(i,e))}async __findStudioOptimizations(i={},e){var y,v;let{page:o,size:t,datasetId:n,name:c,datasetDeleted:m,filters:u}=i,g={};o!=null&&(g.page=o.toString()),t!=null&&(g.size=t.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((v=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?v: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:ma.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 _(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(i,e){return w.fromPromise(this.__getOptimizationById(i,e))}async __getOptimizationById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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 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 GET /v1/private/optimizations/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateOptimizationsById(i,e={},o){return w.fromPromise(this.__updateOptimizationsById(i,e,o))}async __updateOptimizationsById(i,e={},o){var n,c;let t=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(i)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:co.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/optimizations/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getStudioOptimizationById(i,e){return w.fromPromise(this.__getStudioOptimizationById(i,e))}async __getStudioOptimizationById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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 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 GET /v1/private/optimizations/studio/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getStudioOptimizationLogs(i,e){return w.fromPromise(this.__getStudioOptimizationLogs(i,e))}async __getStudioOptimizationLogs(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(i)}/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:ed.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 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 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 Pa=class{constructor(i={}){this._options=i;}findProjects(i={},e){return w.fromPromise(this.__findProjects(i,e))}async __findProjects(i={},e){var g,f;let{page:o,size:t,name:n,sorting:c}=i,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await 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:id.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(i,e){return w.fromPromise(this.__createProject(i,e))}async __createProject(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:lo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getProjectById(i,e){return w.fromPromise(this.__getProjectById(i,e))}async __getProjectById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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:Ai.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(i,e){return w.fromPromise(this.__deleteProjectById(i,e))}async __deleteProjectById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(i)}`),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(i,e={},o){return w.fromPromise(this.__updateProject(i,e,o))}async __updateProject(i,e={},o){var n,c;let t=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(i)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:mo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/projects/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteProjectsBatch(i,e){return w.fromPromise(this.__deleteProjectsBatch(i,e))}async __deleteProjectsBatch(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:L.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(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(i={},e){return w.fromPromise(this.__findFeedbackScoreNamesByProjectIds(i,e))}async __findFeedbackScoreNamesByProjectIds(i={},e){var c,m;let{projectIds:o}=i,t={};o!=null&&(t.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:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:ad.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(i,e={},o){return w.fromPromise(this.__getProjectMetrics(i,e,o))}async __getProjectMetrics(i,e={},o){var n,c;let t=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(i)}/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:uo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:ld.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/{id}/metrics.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getProjectStats(i={},e){return w.fromPromise(this.__getProjectStats(i,e))}async __getProjectStats(i={},e){var g,f;let{page:o,size:t,name:n,sorting:c}=i,m={};o!=null&&(m.page=o.toString()),t!=null&&(m.size=t.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await 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:dd.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(i,e){return w.fromPromise(this.__retrieveProject(i,e))}async __retrieveProject(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:go.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(o.ok)return {data:wd.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new 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 Ca=class{constructor(i={}){this._options=i;}getPrompts(i={},e){return w.fromPromise(this.__getPrompts(i,e))}async __getPrompts(i={},e){var f,y;let{page:o,size:t,name:n,sorting:c,filters:m}=i,u={};o!=null&&(u.page=o.toString()),t!=null&&(u.size=t.toString()),n!=null&&(u.name=n),c!=null&&(u.sorting=c),m!=null&&(u.filters=m);let g=await 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:_d.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(i,e){return w.fromPromise(this.__createPrompt(i,e))}async __createPrompt(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:fo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createPromptVersion(i,e){return w.fromPromise(this.__createPromptVersion(i,e))}async __createPromptVersion(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:ho.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(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 _(o.error.body,o.rawResponse);case 409:throw new F(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptById(i,e){return w.fromPromise(this.__getPromptById(i,e))}async __getPromptById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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: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 404: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 GET /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePrompt(i,e,o){return w.fromPromise(this.__updatePrompt(i,e,o))}async __updatePrompt(i,e,o){var n,c;let t=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(i)}`),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:wo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new A(t.error.body,t.rawResponse);case 409:throw new F(t.error.body,t.rawResponse);case 422:throw new B(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/prompts/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deletePrompt(i,e){return w.fromPromise(this.__deletePrompt(i,e))}async __deletePrompt(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(i)}`),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(i,e){return w.fromPromise(this.__deletePromptsBatch(i,e))}async __deletePromptsBatch(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:L.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(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(i,e){return w.fromPromise(this.__getPromptVersionById(i,e))}async __getPromptVersionById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/versions/${encodeURIComponent(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-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 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 GET /v1/private/prompts/versions/{versionId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersions(i,e={},o){return w.fromPromise(this.__getPromptVersions(i,e,o))}async __getPromptVersions(i,e={},o){var u,g;let{page:t,size:n}=e,c={};t!=null&&(c.page=t.toString()),n!=null&&(c.size=n.toString());let m=await 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(i)}/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:zd.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(i,e,o){return w.fromPromise(this.__restorePromptVersion(i,e,o))}async __restorePromptVersion(i,e,o){var n,c;let t=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(i)}/versions/${encodeURIComponent(e)}/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:Se.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new _(t.error.body,t.rawResponse);case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/{promptId}/versions/{versionId}/restore.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}retrievePromptVersion(i,e){return w.fromPromise(this.__retrievePromptVersion(i,e))}async __retrievePromptVersion(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:bo.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(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 _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new 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 ja=class{constructor(i={}){this._options=i;}getServiceToggles(i){return w.fromPromise(this.__getServiceToggles(i))}async __getServiceToggles(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(e.ok)return {data:Ad.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new 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 Ia=class{constructor(i={}){this._options=i;}addSpanComment(i,e,o){return w.fromPromise(this.__addSpanComment(i,e,o))}async __addSpanComment(i,e,o){var n,c;let t=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(i)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addSpanFeedbackScore(i,e,o){return w.fromPromise(this.__addSpanFeedbackScore(i,e,o))}async __addSpanFeedbackScore(i,e,o){var n,c;let t=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(i)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/spans/{id}/feedback-scores.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createSpans(i,e){return w.fromPromise(this.__createSpans(i,e))}async __createSpans(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:yo.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(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(i,e){return w.fromPromise(this.__batchUpdateSpans(i,e))}async __batchUpdateSpans(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpansByProject(i={},e){return w.fromPromise(this.__getSpansByProject(i,e))}async __getSpansByProject(i={},e){var ie,lr;let{page:o,size:t,projectName:n,projectId:c,traceId:m,type:u,filters:g,truncate:f,stripAttachments:y,sorting:v,exclude:z,fromTime:S,toTime:O}=i,D={};o!=null&&(D.page=o.toString()),t!=null&&(D.size=t.toString()),n!=null&&(D.project_name=n),c!=null&&(D.project_id=c),m!=null&&(D.trace_id=m),u!=null&&(D.type=Jt.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"})),g!=null&&(D.filters=g),f!=null&&(D.truncate=f.toString()),y!=null&&(D.strip_attachments=y.toString()),v!=null&&(D.sorting=v),z!=null&&(D.exclude=z),S!=null&&(D.from_time=S.toISOString()),O!=null&&(D.to_time=O.toISOString());let G=await x({url:R((lr=(ie=await s.get(this._options.baseUrl))!=null?ie: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:D,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:jd.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(i,e){return w.fromPromise(this.__createSpan(i,e))}async __createSpan(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Ro.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(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(i,e={},o){return w.fromPromise(this.__getSpanById(i,e,o))}async __getSpanById(i,e={},o){var m,u;let{stripAttachments:t}=e,n={};t!=null&&(n.strip_attachments=t.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(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.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:Pi.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 A(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(i,e){return w.fromPromise(this.__deleteSpanById(i,e))}async __deleteSpanById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/spans/${encodeURIComponent(i)}`),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(i,e,o){return w.fromPromise(this.__updateSpan(i,e,o))}async __updateSpan(i,e,o){var n,c;let t=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(i)}`),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(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteSpanComments(i,e){return w.fromPromise(this.__deleteSpanComments(i,e))}async __deleteSpanComments(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:L.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(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(i,e,o){return w.fromPromise(this.__deleteSpanFeedbackScore(i,e,o))}async __deleteSpanFeedbackScore(i,e,o){var n,c;let t=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(i)}/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:Ti.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/feedback-scores/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}findFeedbackScoreNames1(i={},e){return w.fromPromise(this.__findFeedbackScoreNames1(i,e))}async __findFeedbackScoreNames1(i={},e){var m,u;let{projectId:o,type:t}=i,n={};o!=null&&(n.project_id=o),t!=null&&(n.type=Xt.jsonOrThrow(t,{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(i,e,o){return w.fromPromise(this.__getSpanComment(i,e,o))}async __getSpanComment(i,e,o){var n,c;let t=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(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/{spanId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getSpanStats(i={},e){return w.fromPromise(this.__getSpanStats(i,e))}async __getSpanStats(i={},e){var v,z;let{projectId:o,projectName:t,traceId:n,type:c,filters:m,fromTime:u,toTime:g}=i,f={};o!=null&&(f.project_id=o),t!=null&&(f.project_name=t),n!=null&&(f.trace_id=n),c!=null&&(f.type=Kt.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((z=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?z: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:tr.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(i,e){return w.fromPromise(this.__scoreBatchOfSpans(i,e))}async __scoreBatchOfSpans(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Ci.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(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(i={},e){return w.fromPromise(this.__searchSpans(i,e))}async __searchSpans(i={},e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:So.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpanComment(i,e,o){return w.fromPromise(this.__updateSpanComment(i,e,o))}async __updateSpanComment(i,e,o){var n,c;let t=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(i)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ua=class{constructor(i={}){this._options=i;}addThreadComment(i,e,o){return w.fromPromise(this.__addThreadComment(i,e,o))}async __addThreadComment(i,e,o){var n,c;let t=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(i)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addTraceComment(i,e,o){return w.fromPromise(this.__addTraceComment(i,e,o))}async __addTraceComment(i,e,o){var n,c;let t=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(i)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/comments.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}addTraceFeedbackScore(i,e,o){return w.fromPromise(this.__addTraceFeedbackScore(i,e,o))}async __addTraceFeedbackScore(i,e,o){var n,c;let t=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(i)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/{id}/feedback-scores.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}createTraces(i,e){return w.fromPromise(this.__createTraces(i,e))}async __createTraces(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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(i,e){return w.fromPromise(this.__batchUpdateTraces(i,e))}async __batchUpdateTraces(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Eo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateThreads(i,e){return w.fromPromise(this.__batchUpdateThreads(i,e))}async __batchUpdateThreads(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Co.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}closeTraceThread(i={},e){return w.fromPromise(this.__closeTraceThread(i,e))}async __closeTraceThread(i={},e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:jo.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(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404: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 PUT /v1/private/traces/threads/close.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTracesByProject(i={},e){return w.fromPromise(this.__getTracesByProject(i,e))}async __getTracesByProject(i={},e){var D,G;let{page:o,size:t,projectName:n,projectId:c,filters:m,truncate:u,stripAttachments:g,sorting:f,exclude:y,fromTime:v,toTime:z}=i,S={};o!=null&&(S.page=o.toString()),t!=null&&(S.size=t.toString()),n!=null&&(S.project_name=n),c!=null&&(S.project_id=c),m!=null&&(S.filters=m),u!=null&&(S.truncate=u.toString()),g!=null&&(S.strip_attachments=g.toString()),f!=null&&(S.sorting=f),y!=null&&(S.exclude=y),v!=null&&(S.from_time=v.toISOString()),z!=null&&(S.to_time=z.toISOString());let O=await x({url:R((G=(D=await s.get(this._options.baseUrl))!=null?D: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:Ld.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(i,e){return w.fromPromise(this.__createTrace(i,e))}async __createTrace(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:_o.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(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(i,e={},o){return w.fromPromise(this.__getTraceById(i,e,o))}async __getTraceById(i,e={},o){var m,u;let{stripAttachments:t}=e,n={};t!=null&&(n.strip_attachments=t.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(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.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:ji.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(i,e){return w.fromPromise(this.__deleteTraceById(i,e))}async __deleteTraceById(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/traces/${encodeURIComponent(i)}`),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(i,e,o){return w.fromPromise(this.__updateTrace(i,e,o))}async __updateTrace(i,e,o){var n,c;let t=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(i)}`),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:To.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/{id}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteThreadComments(i,e){return w.fromPromise(this.__deleteThreadComments(i,e))}async __deleteThreadComments(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:L.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(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(i,e){return w.fromPromise(this.__deleteThreadFeedbackScores(i,e))}async __deleteThreadFeedbackScores(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Io.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(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(i,e){return w.fromPromise(this.__deleteTraceComments(i,e))}async __deleteTraceComments(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:L.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(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(i,e,o){return w.fromPromise(this.__deleteTraceFeedbackScore(i,e,o))}async __deleteTraceFeedbackScore(i,e,o){var n,c;let t=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(i)}/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:Ti.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/feedback-scores/delete.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}deleteTraceThreads(i,e){return w.fromPromise(this.__deleteTraceThreads(i,e))}async __deleteTraceThreads(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Uo.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(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(i,e){return w.fromPromise(this.__deleteTraces(i,e))}async __deleteTraces(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:L.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(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(i={},e){return w.fromPromise(this.__findFeedbackScoreNames2(i,e))}async __findFeedbackScoreNames2(i={},e){var c,m;let{projectId:o}=i,t={};o!=null&&(t.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:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data: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(i={},e){return w.fromPromise(this.__findTraceThreadsFeedbackScoreNames(i,e))}async __findTraceThreadsFeedbackScoreNames(i={},e){var c,m;let{projectId:o}=i,t={};o!=null&&(t.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:t,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data: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(i={},e){return w.fromPromise(this.__getTraceStats(i,e))}async __getTraceStats(i={},e){var f,y;let{projectId:o,projectName:t,filters:n,fromTime:c,toTime:m}=i,u={};o!=null&&(u.project_id=o),t!=null&&(u.project_name=t),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),m!=null&&(u.to_time=m.toISOString());let g=await 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:tr.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(i,e,o){return w.fromPromise(this.__getThreadComment(i,e,o))}async __getThreadComment(i,e,o){var n,c;let t=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(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/{threadId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getTraceComment(i,e,o){return w.fromPromise(this.__getTraceComment(i,e,o))}async __getTraceComment(i,e,o){var n,c;let t=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(i)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:H.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/{traceId}/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}getTraceThread(i,e){return w.fromPromise(this.__getTraceThread(i,e))}async __getTraceThread(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:da.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(o.ok)return {data:Ii.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 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/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceThreads(i={},e){return w.fromPromise(this.__getTraceThreads(i,e))}async __getTraceThreads(i={},e){var O,D;let{page:o,size:t,projectName:n,projectId:c,truncate:m,stripAttachments:u,filters:g,sorting:f,fromTime:y,toTime:v}=i,z={};o!=null&&(z.page=o.toString()),t!=null&&(z.size=t.toString()),n!=null&&(z.project_name=n),c!=null&&(z.project_id=c),m!=null&&(z.truncate=m.toString()),u!=null&&(z.strip_attachments=u.toString()),g!=null&&(z.filters=g),f!=null&&(z.sorting=f),y!=null&&(z.from_time=y.toISOString()),v!=null&&(z.to_time=v.toISOString());let S=await x({url:R((D=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?D: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:z,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:Bd.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(i,e){return w.fromPromise(this.__openTraceThread(i,e))}async __openTraceThread(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:da.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(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(i,e){return w.fromPromise(this.__scoreBatchOfThreads(i,e))}async __scoreBatchOfThreads(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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(i,e){return w.fromPromise(this.__scoreBatchOfTraces(i,e))}async __scoreBatchOfTraces(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Ci.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(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(i={},e){return w.fromPromise(this.__searchTraceThreads(i,e))}async __searchTraceThreads(i={},e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(i,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraces(i={},e){return w.fromPromise(this.__searchTraces(i,e))}async __searchTraces(i={},e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Do.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 401:throw new $(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateThread(i,e,o){return w.fromPromise(this.__updateThread(i,e,o))}async __updateThread(i,e,o){var n,c;let t=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(i)}`),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:Po.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/{threadModelId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}updateThreadComment(i,e,o){return w.fromPromise(this.__updateThreadComment(i,e,o))}async __updateThreadComment(i,e,o){var n,c;let t=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(i)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}updateTraceComment(i,e,o){return w.fromPromise(this.__updateTraceComment(i,e,o))}async __updateTraceComment(i,e,o){var n,c;let t=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(i)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 404:throw new A(t.error.body,t.rawResponse);default:throw new p({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}switch(t.error.reason){case "non-json":throw new p({statusCode:t.error.statusCode,body:t.error.rawBody,rawResponse:t.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/comments/{commentId}.");case "unknown":throw new p({message:t.error.errorMessage,rawResponse:t.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Na=class{constructor(i={}){this._options=i;}getWelcomeWizardStatus(i){return w.fromPromise(this.__getWelcomeWizardStatus(i))}async __getWelcomeWizardStatus(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(e.ok)return {data:Vd.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(i={},e){return w.fromPromise(this.__submitWelcomeWizard(i,e))}async __submitWelcomeWizard(i={},e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Xo.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(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 Ma=class{constructor(i={}){this._options=i;}costsSummary(i,e){return w.fromPromise(this.__costsSummary(i,e))}async __costsSummary(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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 _(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(i){return w.fromPromise(this.__getWorkspaceConfiguration(i))}async __getWorkspaceConfiguration(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(e.ok)return {data:Ui.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 A(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(i,e){return w.fromPromise(this.__upsertWorkspaceConfiguration(i,e))}async __upsertWorkspaceConfiguration(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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:Ui.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(o.ok)return {data:Ui.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new B(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/workspaces/configurations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteWorkspaceConfiguration(i){return w.fromPromise(this.__deleteWorkspaceConfiguration(i))}async __deleteWorkspaceConfiguration(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(e.ok)return {data:void 0,rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new A(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(i,e){return w.fromPromise(this.__getCost(i,e))}async __getCost(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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 _(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(i,e){return w.fromPromise(this.__getMetric(i,e))}async __getMetric(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(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 _(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(i,e){return w.fromPromise(this.__metricsSummary(i,e))}async __metricsSummary(i,e){var t,n;let o=await x({url:R((n=(t=await s.get(this._options.baseUrl))!=null?t: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(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(o.ok)return {data:Hd.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new 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 Da=class{constructor(i={}){this._options=i;}datasetsRedirect(i,e){return w.fromPromise(this.__datasetsRedirect(i,e))}async __datasetsRedirect(i,e){var u,g;let{datasetId:o,workspaceName:t,path:n}=i,c={};c.dataset_id=o,t!=null&&(c.workspace_name=t),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 _(m.error.body,m.rawResponse);case 404: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/session/redirect/datasets.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}experimentsRedirect(i,e){return w.fromPromise(this.__experimentsRedirect(i,e))}async __experimentsRedirect(i,e){var g,f;let{datasetId:o,experimentId:t,workspaceName:n,path:c}=i,m={};m.dataset_id=o,m.experiment_id=t,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 _(u.error.body,u.rawResponse);case 404: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/session/redirect/experiments.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}optimizationsRedirect(i,e){return w.fromPromise(this.__optimizationsRedirect(i,e))}async __optimizationsRedirect(i,e){var g,f;let{datasetId:o,optimizationId:t,workspaceName:n,path:c}=i,m={};m.dataset_id=o,m.optimization_id=t,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 _(u.error.body,u.rawResponse);case 404: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/session/redirect/optimizations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}projectsRedirect(i,e){return w.fromPromise(this.__projectsRedirect(i,e))}async __projectsRedirect(i,e){var u,g;let{traceId:o,workspaceName:t,path:n}=i,c={};c.trace_id=o,t!=null&&(c.workspace_name=t),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 _(m.error.body,m.rawResponse);case 404: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/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 Ni=class{constructor(i={}){this._options=i;}get systemUsage(){var i;return (i=this._systemUsage)!=null?i:this._systemUsage=new ga(this._options)}get alerts(){var i;return (i=this._alerts)!=null?i:this._alerts=new fa(this._options)}get annotationQueues(){var i;return (i=this._annotationQueues)!=null?i:this._annotationQueues=new ha(this._options)}get attachments(){var i;return (i=this._attachments)!=null?i:this._attachments=new wa(this._options)}get check(){var i;return (i=this._check)!=null?i:this._check=new ba(this._options)}get automationRuleEvaluators(){var i;return (i=this._automationRuleEvaluators)!=null?i:this._automationRuleEvaluators=new xa(this._options)}get chatCompletions(){var i;return (i=this._chatCompletions)!=null?i:this._chatCompletions=new Ra(this._options)}get dashboards(){var i;return (i=this._dashboards)!=null?i:this._dashboards=new ya(this._options)}get datasets(){var i;return (i=this._datasets)!=null?i:this._datasets=new ka(this._options)}get experiments(){var i;return (i=this._experiments)!=null?i:this._experiments=new va(this._options)}get feedbackDefinitions(){var i;return (i=this._feedbackDefinitions)!=null?i:this._feedbackDefinitions=new za(this._options)}get guardrails(){var i;return (i=this._guardrails)!=null?i:this._guardrails=new Sa(this._options)}get llmProviderKey(){var i;return (i=this._llmProviderKey)!=null?i:this._llmProviderKey=new _a(this._options)}get manualEvaluation(){var i;return (i=this._manualEvaluation)!=null?i:this._manualEvaluation=new Aa(this._options)}get openTelemetryIngestion(){var i;return (i=this._openTelemetryIngestion)!=null?i:this._openTelemetryIngestion=new Ta(this._options)}get optimizations(){var i;return (i=this._optimizations)!=null?i:this._optimizations=new Ea(this._options)}get projects(){var i;return (i=this._projects)!=null?i:this._projects=new Pa(this._options)}get prompts(){var i;return (i=this._prompts)!=null?i:this._prompts=new Ca(this._options)}get serviceToggles(){var i;return (i=this._serviceToggles)!=null?i:this._serviceToggles=new ja(this._options)}get spans(){var i;return (i=this._spans)!=null?i:this._spans=new Ia(this._options)}get traces(){var i;return (i=this._traces)!=null?i:this._traces=new Ua(this._options)}get welcomeWizard(){var i;return (i=this._welcomeWizard)!=null?i:this._welcomeWizard=new Na(this._options)}get workspaces(){var i;return (i=this._workspaces)!=null?i:this._workspaces=new Ma(this._options)}get redirect(){var i;return (i=this._redirect)!=null?i:this._redirect=new Da(this._options)}isAlive(i){return w.fromPromise(this.__isAlive(i))}async __isAlive(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(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(i){return w.fromPromise(this.__version(i))}async __version(i){var o,t;let e=await x({url:R((t=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?t: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(),...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(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 Fa=class a{constructor(i,e){this.data=i;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=i=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...i,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=i=>{var o;let e={parentSpanId:this.data.parentSpanId,projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,traceId:this.data.traceId,...i};return this.opik.spanBatchQueue.update(this.data.id,e),this.data={...this.data,...i},this};this.span=i=>{var n;let e=(n=this.data.projectName)!=null?n:this.opik.config.projectName,o={id:oe(),startTime:new Date,...i,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(o);let t=new a(o,this.opik);return this.childSpans.push(t),t};}};var Oa=class{constructor(i,e){this.data=i;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=i=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...i,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=i=>{var n,c;let e=(c=(n=this.data.projectName)!=null?n:i.projectName)!=null?c:this.opik.config.projectName,o={id:oe(),startTime:new Date,...i,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(o);let t=new Fa(o,this.opik);return this.spans.push(t),t};this.update=i=>{var o;let e={projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,...i};return this.opik.traceBatchQueue.update(this.data.id,e),this.data={...this.data,...e},this};}};var gf={EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECT_BY_NAME:"redirect/projects"},Wa={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",PROJECT_NAME:"name",PATH:"path"},Mx=a=>Object.entries(a).map(([i,e])=>`${i}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),Dx=a=>a.replace(/\/api$/,""),Fx=a=>Buffer.from(a).toString("base64"),ff=(a,i,e)=>{let o=Mx(e),t=`${i}?${o}`;return new URL(t,a).toString()},hf=({datasetId:a,experimentId:i,baseUrl:e})=>ff(e,gf.EXPERIMENTS,{[Wa.EXPERIMENT_ID]:i,[Wa.DATASET_ID]:a,[Wa.PATH]:Fx(e)});var wf=({projectName:a,workspaceName:i,apiUrl:e})=>{let o=Dx(e),t=`${i}/${gf.PROJECT_BY_NAME}`;return ff(o,t,{[Wa.PROJECT_NAME]:a})};var Ox=300,Ba=100,Mi=class{constructor({action:i,batchSize:e=Ba,delay:o,enableBatch:t,name:n="ActionQueue"}){this.timerId=null;this.promise=Promise.resolve();this.queue=new Map;this.debounceFlush=()=>{this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>this.flush(),this.delay);};this.add=(i,e)=>{if(this.queue.set(i,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(i,e)=>{let o=this.queue.get(i);o&&(this.queue.set(i,{...o,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let i=new Map(this.queue);this.queue.clear(),k.debug(`Adding ${i.size} items to ${this.name} promise:`,i),this.promise=this.promise.finally(()=>(k.debug(`Flushing ${this.name}:`,i),this.action(i))).catch(e=>{k.error(`Failed to flush ${this.name}:`,e,i);}),await this.promise;};this.action=i,this.batchSize=e,this.delay=o,this.enableBatch=t,this.name=n;}},ge=class{constructor({delay:i=Ox,enableCreateBatch:e=true,enableUpdateBatch:o=false,enableDeleteBatch:t=true,createBatchSize:n=Ba,updateBatchSize:c=Ba,deleteBatchSize:m=Ba,name:u="BatchQueue"}={}){this.create=i=>{let e=this.getId(i);this.createQueue.add(e,i);};this.get=async i=>{let e=this.createQueue.queue.get(i);return e||this.getEntity(i)};this.update=(i,e)=>{if(this.createQueue.queue.get(i)){this.createQueue.update(i,e);return}this.updateQueue.add(i,e);};this.delete=i=>{if(this.createQueue.queue.has(i)){this.createQueue.queue.delete(i);return}this.deleteQueue.add(i);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=u,this.createQueue=new Mi({action:async g=>{await this.createEntities(Array.from(g.values()));},delay:i,enableBatch:e,batchSize:n,name:`${u}:createQueue`}),this.updateQueue=new Mi({action:async g=>{await this.createQueue.flush();let f=Array.from(g.entries());for(let[y,v]of f)await this.updateEntity(y,v);},delay:i,enableBatch:o,batchSize:c,name:`${u}:updateQueue`}),this.deleteQueue=new Mi({action:async g=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(g.keys()));},delay:i,enableBatch:t,batchSize:m,name:`${u}:deleteQueue`});}};var La=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 Va=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 Ha=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 Ja=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 Xa=class extends Ni{constructor(e){super(e);this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};var Ka=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 Jd=null;async function bf(){return Jd||(Jd=await Wx__default.default()),Jd}var Di=class a{constructor(i){let{id:e,traceId:o,spanId:t,source:n,...c}=i;this.id=e||oe(),this.traceId=o,this.spanId=t,this.source=n||Mn.Sdk,this.data={...c};}getContent(i=false){return i?{...this.data,id:this.id}:{...this.data}}async contentHash(){let i=this.getContent(),e=Bx__default.default(i);return (await bf()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent()}}static fromApiModel(i){return new a({id:i.id,traceId:i.traceId,spanId:i.spanId,source:i.source,...i.data})}};async function Me(a,i,e){var c;if(e===0)return [];let o=new util.TextDecoder("utf-8"),t=[],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=i.parse(f);if(y.ok){if(t.push(y.value),e!==void 0&&t.length>=e)return t}else k.error("Error parsing experiment item:",y.errors);}catch(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=i.parse(m);u.ok?t.push(u.value):k.error("Error parsing experiment item:",u.errors);}catch(m){k.error("Error parsing remaining buffer:",m instanceof Error?m.message:String(m));}}catch(m){k.error("Error processing stream:",m instanceof Error?m.message:String(m));}return t}function Fi(a,i){let e=[];for(let o=0;o<a.length;o+=i.maxBatchSize)e.push(a.slice(o,o+i.maxBatchSize));return e}var de=class extends Error{constructor(i){var e;super(i.message),this.name=this.constructor.name,this.code=i.code,this.statusCode=i.statusCode,this.details=i.details,this.originalError=i.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 xf={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,i)=>`Item at position ${a} is not an object (${i})`,INSERTION_FAILED:a=>`Failed to insert items from JSON: ${a}`,DATASET_JSON_PARSE_ERROR:a=>`Failed to parse JSON input: ${a}`};var Vx={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID"},Ga=class extends de{constructor(i){super({message:xf.DATASET_ITEM_MISSING_ID(i),code:Vx.DATASET_ITEM_MISSING_ID});}};var Hx={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},$a=class extends de{constructor(i){super({message:i,code:Hx.SEARCH_TIMEOUT});}};var Qa={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,i)=>`Item at position ${a} is not an object (${i})`};var Xd={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},Ya=class extends de{constructor(i){let e=i instanceof Error?i:new Error(String(i));super({message:Qa.JSON_PARSE_ERROR,code:Xd.JSON_PARSE_ERROR,originalError:e});}},Za=class extends de{constructor(i){super({message:Qa.JSON_NOT_ARRAY(i),code:Xd.JSON_NOT_ARRAY});}},qa=class extends de{constructor(i,e){super({message:Qa.JSON_ITEM_NOT_OBJECT(i,e),code:Xd.JSON_ITEM_NOT_OBJECT});}};var zr=class{constructor({name:i,description:e,id:o},t){this.opik=t;this.idToHash=new Map;this.hashes=new Set;this.id=o||oe(),this.name=i,this.description=e;}async insert(i){if(!i||i.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let e=await this.getDeduplicatedItems(i),o=Fi(e,{maxBatchSize:1e3});try{let t=0;for(let n of o)await this.opik.api.datasets.createOrUpdateDatasetItems({datasetId:this.id,items:n}),t+=n.length,k.info(`Inserted ${Math.min(t,e.length)} of ${e.length} items into dataset ${this.id}`);}catch(t){throw k.error(`Error inserting items into dataset: ${t instanceof Error?t.message:String(t)}`),t}}async update(i){if(!(!i||i.length===0)){for(let e=0;e<i.length;e++)if(!i[e].id)throw new Ga(e);await this.insert(i);}}async delete(i){if(!i||i.length===0){k.info("No item IDs provided for deletion");return}let e=Fi(i,{maxBatchSize:100});for await(let o of e){k.debug("Deleting dataset items batch",{batchSize:o.length,datasetId:this.id}),await this.opik.api.datasets.deleteDatasetItems({itemIds:o});for(let t of o)if(this.idToHash.has(t)){let n=this.idToHash.get(t);this.hashes.delete(n),this.idToHash.delete(t);}}}async clear(){let e=(await this.getItems()).map(o=>o.id).filter(Boolean);e.length!==0&&await this.delete(e);}async getItems(i,e){return (await this.getItemsAsDataclasses(i,e)).map(t=>t.getContent(true))}async getItemsAsDataclasses(i,e){let o=i?Math.min(i,2e3):2e3,t=await this.opik.api.datasets.streamDatasetItems({datasetName:this.name,lastRetrievedId:e,steamLimit:o});return (await Me(t,j.DatasetItemPublic,i)).map(c=>Di.fromApiModel(c))}async insertFromJson(i,e={},o=[]){let t;try{t=JSON.parse(i);}catch(c){throw new Ya(c)}if(!Array.isArray(t))throw new Za(typeof t);if(t.length===0)return;for(let c=0;c<t.length;c++){let m=t[c];if(typeof m!="object"||m===null)throw new qa(c,typeof m)}let n=t.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(i={}){let o=(await this.getItems()).map(t=>{let n={...t};if(Object.keys(i).length>0){for(let[c,m]of Object.entries(i))if(c in n){let u=n[c];delete n[c],n[m]=u;}}return n});return Bx__default.default(o)}async getDeduplicatedItems(i){let e=[];for(let o of i){let t=new Di(o),n=await t.contentHash();if(this.hashes.has(n)){k.debug("Duplicate item found - skipping",{contentHash:n,datasetId:this.id});continue}e.push(t.toApiModel()),this.hashes.add(n),this.idToHash.set(t.id,n);}return e}clearHashState(){this.idToHash.clear(),this.hashes.clear();}async syncHashes(){k.debug("Syncing dataset hashes with backend",{datasetId:this.id});try{let i=await this.getItemsAsDataclasses();this.clearHashState();for(let e of i){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:i.length});}catch(i){if(i instanceof p&&i.statusCode===404){k.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw i}}};var Kd=class extends Error{constructor(i){super(i),this.name="DatasetError";}},Oi=class extends Kd{constructor(i){super(`Dataset with name '${i}' not found`),this.name="DatasetNotFoundError";}};var en=class{constructor(i){if(!i.datasetItemId)throw new Error("datasetItemId is required");if(!i.traceId)throw new Error("traceId is required");this.datasetItemId=i.datasetItemId,this.traceId=i.traceId;}},rn=class a{constructor(i){this.id=i.id,this.datasetItemId=i.datasetItemId,this.traceId=i.traceId,this.datasetItemData=i.datasetItemData,this.evaluationTaskOutput=i.evaluationTaskOutput,this.feedbackScores=[...i.feedbackScores];}static fromRestExperimentItemCompare(i){var o,t;let e=(t=(o=i.feedbackScores)==null?void 0:o.map(n=>({categoryName:n.categoryName,name:n.name,reason:n.reason,value:n.value,source:n.source})))!=null?t:[];return new a({id:i.id,traceId:i.traceId,datasetItemId:i.datasetItemId,datasetItemData:i.input,evaluationTaskOutput:i.output,feedbackScores:e})}};var sr=class{constructor({id:i,name:e,datasetName:o,prompts:t},n){this.opik=n;this.id=i||oe(),this._name=e,this.datasetName=o,this.prompts=t;}get name(){return this._name}async ensureNameLoaded(){if(this._name!==void 0)return this._name;let i=await this.opik.api.experiments.getExperimentById(this.id);if(this._name=i.name,!this._name)throw new Error("Experiment name is not loaded");return this._name}async insert(i){if(i.length===0)return;let e=i.map(t=>({id:oe(),experimentId:this.id,datasetItemId:t.datasetItemId,traceId:t.traceId})),o=Fi(e,{maxBatchSize:50});try{for(let t of o)await this.opik.api.experiments.createExperimentItems({experimentItems:t});k.debug(`Inserted ${i.length} items into experiment ${this.id}`);}catch(t){throw k.error(`Error inserting items into experiment: ${t instanceof Error?t.message:String(t)}`),t}}async getItems(i){let e=[],{maxResults:t,truncate:n=false}=i||{},c,m=true;try{for(;m&&!(t!==void 0&&e.length>=t);){let u=t?Math.min(t-e.length,2e3):2e3,g=await this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:u,lastRetrievedId:c,truncate:n});try{let f=await Me(g,j.ExperimentItemCompare,u);if(f.length===0){m=!1;break}for(let y of f){let v=rn.fromRestExperimentItemCompare(y);if(e.push(v),t!==void 0&&e.length>=t){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${t?` (limited by maxResults=${t})`:""}`),e}async getUrl(){let i=await this.opik.getDataset(this.datasetName),e=this.opik.config.apiUrl||yn.apiUrl;return hf({datasetId:i.id,experimentId:this.id,baseUrl:e})}};var on={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 Gd={EXPERIMENT_NOT_FOUND:"EXPERIMENT_NOT_FOUND",INVALID_CONFIG_TYPE:"INVALID_CONFIG_TYPE",CONFIG_PROMPTS_CONFLICT:"CONFIG_PROMPTS_CONFLICT"},Wi=class extends de{constructor(i){super({message:on.EXPERIMENT_NOT_FOUND(i),code:Gd.EXPERIMENT_NOT_FOUND});}},Bi=class a extends de{constructor(i,e){super({message:i,code:e});}static invalidConfigType(i){return new a(on.INVALID_CONFIG_TYPE(i),Gd.INVALID_CONFIG_TYPE)}static promptsConflict(){return new a(on.CONFIG_PROMPTS_CONFLICT(),Gd.CONFIG_PROMPTS_CONFLICT)}};function Rf(a,i){if(a!==void 0&&(typeof a!="object"||a===null||Array.isArray(a)))throw Bi.invalidConfigType(typeof a);if(i&&i.length>0&&(a!=null&&a.prompts))throw Bi.promptsConflict();if(!a&&(!i||i.length===0))return [void 0,void 0];let e=a?structuredClone(a):{},o;if(i&&i.length>0){o=[];let t={};for(let n of i)o.push({id:n.versionId}),t[n.name]=n.prompt;e.prompts=t;}return Object.keys(e).length===0?[void 0,void 0]:[e,o]}var ye={MUSTACHE:"mustache",JINJA2:"jinja2"};var K=class a extends Error{constructor(i){super(i),this.name="PromptValidationError",Object.setPrototypeOf(this,a.prototype);}};function Kx(a){try{let e=Xx__default.default.parse(a).filter(o=>{let t=o[0];return t==="name"||t==="#"||t==="&"||t==="^"}).map(o=>o[1].split(".")[0]);return new Set(e)}catch(i){throw new K(`Invalid Mustache template syntax: ${i instanceof Error?i.message:String(i)}`)}}function yf(a,i,e){if(e!=="mustache")return;let o=Kx(a),t=new Set(Object.keys(i)),n=new Set([...o].filter(c=>!t.has(c)));if(n.size>0){let c=[];throw c.push(`Missing required variables: ${[...n].join(", ")}`),c.push(`Template placeholders: {${[...o].join(", ")}}`),c.push(`Provided variables: {${[...t].join(", ")}}`),new K(`Template variables validation failed:
|
|
10
10
|
${c.join(`
|
|
11
|
-
`)}`)}}function
|
|
11
|
+
`)}`)}}function _e(a,i,e){try{switch(yf(a,i,e),e){case "mustache":return Xx__default.default.render(a,i,{},{escape:o=>o});case "jinja2":return $x__default.default.renderString(a,i);default:return a}}catch(o){if(o instanceof K)throw o;let t=o instanceof Error?o.message:String(o);throw new K(`Failed to format prompt template: ${t}`)}}var Li=class a{constructor(i){this.id=i.versionId,this.name=i.name,this.prompt=i.prompt,this.commit=i.commit,this.type=i.type,this.metadata=i.metadata,this.changeDescription=i.changeDescription,this.createdAt=i.createdAt,this.createdBy=i.createdBy;}format(i){return _e(this.prompt,i,this.type)}getVersionAge(){return this.createdAt?dateFns.formatDistanceToNow(new Date(this.createdAt),{addSuffix:true}):"Unknown"}getVersionInfo(){let i=[`[${this.commit}]`];if(this.createdAt){let e=new Date(this.createdAt);i.push(e.toISOString().split("T")[0]);}return this.createdBy&&i.push(`by ${this.createdBy}`),this.changeDescription&&i.push(`- ${this.changeDescription}`),i.join(" ")}compareTo(i){let e=`Current version [${this.commit}]`,o=`Other version [${i.commit}]`,t=jestDiff.diffStringsUnified(i.prompt,this.prompt,{aAnnotation:o,bAnnotation:e,includeChangeCounts:true,contextLines:3,expand:false});return k.info(`
|
|
12
12
|
Prompt version comparison:
|
|
13
|
-
${t}`),t}static fromApiResponse(a,e){var o;if(!e.template)throw new X("Invalid API response: missing required field 'template'");if(!e.commit)throw new X("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new X("Invalid API response: missing required field 'promptId'");if(!e.id)throw new X("Invalid API response: missing required field 'id'");return new i({name:a,prompt:e.template,commit:e.commit,promptId:e.promptId,versionId:e.id,type:(o=e.type)!=null?o:be.MUSTACHE,metadata:e.metadata,changeDescription:e.changeDescription,createdAt:e.createdAt?new Date(e.createdAt):void 0,createdBy:e.createdBy})}};var Ue=class i{constructor({promptId:a,versionId:e,name:o,prompt:t,commit:n,metadata:c,type:m,changeDescription:u,description:g,tags:R=[]},y){this.opik=y;this.id=a,this.versionId=e,this.prompt=t,this.commit=n,this.type=m!=null?m:be.MUSTACHE,this.changeDescription=u,this._name=o,this._description=g,this._tags=[...R],this._metadata=c;}get name(){return this._name}get description(){return this._description}get tags(){return Object.freeze([...this._tags])}get metadata(){if(this._metadata)return structuredClone(this._metadata)}format(a){return ve(this.prompt,a,this.type)}static fromApiResponse(a,e,o){var n;if(!e.template)throw new X("Invalid API response: missing required field 'template'");if(!e.commit)throw new X("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new X("Invalid API response: missing required field 'promptId'");if(!e.id)throw new X("Invalid API response: missing required field 'id' (version ID)");let t=(n=e.type)!=null?n:be.MUSTACHE;if(t!=="mustache"&&t!=="jinja2")throw new X(`Invalid API response: unknown prompt type '${t}'`);return new i({promptId:e.promptId,versionId:e.id,name:a.name,prompt:e.template,commit:e.commit,metadata:e.metadata,type:t,changeDescription:e.changeDescription,description:a.description,tags:a.tags},o)}async updateProperties(a){var e,o,t,n;return await this.opik.api.prompts.updatePrompt(this.id,{name:(e=a.name)!=null?e:this._name,description:a.description,tags:a.tags},this.opik.api.requestOptions),this._name=(o=a.name)!=null?o:this._name,this._description=(t=a.description)!=null?t:this._description,this._tags=(n=a.tags)!=null?n:this._tags,this}async delete(){await this.opik.deletePrompts([this.id]);}async getVersions(){var a;k.debug("Getting versions for prompt",{promptId:this.id,name:this.name});try{let e=[],o=1,t=100;for(;;){let c=(a=(await this.opik.api.prompts.getPromptVersions(this.id,{page:o,size:t},this.opik.api.requestOptions)).content)!=null?a:[];if(e.push(...c),c.length<t)break;o++;}return k.debug("Successfully retrieved prompt versions",{promptId:this.id,name:this.name,totalVersions:e.length}),e.map(n=>Aa.fromApiResponse(this.name,n))}catch(e){throw k.error("Failed to get prompt versions",{promptId:this.id,name:this.name,error:e}),e}}async useVersion(a){k.debug("Restoring prompt version",{promptId:this.id,name:this.name,versionId:a.id,versionCommit:a.commit});try{let e=await this.opik.api.prompts.restorePromptVersion(this.id,a.id,this.opik.api.requestOptions);return k.debug("Successfully restored prompt version",{promptId:this.id,name:this.name,restoredVersionId:e.id,restoredCommit:e.commit}),i.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){throw k.error("Failed to restore prompt version",{promptId:this.id,name:this.name,versionId:a.id,versionCommit:a.commit,error:e}),e}}async getVersion(a){try{let e=await this.opik.api.prompts.retrievePromptVersion({name:this.name,commit:a},this.opik.api.requestOptions);return i.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){if(e&&typeof e=="object"&&"statusCode"in e&&e.statusCode===404)return null;throw k.error("Failed to retrieve prompt version",{promptName:this.name,commit:a,error:e}),e}}};async function Dg(i,a,e){try{return await i.retrievePromptVersion({name:a},e)}catch(o){if(mx(o))return null;throw o}}function Ng(i,a,e){return a?a.template!==i.prompt||!lx(a.metadata,i.metadata)||a.type!==e:true}function lx(i,a){let e=i!=null?i:{},o=a!=null?a:{};return cx__default.default(e,o)}function mx(i){return typeof i=="object"&&i!==null&&"statusCode"in i&&i.statusCode===404}var ie=class{constructor(a){this.input=a;this.cursor=0;}getPosition(){return this.cursor}getRemainingInput(){return this.input.slice(this.cursor)}getFullInput(){return this.input}isAtEnd(){return this.cursor>=this.input.length}peekChar(){return this.input[this.cursor]}peekCharAt(a){return this.input[this.cursor+a]}consumeChar(){return this.input[this.cursor++]}advance(a=1){this.cursor+=a;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(a){let e=this.cursor;for(;this.cursor<this.input.length&&a(this.input[this.cursor]);)this.cursor++;return this.input.slice(e,this.cursor)}sliceFrom(a){return this.input.slice(a,this.cursor)}static isFieldChar(a){return /[a-zA-Z0-9_]/.test(a)}static isLetterChar(a){return /[a-zA-Z]/.test(a)}static isDigitChar(a){return /\d/.test(a)}static isWhitespaceChar(a){return /\s/.test(a)}static isQuoteChar(a){return a==='"'||a==="'"}};var J={STRING_OPS:["=","contains","not_contains","starts_with","ends_with","!=",">","<"],NUMERIC_OPS:["=","!=",">","<",">=","<="],DATETIME_OPS:["=",">","<",">=","<="],LIST_OPS:["contains"],DICT_OPS:["=","contains",">","<"],LIMITED_STRING_OPS:["=","contains","not_contains"]},De={id:"string",name:"string",status:"string",start_time:"date_time",end_time:"date_time",input:"string",output:"string",metadata:"dictionary",feedback_scores:"feedback_scores_number",tags:"list","usage.total_tokens":"number","usage.prompt_tokens":"number","usage.completion_tokens":"number",duration:"number",number_of_messages:"number",created_by:"string",thread_id:"string",total_estimated_cost:"number",type:"string",model:"string",provider:"string"},Mg={id:J.STRING_OPS,name:J.STRING_OPS,status:J.LIMITED_STRING_OPS,start_time:J.DATETIME_OPS,end_time:J.DATETIME_OPS,input:J.LIMITED_STRING_OPS,output:J.LIMITED_STRING_OPS,metadata:J.DICT_OPS,feedback_scores:J.NUMERIC_OPS,tags:J.LIST_OPS,"usage.total_tokens":J.NUMERIC_OPS,"usage.prompt_tokens":J.NUMERIC_OPS,"usage.completion_tokens":J.NUMERIC_OPS,duration:J.NUMERIC_OPS,number_of_messages:J.NUMERIC_OPS,created_by:J.STRING_OPS,thread_id:J.STRING_OPS,total_estimated_cost:J.NUMERIC_OPS,type:J.STRING_OPS,model:J.STRING_OPS,provider:J.STRING_OPS},Xi={SPECIAL_FIELDS:["usage","metadata","feedback_scores"],USAGE_KEYS:["total_tokens","prompt_tokens","completion_tokens"]};function Fg(i){let a=Xi.SPECIAL_FIELDS.includes(i),e=Object.keys(De).includes(i);if(!a&&!e){let o=Object.keys(De).join(", ");throw new Error(`Field ${i} is not supported, only the fields ${o} are supported.`)}}function Og(i,a){if(!Xi.SPECIAL_FIELDS.includes(i)){let e=Object.keys(De).join(", ");throw new Error(`Field ${i}.${a} is not supported, only the fields ${e} are supported.`)}if(i==="usage"&&!Xi.USAGE_KEYS.includes(a))throw new Error(`When querying usage, ${a} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function cd(i,a){let e=Mg[i];if(!(e!=null&&e.includes(a))){let o=(e==null?void 0:e.join(", "))||"none";throw new Error(`Operator ${a} is not supported for field ${i}, only the operators ${o} are supported.`)}}function Wg(i){let a=i.toLowerCase();if(a==="and")return true;throw a==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${i}`)}function Gi(i,a,e){if(!i)throw new Error(`Missing closing quote for: ${e}`)}var Ea=class{static parse(a){a.skipWhitespace();let e=this.parseFieldName(a);return Fg(e),a.peekChar()==="."?this.parseFieldWithKey(a,e):{type:"simple",field:e,columnType:De[e]}}static parseFieldName(a){return a.consumeWhile(e=>ie.isFieldChar(e))}static parseFieldWithKey(a,e){a.advance();let o=this.parseKey(a);if(Og(e,o),e==="usage"){let t=`usage.${o}`;return {type:"simple",field:t,columnType:De[t]}}return {type:"nested",field:e,key:o,columnType:De[e]}}static parseKey(a){let e=a.peekChar();return ie.isQuoteChar(e)?this.parseQuotedKey(a,e):this.parseUnquotedKey(a)}static parseUnquotedKey(a){return a.consumeWhile(e=>ie.isFieldChar(e))}static parseQuotedKey(a,e){let o=a.getPosition();a.advance();let t="",n=false;for(;!a.isAtEnd();){let m=a.peekChar();if(m===e){if(a.peekCharAt(1)===e){t+=e,a.advance(2);continue}n=true,a.advance();break}t+=m,a.advance();}let c=a.getFullInput().slice(o);return Gi(n,o,c),t}};var Pa=class{static parse(a,e){a.skipWhitespace();let o=a.peekChar(),t=this.tryParseSymbolicOperator(a,o);if(t)return cd(e,t),{operator:t};let n=this.parseWordOperator(a);return cd(e,n),{operator:n}}static tryParseSymbolicOperator(a,e){if(e==="=")return a.advance(),"=";if(e==="<"||e===">"){let o=e;return a.advance(),a.peekChar()==="="?(a.advance(),o+"="):o}return e==="!"&&a.peekCharAt(1)==="="?(a.advance(2),"!="):null}static parseWordOperator(a){return a.consumeWhile(e=>!ie.isWhitespaceChar(e))}};var Ca=class{static parse(a){a.skipWhitespace();let e=a.getPosition(),o=a.peekChar();if(o==='"')return this.parseQuotedString(a,e);if(ie.isDigitChar(o)||o==="-")return this.parseNumber(a);let t=a.getRemainingInput();throw new Error(`Invalid value ${t.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(a,e){a.advance();let o=a.getPosition(),t=false;for(;!a.isAtEnd();){if(a.peekChar()==='"'){t=true;break}a.advance();}Gi(t,e,`value starting at position ${e}`);let n=a.sliceFrom(o);return a.advance(),{value:n}}static parseNumber(a){let e="";return a.peekChar()==="-"&&(e+=a.consumeChar()),e+=this.parseDigits(a),a.peekChar()==="."&&(e+=a.consumeChar(),e+=this.parseDigits(a)),{value:e}}static parseDigits(a){return a.consumeWhile(e=>ie.isDigitChar(e))}};var Ne=class{constructor(a){let e=a||"";this.filterExpressions=e?this.parse(e):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}getFilterExpressions(){return this.filterExpressions}parse(a){let e=new ie(a),o=[];for(;!e.isAtEnd();){let t=this.parseExpression(e);if(o.push(t),e.skipWhitespace(),!e.isAtEnd()&&!this.parseConnector(e))break}return o}parseExpression(a){let e=Ea.parse(a),o=Pa.parse(a,this.getFieldName(e)),t=Ca.parse(a);return this.buildExpression(e,o,t)}getFieldName(a){return a.field}buildExpression(a,e,o){let t={field:a.field,operator:e.operator,value:o.value,type:a.columnType};return a.type==="nested"&&(t.key=a.key),t}parseConnector(a){let e=a.getPosition(),o=a.consumeWhile(t=>ie.isLetterChar(t));try{return Wg(o)}catch(t){if(t instanceof Error&&t.message.includes("trailing characters")){let n=a.getFullInput().slice(e);throw new Error(`Invalid filter string, trailing characters ${n}`)}throw t}}};async function Bg(i,a,e,o,t){let n=await i.traces.searchTraces({projectName:a,filters:e!=null?e:void 0,limit:o,truncate:t});return await je(n,C.TracePublic,o)}async function Lg(i,a,e,o){let t=Date.now(),n=[];for(;;){if(n=await i(),n.length>=a||Date.now()-t>=e)return n;await new Promise(m=>setTimeout(m,o));}}function Vg(i){if(!i)return null;let e=new Ne(i).getFilterExpressions();return e?e.map(o=>{let t={field:o.field,operator:o.operator,value:o.value};return o.key&&(t.key=o.key),t}):null}var ld=[],$e=class{constructor(a){this.displayTraceLog=a=>{if(a===this.lastProjectNameLogged||!this.config.apiUrl)return;let e=Pg({apiUrl:this.config.apiUrl,projectName:a,workspaceName:this.config.workspaceName});k.info(`Started logging traces to the "${a}" project at ${Na(e)}`),this.lastProjectNameLogged=a;};this.trace=a=>{var t;k.debug("Creating new trace with data:",a);let e=(t=a.projectName)!=null?t:this.config.projectName,o=new Ei({id:re(),startTime:new Date,...a,projectName:e},this);return this.traceBatchQueue.create(o.data),k.debug("Trace added to the queue with ID:",o.data.id),this.displayTraceLog(e),o};this.getDataset=async a=>{k.debug(`Getting dataset with name "${a}"`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.getDatasetByIdentifier({datasetName:a});return new lr(e,this)}catch(e){throw e instanceof p&&e.statusCode===404?new Sa(a):e}};this.createDataset=async(a,e)=>{k.debug(`Creating dataset with name "${a}"`);let o=new lr({name:a,description:e},this);try{return this.datasetBatchQueue.create({name:o.name,description:o.description,id:o.id}),k.debug("Dataset added to the queue with name:",o.name),o}catch(t){throw k.error(`Failed to create dataset "${a}"`,{error:t}),new Error(`Error creating dataset "${a}": ${t}`)}};this.getOrCreateDataset=async(a,e)=>{k.debug(`Attempting to retrieve or create dataset with name: "${a}"`);try{return await this.getDataset(a)}catch(o){if(o instanceof Sa)return k.info(`Dataset "${a}" not found. Proceeding to create a new one.`),this.createDataset(a,e);throw k.error(`Error retrieving dataset "${a}":`,o),o}};this.getDatasets=async(a=100)=>{k.debug(`Getting all datasets (limit: ${a})`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.findDatasets({size:a}),o=[];for(let t of e.content||[])o.push(new lr(t,this));return k.info(`Retrieved ${o.length} datasets`),o}catch(e){throw k.error("Failed to retrieve datasets",{error:e}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async a=>{k.debug(`Deleting dataset with name "${a}"`);try{let e=await this.getDataset(a);if(!e.id)throw new Error(`Cannot delete dataset "${a}": ID not available`);this.datasetBatchQueue.delete(e.id);}catch(e){throw k.error(`Failed to delete dataset "${a}"`,{error:e}),new Error(`Failed to delete dataset "${a}": ${e}`)}};this.createExperiment=async({datasetName:a,name:e,experimentConfig:o,prompts:t,type:n=Tn.Regular,optimizationId:c})=>{if(k.debug(`Creating experiment for dataset "${a}"`),!a)throw new Error("Dataset name is required to create an experiment");let[m,u]=jg(o,t),g=re(),R=new Ge({id:g,name:e,datasetName:a,prompts:t},this);try{return this.api.experiments.createExperiment({id:g,datasetName:a,name:e,metadata:m,promptVersions:u,type:n,optimizationId:c}),k.debug("Experiment added to the queue with id:",g),R}catch(y){throw k.error(`Failed to create experiment for dataset "${a}"`,{error:y}),new Error(`Error creating experiment: ${y}`)}};this.updateExperiment=async(a,e)=>{if(!a)throw new Error("id is required to update an experiment");let{name:o,experimentConfig:t}=e;if(!o&&!t)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");k.debug(`Updating experiment with ID "${a}"`);let n={};o!==void 0&&(n.name=o),t!==void 0&&(n.metadata=t);try{await this.api.experiments.updateExperiment(a,n);}catch(c){throw k.error(`Failed to update experiment with ID "${a}"`,{error:c}),c}};this.getExperimentById=async a=>{k.debug(`Getting experiment with ID "${a}"`);try{let e=await this.api.experiments.getExperimentById(a);return new Ge({id:e.id,name:e.name,datasetName:e.datasetName},this)}catch(e){throw e instanceof p&&e.statusCode===404?new _a(`No experiment found with ID '${a}'`):(k.error(`Failed to get experiment with ID "${a}"`,{error:e}),e)}};this.getExperimentsByName=async a=>{k.debug(`Getting experiments with name "${a}"`);try{let e=await this.api.experiments.streamExperiments({name:a});return (await je(e,C.ExperimentPublic)).map(t=>new Ge({id:t.id,name:t.name,datasetName:t.datasetName},this))}catch(e){throw k.error(`Failed to get experiments with name "${a}"`,{error:e}),e}};this.getExperiment=async a=>{k.debug(`Getting experiment with name "${a}"`);let e=await this.getExperimentsByName(a);if(e.length===0)throw new _a(a);return e[0]};this.getDatasetExperiments=async(a,e=100)=>{var c;k.debug(`Getting experiments for dataset "${a}"`);let o=await this.getDataset(a),t=Math.min(100,e),n=[];try{let m=1;for(;n.length<e;){let u=await this.api.experiments.findExperiments({page:m,size:t,datasetId:o.id}),g=(c=u==null?void 0:u.content)!=null?c:[];if(g.length===0)break;let R=e-n.length,y=Math.min(g.length,R);for(let v=0;v<y;v++){let z=g[v];n.push(new Ge({id:z.id,name:z.name,datasetName:z.datasetName},this));}if(y<g.length)break;m+=1;}return n}catch(m){throw k.error(`Failed to get experiments for dataset "${a}"`,{error:m}),m}};this.deleteExperiment=async a=>{k.debug(`Deleting experiment with ID "${a}"`);try{await this.api.experiments.deleteExperimentsById({ids:[a]});}catch(e){throw k.error(`Failed to delete experiment with ID "${a}"`,{error:e}),e}};this.createPrompt=async a=>{var e;k.debug("Creating prompt",{name:a.name});try{let o=await Dg(this.api.prompts,a.name,this.api.requestOptions),t=(e=a.type)!=null?e:be.MUSTACHE,n=Ng(a,o,t),c;if(n?(k.debug("Creating new prompt version",{name:a.name}),c=await this.api.prompts.createPromptVersion({name:a.name,version:{template:a.prompt,metadata:a.metadata,type:t}},this.api.requestOptions)):(k.debug("Returning existing prompt version",{name:a.name}),c=o),!c.promptId)throw new Error("Invalid API response: missing promptId");let m=await this.api.prompts.getPromptById(c.promptId,this.api.requestOptions),u=Ue.fromApiResponse(m,c,this);return k.debug("Prompt created",{name:a.name}),a.description||a.tags?await u.updateProperties({description:a.description,tags:a.tags}):u}catch(o){throw k.error("Failed to create prompt",{name:a.name,error:o}),o}};this.getPrompt=async a=>{var e;k.debug("Getting prompt",a);try{let t=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:a.name}]),size:1},this.api.requestOptions)).content)==null?void 0:e[0];if(!t)return k.debug("Prompt not found",{name:a.name}),null;let n=await this.api.prompts.retrievePromptVersion(a,this.api.requestOptions);return Ue.fromApiResponse(t,n,this)}catch(o){if(o instanceof p&&o.statusCode===404)return null;throw k.error("Failed to get prompt",{name:a.name,error:o}),o}};this.searchPrompts=async a=>{var e;k.debug("Searching prompts",{filterString:a});try{let o;if(a){let u=new Ne(a).getFilterExpressions();o=u?JSON.stringify(u):void 0;}let n=(e=(await this.api.prompts.getPrompts({filters:o,size:1e3},this.api.requestOptions)).content)!=null?e:[];return (await Promise.all(n.map(async m=>{if(!m.name)return null;try{let u=await this.api.prompts.retrievePromptVersion({name:m.name},this.api.requestOptions);return Ue.fromApiResponse(m,u,this)}catch(u){return k.debug("Failed to get version for prompt",{name:m.name,error:u}),null}}))).filter(m=>m!==null)}catch(o){throw k.error("Failed to search prompts",{error:o}),o}};this.deletePrompts=async a=>{k.debug("Deleting prompts in batch",{count:a.length});try{await this.api.prompts.deletePromptsBatch({ids:a},this.api.requestOptions),k.info("Successfully deleted prompts",{count:a.length});}catch(e){throw k.error("Failed to delete prompts",{count:a.length,error:e}),e}};this.searchTraces=async a=>{let{projectName:e,filterString:o,maxResults:t=1e3,truncate:n=true,waitForAtLeast:c,waitForTimeout:m=60}=a!=null?a:{};k.debug("Searching traces",{projectName:e,filterString:o,maxResults:t,truncate:n,waitForAtLeast:c,waitForTimeout:m});let u=Vg(o),g=e!=null?e:this.config.projectName,R=()=>Bg(this.api,g,u,t,n);if(c===void 0)return await R();let y=await Lg(R,c,m*1e3,5e3);if(y.length<c)throw new Oi(`Timeout after ${m} seconds: expected ${c} traces, but only ${y.length} were found.`);return y};this.flush=async()=>{k.debug("Starting flush operation");try{await this.traceBatchQueue.flush(),await this.spanBatchQueue.flush(),await this.traceFeedbackScoresBatchQueue.flush(),await this.spanFeedbackScoresBatchQueue.flush(),await this.datasetBatchQueue.flush(),k.info("Successfully flushed all data to Opik");}catch(a){k.error("Error during flush operation:",{error:a instanceof Error?a.message:a});}};k.debug("Initializing OpikClient with config:",a),this.config=jd(a);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};a!=null&&a.headers&&(k.debug("Initializing OpikClient with additional headers:",a==null?void 0:a.headers),e.requestOptions={headers:a==null?void 0:a.headers}),this.api=new Ni(e);let o=this.config.holdUntilFlush?24*60*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new Ii(this.api,o),this.traceBatchQueue=new Ui(this.api,o),this.spanFeedbackScoresBatchQueue=new ji(this.api,o),this.traceFeedbackScoresBatchQueue=new Di(this.api,o),this.datasetBatchQueue=new Mi(this.api,o),ld.push(this);}};var ux="track.decorator",Ia=new async_hooks.AsyncLocalStorage,gx=()=>{let{span:i,trace:a}=Ia.getStore()||{};if(!(!i||!a))return {span:i,trace:a}};function fx(i){return !!i&&(typeof i=="object"||typeof i=="function")&&typeof i.then=="function"}function hx({name:i,parentSpan:a,projectName:e,trace:o,type:t="llm"}){k.debug("Creating new span:",{name:i,parentSpan:a==null?void 0:a.data.id,projectName:e,type:t});let n=o;n||(n=dd().trace({name:i,projectName:e}));let c=n.span({name:i,parentSpanId:a==null?void 0:a.data.id,projectName:e,type:t});return k.debug("Span created with ID:",c.data.id),{span:c,trace:n}}function wx({args:i,span:a,trace:e}){if(k.debug("Starting span execution:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id}),i.length===0)return;let o={arguments:i};k.debug("Recording span input"),a.update({input:o}),e&&(k.debug("Recording trace input"),e.update({input:o}));}function Hg({result:i,span:a,trace:e,enrichSpan:o}){k.debug("Recording successful execution:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id});let t=typeof i=="object"?i:{result:i},n=new Date,c={endTime:n,output:t};if(o){let m=o(i);Object.assign(c,m);}a.update(c),e&&e.update({endTime:n,output:t});}function Jg({span:i,error:a,trace:e}){var o,t;k.error("Recording execution error:",{spanId:i.data.id,traceId:e==null?void 0:e.data.id,error:a instanceof Error?{name:a.name,message:a.message,stack:a.stack}:a}),a instanceof Error&&i.update({errorInfo:{message:a.message,exceptionType:a.name,traceback:(o=a.stack)!=null?o:""}}),i.end(),e&&(e.update({errorInfo:{message:a.message,exceptionType:a.name,traceback:(t=a.stack)!=null?t:""}}),e.end());}function $i({name:i,projectName:a,type:e,enrichSpan:o}={},t){return function(...c){let m=Ia.getStore(),{span:u,trace:g}=hx({name:i!=null?i:t.name||ux,parentSpan:m==null?void 0:m.span,projectName:a,trace:m==null?void 0:m.trace,type:e}),R=!m,y=this;return Ia.run({span:u,trace:g},()=>{let v=R?g:void 0;try{wx({args:c,span:u,trace:v});let z=t.apply(y,c);return fx(z)?z.then(S=>(Hg({span:u,result:S,trace:v,enrichSpan:o}),S),S=>{throw Jg({span:u,error:S,trace:v}),S}):(Hg({span:u,result:z,trace:v,enrichSpan:o}),z)}catch(z){throw Jg({span:u,error:z,trace:v}),z}})}}function Ee(i,a){if(typeof i=="function")return $i({},i);let e=i;return a?$i(e,a):function(...o){if(o.length===2&&typeof o[1]=="object"&&o[1]!==null&&"kind"in o[1]){let[c,m]=o;if(m.kind!=="method")throw new Error("track decorator is only applicable to methods");return $i(e,c)}let[,,t]=o;if(!t||typeof t.value!="function")throw new Error("track decorator can only be applied to methods");let n=t.value;return t.value=$i(e,n),t}}var md=null;function dd(){return md===null&&(md=new $e),md}var bx=async()=>{k.debug("Starting flushAll operation");try{await Promise.all([dd().flush(),...ld.map(i=>i.flush())]),k.debug("flushAll operation completed successfully");}catch(i){throw k.error("Error during flushAll operation:",{error:i instanceof Error?i.message:i,stack:i instanceof Error?i.stack:void 0}),i}};function Kg(i,a){if(!a||typeof a!="object")throw new Error("Arguments must be an object");let e=i.validationSchema,t=e.extend(Object.fromEntries(Object.entries(e.shape).map(([n,c])=>[n,c.refine(m=>m!==void 0,{message:`${n} cannot be undefined`,path:[n]})]))).safeParse(a);if(!t.success){let n=t.error.issues.map(m=>m.path[0]).filter(Boolean),c=[...new Set(n)];throw new Error(xx(i,a,c))}}function xx(i,a,e){let o=Object.keys(a),t=e.filter(n=>!(n in a));return `Metric '${i.name}' is skipped, missing required arguments: ${t.join(", ")}. Available arguments: ${o.join(", ")}.`}var Yi=class{static calculateAverageScores(a){if(!a||a.length===0)return new Map;let e=new Map;for(let t of a)if(!(!t||!t.scoreResults||t.scoreResults.length===0))for(let n of t.scoreResults){if(!n||n.scoringFailed||typeof n.value!="number")continue;let c=e.get(n.name)||{sum:0,count:0};c.sum+=n.value,c.count+=1,e.set(n.name,c);}let o=new Map;return e.forEach((t,n)=>{o.set(n,t.count>0?t.sum/t.count:0);}),o}static formatScore(a){return a.toFixed(4)}static formatTime(a){let e=Math.floor(a/3600),o=Math.floor(a%3600/60),t=Math.floor(a%60);return `${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`}static async generateResultTable(a,e,o,t){if(a.length===0){k.info(`
|
|
13
|
+
${t}`),t}static fromApiResponse(i,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:i,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 De=class a{constructor({promptId:i,versionId:e,name:o,prompt:t,commit:n,metadata:c,type:m,changeDescription:u,description:g,tags:f=[]},y){this.opik=y;this.id=i,this.versionId=e,this.prompt=t,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(i){return _e(this.prompt,i,this.type)}static fromApiResponse(i,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 t=(n=e.type)!=null?n:ye.MUSTACHE;if(t!=="mustache"&&t!=="jinja2")throw new K(`Invalid API response: unknown prompt type '${t}'`);return new a({promptId:e.promptId,versionId:e.id,name:i.name,prompt:e.template,commit:e.commit,metadata:e.metadata,type:t,changeDescription:e.changeDescription,description:i.description,tags:i.tags},o)}async updateProperties(i){var e,o,t,n;return await this.opik.api.prompts.updatePrompt(this.id,{name:(e=i.name)!=null?e:this._name,description:i.description,tags:i.tags},this.opik.api.requestOptions),this._name=(o=i.name)!=null?o:this._name,this._description=(t=i.description)!=null?t:this._description,this._tags=(n=i.tags)!=null?n:this._tags,this}async delete(){await this.opik.deletePrompts([this.id]);}async getVersions(){var i;k.debug("Getting versions for prompt",{promptId:this.id,name:this.name});try{let e=[],o=1,t=100;for(;;){let c=(i=(await this.opik.api.prompts.getPromptVersions(this.id,{page:o,size:t},this.opik.api.requestOptions)).content)!=null?i:[];if(e.push(...c),c.length<t)break;o++;}return k.debug("Successfully retrieved prompt versions",{promptId:this.id,name:this.name,totalVersions:e.length}),e.map(n=>Li.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(i){k.debug("Restoring prompt version",{promptId:this.id,name:this.name,versionId:i.id,versionCommit:i.commit});try{let e=await this.opik.api.prompts.restorePromptVersion(this.id,i.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:i.id,versionCommit:i.commit,error:e}),e}}async getVersion(i){try{let e=await this.opik.api.prompts.retrievePromptVersion({name:this.name,commit:i},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:i,error:e}),e}}};async function kf(a,i,e){try{return await a.retrievePromptVersion({name:i},e)}catch(o){if(eR(o))return null;throw o}}function vf(a,i,e){return i?i.template!==a.prompt||!qx(i.metadata,a.metadata)||i.type!==e:true}function qx(a,i){let e=a!=null?a:{},o=i!=null?i:{};return Zx__default.default(e,o)}function eR(a){return typeof a=="object"&&a!==null&&"statusCode"in a&&a.statusCode===404}var se=class{constructor(i){this.input=i;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(i){return this.input[this.cursor+i]}consumeChar(){return this.input[this.cursor++]}advance(i=1){this.cursor+=i;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(i){let e=this.cursor;for(;this.cursor<this.input.length&&i(this.input[this.cursor]);)this.cursor++;return this.input.slice(e,this.cursor)}sliceFrom(i){return this.input.slice(i,this.cursor)}static isFieldChar(i){return /[a-zA-Z0-9_]/.test(i)}static isLetterChar(i){return /[a-zA-Z]/.test(i)}static isDigitChar(i){return /\d/.test(i)}static isWhitespaceChar(i){return /\s/.test(i)}static isQuoteChar(i){return i==='"'||i==="'"}};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"},zf={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},tn={SPECIAL_FIELDS:["usage","metadata","feedback_scores"],USAGE_KEYS:["total_tokens","prompt_tokens","completion_tokens"]};function Sf(a){let i=tn.SPECIAL_FIELDS.includes(a),e=Object.keys(Fe).includes(a);if(!i&&!e){let o=Object.keys(Fe).join(", ");throw new Error(`Field ${a} is not supported, only the fields ${o} are supported.`)}}function _f(a,i){if(!tn.SPECIAL_FIELDS.includes(a)){let e=Object.keys(Fe).join(", ");throw new Error(`Field ${a}.${i} is not supported, only the fields ${e} are supported.`)}if(a==="usage"&&!tn.USAGE_KEYS.includes(i))throw new Error(`When querying usage, ${i} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function $d(a,i){let e=zf[a];if(!(e!=null&&e.includes(i))){let o=(e==null?void 0:e.join(", "))||"none";throw new Error(`Operator ${i} is not supported for field ${a}, only the operators ${o} are supported.`)}}function Af(a){let i=a.toLowerCase();if(i==="and")return true;throw i==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${a}`)}function an(a,i,e){if(!a)throw new Error(`Missing closing quote for: ${e}`)}var Vi=class{static parse(i){i.skipWhitespace();let e=this.parseFieldName(i);return Sf(e),i.peekChar()==="."?this.parseFieldWithKey(i,e):{type:"simple",field:e,columnType:Fe[e]}}static parseFieldName(i){return i.consumeWhile(e=>se.isFieldChar(e))}static parseFieldWithKey(i,e){i.advance();let o=this.parseKey(i);if(_f(e,o),e==="usage"){let t=`usage.${o}`;return {type:"simple",field:t,columnType:Fe[t]}}return {type:"nested",field:e,key:o,columnType:Fe[e]}}static parseKey(i){let e=i.peekChar();return se.isQuoteChar(e)?this.parseQuotedKey(i,e):this.parseUnquotedKey(i)}static parseUnquotedKey(i){return i.consumeWhile(e=>se.isFieldChar(e))}static parseQuotedKey(i,e){let o=i.getPosition();i.advance();let t="",n=false;for(;!i.isAtEnd();){let m=i.peekChar();if(m===e){if(i.peekCharAt(1)===e){t+=e,i.advance(2);continue}n=true,i.advance();break}t+=m,i.advance();}let c=i.getFullInput().slice(o);return an(n,o,c),t}};var Hi=class{static parse(i,e){i.skipWhitespace();let o=i.peekChar(),t=this.tryParseSymbolicOperator(i,o);if(t)return $d(e,t),{operator:t};let n=this.parseWordOperator(i);return $d(e,n),{operator:n}}static tryParseSymbolicOperator(i,e){if(e==="=")return i.advance(),"=";if(e==="<"||e===">"){let o=e;return i.advance(),i.peekChar()==="="?(i.advance(),o+"="):o}return e==="!"&&i.peekCharAt(1)==="="?(i.advance(2),"!="):null}static parseWordOperator(i){return i.consumeWhile(e=>!se.isWhitespaceChar(e))}};var Ji=class{static parse(i){i.skipWhitespace();let e=i.getPosition(),o=i.peekChar();if(o==='"')return this.parseQuotedString(i,e);if(se.isDigitChar(o)||o==="-")return this.parseNumber(i);let t=i.getRemainingInput();throw new Error(`Invalid value ${t.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(i,e){i.advance();let o=i.getPosition(),t=false;for(;!i.isAtEnd();){if(i.peekChar()==='"'){t=true;break}i.advance();}an(t,e,`value starting at position ${e}`);let n=i.sliceFrom(o);return i.advance(),{value:n}}static parseNumber(i){let e="";return i.peekChar()==="-"&&(e+=i.consumeChar()),e+=this.parseDigits(i),i.peekChar()==="."&&(e+=i.consumeChar(),e+=this.parseDigits(i)),{value:e}}static parseDigits(i){return i.consumeWhile(e=>se.isDigitChar(e))}};var Oe=class{constructor(i){let e=i||"";this.filterExpressions=e?this.parse(e):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}getFilterExpressions(){return this.filterExpressions}parse(i){let e=new se(i),o=[];for(;!e.isAtEnd();){let t=this.parseExpression(e);if(o.push(t),e.skipWhitespace(),!e.isAtEnd()&&!this.parseConnector(e))break}return o}parseExpression(i){let e=Vi.parse(i),o=Hi.parse(i,this.getFieldName(e)),t=Ji.parse(i);return this.buildExpression(e,o,t)}getFieldName(i){return i.field}buildExpression(i,e,o){let t={field:i.field,operator:e.operator,value:o.value,type:i.columnType};return i.type==="nested"&&(t.key=i.key),t}parseConnector(i){let e=i.getPosition(),o=i.consumeWhile(t=>se.isLetterChar(t));try{return Af(o)}catch(t){if(t instanceof Error&&t.message.includes("trailing characters")){let n=i.getFullInput().slice(e);throw new Error(`Invalid filter string, trailing characters ${n}`)}throw t}}};async function Tf(a,i,e,o,t){let n=await a.traces.searchTraces({projectName:i,filters:e!=null?e:void 0,limit:o,truncate:t});return await Me(n,j.TracePublic,o)}async function Ef(a,i,e,o){let t=Date.now(),n=[];for(;;){if(n=await a(),n.length>=i||Date.now()-t>=e)return n;await new Promise(m=>setTimeout(m,o));}}function Pf(a){if(!a)return null;let e=new Oe(a).getFilterExpressions();return e?e.map(o=>{let t={field:o.field,operator:o.operator,value:o.value};return o.key&&(t.key=o.key),t}):null}var Qd=[],pr=class{constructor(i){this.displayTraceLog=i=>{if(i===this.lastProjectNameLogged||!this.config.apiUrl)return;let e=wf({apiUrl:this.config.apiUrl,projectName:i,workspaceName:this.config.workspaceName});k.info(`Started logging traces to the "${i}" project at ${Qi(e)}`),this.lastProjectNameLogged=i;};this.trace=i=>{var t;k.debug("Creating new trace with data:",i);let e=(t=i.projectName)!=null?t:this.config.projectName,o=new Oa({id:oe(),startTime:new Date,...i,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 i=>{k.debug(`Getting dataset with name "${i}"`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.getDatasetByIdentifier({datasetName:i});return new zr(e,this)}catch(e){throw e instanceof p&&e.statusCode===404?new Oi(i):e}};this.createDataset=async(i,e)=>{k.debug(`Creating dataset with name "${i}"`);let o=new zr({name:i,description:e},this);try{return this.datasetBatchQueue.create({name:o.name,description:o.description,id:o.id}),k.debug("Dataset added to the queue with name:",o.name),o}catch(t){throw k.error(`Failed to create dataset "${i}"`,{error:t}),new Error(`Error creating dataset "${i}": ${t}`)}};this.getOrCreateDataset=async(i,e)=>{k.debug(`Attempting to retrieve or create dataset with name: "${i}"`);try{return await this.getDataset(i)}catch(o){if(o instanceof Oi)return k.info(`Dataset "${i}" not found. Proceeding to create a new one.`),this.createDataset(i,e);throw k.error(`Error retrieving dataset "${i}":`,o),o}};this.getDatasets=async(i=100)=>{k.debug(`Getting all datasets (limit: ${i})`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.findDatasets({size:i}),o=[];for(let t of e.content||[])o.push(new zr(t,this));return k.info(`Retrieved ${o.length} datasets`),o}catch(e){throw k.error("Failed to retrieve datasets",{error:e}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async i=>{k.debug(`Deleting dataset with name "${i}"`);try{let e=await this.getDataset(i);if(!e.id)throw new Error(`Cannot delete dataset "${i}": ID not available`);this.datasetBatchQueue.delete(e.id);}catch(e){throw k.error(`Failed to delete dataset "${i}"`,{error:e}),new Error(`Failed to delete dataset "${i}": ${e}`)}};this.createExperiment=async({datasetName:i,name:e,experimentConfig:o,prompts:t,type:n=Dn.Regular,optimizationId:c})=>{if(k.debug(`Creating experiment for dataset "${i}"`),!i)throw new Error("Dataset name is required to create an experiment");let[m,u]=Rf(o,t),g=oe(),f=new sr({id:g,name:e,datasetName:i,prompts:t},this);try{return this.api.experiments.createExperiment({id:g,datasetName:i,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 "${i}"`,{error:y}),new Error(`Error creating experiment: ${y}`)}};this.updateExperiment=async(i,e)=>{if(!i)throw new Error("id is required to update an experiment");let{name:o,experimentConfig:t}=e;if(!o&&!t)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");k.debug(`Updating experiment with ID "${i}"`);let n={};o!==void 0&&(n.name=o),t!==void 0&&(n.metadata=t);try{await this.api.experiments.updateExperiment(i,n);}catch(c){throw k.error(`Failed to update experiment with ID "${i}"`,{error:c}),c}};this.getExperimentById=async i=>{k.debug(`Getting experiment with ID "${i}"`);try{let e=await this.api.experiments.getExperimentById(i);return new sr({id:e.id,name:e.name,datasetName:e.datasetName},this)}catch(e){throw e instanceof p&&e.statusCode===404?new Wi(`No experiment found with ID '${i}'`):(k.error(`Failed to get experiment with ID "${i}"`,{error:e}),e)}};this.getExperimentsByName=async i=>{k.debug(`Getting experiments with name "${i}"`);try{let e=await this.api.experiments.streamExperiments({name:i});return (await Me(e,j.ExperimentPublic)).map(t=>new sr({id:t.id,name:t.name,datasetName:t.datasetName},this))}catch(e){throw k.error(`Failed to get experiments with name "${i}"`,{error:e}),e}};this.getExperiment=async i=>{k.debug(`Getting experiment with name "${i}"`);let e=await this.getExperimentsByName(i);if(e.length===0)throw new Wi(i);return e[0]};this.getDatasetExperiments=async(i,e=100)=>{var c;k.debug(`Getting experiments for dataset "${i}"`);let o=await this.getDataset(i),t=Math.min(100,e),n=[];try{let m=1;for(;n.length<e;){let u=await this.api.experiments.findExperiments({page:m,size:t,datasetId:o.id}),g=(c=u==null?void 0:u.content)!=null?c:[];if(g.length===0)break;let f=e-n.length,y=Math.min(g.length,f);for(let v=0;v<y;v++){let z=g[v];n.push(new sr({id:z.id,name:z.name,datasetName:z.datasetName},this));}if(y<g.length)break;m+=1;}return n}catch(m){throw k.error(`Failed to get experiments for dataset "${i}"`,{error:m}),m}};this.deleteExperiment=async i=>{k.debug(`Deleting experiment with ID "${i}"`);try{await this.api.experiments.deleteExperimentsById({ids:[i]});}catch(e){throw k.error(`Failed to delete experiment with ID "${i}"`,{error:e}),e}};this.createPrompt=async i=>{var e;k.debug("Creating prompt",{name:i.name});try{let o=await kf(this.api.prompts,i.name,this.api.requestOptions),t=(e=i.type)!=null?e:ye.MUSTACHE,n=vf(i,o,t),c;if(n?(k.debug("Creating new prompt version",{name:i.name}),c=await this.api.prompts.createPromptVersion({name:i.name,version:{template:i.prompt,metadata:i.metadata,type:t}},this.api.requestOptions)):(k.debug("Returning existing prompt version",{name:i.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=De.fromApiResponse(m,c,this);return k.debug("Prompt created",{name:i.name}),i.description||i.tags?await u.updateProperties({description:i.description,tags:i.tags}):u}catch(o){throw k.error("Failed to create prompt",{name:i.name,error:o}),o}};this.getPrompt=async i=>{var e;k.debug("Getting prompt",i);try{let t=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:i.name}]),size:1},this.api.requestOptions)).content)==null?void 0:e[0];if(!t)return k.debug("Prompt not found",{name:i.name}),null;let n=await this.api.prompts.retrievePromptVersion(i,this.api.requestOptions);return De.fromApiResponse(t,n,this)}catch(o){if(o instanceof p&&o.statusCode===404)return null;throw k.error("Failed to get prompt",{name:i.name,error:o}),o}};this.searchPrompts=async i=>{var e;k.debug("Searching prompts",{filterString:i});try{let o;if(i){let u=new Oe(i).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 De.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 i=>{k.debug("Deleting prompts in batch",{count:i.length});try{await this.api.prompts.deletePromptsBatch({ids:i},this.api.requestOptions),k.info("Successfully deleted prompts",{count:i.length});}catch(e){throw k.error("Failed to delete prompts",{count:i.length,error:e}),e}};this.searchTraces=async i=>{let{projectName:e,filterString:o,maxResults:t=1e3,truncate:n=true,waitForAtLeast:c,waitForTimeout:m=60}=i!=null?i:{};k.debug("Searching traces",{projectName:e,filterString:o,maxResults:t,truncate:n,waitForAtLeast:c,waitForTimeout:m});let u=Pf(o),g=e!=null?e:this.config.projectName,f=()=>Tf(this.api,g,u,t,n);if(c===void 0)return await f();let y=await Ef(f,c,m*1e3,5e3);if(y.length<c)throw new $a(`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(i){k.error("Error during flush operation:",{error:i instanceof Error?i.message:i});}};k.debug("Initializing OpikClient with config:",i),this.config=xu(i);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};i!=null&&i.headers&&(k.debug("Initializing OpikClient with additional headers:",i==null?void 0:i.headers),e.requestOptions={headers:i==null?void 0:i.headers}),this.api=new Xa(e);let o=this.config.holdUntilFlush?24*60*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new La(this.api,o),this.traceBatchQueue=new Ha(this.api,o),this.spanFeedbackScoresBatchQueue=new Va(this.api,o),this.traceFeedbackScoresBatchQueue=new Ja(this.api,o),this.datasetBatchQueue=new Ka(this.api,o),Qd.push(this);}};var oR="track.decorator",Xi=new async_hooks.AsyncLocalStorage,iR=()=>{let{span:a,trace:i}=Xi.getStore()||{};if(!(!a||!i))return {span:a,trace:i}};function tR(a){return !!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"}function aR({name:a,parentSpan:i,projectName:e,trace:o,type:t="llm"}){k.debug("Creating new span:",{name:a,parentSpan:i==null?void 0:i.data.id,projectName:e,type:t});let n=o;n||(n=Zd().trace({name:a,projectName:e}));let c=n.span({name:a,parentSpanId:i==null?void 0:i.data.id,projectName:e,type:t});return k.debug("Span created with ID:",c.data.id),{span:c,trace:n}}function nR({args:a,span:i,trace:e}){if(k.debug("Starting span execution:",{spanId:i.data.id,traceId:e==null?void 0:e.data.id}),a.length===0)return;let o={arguments:a};k.debug("Recording span input"),i.update({input:o}),e&&(k.debug("Recording trace input"),e.update({input:o}));}function Cf({result:a,span:i,trace:e,enrichSpan:o}){k.debug("Recording successful execution:",{spanId:i.data.id,traceId:e==null?void 0:e.data.id});let t=typeof a=="object"?a:{result:a},n=new Date,c={endTime:n,output:t};if(o){let m=o(a);Object.assign(c,m);}i.update(c),e&&e.update({endTime:n,output:t});}function jf({span:a,error:i,trace:e}){var o,t;k.error("Recording execution error:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id,error:i instanceof Error?{name:i.name,message:i.message,stack:i.stack}:i}),i instanceof Error&&a.update({errorInfo:{message:i.message,exceptionType:i.name,traceback:(o=i.stack)!=null?o:""}}),a.end(),e&&(e.update({errorInfo:{message:i.message,exceptionType:i.name,traceback:(t=i.stack)!=null?t:""}}),e.end());}function nn({name:a,projectName:i,type:e,enrichSpan:o}={},t){return function(...c){let m=Xi.getStore(),{span:u,trace:g}=aR({name:a!=null?a:t.name||oR,parentSpan:m==null?void 0:m.span,projectName:i,trace:m==null?void 0:m.trace,type:e}),f=!m,y=this;return Xi.run({span:u,trace:g},()=>{let v=f?g:void 0;try{nR({args:c,span:u,trace:v});let z=t.apply(y,c);return tR(z)?z.then(S=>(Cf({span:u,result:S,trace:v,enrichSpan:o}),S),S=>{throw jf({span:u,error:S,trace:v}),S}):(Cf({span:u,result:z,trace:v,enrichSpan:o}),z)}catch(z){throw jf({span:u,error:z,trace:v}),z}})}}function je(a,i){if(typeof a=="function")return nn({},a);let e=a;return i?nn(e,i):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 nn(e,c)}let[,,t]=o;if(!t||typeof t.value!="function")throw new Error("track decorator can only be applied to methods");let n=t.value;return t.value=nn(e,n),t}}var Yd=null;function Zd(){return Yd===null&&(Yd=new pr),Yd}var sR=async()=>{k.debug("Starting flushAll operation");try{await Promise.all([Zd().flush(),...Qd.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 If(a,i){if(!i||typeof i!="object")throw new Error("Arguments must be an object");let e=a.validationSchema,t=e.extend(Object.fromEntries(Object.entries(e.shape).map(([n,c])=>[n,c.refine(m=>m!==void 0,{message:`${n} cannot be undefined`,path:[n]})]))).safeParse(i);if(!t.success){let n=t.error.issues.map(m=>m.path[0]).filter(Boolean),c=[...new Set(n)];throw new Error(pR(a,i,c))}}function pR(a,i,e){let o=Object.keys(i),t=e.filter(n=>!(n in i));return `Metric '${a.name}' is skipped, missing required arguments: ${t.join(", ")}. Available arguments: ${o.join(", ")}.`}var pn=class{static calculateAverageScores(i){if(!i||i.length===0)return new Map;let e=new Map;for(let t of i)if(!(!t||!t.scoreResults||t.scoreResults.length===0))for(let n of t.scoreResults){if(!n||n.scoringFailed||typeof n.value!="number")continue;let c=e.get(n.name)||{sum:0,count:0};c.sum+=n.value,c.count+=1,e.set(n.name,c);}let o=new Map;return e.forEach((t,n)=>{o.set(n,t.count>0?t.sum/t.count:0);}),o}static formatScore(i){return i.toFixed(4)}static formatTime(i){let e=Math.floor(i/3600),o=Math.floor(i%3600/60),t=Math.floor(i%60);return `${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`}static async generateResultTable(i,e,o,t){if(i.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(t),m=[
|
|
16
|
-
`),u=await e.ensureNameLoaded(),g=
|
|
15
|
+
No metrics available to display.`);return}let n=[...o.keys()].sort(),c=this.formatTime(t),m=[sn__default.default.bold(`Total time: ${c}`),sn__default.default.bold(`Number of samples: ${i.length}`),"",...n.map(f=>{let y=this.formatScore(o.get(f)||0);return sn__default.default.green(`${f}: ${y} (avg)`)})].join(`
|
|
16
|
+
`),u=await e.ensureNameLoaded(),g=cR__default.default(m,{title:`${u} (${i.length} samples)`,titleAlignment:"left",padding:1,margin:0,borderColor:"cyan",borderStyle:"round"});k.info(`
|
|
17
17
|
`+g+`
|
|
18
|
-
`),k.info(
|
|
18
|
+
`),k.info(sn__default.default.blue("Uploading results to Opik ... "));}static async displayExperimentLink(i){let e=await i.getUrl();k.info(`View the results ${Qi(e,"in your Opik dashboard")}`);}static async processResults(i,e,o=0){let t=this.calculateAverageScores(i);await this.generateResultTable(i,e,t,o),await this.displayExperimentLink(e);let n=await e.ensureNameLoaded();return {experimentId:e.id,experimentName:n,testResults:i}}};function Uf(a,i,e){if(!a||typeof i!="string"||i.trim()==="")return e;let o=i.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),t=a;for(let n of o)if(typeof t=="object"&&t!==null&&n in t)t=t[n];else return e;return t===void 0?e:t}var Nf,qd;Nf=[je({name:"metrics_calculation",type:ze.General})];var Sr=class{constructor(i,e,o){gu(qd,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=i.dataset,this.experiment=o,this.task=i.task,this.scoringMetrics=i.scoringMetrics||[],this.projectName=i.projectName,this.nbSamples=i.nbSamples,this.scoringKeyMapping=i.scoringKeyMapping;}async execute(){var f;let i=performance.now(),e=[],o=await this.dataset.getItems(this.nbSamples),t=o.length,n=k.settings.minLevel;k.settings.minLevel=6;let c=lR__default.default({text:`Evaluating dataset (0/${t} items)`}).start(),m=[];for(let y=0;y<o.length;y++){let v=o[y];try{this.rootTrace=this.client.trace({projectName:this.projectName,name:"evaluation_task",createdBy:"evaluation",input:v}),Xi.enterWith({trace:this.rootTrace});let z=await this.executeTask(v);m.push(z),this.rootTrace.update({output:z.testCase.taskOutput,endTime:new Date});}catch(z){let S=z instanceof Error?z.message:String(z);k.error(`Error processing dataset item: ${v.id} - ${S}`),z instanceof Error&&this.rootTrace.update({errorInfo:{message:z.message,exceptionType:z.name,traceback:(f=z.stack)!=null?f:""},endTime:new Date});}e.push(new en({datasetItemId:v.id,traceId:this.rootTrace.data.id})),c.text=`Evaluating dataset (${y+1}/${t} items, ${Math.round((y+1)/t*100)}%)`;}let g=(performance.now()-i)/1e3;return c.succeed(`Evaluation complete: ${t} items processed in ${g.toFixed(2)}s`),k.settings.minLevel=n,this.experiment.insert(e),await this.client.flush(),pn.processResults(m,this.experiment,g)}async executeTask(i){let e={},o=[];k.debug(`Starting evaluation task on dataset item ${i.id}`),e=await je({name:"llm_task",type:ze.General},this.task)(i),k.debug(`Finished evaluation task on dataset item ${i.id}`);let t=this.prepareScoringInputs(i,e),n={traceId:this.rootTrace.data.id,datasetItemId:i.id,scoringInputs:t,taskOutput:e};return this.scoringMetrics.length>0?this.calculateScores(n):{testCase:n,scoreResults:o}}async calculateScores(i){let e=[],{scoringInputs:o}=i;for(let t of this.scoringMetrics){k.debug(`Calculating score for metric ${t.name}`);try{If(t,o);let n=await t.score(o),c=Array.isArray(n)?n:[n];e.push(...c);}catch(n){let c=n instanceof Error?n.message:String(n);k.error(`Metric ${t.name} failed: ${c}`);}k.debug(`Finished calculating score for metric ${t.name}`);}return e.forEach(t=>{var n;return (n=this.rootTrace)==null?void 0:n.score({name:t.name,value:t.value,reason:t.reason})}),{testCase:i,scoreResults:e}}prepareScoringInputs(i,e){let o={...i,...e};if(!this.scoringKeyMapping)return o;let t={...o};for(let[n,c]of Object.entries(this.scoringKeyMapping)){let m=Uf(o,c);m!==void 0&&(t[n]=m);}return t}};qd=du(),fu(qd,1,"calculateScores",Nf,Sr),xn(qd,Sr);var _r=class _r{static getInstance(i){return _r.instance||(_r.instance=new pr(i)),_r.instance}};_r.instance=null;var cn=_r;async function Mf(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 i=(o=a.client)!=null?o:cn.getInstance(),e=await i.createExperiment({name:a.experimentName,datasetName:a.dataset.name,experimentConfig:a.experimentConfig,prompts:a.prompts});try{let t=new Sr(a,i,e);return k.info("Starting evaluation"),t.execute()}catch(t){throw k.error(`Error during evaluation: ${t}`),t}}var cr=class{constructor(i){this.modelName=i;}};var Ki=class a extends Error{constructor(i){super(i),this.name="ModelError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},Ar=class a extends Ki{constructor(e,o){super(e);this.cause=o;this.name="ModelGenerationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},We=class a extends Ki{constructor(i){super(i),this.name="ModelConfigurationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}};function gR(a,i){return a.startsWith("gpt-")||a.startsWith("o1")||a.startsWith("o3")||a.startsWith("chatgpt-")}function fR(a,i){return a.startsWith("claude-")}function hR(a,i){return a.startsWith("gemini-")||a.startsWith("gemma-")}function eu(a,i,e){if(!i)throw new We(`API key for ${a} is not configured. Please provide it via the 'apiKey' option or set the ${e} environment variable.`)}function ru(a,i){if(gR(a)){let e=(i==null?void 0:i.apiKey)||process.env.OPENAI_API_KEY;return eu("OpenAI",e,"OPENAI_API_KEY"),openai.createOpenAI({apiKey:e,...i})(a)}if(fR(a)){let e=(i==null?void 0:i.apiKey)||process.env.ANTHROPIC_API_KEY;return eu("Anthropic",e,"ANTHROPIC_API_KEY"),anthropic.createAnthropic({apiKey:e,...i})(a)}if(hR(a)){let e=(i==null?void 0:i.apiKey)||process.env.GOOGLE_API_KEY;return eu("Google Gemini",e,"GOOGLE_API_KEY"),google.createGoogleGenerativeAI({apiKey:e,...i})(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 wR={inputTokens:"prompt_tokens",outputTokens:"completion_tokens",totalTokens:"total_tokens",reasoningTokens:"reasoning_tokens",cachedInputTokens:"cached_input_tokens"};function bR(a){if(!a||typeof a!="object")return false;let i=a,e="usage"in i,o="response"in i,t="text"in i,n="object"in i;return e||o||t||n}function ou(a,i){if(!bR(a))return {model:i};let e={model:xR(a,i)},o=RR(a.usage);o&&(e.usage=o);let t=yR(a);t&&(e.provider=t);let n=vR(a);n&&(e.metadata=n);let c=zR(a);return c&&(e.output=c),e}function xR(a,i){var e,o;return (o=(e=a.response)==null?void 0:e.modelId)!=null?o:i}function RR(a){if(!a)return;let i={};for(let[e,o]of Object.entries(wR)){let t=a[e];t!==void 0&&(i[o]=t);}return Object.keys(i).length>0?i:void 0}function yR(a){if(!a.providerMetadata)return;let i=Object.keys(a.providerMetadata);return i.length>0?i[0]:void 0}function kR(a){if(!a)return;let i={};return a.id&&(i.id=a.id),a.timestamp&&(i.timestamp=a.timestamp.toISOString()),Object.keys(i).length>0?i:void 0}function vR(a){let i={};a.usage&&(i.usage=a.usage),a.warnings&&a.warnings.length>0&&(i.warnings=a.warnings);let e=kR(a.response);return e&&(i.response=e),a.providerMetadata&&(i.providerMetadata=a.providerMetadata),a.finishReason&&(i.finishReason=a.finishReason),Object.keys(i).length>0?i:void 0}function zR(a){let i={};return "text"in a&&a.text&&(i.text=a.text),"object"in a&&a.object!==void 0&&(i.object=a.object),"toolCalls"in a&&Array.isArray(a.toolCalls)&&(i.toolCalls=a.toolCalls),"toolResults"in a&&Array.isArray(a.toolResults)&&(i.toolResults=a.toolResults),"sources"in a&&Array.isArray(a.sources)&&(i.sources=a.sources),Object.keys(i).length>0?i:void 0}var Tr=class extends cr{constructor(i,e={trackGenerations:true}){let o=typeof i=="string"?i:i.modelId;super(o);let{trackGenerations:t,...n}=e;try{typeof i!="string"?(this.model=i,k.debug("Initialized VercelAIChatModel with custom LanguageModel")):(this.model=ru(i,n),k.debug(`Initialized VercelAIChatModel with model ID: ${i}`)),t?(this._generateText=je({name:"model.generateText",type:ze.Llm,enrichSpan:c=>ou(c,this.modelName)},ai$1.generateText),this._generateObject=je({name:"model.generateObject",type:ze.Llm,enrichSpan:c=>ou(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(i,e,o){try{let t;if(e){k.debug(`Generating structured output with model ${this.modelName}, input length: ${i.length}`);let n=await this._generateObject({model:this.model,prompt:i,schema:e,...o});k.debug(`Generated structured output with model ${this.modelName}`),t=JSON.stringify(n.object);}else {k.debug(`Generating text with model ${this.modelName}, input length: ${i.length}`);let n=await this._generateText({model:this.model,prompt:i,...o});k.debug(`Generated text with model ${this.modelName}, output length: ${n.text.length}`),t=n.text;}return t}catch(t){let n=e?`Failed to generate structured output with model ${this.modelName}`:`Failed to generate text with model ${this.modelName}`;throw k.error(n,{error:t}),new Ar(n,t instanceof Error?t:new Error(String(t)))}}async generateProviderResponse(i,e){try{k.debug(`Generating provider response with model ${this.modelName}, messages count: ${i.length}`);let o=await this._generateText({model:this.model,messages:i,...e});return k.debug(`Generated provider response with model ${this.modelName}`),o}catch(o){let t=`Failed to generate provider response with model ${this.modelName}`;throw k.error(t,{error:o}),new Ar(t,o instanceof Error?o:new Error(String(o)))}}};var Of="gpt-4o";function iu(a,i){return new Tr(a,i)}function Wf(a,i){return new Tr(a,i)}function SR(a){return a instanceof cr}function _R(a){return typeof a=="object"&&a!==null&&"modelId"in a&&typeof a.modelId=="string"}function AR(a){return typeof a=="string"&&a.length>0}function TR(a){let i=typeof a,e=i==="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: ${Of})
|
|
23
23
|
|
|
24
|
-
Received: ${
|
|
25
|
-
`)}function
|
|
26
|
-
`)}function
|
|
24
|
+
Received: ${i} ${e}`)}function Gi(a,i){if(a==null)return iu(Of,i);if(AR(a))return iu(a,i);if(SR(a))return a;if(_R(a))return Wf(a,i);throw TR(a)}function Bf(a){return a.map(i=>{let e=Array.isArray(i.content)?ER(i.content):i.content;return `${i.role}: ${e}`}).join(`
|
|
25
|
+
`)}function ER(a){return a.map(i=>i.type==="text"?i.text:i.type==="file"?`[file: ${i.filename||"unknown"}]`:i.type==="tool-call"?`[tool-call: ${i.toolName}]`:i.type==="tool-result"?`[tool-result: ${i.toolName}]`:i.type==="reasoning"?`[reasoning: ${i.text}]`:"").filter(i=>i.length>0).join(`
|
|
26
|
+
`)}function PR(a,i,e){return typeof a=="string"?_e(a,i,e):Array.isArray(a)?a.map(t=>t.type==="text"&&typeof t.text=="string"?{...t,text:_e(t.text,i,e)}:t.type==="image"&&typeof t.image=="string"?{...t,image:_e(t.image,i,e)}:t.type==="file"&&typeof t.data=="string"?{...t,data:_e(t.data,i,e)}:t.type==="reasoning"&&typeof t.text=="string"?{...t,text:_e(t.text,i,e)}:t):a}function Lf(a,i,e){let o=PR(a.content,i,e);return {...a,content:o}}async function Mle(a){var t;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 i=Gi(a.model),e={...a.experimentConfig,prompt_template:a.messages,model:i.modelName,...a.temperature!==void 0&&{temperature:a.temperature},...a.seed!==void 0&&{seed:a.seed}},o=CR(i,a.messages,(t=a.templateType)!=null?t:ye.MUSTACHE,{temperature:a.temperature,seed:a.seed});return Mf({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 CR(a,i,e,o){return async t=>{let n=i.map(g=>Lf(g,t,e)),c=await a.generateProviderResponse(n,o),m=jR(c);return {input:Bf(n),output:m}}}function jR(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(i,e=true){if(this.name=i,this.trackMetric=e,e){let o=this.score.bind(this);this.score=je({name:this.name,type:ze.General},o);}}};var IR=zod.z.object({output:zod.z.unknown(),expected:zod.z.unknown()}),Vf=class extends fe{constructor(e="exact_match",o=true){super(e,o);this.validationSchema=IR;}async score(e){let{output:o,expected:t}=e,n=o===t?1:0;return {name:this.name,value:n,reason:`Exact match: ${n===1?"Match":"No match"}`}}};var UR=zod.z.object({output:zod.z.string(),substring:zod.z.string()}),Hf=class extends fe{constructor(e="contains",o=true,t=false){super(e,o);this.validationSchema=UR;this.caseSensitive=t;}async score(e){let{output:o,substring:t}=e,n=this.caseSensitive?o:o.toLowerCase(),c=this.caseSensitive?t:t.toLowerCase();return n.includes(c)?{name:this.name,value:1,reason:`Contains: "${t}" found in output.`}:{name:this.name,value:0,reason:`Contains: "${t}" not found in output.`}}};var NR=zod.z.object({output:zod.z.string(),pattern:zod.z.string(),flags:zod.z.string().optional()}),Jf=class extends fe{constructor(e="regex_match",o=true){super(e,o);this.validationSchema=NR;}async score(e){let{output:o,pattern:t,flags:n}=e,c;typeof t=="string"&&n?c=new RegExp(t,n):c=new RegExp(t);let m=c.test(o);return {name:this.name,value:m?1:0,reason:m?`Regex: Output matches the regex pattern: ${t}`:`Regex: Output does not match the regex pattern: ${t}`}}};var MR=zod.z.object({output:zod.z.unknown()}),Kf=class extends fe{constructor(e="is_json_metric",o=true){super(e,o);this.validationSchema=MR;}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(i,e){var t;let o=(t=e==null?void 0:e.trackMetric)!=null?t:true;super(i,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(i,e){return Gi(i,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 Gf(a,i=[]){let e="";return i.length>0&&(e=`
|
|
27
27
|
|
|
28
28
|
###EXAMPLES###
|
|
29
29
|
|
|
30
|
-
${
|
|
30
|
+
${i.map((t,n)=>`Example ${n+1}:
|
|
31
31
|
Output: ${t.output}
|
|
32
32
|
{"score": ${t.score}, "reason": "${t.reason}"}`).join(`
|
|
33
33
|
|
|
@@ -84,8 +84,8 @@ ${e}
|
|
|
84
84
|
|
|
85
85
|
Analyze the following text and provide your verdict score, and reason in the specified JSON format:
|
|
86
86
|
|
|
87
|
-
${
|
|
88
|
-
`}var
|
|
87
|
+
${a}
|
|
88
|
+
`}var mn=class a extends Error{constructor(i){super(i),this.name="MetricError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},he=class a extends mn{constructor(e,o){super(e);this.cause=o;this.name="MetricComputationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},dn=class a extends mn{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 DR(a)}}function DR(a){try{let i=a.indexOf("{"),e=a.lastIndexOf("}");if(i===-1||e===-1||i>=e)throw new Error("No valid JSON object found in content");let o=a.substring(i,e+1);return JSON.parse(o)}catch(i){let e=i instanceof Error?i.message:String(i);throw new dn(`Failed to extract JSON from content: ${e}`,i instanceof Error?i:void 0)}}function $f(a,i){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:i,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 FR=zod.z.object({output:zod.z.string()}),OR=zod.z.object({score:zod.z.number(),reason:zod.z.string()}),un=class extends ke{constructor(e){var t,n;let o=(t=e==null?void 0:e.name)!=null?t:"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=FR;this.fewShotExamples=(n=e==null?void 0:e.fewShotExamples)!=null?n:[];}async score(e){let{output:o}=e,t=Gf(o,this.fewShotExamples),n=this.buildModelOptions(),c=await this.model.generateString(t,OR,n);return $f(c,this.name)}};function Qf(a,i){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?
|
|
@@ -117,11 +117,11 @@ ${i}
|
|
|
117
117
|
|
|
118
118
|
Now, please evaluate the following:
|
|
119
119
|
|
|
120
|
-
User Question: ${
|
|
121
|
-
AI Response: ${
|
|
120
|
+
User Question: ${a}
|
|
121
|
+
AI Response: ${i}
|
|
122
122
|
|
|
123
123
|
Provide your evaluation in the specified JSON format.
|
|
124
|
-
`}function
|
|
124
|
+
`}function Yf(a,i){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:i,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 WR=zod.z.object({input:zod.z.string(),output:zod.z.string()}),BR=zod.z.object({score:zod.z.number(),reason:zod.z.string()}),gn=class extends ke{constructor(e){var t;let o=(t=e==null?void 0:e.name)!=null?t:"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=WR;}async score(e){let{input:o,output:t}=e,n=Qf(o,t),c=this.buildModelOptions(),m=await this.model.generateString(n,BR,c);return Yf(m,this.name)}};var LR=`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
|
+
`,VR=`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,11 +187,11 @@ 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 Zf(a,i){return a.length===0?"":`
|
|
191
191
|
|
|
192
192
|
EXAMPLES:
|
|
193
193
|
|
|
194
|
-
${
|
|
194
|
+
${a.map(o=>{let t=i?`Context: ${JSON.stringify(o.context)}
|
|
195
195
|
`:"";return `<example>
|
|
196
196
|
Input: ${o.input}
|
|
197
197
|
${t}Output: ${o.output}
|
|
@@ -199,32 +199,32 @@ ${t}Output: ${o.output}
|
|
|
199
199
|
{"score": "${o.score}", "reason": "${o.reason}"}
|
|
200
200
|
</example>`}).join(`
|
|
201
201
|
|
|
202
|
-
`)}`}function
|
|
202
|
+
`)}`}function qf(a,i,e,o=[]){let t=Zf(o,true);return LR.replace("{examples_str}",t).replace("{input}",a).replace("{context}",JSON.stringify(e)).replace("{output}",i)}function eh(a,i,e=[]){let o=Zf(e,false);return VR.replace("{examples_str}",o).replace("{input}",a).replace("{output}",i)}function rh(a,i){try{let e=Be(a),o=e.score;if(o==null)throw new Error(`Hallucination score is required but got ${o}`);let t=Number(o);if(isNaN(t)||t<0||t>1)throw new Error(`Hallucination score must be between 0.0 and 1.0, got ${t}`);let n="",c=e.reason;return Array.isArray(c)?n=c.map(m=>String(m)).join(" "):c&&(n=String(c)),{name:i,value:t,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 HR=zod.z.object({input:zod.z.string(),output:zod.z.string(),context:zod.z.array(zod.z.string()).optional()}),JR=zod.z.object({score:zod.z.number(),reason:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())])}),fn=class extends ke{constructor(e){var t,n;let o=(t=e==null?void 0:e.name)!=null?t:"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=HR;this.fewShotExamples=(n=e==null?void 0:e.fewShotExamples)!=null?n:[];}async score(e){let{input:o,output:t,context:n}=e,c=n?qf(o,t,n,this.fewShotExamples):eh(o,t,this.fewShotExamples),m=this.buildModelOptions(),u=await this.model.generateString(c,JR,m);return rh(u,this.name)}};var oh=[{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."}],ih=[{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 XR(a){return a.map((i,e)=>`#### Example ${e+1}: ${i.title}
|
|
203
203
|
|
|
204
|
-
- **Input:** "${
|
|
205
|
-
- **Output:** "${
|
|
206
|
-
- **Context:** ${JSON.stringify(
|
|
204
|
+
- **Input:** "${i.input}"
|
|
205
|
+
- **Output:** "${i.output}"
|
|
206
|
+
- **Context:** ${JSON.stringify(i.context)}
|
|
207
207
|
- **Result:**
|
|
208
208
|
\`\`\`json
|
|
209
209
|
{
|
|
210
|
-
"answer_relevance_score": ${
|
|
211
|
-
"reason": "${
|
|
210
|
+
"answer_relevance_score": ${i.answer_relevance_score},
|
|
211
|
+
"reason": "${i.reason}"
|
|
212
212
|
}
|
|
213
213
|
\`\`\``).join(`
|
|
214
214
|
|
|
215
|
-
`)}function
|
|
215
|
+
`)}function KR(a){return a.map((i,e)=>`#### Example ${e+1}: ${i.title}
|
|
216
216
|
|
|
217
|
-
- **Input:** "${
|
|
218
|
-
- **Output:** "${
|
|
217
|
+
- **Input:** "${i.input}"
|
|
218
|
+
- **Output:** "${i.output}"
|
|
219
219
|
- **Result:**
|
|
220
220
|
\`\`\`json
|
|
221
221
|
{
|
|
222
|
-
"answer_relevance_score": ${
|
|
223
|
-
"reason": "${
|
|
222
|
+
"answer_relevance_score": ${i.answer_relevance_score},
|
|
223
|
+
"reason": "${i.reason}"
|
|
224
224
|
}
|
|
225
225
|
\`\`\``).join(`
|
|
226
226
|
|
|
227
|
-
`)}function
|
|
227
|
+
`)}function th(a,i,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,20 +270,20 @@ ${t}Output: ${o.output}
|
|
|
270
270
|
|
|
271
271
|
###FEW-SHOT EXAMPLES###
|
|
272
272
|
|
|
273
|
-
${
|
|
273
|
+
${XR(o)}
|
|
274
274
|
|
|
275
275
|
###INPUTS:###
|
|
276
276
|
***
|
|
277
277
|
Input:
|
|
278
|
-
${
|
|
278
|
+
${a}
|
|
279
279
|
|
|
280
280
|
Output:
|
|
281
|
-
${
|
|
281
|
+
${i}
|
|
282
282
|
|
|
283
283
|
Context:
|
|
284
284
|
${JSON.stringify(e)}
|
|
285
285
|
***
|
|
286
|
-
`}function
|
|
286
|
+
`}function ah(a,i,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,17 +328,17 @@ ${t}Output: ${o.output}
|
|
|
328
328
|
|
|
329
329
|
###FEW-SHOT EXAMPLES###
|
|
330
330
|
|
|
331
|
-
${
|
|
331
|
+
${KR(e)}
|
|
332
332
|
|
|
333
333
|
###INPUTS:###
|
|
334
334
|
***
|
|
335
335
|
Input:
|
|
336
|
-
${
|
|
336
|
+
${a}
|
|
337
337
|
|
|
338
338
|
Output:
|
|
339
|
-
${
|
|
339
|
+
${i}
|
|
340
340
|
***
|
|
341
|
-
`}function
|
|
341
|
+
`}function nh(a,i){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 t=Number(o);if(isNaN(t)||t<0||t>1)throw new Error(`Answer relevance score must be between 0.0 and 1.0, got ${t}`);return {name:i,value:t,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 GR=zod.z.object({input:zod.z.string(),output:zod.z.string(),context:zod.z.array(zod.z.string()).optional()}),$R=zod.z.object({answer_relevance_score:zod.z.number(),reason:zod.z.string()}),hn=class extends ke{constructor(e){var t,n,c,m;let o=(t=e==null?void 0:e.name)!=null?t:"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=GR;this.fewShotExamplesWithContext=(n=e==null?void 0:e.fewShotExamples)!=null?n:oh,this.fewShotExamplesNoContext=(c=e==null?void 0:e.fewShotExamplesNoContext)!=null?c:ih,this.requireContext=(m=e==null?void 0:e.requireContext)!=null?m:true;}async score(e){let{input:o,output:t,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?th(o,t,n,this.fewShotExamplesWithContext):ah(o,t,this.fewShotExamplesNoContext),m=this.buildModelOptions(),u=await this.model.generateString(c,$R,m);return nh(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=hn;exports.BaseLLMJudgeMetric=ke;exports.BaseMetric=fe;exports.Contains=Hf;exports.ExactMatch=Vf;exports.Hallucination=fn;exports.IsJson=Kf;exports.ModelConfigurationError=We;exports.ModelError=Ki;exports.ModelGenerationError=Ar;exports.Moderation=un;exports.Opik=pr;exports.OpikBaseModel=cr;exports.OpikQueryLanguage=Oe;exports.OpikSpanType=ze;exports.Prompt=De;exports.PromptType=ye;exports.RegexMatch=Jf;exports.Usefulness=gn;exports.VercelAIChatModel=Tr;exports.createModel=iu;exports.createModelFromInstance=Wf;exports.detectProvider=ru;exports.disableLogger=xh;exports.evaluate=Mf;exports.evaluatePrompt=Mle;exports.flushAll=sR;exports.generateId=oe;exports.getTrackContext=iR;exports.logger=k;exports.resolveModel=Gi;exports.setLoggerLevel=hu;exports.track=je;
|